]> git.sur5r.net Git - openldap/blob - configure
Rework URI parser to provide true scheme not proto/properties.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.308 2000/06/05 23:23:19 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-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.1"
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 ac_aux_dir=
644 for ac_dir in build $srcdir/build; do
645   if test -f $ac_dir/install-sh; then
646     ac_aux_dir=$ac_dir
647     ac_install_sh="$ac_aux_dir/install-sh -c"
648     break
649   elif test -f $ac_dir/install.sh; then
650     ac_aux_dir=$ac_dir
651     ac_install_sh="$ac_aux_dir/install.sh -c"
652     break
653   elif test -f $ac_dir/shtool; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/shtool install -c"
656     break
657   fi
658 done
659 if test -z "$ac_aux_dir"; then
660   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
661 fi
662 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
663 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
664 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
665
666 OL_VERSION=`cat $ac_aux_dir/version`
667 if test -z "$OL_VERSION"; then
668         { echo "configure: error: could not determine version" 1>&2; exit 1; }
669 fi
670
671 echo "Configuring OpenLDAP $OL_VERSION ..."
672
673
674 echo $ac_n "checking host system type""... $ac_c" 1>&6
675 echo "configure:676: checking host system type" >&5
676 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
677
678 # Make sure we can run config.sub.
679   if $ac_config_sub sun4 >/dev/null 2>&1; then :
680     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
681   fi
682
683   ac_cv_host_alias=$host
684   case "$ac_cv_host_alias" in
685   NONE)
686     case $nonopt in
687     NONE)
688       if ac_cv_host_alias=`$ac_config_guess`; then :
689       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
690       fi ;;
691     *) ac_cv_host_alias=$nonopt ;;
692     esac ;;
693   esac
694
695   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
696   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
697   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
698   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
699 else
700   echo $ac_n "(cached) $ac_c" 1>&6
701 fi
702
703 echo "$ac_t""$ac_cv_host" 1>&6
704
705 host=$ac_cv_host
706 host_alias=$ac_cv_host_alias
707 host_cpu=$ac_cv_host_cpu
708 host_vendor=$ac_cv_host_vendor
709 host_os=$ac_cv_host_os
710
711
712
713
714
715 echo $ac_n "checking target system type""... $ac_c" 1>&6
716 echo "configure:717: checking target system type" >&5
717 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
718
719 # Make sure we can run config.sub.
720   if $ac_config_sub sun4 >/dev/null 2>&1; then :
721     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
722   fi
723
724   ac_cv_target_alias=$target
725   case "$ac_cv_target_alias" in
726   NONE)
727     case $nonopt in
728     NONE)
729       ac_cv_target_alias=$host_alias ;;
730
731     *) ac_cv_target_alias=$nonopt ;;
732     esac ;;
733   esac
734
735   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
736   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
737   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
738   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
739 else
740   echo $ac_n "(cached) $ac_c" 1>&6
741 fi
742
743 echo "$ac_t""$ac_cv_target" 1>&6
744
745 target=$ac_cv_target
746 target_alias=$ac_cv_target_alias
747 target_cpu=$ac_cv_target_cpu
748 target_vendor=$ac_cv_target_vendor
749 target_os=$ac_cv_target_os
750
751
752
753
754
755 echo $ac_n "checking build system type""... $ac_c" 1>&6
756 echo "configure:757: checking build system type" >&5
757 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
758
759 # Make sure we can run config.sub.
760   if $ac_config_sub sun4 >/dev/null 2>&1; then :
761     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
762   fi
763
764   ac_cv_build_alias=$build
765   case "$ac_cv_build_alias" in
766   NONE)
767     case $nonopt in
768     NONE)
769       ac_cv_build_alias=$host_alias ;;
770
771     *) ac_cv_build_alias=$nonopt ;;
772     esac ;;
773   esac
774
775   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
776   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
777   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
778   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
779 else
780   echo $ac_n "(cached) $ac_c" 1>&6
781 fi
782
783 echo "$ac_t""$ac_cv_build" 1>&6
784
785 build=$ac_cv_build
786 build_alias=$ac_cv_build_alias
787 build_cpu=$ac_cv_build_cpu
788 build_vendor=$ac_cv_build_vendor
789 build_os=$ac_cv_build_os
790
791
792
793
794
795 # Do some error checking and defaulting for the host and target type.
796 # The inputs are:
797 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
798 #
799 # The rules are:
800 # 1. You are not allowed to specify --host, --target, and nonopt at the
801 #    same time.
802 # 2. Host defaults to nonopt.
803 # 3. If nonopt is not specified, then host defaults to the current host,
804 #    as determined by config.guess.
805 # 4. Target and build default to nonopt.
806 # 5. If nonopt is not specified, then target and build default to host.
807
808 # The aliases save the names the user supplied, while $host etc.
809 # will get canonicalized.
810 case $host---$target---$nonopt in
811 NONE---*---* | *---NONE---* | *---*---NONE) ;;
812 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
813 esac
814
815 test "$host_alias" != "$target_alias" &&
816   test "$program_prefix$program_suffix$program_transform_name" = \
817     NONENONEs,x,x, &&
818   program_prefix=${target_alias}-
819
820
821 # Find a good install program.  We prefer a C program (faster),
822 # so one script is as good as another.  But avoid the broken or
823 # incompatible versions:
824 # SysV /etc/install, /usr/sbin/install
825 # SunOS /usr/etc/install
826 # IRIX /sbin/install
827 # AIX /bin/install
828 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
829 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
830 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
831 # ./install, which can be erroneously created by make from ./install.sh.
832 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
833 echo "configure:834: checking for a BSD compatible install" >&5
834 if test -z "$INSTALL"; then
835 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
836   echo $ac_n "(cached) $ac_c" 1>&6
837 else
838     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
839   for ac_dir in $PATH; do
840     # Account for people who put trailing slashes in PATH elements.
841     case "$ac_dir/" in
842     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
843     *)
844       # OSF1 and SCO ODT 3.0 have their own names for install.
845       # Don't use installbsd from OSF since it installs stuff as root
846       # by default.
847       for ac_prog in ginstall scoinst install; do
848         if test -f $ac_dir/$ac_prog; then
849           if test $ac_prog = install &&
850             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
851             # AIX install.  It has an incompatible calling convention.
852             :
853           elif test $ac_prog = install &&
854             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
855             # program-specific install script used by HP pwplus--don't use.
856             :
857           else
858             ac_cv_path_install="$ac_dir/$ac_prog -c"
859             break 2
860           fi
861         fi
862       done
863       ;;
864     esac
865   done
866   IFS="$ac_save_IFS"
867
868 fi
869   if test "${ac_cv_path_install+set}" = set; then
870     INSTALL="$ac_cv_path_install"
871   else
872     # As a last resort, use the slow shell script.  We don't cache a
873     # path for INSTALL within a source directory, because that will
874     # break other packages using the cache if that directory is
875     # removed, or if the path is relative.
876     INSTALL="$ac_install_sh"
877   fi
878 fi
879 echo "$ac_t""$INSTALL" 1>&6
880
881 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
882 # It thinks the first close brace ends the variable substitution.
883 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
884
885 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
886
887 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
888
889 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
890 echo "configure:891: checking whether build environment is sane" >&5
891 # Just in case
892 sleep 1
893 echo timestamp > conftestfile
894 # Do `set' in a subshell so we don't clobber the current shell's
895 # arguments.  Must try -L first in case configure is actually a
896 # symlink; some systems play weird games with the mod time of symlinks
897 # (eg FreeBSD returns the mod time of the symlink's containing
898 # directory).
899 if (
900    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
901    if test "$*" = "X"; then
902       # -L didn't work.
903       set X `ls -t $srcdir/configure conftestfile`
904    fi
905    if test "$*" != "X $srcdir/configure conftestfile" \
906       && test "$*" != "X conftestfile $srcdir/configure"; then
907
908       # If neither matched, then we have a broken ls.  This can happen
909       # if, for instance, CONFIG_SHELL is bash and it inherits a
910       # broken ls alias from the environment.  This has actually
911       # happened.  Such a system could not be considered "sane".
912       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
913 alias in your environment" 1>&2; exit 1; }
914    fi
915
916    test "$2" = conftestfile
917    )
918 then
919    # Ok.
920    :
921 else
922    { echo "configure: error: newly created file is older than distributed files!
923 Check your system clock" 1>&2; exit 1; }
924 fi
925 rm -f conftest*
926 echo "$ac_t""yes" 1>&6
927 if test "$program_transform_name" = s,x,x,; then
928   program_transform_name=
929 else
930   # Double any \ or $.  echo might interpret backslashes.
931   cat <<\EOF_SED > conftestsed
932 s,\\,\\\\,g; s,\$,$$,g
933 EOF_SED
934   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
935   rm -f conftestsed
936 fi
937 test "$program_prefix" != NONE &&
938   program_transform_name="s,^,${program_prefix},;$program_transform_name"
939 # Use a double $ so make ignores it.
940 test "$program_suffix" != NONE &&
941   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
942
943 # sed with no file args requires a program.
944 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
945
946 for ac_prog in mawk gawk nawk awk
947 do
948 # Extract the first word of "$ac_prog", so it can be a program name with args.
949 set dummy $ac_prog; ac_word=$2
950 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
951 echo "configure:952: checking for $ac_word" >&5
952 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
953   echo $ac_n "(cached) $ac_c" 1>&6
954 else
955   if test -n "$AWK"; then
956   ac_cv_prog_AWK="$AWK" # Let the user override the test.
957 else
958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
959   ac_dummy="$PATH"
960   for ac_dir in $ac_dummy; do
961     test -z "$ac_dir" && ac_dir=.
962     if test -f $ac_dir/$ac_word; then
963       ac_cv_prog_AWK="$ac_prog"
964       break
965     fi
966   done
967   IFS="$ac_save_ifs"
968 fi
969 fi
970 AWK="$ac_cv_prog_AWK"
971 if test -n "$AWK"; then
972   echo "$ac_t""$AWK" 1>&6
973 else
974   echo "$ac_t""no" 1>&6
975 fi
976
977 test -n "$AWK" && break
978 done
979
980 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
981 echo "configure:982: checking whether ${MAKE-make} sets \${MAKE}" >&5
982 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
983 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
984   echo $ac_n "(cached) $ac_c" 1>&6
985 else
986   cat > conftestmake <<\EOF
987 all:
988         @echo 'ac_maketemp="${MAKE}"'
989 EOF
990 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
991 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
992 if test -n "$ac_maketemp"; then
993   eval ac_cv_prog_make_${ac_make}_set=yes
994 else
995   eval ac_cv_prog_make_${ac_make}_set=no
996 fi
997 rm -f conftestmake
998 fi
999 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1000   echo "$ac_t""yes" 1>&6
1001   SET_MAKE=
1002 else
1003   echo "$ac_t""no" 1>&6
1004   SET_MAKE="MAKE=${MAKE-make}"
1005 fi
1006
1007
1008
1009 PACKAGE=OpenLDAP
1010
1011 VERSION=$OL_VERSION
1012
1013 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1014   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1015 fi
1016
1017
1018
1019 missing_dir=`cd $ac_aux_dir && pwd`
1020 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1021 echo "configure:1022: checking for working aclocal" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1026    ACLOCAL=aclocal
1027    echo "$ac_t""found" 1>&6
1028 else
1029    ACLOCAL="$missing_dir/missing aclocal"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1034 echo "configure:1035: checking for working autoconf" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOCONF=autoconf
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOCONF="$missing_dir/missing autoconf"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1047 echo "configure:1048: checking for working automake" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (automake --version) < /dev/null > /dev/null 2>&1; then
1052    AUTOMAKE=automake
1053    echo "$ac_t""found" 1>&6
1054 else
1055    AUTOMAKE="$missing_dir/missing automake"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1060 echo "configure:1061: checking for working autoheader" >&5
1061 # Run test in a subshell; some versions of sh will print an error if
1062 # an executable is not found, even if stderr is redirected.
1063 # Redirect stdin to placate older versions of autoconf.  Sigh.
1064 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1065    AUTOHEADER=autoheader
1066    echo "$ac_t""found" 1>&6
1067 else
1068    AUTOHEADER="$missing_dir/missing autoheader"
1069    echo "$ac_t""missing" 1>&6
1070 fi
1071
1072 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1073 echo "configure:1074: checking for working makeinfo" >&5
1074 # Run test in a subshell; some versions of sh will print an error if
1075 # an executable is not found, even if stderr is redirected.
1076 # Redirect stdin to placate older versions of autoconf.  Sigh.
1077 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1078    MAKEINFO=makeinfo
1079    echo "$ac_t""found" 1>&6
1080 else
1081    MAKEINFO="$missing_dir/missing makeinfo"
1082    echo "$ac_t""missing" 1>&6
1083 fi
1084
1085 install_sh="$missing_dir/install-sh"
1086 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1087
1088 for ac_prog in gnutar gtar tar
1089 do
1090 # Extract the first word of "$ac_prog", so it can be a program name with args.
1091 set dummy $ac_prog; ac_word=$2
1092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1093 echo "configure:1094: checking for $ac_word" >&5
1094 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1095   echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097   if test -n "$AMTAR"; then
1098   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1099 else
1100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1101   ac_dummy="$PATH"
1102   for ac_dir in $ac_dummy; do
1103     test -z "$ac_dir" && ac_dir=.
1104     if test -f $ac_dir/$ac_word; then
1105       ac_cv_prog_AMTAR="$ac_prog"
1106       break
1107     fi
1108   done
1109   IFS="$ac_save_ifs"
1110 fi
1111 fi
1112 AMTAR="$ac_cv_prog_AMTAR"
1113 if test -n "$AMTAR"; then
1114   echo "$ac_t""$AMTAR" 1>&6
1115 else
1116   echo "$ac_t""no" 1>&6
1117 fi
1118
1119 test -n "$AMTAR" && break
1120 done
1121
1122
1123 AMTARFLAGS=
1124 if test -n "$AMTAR"; then
1125   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1126         AMTARFLAGS=o
1127   fi
1128 fi
1129
1130
1131
1132 cat >> confdefs.h <<EOF
1133 #define OPENLDAP_PACKAGE "$PACKAGE"
1134 EOF
1135
1136 cat >> confdefs.h <<EOF
1137 #define OPENLDAP_VERSION "$VERSION"
1138 EOF
1139
1140
1141
1142
1143 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1144 echo "configure:1145: checking configure arguments" >&5
1145
1146
1147 top_builddir=`pwd`
1148
1149 ldap_subdir="/openldap"
1150
1151 # Check whether --with-subdir or --without-subdir was given.
1152 if test "${with_subdir+set}" = set; then
1153   withval="$with_subdir"
1154   case "$withval" in
1155         no) ldap_subdir=""
1156                 ;;
1157         yes)
1158                 ;;
1159         /*|\\*)
1160                 ldap_subdir="$withval"
1161                 ;;
1162         *)
1163                 ldap_subdir="/$withval"
1164                 ;;
1165 esac
1166
1167 fi
1168
1169
1170 # OpenLDAP --enable-debug
1171         # Check whether --enable-debug or --disable-debug was given.
1172 if test "${enable_debug+set}" = set; then
1173   enableval="$enable_debug"
1174   
1175         ol_arg=invalid
1176         for ol_val in auto yes no ; do
1177                 if test "$enableval" = "$ol_val" ; then
1178                         ol_arg="$ol_val"
1179                 fi
1180         done
1181         if test "$ol_arg" = "invalid" ; then
1182                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1183         fi
1184         ol_enable_debug="$ol_arg"
1185
1186 else
1187         ol_enable_debug="yes"
1188 fi
1189 # end --enable-debug
1190 # OpenLDAP --enable-syslog
1191         # Check whether --enable-syslog or --disable-syslog was given.
1192 if test "${enable_syslog+set}" = set; then
1193   enableval="$enable_syslog"
1194   
1195         ol_arg=invalid
1196         for ol_val in auto yes no ; do
1197                 if test "$enableval" = "$ol_val" ; then
1198                         ol_arg="$ol_val"
1199                 fi
1200         done
1201         if test "$ol_arg" = "invalid" ; then
1202                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1203         fi
1204         ol_enable_syslog="$ol_arg"
1205
1206 else
1207         ol_enable_syslog="auto"
1208 fi
1209 # end --enable-syslog
1210 # OpenLDAP --enable-proctitle
1211         # Check whether --enable-proctitle or --disable-proctitle was given.
1212 if test "${enable_proctitle+set}" = set; then
1213   enableval="$enable_proctitle"
1214   
1215         ol_arg=invalid
1216         for ol_val in auto yes no ; do
1217                 if test "$enableval" = "$ol_val" ; then
1218                         ol_arg="$ol_val"
1219                 fi
1220         done
1221         if test "$ol_arg" = "invalid" ; then
1222                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1223         fi
1224         ol_enable_proctitle="$ol_arg"
1225
1226 else
1227         ol_enable_proctitle="yes"
1228 fi
1229 # end --enable-proctitle
1230 # OpenLDAP --enable-cache
1231         # Check whether --enable-cache or --disable-cache was given.
1232 if test "${enable_cache+set}" = set; then
1233   enableval="$enable_cache"
1234   
1235         ol_arg=invalid
1236         for ol_val in auto yes no ; do
1237                 if test "$enableval" = "$ol_val" ; then
1238                         ol_arg="$ol_val"
1239                 fi
1240         done
1241         if test "$ol_arg" = "invalid" ; then
1242                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1243         fi
1244         ol_enable_cache="$ol_arg"
1245
1246 else
1247         ol_enable_cache="yes"
1248 fi
1249 # end --enable-cache
1250 # OpenLDAP --enable-referrals
1251         # Check whether --enable-referrals or --disable-referrals was given.
1252 if test "${enable_referrals+set}" = set; then
1253   enableval="$enable_referrals"
1254   
1255         ol_arg=invalid
1256         for ol_val in auto yes no ; do
1257                 if test "$enableval" = "$ol_val" ; then
1258                         ol_arg="$ol_val"
1259                 fi
1260         done
1261         if test "$ol_arg" = "invalid" ; then
1262                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1263         fi
1264         ol_enable_referrals="$ol_arg"
1265
1266 else
1267         ol_enable_referrals="yes"
1268 fi
1269 # end --enable-referrals
1270 # OpenLDAP --enable-kbind
1271         # Check whether --enable-kbind or --disable-kbind was given.
1272 if test "${enable_kbind+set}" = set; then
1273   enableval="$enable_kbind"
1274   
1275         ol_arg=invalid
1276         for ol_val in auto yes no ; do
1277                 if test "$enableval" = "$ol_val" ; then
1278                         ol_arg="$ol_val"
1279                 fi
1280         done
1281         if test "$ol_arg" = "invalid" ; then
1282                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1283         fi
1284         ol_enable_kbind="$ol_arg"
1285
1286 else
1287         ol_enable_kbind="auto"
1288 fi
1289 # end --enable-kbind
1290 # OpenLDAP --enable-cldap
1291         # Check whether --enable-cldap or --disable-cldap was given.
1292 if test "${enable_cldap+set}" = set; then
1293   enableval="$enable_cldap"
1294   
1295         ol_arg=invalid
1296         for ol_val in auto yes no ; do
1297                 if test "$enableval" = "$ol_val" ; then
1298                         ol_arg="$ol_val"
1299                 fi
1300         done
1301         if test "$ol_arg" = "invalid" ; then
1302                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1303         fi
1304         ol_enable_cldap="$ol_arg"
1305
1306 else
1307         ol_enable_cldap="no"
1308 fi
1309 # end --enable-cldap
1310 # OpenLDAP --enable-ldapi
1311         # Check whether --enable-ldapi or --disable-ldapi was given.
1312 if test "${enable_ldapi+set}" = set; then
1313   enableval="$enable_ldapi"
1314   
1315         ol_arg=invalid
1316         for ol_val in auto yes no ; do
1317                 if test "$enableval" = "$ol_val" ; then
1318                         ol_arg="$ol_val"
1319                 fi
1320         done
1321         if test "$ol_arg" = "invalid" ; then
1322                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1323         fi
1324         ol_enable_ldapi="$ol_arg"
1325
1326 else
1327         ol_enable_ldapi="no"
1328 fi
1329 # end --enable-ldapi
1330 # OpenLDAP --enable-x_compile
1331         # Check whether --enable-x_compile or --disable-x_compile was given.
1332 if test "${enable_x_compile+set}" = set; then
1333   enableval="$enable_x_compile"
1334   
1335         ol_arg=invalid
1336         for ol_val in yes no ; do
1337                 if test "$enableval" = "$ol_val" ; then
1338                         ol_arg="$ol_val"
1339                 fi
1340         done
1341         if test "$ol_arg" = "invalid" ; then
1342                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1343         fi
1344         ol_enable_x_compile="$ol_arg"
1345
1346 else
1347         ol_enable_x_compile="no"
1348 fi
1349 # end --enable-x_compile
1350
1351
1352 # OpenLDAP --with-cyrus_sasl
1353         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1354 if test "${with_cyrus_sasl+set}" = set; then
1355   withval="$with_cyrus_sasl"
1356   
1357         ol_arg=invalid
1358         for ol_val in auto yes no  ; do
1359                 if test "$withval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1365         fi
1366         ol_with_cyrus_sasl="$ol_arg"
1367
1368 else
1369         ol_with_cyrus_sasl="auto"
1370 fi
1371 # end --with-cyrus_sasl
1372
1373 # OpenLDAP --with-fetch
1374         # Check whether --with-fetch or --without-fetch was given.
1375 if test "${with_fetch+set}" = set; then
1376   withval="$with_fetch"
1377   
1378         ol_arg=invalid
1379         for ol_val in auto yes no  ; do
1380                 if test "$withval" = "$ol_val" ; then
1381                         ol_arg="$ol_val"
1382                 fi
1383         done
1384         if test "$ol_arg" = "invalid" ; then
1385                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1386         fi
1387         ol_with_fetch="$ol_arg"
1388
1389 else
1390         ol_with_fetch="auto"
1391 fi
1392 # end --with-fetch
1393
1394 # OpenLDAP --with-kerberos
1395         # Check whether --with-kerberos or --without-kerberos was given.
1396 if test "${with_kerberos+set}" = set; then
1397   withval="$with_kerberos"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1401                 if test "$withval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1407         fi
1408         ol_with_kerberos="$ol_arg"
1409
1410 else
1411         ol_with_kerberos="auto"
1412 fi
1413 # end --with-kerberos
1414
1415 # OpenLDAP --with-readline
1416         # Check whether --with-readline or --without-readline was given.
1417 if test "${with_readline+set}" = set; then
1418   withval="$with_readline"
1419   
1420         ol_arg=invalid
1421         for ol_val in auto yes no  ; do
1422                 if test "$withval" = "$ol_val" ; then
1423                         ol_arg="$ol_val"
1424                 fi
1425         done
1426         if test "$ol_arg" = "invalid" ; then
1427                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1428         fi
1429         ol_with_readline="$ol_arg"
1430
1431 else
1432         ol_with_readline="auto"
1433 fi
1434 # end --with-readline
1435
1436 # OpenLDAP --with-threads
1437         # Check whether --with-threads or --without-threads was given.
1438 if test "${with_threads+set}" = set; then
1439   withval="$with_threads"
1440   
1441         ol_arg=invalid
1442         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1443                 if test "$withval" = "$ol_val" ; then
1444                         ol_arg="$ol_val"
1445                 fi
1446         done
1447         if test "$ol_arg" = "invalid" ; then
1448                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1449         fi
1450         ol_with_threads="$ol_arg"
1451
1452 else
1453         ol_with_threads="auto"
1454 fi
1455 # end --with-threads
1456
1457 # OpenLDAP --with-tls
1458         # Check whether --with-tls or --without-tls was given.
1459 if test "${with_tls+set}" = set; then
1460   withval="$with_tls"
1461   
1462         ol_arg=invalid
1463         for ol_val in auto ssleay openssl yes no  ; do
1464                 if test "$withval" = "$ol_val" ; then
1465                         ol_arg="$ol_val"
1466                 fi
1467         done
1468         if test "$ol_arg" = "invalid" ; then
1469                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1470         fi
1471         ol_with_tls="$ol_arg"
1472
1473 else
1474         ol_with_tls="auto"
1475 fi
1476 # end --with-tls
1477
1478 # OpenLDAP --with-yielding_select
1479         # Check whether --with-yielding_select or --without-yielding_select was given.
1480 if test "${with_yielding_select+set}" = set; then
1481   withval="$with_yielding_select"
1482   
1483         ol_arg=invalid
1484         for ol_val in auto yes no manual  ; do
1485                 if test "$withval" = "$ol_val" ; then
1486                         ol_arg="$ol_val"
1487                 fi
1488         done
1489         if test "$ol_arg" = "invalid" ; then
1490                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1491         fi
1492         ol_with_yielding_select="$ol_arg"
1493
1494 else
1495         ol_with_yielding_select="auto"
1496 fi
1497 # end --with-yielding_select
1498
1499
1500
1501 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1502 if test "${with_xxslapdoptions+set}" = set; then
1503   withval="$with_xxslapdoptions"
1504   :
1505 fi
1506
1507 # OpenLDAP --enable-slapd
1508         # Check whether --enable-slapd or --disable-slapd was given.
1509 if test "${enable_slapd+set}" = set; then
1510   enableval="$enable_slapd"
1511   
1512         ol_arg=invalid
1513         for ol_val in auto yes no ; do
1514                 if test "$enableval" = "$ol_val" ; then
1515                         ol_arg="$ol_val"
1516                 fi
1517         done
1518         if test "$ol_arg" = "invalid" ; then
1519                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1520         fi
1521         ol_enable_slapd="$ol_arg"
1522
1523 else
1524         ol_enable_slapd="yes"
1525 fi
1526 # end --enable-slapd
1527 # OpenLDAP --enable-cleartext
1528         # Check whether --enable-cleartext or --disable-cleartext was given.
1529 if test "${enable_cleartext+set}" = set; then
1530   enableval="$enable_cleartext"
1531   
1532         ol_arg=invalid
1533         for ol_val in auto yes no ; do
1534                 if test "$enableval" = "$ol_val" ; then
1535                         ol_arg="$ol_val"
1536                 fi
1537         done
1538         if test "$ol_arg" = "invalid" ; then
1539                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1540         fi
1541         ol_enable_cleartext="$ol_arg"
1542
1543 else
1544         ol_enable_cleartext="yes"
1545 fi
1546 # end --enable-cleartext
1547 # OpenLDAP --enable-crypt
1548         # Check whether --enable-crypt or --disable-crypt was given.
1549 if test "${enable_crypt+set}" = set; then
1550   enableval="$enable_crypt"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no ; do
1554                 if test "$enableval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1560         fi
1561         ol_enable_crypt="$ol_arg"
1562
1563 else
1564         ol_enable_crypt="auto"
1565 fi
1566 # end --enable-crypt
1567 # OpenLDAP --enable-kpasswd
1568         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1569 if test "${enable_kpasswd+set}" = set; then
1570   enableval="$enable_kpasswd"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto yes no ; do
1574                 if test "$enableval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1580         fi
1581         ol_enable_kpasswd="$ol_arg"
1582
1583 else
1584         ol_enable_kpasswd="no"
1585 fi
1586 # end --enable-kpasswd
1587 # OpenLDAP --enable-spasswd
1588         # Check whether --enable-spasswd or --disable-spasswd was given.
1589 if test "${enable_spasswd+set}" = set; then
1590   enableval="$enable_spasswd"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no ; do
1594                 if test "$enableval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1600         fi
1601         ol_enable_spasswd="$ol_arg"
1602
1603 else
1604         ol_enable_spasswd="no"
1605 fi
1606 # end --enable-spasswd
1607 # OpenLDAP --enable-modules
1608         # Check whether --enable-modules or --disable-modules was given.
1609 if test "${enable_modules+set}" = set; then
1610   enableval="$enable_modules"
1611   
1612         ol_arg=invalid
1613         for ol_val in auto yes no ; do
1614                 if test "$enableval" = "$ol_val" ; then
1615                         ol_arg="$ol_val"
1616                 fi
1617         done
1618         if test "$ol_arg" = "invalid" ; then
1619                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1620         fi
1621         ol_enable_modules="$ol_arg"
1622
1623 else
1624         ol_enable_modules="no"
1625 fi
1626 # end --enable-modules
1627 # OpenLDAP --enable-multimaster
1628         # Check whether --enable-multimaster or --disable-multimaster was given.
1629 if test "${enable_multimaster+set}" = set; then
1630   enableval="$enable_multimaster"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no ; do
1634                 if test "$enableval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1640         fi
1641         ol_enable_multimaster="$ol_arg"
1642
1643 else
1644         ol_enable_multimaster="no"
1645 fi
1646 # end --enable-multimaster
1647 # OpenLDAP --enable-phonetic
1648         # Check whether --enable-phonetic or --disable-phonetic was given.
1649 if test "${enable_phonetic+set}" = set; then
1650   enableval="$enable_phonetic"
1651   
1652         ol_arg=invalid
1653         for ol_val in auto yes no ; do
1654                 if test "$enableval" = "$ol_val" ; then
1655                         ol_arg="$ol_val"
1656                 fi
1657         done
1658         if test "$ol_arg" = "invalid" ; then
1659                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1660         fi
1661         ol_enable_phonetic="$ol_arg"
1662
1663 else
1664         ol_enable_phonetic="no"
1665 fi
1666 # end --enable-phonetic
1667 # OpenLDAP --enable-quipu
1668         # Check whether --enable-quipu or --disable-quipu was given.
1669 if test "${enable_quipu+set}" = set; then
1670   enableval="$enable_quipu"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1680         fi
1681         ol_enable_quipu="$ol_arg"
1682
1683 else
1684         ol_enable_quipu="no"
1685 fi
1686 # end --enable-quipu
1687 # OpenLDAP --enable-rlookups
1688         # Check whether --enable-rlookups or --disable-rlookups was given.
1689 if test "${enable_rlookups+set}" = set; then
1690   enableval="$enable_rlookups"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1700         fi
1701         ol_enable_rlookups="$ol_arg"
1702
1703 else
1704         ol_enable_rlookups="auto"
1705 fi
1706 # end --enable-rlookups
1707 # OpenLDAP --enable-aci
1708         # Check whether --enable-aci or --disable-aci was given.
1709 if test "${enable_aci+set}" = set; then
1710   enableval="$enable_aci"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1720         fi
1721         ol_enable_aci="$ol_arg"
1722
1723 else
1724         ol_enable_aci="no"
1725 fi
1726 # end --enable-aci
1727 # OpenLDAP --enable-wrappers
1728         # Check whether --enable-wrappers or --disable-wrappers was given.
1729 if test "${enable_wrappers+set}" = set; then
1730   enableval="$enable_wrappers"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1740         fi
1741         ol_enable_wrappers="$ol_arg"
1742
1743 else
1744         ol_enable_wrappers="no"
1745 fi
1746 # end --enable-wrappers
1747 # OpenLDAP --enable-dynamic
1748         # Check whether --enable-dynamic or --disable-dynamic was given.
1749 if test "${enable_dynamic+set}" = set; then
1750   enableval="$enable_dynamic"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1760         fi
1761         ol_enable_dynamic="$ol_arg"
1762
1763 else
1764         ol_enable_dynamic="no"
1765 fi
1766 # end --enable-dynamic
1767
1768 # OpenLDAP --enable-dnssrv
1769         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1770 if test "${enable_dnssrv+set}" = set; then
1771   enableval="$enable_dnssrv"
1772   
1773         ol_arg=invalid
1774         for ol_val in auto yes no ; do
1775                 if test "$enableval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1781         fi
1782         ol_enable_dnssrv="$ol_arg"
1783
1784 else
1785         ol_enable_dnssrv="no"
1786 fi
1787 # end --enable-dnssrv
1788 # OpenLDAP --with-dnssrv_module
1789         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1790 if test "${with_dnssrv_module+set}" = set; then
1791   withval="$with_dnssrv_module"
1792   
1793         ol_arg=invalid
1794         for ol_val in static dynamic ; do
1795                 if test "$withval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1801         fi
1802         ol_with_dnssrv_module="$ol_arg"
1803
1804 else
1805         ol_with_dnssrv_module="static"
1806 fi
1807 # end --with-dnssrv_module
1808
1809 # OpenLDAP --enable-ldap
1810         # Check whether --enable-ldap or --disable-ldap was given.
1811 if test "${enable_ldap+set}" = set; then
1812   enableval="$enable_ldap"
1813   
1814         ol_arg=invalid
1815         for ol_val in auto yes no ; do
1816                 if test "$enableval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1822         fi
1823         ol_enable_ldap="$ol_arg"
1824
1825 else
1826         ol_enable_ldap="no"
1827 fi
1828 # end --enable-ldap
1829 # OpenLDAP --with-ldap_module
1830         # Check whether --with-ldap_module or --without-ldap_module was given.
1831 if test "${with_ldap_module+set}" = set; then
1832   withval="$with_ldap_module"
1833   
1834         ol_arg=invalid
1835         for ol_val in static dynamic ; do
1836                 if test "$withval" = "$ol_val" ; then
1837                         ol_arg="$ol_val"
1838                 fi
1839         done
1840         if test "$ol_arg" = "invalid" ; then
1841                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1842         fi
1843         ol_with_ldap_module="$ol_arg"
1844
1845 else
1846         ol_with_ldap_module="static"
1847 fi
1848 # end --with-ldap_module
1849
1850 # OpenLDAP --enable-ldbm
1851         # Check whether --enable-ldbm or --disable-ldbm was given.
1852 if test "${enable_ldbm+set}" = set; then
1853   enableval="$enable_ldbm"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto yes no ; do
1857                 if test "$enableval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1863         fi
1864         ol_enable_ldbm="$ol_arg"
1865
1866 else
1867         ol_enable_ldbm="yes"
1868 fi
1869 # end --enable-ldbm
1870 # OpenLDAP --with-ldbm_api
1871         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1872 if test "${with_ldbm_api+set}" = set; then
1873   withval="$with_ldbm_api"
1874   
1875         ol_arg=invalid
1876         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1877                 if test "$withval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1883         fi
1884         ol_with_ldbm_api="$ol_arg"
1885
1886 else
1887         ol_with_ldbm_api="auto"
1888 fi
1889 # end --with-ldbm_api
1890
1891 # OpenLDAP --with-ldbm_module
1892         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1893 if test "${with_ldbm_module+set}" = set; then
1894   withval="$with_ldbm_module"
1895   
1896         ol_arg=invalid
1897         for ol_val in static dynamic ; do
1898                 if test "$withval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1904         fi
1905         ol_with_ldbm_module="$ol_arg"
1906
1907 else
1908         ol_with_ldbm_module="static"
1909 fi
1910 # end --with-ldbm_module
1911
1912 # OpenLDAP --with-ldbm_type
1913         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1914 if test "${with_ldbm_type+set}" = set; then
1915   withval="$with_ldbm_type"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto btree hash ; do
1919                 if test "$withval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1925         fi
1926         ol_with_ldbm_type="$ol_arg"
1927
1928 else
1929         ol_with_ldbm_type="auto"
1930 fi
1931 # end --with-ldbm_type
1932
1933 # OpenLDAP --enable-passwd
1934         # Check whether --enable-passwd or --disable-passwd was given.
1935 if test "${enable_passwd+set}" = set; then
1936   enableval="$enable_passwd"
1937   
1938         ol_arg=invalid
1939         for ol_val in auto yes no ; do
1940                 if test "$enableval" = "$ol_val" ; then
1941                         ol_arg="$ol_val"
1942                 fi
1943         done
1944         if test "$ol_arg" = "invalid" ; then
1945                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1946         fi
1947         ol_enable_passwd="$ol_arg"
1948
1949 else
1950         ol_enable_passwd="no"
1951 fi
1952 # end --enable-passwd
1953 # OpenLDAP --with-passwd_module
1954         # Check whether --with-passwd_module or --without-passwd_module was given.
1955 if test "${with_passwd_module+set}" = set; then
1956   withval="$with_passwd_module"
1957   
1958         ol_arg=invalid
1959         for ol_val in static dynamic ; do
1960                 if test "$withval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1966         fi
1967         ol_with_passwd_module="$ol_arg"
1968
1969 else
1970         ol_with_passwd_module="static"
1971 fi
1972 # end --with-passwd_module
1973
1974 # OpenLDAP --enable-perl
1975         # Check whether --enable-perl or --disable-perl was given.
1976 if test "${enable_perl+set}" = set; then
1977   enableval="$enable_perl"
1978   
1979         ol_arg=invalid
1980         for ol_val in auto yes no ; do
1981                 if test "$enableval" = "$ol_val" ; then
1982                         ol_arg="$ol_val"
1983                 fi
1984         done
1985         if test "$ol_arg" = "invalid" ; then
1986                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1987         fi
1988         ol_enable_perl="$ol_arg"
1989
1990 else
1991         ol_enable_perl="no"
1992 fi
1993 # end --enable-perl
1994 # OpenLDAP --with-perl_module
1995         # Check whether --with-perl_module or --without-perl_module was given.
1996 if test "${with_perl_module+set}" = set; then
1997   withval="$with_perl_module"
1998   
1999         ol_arg=invalid
2000         for ol_val in static dynamic ; do
2001                 if test "$withval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2007         fi
2008         ol_with_perl_module="$ol_arg"
2009
2010 else
2011         ol_with_perl_module="static"
2012 fi
2013 # end --with-perl_module
2014
2015 # OpenLDAP --enable-shell
2016         # Check whether --enable-shell or --disable-shell was given.
2017 if test "${enable_shell+set}" = set; then
2018   enableval="$enable_shell"
2019   
2020         ol_arg=invalid
2021         for ol_val in auto yes no ; do
2022                 if test "$enableval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2028         fi
2029         ol_enable_shell="$ol_arg"
2030
2031 else
2032         ol_enable_shell="no"
2033 fi
2034 # end --enable-shell
2035 # OpenLDAP --with-shell_module
2036         # Check whether --with-shell_module or --without-shell_module was given.
2037 if test "${with_shell_module+set}" = set; then
2038   withval="$with_shell_module"
2039   
2040         ol_arg=invalid
2041         for ol_val in static dynamic ; do
2042                 if test "$withval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2048         fi
2049         ol_with_shell_module="$ol_arg"
2050
2051 else
2052         ol_with_shell_module="static"
2053 fi
2054 # end --with-shell_module
2055
2056 # OpenLDAP --enable-sql
2057         # Check whether --enable-sql or --disable-sql was given.
2058 if test "${enable_sql+set}" = set; then
2059   enableval="$enable_sql"
2060   
2061         ol_arg=invalid
2062         for ol_val in auto yes no ; do
2063                 if test "$enableval" = "$ol_val" ; then
2064                         ol_arg="$ol_val"
2065                 fi
2066         done
2067         if test "$ol_arg" = "invalid" ; then
2068                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2069         fi
2070         ol_enable_sql="$ol_arg"
2071
2072 else
2073         ol_enable_sql="no"
2074 fi
2075 # end --enable-sql
2076 # OpenLDAP --with-sql_module
2077         # Check whether --with-sql_module or --without-sql_module was given.
2078 if test "${with_sql_module+set}" = set; then
2079   withval="$with_sql_module"
2080   
2081         ol_arg=invalid
2082         for ol_val in static dynamic ; do
2083                 if test "$withval" = "$ol_val" ; then
2084                         ol_arg="$ol_val"
2085                 fi
2086         done
2087         if test "$ol_arg" = "invalid" ; then
2088                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2089         fi
2090         ol_with_sql_module="$ol_arg"
2091
2092 else
2093         ol_with_sql_module="static"
2094 fi
2095 # end --with-sql_module
2096
2097 # OpenLDAP --enable-tcl
2098         # Check whether --enable-tcl or --disable-tcl was given.
2099 if test "${enable_tcl+set}" = set; then
2100   enableval="$enable_tcl"
2101   
2102         ol_arg=invalid
2103         for ol_val in auto yes no ; do
2104                 if test "$enableval" = "$ol_val" ; then
2105                         ol_arg="$ol_val"
2106                 fi
2107         done
2108         if test "$ol_arg" = "invalid" ; then
2109                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2110         fi
2111         ol_enable_tcl="$ol_arg"
2112
2113 else
2114         ol_enable_tcl="no"
2115 fi
2116 # end --enable-tcl
2117 # OpenLDAP --with-tcl_module
2118         # Check whether --with-tcl_module or --without-tcl_module was given.
2119 if test "${with_tcl_module+set}" = set; then
2120   withval="$with_tcl_module"
2121   
2122         ol_arg=invalid
2123         for ol_val in static dynamic ; do
2124                 if test "$withval" = "$ol_val" ; then
2125                         ol_arg="$ol_val"
2126                 fi
2127         done
2128         if test "$ol_arg" = "invalid" ; then
2129                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2130         fi
2131         ol_with_tcl_module="$ol_arg"
2132
2133 else
2134         ol_with_tcl_module="static"
2135 fi
2136 # end --with-tcl_module
2137
2138
2139 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2140 if test "${with_xxslurpdoptions+set}" = set; then
2141   withval="$with_xxslurpdoptions"
2142   :
2143 fi
2144
2145 # OpenLDAP --enable-slurpd
2146         # Check whether --enable-slurpd or --disable-slurpd was given.
2147 if test "${enable_slurpd+set}" = set; then
2148   enableval="$enable_slurpd"
2149   
2150         ol_arg=invalid
2151         for ol_val in auto yes no ; do
2152                 if test "$enableval" = "$ol_val" ; then
2153                         ol_arg="$ol_val"
2154                 fi
2155         done
2156         if test "$ol_arg" = "invalid" ; then
2157                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2158         fi
2159         ol_enable_slurpd="$ol_arg"
2160
2161 else
2162         ol_enable_slurpd="auto"
2163 fi
2164 # end --enable-slurpd
2165
2166 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2167 if test "${with_xxliboptions+set}" = set; then
2168   withval="$with_xxliboptions"
2169   :
2170 fi
2171
2172 # Check whether --enable-static or --disable-static was given.
2173 if test "${enable_static+set}" = set; then
2174   enableval="$enable_static"
2175   p=${PACKAGE-default}
2176 case "$enableval" in
2177 yes) enable_static=yes ;;
2178 no) enable_static=no ;;
2179 *)
2180   enable_static=no
2181   # Look at the argument we got.  We use all the common list separators.
2182   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2183   for pkg in $enableval; do
2184     if test "X$pkg" = "X$p"; then
2185       enable_static=yes
2186     fi
2187   done
2188   IFS="$ac_save_ifs"
2189   ;;
2190 esac
2191 else
2192   enable_static=yes
2193 fi
2194
2195 # Check whether --enable-shared or --disable-shared was given.
2196 if test "${enable_shared+set}" = set; then
2197   enableval="$enable_shared"
2198   p=${PACKAGE-default}
2199 case "$enableval" in
2200 yes) enable_shared=yes ;;
2201 no) enable_shared=no ;;
2202 *)
2203   enable_shared=no
2204   # Look at the argument we got.  We use all the common list separators.
2205   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2206   for pkg in $enableval; do
2207     if test "X$pkg" = "X$p"; then
2208       enable_shared=yes
2209     fi
2210   done
2211   IFS="$ac_save_ifs"
2212   ;;
2213 esac
2214 else
2215   enable_shared=yes
2216 fi
2217
2218
2219
2220 # validate options
2221 if test $ol_enable_slapd = no ; then
2222                 if test $ol_enable_dnssrv = yes ; then
2223                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2224         fi
2225         if test $ol_enable_ldap = yes ; then
2226                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2227         fi
2228         if test $ol_enable_ldbm = yes ; then
2229                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2230         fi
2231         if test $ol_enable_passwd = yes ; then
2232                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2233         fi
2234         if test $ol_enable_perl = yes ; then
2235                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2236         fi
2237         if test $ol_enable_shell = yes ; then
2238                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2239         fi
2240         if test $ol_enable_tcl = yes ; then
2241                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2242         fi
2243         if test $ol_enable_sql = yes ; then
2244                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2245         fi
2246         if test $ol_enable_modules = yes ; then
2247                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2248         fi
2249         if test $ol_enable_multimaster = yes ; then
2250                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2251         fi
2252         if test $ol_enable_wrappers = yes ; then
2253                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2254         fi
2255         if test $ol_enable_phonetic = yes ; then
2256                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2257         fi
2258         if test $ol_enable_quipu = yes ; then
2259                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2260         fi
2261         if test $ol_enable_rlookups = yes ; then
2262                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2263         fi
2264         if test $ol_enable_aci = yes ; then
2265                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2266         fi
2267         if test $ol_with_ldbm_api != auto ; then
2268                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2269         fi
2270         if test $ol_with_ldbm_type != auto ; then
2271                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2272         fi
2273         if test $ol_with_dnssrv_module != static ; then
2274                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2275         fi
2276         if test $ol_with_ldap_module != static ; then
2277                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2278         fi
2279         if test $ol_with_ldbm_module != static ; then
2280                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2281         fi
2282         if test $ol_with_passwd_module != static ; then
2283                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2284         fi
2285         if test $ol_with_perl_module != static ; then
2286                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2287         fi
2288         if test $ol_with_shell_module != static ; then
2289                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2290         fi
2291         if test $ol_with_tcl_module != static ; then
2292                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2293         fi
2294         if test $ol_with_sql_module != static ; then
2295                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2296         fi
2297         if test $ol_enable_slurpd = yes ; then
2298                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2299         fi
2300
2301         # force settings to no
2302         ol_enable_dnssrv=no
2303         ol_enable_ldap=no
2304         ol_enable_ldbm=no
2305         ol_enable_passwd=no
2306         ol_enable_perl=no
2307         ol_enable_shell=no
2308         ol_enable_tcl=no
2309         ol_enable_sql=no
2310
2311         ol_enable_modules=no
2312         ol_enable_multimaster=no
2313         ol_enable_phonetic=no
2314         ol_enable_quipu=no
2315         ol_enable_rlookups=no
2316         ol_enable_aci=no
2317         ol_enable_wrappers=no
2318         ol_enable_dynamic=no
2319
2320         ol_with_ldbm_api=no
2321         ol_with_ldbm_type=no
2322
2323         ol_with_dnssrv_module=static
2324         ol_with_ldap_module=static
2325         ol_with_ldbm_module=static
2326         ol_with_passwd_module=static
2327         ol_with_perl_module=static
2328         ol_with_shell_module=static
2329         ol_with_tcl_module=static
2330         ol_with_sql_module=static
2331
2332         ol_enable_slurpd=no
2333
2334 elif test $ol_enable_ldbm = no ; then
2335         
2336         if test $ol_with_ldbm_api != auto ; then
2337                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2338         fi
2339
2340         if test $ol_with_ldbm_type != auto ; then
2341                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2342         fi
2343
2344         if test $ol_with_ldbm_module != static ; then
2345                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2346         fi
2347
2348         if test $ol_enable_modules != yes -a \
2349                 $ol_enable_dnssrv = no -a \
2350                 $ol_enable_ldap = no -a \
2351                 $ol_enable_passwd = no -a \
2352                 $ol_enable_perl = no -a \
2353                 $ol_enable_shell = no -a \
2354                 $ol_enable_sql = no -a \
2355                 $ol_enable_tcl = no ; then
2356                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2357         fi
2358
2359         ol_with_ldbm_api=no
2360         ol_with_ldbm_type=no
2361         ol_with_ldbm_module=static
2362
2363 else
2364                 if test $ol_with_ldbm_api = gdbm -a \
2365                 $ol_with_ldbm_type = btree ; then
2366                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2367         fi
2368         if test $ol_with_ldbm_api = mdbm -a \
2369                 $ol_with_ldbm_type = btree ; then
2370                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2371         fi
2372         if test $ol_with_ldbm_api = ndbm -a \
2373                 $ol_with_ldbm_type = btree ; then
2374                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2375         fi
2376 fi
2377
2378 if test $ol_enable_slurpd = yes ; then
2379                 if test $ol_with_threads = no ; then
2380                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2381         fi
2382 fi
2383
2384 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2385         if test $ol_with_kerberos = no ; then
2386                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2387         fi
2388 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2389         if test $ol_with_kerberos != auto ; then
2390                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2391         else
2392                 ol_with_kerberos=no
2393         fi
2394 fi
2395
2396 if test $ol_enable_spasswd = yes ; then
2397         if test $ol_with_cyrus_sasl = no ; then
2398                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2399         fi
2400         ol_link_spasswd=yes
2401 fi
2402
2403 echo "$ac_t""done" 1>&6
2404
2405 LDAP_LIBS=
2406 LDIF_LIBS=
2407 LDBM_LIBS=
2408 LTHREAD_LIBS=
2409 LUTIL_LIBS=
2410
2411 QUIPU_LIBS=
2412 SLAPD_LIBS=
2413 SLURPD_LIBS=
2414
2415 BUILD_SLAPD=no
2416 BUILD_SLURPD=no
2417
2418 BUILD_QUIPU=no
2419 BUILD_THREAD=no
2420
2421 BUILD_DNSSRV=no
2422 BUILD_LDAP=no
2423 BUILD_LDBM=no
2424 BUILD_PASSWD=no
2425 BUILD_PERL=no
2426 BUILD_SHELL=no
2427 BUILD_SQL=no
2428 BUILD_TCL=no
2429
2430 BUILD_DNSSRV_DYNAMIC=static
2431 BUILD_LDAP_DYNAMIC=static
2432 BUILD_LDBM_DYNAMIC=static
2433 BUILD_PASSWD_DYNAMIC=static
2434 BUILD_PERL_DYNAMIC=static
2435 BUILD_SHELL_DYNAMIC=static
2436 BUILD_TCL_DYNAMIC=static
2437 BUILD_SQL_DYNAMIC=static
2438
2439 SLAPD_MODULES_LDFLAGS=
2440 SLAPD_MODULES_CPPFLAGS=
2441 SLAPD_MODULES_LIST=
2442
2443 SLAPD_PERL_LDFLAGS=
2444 MOD_PERL_LDFLAGS=
2445 PERL_CPPFLAGS=
2446
2447 SLAPD_SQL_LDFLAGS=
2448 SLAPD_SQL_LIBS=
2449 SLAPD_SQL_INCLUDES=
2450
2451 MOD_TCL_LIB=
2452 KRB4_LIBS=
2453 KRB5_LIBS=
2454 READLINE_LIBS=
2455 SASL_LIBS=
2456 TERMCAP_LIBS=
2457 TLS_LIBS=
2458 MODULES_LIBS=
2459 AUTH_LIBS=
2460
2461
2462
2463 cat >> confdefs.h <<\EOF
2464 #define HAVE_MKVERSION 1
2465 EOF
2466
2467
2468
2469
2470 ol_aix_threads=no
2471 case "$target" in
2472 *-*-aix*)       if test -z "$CC" ; then
2473                 case "$ol_with_threads" in
2474                 auto | yes |  posix) ol_aix_threads=yes ;;
2475                 esac
2476         fi
2477 ;;
2478 esac
2479
2480 if test $ol_aix_threads = yes ; then
2481         if test -z "${CC}" ; then
2482                 for ac_prog in cc_r xlc_r cc
2483 do
2484 # Extract the first word of "$ac_prog", so it can be a program name with args.
2485 set dummy $ac_prog; ac_word=$2
2486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2487 echo "configure:2488: checking for $ac_word" >&5
2488 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2489   echo $ac_n "(cached) $ac_c" 1>&6
2490 else
2491   if test -n "$CC"; then
2492   ac_cv_prog_CC="$CC" # Let the user override the test.
2493 else
2494   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2495   ac_dummy="$PATH"
2496   for ac_dir in $ac_dummy; do
2497     test -z "$ac_dir" && ac_dir=.
2498     if test -f $ac_dir/$ac_word; then
2499       ac_cv_prog_CC="$ac_prog"
2500       break
2501     fi
2502   done
2503   IFS="$ac_save_ifs"
2504 fi
2505 fi
2506 CC="$ac_cv_prog_CC"
2507 if test -n "$CC"; then
2508   echo "$ac_t""$CC" 1>&6
2509 else
2510   echo "$ac_t""no" 1>&6
2511 fi
2512
2513 test -n "$CC" && break
2514 done
2515
2516
2517                 if test "$CC" = cc ; then
2518                                                 if test $ol_with_threads != auto ; then
2519                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2520                         else
2521                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2522                         fi
2523                         ol_with_threads=no
2524                 fi
2525         fi
2526
2527         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2528                 ol_with_threads=posix
2529                 ol_cv_pthread_create=yes
2530         fi
2531 fi
2532
2533 if test -z "${CC}"; then
2534         for ac_prog in cc
2535 do
2536 # Extract the first word of "$ac_prog", so it can be a program name with args.
2537 set dummy $ac_prog; ac_word=$2
2538 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2539 echo "configure:2540: checking for $ac_word" >&5
2540 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2541   echo $ac_n "(cached) $ac_c" 1>&6
2542 else
2543   if test -n "$CC"; then
2544   ac_cv_prog_CC="$CC" # Let the user override the test.
2545 else
2546   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2547   ac_dummy="$PATH"
2548   for ac_dir in $ac_dummy; do
2549     test -z "$ac_dir" && ac_dir=.
2550     if test -f $ac_dir/$ac_word; then
2551       ac_cv_prog_CC="$ac_prog"
2552       break
2553     fi
2554   done
2555   IFS="$ac_save_ifs"
2556 fi
2557 fi
2558 CC="$ac_cv_prog_CC"
2559 if test -n "$CC"; then
2560   echo "$ac_t""$CC" 1>&6
2561 else
2562   echo "$ac_t""no" 1>&6
2563 fi
2564
2565 test -n "$CC" && break
2566 done
2567
2568 fi
2569
2570
2571
2572
2573 # Check whether --enable-fast-install or --disable-fast-install was given.
2574 if test "${enable_fast_install+set}" = set; then
2575   enableval="$enable_fast_install"
2576   p=${PACKAGE-default}
2577 case "$enableval" in
2578 yes) enable_fast_install=yes ;;
2579 no) enable_fast_install=no ;;
2580 *)
2581   enable_fast_install=no
2582   # Look at the argument we got.  We use all the common list separators.
2583   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2584   for pkg in $enableval; do
2585     if test "X$pkg" = "X$p"; then
2586       enable_fast_install=yes
2587     fi
2588   done
2589   IFS="$ac_save_ifs"
2590   ;;
2591 esac
2592 else
2593   enable_fast_install=yes
2594 fi
2595
2596 # Extract the first word of "ranlib", so it can be a program name with args.
2597 set dummy ranlib; ac_word=$2
2598 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2599 echo "configure:2600: checking for $ac_word" >&5
2600 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2601   echo $ac_n "(cached) $ac_c" 1>&6
2602 else
2603   if test -n "$RANLIB"; then
2604   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2605 else
2606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2607   ac_dummy="$PATH"
2608   for ac_dir in $ac_dummy; do
2609     test -z "$ac_dir" && ac_dir=.
2610     if test -f $ac_dir/$ac_word; then
2611       ac_cv_prog_RANLIB="ranlib"
2612       break
2613     fi
2614   done
2615   IFS="$ac_save_ifs"
2616   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2617 fi
2618 fi
2619 RANLIB="$ac_cv_prog_RANLIB"
2620 if test -n "$RANLIB"; then
2621   echo "$ac_t""$RANLIB" 1>&6
2622 else
2623   echo "$ac_t""no" 1>&6
2624 fi
2625
2626 # Extract the first word of "gcc", so it can be a program name with args.
2627 set dummy gcc; ac_word=$2
2628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2629 echo "configure:2630: checking for $ac_word" >&5
2630 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2631   echo $ac_n "(cached) $ac_c" 1>&6
2632 else
2633   if test -n "$CC"; then
2634   ac_cv_prog_CC="$CC" # Let the user override the test.
2635 else
2636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2637   ac_dummy="$PATH"
2638   for ac_dir in $ac_dummy; do
2639     test -z "$ac_dir" && ac_dir=.
2640     if test -f $ac_dir/$ac_word; then
2641       ac_cv_prog_CC="gcc"
2642       break
2643     fi
2644   done
2645   IFS="$ac_save_ifs"
2646 fi
2647 fi
2648 CC="$ac_cv_prog_CC"
2649 if test -n "$CC"; then
2650   echo "$ac_t""$CC" 1>&6
2651 else
2652   echo "$ac_t""no" 1>&6
2653 fi
2654
2655 if test -z "$CC"; then
2656   # Extract the first word of "cc", so it can be a program name with args.
2657 set dummy cc; ac_word=$2
2658 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2659 echo "configure:2660: checking for $ac_word" >&5
2660 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2661   echo $ac_n "(cached) $ac_c" 1>&6
2662 else
2663   if test -n "$CC"; then
2664   ac_cv_prog_CC="$CC" # Let the user override the test.
2665 else
2666   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2667   ac_prog_rejected=no
2668   ac_dummy="$PATH"
2669   for ac_dir in $ac_dummy; do
2670     test -z "$ac_dir" && ac_dir=.
2671     if test -f $ac_dir/$ac_word; then
2672       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2673         ac_prog_rejected=yes
2674         continue
2675       fi
2676       ac_cv_prog_CC="cc"
2677       break
2678     fi
2679   done
2680   IFS="$ac_save_ifs"
2681 if test $ac_prog_rejected = yes; then
2682   # We found a bogon in the path, so make sure we never use it.
2683   set dummy $ac_cv_prog_CC
2684   shift
2685   if test $# -gt 0; then
2686     # We chose a different compiler from the bogus one.
2687     # However, it has the same basename, so the bogon will be chosen
2688     # first if we set CC to just the basename; use the full file name.
2689     shift
2690     set dummy "$ac_dir/$ac_word" "$@"
2691     shift
2692     ac_cv_prog_CC="$@"
2693   fi
2694 fi
2695 fi
2696 fi
2697 CC="$ac_cv_prog_CC"
2698 if test -n "$CC"; then
2699   echo "$ac_t""$CC" 1>&6
2700 else
2701   echo "$ac_t""no" 1>&6
2702 fi
2703
2704   if test -z "$CC"; then
2705     case "`uname -s`" in
2706     *win32* | *WIN32* | *CYGWIN*)
2707       # Extract the first word of "cl", so it can be a program name with args.
2708 set dummy cl; ac_word=$2
2709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2710 echo "configure:2711: checking for $ac_word" >&5
2711 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2712   echo $ac_n "(cached) $ac_c" 1>&6
2713 else
2714   if test -n "$CC"; then
2715   ac_cv_prog_CC="$CC" # Let the user override the test.
2716 else
2717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2718   ac_dummy="$PATH"
2719   for ac_dir in $ac_dummy; do
2720     test -z "$ac_dir" && ac_dir=.
2721     if test -f $ac_dir/$ac_word; then
2722       ac_cv_prog_CC="cl"
2723       break
2724     fi
2725   done
2726   IFS="$ac_save_ifs"
2727 fi
2728 fi
2729 CC="$ac_cv_prog_CC"
2730 if test -n "$CC"; then
2731   echo "$ac_t""$CC" 1>&6
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735  ;;
2736     esac
2737   fi
2738   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2739 fi
2740
2741 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2742 echo "configure:2743: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2743
2744 ac_ext=c
2745 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2746 ac_cpp='$CPP $CPPFLAGS'
2747 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2748 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2749 cross_compiling=$ac_cv_prog_cc_cross
2750
2751 cat > conftest.$ac_ext << EOF
2752
2753 #line 2754 "configure"
2754 #include "confdefs.h"
2755
2756 main(){return(0);}
2757 EOF
2758 if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2759   ac_cv_prog_cc_works=yes
2760   # If we can't run a trivial program, we are probably using a cross compiler.
2761   if (./conftest; exit) 2>/dev/null; then
2762     ac_cv_prog_cc_cross=no
2763   else
2764     ac_cv_prog_cc_cross=yes
2765   fi
2766 else
2767   echo "configure: failed program was:" >&5
2768   cat conftest.$ac_ext >&5
2769   ac_cv_prog_cc_works=no
2770 fi
2771 rm -fr conftest*
2772 ac_ext=c
2773 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2774 ac_cpp='$CPP $CPPFLAGS'
2775 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2776 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2777 cross_compiling=$ac_cv_prog_cc_cross
2778
2779 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2780 if test $ac_cv_prog_cc_works = no; then
2781   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2782 fi
2783 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2784 echo "configure:2785: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2785 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2786 cross_compiling=$ac_cv_prog_cc_cross
2787
2788 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2789 echo "configure:2790: checking whether we are using GNU C" >&5
2790 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2791   echo $ac_n "(cached) $ac_c" 1>&6
2792 else
2793   cat > conftest.c <<EOF
2794 #ifdef __GNUC__
2795   yes;
2796 #endif
2797 EOF
2798 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2799   ac_cv_prog_gcc=yes
2800 else
2801   ac_cv_prog_gcc=no
2802 fi
2803 fi
2804
2805 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2806
2807 if test $ac_cv_prog_gcc = yes; then
2808   GCC=yes
2809 else
2810   GCC=
2811 fi
2812
2813 ac_test_CFLAGS="${CFLAGS+set}"
2814 ac_save_CFLAGS="$CFLAGS"
2815 CFLAGS=
2816 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2817 echo "configure:2818: checking whether ${CC-cc} accepts -g" >&5
2818 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2819   echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821   echo 'void f(){}' > conftest.c
2822 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2823   ac_cv_prog_cc_g=yes
2824 else
2825   ac_cv_prog_cc_g=no
2826 fi
2827 rm -f conftest*
2828
2829 fi
2830
2831 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2832 if test "$ac_test_CFLAGS" = set; then
2833   CFLAGS="$ac_save_CFLAGS"
2834 elif test $ac_cv_prog_cc_g = yes; then
2835   if test "$GCC" = yes; then
2836     CFLAGS="-g -O2"
2837   else
2838     CFLAGS="-g"
2839   fi
2840 else
2841   if test "$GCC" = yes; then
2842     CFLAGS="-O2"
2843   else
2844     CFLAGS=
2845   fi
2846 fi
2847
2848 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2849 if test "${with_gnu_ld+set}" = set; then
2850   withval="$with_gnu_ld"
2851   test "$withval" = no || with_gnu_ld=yes
2852 else
2853   with_gnu_ld=no
2854 fi
2855
2856 ac_prog=ld
2857 if test "$ac_cv_prog_gcc" = yes; then
2858   # Check if gcc -print-prog-name=ld gives a path.
2859   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2860 echo "configure:2861: checking for ld used by GCC" >&5
2861   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2862   case "$ac_prog" in
2863     # Accept absolute paths.
2864     [\\/]* | [A-Za-z]:[\\/]*)
2865       re_direlt='/[^/][^/]*/\.\./'
2866       # Canonicalize the path of ld
2867       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2868       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2869         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2870       done
2871       test -z "$LD" && LD="$ac_prog"
2872       ;;
2873   "")
2874     # If it fails, then pretend we aren't using GCC.
2875     ac_prog=ld
2876     ;;
2877   *)
2878     # If it is relative, then search for the first ld in PATH.
2879     with_gnu_ld=unknown
2880     ;;
2881   esac
2882 elif test "$with_gnu_ld" = yes; then
2883   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2884 echo "configure:2885: checking for GNU ld" >&5
2885 else
2886   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2887 echo "configure:2888: checking for non-GNU ld" >&5
2888 fi
2889 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2890   echo $ac_n "(cached) $ac_c" 1>&6
2891 else
2892   if test -z "$LD"; then
2893   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2894   for ac_dir in $PATH; do
2895     test -z "$ac_dir" && ac_dir=.
2896     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2897       ac_cv_path_LD="$ac_dir/$ac_prog"
2898       # Check to see if the program is GNU ld.  I'd rather use --version,
2899       # but apparently some GNU ld's only accept -v.
2900       # Break only if it was the GNU/non-GNU ld that we prefer.
2901       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2902         test "$with_gnu_ld" != no && break
2903       else
2904         test "$with_gnu_ld" != yes && break
2905       fi
2906     fi
2907   done
2908   IFS="$ac_save_ifs"
2909 else
2910   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2911 fi
2912 fi
2913
2914 LD="$ac_cv_path_LD"
2915 if test -n "$LD"; then
2916   echo "$ac_t""$LD" 1>&6
2917 else
2918   echo "$ac_t""no" 1>&6
2919 fi
2920 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2921 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2922 echo "configure:2923: checking if the linker ($LD) is GNU ld" >&5
2923 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2924   echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2927 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2928   ac_cv_prog_gnu_ld=yes
2929 else
2930   ac_cv_prog_gnu_ld=no
2931 fi
2932 fi
2933
2934 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2935
2936
2937 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2938 echo "configure:2939: checking for BSD-compatible nm" >&5
2939 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2940   echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942   if test -n "$NM"; then
2943   # Let the user override the test.
2944   ac_cv_path_NM="$NM"
2945 else
2946   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2947   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2948     test -z "$ac_dir" && ac_dir=.
2949     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2950       # Check to see if the nm accepts a BSD-compat flag.
2951       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2952       #   nm: unknown option "B" ignored
2953       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2954         ac_cv_path_NM="$ac_dir/nm -B"
2955         break
2956       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2957         ac_cv_path_NM="$ac_dir/nm -p"
2958         break
2959       else
2960         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2961         continue # so that we can try to find one that supports BSD flags
2962       fi
2963     fi
2964   done
2965   IFS="$ac_save_ifs"
2966   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2967 fi
2968 fi
2969
2970 NM="$ac_cv_path_NM"
2971 echo "$ac_t""$NM" 1>&6
2972
2973 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2974 echo "configure:2975: checking whether ln -s works" >&5
2975 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2976   echo $ac_n "(cached) $ac_c" 1>&6
2977 else
2978   rm -f conftestdata
2979 if ln -s X conftestdata 2>/dev/null
2980 then
2981   rm -f conftestdata
2982   ac_cv_prog_LN_S="ln -s"
2983 else
2984   ac_cv_prog_LN_S=ln
2985 fi
2986 fi
2987 LN_S="$ac_cv_prog_LN_S"
2988 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2989   echo "$ac_t""yes" 1>&6
2990 else
2991   echo "$ac_t""no" 1>&6
2992 fi
2993
2994 if test $host != $build; then
2995   ac_tool_prefix=${host_alias}-
2996 else
2997   ac_tool_prefix=
2998 fi
2999
3000
3001 case "$target" in
3002 NONE) lt_target="$host" ;;
3003 *) lt_target="$target" ;;
3004 esac
3005
3006 # Check for any special flags to pass to ltconfig.
3007 libtool_flags="--cache-file=$cache_file"
3008 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3009 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3010 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3011 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3012 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3013 libtool_flags="$libtool_flags --enable-dlopen"
3014 libtool_flags="$libtool_flags --enable-win32-dll"
3015 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3016 if test "${enable_libtool_lock+set}" = set; then
3017   enableval="$enable_libtool_lock"
3018   :
3019 fi
3020
3021 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3022 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3023
3024 # Some flags need to be propagated to the compiler or linker for good
3025 # libtool support.
3026 case "$lt_target" in
3027 *-*-irix6*)
3028   # Find out which ABI we are using.
3029   echo '#line 3030 "configure"' > conftest.$ac_ext
3030   if { (eval echo configure:3031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3031     case "`/usr/bin/file conftest.o`" in
3032     *32-bit*)
3033       LD="${LD-ld} -32"
3034       ;;
3035     *N32*)
3036       LD="${LD-ld} -n32"
3037       ;;
3038     *64-bit*)
3039       LD="${LD-ld} -64"
3040       ;;
3041     esac
3042   fi
3043   rm -rf conftest*
3044   ;;
3045
3046 *-*-sco3.2v5*)
3047   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3048   SAVE_CFLAGS="$CFLAGS"
3049   CFLAGS="$CFLAGS -belf"
3050   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3051 echo "configure:3052: checking whether the C compiler needs -belf" >&5
3052 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058
3059 int main() {
3060
3061 ; return 0; }
3062 EOF
3063 if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3064   rm -rf conftest*
3065   lt_cv_cc_needs_belf=yes
3066 else
3067   echo "configure: failed program was:" >&5
3068   cat conftest.$ac_ext >&5
3069   rm -rf conftest*
3070   lt_cv_cc_needs_belf=no
3071 fi
3072 rm -f conftest*
3073 fi
3074
3075 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3076   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3077     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3078     CFLAGS="$SAVE_CFLAGS"
3079   fi
3080   ;;
3081
3082 *-*-cygwin* | *-*-mingw*)
3083   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3084 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3085 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3086 echo "configure:3087: checking for $ac_word" >&5
3087 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   if test -n "$DLLTOOL"; then
3091   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3092 else
3093   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3094   ac_dummy="$PATH"
3095   for ac_dir in $ac_dummy; do
3096     test -z "$ac_dir" && ac_dir=.
3097     if test -f $ac_dir/$ac_word; then
3098       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3099       break
3100     fi
3101   done
3102   IFS="$ac_save_ifs"
3103 fi
3104 fi
3105 DLLTOOL="$ac_cv_prog_DLLTOOL"
3106 if test -n "$DLLTOOL"; then
3107   echo "$ac_t""$DLLTOOL" 1>&6
3108 else
3109   echo "$ac_t""no" 1>&6
3110 fi
3111
3112
3113 if test -z "$ac_cv_prog_DLLTOOL"; then
3114 if test -n "$ac_tool_prefix"; then
3115   # Extract the first word of "dlltool", so it can be a program name with args.
3116 set dummy dlltool; ac_word=$2
3117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3118 echo "configure:3119: checking for $ac_word" >&5
3119 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3120   echo $ac_n "(cached) $ac_c" 1>&6
3121 else
3122   if test -n "$DLLTOOL"; then
3123   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3124 else
3125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3126   ac_dummy="$PATH"
3127   for ac_dir in $ac_dummy; do
3128     test -z "$ac_dir" && ac_dir=.
3129     if test -f $ac_dir/$ac_word; then
3130       ac_cv_prog_DLLTOOL="dlltool"
3131       break
3132     fi
3133   done
3134   IFS="$ac_save_ifs"
3135   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3136 fi
3137 fi
3138 DLLTOOL="$ac_cv_prog_DLLTOOL"
3139 if test -n "$DLLTOOL"; then
3140   echo "$ac_t""$DLLTOOL" 1>&6
3141 else
3142   echo "$ac_t""no" 1>&6
3143 fi
3144
3145 else
3146   DLLTOOL="false"
3147 fi
3148 fi
3149
3150   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3151 set dummy ${ac_tool_prefix}as; ac_word=$2
3152 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3153 echo "configure:3154: checking for $ac_word" >&5
3154 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3155   echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157   if test -n "$AS"; then
3158   ac_cv_prog_AS="$AS" # Let the user override the test.
3159 else
3160   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3161   ac_dummy="$PATH"
3162   for ac_dir in $ac_dummy; do
3163     test -z "$ac_dir" && ac_dir=.
3164     if test -f $ac_dir/$ac_word; then
3165       ac_cv_prog_AS="${ac_tool_prefix}as"
3166       break
3167     fi
3168   done
3169   IFS="$ac_save_ifs"
3170 fi
3171 fi
3172 AS="$ac_cv_prog_AS"
3173 if test -n "$AS"; then
3174   echo "$ac_t""$AS" 1>&6
3175 else
3176   echo "$ac_t""no" 1>&6
3177 fi
3178
3179
3180 if test -z "$ac_cv_prog_AS"; then
3181 if test -n "$ac_tool_prefix"; then
3182   # Extract the first word of "as", so it can be a program name with args.
3183 set dummy as; ac_word=$2
3184 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3185 echo "configure:3186: checking for $ac_word" >&5
3186 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   if test -n "$AS"; then
3190   ac_cv_prog_AS="$AS" # Let the user override the test.
3191 else
3192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3193   ac_dummy="$PATH"
3194   for ac_dir in $ac_dummy; do
3195     test -z "$ac_dir" && ac_dir=.
3196     if test -f $ac_dir/$ac_word; then
3197       ac_cv_prog_AS="as"
3198       break
3199     fi
3200   done
3201   IFS="$ac_save_ifs"
3202   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3203 fi
3204 fi
3205 AS="$ac_cv_prog_AS"
3206 if test -n "$AS"; then
3207   echo "$ac_t""$AS" 1>&6
3208 else
3209   echo "$ac_t""no" 1>&6
3210 fi
3211
3212 else
3213   AS="false"
3214 fi
3215 fi
3216
3217   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3218 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3219 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3220 echo "configure:3221: checking for $ac_word" >&5
3221 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3222   echo $ac_n "(cached) $ac_c" 1>&6
3223 else
3224   if test -n "$OBJDUMP"; then
3225   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3226 else
3227   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3228   ac_dummy="$PATH"
3229   for ac_dir in $ac_dummy; do
3230     test -z "$ac_dir" && ac_dir=.
3231     if test -f $ac_dir/$ac_word; then
3232       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3233       break
3234     fi
3235   done
3236   IFS="$ac_save_ifs"
3237 fi
3238 fi
3239 OBJDUMP="$ac_cv_prog_OBJDUMP"
3240 if test -n "$OBJDUMP"; then
3241   echo "$ac_t""$OBJDUMP" 1>&6
3242 else
3243   echo "$ac_t""no" 1>&6
3244 fi
3245
3246
3247 if test -z "$ac_cv_prog_OBJDUMP"; then
3248 if test -n "$ac_tool_prefix"; then
3249   # Extract the first word of "objdump", so it can be a program name with args.
3250 set dummy objdump; ac_word=$2
3251 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3252 echo "configure:3253: checking for $ac_word" >&5
3253 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   if test -n "$OBJDUMP"; then
3257   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3258 else
3259   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3260   ac_dummy="$PATH"
3261   for ac_dir in $ac_dummy; do
3262     test -z "$ac_dir" && ac_dir=.
3263     if test -f $ac_dir/$ac_word; then
3264       ac_cv_prog_OBJDUMP="objdump"
3265       break
3266     fi
3267   done
3268   IFS="$ac_save_ifs"
3269   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3270 fi
3271 fi
3272 OBJDUMP="$ac_cv_prog_OBJDUMP"
3273 if test -n "$OBJDUMP"; then
3274   echo "$ac_t""$OBJDUMP" 1>&6
3275 else
3276   echo "$ac_t""no" 1>&6
3277 fi
3278
3279 else
3280   OBJDUMP="false"
3281 fi
3282 fi
3283
3284   ;;
3285
3286 esac
3287
3288
3289 # Save cache, so that ltconfig can load it
3290
3291
3292 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3293 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3294 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3295 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3296 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3297 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3298 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3299 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3300
3301 # Reload cache, that may have been modified by ltconfig
3302
3303
3304 # This can be used to rebuild libtool when needed
3305 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3306
3307 # Always use our own libtool.
3308 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3309
3310 # Redirect the config.log output again, so that the ltconfig log is not
3311 # clobbered by the next message.
3312 exec 5>>./config.log
3313
3314
3315 for ac_prog in mawk gawk nawk awk
3316 do
3317 # Extract the first word of "$ac_prog", so it can be a program name with args.
3318 set dummy $ac_prog; ac_word=$2
3319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3320 echo "configure:3321: checking for $ac_word" >&5
3321 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3322   echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324   if test -n "$AWK"; then
3325   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3326 else
3327   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3328   ac_dummy="$PATH"
3329   for ac_dir in $ac_dummy; do
3330     test -z "$ac_dir" && ac_dir=.
3331     if test -f $ac_dir/$ac_word; then
3332       ac_cv_prog_AWK="$ac_prog"
3333       break
3334     fi
3335   done
3336   IFS="$ac_save_ifs"
3337 fi
3338 fi
3339 AWK="$ac_cv_prog_AWK"
3340 if test -n "$AWK"; then
3341   echo "$ac_t""$AWK" 1>&6
3342 else
3343   echo "$ac_t""no" 1>&6
3344 fi
3345
3346 test -n "$AWK" && break
3347 done
3348
3349 # test for ln hardlink support
3350 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3351 echo "configure:3352: checking whether ln works" >&5
3352 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   rm -f conftest.src conftest.dst
3356 echo "conftest" > conftest.src
3357 if ln conftest.src conftest.dst 2>/dev/null
3358 then
3359   ol_cv_prog_LN_H="ln"
3360 else
3361   ol_cv_prog_LN_H="cp"
3362 fi
3363 rm -f conftest.src conftest.dst
3364
3365 fi
3366 LN_H="$ol_cv_prog_LN_H"
3367 if test "$ol_cv_prog_LN_H" = "ln"; then
3368         echo "$ac_t""yes" 1>&6
3369 else
3370         echo "$ac_t""no" 1>&6
3371 fi
3372
3373 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3374 echo "configure:3375: checking whether ln -s works" >&5
3375 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3376   echo $ac_n "(cached) $ac_c" 1>&6
3377 else
3378   rm -f conftestdata
3379 if ln -s X conftestdata 2>/dev/null
3380 then
3381   rm -f conftestdata
3382   ac_cv_prog_LN_S="ln -s"
3383 else
3384   ac_cv_prog_LN_S=ln
3385 fi
3386 fi
3387 LN_S="$ac_cv_prog_LN_S"
3388 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3389   echo "$ac_t""yes" 1>&6
3390 else
3391   echo "$ac_t""no" 1>&6
3392 fi
3393
3394
3395 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3396         LN_S="$LN_H"
3397 fi
3398
3399 # Extract the first word of "sendmail", so it can be a program name with args.
3400 set dummy sendmail; ac_word=$2
3401 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3402 echo "configure:3403: checking for $ac_word" >&5
3403 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3404   echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406   case "$SENDMAIL" in
3407   /*)
3408   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3409   ;;
3410   ?:/*)
3411   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3412   ;;
3413   *)
3414   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3415   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3416   for ac_dir in $ac_dummy; do 
3417     test -z "$ac_dir" && ac_dir=.
3418     if test -f $ac_dir/$ac_word; then
3419       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3420       break
3421     fi
3422   done
3423   IFS="$ac_save_ifs"
3424   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3425   ;;
3426 esac
3427 fi
3428 SENDMAIL="$ac_cv_path_SENDMAIL"
3429 if test -n "$SENDMAIL"; then
3430   echo "$ac_t""$SENDMAIL" 1>&6
3431 else
3432   echo "$ac_t""no" 1>&6
3433 fi
3434
3435 # Extract the first word of "vi", so it can be a program name with args.
3436 set dummy vi; ac_word=$2
3437 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3438 echo "configure:3439: checking for $ac_word" >&5
3439 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3440   echo $ac_n "(cached) $ac_c" 1>&6
3441 else
3442   case "$EDITOR" in
3443   /*)
3444   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3445   ;;
3446   ?:/*)
3447   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3448   ;;
3449   *)
3450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3451   ac_dummy="$PATH:/usr/ucb"
3452   for ac_dir in $ac_dummy; do 
3453     test -z "$ac_dir" && ac_dir=.
3454     if test -f $ac_dir/$ac_word; then
3455       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3456       break
3457     fi
3458   done
3459   IFS="$ac_save_ifs"
3460   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3461   ;;
3462 esac
3463 fi
3464 EDITOR="$ac_cv_path_EDITOR"
3465 if test -n "$EDITOR"; then
3466   echo "$ac_t""$EDITOR" 1>&6
3467 else
3468   echo "$ac_t""no" 1>&6
3469 fi
3470
3471 # Extract the first word of "finger", so it can be a program name with args.
3472 set dummy finger; ac_word=$2
3473 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3474 echo "configure:3475: checking for $ac_word" >&5
3475 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3476   echo $ac_n "(cached) $ac_c" 1>&6
3477 else
3478   case "$FINGER" in
3479   /*)
3480   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3481   ;;
3482   ?:/*)
3483   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3484   ;;
3485   *)
3486   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3487   ac_dummy="$PATH:/usr/ucb"
3488   for ac_dir in $ac_dummy; do 
3489     test -z "$ac_dir" && ac_dir=.
3490     if test -f $ac_dir/$ac_word; then
3491       ac_cv_path_FINGER="$ac_dir/$ac_word"
3492       break
3493     fi
3494   done
3495   IFS="$ac_save_ifs"
3496   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3497   ;;
3498 esac
3499 fi
3500 FINGER="$ac_cv_path_FINGER"
3501 if test -n "$FINGER"; then
3502   echo "$ac_t""$FINGER" 1>&6
3503 else
3504   echo "$ac_t""no" 1>&6
3505 fi
3506
3507
3508 ol_link_perl=no
3509 if test $ol_enable_perl != no ; then
3510         # Extract the first word of "perl", so it can be a program name with args.
3511 set dummy perl; ac_word=$2
3512 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3513 echo "configure:3514: checking for $ac_word" >&5
3514 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   case "$PERLBIN" in
3518   /*)
3519   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3520   ;;
3521   ?:/*)
3522   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3523   ;;
3524   *)
3525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3526   ac_dummy="$PATH"
3527   for ac_dir in $ac_dummy; do 
3528     test -z "$ac_dir" && ac_dir=.
3529     if test -f $ac_dir/$ac_word; then
3530       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3531       break
3532     fi
3533   done
3534   IFS="$ac_save_ifs"
3535   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3536   ;;
3537 esac
3538 fi
3539 PERLBIN="$ac_cv_path_PERLBIN"
3540 if test -n "$PERLBIN"; then
3541   echo "$ac_t""$PERLBIN" 1>&6
3542 else
3543   echo "$ac_t""no" 1>&6
3544 fi
3545
3546
3547         if test "no$PERLBIN" = "no" ; then
3548                 if test $ol_enable_perl = yes ; then
3549                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3550                 fi
3551
3552         else
3553                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3554                 if test x"$ol_with_perl_module" = "xstatic" ; then
3555                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3556                 else
3557                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3558                 fi
3559                                 ol_link_perl=yes
3560         fi
3561 fi
3562
3563 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3564 echo "configure:3565: checking how to run the C preprocessor" >&5
3565 # On Suns, sometimes $CPP names a directory.
3566 if test -n "$CPP" && test -d "$CPP"; then
3567   CPP=
3568 fi
3569 if test -z "$CPP"; then
3570 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3571   echo $ac_n "(cached) $ac_c" 1>&6
3572 else
3573     # This must be in double quotes, not single quotes, because CPP may get
3574   # substituted into the Makefile and "${CC-cc}" will confuse make.
3575   CPP="${CC-cc} -E"
3576   # On the NeXT, cc -E runs the code through the compiler's parser,
3577   # not just through cpp.
3578   cat > conftest.$ac_ext <<EOF
3579 #line 3580 "configure"
3580 #include "confdefs.h"
3581 #include <assert.h>
3582 Syntax Error
3583 EOF
3584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3585 { (eval echo configure:3586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3587 if test -z "$ac_err"; then
3588   :
3589 else
3590   echo "$ac_err" >&5
3591   echo "configure: failed program was:" >&5
3592   cat conftest.$ac_ext >&5
3593   rm -rf conftest*
3594   CPP="${CC-cc} -E -traditional-cpp"
3595   cat > conftest.$ac_ext <<EOF
3596 #line 3597 "configure"
3597 #include "confdefs.h"
3598 #include <assert.h>
3599 Syntax Error
3600 EOF
3601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3602 { (eval echo configure:3603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3604 if test -z "$ac_err"; then
3605   :
3606 else
3607   echo "$ac_err" >&5
3608   echo "configure: failed program was:" >&5
3609   cat conftest.$ac_ext >&5
3610   rm -rf conftest*
3611   CPP="${CC-cc} -nologo -E"
3612   cat > conftest.$ac_ext <<EOF
3613 #line 3614 "configure"
3614 #include "confdefs.h"
3615 #include <assert.h>
3616 Syntax Error
3617 EOF
3618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3619 { (eval echo configure:3620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3621 if test -z "$ac_err"; then
3622   :
3623 else
3624   echo "$ac_err" >&5
3625   echo "configure: failed program was:" >&5
3626   cat conftest.$ac_ext >&5
3627   rm -rf conftest*
3628   CPP=/lib/cpp
3629 fi
3630 rm -f conftest*
3631 fi
3632 rm -f conftest*
3633 fi
3634 rm -f conftest*
3635   ac_cv_prog_CPP="$CPP"
3636 fi
3637   CPP="$ac_cv_prog_CPP"
3638 else
3639   ac_cv_prog_CPP="$CPP"
3640 fi
3641 echo "$ac_t""$CPP" 1>&6
3642
3643
3644 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3645         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3646
3647 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3648         echo "configure: warning: programs compiled here do run here..." 1>&2
3649         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3650
3651 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3652         echo "configure: warning: programs compiled here do not run here..." 1>&2
3653         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3654 fi
3655
3656 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3657 echo "configure:3658: checking for AIX" >&5
3658 cat > conftest.$ac_ext <<EOF
3659 #line 3660 "configure"
3660 #include "confdefs.h"
3661 #ifdef _AIX
3662   yes
3663 #endif
3664
3665 EOF
3666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3667   egrep "yes" >/dev/null 2>&1; then
3668   rm -rf conftest*
3669   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3670 #define _ALL_SOURCE 1
3671 EOF
3672
3673 else
3674   rm -rf conftest*
3675   echo "$ac_t""no" 1>&6
3676 fi
3677 rm -f conftest*
3678
3679
3680 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3681 echo "configure:3682: checking for POSIXized ISC" >&5
3682 if test -d /etc/conf/kconfig.d &&
3683   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3684 then
3685   echo "$ac_t""yes" 1>&6
3686   ISC=yes # If later tests want to check for ISC.
3687   cat >> confdefs.h <<\EOF
3688 #define _POSIX_SOURCE 1
3689 EOF
3690
3691   if test "$GCC" = yes; then
3692     CC="$CC -posix"
3693   else
3694     CC="$CC -Xp"
3695   fi
3696 else
3697   echo "$ac_t""no" 1>&6
3698   ISC=
3699 fi
3700
3701 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3702 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3703 echo "configure:3704: checking for minix/config.h" >&5
3704 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3705   echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707   cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 #include <minix/config.h>
3711 EOF
3712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3713 { (eval echo configure:3714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3715 if test -z "$ac_err"; then
3716   rm -rf conftest*
3717   eval "ac_cv_header_$ac_safe=yes"
3718 else
3719   echo "$ac_err" >&5
3720   echo "configure: failed program was:" >&5
3721   cat conftest.$ac_ext >&5
3722   rm -rf conftest*
3723   eval "ac_cv_header_$ac_safe=no"
3724 fi
3725 rm -f conftest*
3726 fi
3727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3728   echo "$ac_t""yes" 1>&6
3729   MINIX=yes
3730 else
3731   echo "$ac_t""no" 1>&6
3732 MINIX=
3733 fi
3734
3735 if test "$MINIX" = yes; then
3736   cat >> confdefs.h <<\EOF
3737 #define _POSIX_SOURCE 1
3738 EOF
3739
3740   cat >> confdefs.h <<\EOF
3741 #define _POSIX_1_SOURCE 2
3742 EOF
3743
3744   cat >> confdefs.h <<\EOF
3745 #define _MINIX 1
3746 EOF
3747
3748 fi
3749
3750
3751 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3752 echo "configure:3753: checking for Cygwin environment" >&5
3753 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759
3760 int main() {
3761
3762 #ifndef __CYGWIN__
3763 #define __CYGWIN__ __CYGWIN32__
3764 #endif
3765 return __CYGWIN__;
3766 ; return 0; }
3767 EOF
3768 if { (eval echo configure:3769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3769   rm -rf conftest*
3770   ac_cv_cygwin=yes
3771 else
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -rf conftest*
3775   ac_cv_cygwin=no
3776 fi
3777 rm -f conftest*
3778 fi
3779
3780 echo "$ac_t""$ac_cv_cygwin" 1>&6
3781 CYGWIN=
3782 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3783 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3784 echo "configure:3785: checking for mingw32 environment" >&5
3785 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3786   echo $ac_n "(cached) $ac_c" 1>&6
3787 else
3788   cat > conftest.$ac_ext <<EOF
3789 #line 3790 "configure"
3790 #include "confdefs.h"
3791
3792 int main() {
3793 return __MINGW32__;
3794 ; return 0; }
3795 EOF
3796 if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3797   rm -rf conftest*
3798   ac_cv_mingw32=yes
3799 else
3800   echo "configure: failed program was:" >&5
3801   cat conftest.$ac_ext >&5
3802   rm -rf conftest*
3803   ac_cv_mingw32=no
3804 fi
3805 rm -f conftest*
3806 fi
3807
3808 echo "$ac_t""$ac_cv_mingw32" 1>&6
3809 MINGW32=
3810 test "$ac_cv_mingw32" = yes && MINGW32=yes
3811 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3812 echo "configure:3813: checking for EMX OS/2 environment" >&5
3813 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3814   echo $ac_n "(cached) $ac_c" 1>&6
3815 else
3816   cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3819
3820 int main() {
3821 return __EMX__;
3822 ; return 0; }
3823 EOF
3824 if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3825   rm -rf conftest*
3826   ac_cv_emxos2=yes
3827 else
3828   echo "configure: failed program was:" >&5
3829   cat conftest.$ac_ext >&5
3830   rm -rf conftest*
3831   ac_cv_emxos2=no
3832 fi
3833 rm -f conftest*
3834 fi
3835
3836 echo "$ac_t""$ac_cv_emxos2" 1>&6
3837 EMXOS2=
3838 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3839
3840
3841
3842 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3843 echo "configure:3844: checking for executable suffix" >&5
3844 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3845   echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3848   ac_cv_exeext=.exe
3849 else
3850   rm -f conftest*
3851   echo 'int main () { return 0; }' > conftest.$ac_ext
3852   ac_cv_exeext=
3853   if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3854     for file in conftest.*; do
3855       case $file in
3856       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3857       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3858       esac
3859     done
3860   else
3861     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3862   fi
3863   rm -f conftest*
3864   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3865 fi
3866 fi
3867
3868 EXEEXT=""
3869 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3870 echo "$ac_t""${ac_cv_exeext}" 1>&6
3871 ac_exeext=$EXEEXT
3872
3873 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3874 echo "configure:3875: checking for object suffix" >&5
3875 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3876   echo $ac_n "(cached) $ac_c" 1>&6
3877 else
3878   rm -f conftest*
3879 echo 'int i = 1;' > conftest.$ac_ext
3880 if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3881   for ac_file in conftest.*; do
3882     case $ac_file in
3883     *.c) ;;
3884     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3885     esac
3886   done
3887 else
3888   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3889 fi
3890 rm -f conftest*
3891 fi
3892
3893 echo "$ac_t""$ac_cv_objext" 1>&6
3894 OBJEXT=$ac_cv_objext
3895 ac_objext=$ac_cv_objext
3896
3897
3898 cat >> confdefs.h <<EOF
3899 #define EXEEXT "${EXEEXT}"
3900 EOF
3901
3902
3903 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3904 echo "configure:3905: checking for be_app in -lbe" >&5
3905 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   ac_save_LIBS="$LIBS"
3910 LIBS="-lbe -lroot -lnet $LIBS"
3911 cat > conftest.$ac_ext <<EOF
3912 #line 3913 "configure"
3913 #include "confdefs.h"
3914 /* Override any gcc2 internal prototype to avoid an error.  */
3915 /* We use char because int might match the return type of a gcc2
3916     builtin and then its argument prototype would still apply.  */
3917 char be_app();
3918
3919 int main() {
3920 be_app()
3921 ; return 0; }
3922 EOF
3923 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3924   rm -rf conftest*
3925   eval "ac_cv_lib_$ac_lib_var=yes"
3926 else
3927   echo "configure: failed program was:" >&5
3928   cat conftest.$ac_ext >&5
3929   rm -rf conftest*
3930   eval "ac_cv_lib_$ac_lib_var=no"
3931 fi
3932 rm -f conftest*
3933 LIBS="$ac_save_LIBS"
3934
3935 fi
3936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3937   echo "$ac_t""yes" 1>&6
3938   LIBS="$LIBS -lbe -lroot -lnet"
3939 else
3940   echo "$ac_t""no" 1>&6
3941 :
3942 fi
3943
3944
3945
3946
3947
3948 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3949 echo "configure:3950: checking for ${CC-cc} option to accept ANSI C" >&5
3950 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3951   echo $ac_n "(cached) $ac_c" 1>&6
3952 else
3953   am_cv_prog_cc_stdc=no
3954 ac_save_CC="$CC"
3955 # Don't try gcc -ansi; that turns off useful extensions and
3956 # breaks some systems' header files.
3957 # AIX                   -qlanglvl=ansi
3958 # Ultrix and OSF/1      -std1
3959 # HP-UX 10.20 and later -Ae
3960 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3961 # SVR4                  -Xc -D__EXTENSIONS__
3962 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3963 do
3964   CC="$ac_save_CC $ac_arg"
3965   cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3968 #include <stdarg.h>
3969 #include <stdio.h>
3970 #include <sys/types.h>
3971 #include <sys/stat.h>
3972 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3973 struct buf { int x; };
3974 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3975 static char *e (p, i)
3976      char **p;
3977      int i;
3978 {
3979   return p[i];
3980 }
3981 static char *f (char * (*g) (char **, int), char **p, ...)
3982 {
3983   char *s;
3984   va_list v;
3985   va_start (v,p);
3986   s = g (p, va_arg (v,int));
3987   va_end (v);
3988   return s;
3989 }
3990 int test (int i, double x);
3991 struct s1 {int (*f) (int a);};
3992 struct s2 {int (*f) (double a);};
3993 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3994 int argc;
3995 char **argv;
3996
3997 int main() {
3998
3999 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4000
4001 ; return 0; }
4002 EOF
4003 if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4004   rm -rf conftest*
4005   am_cv_prog_cc_stdc="$ac_arg"; break
4006 else
4007   echo "configure: failed program was:" >&5
4008   cat conftest.$ac_ext >&5
4009 fi
4010 rm -f conftest*
4011 done
4012 CC="$ac_save_CC"
4013
4014 fi
4015
4016 if test -z "$am_cv_prog_cc_stdc"; then
4017   echo "$ac_t""none needed" 1>&6
4018 else
4019   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4020 fi
4021 case "x$am_cv_prog_cc_stdc" in
4022   x|xno) ;;
4023   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4024 esac
4025
4026 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4027         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4028 fi
4029
4030 # test for make depend flag
4031 OL_MKDEP=
4032 OL_MKDEP_FLAGS=
4033 if test -z "${MKDEP}"; then
4034         OL_MKDEP="${CC-cc}"
4035         if test -z "${MKDEP_FLAGS}"; then
4036                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4037 echo "configure:4038: checking for ${OL_MKDEP} depend flag" >&5
4038 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4039   echo $ac_n "(cached) $ac_c" 1>&6
4040 else
4041   
4042                         ol_cv_mkdep=no
4043                         for flag in "-M" "-xM"; do
4044                                 cat > conftest.c <<EOF
4045  noCode;
4046 EOF
4047                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4048                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4049                                 then
4050                                         if test ! -f conftest."${ac_object}" ; then
4051                                                 ol_cv_mkdep=$flag
4052                                                 OL_MKDEP_FLAGS="$flag"
4053                                                 break
4054                                         fi
4055                                 fi
4056                         done
4057                         rm -f conftest*
4058                 
4059 fi
4060
4061 echo "$ac_t""$ol_cv_mkdep" 1>&6
4062         else
4063                 cc_cv_mkdep=yes
4064                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4065         fi
4066 else
4067         cc_cv_mkdep=yes
4068         OL_MKDEP="${MKDEP}"
4069         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4070 fi
4071
4072
4073
4074 if test "${ol_cv_mkdep}" = no ; then
4075         # this will soon become an error
4076         echo "configure: warning: do not know how to generate dependencies" 1>&2
4077 fi
4078
4079 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4080 echo "configure:4081: checking for afopen in -ls" >&5
4081 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4082 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4083   echo $ac_n "(cached) $ac_c" 1>&6
4084 else
4085   ac_save_LIBS="$LIBS"
4086 LIBS="-ls  $LIBS"
4087 cat > conftest.$ac_ext <<EOF
4088 #line 4089 "configure"
4089 #include "confdefs.h"
4090 /* Override any gcc2 internal prototype to avoid an error.  */
4091 /* We use char because int might match the return type of a gcc2
4092     builtin and then its argument prototype would still apply.  */
4093 char afopen();
4094
4095 int main() {
4096 afopen()
4097 ; return 0; }
4098 EOF
4099 if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4100   rm -rf conftest*
4101   eval "ac_cv_lib_$ac_lib_var=yes"
4102 else
4103   echo "configure: failed program was:" >&5
4104   cat conftest.$ac_ext >&5
4105   rm -rf conftest*
4106   eval "ac_cv_lib_$ac_lib_var=no"
4107 fi
4108 rm -f conftest*
4109 LIBS="$ac_save_LIBS"
4110
4111 fi
4112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4113   echo "$ac_t""yes" 1>&6
4114   
4115         AUTH_LIBS=-ls
4116         cat >> confdefs.h <<\EOF
4117 #define HAVE_AIX_SECURITY 1
4118 EOF
4119
4120
4121 else
4122   echo "$ac_t""no" 1>&6
4123 fi
4124
4125
4126 ol_link_modules=no
4127 if test $ol_enable_modules != no ; then
4128         for ac_hdr in ltdl.h
4129 do
4130 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4131 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4132 echo "configure:4133: checking for $ac_hdr" >&5
4133 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 #include <$ac_hdr>
4140 EOF
4141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4142 { (eval echo configure:4143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4144 if test -z "$ac_err"; then
4145   rm -rf conftest*
4146   eval "ac_cv_header_$ac_safe=yes"
4147 else
4148   echo "$ac_err" >&5
4149   echo "configure: failed program was:" >&5
4150   cat conftest.$ac_ext >&5
4151   rm -rf conftest*
4152   eval "ac_cv_header_$ac_safe=no"
4153 fi
4154 rm -f conftest*
4155 fi
4156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4157   echo "$ac_t""yes" 1>&6
4158     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4159   cat >> confdefs.h <<EOF
4160 #define $ac_tr_hdr 1
4161 EOF
4162  
4163 else
4164   echo "$ac_t""no" 1>&6
4165 fi
4166 done
4167
4168
4169         if test $ac_cv_header_ltdl_h = no ; then
4170                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4171         fi
4172
4173         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4174 echo "configure:4175: checking for lt_dlinit in -lltdl" >&5
4175 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4177   echo $ac_n "(cached) $ac_c" 1>&6
4178 else
4179   ac_save_LIBS="$LIBS"
4180 LIBS="-lltdl  $LIBS"
4181 cat > conftest.$ac_ext <<EOF
4182 #line 4183 "configure"
4183 #include "confdefs.h"
4184 /* Override any gcc2 internal prototype to avoid an error.  */
4185 /* We use char because int might match the return type of a gcc2
4186     builtin and then its argument prototype would still apply.  */
4187 char lt_dlinit();
4188
4189 int main() {
4190 lt_dlinit()
4191 ; return 0; }
4192 EOF
4193 if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4194   rm -rf conftest*
4195   eval "ac_cv_lib_$ac_lib_var=yes"
4196 else
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   eval "ac_cv_lib_$ac_lib_var=no"
4201 fi
4202 rm -f conftest*
4203 LIBS="$ac_save_LIBS"
4204
4205 fi
4206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4207   echo "$ac_t""yes" 1>&6
4208   
4209             MODULES_LIBS=-lltdl
4210             cat >> confdefs.h <<\EOF
4211 #define HAVE_LIBLTDL 1
4212 EOF
4213
4214         
4215 else
4216   echo "$ac_t""no" 1>&6
4217 fi
4218
4219
4220         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4221                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4222         fi
4223         ol_link_modules=yes
4224 else
4225         ol_with_dnssrv_module=static
4226         ol_with_ldap_module=static
4227         ol_with_ldbm_module=static
4228         ol_with_passwd_module=static
4229         ol_with_perl_module=static
4230         ol_with_shell_module=static
4231         ol_with_tcl_module=static
4232         ol_with_sql_module=static
4233 fi
4234
4235 # test for EBCDIC
4236 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4237 echo "configure:4238: checking for EBCDIC" >&5
4238 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4239   echo $ac_n "(cached) $ac_c" 1>&6
4240 else
4241   
4242         cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245
4246 #if !('M' == 0xd4)
4247 #include <__ASCII__/generate_error.h>
4248 #endif
4249
4250 EOF
4251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4252 { (eval echo configure:4253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4254 if test -z "$ac_err"; then
4255   rm -rf conftest*
4256   ol_cv_cpp_ebcdic=yes
4257 else
4258   echo "$ac_err" >&5
4259   echo "configure: failed program was:" >&5
4260   cat conftest.$ac_ext >&5
4261   rm -rf conftest*
4262   ol_cv_cpp_ebcdic=no
4263 fi
4264 rm -f conftest*
4265 fi
4266
4267 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4268 if test $ol_cv_cpp_ebcdic = yes ; then
4269         cat >> confdefs.h <<\EOF
4270 #define HAVE_EBCDIC 1
4271 EOF
4272
4273 fi
4274
4275 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4276 echo "configure:4277: checking for ANSI C header files" >&5
4277 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4278   echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280   cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4283 #include <stdlib.h>
4284 #include <stdarg.h>
4285 #include <string.h>
4286 #include <float.h>
4287 EOF
4288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4289 { (eval echo configure:4290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4291 if test -z "$ac_err"; then
4292   rm -rf conftest*
4293   ol_cv_header_stdc=yes
4294 else
4295   echo "$ac_err" >&5
4296   echo "configure: failed program was:" >&5
4297   cat conftest.$ac_ext >&5
4298   rm -rf conftest*
4299   ol_cv_header_stdc=no
4300 fi
4301 rm -f conftest*
4302
4303 if test $ol_cv_header_stdc = yes; then
4304   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4305 cat > conftest.$ac_ext <<EOF
4306 #line 4307 "configure"
4307 #include "confdefs.h"
4308 #include <string.h>
4309 EOF
4310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4311   egrep "memchr" >/dev/null 2>&1; then
4312   :
4313 else
4314   rm -rf conftest*
4315   ol_cv_header_stdc=no
4316 fi
4317 rm -f conftest*
4318
4319 fi
4320
4321 if test $ol_cv_header_stdc = yes; then
4322   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4323 cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <stdlib.h>
4327 EOF
4328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4329   egrep "free" >/dev/null 2>&1; then
4330   :
4331 else
4332   rm -rf conftest*
4333   ol_cv_header_stdc=no
4334 fi
4335 rm -f conftest*
4336
4337 fi
4338
4339 if test $ol_cv_header_stdc = yes; then
4340   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4341 if test "$cross_compiling" = yes; then
4342   :
4343 else
4344   cat > conftest.$ac_ext <<EOF
4345 #line 4346 "configure"
4346 #include "confdefs.h"
4347 #include <ctype.h>
4348 #ifndef HAVE_EBCDIC
4349 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4350 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4351 #else
4352 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4353                 || ('j' <= (c) && (c) <= 'r') \
4354                 || ('s' <= (c) && (c) <= 'z'))
4355 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4356 #endif
4357 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4358 int main () { int i; for (i = 0; i < 256; i++)
4359 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4360 exit (0); }
4361
4362 EOF
4363 if { (eval echo configure:4364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4364 then
4365   :
4366 else
4367   echo "configure: failed program was:" >&5
4368   cat conftest.$ac_ext >&5
4369   rm -fr conftest*
4370   ol_cv_header_stdc=no
4371 fi
4372 rm -fr conftest*
4373 fi
4374
4375 fi
4376 fi
4377
4378 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4379 if test $ol_cv_header_stdc = yes; then
4380   cat >> confdefs.h <<\EOF
4381 #define STDC_HEADERS 1
4382 EOF
4383
4384 fi
4385 ac_cv_header_stdc=disable
4386
4387
4388 if test $ol_cv_header_stdc != yes; then
4389         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4390 fi
4391
4392 ac_header_dirent=no
4393 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4394 do
4395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4396 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4397 echo "configure:4398: checking for $ac_hdr that defines DIR" >&5
4398 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 #include <sys/types.h>
4405 #include <$ac_hdr>
4406 int main() {
4407 DIR *dirp = 0;
4408 ; return 0; }
4409 EOF
4410 if { (eval echo configure:4411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4411   rm -rf conftest*
4412   eval "ac_cv_header_dirent_$ac_safe=yes"
4413 else
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -rf conftest*
4417   eval "ac_cv_header_dirent_$ac_safe=no"
4418 fi
4419 rm -f conftest*
4420 fi
4421 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4422   echo "$ac_t""yes" 1>&6
4423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4424   cat >> confdefs.h <<EOF
4425 #define $ac_tr_hdr 1
4426 EOF
4427  ac_header_dirent=$ac_hdr; break
4428 else
4429   echo "$ac_t""no" 1>&6
4430 fi
4431 done
4432 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4433 if test $ac_header_dirent = dirent.h; then
4434 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4435 echo "configure:4436: checking for opendir in -ldir" >&5
4436 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4437 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4438   echo $ac_n "(cached) $ac_c" 1>&6
4439 else
4440   ac_save_LIBS="$LIBS"
4441 LIBS="-ldir  $LIBS"
4442 cat > conftest.$ac_ext <<EOF
4443 #line 4444 "configure"
4444 #include "confdefs.h"
4445 /* Override any gcc2 internal prototype to avoid an error.  */
4446 /* We use char because int might match the return type of a gcc2
4447     builtin and then its argument prototype would still apply.  */
4448 char opendir();
4449
4450 int main() {
4451 opendir()
4452 ; return 0; }
4453 EOF
4454 if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4455   rm -rf conftest*
4456   eval "ac_cv_lib_$ac_lib_var=yes"
4457 else
4458   echo "configure: failed program was:" >&5
4459   cat conftest.$ac_ext >&5
4460   rm -rf conftest*
4461   eval "ac_cv_lib_$ac_lib_var=no"
4462 fi
4463 rm -f conftest*
4464 LIBS="$ac_save_LIBS"
4465
4466 fi
4467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4468   echo "$ac_t""yes" 1>&6
4469   LIBS="$LIBS -ldir"
4470 else
4471   echo "$ac_t""no" 1>&6
4472 fi
4473
4474 else
4475 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4476 echo "configure:4477: checking for opendir in -lx" >&5
4477 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4478 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4479   echo $ac_n "(cached) $ac_c" 1>&6
4480 else
4481   ac_save_LIBS="$LIBS"
4482 LIBS="-lx  $LIBS"
4483 cat > conftest.$ac_ext <<EOF
4484 #line 4485 "configure"
4485 #include "confdefs.h"
4486 /* Override any gcc2 internal prototype to avoid an error.  */
4487 /* We use char because int might match the return type of a gcc2
4488     builtin and then its argument prototype would still apply.  */
4489 char opendir();
4490
4491 int main() {
4492 opendir()
4493 ; return 0; }
4494 EOF
4495 if { (eval echo configure:4496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4496   rm -rf conftest*
4497   eval "ac_cv_lib_$ac_lib_var=yes"
4498 else
4499   echo "configure: failed program was:" >&5
4500   cat conftest.$ac_ext >&5
4501   rm -rf conftest*
4502   eval "ac_cv_lib_$ac_lib_var=no"
4503 fi
4504 rm -f conftest*
4505 LIBS="$ac_save_LIBS"
4506
4507 fi
4508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4509   echo "$ac_t""yes" 1>&6
4510   LIBS="$LIBS -lx"
4511 else
4512   echo "$ac_t""no" 1>&6
4513 fi
4514
4515 fi
4516
4517 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4518 echo "configure:4519: checking for sys/wait.h that is POSIX.1 compatible" >&5
4519 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4520   echo $ac_n "(cached) $ac_c" 1>&6
4521 else
4522   cat > conftest.$ac_ext <<EOF
4523 #line 4524 "configure"
4524 #include "confdefs.h"
4525 #include <sys/types.h>
4526 #include <sys/wait.h>
4527 #ifndef WEXITSTATUS
4528 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4529 #endif
4530 #ifndef WIFEXITED
4531 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4532 #endif
4533 int main() {
4534 int s;
4535 wait (&s);
4536 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4537 ; return 0; }
4538 EOF
4539 if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4540   rm -rf conftest*
4541   ac_cv_header_sys_wait_h=yes
4542 else
4543   echo "configure: failed program was:" >&5
4544   cat conftest.$ac_ext >&5
4545   rm -rf conftest*
4546   ac_cv_header_sys_wait_h=no
4547 fi
4548 rm -f conftest*
4549 fi
4550
4551 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4552 if test $ac_cv_header_sys_wait_h = yes; then
4553   cat >> confdefs.h <<\EOF
4554 #define HAVE_SYS_WAIT_H 1
4555 EOF
4556
4557 fi
4558
4559 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4560 echo "configure:4561: checking POSIX termios" >&5
4561 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 #include <sys/types.h>
4568 #include <unistd.h>
4569 #include <termios.h>
4570 int main() {
4571 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4572    tcgetattr(0, 0);
4573 ; return 0; }
4574 EOF
4575 if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4576   rm -rf conftest*
4577   am_cv_sys_posix_termios=yes
4578 else
4579   echo "configure: failed program was:" >&5
4580   cat conftest.$ac_ext >&5
4581   rm -rf conftest*
4582   am_cv_sys_posix_termios=no
4583 fi
4584 rm -f conftest*
4585 fi
4586
4587 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4588
4589
4590  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4591 echo "configure:4592: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4592 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4593   echo $ac_n "(cached) $ac_c" 1>&6
4594 else
4595   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4596
4597   gwinsz_in_termios_h=no
4598   if test $am_cv_sys_posix_termios = yes; then
4599     cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 #include <sys/types.h>
4603 #     include <termios.h>
4604 #     ifdef TIOCGWINSZ
4605         yes
4606 #     endif
4607     
4608 EOF
4609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4610   egrep "yes" >/dev/null 2>&1; then
4611   rm -rf conftest*
4612   gwinsz_in_termios_h=yes
4613 fi
4614 rm -f conftest*
4615
4616   fi
4617
4618   if test $gwinsz_in_termios_h = no; then
4619     cat > conftest.$ac_ext <<EOF
4620 #line 4621 "configure"
4621 #include "confdefs.h"
4622 #include <sys/types.h>
4623 #     include <sys/ioctl.h>
4624 #     ifdef TIOCGWINSZ
4625         yes
4626 #     endif
4627     
4628 EOF
4629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4630   egrep "yes" >/dev/null 2>&1; then
4631   rm -rf conftest*
4632   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4633 fi
4634 rm -f conftest*
4635
4636   fi
4637   
4638 fi
4639
4640 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4641   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4642     cat >> confdefs.h <<\EOF
4643 #define GWINSZ_IN_SYS_IOCTL 1
4644 EOF
4645
4646   fi
4647
4648 if test $am_cv_sys_posix_termios = yes ; then
4649         cat >> confdefs.h <<\EOF
4650 #define HAVE_POSIX_TERMIOS 1
4651 EOF
4652
4653 fi
4654
4655 for ac_hdr in \
4656         arpa/inet.h             \
4657         arpa/nameser.h  \
4658         assert.h                \
4659         conio.h                 \
4660         crypt.h                 \
4661         direct.h                \
4662         errno.h                 \
4663         fcntl.h                 \
4664         filio.h                 \
4665         getopt.h                \
4666         grp.h                   \
4667         io.h                    \
4668         libutil.h               \
4669         limits.h                \
4670         locale.h                \
4671         netinet/tcp.h   \
4672         malloc.h                \
4673         memory.h                \
4674         psap.h                  \
4675         pwd.h                   \
4676         process.h               \
4677         resolv.h                \
4678         sgtty.h                 \
4679         shadow.h                \
4680         stddef.h                \
4681         string.h                \
4682         strings.h               \
4683         sysexits.h              \
4684         sys/file.h              \
4685         sys/filio.h             \
4686         sys/errno.h             \
4687         sys/ioctl.h             \
4688         sys/param.h             \
4689         sys/resource.h  \
4690         sys/select.h    \
4691         sys/socket.h    \
4692         sys/syslog.h    \
4693         sys/time.h              \
4694         sys/types.h             \
4695         syslog.h                \
4696         termios.h               \
4697         unistd.h                \
4698         winsock.h               \
4699
4700 do
4701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4703 echo "configure:4704: checking for $ac_hdr" >&5
4704 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4705   echo $ac_n "(cached) $ac_c" 1>&6
4706 else
4707   cat > conftest.$ac_ext <<EOF
4708 #line 4709 "configure"
4709 #include "confdefs.h"
4710 #include <$ac_hdr>
4711 EOF
4712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4713 { (eval echo configure:4714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4715 if test -z "$ac_err"; then
4716   rm -rf conftest*
4717   eval "ac_cv_header_$ac_safe=yes"
4718 else
4719   echo "$ac_err" >&5
4720   echo "configure: failed program was:" >&5
4721   cat conftest.$ac_ext >&5
4722   rm -rf conftest*
4723   eval "ac_cv_header_$ac_safe=no"
4724 fi
4725 rm -f conftest*
4726 fi
4727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4728   echo "$ac_t""yes" 1>&6
4729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4730   cat >> confdefs.h <<EOF
4731 #define $ac_tr_hdr 1
4732 EOF
4733  
4734 else
4735   echo "$ac_t""no" 1>&6
4736 fi
4737 done
4738
4739
4740
4741
4742 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4743 echo "configure:4744: checking for sigset in -lV3" >&5
4744 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4746   echo $ac_n "(cached) $ac_c" 1>&6
4747 else
4748   ac_save_LIBS="$LIBS"
4749 LIBS="-lV3  $LIBS"
4750 cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753 /* Override any gcc2 internal prototype to avoid an error.  */
4754 /* We use char because int might match the return type of a gcc2
4755     builtin and then its argument prototype would still apply.  */
4756 char sigset();
4757
4758 int main() {
4759 sigset()
4760 ; return 0; }
4761 EOF
4762 if { (eval echo configure:4763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4763   rm -rf conftest*
4764   eval "ac_cv_lib_$ac_lib_var=yes"
4765 else
4766   echo "configure: failed program was:" >&5
4767   cat conftest.$ac_ext >&5
4768   rm -rf conftest*
4769   eval "ac_cv_lib_$ac_lib_var=no"
4770 fi
4771 rm -f conftest*
4772 LIBS="$ac_save_LIBS"
4773
4774 fi
4775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4776   echo "$ac_t""yes" 1>&6
4777     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4778     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4779   cat >> confdefs.h <<EOF
4780 #define $ac_tr_lib 1
4781 EOF
4782
4783   LIBS="-lV3 $LIBS"
4784
4785 else
4786   echo "$ac_t""no" 1>&6
4787 fi
4788
4789
4790 if test $ac_cv_header_winsock_h = yes; then
4791         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4792 echo "configure:4793: checking for winsock" >&5
4793 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4794   echo $ac_n "(cached) $ac_c" 1>&6
4795 else
4796   cat > conftest.$ac_ext <<EOF
4797 #line 4798 "configure"
4798 #include "confdefs.h"
4799 #include <winsock.h>
4800 int main() {
4801
4802                         socket(0,0,0);
4803                         select(0,NULL,NULL,NULL,NULL);
4804                         closesocket(0);
4805                         gethostname(NULL,0);
4806         
4807 ; return 0; }
4808 EOF
4809 if { (eval echo configure:4810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4810   rm -rf conftest*
4811   ol_cv_winsock=yes
4812 else
4813   echo "configure: failed program was:" >&5
4814   cat conftest.$ac_ext >&5
4815   rm -rf conftest*
4816   ol_cv_winsock=no
4817 fi
4818 rm -f conftest*]
4819 fi
4820
4821 echo "$ac_t""$ol_cv_winsock" 1>&6
4822
4823         if test $ol_cv_winsock = yes ; then
4824                 cat >> confdefs.h <<\EOF
4825 #define HAVE_WINSOCK 1
4826 EOF
4827
4828                 ac_cv_func_socket=yes
4829                 ac_cv_func_select=yes
4830                 ac_cv_func_closesocket=yes
4831                 ac_cv_func_gethostname=yes
4832         fi
4833 fi
4834
4835
4836 echo $ac_n "checking for socket""... $ac_c" 1>&6
4837 echo "configure:4838: checking for socket" >&5
4838 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4839   echo $ac_n "(cached) $ac_c" 1>&6
4840 else
4841   cat > conftest.$ac_ext <<EOF
4842 #line 4843 "configure"
4843 #include "confdefs.h"
4844 /* System header to define __stub macros and hopefully few prototypes,
4845     which can conflict with char socket(); below.  */
4846 #include <assert.h>
4847 /* Override any gcc2 internal prototype to avoid an error.  */
4848 /* We use char because int might match the return type of a gcc2
4849     builtin and then its argument prototype would still apply.  */
4850 char socket();
4851 char (*f)();
4852
4853 int main() {
4854
4855 /* The GNU C library defines this for functions which it implements
4856     to always fail with ENOSYS.  Some functions are actually named
4857     something starting with __ and the normal name is an alias.  */
4858 #if defined (__stub_socket) || defined (__stub___socket)
4859 choke me
4860 #else
4861 f = socket;
4862 #endif
4863
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   eval "ac_cv_func_socket=yes"
4869 else
4870   echo "configure: failed program was:" >&5
4871   cat conftest.$ac_ext >&5
4872   rm -rf conftest*
4873   eval "ac_cv_func_socket=no"
4874 fi
4875 rm -f conftest*
4876 fi
4877
4878 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4879   echo "$ac_t""yes" 1>&6
4880   :
4881 else
4882   echo "$ac_t""no" 1>&6
4883         
4884         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4885 echo "configure:4886: checking for main in -lsocket" >&5
4886 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4888   echo $ac_n "(cached) $ac_c" 1>&6
4889 else
4890   ac_save_LIBS="$LIBS"
4891 LIBS="-lsocket  $LIBS"
4892 cat > conftest.$ac_ext <<EOF
4893 #line 4894 "configure"
4894 #include "confdefs.h"
4895
4896 int main() {
4897 main()
4898 ; return 0; }
4899 EOF
4900 if { (eval echo configure:4901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4901   rm -rf conftest*
4902   eval "ac_cv_lib_$ac_lib_var=yes"
4903 else
4904   echo "configure: failed program was:" >&5
4905   cat conftest.$ac_ext >&5
4906   rm -rf conftest*
4907   eval "ac_cv_lib_$ac_lib_var=no"
4908 fi
4909 rm -f conftest*
4910 LIBS="$ac_save_LIBS"
4911
4912 fi
4913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4914   echo "$ac_t""yes" 1>&6
4915     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4916     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4917   cat >> confdefs.h <<EOF
4918 #define $ac_tr_lib 1
4919 EOF
4920
4921   LIBS="-lsocket $LIBS"
4922
4923 else
4924   echo "$ac_t""no" 1>&6
4925 fi
4926
4927         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4928 echo "configure:4929: checking for main in -lnet" >&5
4929 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4930 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4931   echo $ac_n "(cached) $ac_c" 1>&6
4932 else
4933   ac_save_LIBS="$LIBS"
4934 LIBS="-lnet  $LIBS"
4935 cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938
4939 int main() {
4940 main()
4941 ; return 0; }
4942 EOF
4943 if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4944   rm -rf conftest*
4945   eval "ac_cv_lib_$ac_lib_var=yes"
4946 else
4947   echo "configure: failed program was:" >&5
4948   cat conftest.$ac_ext >&5
4949   rm -rf conftest*
4950   eval "ac_cv_lib_$ac_lib_var=no"
4951 fi
4952 rm -f conftest*
4953 LIBS="$ac_save_LIBS"
4954
4955 fi
4956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4957   echo "$ac_t""yes" 1>&6
4958     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4959     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4960   cat >> confdefs.h <<EOF
4961 #define $ac_tr_lib 1
4962 EOF
4963
4964   LIBS="-lnet $LIBS"
4965
4966 else
4967   echo "$ac_t""no" 1>&6
4968 fi
4969
4970         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4971 echo "configure:4972: checking for main in -lnsl_s" >&5
4972 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4973 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4974   echo $ac_n "(cached) $ac_c" 1>&6
4975 else
4976   ac_save_LIBS="$LIBS"
4977 LIBS="-lnsl_s  $LIBS"
4978 cat > conftest.$ac_ext <<EOF
4979 #line 4980 "configure"
4980 #include "confdefs.h"
4981
4982 int main() {
4983 main()
4984 ; return 0; }
4985 EOF
4986 if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4987   rm -rf conftest*
4988   eval "ac_cv_lib_$ac_lib_var=yes"
4989 else
4990   echo "configure: failed program was:" >&5
4991   cat conftest.$ac_ext >&5
4992   rm -rf conftest*
4993   eval "ac_cv_lib_$ac_lib_var=no"
4994 fi
4995 rm -f conftest*
4996 LIBS="$ac_save_LIBS"
4997
4998 fi
4999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5000   echo "$ac_t""yes" 1>&6
5001     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5002     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5003   cat >> confdefs.h <<EOF
5004 #define $ac_tr_lib 1
5005 EOF
5006
5007   LIBS="-lnsl_s $LIBS"
5008
5009 else
5010   echo "$ac_t""no" 1>&6
5011 fi
5012
5013         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5014 echo "configure:5015: checking for main in -lnsl" >&5
5015 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5016 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5017   echo $ac_n "(cached) $ac_c" 1>&6
5018 else
5019   ac_save_LIBS="$LIBS"
5020 LIBS="-lnsl  $LIBS"
5021 cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024
5025 int main() {
5026 main()
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5030   rm -rf conftest*
5031   eval "ac_cv_lib_$ac_lib_var=yes"
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   eval "ac_cv_lib_$ac_lib_var=no"
5037 fi
5038 rm -f conftest*
5039 LIBS="$ac_save_LIBS"
5040
5041 fi
5042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5043   echo "$ac_t""yes" 1>&6
5044     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5045     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5046   cat >> confdefs.h <<EOF
5047 #define $ac_tr_lib 1
5048 EOF
5049
5050   LIBS="-lnsl $LIBS"
5051
5052 else
5053   echo "$ac_t""no" 1>&6
5054 fi
5055
5056         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5057 echo "configure:5058: checking for socket in -linet" >&5
5058 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5059 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5060   echo $ac_n "(cached) $ac_c" 1>&6
5061 else
5062   ac_save_LIBS="$LIBS"
5063 LIBS="-linet  $LIBS"
5064 cat > conftest.$ac_ext <<EOF
5065 #line 5066 "configure"
5066 #include "confdefs.h"
5067 /* Override any gcc2 internal prototype to avoid an error.  */
5068 /* We use char because int might match the return type of a gcc2
5069     builtin and then its argument prototype would still apply.  */
5070 char socket();
5071
5072 int main() {
5073 socket()
5074 ; return 0; }
5075 EOF
5076 if { (eval echo configure:5077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5077   rm -rf conftest*
5078   eval "ac_cv_lib_$ac_lib_var=yes"
5079 else
5080   echo "configure: failed program was:" >&5
5081   cat conftest.$ac_ext >&5
5082   rm -rf conftest*
5083   eval "ac_cv_lib_$ac_lib_var=no"
5084 fi
5085 rm -f conftest*
5086 LIBS="$ac_save_LIBS"
5087
5088 fi
5089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5090   echo "$ac_t""yes" 1>&6
5091     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5092     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5093   cat >> confdefs.h <<EOF
5094 #define $ac_tr_lib 1
5095 EOF
5096
5097   LIBS="-linet $LIBS"
5098
5099 else
5100   echo "$ac_t""no" 1>&6
5101 fi
5102
5103         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5104 echo "configure:5105: checking for main in -lgen" >&5
5105 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5107   echo $ac_n "(cached) $ac_c" 1>&6
5108 else
5109   ac_save_LIBS="$LIBS"
5110 LIBS="-lgen  $LIBS"
5111 cat > conftest.$ac_ext <<EOF
5112 #line 5113 "configure"
5113 #include "confdefs.h"
5114
5115 int main() {
5116 main()
5117 ; return 0; }
5118 EOF
5119 if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5120   rm -rf conftest*
5121   eval "ac_cv_lib_$ac_lib_var=yes"
5122 else
5123   echo "configure: failed program was:" >&5
5124   cat conftest.$ac_ext >&5
5125   rm -rf conftest*
5126   eval "ac_cv_lib_$ac_lib_var=no"
5127 fi
5128 rm -f conftest*
5129 LIBS="$ac_save_LIBS"
5130
5131 fi
5132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5133   echo "$ac_t""yes" 1>&6
5134     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5135     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5136   cat >> confdefs.h <<EOF
5137 #define $ac_tr_lib 1
5138 EOF
5139
5140   LIBS="-lgen $LIBS"
5141
5142 else
5143   echo "$ac_t""no" 1>&6
5144 fi
5145
5146
5147 fi
5148
5149
5150 echo $ac_n "checking for select""... $ac_c" 1>&6
5151 echo "configure:5152: checking for select" >&5
5152 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5153   echo $ac_n "(cached) $ac_c" 1>&6
5154 else
5155   cat > conftest.$ac_ext <<EOF
5156 #line 5157 "configure"
5157 #include "confdefs.h"
5158 /* System header to define __stub macros and hopefully few prototypes,
5159     which can conflict with char select(); below.  */
5160 #include <assert.h>
5161 /* Override any gcc2 internal prototype to avoid an error.  */
5162 /* We use char because int might match the return type of a gcc2
5163     builtin and then its argument prototype would still apply.  */
5164 char select();
5165 char (*f)();
5166
5167 int main() {
5168
5169 /* The GNU C library defines this for functions which it implements
5170     to always fail with ENOSYS.  Some functions are actually named
5171     something starting with __ and the normal name is an alias.  */
5172 #if defined (__stub_select) || defined (__stub___select)
5173 choke me
5174 #else
5175 f = select;
5176 #endif
5177
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5181   rm -rf conftest*
5182   eval "ac_cv_func_select=yes"
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   eval "ac_cv_func_select=no"
5188 fi
5189 rm -f conftest*
5190 fi
5191
5192 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5193   echo "$ac_t""yes" 1>&6
5194   :
5195 else
5196   echo "$ac_t""no" 1>&6
5197 { echo "configure: error: select() required." 1>&2; exit 1; }
5198 fi
5199
5200
5201 if test "${ac_cv_header_winsock_h}" != yes; then
5202                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5203 echo "configure:5204: checking types of arguments for select()" >&5
5204  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5205   echo $ac_n "(cached) $ac_c" 1>&6
5206 else
5207    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5208   echo $ac_n "(cached) $ac_c" 1>&6
5209 else
5210     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5211   echo $ac_n "(cached) $ac_c" 1>&6
5212 else
5213      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5214      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5215       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5216        cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5219 #ifdef HAVE_SYS_TYPES_H
5220 #include <sys/types.h>
5221 #endif
5222 #ifdef HAVE_SYS_TIME_H
5223 #include <sys/time.h>
5224 #endif
5225 #ifdef HAVE_SYS_SELECT_H
5226 #include <sys/select.h>
5227 #endif
5228 #ifdef HAVE_SYS_SOCKET_H
5229 #include <sys/socket.h>
5230 #endif
5231 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);
5232 int main() {
5233
5234 ; return 0; }
5235 EOF
5236 if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5237   rm -rf conftest*
5238           ac_not_found=no ; break 3
5239 else
5240   echo "configure: failed program was:" >&5
5241   cat conftest.$ac_ext >&5
5242   rm -rf conftest*
5243   ac_not_found=yes
5244 fi
5245 rm -f conftest*
5246       done
5247      done
5248     done
5249    
5250 fi
5251   
5252 fi
5253  
5254 fi
5255  if test "$ac_not_found" = yes; then
5256   ac_cv_func_select_arg1=int 
5257   ac_cv_func_select_arg234='int *' 
5258   ac_cv_func_select_arg5='struct timeval *'
5259  fi
5260  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5261  cat >> confdefs.h <<EOF
5262 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5263 EOF
5264
5265  cat >> confdefs.h <<EOF
5266 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5267 EOF
5268
5269  cat >> confdefs.h <<EOF
5270 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5271 EOF
5272
5273
5274 fi
5275
5276
5277 for ac_hdr in regex.h 
5278 do
5279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5281 echo "configure:5282: checking for $ac_hdr" >&5
5282 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285   cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288 #include <$ac_hdr>
5289 EOF
5290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5291 { (eval echo configure:5292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5293 if test -z "$ac_err"; then
5294   rm -rf conftest*
5295   eval "ac_cv_header_$ac_safe=yes"
5296 else
5297   echo "$ac_err" >&5
5298   echo "configure: failed program was:" >&5
5299   cat conftest.$ac_ext >&5
5300   rm -rf conftest*
5301   eval "ac_cv_header_$ac_safe=no"
5302 fi
5303 rm -f conftest*
5304 fi
5305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5306   echo "$ac_t""yes" 1>&6
5307     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5308   cat >> confdefs.h <<EOF
5309 #define $ac_tr_hdr 1
5310 EOF
5311  
5312 else
5313   echo "$ac_t""no" 1>&6
5314 fi
5315 done
5316
5317 if test "$ac_cv_header_regex_h" != yes ; then
5318         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5319 fi
5320 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5321 echo "configure:5322: checking for regfree" >&5
5322 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5323   echo $ac_n "(cached) $ac_c" 1>&6
5324 else
5325   cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5328 /* System header to define __stub macros and hopefully few prototypes,
5329     which can conflict with char regfree(); below.  */
5330 #include <assert.h>
5331 /* Override any gcc2 internal prototype to avoid an error.  */
5332 /* We use char because int might match the return type of a gcc2
5333     builtin and then its argument prototype would still apply.  */
5334 char regfree();
5335 char (*f)();
5336
5337 int main() {
5338
5339 /* The GNU C library defines this for functions which it implements
5340     to always fail with ENOSYS.  Some functions are actually named
5341     something starting with __ and the normal name is an alias.  */
5342 #if defined (__stub_regfree) || defined (__stub___regfree)
5343 choke me
5344 #else
5345 f = regfree;
5346 #endif
5347
5348 ; return 0; }
5349 EOF
5350 if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5351   rm -rf conftest*
5352   eval "ac_cv_func_regfree=yes"
5353 else
5354   echo "configure: failed program was:" >&5
5355   cat conftest.$ac_ext >&5
5356   rm -rf conftest*
5357   eval "ac_cv_func_regfree=no"
5358 fi
5359 rm -f conftest*
5360 fi
5361
5362 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5363   echo "$ac_t""yes" 1>&6
5364   :
5365 else
5366   echo "$ac_t""no" 1>&6
5367 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5368 fi
5369
5370
5371
5372 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5373 echo "configure:5374: checking for compatible POSIX regex" >&5
5374 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5375   echo $ac_n "(cached) $ac_c" 1>&6
5376 else
5377   
5378         if test "$cross_compiling" = yes; then
5379   ol_cv_c_posix_regex=cross
5380 else
5381   cat > conftest.$ac_ext <<EOF
5382 #line 5383 "configure"
5383 #include "confdefs.h"
5384
5385 #include <sys/types.h>
5386 #include <regex.h>
5387 static char *pattern, *string;
5388 main()
5389 {
5390         int rc;
5391         regex_t re;
5392
5393         pattern = "^A";
5394
5395         if(regcomp(&re, pattern, 0)) {
5396                 return -1;
5397         }
5398         
5399         string = "ALL MATCH";
5400         
5401         rc = regexec(&re, string, 0, (void*)0, 0);
5402
5403         regfree(&re);
5404
5405         return rc;
5406 }
5407 EOF
5408 if { (eval echo configure:5409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5409 then
5410   ol_cv_c_posix_regex=yes
5411 else
5412   echo "configure: failed program was:" >&5
5413   cat conftest.$ac_ext >&5
5414   rm -fr conftest*
5415   ol_cv_c_posix_regex=no
5416 fi
5417 rm -fr conftest*
5418 fi
5419
5420 fi
5421
5422 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5423
5424 if test "$ol_cv_c_posix_regex" = no ; then
5425         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5426 fi
5427
5428 ol_link_dnssrv=no
5429 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5430 echo "configure:5431: checking for res_query" >&5
5431 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5432   echo $ac_n "(cached) $ac_c" 1>&6
5433 else
5434   cat > conftest.$ac_ext <<EOF
5435 #line 5436 "configure"
5436 #include "confdefs.h"
5437 /* System header to define __stub macros and hopefully few prototypes,
5438     which can conflict with char res_query(); below.  */
5439 #include <assert.h>
5440 /* Override any gcc2 internal prototype to avoid an error.  */
5441 /* We use char because int might match the return type of a gcc2
5442     builtin and then its argument prototype would still apply.  */
5443 char res_query();
5444 char (*f)();
5445
5446 int main() {
5447
5448 /* The GNU C library defines this for functions which it implements
5449     to always fail with ENOSYS.  Some functions are actually named
5450     something starting with __ and the normal name is an alias.  */
5451 #if defined (__stub_res_query) || defined (__stub___res_query)
5452 choke me
5453 #else
5454 f = res_query;
5455 #endif
5456
5457 ; return 0; }
5458 EOF
5459 if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5460   rm -rf conftest*
5461   eval "ac_cv_func_res_query=yes"
5462 else
5463   echo "configure: failed program was:" >&5
5464   cat conftest.$ac_ext >&5
5465   rm -rf conftest*
5466   eval "ac_cv_func_res_query=no"
5467 fi
5468 rm -f conftest*
5469 fi
5470
5471 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5472   echo "$ac_t""yes" 1>&6
5473   :
5474 else
5475   echo "$ac_t""no" 1>&6
5476 fi
5477
5478 if test $ac_cv_func_res_query = no ; then 
5479         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5480 echo "configure:5481: checking for res_query in -lbind" >&5
5481 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5483   echo $ac_n "(cached) $ac_c" 1>&6
5484 else
5485   ac_save_LIBS="$LIBS"
5486 LIBS="-lbind  $LIBS"
5487 cat > conftest.$ac_ext <<EOF
5488 #line 5489 "configure"
5489 #include "confdefs.h"
5490 /* Override any gcc2 internal prototype to avoid an error.  */
5491 /* We use char because int might match the return type of a gcc2
5492     builtin and then its argument prototype would still apply.  */
5493 char res_query();
5494
5495 int main() {
5496 res_query()
5497 ; return 0; }
5498 EOF
5499 if { (eval echo configure:5500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5500   rm -rf conftest*
5501   eval "ac_cv_lib_$ac_lib_var=yes"
5502 else
5503   echo "configure: failed program was:" >&5
5504   cat conftest.$ac_ext >&5
5505   rm -rf conftest*
5506   eval "ac_cv_lib_$ac_lib_var=no"
5507 fi
5508 rm -f conftest*
5509 LIBS="$ac_save_LIBS"
5510
5511 fi
5512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5513   echo "$ac_t""yes" 1>&6
5514     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5515     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5516   cat >> confdefs.h <<EOF
5517 #define $ac_tr_lib 1
5518 EOF
5519
5520   LIBS="-lbind $LIBS"
5521
5522 else
5523   echo "$ac_t""no" 1>&6
5524 fi
5525
5526         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5527 fi
5528
5529 if test $ac_cv_func_res_query = no ; then 
5530         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5531 echo "configure:5532: checking for __res_query in -lbind" >&5
5532 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5533 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5534   echo $ac_n "(cached) $ac_c" 1>&6
5535 else
5536   ac_save_LIBS="$LIBS"
5537 LIBS="-lbind  $LIBS"
5538 cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541 /* Override any gcc2 internal prototype to avoid an error.  */
5542 /* We use char because int might match the return type of a gcc2
5543     builtin and then its argument prototype would still apply.  */
5544 char __res_query();
5545
5546 int main() {
5547 __res_query()
5548 ; return 0; }
5549 EOF
5550 if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5551   rm -rf conftest*
5552   eval "ac_cv_lib_$ac_lib_var=yes"
5553 else
5554   echo "configure: failed program was:" >&5
5555   cat conftest.$ac_ext >&5
5556   rm -rf conftest*
5557   eval "ac_cv_lib_$ac_lib_var=no"
5558 fi
5559 rm -f conftest*
5560 LIBS="$ac_save_LIBS"
5561
5562 fi
5563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5564   echo "$ac_t""yes" 1>&6
5565     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5566     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5567   cat >> confdefs.h <<EOF
5568 #define $ac_tr_lib 1
5569 EOF
5570
5571   LIBS="-lbind $LIBS"
5572
5573 else
5574   echo "$ac_t""no" 1>&6
5575 fi
5576
5577         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5578 fi
5579
5580 if test $ac_cv_func_res_query = no ; then 
5581         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5582 echo "configure:5583: checking for res_query in -lresolv" >&5
5583 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5585   echo $ac_n "(cached) $ac_c" 1>&6
5586 else
5587   ac_save_LIBS="$LIBS"
5588 LIBS="-lresolv  $LIBS"
5589 cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5592 /* Override any gcc2 internal prototype to avoid an error.  */
5593 /* We use char because int might match the return type of a gcc2
5594     builtin and then its argument prototype would still apply.  */
5595 char res_query();
5596
5597 int main() {
5598 res_query()
5599 ; return 0; }
5600 EOF
5601 if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5602   rm -rf conftest*
5603   eval "ac_cv_lib_$ac_lib_var=yes"
5604 else
5605   echo "configure: failed program was:" >&5
5606   cat conftest.$ac_ext >&5
5607   rm -rf conftest*
5608   eval "ac_cv_lib_$ac_lib_var=no"
5609 fi
5610 rm -f conftest*
5611 LIBS="$ac_save_LIBS"
5612
5613 fi
5614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5615   echo "$ac_t""yes" 1>&6
5616     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5617     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5618   cat >> confdefs.h <<EOF
5619 #define $ac_tr_lib 1
5620 EOF
5621
5622   LIBS="-lresolv $LIBS"
5623
5624 else
5625   echo "$ac_t""no" 1>&6
5626 fi
5627
5628         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5629 fi
5630
5631 if test "$ac_cv_func_res_query" = yes ; then
5632         cat >> confdefs.h <<\EOF
5633 #define HAVE_RES_QUERY 1
5634 EOF
5635
5636
5637         if test $ol_enable_dnssrv != no ; then
5638                 ol_link_dnssrv=yes
5639         fi
5640 fi
5641
5642 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5643         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5644 fi
5645
5646 if test $ol_enable_quipu != no ; then
5647         for ac_hdr in quipu/commonarg.h
5648 do
5649 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5650 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5651 echo "configure:5652: checking for $ac_hdr" >&5
5652 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5653   echo $ac_n "(cached) $ac_c" 1>&6
5654 else
5655   cat > conftest.$ac_ext <<EOF
5656 #line 5657 "configure"
5657 #include "confdefs.h"
5658 #include <$ac_hdr>
5659 EOF
5660 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5661 { (eval echo configure:5662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5662 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5663 if test -z "$ac_err"; then
5664   rm -rf conftest*
5665   eval "ac_cv_header_$ac_safe=yes"
5666 else
5667   echo "$ac_err" >&5
5668   echo "configure: failed program was:" >&5
5669   cat conftest.$ac_ext >&5
5670   rm -rf conftest*
5671   eval "ac_cv_header_$ac_safe=no"
5672 fi
5673 rm -f conftest*
5674 fi
5675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5676   echo "$ac_t""yes" 1>&6
5677     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5678   cat >> confdefs.h <<EOF
5679 #define $ac_tr_hdr 1
5680 EOF
5681  
5682 else
5683   echo "$ac_t""no" 1>&6
5684 fi
5685 done
5686
5687
5688         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5689                 BUILD_QUIPU=yes
5690         elif test $ol_enable_quipu = auto ; then
5691                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5692         else
5693                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5694         fi
5695 fi
5696
5697 ol_link_kbind=no
5698 ol_link_kpasswd=no
5699 ol_link_krb5=no
5700 ol_link_krb4=no
5701
5702 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5703         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5704
5705         for ac_hdr in krb5.h
5706 do
5707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5709 echo "configure:5710: checking for $ac_hdr" >&5
5710 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5711   echo $ac_n "(cached) $ac_c" 1>&6
5712 else
5713   cat > conftest.$ac_ext <<EOF
5714 #line 5715 "configure"
5715 #include "confdefs.h"
5716 #include <$ac_hdr>
5717 EOF
5718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5719 { (eval echo configure:5720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5721 if test -z "$ac_err"; then
5722   rm -rf conftest*
5723   eval "ac_cv_header_$ac_safe=yes"
5724 else
5725   echo "$ac_err" >&5
5726   echo "configure: failed program was:" >&5
5727   cat conftest.$ac_ext >&5
5728   rm -rf conftest*
5729   eval "ac_cv_header_$ac_safe=no"
5730 fi
5731 rm -f conftest*
5732 fi
5733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5734   echo "$ac_t""yes" 1>&6
5735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5736   cat >> confdefs.h <<EOF
5737 #define $ac_tr_hdr 1
5738 EOF
5739  
5740 else
5741   echo "$ac_t""no" 1>&6
5742 fi
5743 done
5744
5745
5746         if test $ac_cv_header_krb5_h = yes ; then
5747                                 for ac_hdr in heim_err.h
5748 do
5749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5751 echo "configure:5752: checking for $ac_hdr" >&5
5752 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5753   echo $ac_n "(cached) $ac_c" 1>&6
5754 else
5755   cat > conftest.$ac_ext <<EOF
5756 #line 5757 "configure"
5757 #include "confdefs.h"
5758 #include <$ac_hdr>
5759 EOF
5760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5761 { (eval echo configure:5762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5763 if test -z "$ac_err"; then
5764   rm -rf conftest*
5765   eval "ac_cv_header_$ac_safe=yes"
5766 else
5767   echo "$ac_err" >&5
5768   echo "configure: failed program was:" >&5
5769   cat conftest.$ac_ext >&5
5770   rm -rf conftest*
5771   eval "ac_cv_header_$ac_safe=no"
5772 fi
5773 rm -f conftest*
5774 fi
5775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5776   echo "$ac_t""yes" 1>&6
5777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5778   cat >> confdefs.h <<EOF
5779 #define $ac_tr_hdr 1
5780 EOF
5781  
5782 else
5783   echo "$ac_t""no" 1>&6
5784 fi
5785 done
5786
5787                 if test $ac_cv_header_heim_err_h = yes ; then
5788                         krb5_impl=heimdal
5789                 else
5790                         krb5_impl=mit
5791                 fi
5792
5793                 if test $krb5_impl = mit; then
5794                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5795 echo "configure:5796: checking for main in -lkrb5" >&5
5796 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5797 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5798   echo $ac_n "(cached) $ac_c" 1>&6
5799 else
5800   ac_save_LIBS="$LIBS"
5801 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5802 cat > conftest.$ac_ext <<EOF
5803 #line 5804 "configure"
5804 #include "confdefs.h"
5805
5806 int main() {
5807 main()
5808 ; return 0; }
5809 EOF
5810 if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5811   rm -rf conftest*
5812   eval "ac_cv_lib_$ac_lib_var=yes"
5813 else
5814   echo "configure: failed program was:" >&5
5815   cat conftest.$ac_ext >&5
5816   rm -rf conftest*
5817   eval "ac_cv_lib_$ac_lib_var=no"
5818 fi
5819 rm -f conftest*
5820 LIBS="$ac_save_LIBS"
5821
5822 fi
5823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5824   echo "$ac_t""yes" 1>&6
5825   have_krb5=yes
5826                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5827 else
5828   echo "$ac_t""no" 1>&6
5829 have_krb5=no
5830 fi
5831
5832
5833                 elif test $krb5_impl = heimdal; then
5834                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5835 echo "configure:5836: checking for main in -lkrb5" >&5
5836 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5837 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5838   echo $ac_n "(cached) $ac_c" 1>&6
5839 else
5840   ac_save_LIBS="$LIBS"
5841 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5842 cat > conftest.$ac_ext <<EOF
5843 #line 5844 "configure"
5844 #include "confdefs.h"
5845
5846 int main() {
5847 main()
5848 ; return 0; }
5849 EOF
5850 if { (eval echo configure:5851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5851   rm -rf conftest*
5852   eval "ac_cv_lib_$ac_lib_var=yes"
5853 else
5854   echo "configure: failed program was:" >&5
5855   cat conftest.$ac_ext >&5
5856   rm -rf conftest*
5857   eval "ac_cv_lib_$ac_lib_var=no"
5858 fi
5859 rm -f conftest*
5860 LIBS="$ac_save_LIBS"
5861
5862 fi
5863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5864   echo "$ac_t""yes" 1>&6
5865   have_krb5=yes
5866                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5867 else
5868   echo "$ac_t""no" 1>&6
5869 have_krb5=no
5870 fi
5871
5872
5873                         cat >> confdefs.h <<\EOF
5874 #define HAVE_HEIMDAL_KERBEROS 1
5875 EOF
5876
5877                 else
5878                         have_krb5=no
5879                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5880                 fi
5881
5882                 if test $have_krb5 = yes ; then
5883                         ol_link_krb5=yes
5884
5885                         cat >> confdefs.h <<\EOF
5886 #define HAVE_KRB5 1
5887 EOF
5888
5889
5890                         if test $ol_enable_kpasswd != no ; then
5891                                 ol_link_kpasswd=yes;
5892                         fi
5893
5894                         if test $ol_with_kerberos = k5only ; then
5895                                 ol_with_kerberos=found
5896                         fi
5897
5898                 elif test $ol_with_kerberos != auto ; then
5899                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5900                 fi
5901
5902         fi
5903 fi
5904
5905 if test $ol_link_krb5 = yes -a \
5906         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5907
5908         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5909 do
5910 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5911 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5912 echo "configure:5913: checking for $ac_hdr" >&5
5913 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 #include <$ac_hdr>
5920 EOF
5921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5922 { (eval echo configure:5923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5924 if test -z "$ac_err"; then
5925   rm -rf conftest*
5926   eval "ac_cv_header_$ac_safe=yes"
5927 else
5928   echo "$ac_err" >&5
5929   echo "configure: failed program was:" >&5
5930   cat conftest.$ac_ext >&5
5931   rm -rf conftest*
5932   eval "ac_cv_header_$ac_safe=no"
5933 fi
5934 rm -f conftest*
5935 fi
5936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5937   echo "$ac_t""yes" 1>&6
5938     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5939   cat >> confdefs.h <<EOF
5940 #define $ac_tr_hdr 1
5941 EOF
5942  
5943 else
5944   echo "$ac_t""no" 1>&6
5945 fi
5946 done
5947
5948
5949         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5950                 if test $krb5_impl = mit; then
5951                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5952 echo "configure:5953: checking for main in -lkrb4" >&5
5953 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5954 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5955   echo $ac_n "(cached) $ac_c" 1>&6
5956 else
5957   ac_save_LIBS="$LIBS"
5958 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962
5963 int main() {
5964 main()
5965 ; return 0; }
5966 EOF
5967 if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5968   rm -rf conftest*
5969   eval "ac_cv_lib_$ac_lib_var=yes"
5970 else
5971   echo "configure: failed program was:" >&5
5972   cat conftest.$ac_ext >&5
5973   rm -rf conftest*
5974   eval "ac_cv_lib_$ac_lib_var=no"
5975 fi
5976 rm -f conftest*
5977 LIBS="$ac_save_LIBS"
5978
5979 fi
5980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5981   echo "$ac_t""yes" 1>&6
5982   have_k425=yes
5983                                 KRB4_LIBS="-lkrb4 -ldes425"
5984 else
5985   echo "$ac_t""no" 1>&6
5986 have_k425=no
5987 fi
5988
5989
5990                 elif test $krb5_impl = heimdal; then
5991                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5992 echo "configure:5993: checking for main in -lkrb4" >&5
5993 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5994 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5995   echo $ac_n "(cached) $ac_c" 1>&6
5996 else
5997   ac_save_LIBS="$LIBS"
5998 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5999 cat > conftest.$ac_ext <<EOF
6000 #line 6001 "configure"
6001 #include "confdefs.h"
6002
6003 int main() {
6004 main()
6005 ; return 0; }
6006 EOF
6007 if { (eval echo configure:6008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6008   rm -rf conftest*
6009   eval "ac_cv_lib_$ac_lib_var=yes"
6010 else
6011   echo "configure: failed program was:" >&5
6012   cat conftest.$ac_ext >&5
6013   rm -rf conftest*
6014   eval "ac_cv_lib_$ac_lib_var=no"
6015 fi
6016 rm -f conftest*
6017 LIBS="$ac_save_LIBS"
6018
6019 fi
6020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6021   echo "$ac_t""yes" 1>&6
6022   have_k425=yes
6023                                 KRB4_LIBS="-lkrb4"
6024 else
6025   echo "$ac_t""no" 1>&6
6026 have_k425=no
6027 fi
6028
6029
6030                 else
6031                         have_425=no
6032                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6033                 fi
6034
6035                 if test $have_k425 = yes ; then
6036                         ol_with_kerberos=found
6037                         ol_link_krb4=yes
6038
6039                         cat >> confdefs.h <<\EOF
6040 #define HAVE_KRB425 1
6041 EOF
6042
6043                         cat >> confdefs.h <<\EOF
6044 #define HAVE_KRB4 1
6045 EOF
6046
6047
6048                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6049 echo "configure:6050: checking for des_debug in Kerberos libraries" >&5
6050 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6051   echo $ac_n "(cached) $ac_c" 1>&6
6052 else
6053   
6054                                                                 save_LIBS="$LIBS"
6055                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6056                                 cat > conftest.$ac_ext <<EOF
6057 #line 6058 "configure"
6058 #include "confdefs.h"
6059
6060 #include <kerberosIV/krb.h>
6061 #include <kerberosIV/des.h>
6062 extern int des_debug;
6063
6064 int main() {
6065
6066 des_debug = 1;
6067
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071   rm -rf conftest*
6072   ol_cv_var_des_debug=yes
6073 else
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076   rm -rf conftest*
6077   ol_cv_var_des_debug=no
6078 fi
6079 rm -f conftest*
6080                                                                 LIBS="$save_LIBS"
6081                         
6082 fi
6083
6084 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6085
6086                         if test $ol_cv_var_des_debug = yes ; then
6087                                 cat >> confdefs.h <<\EOF
6088 #define HAVE_DES_DEBUG 1
6089 EOF
6090
6091                         fi
6092
6093                         LIBS="$save_LIBS"
6094                 fi
6095         fi
6096 fi
6097
6098 if test $ol_link_krb5 = yes ; then
6099         ol_with_kerberos=found
6100 fi
6101
6102 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6103         -o $ol_with_kerberos = kth ; then
6104
6105         for ac_hdr in krb.h des.h krb-archaeology.h 
6106 do
6107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6109 echo "configure:6110: checking for $ac_hdr" >&5
6110 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6111   echo $ac_n "(cached) $ac_c" 1>&6
6112 else
6113   cat > conftest.$ac_ext <<EOF
6114 #line 6115 "configure"
6115 #include "confdefs.h"
6116 #include <$ac_hdr>
6117 EOF
6118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6119 { (eval echo configure:6120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6121 if test -z "$ac_err"; then
6122   rm -rf conftest*
6123   eval "ac_cv_header_$ac_safe=yes"
6124 else
6125   echo "$ac_err" >&5
6126   echo "configure: failed program was:" >&5
6127   cat conftest.$ac_ext >&5
6128   rm -rf conftest*
6129   eval "ac_cv_header_$ac_safe=no"
6130 fi
6131 rm -f conftest*
6132 fi
6133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6134   echo "$ac_t""yes" 1>&6
6135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6136   cat >> confdefs.h <<EOF
6137 #define $ac_tr_hdr 1
6138 EOF
6139  
6140 else
6141   echo "$ac_t""no" 1>&6
6142 fi
6143 done
6144
6145
6146         if test $ac_cv_header_krb_h = yes ; then
6147                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6148 echo "configure:6149: checking for main in -lkrb" >&5
6149 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6151   echo $ac_n "(cached) $ac_c" 1>&6
6152 else
6153   ac_save_LIBS="$LIBS"
6154 LIBS="-lkrb -ldes $LIBS"
6155 cat > conftest.$ac_ext <<EOF
6156 #line 6157 "configure"
6157 #include "confdefs.h"
6158
6159 int main() {
6160 main()
6161 ; return 0; }
6162 EOF
6163 if { (eval echo configure:6164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6164   rm -rf conftest*
6165   eval "ac_cv_lib_$ac_lib_var=yes"
6166 else
6167   echo "configure: failed program was:" >&5
6168   cat conftest.$ac_ext >&5
6169   rm -rf conftest*
6170   eval "ac_cv_lib_$ac_lib_var=no"
6171 fi
6172 rm -f conftest*
6173 LIBS="$ac_save_LIBS"
6174
6175 fi
6176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6177   echo "$ac_t""yes" 1>&6
6178   have_k4=yes
6179 else
6180   echo "$ac_t""no" 1>&6
6181 have_k4=no
6182 fi
6183
6184
6185                 if test $have_k4 = yes ; then
6186                         ol_with_kerberos=found
6187                         ol_link_krb4=yes
6188
6189                         cat >> confdefs.h <<\EOF
6190 #define HAVE_KRB4 1
6191 EOF
6192
6193
6194                         KRB4_LIBS="-lkrb -ldes"
6195
6196                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6197                                 cat >> confdefs.h <<\EOF
6198 #define HAVE_KTH_KERBEROS 1
6199 EOF
6200
6201                         fi
6202                 fi
6203         fi
6204 fi
6205
6206 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6207         ol_link_kpasswd=yes;
6208 fi
6209
6210 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6211         cat >> confdefs.h <<\EOF
6212 #define HAVE_KERBEROS 1
6213 EOF
6214
6215
6216 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6217         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6218 fi
6219
6220 ol_link_tls=no
6221 if test $ol_with_tls != no ; then
6222         
6223         for ac_hdr in openssl/ssl.h ssl.h
6224 do
6225 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6226 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6227 echo "configure:6228: checking for $ac_hdr" >&5
6228 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6229   echo $ac_n "(cached) $ac_c" 1>&6
6230 else
6231   cat > conftest.$ac_ext <<EOF
6232 #line 6233 "configure"
6233 #include "confdefs.h"
6234 #include <$ac_hdr>
6235 EOF
6236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6237 { (eval echo configure:6238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6239 if test -z "$ac_err"; then
6240   rm -rf conftest*
6241   eval "ac_cv_header_$ac_safe=yes"
6242 else
6243   echo "$ac_err" >&5
6244   echo "configure: failed program was:" >&5
6245   cat conftest.$ac_ext >&5
6246   rm -rf conftest*
6247   eval "ac_cv_header_$ac_safe=no"
6248 fi
6249 rm -f conftest*
6250 fi
6251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6252   echo "$ac_t""yes" 1>&6
6253     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6254   cat >> confdefs.h <<EOF
6255 #define $ac_tr_hdr 1
6256 EOF
6257  
6258 else
6259   echo "$ac_t""no" 1>&6
6260 fi
6261 done
6262
6263         
6264         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6265                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6266 echo "configure:6267: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6267 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6268 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6269   echo $ac_n "(cached) $ac_c" 1>&6
6270 else
6271   ac_save_LIBS="$LIBS"
6272 LIBS="-lssl -lcrypto $LIBS"
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* Override any gcc2 internal prototype to avoid an error.  */
6277 /* We use char because int might match the return type of a gcc2
6278     builtin and then its argument prototype would still apply.  */
6279 char SSLeay_add_ssl_algorithms();
6280
6281 int main() {
6282 SSLeay_add_ssl_algorithms()
6283 ; return 0; }
6284 EOF
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286   rm -rf conftest*
6287   eval "ac_cv_lib_$ac_lib_var=yes"
6288 else
6289   echo "configure: failed program was:" >&5
6290   cat conftest.$ac_ext >&5
6291   rm -rf conftest*
6292   eval "ac_cv_lib_$ac_lib_var=no"
6293 fi
6294 rm -f conftest*
6295 LIBS="$ac_save_LIBS"
6296
6297 fi
6298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6299   echo "$ac_t""yes" 1>&6
6300   have_ssleay=yes
6301                         need_rsaref=no
6302 else
6303   echo "$ac_t""no" 1>&6
6304 have_ssleay=no
6305 fi
6306
6307                         
6308                 if test $have_ssleay = no ; then
6309                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6310 echo "configure:6311: checking for SSL_library_init in -lssl" >&5
6311 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6313   echo $ac_n "(cached) $ac_c" 1>&6
6314 else
6315   ac_save_LIBS="$LIBS"
6316 LIBS="-lssl -lcrypto $LIBS"
6317 cat > conftest.$ac_ext <<EOF
6318 #line 6319 "configure"
6319 #include "confdefs.h"
6320 /* Override any gcc2 internal prototype to avoid an error.  */
6321 /* We use char because int might match the return type of a gcc2
6322     builtin and then its argument prototype would still apply.  */
6323 char SSL_library_init();
6324
6325 int main() {
6326 SSL_library_init()
6327 ; return 0; }
6328 EOF
6329 if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6330   rm -rf conftest*
6331   eval "ac_cv_lib_$ac_lib_var=yes"
6332 else
6333   echo "configure: failed program was:" >&5
6334   cat conftest.$ac_ext >&5
6335   rm -rf conftest*
6336   eval "ac_cv_lib_$ac_lib_var=no"
6337 fi
6338 rm -f conftest*
6339 LIBS="$ac_save_LIBS"
6340
6341 fi
6342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6343   echo "$ac_t""yes" 1>&6
6344   have_ssleay=yes
6345                                 need_rsaref=no
6346 else
6347   echo "$ac_t""no" 1>&6
6348 have_ssleay=no
6349 fi
6350
6351                 fi
6352
6353                 if test $have_ssleay = no ; then
6354                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6355 echo "configure:6356: checking for ssl3_accept in -lssl" >&5
6356 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6357 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   ac_save_LIBS="$LIBS"
6361 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6362 cat > conftest.$ac_ext <<EOF
6363 #line 6364 "configure"
6364 #include "confdefs.h"
6365 /* Override any gcc2 internal prototype to avoid an error.  */
6366 /* We use char because int might match the return type of a gcc2
6367     builtin and then its argument prototype would still apply.  */
6368 char ssl3_accept();
6369
6370 int main() {
6371 ssl3_accept()
6372 ; return 0; }
6373 EOF
6374 if { (eval echo configure:6375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6375   rm -rf conftest*
6376   eval "ac_cv_lib_$ac_lib_var=yes"
6377 else
6378   echo "configure: failed program was:" >&5
6379   cat conftest.$ac_ext >&5
6380   rm -rf conftest*
6381   eval "ac_cv_lib_$ac_lib_var=no"
6382 fi
6383 rm -f conftest*
6384 LIBS="$ac_save_LIBS"
6385
6386 fi
6387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6388   echo "$ac_t""yes" 1>&6
6389   have_ssleay=yes
6390                                 need_rsaref=yes
6391 else
6392   echo "$ac_t""no" 1>&6
6393 have_ssleay=no
6394 fi
6395
6396                 fi
6397
6398                 if test $have_ssleay = yes ; then
6399                         ol_with_tls=found
6400                         ol_link_tls=yes
6401
6402                         cat >> confdefs.h <<\EOF
6403 #define HAVE_SSLEAY 1
6404 EOF
6405
6406
6407                         if test $need_rsaref = yes; then
6408                                 cat >> confdefs.h <<\EOF
6409 #define HAVE_RSAREF 1
6410 EOF
6411
6412
6413                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6414                         else
6415                                 TLS_LIBS="-lssl -lcrypto"
6416                         fi
6417                 fi
6418         fi
6419 fi
6420
6421 if test $ol_link_tls = yes ; then
6422         cat >> confdefs.h <<\EOF
6423 #define HAVE_TLS 1
6424 EOF
6425
6426 fi      
6427
6428 for ac_func in \
6429         ctime_r                 \
6430         gethostbyname_r gethostbyaddr_r \
6431
6432 do
6433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6434 echo "configure:6435: checking for $ac_func" >&5
6435 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6436   echo $ac_n "(cached) $ac_c" 1>&6
6437 else
6438   cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6441 /* System header to define __stub macros and hopefully few prototypes,
6442     which can conflict with char $ac_func(); below.  */
6443 #include <assert.h>
6444 /* Override any gcc2 internal prototype to avoid an error.  */
6445 /* We use char because int might match the return type of a gcc2
6446     builtin and then its argument prototype would still apply.  */
6447 char $ac_func();
6448 char (*f)();
6449
6450 int main() {
6451
6452 /* The GNU C library defines this for functions which it implements
6453     to always fail with ENOSYS.  Some functions are actually named
6454     something starting with __ and the normal name is an alias.  */
6455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6456 choke me
6457 #else
6458 f = $ac_func;
6459 #endif
6460
6461 ; return 0; }
6462 EOF
6463 if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6464   rm -rf conftest*
6465   eval "ac_cv_func_$ac_func=yes"
6466 else
6467   echo "configure: failed program was:" >&5
6468   cat conftest.$ac_ext >&5
6469   rm -rf conftest*
6470   eval "ac_cv_func_$ac_func=no"
6471 fi
6472 rm -f conftest*
6473 fi
6474
6475 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6476   echo "$ac_t""yes" 1>&6
6477     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6478   cat >> confdefs.h <<EOF
6479 #define $ac_tr_func 1
6480 EOF
6481  
6482 else
6483   echo "$ac_t""no" 1>&6
6484 fi
6485 done
6486
6487
6488 if test "$ac_cv_func_ctime_r" = no ; then
6489         ol_cv_func_ctime_r_nargs=0
6490 else
6491         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6492 echo "configure:6493: checking number of arguments of ctime_r" >&5
6493 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6494   echo $ac_n "(cached) $ac_c" 1>&6
6495 else
6496   cat > conftest.$ac_ext <<EOF
6497 #line 6498 "configure"
6498 #include "confdefs.h"
6499 #include <time.h>
6500 int main() {
6501 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6502 ; return 0; }
6503 EOF
6504 if { (eval echo configure:6505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6505   rm -rf conftest*
6506   ol_cv_func_ctime_r_nargs3=yes
6507 else
6508   echo "configure: failed program was:" >&5
6509   cat conftest.$ac_ext >&5
6510   rm -rf conftest*
6511   ol_cv_func_ctime_r_nargs3=no
6512 fi
6513 rm -f conftest*
6514
6515         cat > conftest.$ac_ext <<EOF
6516 #line 6517 "configure"
6517 #include "confdefs.h"
6518 #include <time.h>
6519 int main() {
6520 time_t ti; char *buffer; ctime_r(&ti,buffer);
6521 ; return 0; }
6522 EOF
6523 if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6524   rm -rf conftest*
6525   ol_cv_func_ctime_r_nargs2=yes
6526 else
6527   echo "configure: failed program was:" >&5
6528   cat conftest.$ac_ext >&5
6529   rm -rf conftest*
6530   ol_cv_func_ctime_r_nargs2=no
6531 fi
6532 rm -f conftest*
6533
6534         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6535                 $ol_cv_func_ctime_r_nargs2 = no ; then
6536
6537                 ol_cv_func_ctime_r_nargs=3
6538
6539         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6540                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6541
6542                 ol_cv_func_ctime_r_nargs=2
6543
6544         else
6545                 ol_cv_func_ctime_r_nargs=0
6546         fi
6547   
6548 fi
6549
6550 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6551
6552   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6553         cat >> confdefs.h <<EOF
6554 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6555 EOF
6556
6557   fi
6558
6559 fi
6560
6561 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6562         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6563 echo "configure:6564: checking number of arguments of gethostbyname_r" >&5
6564 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6565   echo $ac_n "(cached) $ac_c" 1>&6
6566 else
6567   cat > conftest.$ac_ext <<EOF
6568 #line 6569 "configure"
6569 #include "confdefs.h"
6570 #include <sys/types.h>
6571 #include <sys/socket.h>
6572 #include <netinet/in.h>
6573 #include <netdb.h>
6574 #define BUFSIZE (sizeof(struct hostent)+10)
6575 int main() {
6576 struct hostent hent; char buffer[BUFSIZE];
6577                 int bufsize=BUFSIZE;int h_errno;
6578                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6579                         buffer, bufsize, &h_errno);
6580 ; return 0; }
6581 EOF
6582 if { (eval echo configure:6583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6583   rm -rf conftest*
6584   ol_cv_func_gethostbyname_r_nargs5=yes
6585 else
6586   echo "configure: failed program was:" >&5
6587   cat conftest.$ac_ext >&5
6588   rm -rf conftest*
6589   ol_cv_func_gethostbyname_r_nargs5=no
6590 fi
6591 rm -f conftest*
6592
6593         cat > conftest.$ac_ext <<EOF
6594 #line 6595 "configure"
6595 #include "confdefs.h"
6596 #include <sys/types.h>
6597 #include <sys/socket.h>
6598 #include <netinet/in.h>
6599 #include <netdb.h>
6600 #define BUFSIZE (sizeof(struct hostent)+10)
6601 int main() {
6602 struct hostent hent;struct hostent *rhent;
6603                 char buffer[BUFSIZE];
6604                 int bufsize=BUFSIZE;int h_errno;
6605                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6606                         &rhent, &h_errno);
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6610   rm -rf conftest*
6611   ol_cv_func_gethostbyname_r_nargs6=yes
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615   rm -rf conftest*
6616   ol_cv_func_gethostbyname_r_nargs6=no
6617 fi
6618 rm -f conftest*
6619
6620         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6621                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6622
6623                 ol_cv_func_gethostbyname_r_nargs=5
6624
6625         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6626                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6627
6628                 ol_cv_func_gethostbyname_r_nargs=6
6629
6630         else
6631                 ol_cv_func_gethostbyname_r_nargs=0
6632         fi
6633   
6634 fi
6635
6636 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6637   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6638         cat >> confdefs.h <<EOF
6639 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6640 EOF
6641
6642   fi
6643
6644 else
6645         ol_cv_func_gethostbyname_r_nargs=0
6646 fi
6647  
6648 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6649         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6650 echo "configure:6651: checking number of arguments of gethostbyaddr_r" >&5
6651 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6652   echo $ac_n "(cached) $ac_c" 1>&6
6653 else
6654   cat > conftest.$ac_ext <<EOF
6655 #line 6656 "configure"
6656 #include "confdefs.h"
6657 #include <sys/types.h>
6658 #include <sys/socket.h>
6659 #include <netinet/in.h>
6660 #include <netdb.h>
6661 #define BUFSIZE (sizeof(struct hostent)+10)
6662 int main() {
6663 struct hostent hent; char buffer[BUFSIZE]; 
6664             struct in_addr add;
6665             size_t alen=sizeof(struct in_addr);
6666             int bufsize=BUFSIZE;int h_errno;
6667                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6668                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6669 ; return 0; }
6670 EOF
6671 if { (eval echo configure:6672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6672   rm -rf conftest*
6673   ol_cv_func_gethostbyaddr_r_nargs7=yes
6674 else
6675   echo "configure: failed program was:" >&5
6676   cat conftest.$ac_ext >&5
6677   rm -rf conftest*
6678   ol_cv_func_gethostbyaddr_r_nargs7=no
6679 fi
6680 rm -f conftest*
6681
6682         cat > conftest.$ac_ext <<EOF
6683 #line 6684 "configure"
6684 #include "confdefs.h"
6685 #include <sys/types.h>
6686 #include <sys/socket.h>
6687 #include <netinet/in.h>
6688 #include <netdb.h>
6689 #define BUFSIZE (sizeof(struct hostent)+10)
6690 int main() {
6691 struct hostent hent;
6692                 struct hostent *rhent; char buffer[BUFSIZE]; 
6693                 struct in_addr add;
6694                 size_t alen=sizeof(struct in_addr);
6695                 int bufsize=BUFSIZE;int h_errno;
6696                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6697                         alen, AF_INET, &hent, buffer, bufsize, 
6698                         &rhent, &h_errno);
6699 ; return 0; }
6700 EOF
6701 if { (eval echo configure:6702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6702   rm -rf conftest*
6703   ol_cv_func_gethostbyaddr_r_nargs8=yes
6704 else
6705   echo "configure: failed program was:" >&5
6706   cat conftest.$ac_ext >&5
6707   rm -rf conftest*
6708   ol_cv_func_gethostbyaddr_r_nargs8=no
6709 fi
6710 rm -f conftest*
6711
6712         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6713                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6714
6715                 ol_cv_func_gethostbyaddr_r_nargs=7
6716
6717         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6718                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6719
6720                 ol_cv_func_gethostbyaddr_r_nargs=8
6721
6722         else
6723                 ol_cv_func_gethostbyaddr_r_nargs=0
6724         fi
6725   
6726 fi
6727
6728 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6729   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6730     cat >> confdefs.h <<EOF
6731 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6732 EOF
6733
6734   fi
6735
6736 else
6737         ol_cv_func_gethostbyaddr_r_nargs=0
6738 fi
6739
6740 if test "$ac_cv_func_ctime_r" = yes \
6741         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6742         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6743         -a "$ac_cv_func_gethostbyname_r" = yes \
6744         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6745         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6746         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6747         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6748         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6749         ; then
6750  
6751         cat >> confdefs.h <<\EOF
6752 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6753 EOF
6754
6755 fi
6756
6757 ol_link_threads=no
6758
6759 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6760         -o $ol_with_threads = nt ; then
6761
6762         
6763         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6764 echo "configure:6765: checking for NT Threads" >&5
6765 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6766   echo $ac_n "(cached) $ac_c" 1>&6
6767 else
6768   
6769                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6770 echo "configure:6771: checking for _beginthread" >&5
6771 if eval "test \"\${ac_cv_func__beginthread+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 /* System header to define __stub macros and hopefully few prototypes,
6778     which can conflict with char _beginthread(); below.  */
6779 #include <assert.h>
6780 /* Override any gcc2 internal prototype to avoid an error.  */
6781 /* We use char because int might match the return type of a gcc2
6782     builtin and then its argument prototype would still apply.  */
6783 char _beginthread();
6784 char (*f)();
6785
6786 int main() {
6787
6788 /* The GNU C library defines this for functions which it implements
6789     to always fail with ENOSYS.  Some functions are actually named
6790     something starting with __ and the normal name is an alias.  */
6791 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6792 choke me
6793 #else
6794 f = _beginthread;
6795 #endif
6796
6797 ; return 0; }
6798 EOF
6799 if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6800   rm -rf conftest*
6801   eval "ac_cv_func__beginthread=yes"
6802 else
6803   echo "configure: failed program was:" >&5
6804   cat conftest.$ac_ext >&5
6805   rm -rf conftest*
6806   eval "ac_cv_func__beginthread=no"
6807 fi
6808 rm -f conftest*
6809 fi
6810
6811 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6812   echo "$ac_t""yes" 1>&6
6813   ol_cv_nt_threads=yes
6814 else
6815   echo "$ac_t""no" 1>&6
6816 ol_cv_nt_threads=no
6817 fi
6818
6819         
6820 fi
6821
6822 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6823
6824         if test $ol_cv_nt_threads = yes ; then
6825                 cat >> confdefs.h <<\EOF
6826 #define HAVE_NT_THREADS 1
6827 EOF
6828
6829         fi
6830
6831
6832         if test "$ol_cv_nt_threads" = yes ; then
6833         ol_link_threads=nt
6834         ol_with_threads=found
6835         ol_with_yielding_select=yes
6836
6837                 cat >> confdefs.h <<\EOF
6838 #define HAVE_NT_SERVICE_MANAGER 1
6839 EOF
6840
6841                 cat >> confdefs.h <<\EOF
6842 #define HAVE_NT_EVENT_LOG 1
6843 EOF
6844
6845         fi
6846
6847         if test $ol_with_threads = nt ; then
6848                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6849         fi
6850 fi
6851
6852 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6853         -o $ol_with_threads = posix ; then
6854
6855         for ac_hdr in pthread.h
6856 do
6857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6859 echo "configure:6860: checking for $ac_hdr" >&5
6860 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6861   echo $ac_n "(cached) $ac_c" 1>&6
6862 else
6863   cat > conftest.$ac_ext <<EOF
6864 #line 6865 "configure"
6865 #include "confdefs.h"
6866 #include <$ac_hdr>
6867 EOF
6868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6869 { (eval echo configure:6870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6871 if test -z "$ac_err"; then
6872   rm -rf conftest*
6873   eval "ac_cv_header_$ac_safe=yes"
6874 else
6875   echo "$ac_err" >&5
6876   echo "configure: failed program was:" >&5
6877   cat conftest.$ac_ext >&5
6878   rm -rf conftest*
6879   eval "ac_cv_header_$ac_safe=no"
6880 fi
6881 rm -f conftest*
6882 fi
6883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6884   echo "$ac_t""yes" 1>&6
6885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6886   cat >> confdefs.h <<EOF
6887 #define $ac_tr_hdr 1
6888 EOF
6889  
6890 else
6891   echo "$ac_t""no" 1>&6
6892 fi
6893 done
6894
6895
6896         if test $ac_cv_header_pthread_h = yes ; then
6897                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6898 echo "configure:6899: checking POSIX thread version" >&5
6899 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6900   echo $ac_n "(cached) $ac_c" 1>&6
6901 else
6902   
6903         cat > conftest.$ac_ext <<EOF
6904 #line 6905 "configure"
6905 #include "confdefs.h"
6906
6907 #               include <pthread.h>
6908                 /* this check could be improved */
6909 #               ifdef PTHREAD_ONCE_INIT
6910                         pthread_version_final;
6911 #               endif
6912         
6913 EOF
6914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6915   egrep "pthread_version_final" >/dev/null 2>&1; then
6916   rm -rf conftest*
6917   ol_pthread_final=yes
6918 else
6919   rm -rf conftest*
6920   ol_pthread_final=no
6921 fi
6922 rm -f conftest*
6923
6924
6925         cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928
6929 #               include <pthread.h>
6930                 /* this check could be improved */
6931 #               ifdef pthread_once_init
6932                         pthread_version_draft4;
6933 #               endif
6934         
6935 EOF
6936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6937   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6938   rm -rf conftest*
6939   ol_pthread_draft4=yes
6940 else
6941   rm -rf conftest*
6942   ol_pthread_draft4=no
6943 fi
6944 rm -f conftest*
6945
6946
6947         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6948                 ol_cv_pthread_version=final
6949         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6950                 ol_cv_pthread_version=draft4
6951         else
6952                 ol_cv_pthread_version=unknown
6953         fi
6954
6955 fi
6956
6957 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6958
6959
6960                 if test $ol_cv_pthread_version = final ; then
6961                         cat >> confdefs.h <<\EOF
6962 #define HAVE_PTHREADS_FINAL 1
6963 EOF
6964
6965                 elif test $ol_cv_pthread_version = draft4 ; then
6966                         cat >> confdefs.h <<\EOF
6967 #define HAVE_PTHREADS_D4 1
6968 EOF
6969
6970                 else
6971                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6972                 fi
6973
6974                 # consider threads found
6975                 ol_with_threads=found
6976
6977                 
6978         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6979 echo "configure:6980: checking for LinuxThreads pthread.h" >&5
6980 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6981   echo $ac_n "(cached) $ac_c" 1>&6
6982 else
6983   cat > conftest.$ac_ext <<EOF
6984 #line 6985 "configure"
6985 #include "confdefs.h"
6986 #include <pthread.h>
6987 EOF
6988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6989   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6990   rm -rf conftest*
6991   ol_cv_header_linux_threads=yes
6992 else
6993   rm -rf conftest*
6994   ol_cv_header_linux_threads=no
6995 fi
6996 rm -f conftest*
6997
6998                 
6999 fi
7000
7001 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7002         if test $ol_cv_header_linux_threads = yes; then
7003                 cat >> confdefs.h <<\EOF
7004 #define HAVE_LINUX_THREADS 1
7005 EOF
7006
7007         fi
7008
7009                 
7010         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7011 echo "configure:7012: checking for GNU Pth pthread.h" >&5
7012 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7013   echo $ac_n "(cached) $ac_c" 1>&6
7014 else
7015   cat > conftest.$ac_ext <<EOF
7016 #line 7017 "configure"
7017 #include "confdefs.h"
7018 #include <pthread.h>
7019 #ifdef _POSIX_THREAD_IS_GNU_PTH
7020         __gnu_pth__;
7021 #endif
7022
7023 EOF
7024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7025   egrep "__gnu_pth__" >/dev/null 2>&1; then
7026   rm -rf conftest*
7027   ol_cv_header_gnu_pth_pthread_h=yes
7028 else
7029   rm -rf conftest*
7030   ol_cv_header_gnu_pth_pthread_h=no
7031 fi
7032 rm -f conftest*
7033
7034                 
7035 fi
7036
7037 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7038
7039
7040                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7041                         for ac_hdr in sched.h
7042 do
7043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7045 echo "configure:7046: checking for $ac_hdr" >&5
7046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7047   echo $ac_n "(cached) $ac_c" 1>&6
7048 else
7049   cat > conftest.$ac_ext <<EOF
7050 #line 7051 "configure"
7051 #include "confdefs.h"
7052 #include <$ac_hdr>
7053 EOF
7054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7055 { (eval echo configure:7056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7057 if test -z "$ac_err"; then
7058   rm -rf conftest*
7059   eval "ac_cv_header_$ac_safe=yes"
7060 else
7061   echo "$ac_err" >&5
7062   echo "configure: failed program was:" >&5
7063   cat conftest.$ac_ext >&5
7064   rm -rf conftest*
7065   eval "ac_cv_header_$ac_safe=no"
7066 fi
7067 rm -f conftest*
7068 fi
7069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7070   echo "$ac_t""yes" 1>&6
7071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7072   cat >> confdefs.h <<EOF
7073 #define $ac_tr_hdr 1
7074 EOF
7075  
7076 else
7077   echo "$ac_t""no" 1>&6
7078 fi
7079 done
7080
7081                 fi
7082
7083                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7084                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7085 echo "configure:7086: checking for pthread_create in default libraries" >&5
7086 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7087   echo $ac_n "(cached) $ac_c" 1>&6
7088 else
7089   
7090                 if test "$cross_compiling" = yes; then
7091   cat > conftest.$ac_ext <<EOF
7092 #line 7093 "configure"
7093 #include "confdefs.h"
7094 /* pthread test headers */
7095 #include <pthread.h>
7096 #ifndef NULL
7097 #define NULL (void*)0
7098 #endif
7099
7100 static void *task(p)
7101         void *p;
7102 {
7103         return (void *) (p == NULL);
7104 }
7105
7106 int main() {
7107
7108         /* pthread test function */
7109         pthread_t t;
7110         int status;
7111 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7112         /* This system (e.g. AIX) defaults detached; must override */
7113         pthread_attr_t attr;
7114
7115         status = pthread_attr_init(&attr);
7116         if( status ) exit( status );
7117
7118         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7119         if( status ) exit( status );
7120
7121 #define ATTR    &attr
7122 #else
7123 #if HAVE_PTHREADS_D4
7124 #define ATTR    pthread_attr_default
7125 #else
7126 #define ATTR    NULL
7127 #endif
7128 #endif
7129         /* make sure pthread_create() isn't just a stub */
7130         status = pthread_create(&t, ATTR, task, NULL);
7131         if( status ) exit( status );
7132
7133         /* make sure pthread_detach() isn't just a stub */
7134 #if HAVE_PTHREADS_D4
7135         status = pthread_detach( &t );
7136 #else
7137         status = pthread_detach( t );
7138 #endif
7139
7140 #ifdef HAVE_LINUX_THREADS
7141         pthread_kill_other_threads_np();
7142 #endif
7143
7144         exit( status );
7145
7146 ; return 0; }
7147 EOF
7148 if { (eval echo configure:7149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7149   rm -rf conftest*
7150   ol_cv_pthread_create=yes
7151 else
7152   echo "configure: failed program was:" >&5
7153   cat conftest.$ac_ext >&5
7154   rm -rf conftest*
7155   ol_cv_pthread_create=no
7156 fi
7157 rm -f conftest*
7158 else
7159   cat > conftest.$ac_ext <<EOF
7160 #line 7161 "configure"
7161 #include "confdefs.h"
7162 /* pthread test headers */
7163 #include <pthread.h>
7164 #ifndef NULL
7165 #define NULL (void*)0
7166 #endif
7167
7168 static void *task(p)
7169         void *p;
7170 {
7171         return (void *) (p == NULL);
7172 }
7173
7174
7175 int main(argc, argv)
7176         int argc;
7177         char **argv;
7178 {
7179
7180         /* pthread test function */
7181         pthread_t t;
7182         int status;
7183 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7184         /* This system (e.g. AIX) defaults detached; must override */
7185         pthread_attr_t attr;
7186
7187         status = pthread_attr_init(&attr);
7188         if( status ) exit( status );
7189
7190         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7191         if( status ) exit( status );
7192
7193 #define ATTR    &attr
7194 #else
7195 #if HAVE_PTHREADS_D4
7196 #define ATTR    pthread_attr_default
7197 #else
7198 #define ATTR    NULL
7199 #endif
7200 #endif
7201         /* make sure pthread_create() isn't just a stub */
7202         status = pthread_create(&t, ATTR, task, NULL);
7203         if( status ) exit( status );
7204
7205         /* make sure pthread_detach() isn't just a stub */
7206 #if HAVE_PTHREADS_D4
7207         status = pthread_detach( &t );
7208 #else
7209         status = pthread_detach( t );
7210 #endif
7211
7212 #ifdef HAVE_LINUX_THREADS
7213         pthread_kill_other_threads_np();
7214 #endif
7215
7216         exit( status );
7217
7218 }
7219
7220 EOF
7221 if { (eval echo configure:7222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7222 then
7223   ol_cv_pthread_create=yes
7224 else
7225   echo "configure: failed program was:" >&5
7226   cat conftest.$ac_ext >&5
7227   rm -fr conftest*
7228   ol_cv_pthread_create=no
7229 fi
7230 rm -fr conftest*
7231 fi
7232
7233 fi
7234
7235 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7236
7237                 if test $ol_cv_pthread_create != no ; then
7238                         ol_link_threads=posix
7239                         ol_link_pthreads=""
7240                 fi
7241                 
7242                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7243 if test "$ol_link_threads" = no ; then
7244         # try -kthread
7245         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7246 echo "configure:7247: checking for pthread link with -kthread" >&5
7247 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7248   echo $ac_n "(cached) $ac_c" 1>&6
7249 else
7250   
7251                 # save the flags
7252                 ol_LIBS="$LIBS"
7253                 LIBS="-kthread $LIBS"
7254
7255                 if test "$cross_compiling" = yes; then
7256   cat > conftest.$ac_ext <<EOF
7257 #line 7258 "configure"
7258 #include "confdefs.h"
7259 /* pthread test headers */
7260 #include <pthread.h>
7261 #ifndef NULL
7262 #define NULL (void*)0
7263 #endif
7264
7265 static void *task(p)
7266         void *p;
7267 {
7268         return (void *) (p == NULL);
7269 }
7270
7271 int main() {
7272
7273         /* pthread test function */
7274         pthread_t t;
7275         int status;
7276 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7277         /* This system (e.g. AIX) defaults detached; must override */
7278         pthread_attr_t attr;
7279
7280         status = pthread_attr_init(&attr);
7281         if( status ) exit( status );
7282
7283         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7284         if( status ) exit( status );
7285
7286 #define ATTR    &attr
7287 #else
7288 #if HAVE_PTHREADS_D4
7289 #define ATTR    pthread_attr_default
7290 #else
7291 #define ATTR    NULL
7292 #endif
7293 #endif
7294         /* make sure pthread_create() isn't just a stub */
7295         status = pthread_create(&t, ATTR, task, NULL);
7296         if( status ) exit( status );
7297
7298         /* make sure pthread_detach() isn't just a stub */
7299 #if HAVE_PTHREADS_D4
7300         status = pthread_detach( &t );
7301 #else
7302         status = pthread_detach( t );
7303 #endif
7304
7305 #ifdef HAVE_LINUX_THREADS
7306         pthread_kill_other_threads_np();
7307 #endif
7308
7309         exit( status );
7310
7311 ; return 0; }
7312 EOF
7313 if { (eval echo configure:7314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7314   rm -rf conftest*
7315   ol_cv_pthread_kthread=yes
7316 else
7317   echo "configure: failed program was:" >&5
7318   cat conftest.$ac_ext >&5
7319   rm -rf conftest*
7320   ol_cv_pthread_kthread=no
7321 fi
7322 rm -f conftest*
7323 else
7324   cat > conftest.$ac_ext <<EOF
7325 #line 7326 "configure"
7326 #include "confdefs.h"
7327 /* pthread test headers */
7328 #include <pthread.h>
7329 #ifndef NULL
7330 #define NULL (void*)0
7331 #endif
7332
7333 static void *task(p)
7334         void *p;
7335 {
7336         return (void *) (p == NULL);
7337 }
7338
7339
7340 int main(argc, argv)
7341         int argc;
7342         char **argv;
7343 {
7344
7345         /* pthread test function */
7346         pthread_t t;
7347         int status;
7348 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7349         /* This system (e.g. AIX) defaults detached; must override */
7350         pthread_attr_t attr;
7351
7352         status = pthread_attr_init(&attr);
7353         if( status ) exit( status );
7354
7355         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7356         if( status ) exit( status );
7357
7358 #define ATTR    &attr
7359 #else
7360 #if HAVE_PTHREADS_D4
7361 #define ATTR    pthread_attr_default
7362 #else
7363 #define ATTR    NULL
7364 #endif
7365 #endif
7366         /* make sure pthread_create() isn't just a stub */
7367         status = pthread_create(&t, ATTR, task, NULL);
7368         if( status ) exit( status );
7369
7370         /* make sure pthread_detach() isn't just a stub */
7371 #if HAVE_PTHREADS_D4
7372         status = pthread_detach( &t );
7373 #else
7374         status = pthread_detach( t );
7375 #endif
7376
7377 #ifdef HAVE_LINUX_THREADS
7378         pthread_kill_other_threads_np();
7379 #endif
7380
7381         exit( status );
7382
7383 }
7384
7385 EOF
7386 if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7387 then
7388   ol_cv_pthread_kthread=yes
7389 else
7390   echo "configure: failed program was:" >&5
7391   cat conftest.$ac_ext >&5
7392   rm -fr conftest*
7393   ol_cv_pthread_kthread=no
7394 fi
7395 rm -fr conftest*
7396 fi
7397
7398
7399                 # restore the LIBS
7400                 LIBS="$ol_LIBS"
7401         
7402 fi
7403
7404 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7405
7406         if test $ol_cv_pthread_kthread = yes ; then
7407                 ol_link_pthreads="-kthread"
7408                 ol_link_threads=posix
7409         fi
7410 fi
7411
7412                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7413 if test "$ol_link_threads" = no ; then
7414         # try -pthread
7415         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7416 echo "configure:7417: checking for pthread link with -pthread" >&5
7417 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7418   echo $ac_n "(cached) $ac_c" 1>&6
7419 else
7420   
7421                 # save the flags
7422                 ol_LIBS="$LIBS"
7423                 LIBS="-pthread $LIBS"
7424
7425                 if test "$cross_compiling" = yes; then
7426   cat > conftest.$ac_ext <<EOF
7427 #line 7428 "configure"
7428 #include "confdefs.h"
7429 /* pthread test headers */
7430 #include <pthread.h>
7431 #ifndef NULL
7432 #define NULL (void*)0
7433 #endif
7434
7435 static void *task(p)
7436         void *p;
7437 {
7438         return (void *) (p == NULL);
7439 }
7440
7441 int main() {
7442
7443         /* pthread test function */
7444         pthread_t t;
7445         int status;
7446 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7447         /* This system (e.g. AIX) defaults detached; must override */
7448         pthread_attr_t attr;
7449
7450         status = pthread_attr_init(&attr);
7451         if( status ) exit( status );
7452
7453         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7454         if( status ) exit( status );
7455
7456 #define ATTR    &attr
7457 #else
7458 #if HAVE_PTHREADS_D4
7459 #define ATTR    pthread_attr_default
7460 #else
7461 #define ATTR    NULL
7462 #endif
7463 #endif
7464         /* make sure pthread_create() isn't just a stub */
7465         status = pthread_create(&t, ATTR, task, NULL);
7466         if( status ) exit( status );
7467
7468         /* make sure pthread_detach() isn't just a stub */
7469 #if HAVE_PTHREADS_D4
7470         status = pthread_detach( &t );
7471 #else
7472         status = pthread_detach( t );
7473 #endif
7474
7475 #ifdef HAVE_LINUX_THREADS
7476         pthread_kill_other_threads_np();
7477 #endif
7478
7479         exit( status );
7480
7481 ; return 0; }
7482 EOF
7483 if { (eval echo configure:7484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7484   rm -rf conftest*
7485   ol_cv_pthread_pthread=yes
7486 else
7487   echo "configure: failed program was:" >&5
7488   cat conftest.$ac_ext >&5
7489   rm -rf conftest*
7490   ol_cv_pthread_pthread=no
7491 fi
7492 rm -f conftest*
7493 else
7494   cat > conftest.$ac_ext <<EOF
7495 #line 7496 "configure"
7496 #include "confdefs.h"
7497 /* pthread test headers */
7498 #include <pthread.h>
7499 #ifndef NULL
7500 #define NULL (void*)0
7501 #endif
7502
7503 static void *task(p)
7504         void *p;
7505 {
7506         return (void *) (p == NULL);
7507 }
7508
7509
7510 int main(argc, argv)
7511         int argc;
7512         char **argv;
7513 {
7514
7515         /* pthread test function */
7516         pthread_t t;
7517         int status;
7518 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7519         /* This system (e.g. AIX) defaults detached; must override */
7520         pthread_attr_t attr;
7521
7522         status = pthread_attr_init(&attr);
7523         if( status ) exit( status );
7524
7525         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7526         if( status ) exit( status );
7527
7528 #define ATTR    &attr
7529 #else
7530 #if HAVE_PTHREADS_D4
7531 #define ATTR    pthread_attr_default
7532 #else
7533 #define ATTR    NULL
7534 #endif
7535 #endif
7536         /* make sure pthread_create() isn't just a stub */
7537         status = pthread_create(&t, ATTR, task, NULL);
7538         if( status ) exit( status );
7539
7540         /* make sure pthread_detach() isn't just a stub */
7541 #if HAVE_PTHREADS_D4
7542         status = pthread_detach( &t );
7543 #else
7544         status = pthread_detach( t );
7545 #endif
7546
7547 #ifdef HAVE_LINUX_THREADS
7548         pthread_kill_other_threads_np();
7549 #endif
7550
7551         exit( status );
7552
7553 }
7554
7555 EOF
7556 if { (eval echo configure:7557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7557 then
7558   ol_cv_pthread_pthread=yes
7559 else
7560   echo "configure: failed program was:" >&5
7561   cat conftest.$ac_ext >&5
7562   rm -fr conftest*
7563   ol_cv_pthread_pthread=no
7564 fi
7565 rm -fr conftest*
7566 fi
7567
7568
7569                 # restore the LIBS
7570                 LIBS="$ol_LIBS"
7571         
7572 fi
7573
7574 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7575
7576         if test $ol_cv_pthread_pthread = yes ; then
7577                 ol_link_pthreads="-pthread"
7578                 ol_link_threads=posix
7579         fi
7580 fi
7581
7582                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7583 if test "$ol_link_threads" = no ; then
7584         # try -pthreads
7585         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7586 echo "configure:7587: checking for pthread link with -pthreads" >&5
7587 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7588   echo $ac_n "(cached) $ac_c" 1>&6
7589 else
7590   
7591                 # save the flags
7592                 ol_LIBS="$LIBS"
7593                 LIBS="-pthreads $LIBS"
7594
7595                 if test "$cross_compiling" = yes; then
7596   cat > conftest.$ac_ext <<EOF
7597 #line 7598 "configure"
7598 #include "confdefs.h"
7599 /* pthread test headers */
7600 #include <pthread.h>
7601 #ifndef NULL
7602 #define NULL (void*)0
7603 #endif
7604
7605 static void *task(p)
7606         void *p;
7607 {
7608         return (void *) (p == NULL);
7609 }
7610
7611 int main() {
7612
7613         /* pthread test function */
7614         pthread_t t;
7615         int status;
7616 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7617         /* This system (e.g. AIX) defaults detached; must override */
7618         pthread_attr_t attr;
7619
7620         status = pthread_attr_init(&attr);
7621         if( status ) exit( status );
7622
7623         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7624         if( status ) exit( status );
7625
7626 #define ATTR    &attr
7627 #else
7628 #if HAVE_PTHREADS_D4
7629 #define ATTR    pthread_attr_default
7630 #else
7631 #define ATTR    NULL
7632 #endif
7633 #endif
7634         /* make sure pthread_create() isn't just a stub */
7635         status = pthread_create(&t, ATTR, task, NULL);
7636         if( status ) exit( status );
7637
7638         /* make sure pthread_detach() isn't just a stub */
7639 #if HAVE_PTHREADS_D4
7640         status = pthread_detach( &t );
7641 #else
7642         status = pthread_detach( t );
7643 #endif
7644
7645 #ifdef HAVE_LINUX_THREADS
7646         pthread_kill_other_threads_np();
7647 #endif
7648
7649         exit( status );
7650
7651 ; return 0; }
7652 EOF
7653 if { (eval echo configure:7654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7654   rm -rf conftest*
7655   ol_cv_pthread_pthreads=yes
7656 else
7657   echo "configure: failed program was:" >&5
7658   cat conftest.$ac_ext >&5
7659   rm -rf conftest*
7660   ol_cv_pthread_pthreads=no
7661 fi
7662 rm -f conftest*
7663 else
7664   cat > conftest.$ac_ext <<EOF
7665 #line 7666 "configure"
7666 #include "confdefs.h"
7667 /* pthread test headers */
7668 #include <pthread.h>
7669 #ifndef NULL
7670 #define NULL (void*)0
7671 #endif
7672
7673 static void *task(p)
7674         void *p;
7675 {
7676         return (void *) (p == NULL);
7677 }
7678
7679
7680 int main(argc, argv)
7681         int argc;
7682         char **argv;
7683 {
7684
7685         /* pthread test function */
7686         pthread_t t;
7687         int status;
7688 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7689         /* This system (e.g. AIX) defaults detached; must override */
7690         pthread_attr_t attr;
7691
7692         status = pthread_attr_init(&attr);
7693         if( status ) exit( status );
7694
7695         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7696         if( status ) exit( status );
7697
7698 #define ATTR    &attr
7699 #else
7700 #if HAVE_PTHREADS_D4
7701 #define ATTR    pthread_attr_default
7702 #else
7703 #define ATTR    NULL
7704 #endif
7705 #endif
7706         /* make sure pthread_create() isn't just a stub */
7707         status = pthread_create(&t, ATTR, task, NULL);
7708         if( status ) exit( status );
7709
7710         /* make sure pthread_detach() isn't just a stub */
7711 #if HAVE_PTHREADS_D4
7712         status = pthread_detach( &t );
7713 #else
7714         status = pthread_detach( t );
7715 #endif
7716
7717 #ifdef HAVE_LINUX_THREADS
7718         pthread_kill_other_threads_np();
7719 #endif
7720
7721         exit( status );
7722
7723 }
7724
7725 EOF
7726 if { (eval echo configure:7727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7727 then
7728   ol_cv_pthread_pthreads=yes
7729 else
7730   echo "configure: failed program was:" >&5
7731   cat conftest.$ac_ext >&5
7732   rm -fr conftest*
7733   ol_cv_pthread_pthreads=no
7734 fi
7735 rm -fr conftest*
7736 fi
7737
7738
7739                 # restore the LIBS
7740                 LIBS="$ol_LIBS"
7741         
7742 fi
7743
7744 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7745
7746         if test $ol_cv_pthread_pthreads = yes ; then
7747                 ol_link_pthreads="-pthreads"
7748                 ol_link_threads=posix
7749         fi
7750 fi
7751
7752                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7753 if test "$ol_link_threads" = no ; then
7754         # try -mthreads
7755         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7756 echo "configure:7757: checking for pthread link with -mthreads" >&5
7757 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7758   echo $ac_n "(cached) $ac_c" 1>&6
7759 else
7760   
7761                 # save the flags
7762                 ol_LIBS="$LIBS"
7763                 LIBS="-mthreads $LIBS"
7764
7765                 if test "$cross_compiling" = yes; then
7766   cat > conftest.$ac_ext <<EOF
7767 #line 7768 "configure"
7768 #include "confdefs.h"
7769 /* pthread test headers */
7770 #include <pthread.h>
7771 #ifndef NULL
7772 #define NULL (void*)0
7773 #endif
7774
7775 static void *task(p)
7776         void *p;
7777 {
7778         return (void *) (p == NULL);
7779 }
7780
7781 int main() {
7782
7783         /* pthread test function */
7784         pthread_t t;
7785         int status;
7786 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7787         /* This system (e.g. AIX) defaults detached; must override */
7788         pthread_attr_t attr;
7789
7790         status = pthread_attr_init(&attr);
7791         if( status ) exit( status );
7792
7793         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7794         if( status ) exit( status );
7795
7796 #define ATTR    &attr
7797 #else
7798 #if HAVE_PTHREADS_D4
7799 #define ATTR    pthread_attr_default
7800 #else
7801 #define ATTR    NULL
7802 #endif
7803 #endif
7804         /* make sure pthread_create() isn't just a stub */
7805         status = pthread_create(&t, ATTR, task, NULL);
7806         if( status ) exit( status );
7807
7808         /* make sure pthread_detach() isn't just a stub */
7809 #if HAVE_PTHREADS_D4
7810         status = pthread_detach( &t );
7811 #else
7812         status = pthread_detach( t );
7813 #endif
7814
7815 #ifdef HAVE_LINUX_THREADS
7816         pthread_kill_other_threads_np();
7817 #endif
7818
7819         exit( status );
7820
7821 ; return 0; }
7822 EOF
7823 if { (eval echo configure:7824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7824   rm -rf conftest*
7825   ol_cv_pthread_mthreads=yes
7826 else
7827   echo "configure: failed program was:" >&5
7828   cat conftest.$ac_ext >&5
7829   rm -rf conftest*
7830   ol_cv_pthread_mthreads=no
7831 fi
7832 rm -f conftest*
7833 else
7834   cat > conftest.$ac_ext <<EOF
7835 #line 7836 "configure"
7836 #include "confdefs.h"
7837 /* pthread test headers */
7838 #include <pthread.h>
7839 #ifndef NULL
7840 #define NULL (void*)0
7841 #endif
7842
7843 static void *task(p)
7844         void *p;
7845 {
7846         return (void *) (p == NULL);
7847 }
7848
7849
7850 int main(argc, argv)
7851         int argc;
7852         char **argv;
7853 {
7854
7855         /* pthread test function */
7856         pthread_t t;
7857         int status;
7858 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7859         /* This system (e.g. AIX) defaults detached; must override */
7860         pthread_attr_t attr;
7861
7862         status = pthread_attr_init(&attr);
7863         if( status ) exit( status );
7864
7865         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7866         if( status ) exit( status );
7867
7868 #define ATTR    &attr
7869 #else
7870 #if HAVE_PTHREADS_D4
7871 #define ATTR    pthread_attr_default
7872 #else
7873 #define ATTR    NULL
7874 #endif
7875 #endif
7876         /* make sure pthread_create() isn't just a stub */
7877         status = pthread_create(&t, ATTR, task, NULL);
7878         if( status ) exit( status );
7879
7880         /* make sure pthread_detach() isn't just a stub */
7881 #if HAVE_PTHREADS_D4
7882         status = pthread_detach( &t );
7883 #else
7884         status = pthread_detach( t );
7885 #endif
7886
7887 #ifdef HAVE_LINUX_THREADS
7888         pthread_kill_other_threads_np();
7889 #endif
7890
7891         exit( status );
7892
7893 }
7894
7895 EOF
7896 if { (eval echo configure:7897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7897 then
7898   ol_cv_pthread_mthreads=yes
7899 else
7900   echo "configure: failed program was:" >&5
7901   cat conftest.$ac_ext >&5
7902   rm -fr conftest*
7903   ol_cv_pthread_mthreads=no
7904 fi
7905 rm -fr conftest*
7906 fi
7907
7908
7909                 # restore the LIBS
7910                 LIBS="$ol_LIBS"
7911         
7912 fi
7913
7914 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7915
7916         if test $ol_cv_pthread_mthreads = yes ; then
7917                 ol_link_pthreads="-mthreads"
7918                 ol_link_threads=posix
7919         fi
7920 fi
7921
7922                 # Pthread try link: -thread (ol_cv_pthread_thread)
7923 if test "$ol_link_threads" = no ; then
7924         # try -thread
7925         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7926 echo "configure:7927: checking for pthread link with -thread" >&5
7927 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7928   echo $ac_n "(cached) $ac_c" 1>&6
7929 else
7930   
7931                 # save the flags
7932                 ol_LIBS="$LIBS"
7933                 LIBS="-thread $LIBS"
7934
7935                 if test "$cross_compiling" = yes; then
7936   cat > conftest.$ac_ext <<EOF
7937 #line 7938 "configure"
7938 #include "confdefs.h"
7939 /* pthread test headers */
7940 #include <pthread.h>
7941 #ifndef NULL
7942 #define NULL (void*)0
7943 #endif
7944
7945 static void *task(p)
7946         void *p;
7947 {
7948         return (void *) (p == NULL);
7949 }
7950
7951 int main() {
7952
7953         /* pthread test function */
7954         pthread_t t;
7955         int status;
7956 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7957         /* This system (e.g. AIX) defaults detached; must override */
7958         pthread_attr_t attr;
7959
7960         status = pthread_attr_init(&attr);
7961         if( status ) exit( status );
7962
7963         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7964         if( status ) exit( status );
7965
7966 #define ATTR    &attr
7967 #else
7968 #if HAVE_PTHREADS_D4
7969 #define ATTR    pthread_attr_default
7970 #else
7971 #define ATTR    NULL
7972 #endif
7973 #endif
7974         /* make sure pthread_create() isn't just a stub */
7975         status = pthread_create(&t, ATTR, task, NULL);
7976         if( status ) exit( status );
7977
7978         /* make sure pthread_detach() isn't just a stub */
7979 #if HAVE_PTHREADS_D4
7980         status = pthread_detach( &t );
7981 #else
7982         status = pthread_detach( t );
7983 #endif
7984
7985 #ifdef HAVE_LINUX_THREADS
7986         pthread_kill_other_threads_np();
7987 #endif
7988
7989         exit( status );
7990
7991 ; return 0; }
7992 EOF
7993 if { (eval echo configure:7994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7994   rm -rf conftest*
7995   ol_cv_pthread_thread=yes
7996 else
7997   echo "configure: failed program was:" >&5
7998   cat conftest.$ac_ext >&5
7999   rm -rf conftest*
8000   ol_cv_pthread_thread=no
8001 fi
8002 rm -f conftest*
8003 else
8004   cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007 /* pthread test headers */
8008 #include <pthread.h>
8009 #ifndef NULL
8010 #define NULL (void*)0
8011 #endif
8012
8013 static void *task(p)
8014         void *p;
8015 {
8016         return (void *) (p == NULL);
8017 }
8018
8019
8020 int main(argc, argv)
8021         int argc;
8022         char **argv;
8023 {
8024
8025         /* pthread test function */
8026         pthread_t t;
8027         int status;
8028 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8029         /* This system (e.g. AIX) defaults detached; must override */
8030         pthread_attr_t attr;
8031
8032         status = pthread_attr_init(&attr);
8033         if( status ) exit( status );
8034
8035         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8036         if( status ) exit( status );
8037
8038 #define ATTR    &attr
8039 #else
8040 #if HAVE_PTHREADS_D4
8041 #define ATTR    pthread_attr_default
8042 #else
8043 #define ATTR    NULL
8044 #endif
8045 #endif
8046         /* make sure pthread_create() isn't just a stub */
8047         status = pthread_create(&t, ATTR, task, NULL);
8048         if( status ) exit( status );
8049
8050         /* make sure pthread_detach() isn't just a stub */
8051 #if HAVE_PTHREADS_D4
8052         status = pthread_detach( &t );
8053 #else
8054         status = pthread_detach( t );
8055 #endif
8056
8057 #ifdef HAVE_LINUX_THREADS
8058         pthread_kill_other_threads_np();
8059 #endif
8060
8061         exit( status );
8062
8063 }
8064
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8067 then
8068   ol_cv_pthread_thread=yes
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -fr conftest*
8073   ol_cv_pthread_thread=no
8074 fi
8075 rm -fr conftest*
8076 fi
8077
8078
8079                 # restore the LIBS
8080                 LIBS="$ol_LIBS"
8081         
8082 fi
8083
8084 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8085
8086         if test $ol_cv_pthread_thread = yes ; then
8087                 ol_link_pthreads="-thread"
8088                 ol_link_threads=posix
8089         fi
8090 fi
8091
8092
8093                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8094 if test "$ol_link_threads" = no ; then
8095         # try -lpthread -lmach -lexc -lc_r
8096         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8097 echo "configure:8098: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8098 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8099   echo $ac_n "(cached) $ac_c" 1>&6
8100 else
8101   
8102                 # save the flags
8103                 ol_LIBS="$LIBS"
8104                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8105
8106                 if test "$cross_compiling" = yes; then
8107   cat > conftest.$ac_ext <<EOF
8108 #line 8109 "configure"
8109 #include "confdefs.h"
8110 /* pthread test headers */
8111 #include <pthread.h>
8112 #ifndef NULL
8113 #define NULL (void*)0
8114 #endif
8115
8116 static void *task(p)
8117         void *p;
8118 {
8119         return (void *) (p == NULL);
8120 }
8121
8122 int main() {
8123
8124         /* pthread test function */
8125         pthread_t t;
8126         int status;
8127 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8128         /* This system (e.g. AIX) defaults detached; must override */
8129         pthread_attr_t attr;
8130
8131         status = pthread_attr_init(&attr);
8132         if( status ) exit( status );
8133
8134         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8135         if( status ) exit( status );
8136
8137 #define ATTR    &attr
8138 #else
8139 #if HAVE_PTHREADS_D4
8140 #define ATTR    pthread_attr_default
8141 #else
8142 #define ATTR    NULL
8143 #endif
8144 #endif
8145         /* make sure pthread_create() isn't just a stub */
8146         status = pthread_create(&t, ATTR, task, NULL);
8147         if( status ) exit( status );
8148
8149         /* make sure pthread_detach() isn't just a stub */
8150 #if HAVE_PTHREADS_D4
8151         status = pthread_detach( &t );
8152 #else
8153         status = pthread_detach( t );
8154 #endif
8155
8156 #ifdef HAVE_LINUX_THREADS
8157         pthread_kill_other_threads_np();
8158 #endif
8159
8160         exit( status );
8161
8162 ; return 0; }
8163 EOF
8164 if { (eval echo configure:8165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8165   rm -rf conftest*
8166   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8167 else
8168   echo "configure: failed program was:" >&5
8169   cat conftest.$ac_ext >&5
8170   rm -rf conftest*
8171   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8172 fi
8173 rm -f conftest*
8174 else
8175   cat > conftest.$ac_ext <<EOF
8176 #line 8177 "configure"
8177 #include "confdefs.h"
8178 /* pthread test headers */
8179 #include <pthread.h>
8180 #ifndef NULL
8181 #define NULL (void*)0
8182 #endif
8183
8184 static void *task(p)
8185         void *p;
8186 {
8187         return (void *) (p == NULL);
8188 }
8189
8190
8191 int main(argc, argv)
8192         int argc;
8193         char **argv;
8194 {
8195
8196         /* pthread test function */
8197         pthread_t t;
8198         int status;
8199 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8200         /* This system (e.g. AIX) defaults detached; must override */
8201         pthread_attr_t attr;
8202
8203         status = pthread_attr_init(&attr);
8204         if( status ) exit( status );
8205
8206         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8207         if( status ) exit( status );
8208
8209 #define ATTR    &attr
8210 #else
8211 #if HAVE_PTHREADS_D4
8212 #define ATTR    pthread_attr_default
8213 #else
8214 #define ATTR    NULL
8215 #endif
8216 #endif
8217         /* make sure pthread_create() isn't just a stub */
8218         status = pthread_create(&t, ATTR, task, NULL);
8219         if( status ) exit( status );
8220
8221         /* make sure pthread_detach() isn't just a stub */
8222 #if HAVE_PTHREADS_D4
8223         status = pthread_detach( &t );
8224 #else
8225         status = pthread_detach( t );
8226 #endif
8227
8228 #ifdef HAVE_LINUX_THREADS
8229         pthread_kill_other_threads_np();
8230 #endif
8231
8232         exit( status );
8233
8234 }
8235
8236 EOF
8237 if { (eval echo configure:8238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8238 then
8239   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8240 else
8241   echo "configure: failed program was:" >&5
8242   cat conftest.$ac_ext >&5
8243   rm -fr conftest*
8244   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8245 fi
8246 rm -fr conftest*
8247 fi
8248
8249
8250                 # restore the LIBS
8251                 LIBS="$ol_LIBS"
8252         
8253 fi
8254
8255 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8256
8257         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8258                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8259                 ol_link_threads=posix
8260         fi
8261 fi
8262
8263                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8264 if test "$ol_link_threads" = no ; then
8265         # try -lpthread -lmach -lexc
8266         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8267 echo "configure:8268: checking for pthread link with -lpthread -lmach -lexc" >&5
8268 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8269   echo $ac_n "(cached) $ac_c" 1>&6
8270 else
8271   
8272                 # save the flags
8273                 ol_LIBS="$LIBS"
8274                 LIBS="-lpthread -lmach -lexc $LIBS"
8275
8276                 if test "$cross_compiling" = yes; then
8277   cat > conftest.$ac_ext <<EOF
8278 #line 8279 "configure"
8279 #include "confdefs.h"
8280 /* pthread test headers */
8281 #include <pthread.h>
8282 #ifndef NULL
8283 #define NULL (void*)0
8284 #endif
8285
8286 static void *task(p)
8287         void *p;
8288 {
8289         return (void *) (p == NULL);
8290 }
8291
8292 int main() {
8293
8294         /* pthread test function */
8295         pthread_t t;
8296         int status;
8297 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8298         /* This system (e.g. AIX) defaults detached; must override */
8299         pthread_attr_t attr;
8300
8301         status = pthread_attr_init(&attr);
8302         if( status ) exit( status );
8303
8304         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8305         if( status ) exit( status );
8306
8307 #define ATTR    &attr
8308 #else
8309 #if HAVE_PTHREADS_D4
8310 #define ATTR    pthread_attr_default
8311 #else
8312 #define ATTR    NULL
8313 #endif
8314 #endif
8315         /* make sure pthread_create() isn't just a stub */
8316         status = pthread_create(&t, ATTR, task, NULL);
8317         if( status ) exit( status );
8318
8319         /* make sure pthread_detach() isn't just a stub */
8320 #if HAVE_PTHREADS_D4
8321         status = pthread_detach( &t );
8322 #else
8323         status = pthread_detach( t );
8324 #endif
8325
8326 #ifdef HAVE_LINUX_THREADS
8327         pthread_kill_other_threads_np();
8328 #endif
8329
8330         exit( status );
8331
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   ol_cv_pthread_lpthread_lmach_lexc=yes
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   ol_cv_pthread_lpthread_lmach_lexc=no
8342 fi
8343 rm -f conftest*
8344 else
8345   cat > conftest.$ac_ext <<EOF
8346 #line 8347 "configure"
8347 #include "confdefs.h"
8348 /* pthread test headers */
8349 #include <pthread.h>
8350 #ifndef NULL
8351 #define NULL (void*)0
8352 #endif
8353
8354 static void *task(p)
8355         void *p;
8356 {
8357         return (void *) (p == NULL);
8358 }
8359
8360
8361 int main(argc, argv)
8362         int argc;
8363         char **argv;
8364 {
8365
8366         /* pthread test function */
8367         pthread_t t;
8368         int status;
8369 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8370         /* This system (e.g. AIX) defaults detached; must override */
8371         pthread_attr_t attr;
8372
8373         status = pthread_attr_init(&attr);
8374         if( status ) exit( status );
8375
8376         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8377         if( status ) exit( status );
8378
8379 #define ATTR    &attr
8380 #else
8381 #if HAVE_PTHREADS_D4
8382 #define ATTR    pthread_attr_default
8383 #else
8384 #define ATTR    NULL
8385 #endif
8386 #endif
8387         /* make sure pthread_create() isn't just a stub */
8388         status = pthread_create(&t, ATTR, task, NULL);
8389         if( status ) exit( status );
8390
8391         /* make sure pthread_detach() isn't just a stub */
8392 #if HAVE_PTHREADS_D4
8393         status = pthread_detach( &t );
8394 #else
8395         status = pthread_detach( t );
8396 #endif
8397
8398 #ifdef HAVE_LINUX_THREADS
8399         pthread_kill_other_threads_np();
8400 #endif
8401
8402         exit( status );
8403
8404 }
8405
8406 EOF
8407 if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8408 then
8409   ol_cv_pthread_lpthread_lmach_lexc=yes
8410 else
8411   echo "configure: failed program was:" >&5
8412   cat conftest.$ac_ext >&5
8413   rm -fr conftest*
8414   ol_cv_pthread_lpthread_lmach_lexc=no
8415 fi
8416 rm -fr conftest*
8417 fi
8418
8419
8420                 # restore the LIBS
8421                 LIBS="$ol_LIBS"
8422         
8423 fi
8424
8425 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8426
8427         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8428                 ol_link_pthreads="-lpthread -lmach -lexc"
8429                 ol_link_threads=posix
8430         fi
8431 fi
8432
8433
8434                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8435 if test "$ol_link_threads" = no ; then
8436         # try -lpthread -Wl,-woff,85
8437         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8438 echo "configure:8439: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8439 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8440   echo $ac_n "(cached) $ac_c" 1>&6
8441 else
8442   
8443                 # save the flags
8444                 ol_LIBS="$LIBS"
8445                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8446
8447                 if test "$cross_compiling" = yes; then
8448   cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 /* pthread test headers */
8452 #include <pthread.h>
8453 #ifndef NULL
8454 #define NULL (void*)0
8455 #endif
8456
8457 static void *task(p)
8458         void *p;
8459 {
8460         return (void *) (p == NULL);
8461 }
8462
8463 int main() {
8464
8465         /* pthread test function */
8466         pthread_t t;
8467         int status;
8468 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8469         /* This system (e.g. AIX) defaults detached; must override */
8470         pthread_attr_t attr;
8471
8472         status = pthread_attr_init(&attr);
8473         if( status ) exit( status );
8474
8475         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8476         if( status ) exit( status );
8477
8478 #define ATTR    &attr
8479 #else
8480 #if HAVE_PTHREADS_D4
8481 #define ATTR    pthread_attr_default
8482 #else
8483 #define ATTR    NULL
8484 #endif
8485 #endif
8486         /* make sure pthread_create() isn't just a stub */
8487         status = pthread_create(&t, ATTR, task, NULL);
8488         if( status ) exit( status );
8489
8490         /* make sure pthread_detach() isn't just a stub */
8491 #if HAVE_PTHREADS_D4
8492         status = pthread_detach( &t );
8493 #else
8494         status = pthread_detach( t );
8495 #endif
8496
8497 #ifdef HAVE_LINUX_THREADS
8498         pthread_kill_other_threads_np();
8499 #endif
8500
8501         exit( status );
8502
8503 ; return 0; }
8504 EOF
8505 if { (eval echo configure:8506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8506   rm -rf conftest*
8507   ol_cv_pthread_lib_lpthread_woff=yes
8508 else
8509   echo "configure: failed program was:" >&5
8510   cat conftest.$ac_ext >&5
8511   rm -rf conftest*
8512   ol_cv_pthread_lib_lpthread_woff=no
8513 fi
8514 rm -f conftest*
8515 else
8516   cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 /* pthread test headers */
8520 #include <pthread.h>
8521 #ifndef NULL
8522 #define NULL (void*)0
8523 #endif
8524
8525 static void *task(p)
8526         void *p;
8527 {
8528         return (void *) (p == NULL);
8529 }
8530
8531
8532 int main(argc, argv)
8533         int argc;
8534         char **argv;
8535 {
8536
8537         /* pthread test function */
8538         pthread_t t;
8539         int status;
8540 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8541         /* This system (e.g. AIX) defaults detached; must override */
8542         pthread_attr_t attr;
8543
8544         status = pthread_attr_init(&attr);
8545         if( status ) exit( status );
8546
8547         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8548         if( status ) exit( status );
8549
8550 #define ATTR    &attr
8551 #else
8552 #if HAVE_PTHREADS_D4
8553 #define ATTR    pthread_attr_default
8554 #else
8555 #define ATTR    NULL
8556 #endif
8557 #endif
8558         /* make sure pthread_create() isn't just a stub */
8559         status = pthread_create(&t, ATTR, task, NULL);
8560         if( status ) exit( status );
8561
8562         /* make sure pthread_detach() isn't just a stub */
8563 #if HAVE_PTHREADS_D4
8564         status = pthread_detach( &t );
8565 #else
8566         status = pthread_detach( t );
8567 #endif
8568
8569 #ifdef HAVE_LINUX_THREADS
8570         pthread_kill_other_threads_np();
8571 #endif
8572
8573         exit( status );
8574
8575 }
8576
8577 EOF
8578 if { (eval echo configure:8579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8579 then
8580   ol_cv_pthread_lib_lpthread_woff=yes
8581 else
8582   echo "configure: failed program was:" >&5
8583   cat conftest.$ac_ext >&5
8584   rm -fr conftest*
8585   ol_cv_pthread_lib_lpthread_woff=no
8586 fi
8587 rm -fr conftest*
8588 fi
8589
8590
8591                 # restore the LIBS
8592                 LIBS="$ol_LIBS"
8593         
8594 fi
8595
8596 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8597
8598         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8599                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8600                 ol_link_threads=posix
8601         fi
8602 fi
8603
8604
8605                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8606 if test "$ol_link_threads" = no ; then
8607         # try -lpthread
8608         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8609 echo "configure:8610: checking for pthread link with -lpthread" >&5
8610 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8611   echo $ac_n "(cached) $ac_c" 1>&6
8612 else
8613   
8614                 # save the flags
8615                 ol_LIBS="$LIBS"
8616                 LIBS="-lpthread $LIBS"
8617
8618                 if test "$cross_compiling" = yes; then
8619   cat > conftest.$ac_ext <<EOF
8620 #line 8621 "configure"
8621 #include "confdefs.h"
8622 /* pthread test headers */
8623 #include <pthread.h>
8624 #ifndef NULL
8625 #define NULL (void*)0
8626 #endif
8627
8628 static void *task(p)
8629         void *p;
8630 {
8631         return (void *) (p == NULL);
8632 }
8633
8634 int main() {
8635
8636         /* pthread test function */
8637         pthread_t t;
8638         int status;
8639 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8640         /* This system (e.g. AIX) defaults detached; must override */
8641         pthread_attr_t attr;
8642
8643         status = pthread_attr_init(&attr);
8644         if( status ) exit( status );
8645
8646         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8647         if( status ) exit( status );
8648
8649 #define ATTR    &attr
8650 #else
8651 #if HAVE_PTHREADS_D4
8652 #define ATTR    pthread_attr_default
8653 #else
8654 #define ATTR    NULL
8655 #endif
8656 #endif
8657         /* make sure pthread_create() isn't just a stub */
8658         status = pthread_create(&t, ATTR, task, NULL);
8659         if( status ) exit( status );
8660
8661         /* make sure pthread_detach() isn't just a stub */
8662 #if HAVE_PTHREADS_D4
8663         status = pthread_detach( &t );
8664 #else
8665         status = pthread_detach( t );
8666 #endif
8667
8668 #ifdef HAVE_LINUX_THREADS
8669         pthread_kill_other_threads_np();
8670 #endif
8671
8672         exit( status );
8673
8674 ; return 0; }
8675 EOF
8676 if { (eval echo configure:8677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8677   rm -rf conftest*
8678   ol_cv_pthread_lpthread=yes
8679 else
8680   echo "configure: failed program was:" >&5
8681   cat conftest.$ac_ext >&5
8682   rm -rf conftest*
8683   ol_cv_pthread_lpthread=no
8684 fi
8685 rm -f conftest*
8686 else
8687   cat > conftest.$ac_ext <<EOF
8688 #line 8689 "configure"
8689 #include "confdefs.h"
8690 /* pthread test headers */
8691 #include <pthread.h>
8692 #ifndef NULL
8693 #define NULL (void*)0
8694 #endif
8695
8696 static void *task(p)
8697         void *p;
8698 {
8699         return (void *) (p == NULL);
8700 }
8701
8702
8703 int main(argc, argv)
8704         int argc;
8705         char **argv;
8706 {
8707
8708         /* pthread test function */
8709         pthread_t t;
8710         int status;
8711 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8712         /* This system (e.g. AIX) defaults detached; must override */
8713         pthread_attr_t attr;
8714
8715         status = pthread_attr_init(&attr);
8716         if( status ) exit( status );
8717
8718         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8719         if( status ) exit( status );
8720
8721 #define ATTR    &attr
8722 #else
8723 #if HAVE_PTHREADS_D4
8724 #define ATTR    pthread_attr_default
8725 #else
8726 #define ATTR    NULL
8727 #endif
8728 #endif
8729         /* make sure pthread_create() isn't just a stub */
8730         status = pthread_create(&t, ATTR, task, NULL);
8731         if( status ) exit( status );
8732
8733         /* make sure pthread_detach() isn't just a stub */
8734 #if HAVE_PTHREADS_D4
8735         status = pthread_detach( &t );
8736 #else
8737         status = pthread_detach( t );
8738 #endif
8739
8740 #ifdef HAVE_LINUX_THREADS
8741         pthread_kill_other_threads_np();
8742 #endif
8743
8744         exit( status );
8745
8746 }
8747
8748 EOF
8749 if { (eval echo configure:8750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8750 then
8751   ol_cv_pthread_lpthread=yes
8752 else
8753   echo "configure: failed program was:" >&5
8754   cat conftest.$ac_ext >&5
8755   rm -fr conftest*
8756   ol_cv_pthread_lpthread=no
8757 fi
8758 rm -fr conftest*
8759 fi
8760
8761
8762                 # restore the LIBS
8763                 LIBS="$ol_LIBS"
8764         
8765 fi
8766
8767 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8768
8769         if test $ol_cv_pthread_lpthread = yes ; then
8770                 ol_link_pthreads="-lpthread"
8771                 ol_link_threads=posix
8772         fi
8773 fi
8774
8775                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8776 if test "$ol_link_threads" = no ; then
8777         # try -lc_r
8778         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8779 echo "configure:8780: checking for pthread link with -lc_r" >&5
8780 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8781   echo $ac_n "(cached) $ac_c" 1>&6
8782 else
8783   
8784                 # save the flags
8785                 ol_LIBS="$LIBS"
8786                 LIBS="-lc_r $LIBS"
8787
8788                 if test "$cross_compiling" = yes; then
8789   cat > conftest.$ac_ext <<EOF
8790 #line 8791 "configure"
8791 #include "confdefs.h"
8792 /* pthread test headers */
8793 #include <pthread.h>
8794 #ifndef NULL
8795 #define NULL (void*)0
8796 #endif
8797
8798 static void *task(p)
8799         void *p;
8800 {
8801         return (void *) (p == NULL);
8802 }
8803
8804 int main() {
8805
8806         /* pthread test function */
8807         pthread_t t;
8808         int status;
8809 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8810         /* This system (e.g. AIX) defaults detached; must override */
8811         pthread_attr_t attr;
8812
8813         status = pthread_attr_init(&attr);
8814         if( status ) exit( status );
8815
8816         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8817         if( status ) exit( status );
8818
8819 #define ATTR    &attr
8820 #else
8821 #if HAVE_PTHREADS_D4
8822 #define ATTR    pthread_attr_default
8823 #else
8824 #define ATTR    NULL
8825 #endif
8826 #endif
8827         /* make sure pthread_create() isn't just a stub */
8828         status = pthread_create(&t, ATTR, task, NULL);
8829         if( status ) exit( status );
8830
8831         /* make sure pthread_detach() isn't just a stub */
8832 #if HAVE_PTHREADS_D4
8833         status = pthread_detach( &t );
8834 #else
8835         status = pthread_detach( t );
8836 #endif
8837
8838 #ifdef HAVE_LINUX_THREADS
8839         pthread_kill_other_threads_np();
8840 #endif
8841
8842         exit( status );
8843
8844 ; return 0; }
8845 EOF
8846 if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8847   rm -rf conftest*
8848   ol_cv_pthread_lc_r=yes
8849 else
8850   echo "configure: failed program was:" >&5
8851   cat conftest.$ac_ext >&5
8852   rm -rf conftest*
8853   ol_cv_pthread_lc_r=no
8854 fi
8855 rm -f conftest*
8856 else
8857   cat > conftest.$ac_ext <<EOF
8858 #line 8859 "configure"
8859 #include "confdefs.h"
8860 /* pthread test headers */
8861 #include <pthread.h>
8862 #ifndef NULL
8863 #define NULL (void*)0
8864 #endif
8865
8866 static void *task(p)
8867         void *p;
8868 {
8869         return (void *) (p == NULL);
8870 }
8871
8872
8873 int main(argc, argv)
8874         int argc;
8875         char **argv;
8876 {
8877
8878         /* pthread test function */
8879         pthread_t t;
8880         int status;
8881 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8882         /* This system (e.g. AIX) defaults detached; must override */
8883         pthread_attr_t attr;
8884
8885         status = pthread_attr_init(&attr);
8886         if( status ) exit( status );
8887
8888         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8889         if( status ) exit( status );
8890
8891 #define ATTR    &attr
8892 #else
8893 #if HAVE_PTHREADS_D4
8894 #define ATTR    pthread_attr_default
8895 #else
8896 #define ATTR    NULL
8897 #endif
8898 #endif
8899         /* make sure pthread_create() isn't just a stub */
8900         status = pthread_create(&t, ATTR, task, NULL);
8901         if( status ) exit( status );
8902
8903         /* make sure pthread_detach() isn't just a stub */
8904 #if HAVE_PTHREADS_D4
8905         status = pthread_detach( &t );
8906 #else
8907         status = pthread_detach( t );
8908 #endif
8909
8910 #ifdef HAVE_LINUX_THREADS
8911         pthread_kill_other_threads_np();
8912 #endif
8913
8914         exit( status );
8915
8916 }
8917
8918 EOF
8919 if { (eval echo configure:8920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8920 then
8921   ol_cv_pthread_lc_r=yes
8922 else
8923   echo "configure: failed program was:" >&5
8924   cat conftest.$ac_ext >&5
8925   rm -fr conftest*
8926   ol_cv_pthread_lc_r=no
8927 fi
8928 rm -fr conftest*
8929 fi
8930
8931
8932                 # restore the LIBS
8933                 LIBS="$ol_LIBS"
8934         
8935 fi
8936
8937 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8938
8939         if test $ol_cv_pthread_lc_r = yes ; then
8940                 ol_link_pthreads="-lc_r"
8941                 ol_link_threads=posix
8942         fi
8943 fi
8944
8945
8946                 # Pthread try link: -threads (ol_cv_pthread_threads)
8947 if test "$ol_link_threads" = no ; then
8948         # try -threads
8949         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8950 echo "configure:8951: checking for pthread link with -threads" >&5
8951 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8952   echo $ac_n "(cached) $ac_c" 1>&6
8953 else
8954   
8955                 # save the flags
8956                 ol_LIBS="$LIBS"
8957                 LIBS="-threads $LIBS"
8958
8959                 if test "$cross_compiling" = yes; then
8960   cat > conftest.$ac_ext <<EOF
8961 #line 8962 "configure"
8962 #include "confdefs.h"
8963 /* pthread test headers */
8964 #include <pthread.h>
8965 #ifndef NULL
8966 #define NULL (void*)0
8967 #endif
8968
8969 static void *task(p)
8970         void *p;
8971 {
8972         return (void *) (p == NULL);
8973 }
8974
8975 int main() {
8976
8977         /* pthread test function */
8978         pthread_t t;
8979         int status;
8980 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8981         /* This system (e.g. AIX) defaults detached; must override */
8982         pthread_attr_t attr;
8983
8984         status = pthread_attr_init(&attr);
8985         if( status ) exit( status );
8986
8987         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8988         if( status ) exit( status );
8989
8990 #define ATTR    &attr
8991 #else
8992 #if HAVE_PTHREADS_D4
8993 #define ATTR    pthread_attr_default
8994 #else
8995 #define ATTR    NULL
8996 #endif
8997 #endif
8998         /* make sure pthread_create() isn't just a stub */
8999         status = pthread_create(&t, ATTR, task, NULL);
9000         if( status ) exit( status );
9001
9002         /* make sure pthread_detach() isn't just a stub */
9003 #if HAVE_PTHREADS_D4
9004         status = pthread_detach( &t );
9005 #else
9006         status = pthread_detach( t );
9007 #endif
9008
9009 #ifdef HAVE_LINUX_THREADS
9010         pthread_kill_other_threads_np();
9011 #endif
9012
9013         exit( status );
9014
9015 ; return 0; }
9016 EOF
9017 if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9018   rm -rf conftest*
9019   ol_cv_pthread_threads=yes
9020 else
9021   echo "configure: failed program was:" >&5
9022   cat conftest.$ac_ext >&5
9023   rm -rf conftest*
9024   ol_cv_pthread_threads=no
9025 fi
9026 rm -f conftest*
9027 else
9028   cat > conftest.$ac_ext <<EOF
9029 #line 9030 "configure"
9030 #include "confdefs.h"
9031 /* pthread test headers */
9032 #include <pthread.h>
9033 #ifndef NULL
9034 #define NULL (void*)0
9035 #endif
9036
9037 static void *task(p)
9038         void *p;
9039 {
9040         return (void *) (p == NULL);
9041 }
9042
9043
9044 int main(argc, argv)
9045         int argc;
9046         char **argv;
9047 {
9048
9049         /* pthread test function */
9050         pthread_t t;
9051         int status;
9052 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9053         /* This system (e.g. AIX) defaults detached; must override */
9054         pthread_attr_t attr;
9055
9056         status = pthread_attr_init(&attr);
9057         if( status ) exit( status );
9058
9059         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9060         if( status ) exit( status );
9061
9062 #define ATTR    &attr
9063 #else
9064 #if HAVE_PTHREADS_D4
9065 #define ATTR    pthread_attr_default
9066 #else
9067 #define ATTR    NULL
9068 #endif
9069 #endif
9070         /* make sure pthread_create() isn't just a stub */
9071         status = pthread_create(&t, ATTR, task, NULL);
9072         if( status ) exit( status );
9073
9074         /* make sure pthread_detach() isn't just a stub */
9075 #if HAVE_PTHREADS_D4
9076         status = pthread_detach( &t );
9077 #else
9078         status = pthread_detach( t );
9079 #endif
9080
9081 #ifdef HAVE_LINUX_THREADS
9082         pthread_kill_other_threads_np();
9083 #endif
9084
9085         exit( status );
9086
9087 }
9088
9089 EOF
9090 if { (eval echo configure:9091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9091 then
9092   ol_cv_pthread_threads=yes
9093 else
9094   echo "configure: failed program was:" >&5
9095   cat conftest.$ac_ext >&5
9096   rm -fr conftest*
9097   ol_cv_pthread_threads=no
9098 fi
9099 rm -fr conftest*
9100 fi
9101
9102
9103                 # restore the LIBS
9104                 LIBS="$ol_LIBS"
9105         
9106 fi
9107
9108 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9109
9110         if test $ol_cv_pthread_threads = yes ; then
9111                 ol_link_pthreads="-threads"
9112                 ol_link_threads=posix
9113         fi
9114 fi
9115
9116
9117                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9118 if test "$ol_link_threads" = no ; then
9119         # try -lpthreads -lmach -lexc -lc_r
9120         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9121 echo "configure:9122: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9122 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9123   echo $ac_n "(cached) $ac_c" 1>&6
9124 else
9125   
9126                 # save the flags
9127                 ol_LIBS="$LIBS"
9128                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9129
9130                 if test "$cross_compiling" = yes; then
9131   cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134 /* pthread test headers */
9135 #include <pthread.h>
9136 #ifndef NULL
9137 #define NULL (void*)0
9138 #endif
9139
9140 static void *task(p)
9141         void *p;
9142 {
9143         return (void *) (p == NULL);
9144 }
9145
9146 int main() {
9147
9148         /* pthread test function */
9149         pthread_t t;
9150         int status;
9151 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9152         /* This system (e.g. AIX) defaults detached; must override */
9153         pthread_attr_t attr;
9154
9155         status = pthread_attr_init(&attr);
9156         if( status ) exit( status );
9157
9158         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9159         if( status ) exit( status );
9160
9161 #define ATTR    &attr
9162 #else
9163 #if HAVE_PTHREADS_D4
9164 #define ATTR    pthread_attr_default
9165 #else
9166 #define ATTR    NULL
9167 #endif
9168 #endif
9169         /* make sure pthread_create() isn't just a stub */
9170         status = pthread_create(&t, ATTR, task, NULL);
9171         if( status ) exit( status );
9172
9173         /* make sure pthread_detach() isn't just a stub */
9174 #if HAVE_PTHREADS_D4
9175         status = pthread_detach( &t );
9176 #else
9177         status = pthread_detach( t );
9178 #endif
9179
9180 #ifdef HAVE_LINUX_THREADS
9181         pthread_kill_other_threads_np();
9182 #endif
9183
9184         exit( status );
9185
9186 ; return 0; }
9187 EOF
9188 if { (eval echo configure:9189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9189   rm -rf conftest*
9190   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9191 else
9192   echo "configure: failed program was:" >&5
9193   cat conftest.$ac_ext >&5
9194   rm -rf conftest*
9195   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9196 fi
9197 rm -f conftest*
9198 else
9199   cat > conftest.$ac_ext <<EOF
9200 #line 9201 "configure"
9201 #include "confdefs.h"
9202 /* pthread test headers */
9203 #include <pthread.h>
9204 #ifndef NULL
9205 #define NULL (void*)0
9206 #endif
9207
9208 static void *task(p)
9209         void *p;
9210 {
9211         return (void *) (p == NULL);
9212 }
9213
9214
9215 int main(argc, argv)
9216         int argc;
9217         char **argv;
9218 {
9219
9220         /* pthread test function */
9221         pthread_t t;
9222         int status;
9223 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9224         /* This system (e.g. AIX) defaults detached; must override */
9225         pthread_attr_t attr;
9226
9227         status = pthread_attr_init(&attr);
9228         if( status ) exit( status );
9229
9230         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9231         if( status ) exit( status );
9232
9233 #define ATTR    &attr
9234 #else
9235 #if HAVE_PTHREADS_D4
9236 #define ATTR    pthread_attr_default
9237 #else
9238 #define ATTR    NULL
9239 #endif
9240 #endif
9241         /* make sure pthread_create() isn't just a stub */
9242         status = pthread_create(&t, ATTR, task, NULL);
9243         if( status ) exit( status );
9244
9245         /* make sure pthread_detach() isn't just a stub */
9246 #if HAVE_PTHREADS_D4
9247         status = pthread_detach( &t );
9248 #else
9249         status = pthread_detach( t );
9250 #endif
9251
9252 #ifdef HAVE_LINUX_THREADS
9253         pthread_kill_other_threads_np();
9254 #endif
9255
9256         exit( status );
9257
9258 }
9259
9260 EOF
9261 if { (eval echo configure:9262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9262 then
9263   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9264 else
9265   echo "configure: failed program was:" >&5
9266   cat conftest.$ac_ext >&5
9267   rm -fr conftest*
9268   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9269 fi
9270 rm -fr conftest*
9271 fi
9272
9273
9274                 # restore the LIBS
9275                 LIBS="$ol_LIBS"
9276         
9277 fi
9278
9279 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9280
9281         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9282                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9283                 ol_link_threads=posix
9284         fi
9285 fi
9286
9287                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9288 if test "$ol_link_threads" = no ; then
9289         # try -lpthreads -lmach -lexc
9290         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9291 echo "configure:9292: checking for pthread link with -lpthreads -lmach -lexc" >&5
9292 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9293   echo $ac_n "(cached) $ac_c" 1>&6
9294 else
9295   
9296                 # save the flags
9297                 ol_LIBS="$LIBS"
9298                 LIBS="-lpthreads -lmach -lexc $LIBS"
9299
9300                 if test "$cross_compiling" = yes; then
9301   cat > conftest.$ac_ext <<EOF
9302 #line 9303 "configure"
9303 #include "confdefs.h"
9304 /* pthread test headers */
9305 #include <pthread.h>
9306 #ifndef NULL
9307 #define NULL (void*)0
9308 #endif
9309
9310 static void *task(p)
9311         void *p;
9312 {
9313         return (void *) (p == NULL);
9314 }
9315
9316 int main() {
9317
9318         /* pthread test function */
9319         pthread_t t;
9320         int status;
9321 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9322         /* This system (e.g. AIX) defaults detached; must override */
9323         pthread_attr_t attr;
9324
9325         status = pthread_attr_init(&attr);
9326         if( status ) exit( status );
9327
9328         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9329         if( status ) exit( status );
9330
9331 #define ATTR    &attr
9332 #else
9333 #if HAVE_PTHREADS_D4
9334 #define ATTR    pthread_attr_default
9335 #else
9336 #define ATTR    NULL
9337 #endif
9338 #endif
9339         /* make sure pthread_create() isn't just a stub */
9340         status = pthread_create(&t, ATTR, task, NULL);
9341         if( status ) exit( status );
9342
9343         /* make sure pthread_detach() isn't just a stub */
9344 #if HAVE_PTHREADS_D4
9345         status = pthread_detach( &t );
9346 #else
9347         status = pthread_detach( t );
9348 #endif
9349
9350 #ifdef HAVE_LINUX_THREADS
9351         pthread_kill_other_threads_np();
9352 #endif
9353
9354         exit( status );
9355
9356 ; return 0; }
9357 EOF
9358 if { (eval echo configure:9359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9359   rm -rf conftest*
9360   ol_cv_pthread_lpthreads_lmach_lexc=yes
9361 else
9362   echo "configure: failed program was:" >&5
9363   cat conftest.$ac_ext >&5
9364   rm -rf conftest*
9365   ol_cv_pthread_lpthreads_lmach_lexc=no
9366 fi
9367 rm -f conftest*
9368 else
9369   cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372 /* pthread test headers */
9373 #include <pthread.h>
9374 #ifndef NULL
9375 #define NULL (void*)0
9376 #endif
9377
9378 static void *task(p)
9379         void *p;
9380 {
9381         return (void *) (p == NULL);
9382 }
9383
9384
9385 int main(argc, argv)
9386         int argc;
9387         char **argv;
9388 {
9389
9390         /* pthread test function */
9391         pthread_t t;
9392         int status;
9393 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9394         /* This system (e.g. AIX) defaults detached; must override */
9395         pthread_attr_t attr;
9396
9397         status = pthread_attr_init(&attr);
9398         if( status ) exit( status );
9399
9400         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9401         if( status ) exit( status );
9402
9403 #define ATTR    &attr
9404 #else
9405 #if HAVE_PTHREADS_D4
9406 #define ATTR    pthread_attr_default
9407 #else
9408 #define ATTR    NULL
9409 #endif
9410 #endif
9411         /* make sure pthread_create() isn't just a stub */
9412         status = pthread_create(&t, ATTR, task, NULL);
9413         if( status ) exit( status );
9414
9415         /* make sure pthread_detach() isn't just a stub */
9416 #if HAVE_PTHREADS_D4
9417         status = pthread_detach( &t );
9418 #else
9419         status = pthread_detach( t );
9420 #endif
9421
9422 #ifdef HAVE_LINUX_THREADS
9423         pthread_kill_other_threads_np();
9424 #endif
9425
9426         exit( status );
9427
9428 }
9429
9430 EOF
9431 if { (eval echo configure:9432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9432 then
9433   ol_cv_pthread_lpthreads_lmach_lexc=yes
9434 else
9435   echo "configure: failed program was:" >&5
9436   cat conftest.$ac_ext >&5
9437   rm -fr conftest*
9438   ol_cv_pthread_lpthreads_lmach_lexc=no
9439 fi
9440 rm -fr conftest*
9441 fi
9442
9443
9444                 # restore the LIBS
9445                 LIBS="$ol_LIBS"
9446         
9447 fi
9448
9449 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9450
9451         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9452                 ol_link_pthreads="-lpthreads -lmach -lexc"
9453                 ol_link_threads=posix
9454         fi
9455 fi
9456
9457                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9458 if test "$ol_link_threads" = no ; then
9459         # try -lpthreads -lexc
9460         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9461 echo "configure:9462: checking for pthread link with -lpthreads -lexc" >&5
9462 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9463   echo $ac_n "(cached) $ac_c" 1>&6
9464 else
9465   
9466                 # save the flags
9467                 ol_LIBS="$LIBS"
9468                 LIBS="-lpthreads -lexc $LIBS"
9469
9470                 if test "$cross_compiling" = yes; then
9471   cat > conftest.$ac_ext <<EOF
9472 #line 9473 "configure"
9473 #include "confdefs.h"
9474 /* pthread test headers */
9475 #include <pthread.h>
9476 #ifndef NULL
9477 #define NULL (void*)0
9478 #endif
9479
9480 static void *task(p)
9481         void *p;
9482 {
9483         return (void *) (p == NULL);
9484 }
9485
9486 int main() {
9487
9488         /* pthread test function */
9489         pthread_t t;
9490         int status;
9491 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9492         /* This system (e.g. AIX) defaults detached; must override */
9493         pthread_attr_t attr;
9494
9495         status = pthread_attr_init(&attr);
9496         if( status ) exit( status );
9497
9498         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9499         if( status ) exit( status );
9500
9501 #define ATTR    &attr
9502 #else
9503 #if HAVE_PTHREADS_D4
9504 #define ATTR    pthread_attr_default
9505 #else
9506 #define ATTR    NULL
9507 #endif
9508 #endif
9509         /* make sure pthread_create() isn't just a stub */
9510         status = pthread_create(&t, ATTR, task, NULL);
9511         if( status ) exit( status );
9512
9513         /* make sure pthread_detach() isn't just a stub */
9514 #if HAVE_PTHREADS_D4
9515         status = pthread_detach( &t );
9516 #else
9517         status = pthread_detach( t );
9518 #endif
9519
9520 #ifdef HAVE_LINUX_THREADS
9521         pthread_kill_other_threads_np();
9522 #endif
9523
9524         exit( status );
9525
9526 ; return 0; }
9527 EOF
9528 if { (eval echo configure:9529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9529   rm -rf conftest*
9530   ol_cv_pthread_lpthreads_lexc=yes
9531 else
9532   echo "configure: failed program was:" >&5
9533   cat conftest.$ac_ext >&5
9534   rm -rf conftest*
9535   ol_cv_pthread_lpthreads_lexc=no
9536 fi
9537 rm -f conftest*
9538 else
9539   cat > conftest.$ac_ext <<EOF
9540 #line 9541 "configure"
9541 #include "confdefs.h"
9542 /* pthread test headers */
9543 #include <pthread.h>
9544 #ifndef NULL
9545 #define NULL (void*)0
9546 #endif
9547
9548 static void *task(p)
9549         void *p;
9550 {
9551         return (void *) (p == NULL);
9552 }
9553
9554
9555 int main(argc, argv)
9556         int argc;
9557         char **argv;
9558 {
9559
9560         /* pthread test function */
9561         pthread_t t;
9562         int status;
9563 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9564         /* This system (e.g. AIX) defaults detached; must override */
9565         pthread_attr_t attr;
9566
9567         status = pthread_attr_init(&attr);
9568         if( status ) exit( status );
9569
9570         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9571         if( status ) exit( status );
9572
9573 #define ATTR    &attr
9574 #else
9575 #if HAVE_PTHREADS_D4
9576 #define ATTR    pthread_attr_default
9577 #else
9578 #define ATTR    NULL
9579 #endif
9580 #endif
9581         /* make sure pthread_create() isn't just a stub */
9582         status = pthread_create(&t, ATTR, task, NULL);
9583         if( status ) exit( status );
9584
9585         /* make sure pthread_detach() isn't just a stub */
9586 #if HAVE_PTHREADS_D4
9587         status = pthread_detach( &t );
9588 #else
9589         status = pthread_detach( t );
9590 #endif
9591
9592 #ifdef HAVE_LINUX_THREADS
9593         pthread_kill_other_threads_np();
9594 #endif
9595
9596         exit( status );
9597
9598 }
9599
9600 EOF
9601 if { (eval echo configure:9602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9602 then
9603   ol_cv_pthread_lpthreads_lexc=yes
9604 else
9605   echo "configure: failed program was:" >&5
9606   cat conftest.$ac_ext >&5
9607   rm -fr conftest*
9608   ol_cv_pthread_lpthreads_lexc=no
9609 fi
9610 rm -fr conftest*
9611 fi
9612
9613
9614                 # restore the LIBS
9615                 LIBS="$ol_LIBS"
9616         
9617 fi
9618
9619 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9620
9621         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9622                 ol_link_pthreads="-lpthreads -lexc"
9623                 ol_link_threads=posix
9624         fi
9625 fi
9626
9627
9628                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9629 if test "$ol_link_threads" = no ; then
9630         # try -lpthreads
9631         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9632 echo "configure:9633: checking for pthread link with -lpthreads" >&5
9633 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9634   echo $ac_n "(cached) $ac_c" 1>&6
9635 else
9636   
9637                 # save the flags
9638                 ol_LIBS="$LIBS"
9639                 LIBS="-lpthreads $LIBS"
9640
9641                 if test "$cross_compiling" = yes; then
9642   cat > conftest.$ac_ext <<EOF
9643 #line 9644 "configure"
9644 #include "confdefs.h"
9645 /* pthread test headers */
9646 #include <pthread.h>
9647 #ifndef NULL
9648 #define NULL (void*)0
9649 #endif
9650
9651 static void *task(p)
9652         void *p;
9653 {
9654         return (void *) (p == NULL);
9655 }
9656
9657 int main() {
9658
9659         /* pthread test function */
9660         pthread_t t;
9661         int status;
9662 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9663         /* This system (e.g. AIX) defaults detached; must override */
9664         pthread_attr_t attr;
9665
9666         status = pthread_attr_init(&attr);
9667         if( status ) exit( status );
9668
9669         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9670         if( status ) exit( status );
9671
9672 #define ATTR    &attr
9673 #else
9674 #if HAVE_PTHREADS_D4
9675 #define ATTR    pthread_attr_default
9676 #else
9677 #define ATTR    NULL
9678 #endif
9679 #endif
9680         /* make sure pthread_create() isn't just a stub */
9681         status = pthread_create(&t, ATTR, task, NULL);
9682         if( status ) exit( status );
9683
9684         /* make sure pthread_detach() isn't just a stub */
9685 #if HAVE_PTHREADS_D4
9686         status = pthread_detach( &t );
9687 #else
9688         status = pthread_detach( t );
9689 #endif
9690
9691 #ifdef HAVE_LINUX_THREADS
9692         pthread_kill_other_threads_np();
9693 #endif
9694
9695         exit( status );
9696
9697 ; return 0; }
9698 EOF
9699 if { (eval echo configure:9700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9700   rm -rf conftest*
9701   ol_cv_pthread_lib_lpthreads=yes
9702 else
9703   echo "configure: failed program was:" >&5
9704   cat conftest.$ac_ext >&5
9705   rm -rf conftest*
9706   ol_cv_pthread_lib_lpthreads=no
9707 fi
9708 rm -f conftest*
9709 else
9710   cat > conftest.$ac_ext <<EOF
9711 #line 9712 "configure"
9712 #include "confdefs.h"
9713 /* pthread test headers */
9714 #include <pthread.h>
9715 #ifndef NULL
9716 #define NULL (void*)0
9717 #endif
9718
9719 static void *task(p)
9720         void *p;
9721 {
9722         return (void *) (p == NULL);
9723 }
9724
9725
9726 int main(argc, argv)
9727         int argc;
9728         char **argv;
9729 {
9730
9731         /* pthread test function */
9732         pthread_t t;
9733         int status;
9734 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9735         /* This system (e.g. AIX) defaults detached; must override */
9736         pthread_attr_t attr;
9737
9738         status = pthread_attr_init(&attr);
9739         if( status ) exit( status );
9740
9741         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9742         if( status ) exit( status );
9743
9744 #define ATTR    &attr
9745 #else
9746 #if HAVE_PTHREADS_D4
9747 #define ATTR    pthread_attr_default
9748 #else
9749 #define ATTR    NULL
9750 #endif
9751 #endif
9752         /* make sure pthread_create() isn't just a stub */
9753         status = pthread_create(&t, ATTR, task, NULL);
9754         if( status ) exit( status );
9755
9756         /* make sure pthread_detach() isn't just a stub */
9757 #if HAVE_PTHREADS_D4
9758         status = pthread_detach( &t );
9759 #else
9760         status = pthread_detach( t );
9761 #endif
9762
9763 #ifdef HAVE_LINUX_THREADS
9764         pthread_kill_other_threads_np();
9765 #endif
9766
9767         exit( status );
9768
9769 }
9770
9771 EOF
9772 if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9773 then
9774   ol_cv_pthread_lib_lpthreads=yes
9775 else
9776   echo "configure: failed program was:" >&5
9777   cat conftest.$ac_ext >&5
9778   rm -fr conftest*
9779   ol_cv_pthread_lib_lpthreads=no
9780 fi
9781 rm -fr conftest*
9782 fi
9783
9784
9785                 # restore the LIBS
9786                 LIBS="$ol_LIBS"
9787         
9788 fi
9789
9790 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9791
9792         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9793                 ol_link_pthreads="-lpthreads"
9794                 ol_link_threads=posix
9795         fi
9796 fi
9797
9798
9799                 if test $ol_link_threads != no ; then
9800                         cat >> confdefs.h <<\EOF
9801 #define HAVE_PTHREADS 1
9802 EOF
9803
9804
9805                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9806
9807                                                 save_CPPFLAGS="$CPPFLAGS"
9808                         save_LIBS="$LIBS"
9809                         LIBS="$LTHREAD_LIBS $LIBS"
9810
9811                                                                                                 for ac_func in sched_yield pthread_yield
9812 do
9813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9814 echo "configure:9815: checking for $ac_func" >&5
9815 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9816   echo $ac_n "(cached) $ac_c" 1>&6
9817 else
9818   cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821 /* System header to define __stub macros and hopefully few prototypes,
9822     which can conflict with char $ac_func(); below.  */
9823 #include <assert.h>
9824 /* Override any gcc2 internal prototype to avoid an error.  */
9825 /* We use char because int might match the return type of a gcc2
9826     builtin and then its argument prototype would still apply.  */
9827 char $ac_func();
9828 char (*f)();
9829
9830 int main() {
9831
9832 /* The GNU C library defines this for functions which it implements
9833     to always fail with ENOSYS.  Some functions are actually named
9834     something starting with __ and the normal name is an alias.  */
9835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9836 choke me
9837 #else
9838 f = $ac_func;
9839 #endif
9840
9841 ; return 0; }
9842 EOF
9843 if { (eval echo configure:9844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9844   rm -rf conftest*
9845   eval "ac_cv_func_$ac_func=yes"
9846 else
9847   echo "configure: failed program was:" >&5
9848   cat conftest.$ac_ext >&5
9849   rm -rf conftest*
9850   eval "ac_cv_func_$ac_func=no"
9851 fi
9852 rm -f conftest*
9853 fi
9854
9855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9856   echo "$ac_t""yes" 1>&6
9857     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9858   cat >> confdefs.h <<EOF
9859 #define $ac_tr_func 1
9860 EOF
9861  
9862 else
9863   echo "$ac_t""no" 1>&6
9864 fi
9865 done
9866
9867
9868                         if test $ac_cv_func_sched_yield = no -a \
9869                                 $ac_cv_func_pthread_yield = no ; then
9870                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9871 echo "configure:9872: checking for sched_yield in -lrt" >&5
9872 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9873 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   ac_save_LIBS="$LIBS"
9877 LIBS="-lrt  $LIBS"
9878 cat > conftest.$ac_ext <<EOF
9879 #line 9880 "configure"
9880 #include "confdefs.h"
9881 /* Override any gcc2 internal prototype to avoid an error.  */
9882 /* We use char because int might match the return type of a gcc2
9883     builtin and then its argument prototype would still apply.  */
9884 char sched_yield();
9885
9886 int main() {
9887 sched_yield()
9888 ; return 0; }
9889 EOF
9890 if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9891   rm -rf conftest*
9892   eval "ac_cv_lib_$ac_lib_var=yes"
9893 else
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -rf conftest*
9897   eval "ac_cv_lib_$ac_lib_var=no"
9898 fi
9899 rm -f conftest*
9900 LIBS="$ac_save_LIBS"
9901
9902 fi
9903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9904   echo "$ac_t""yes" 1>&6
9905   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9906                                         cat >> confdefs.h <<\EOF
9907 #define HAVE_SCHED_YIELD 1
9908 EOF
9909
9910                                         ac_cv_func_sched_yield=yes
9911 else
9912   echo "$ac_t""no" 1>&6
9913 ac_cv_func_sched_yield=no
9914 fi
9915
9916                         fi
9917                         if test $ac_cv_func_sched_yield = no -a \
9918                                 $ac_cv_func_pthread_yield = no ; then
9919                                                                                                 for ac_func in thr_yield
9920 do
9921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9922 echo "configure:9923: checking for $ac_func" >&5
9923 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9924   echo $ac_n "(cached) $ac_c" 1>&6
9925 else
9926   cat > conftest.$ac_ext <<EOF
9927 #line 9928 "configure"
9928 #include "confdefs.h"
9929 /* System header to define __stub macros and hopefully few prototypes,
9930     which can conflict with char $ac_func(); below.  */
9931 #include <assert.h>
9932 /* Override any gcc2 internal prototype to avoid an error.  */
9933 /* We use char because int might match the return type of a gcc2
9934     builtin and then its argument prototype would still apply.  */
9935 char $ac_func();
9936 char (*f)();
9937
9938 int main() {
9939
9940 /* The GNU C library defines this for functions which it implements
9941     to always fail with ENOSYS.  Some functions are actually named
9942     something starting with __ and the normal name is an alias.  */
9943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9944 choke me
9945 #else
9946 f = $ac_func;
9947 #endif
9948
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9952   rm -rf conftest*
9953   eval "ac_cv_func_$ac_func=yes"
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   eval "ac_cv_func_$ac_func=no"
9959 fi
9960 rm -f conftest*
9961 fi
9962
9963 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9964   echo "$ac_t""yes" 1>&6
9965     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9966   cat >> confdefs.h <<EOF
9967 #define $ac_tr_func 1
9968 EOF
9969  
9970 else
9971   echo "$ac_t""no" 1>&6
9972 fi
9973 done
9974
9975                         fi
9976                         if test $ac_cv_func_sched_yield = no -a \
9977                                 $ac_cv_func_pthread_yield = no -a \
9978                                 "$ac_cv_func_thr_yield" = no ; then
9979                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9980                         fi
9981
9982                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9983 do
9984 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9985 echo "configure:9986: checking for $ac_func" >&5
9986 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9987   echo $ac_n "(cached) $ac_c" 1>&6
9988 else
9989   cat > conftest.$ac_ext <<EOF
9990 #line 9991 "configure"
9991 #include "confdefs.h"
9992 /* System header to define __stub macros and hopefully few prototypes,
9993     which can conflict with char $ac_func(); below.  */
9994 #include <assert.h>
9995 /* Override any gcc2 internal prototype to avoid an error.  */
9996 /* We use char because int might match the return type of a gcc2
9997     builtin and then its argument prototype would still apply.  */
9998 char $ac_func();
9999 char (*f)();
10000
10001 int main() {
10002
10003 /* The GNU C library defines this for functions which it implements
10004     to always fail with ENOSYS.  Some functions are actually named
10005     something starting with __ and the normal name is an alias.  */
10006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10007 choke me
10008 #else
10009 f = $ac_func;
10010 #endif
10011
10012 ; return 0; }
10013 EOF
10014 if { (eval echo configure:10015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10015   rm -rf conftest*
10016   eval "ac_cv_func_$ac_func=yes"
10017 else
10018   echo "configure: failed program was:" >&5
10019   cat conftest.$ac_ext >&5
10020   rm -rf conftest*
10021   eval "ac_cv_func_$ac_func=no"
10022 fi
10023 rm -f conftest*
10024 fi
10025
10026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10027   echo "$ac_t""yes" 1>&6
10028     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10029   cat >> confdefs.h <<EOF
10030 #define $ac_tr_func 1
10031 EOF
10032  
10033 else
10034   echo "$ac_t""no" 1>&6
10035 fi
10036 done
10037
10038
10039                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10040 echo "configure:10041: checking for pthread_detach with <pthread.h>" >&5
10041 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10042   echo $ac_n "(cached) $ac_c" 1>&6
10043 else
10044   
10045                                                                 cat > conftest.$ac_ext <<EOF
10046 #line 10047 "configure"
10047 #include "confdefs.h"
10048
10049 #include <pthread.h>
10050 #ifndef NULL
10051 #define NULL (void*)0
10052 #endif
10053
10054 int main() {
10055 pthread_detach(NULL);
10056 ; return 0; }
10057 EOF
10058 if { (eval echo configure:10059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10059   rm -rf conftest*
10060   ol_cv_func_pthread_detach=yes
10061 else
10062   echo "configure: failed program was:" >&5
10063   cat conftest.$ac_ext >&5
10064   rm -rf conftest*
10065   ol_cv_func_pthread_detach=no
10066 fi
10067 rm -f conftest*
10068                         
10069 fi
10070
10071 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10072
10073                         if test $ol_cv_func_pthread_detach = no ; then
10074                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10075                         fi
10076
10077                         cat >> confdefs.h <<\EOF
10078 #define HAVE_PTHREAD_DETACH 1
10079 EOF
10080
10081
10082                                                 for ac_func in \
10083                                 pthread_setconcurrency \
10084                                 pthread_getconcurrency \
10085                                 thr_setconcurrency \
10086                                 thr_getconcurrency \
10087                         
10088 do
10089 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10090 echo "configure:10091: checking for $ac_func" >&5
10091 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10092   echo $ac_n "(cached) $ac_c" 1>&6
10093 else
10094   cat > conftest.$ac_ext <<EOF
10095 #line 10096 "configure"
10096 #include "confdefs.h"
10097 /* System header to define __stub macros and hopefully few prototypes,
10098     which can conflict with char $ac_func(); below.  */
10099 #include <assert.h>
10100 /* Override any gcc2 internal prototype to avoid an error.  */
10101 /* We use char because int might match the return type of a gcc2
10102     builtin and then its argument prototype would still apply.  */
10103 char $ac_func();
10104 char (*f)();
10105
10106 int main() {
10107
10108 /* The GNU C library defines this for functions which it implements
10109     to always fail with ENOSYS.  Some functions are actually named
10110     something starting with __ and the normal name is an alias.  */
10111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10112 choke me
10113 #else
10114 f = $ac_func;
10115 #endif
10116
10117 ; return 0; }
10118 EOF
10119 if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10120   rm -rf conftest*
10121   eval "ac_cv_func_$ac_func=yes"
10122 else
10123   echo "configure: failed program was:" >&5
10124   cat conftest.$ac_ext >&5
10125   rm -rf conftest*
10126   eval "ac_cv_func_$ac_func=no"
10127 fi
10128 rm -f conftest*
10129 fi
10130
10131 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10132   echo "$ac_t""yes" 1>&6
10133     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10134   cat >> confdefs.h <<EOF
10135 #define $ac_tr_func 1
10136 EOF
10137  
10138 else
10139   echo "$ac_t""no" 1>&6
10140 fi
10141 done
10142
10143
10144                         
10145         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10146 echo "configure:10147: checking for pthread_kill_other_threads_np" >&5
10147 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10148   echo $ac_n "(cached) $ac_c" 1>&6
10149 else
10150   cat > conftest.$ac_ext <<EOF
10151 #line 10152 "configure"
10152 #include "confdefs.h"
10153 /* System header to define __stub macros and hopefully few prototypes,
10154     which can conflict with char pthread_kill_other_threads_np(); below.  */
10155 #include <assert.h>
10156 /* Override any gcc2 internal prototype to avoid an error.  */
10157 /* We use char because int might match the return type of a gcc2
10158     builtin and then its argument prototype would still apply.  */
10159 char pthread_kill_other_threads_np();
10160 char (*f)();
10161
10162 int main() {
10163
10164 /* The GNU C library defines this for functions which it implements
10165     to always fail with ENOSYS.  Some functions are actually named
10166     something starting with __ and the normal name is an alias.  */
10167 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10168 choke me
10169 #else
10170 f = pthread_kill_other_threads_np;
10171 #endif
10172
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10183 fi
10184 rm -f conftest*
10185 fi
10186
10187 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10188   echo "$ac_t""yes" 1>&6
10189   :
10190 else
10191   echo "$ac_t""no" 1>&6
10192 fi
10193
10194         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10195 echo "configure:10196: checking for LinuxThreads implementation" >&5
10196 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10197   echo $ac_n "(cached) $ac_c" 1>&6
10198 else
10199   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10200 fi
10201
10202 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10203
10204                         
10205         
10206         
10207         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10208 echo "configure:10209: checking for LinuxThreads consistency" >&5
10209 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10210   echo $ac_n "(cached) $ac_c" 1>&6
10211 else
10212   
10213                 if test $ol_cv_header_linux_threads = yes -a \
10214                         $ol_cv_sys_linux_threads = yes; then
10215                         ol_cv_linux_threads=yes
10216                 elif test $ol_cv_header_linux_threads = no -a \
10217                         $ol_cv_sys_linux_threads = no; then
10218                         ol_cv_linux_threads=no
10219                 else
10220                         ol_cv_linux_threads=error
10221                 fi
10222         
10223 fi
10224
10225 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10226
10227
10228                         if test $ol_cv_linux_threads = error; then
10229                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10230                         fi
10231
10232                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10233 echo "configure:10234: checking if pthread_create() works" >&5
10234 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10235   echo $ac_n "(cached) $ac_c" 1>&6
10236 else
10237   
10238                         if test "$cross_compiling" = yes; then
10239                                 ol_cv_pthread_create_works=yes
10240 else
10241   cat > conftest.$ac_ext <<EOF
10242 #line 10243 "configure"
10243 #include "confdefs.h"
10244 /* pthread test headers */
10245 #include <pthread.h>
10246 #ifndef NULL
10247 #define NULL (void*)0
10248 #endif
10249
10250 static void *task(p)
10251         void *p;
10252 {
10253         return (void *) (p == NULL);
10254 }
10255
10256
10257 int main(argc, argv)
10258         int argc;
10259         char **argv;
10260 {
10261
10262         /* pthread test function */
10263         pthread_t t;
10264         int status;
10265 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10266         /* This system (e.g. AIX) defaults detached; must override */
10267         pthread_attr_t attr;
10268
10269         status = pthread_attr_init(&attr);
10270         if( status ) exit( status );
10271
10272         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10273         if( status ) exit( status );
10274
10275 #define ATTR    &attr
10276 #else
10277 #if HAVE_PTHREADS_D4
10278 #define ATTR    pthread_attr_default
10279 #else
10280 #define ATTR    NULL
10281 #endif
10282 #endif
10283         /* make sure pthread_create() isn't just a stub */
10284         status = pthread_create(&t, ATTR, task, NULL);
10285         if( status ) exit( status );
10286
10287         /* make sure pthread_detach() isn't just a stub */
10288 #if HAVE_PTHREADS_D4
10289         status = pthread_detach( &t );
10290 #else
10291         status = pthread_detach( t );
10292 #endif
10293
10294 #ifdef HAVE_LINUX_THREADS
10295         pthread_kill_other_threads_np();
10296 #endif
10297
10298         exit( status );
10299
10300 }
10301
10302 EOF
10303 if { (eval echo configure:10304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10304 then
10305   ol_cv_pthread_create_works=yes
10306 else
10307   echo "configure: failed program was:" >&5
10308   cat conftest.$ac_ext >&5
10309   rm -fr conftest*
10310   ol_cv_pthread_create_works=no
10311 fi
10312 rm -fr conftest*
10313 fi
10314
10315 fi
10316
10317 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10318
10319                         if test $ol_cv_pthread_create_works = no ; then
10320                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10321                         fi
10322
10323                                                 if test $ol_with_yielding_select = auto ; then
10324                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10325 echo "configure:10326: checking if select yields when using pthreads" >&5
10326 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10327   echo $ac_n "(cached) $ac_c" 1>&6
10328 else
10329   
10330                                 if test "$cross_compiling" = yes; then
10331   ol_cv_pthread_select_yields=cross
10332 else
10333   cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336
10337 #include <sys/types.h>
10338 #include <sys/time.h>
10339 #include <unistd.h>
10340 #include <pthread.h>
10341 #ifndef NULL
10342 #define NULL (void*) 0
10343 #endif
10344
10345 static int fildes[2];
10346
10347 static void *task(p)
10348         void *p;
10349 {
10350         int i;
10351         struct timeval tv;
10352
10353         fd_set rfds;
10354
10355         tv.tv_sec=10;
10356         tv.tv_usec=0;
10357
10358         FD_ZERO(&rfds);
10359         FD_SET(fildes[0], &rfds);
10360
10361         /* we're not interested in any fds */
10362         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10363
10364         if(i < 0) {
10365                 perror("select");
10366                 exit(10);
10367         }
10368
10369         exit(0); /* if we exit here, the select blocked the whole process */
10370 }
10371
10372 int main(argc, argv)
10373         int argc;
10374         char **argv;
10375 {
10376         pthread_t t;
10377
10378         /* create a pipe to select */
10379         if(pipe(&fildes[0])) {
10380                 perror("select");
10381                 exit(1);
10382         }
10383
10384 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10385         (void) pthread_setconcurrency(2);
10386 #else
10387 #ifdef HAVE_THR_SETCONCURRENCY
10388         /* Set Solaris LWP concurrency to 2 */
10389         thr_setconcurrency(2);
10390 #endif
10391 #endif
10392
10393 #if HAVE_PTHREADS_D4
10394         pthread_create(&t, pthread_attr_default, task, NULL);
10395 #else
10396         pthread_create(&t, NULL, task, NULL);
10397 #endif
10398
10399 #if HAVE_SCHED_YIELD
10400         sched_yield();  /* make sure task runs first */
10401 #else
10402 #ifdef HAVE_PTHREAD_YIELD
10403         pthread_yield();        /* make sure task runs first */
10404 #endif
10405 #endif
10406
10407         exit(2);
10408 }
10409 EOF
10410 if { (eval echo configure:10411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10411 then
10412   ol_cv_pthread_select_yields=no
10413 else
10414   echo "configure: failed program was:" >&5
10415   cat conftest.$ac_ext >&5
10416   rm -fr conftest*
10417   ol_cv_pthread_select_yields=yes
10418 fi
10419 rm -fr conftest*
10420 fi
10421
10422 fi
10423
10424 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10425
10426                                 if test $ol_cv_pthread_select_yields = cross ; then
10427                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10428                                 fi
10429
10430                                 if test $ol_cv_pthread_select_yields = yes ; then
10431                                         ol_with_yielding_select=yes
10432                                 fi
10433                         fi
10434
10435                                                 CPPFLAGS="$save_CPPFLAGS"
10436                         LIBS="$save_LIBS"
10437                 else
10438                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10439                 fi
10440         fi
10441
10442         if test $ol_with_threads = posix ; then
10443                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10444         fi
10445 fi
10446
10447 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10448         -o $ol_with_threads = mach ; then
10449
10450                 for ac_hdr in mach/cthreads.h
10451 do
10452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10454 echo "configure:10455: checking for $ac_hdr" >&5
10455 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10456   echo $ac_n "(cached) $ac_c" 1>&6
10457 else
10458   cat > conftest.$ac_ext <<EOF
10459 #line 10460 "configure"
10460 #include "confdefs.h"
10461 #include <$ac_hdr>
10462 EOF
10463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10464 { (eval echo configure:10465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10466 if test -z "$ac_err"; then
10467   rm -rf conftest*
10468   eval "ac_cv_header_$ac_safe=yes"
10469 else
10470   echo "$ac_err" >&5
10471   echo "configure: failed program was:" >&5
10472   cat conftest.$ac_ext >&5
10473   rm -rf conftest*
10474   eval "ac_cv_header_$ac_safe=no"
10475 fi
10476 rm -f conftest*
10477 fi
10478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10479   echo "$ac_t""yes" 1>&6
10480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10481   cat >> confdefs.h <<EOF
10482 #define $ac_tr_hdr 1
10483 EOF
10484  
10485 else
10486   echo "$ac_t""no" 1>&6
10487 fi
10488 done
10489
10490         if test $ac_cv_header_mach_cthreads_h = yes ; then
10491                 ol_with_threads=found
10492
10493                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10494 echo "configure:10495: checking for cthread_fork" >&5
10495 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10496   echo $ac_n "(cached) $ac_c" 1>&6
10497 else
10498   cat > conftest.$ac_ext <<EOF
10499 #line 10500 "configure"
10500 #include "confdefs.h"
10501 /* System header to define __stub macros and hopefully few prototypes,
10502     which can conflict with char cthread_fork(); below.  */
10503 #include <assert.h>
10504 /* Override any gcc2 internal prototype to avoid an error.  */
10505 /* We use char because int might match the return type of a gcc2
10506     builtin and then its argument prototype would still apply.  */
10507 char cthread_fork();
10508 char (*f)();
10509
10510 int main() {
10511
10512 /* The GNU C library defines this for functions which it implements
10513     to always fail with ENOSYS.  Some functions are actually named
10514     something starting with __ and the normal name is an alias.  */
10515 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10516 choke me
10517 #else
10518 f = cthread_fork;
10519 #endif
10520
10521 ; return 0; }
10522 EOF
10523 if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10524   rm -rf conftest*
10525   eval "ac_cv_func_cthread_fork=yes"
10526 else
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   eval "ac_cv_func_cthread_fork=no"
10531 fi
10532 rm -f conftest*
10533 fi
10534
10535 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10536   echo "$ac_t""yes" 1>&6
10537   ol_link_threads=yes
10538 else
10539   echo "$ac_t""no" 1>&6
10540 fi
10541
10542
10543                 if test $ol_link_threads = no ; then
10544                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10545 echo "configure:10546: checking for cthread_fork with -all_load" >&5
10546 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10547   echo $ac_n "(cached) $ac_c" 1>&6
10548 else
10549   
10550                                                                 save_LIBS="$LIBS"
10551                                 LIBS="-all_load $LIBS"
10552                                 cat > conftest.$ac_ext <<EOF
10553 #line 10554 "configure"
10554 #include "confdefs.h"
10555 #include <mach/cthreads.h>
10556 int main() {
10557
10558                                         cthread_fork((void *)0, (void *)0);
10559                                         
10560 ; return 0; }
10561 EOF
10562 if { (eval echo configure:10563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10563   rm -rf conftest*
10564   ol_cv_cthread_all_load=yes
10565 else
10566   echo "configure: failed program was:" >&5
10567   cat conftest.$ac_ext >&5
10568   rm -rf conftest*
10569   ol_cv_cthread_all_load=no
10570 fi
10571 rm -f conftest*
10572                                                                 LIBS="$save_LIBS"
10573                         
10574 fi
10575
10576 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10577
10578                         if test $ol_cv_cthread_all_load = yes ; then
10579                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10580                                 ol_link_threads=mach
10581                         fi
10582                 fi
10583
10584                 if test $ol_link_threads != no ; then
10585                         : check for cthread specific functionality here
10586                         cat >> confdefs.h <<\EOF
10587 #define HAVE_MACH_CTHREADS 1
10588 EOF
10589
10590                 else
10591                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10592                 fi
10593         fi
10594
10595         if test $ol_with_threads = mach ; then
10596                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10597         fi
10598 fi
10599
10600 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10601         -o $ol_with_threads = pth ; then
10602
10603         for ac_hdr in pth.h
10604 do
10605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10607 echo "configure:10608: checking for $ac_hdr" >&5
10608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10609   echo $ac_n "(cached) $ac_c" 1>&6
10610 else
10611   cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614 #include <$ac_hdr>
10615 EOF
10616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10617 { (eval echo configure:10618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10619 if test -z "$ac_err"; then
10620   rm -rf conftest*
10621   eval "ac_cv_header_$ac_safe=yes"
10622 else
10623   echo "$ac_err" >&5
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -rf conftest*
10627   eval "ac_cv_header_$ac_safe=no"
10628 fi
10629 rm -f conftest*
10630 fi
10631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10632   echo "$ac_t""yes" 1>&6
10633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10634   cat >> confdefs.h <<EOF
10635 #define $ac_tr_hdr 1
10636 EOF
10637  
10638 else
10639   echo "$ac_t""no" 1>&6
10640 fi
10641 done
10642
10643
10644         if test $ac_cv_header_pth_h = yes ; then
10645                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10646 echo "configure:10647: checking for pth_version in -lpth" >&5
10647 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10649   echo $ac_n "(cached) $ac_c" 1>&6
10650 else
10651   ac_save_LIBS="$LIBS"
10652 LIBS="-lpth  $LIBS"
10653 cat > conftest.$ac_ext <<EOF
10654 #line 10655 "configure"
10655 #include "confdefs.h"
10656 /* Override any gcc2 internal prototype to avoid an error.  */
10657 /* We use char because int might match the return type of a gcc2
10658     builtin and then its argument prototype would still apply.  */
10659 char pth_version();
10660
10661 int main() {
10662 pth_version()
10663 ; return 0; }
10664 EOF
10665 if { (eval echo configure:10666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10666   rm -rf conftest*
10667   eval "ac_cv_lib_$ac_lib_var=yes"
10668 else
10669   echo "configure: failed program was:" >&5
10670   cat conftest.$ac_ext >&5
10671   rm -rf conftest*
10672   eval "ac_cv_lib_$ac_lib_var=no"
10673 fi
10674 rm -f conftest*
10675 LIBS="$ac_save_LIBS"
10676
10677 fi
10678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10679   echo "$ac_t""yes" 1>&6
10680   have_pth=yes
10681 else
10682   echo "$ac_t""no" 1>&6
10683 have_pth=no
10684 fi
10685
10686
10687                 if test $have_pth = yes ; then
10688                         cat >> confdefs.h <<\EOF
10689 #define HAVE_GNU_PTH 1
10690 EOF
10691
10692                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10693                         ol_link_threads=pth
10694
10695                         if test $ol_with_yielding_select = auto ; then
10696                                 ol_with_yielding_select=yes
10697                         fi
10698                 fi
10699         fi
10700 fi
10701
10702 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10703         -o $ol_with_threads = lwp ; then
10704
10705                 for ac_hdr in thread.h synch.h
10706 do
10707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10709 echo "configure:10710: checking for $ac_hdr" >&5
10710 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10711   echo $ac_n "(cached) $ac_c" 1>&6
10712 else
10713   cat > conftest.$ac_ext <<EOF
10714 #line 10715 "configure"
10715 #include "confdefs.h"
10716 #include <$ac_hdr>
10717 EOF
10718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10719 { (eval echo configure:10720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10721 if test -z "$ac_err"; then
10722   rm -rf conftest*
10723   eval "ac_cv_header_$ac_safe=yes"
10724 else
10725   echo "$ac_err" >&5
10726   echo "configure: failed program was:" >&5
10727   cat conftest.$ac_ext >&5
10728   rm -rf conftest*
10729   eval "ac_cv_header_$ac_safe=no"
10730 fi
10731 rm -f conftest*
10732 fi
10733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10734   echo "$ac_t""yes" 1>&6
10735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10736   cat >> confdefs.h <<EOF
10737 #define $ac_tr_hdr 1
10738 EOF
10739  
10740 else
10741   echo "$ac_t""no" 1>&6
10742 fi
10743 done
10744
10745         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10746                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10747 echo "configure:10748: checking for thr_create in -lthread" >&5
10748 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10750   echo $ac_n "(cached) $ac_c" 1>&6
10751 else
10752   ac_save_LIBS="$LIBS"
10753 LIBS="-lthread  $LIBS"
10754 cat > conftest.$ac_ext <<EOF
10755 #line 10756 "configure"
10756 #include "confdefs.h"
10757 /* Override any gcc2 internal prototype to avoid an error.  */
10758 /* We use char because int might match the return type of a gcc2
10759     builtin and then its argument prototype would still apply.  */
10760 char thr_create();
10761
10762 int main() {
10763 thr_create()
10764 ; return 0; }
10765 EOF
10766 if { (eval echo configure:10767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10767   rm -rf conftest*
10768   eval "ac_cv_lib_$ac_lib_var=yes"
10769 else
10770   echo "configure: failed program was:" >&5
10771   cat conftest.$ac_ext >&5
10772   rm -rf conftest*
10773   eval "ac_cv_lib_$ac_lib_var=no"
10774 fi
10775 rm -f conftest*
10776 LIBS="$ac_save_LIBS"
10777
10778 fi
10779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10780   echo "$ac_t""yes" 1>&6
10781   have_thr=yes
10782 else
10783   echo "$ac_t""no" 1>&6
10784 have_thr=no
10785 fi
10786
10787
10788                 if test $have_thr = yes ; then
10789                         cat >> confdefs.h <<\EOF
10790 #define HAVE_THR 1
10791 EOF
10792
10793                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10794                         ol_link_threads=thr
10795
10796                         if test $ol_with_yielding_select = auto ; then
10797                                 ol_with_yielding_select=yes
10798                         fi
10799
10800                                                 for ac_func in \
10801                                 thr_setconcurrency \
10802                                 thr_getconcurrency \
10803                         
10804 do
10805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10806 echo "configure:10807: checking for $ac_func" >&5
10807 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10808   echo $ac_n "(cached) $ac_c" 1>&6
10809 else
10810   cat > conftest.$ac_ext <<EOF
10811 #line 10812 "configure"
10812 #include "confdefs.h"
10813 /* System header to define __stub macros and hopefully few prototypes,
10814     which can conflict with char $ac_func(); below.  */
10815 #include <assert.h>
10816 /* Override any gcc2 internal prototype to avoid an error.  */
10817 /* We use char because int might match the return type of a gcc2
10818     builtin and then its argument prototype would still apply.  */
10819 char $ac_func();
10820 char (*f)();
10821
10822 int main() {
10823
10824 /* The GNU C library defines this for functions which it implements
10825     to always fail with ENOSYS.  Some functions are actually named
10826     something starting with __ and the normal name is an alias.  */
10827 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10828 choke me
10829 #else
10830 f = $ac_func;
10831 #endif
10832
10833 ; return 0; }
10834 EOF
10835 if { (eval echo configure:10836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10836   rm -rf conftest*
10837   eval "ac_cv_func_$ac_func=yes"
10838 else
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_func_$ac_func=no"
10843 fi
10844 rm -f conftest*
10845 fi
10846
10847 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10848   echo "$ac_t""yes" 1>&6
10849     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10850   cat >> confdefs.h <<EOF
10851 #define $ac_tr_func 1
10852 EOF
10853  
10854 else
10855   echo "$ac_t""no" 1>&6
10856 fi
10857 done
10858
10859                 fi
10860         fi
10861
10862                 for ac_hdr in lwp/lwp.h
10863 do
10864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10866 echo "configure:10867: checking for $ac_hdr" >&5
10867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10868   echo $ac_n "(cached) $ac_c" 1>&6
10869 else
10870   cat > conftest.$ac_ext <<EOF
10871 #line 10872 "configure"
10872 #include "confdefs.h"
10873 #include <$ac_hdr>
10874 EOF
10875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10876 { (eval echo configure:10877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10878 if test -z "$ac_err"; then
10879   rm -rf conftest*
10880   eval "ac_cv_header_$ac_safe=yes"
10881 else
10882   echo "$ac_err" >&5
10883   echo "configure: failed program was:" >&5
10884   cat conftest.$ac_ext >&5
10885   rm -rf conftest*
10886   eval "ac_cv_header_$ac_safe=no"
10887 fi
10888 rm -f conftest*
10889 fi
10890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10891   echo "$ac_t""yes" 1>&6
10892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10893   cat >> confdefs.h <<EOF
10894 #define $ac_tr_hdr 1
10895 EOF
10896  
10897 else
10898   echo "$ac_t""no" 1>&6
10899 fi
10900 done
10901
10902         if test $ac_cv_header_lwp_lwp_h = yes ; then
10903                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10904 echo "configure:10905: checking for lwp_create in -llwp" >&5
10905 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10907   echo $ac_n "(cached) $ac_c" 1>&6
10908 else
10909   ac_save_LIBS="$LIBS"
10910 LIBS="-llwp  $LIBS"
10911 cat > conftest.$ac_ext <<EOF
10912 #line 10913 "configure"
10913 #include "confdefs.h"
10914 /* Override any gcc2 internal prototype to avoid an error.  */
10915 /* We use char because int might match the return type of a gcc2
10916     builtin and then its argument prototype would still apply.  */
10917 char lwp_create();
10918
10919 int main() {
10920 lwp_create()
10921 ; return 0; }
10922 EOF
10923 if { (eval echo configure:10924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10924   rm -rf conftest*
10925   eval "ac_cv_lib_$ac_lib_var=yes"
10926 else
10927   echo "configure: failed program was:" >&5
10928   cat conftest.$ac_ext >&5
10929   rm -rf conftest*
10930   eval "ac_cv_lib_$ac_lib_var=no"
10931 fi
10932 rm -f conftest*
10933 LIBS="$ac_save_LIBS"
10934
10935 fi
10936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10937   echo "$ac_t""yes" 1>&6
10938   have_lwp=yes
10939 else
10940   echo "$ac_t""no" 1>&6
10941 have_lwp=no
10942 fi
10943
10944
10945                 if test $have_lwp = yes ; then
10946                         cat >> confdefs.h <<\EOF
10947 #define HAVE_LWP 1
10948 EOF
10949
10950                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10951                         ol_link_threads=lwp
10952
10953                         if test $ol_with_yielding_select = auto ; then
10954                                 ol_with_yielding_select=no
10955                         fi
10956                 fi
10957         fi
10958 fi
10959
10960 if test $ol_with_yielding_select = yes ; then
10961         cat >> confdefs.h <<\EOF
10962 #define HAVE_YIELDING_SELECT 1
10963 EOF
10964
10965 fi
10966
10967 if test $ol_with_threads = manual ; then
10968                 ol_link_threads=yes
10969
10970         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10971
10972         for ac_hdr in pthread.h sched.h
10973 do
10974 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10975 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10976 echo "configure:10977: checking for $ac_hdr" >&5
10977 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   cat > conftest.$ac_ext <<EOF
10981 #line 10982 "configure"
10982 #include "confdefs.h"
10983 #include <$ac_hdr>
10984 EOF
10985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10986 { (eval echo configure:10987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10988 if test -z "$ac_err"; then
10989   rm -rf conftest*
10990   eval "ac_cv_header_$ac_safe=yes"
10991 else
10992   echo "$ac_err" >&5
10993   echo "configure: failed program was:" >&5
10994   cat conftest.$ac_ext >&5
10995   rm -rf conftest*
10996   eval "ac_cv_header_$ac_safe=no"
10997 fi
10998 rm -f conftest*
10999 fi
11000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11001   echo "$ac_t""yes" 1>&6
11002     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11003   cat >> confdefs.h <<EOF
11004 #define $ac_tr_hdr 1
11005 EOF
11006  
11007 else
11008   echo "$ac_t""no" 1>&6
11009 fi
11010 done
11011
11012         for ac_func in sched_yield pthread_yield
11013 do
11014 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11015 echo "configure:11016: checking for $ac_func" >&5
11016 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11017   echo $ac_n "(cached) $ac_c" 1>&6
11018 else
11019   cat > conftest.$ac_ext <<EOF
11020 #line 11021 "configure"
11021 #include "confdefs.h"
11022 /* System header to define __stub macros and hopefully few prototypes,
11023     which can conflict with char $ac_func(); below.  */
11024 #include <assert.h>
11025 /* Override any gcc2 internal prototype to avoid an error.  */
11026 /* We use char because int might match the return type of a gcc2
11027     builtin and then its argument prototype would still apply.  */
11028 char $ac_func();
11029 char (*f)();
11030
11031 int main() {
11032
11033 /* The GNU C library defines this for functions which it implements
11034     to always fail with ENOSYS.  Some functions are actually named
11035     something starting with __ and the normal name is an alias.  */
11036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11037 choke me
11038 #else
11039 f = $ac_func;
11040 #endif
11041
11042 ; return 0; }
11043 EOF
11044 if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11045   rm -rf conftest*
11046   eval "ac_cv_func_$ac_func=yes"
11047 else
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_func_$ac_func=no"
11052 fi
11053 rm -f conftest*
11054 fi
11055
11056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11057   echo "$ac_t""yes" 1>&6
11058     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11059   cat >> confdefs.h <<EOF
11060 #define $ac_tr_func 1
11061 EOF
11062  
11063 else
11064   echo "$ac_t""no" 1>&6
11065 fi
11066 done
11067
11068         
11069         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11070 echo "configure:11071: checking for LinuxThreads pthread.h" >&5
11071 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11072   echo $ac_n "(cached) $ac_c" 1>&6
11073 else
11074   cat > conftest.$ac_ext <<EOF
11075 #line 11076 "configure"
11076 #include "confdefs.h"
11077 #include <pthread.h>
11078 EOF
11079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11080   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11081   rm -rf conftest*
11082   ol_cv_header_linux_threads=yes
11083 else
11084   rm -rf conftest*
11085   ol_cv_header_linux_threads=no
11086 fi
11087 rm -f conftest*
11088
11089                 
11090 fi
11091
11092 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11093         if test $ol_cv_header_linux_threads = yes; then
11094                 cat >> confdefs.h <<\EOF
11095 #define HAVE_LINUX_THREADS 1
11096 EOF
11097
11098         fi
11099
11100
11101         for ac_hdr in mach/cthreads.h
11102 do
11103 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11104 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11105 echo "configure:11106: checking for $ac_hdr" >&5
11106 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112 #include <$ac_hdr>
11113 EOF
11114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11115 { (eval echo configure:11116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11117 if test -z "$ac_err"; then
11118   rm -rf conftest*
11119   eval "ac_cv_header_$ac_safe=yes"
11120 else
11121   echo "$ac_err" >&5
11122   echo "configure: failed program was:" >&5
11123   cat conftest.$ac_ext >&5
11124   rm -rf conftest*
11125   eval "ac_cv_header_$ac_safe=no"
11126 fi
11127 rm -f conftest*
11128 fi
11129 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11130   echo "$ac_t""yes" 1>&6
11131     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11132   cat >> confdefs.h <<EOF
11133 #define $ac_tr_hdr 1
11134 EOF
11135  
11136 else
11137   echo "$ac_t""no" 1>&6
11138 fi
11139 done
11140
11141         for ac_hdr in lwp/lwp.h
11142 do
11143 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11144 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11145 echo "configure:11146: checking for $ac_hdr" >&5
11146 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11147   echo $ac_n "(cached) $ac_c" 1>&6
11148 else
11149   cat > conftest.$ac_ext <<EOF
11150 #line 11151 "configure"
11151 #include "confdefs.h"
11152 #include <$ac_hdr>
11153 EOF
11154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11155 { (eval echo configure:11156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11157 if test -z "$ac_err"; then
11158   rm -rf conftest*
11159   eval "ac_cv_header_$ac_safe=yes"
11160 else
11161   echo "$ac_err" >&5
11162   echo "configure: failed program was:" >&5
11163   cat conftest.$ac_ext >&5
11164   rm -rf conftest*
11165   eval "ac_cv_header_$ac_safe=no"
11166 fi
11167 rm -f conftest*
11168 fi
11169 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11170   echo "$ac_t""yes" 1>&6
11171     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11172   cat >> confdefs.h <<EOF
11173 #define $ac_tr_hdr 1
11174 EOF
11175  
11176 else
11177   echo "$ac_t""no" 1>&6
11178 fi
11179 done
11180
11181         for ac_hdr in thread.h synch.h
11182 do
11183 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11184 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11185 echo "configure:11186: checking for $ac_hdr" >&5
11186 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11187   echo $ac_n "(cached) $ac_c" 1>&6
11188 else
11189   cat > conftest.$ac_ext <<EOF
11190 #line 11191 "configure"
11191 #include "confdefs.h"
11192 #include <$ac_hdr>
11193 EOF
11194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11195 { (eval echo configure:11196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11197 if test -z "$ac_err"; then
11198   rm -rf conftest*
11199   eval "ac_cv_header_$ac_safe=yes"
11200 else
11201   echo "$ac_err" >&5
11202   echo "configure: failed program was:" >&5
11203   cat conftest.$ac_ext >&5
11204   rm -rf conftest*
11205   eval "ac_cv_header_$ac_safe=no"
11206 fi
11207 rm -f conftest*
11208 fi
11209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11210   echo "$ac_t""yes" 1>&6
11211     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11212   cat >> confdefs.h <<EOF
11213 #define $ac_tr_hdr 1
11214 EOF
11215  
11216 else
11217   echo "$ac_t""no" 1>&6
11218 fi
11219 done
11220
11221 fi
11222
11223 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11224                         cat >> confdefs.h <<\EOF
11225 #define REENTRANT 1
11226 EOF
11227
11228         cat >> confdefs.h <<\EOF
11229 #define _REENTRANT 1
11230 EOF
11231
11232         cat >> confdefs.h <<\EOF
11233 #define THREAD_SAFE 1
11234 EOF
11235
11236         cat >> confdefs.h <<\EOF
11237 #define _THREAD_SAFE 1
11238 EOF
11239
11240         cat >> confdefs.h <<\EOF
11241 #define THREADSAFE 1
11242 EOF
11243
11244         cat >> confdefs.h <<\EOF
11245 #define _THREADSAFE 1
11246 EOF
11247
11248         cat >> confdefs.h <<\EOF
11249 #define _SGI_MP_SOURCE 1
11250 EOF
11251
11252
11253                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11254 echo "configure:11255: checking for thread specific errno" >&5
11255 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11256   echo $ac_n "(cached) $ac_c" 1>&6
11257 else
11258   
11259                 cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 #include <errno.h>
11263 int main() {
11264 errno = 0;
11265 ; return 0; }
11266 EOF
11267 if { (eval echo configure:11268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11268   rm -rf conftest*
11269   ol_cv_errno_thread_specific=yes
11270 else
11271   echo "configure: failed program was:" >&5
11272   cat conftest.$ac_ext >&5
11273   rm -rf conftest*
11274   ol_cv_errno_thread_specific=no
11275 fi
11276 rm -f conftest*
11277         
11278 fi
11279
11280 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11281
11282                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11283 echo "configure:11284: checking for thread specific h_errno" >&5
11284 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11285   echo $ac_n "(cached) $ac_c" 1>&6
11286 else
11287   
11288                 cat > conftest.$ac_ext <<EOF
11289 #line 11290 "configure"
11290 #include "confdefs.h"
11291 #include <netdb.h>
11292 int main() {
11293 h_errno = 0;
11294 ; return 0; }
11295 EOF
11296 if { (eval echo configure:11297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11297   rm -rf conftest*
11298   ol_cv_h_errno_thread_specific=yes
11299 else
11300   echo "configure: failed program was:" >&5
11301   cat conftest.$ac_ext >&5
11302   rm -rf conftest*
11303   ol_cv_h_errno_thread_specific=no
11304 fi
11305 rm -f conftest*
11306         
11307 fi
11308
11309 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11310
11311         if test $ol_cv_errno_thread_specific != yes \
11312                 -o $ol_cv_h_errno_thread_specific != yes ; then
11313                 LIBS="$LTHREAD_LIBS $LIBS"
11314                 LTHREAD_LIBS=""
11315         fi
11316
11317 fi  
11318
11319 if test $ol_link_threads = no ; then
11320         if test $ol_with_threads = yes ; then
11321                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11322         fi
11323
11324         if test $ol_with_threads = auto ; then
11325                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11326                 ol_with_threads=no
11327         fi
11328
11329         cat >> confdefs.h <<\EOF
11330 #define NO_THREADS 1
11331 EOF
11332
11333         LTHREAD_LIBS=""
11334 fi
11335
11336 if test $ol_link_threads != no ; then
11337         cat >> confdefs.h <<\EOF
11338 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11339 EOF
11340
11341 fi
11342
11343 ol_link_ldbm=no 
11344
11345 if test $ol_with_ldbm_api = auto \
11346         -o $ol_with_ldbm_api = berkeley \
11347         -o $ol_with_ldbm_api = bcompat ; then
11348
11349         if test $ol_with_ldbm_api = bcompat; then \
11350                 ol_cv_berkeley_db=no
11351 for ac_hdr in db_185.h db.h
11352 do
11353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11355 echo "configure:11356: checking for $ac_hdr" >&5
11356 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11357   echo $ac_n "(cached) $ac_c" 1>&6
11358 else
11359   cat > conftest.$ac_ext <<EOF
11360 #line 11361 "configure"
11361 #include "confdefs.h"
11362 #include <$ac_hdr>
11363 EOF
11364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11365 { (eval echo configure:11366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11367 if test -z "$ac_err"; then
11368   rm -rf conftest*
11369   eval "ac_cv_header_$ac_safe=yes"
11370 else
11371   echo "$ac_err" >&5
11372   echo "configure: failed program was:" >&5
11373   cat conftest.$ac_ext >&5
11374   rm -rf conftest*
11375   eval "ac_cv_header_$ac_safe=no"
11376 fi
11377 rm -f conftest*
11378 fi
11379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11380   echo "$ac_t""yes" 1>&6
11381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11382   cat >> confdefs.h <<EOF
11383 #define $ac_tr_hdr 1
11384 EOF
11385  
11386 else
11387   echo "$ac_t""no" 1>&6
11388 fi
11389 done
11390
11391 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11392         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11393 echo "configure:11394: checking if Berkeley DB header compatibility" >&5
11394 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11395   echo $ac_n "(cached) $ac_c" 1>&6
11396 else
11397   
11398                 cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401
11402 #if HAVE_DB_185_H
11403 #       include <db_185.h>
11404 #else
11405 #       include <db.h>
11406 #endif
11407
11408  /* this check could be improved */
11409 #ifndef DB_VERSION_MAJOR
11410 #       define DB_VERSION_MAJOR 1
11411 #endif
11412
11413 #if DB_VERSION_MAJOR == 1 
11414         __db_version_1
11415 #endif
11416
11417 EOF
11418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11419   egrep "__db_version_1" >/dev/null 2>&1; then
11420   rm -rf conftest*
11421   ol_cv_header_db1=yes
11422 else
11423   rm -rf conftest*
11424   ol_cv_header_db1=no
11425 fi
11426 rm -f conftest*
11427
11428 fi
11429
11430 echo "$ac_t""$ol_cv_header_db1" 1>&6
11431
11432         if test ol_cv_header_db1=yes ; then
11433                 ol_cv_lib_db=no
11434 if test $ol_cv_lib_db = no ; then
11435         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11436 echo "configure:11437: checking for Berkeley DB link (default)" >&5
11437 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11438   echo $ac_n "(cached) $ac_c" 1>&6
11439 else
11440   
11441         ol_DB_LIB=
11442         ol_LIBS=$LIBS
11443         LIBS="$ol_DB_LIB $LIBS"
11444
11445         cat > conftest.$ac_ext <<EOF
11446 #line 11447 "configure"
11447 #include "confdefs.h"
11448
11449 #ifdef HAVE_DB_185_H
11450 # include <db_185.h>
11451 #else
11452 # include <db.h>
11453 #endif
11454
11455 #ifndef DB_VERSION_MAJOR
11456 # define DB_VERSION_MAJOR 1
11457 #endif
11458
11459 #ifndef NULL
11460 #define NULL ((void*)0)
11461 #endif
11462
11463 int main() {
11464
11465 #if DB_VERSION_MAJOR > 2
11466         db_env_create( NULL, 0 );
11467 #elif DB_VERSION_MAJOR > 1
11468         db_appexit( NULL );
11469 #else
11470         (void) dbopen( NULL, 0, 0, 0, NULL);
11471 #endif
11472
11473 ; return 0; }
11474 EOF
11475 if { (eval echo configure:11476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11476   rm -rf conftest*
11477   ol_cv_db_none=yes
11478 else
11479   echo "configure: failed program was:" >&5
11480   cat conftest.$ac_ext >&5
11481   rm -rf conftest*
11482   ol_cv_db_none=no
11483 fi
11484 rm -f conftest*
11485
11486         LIBS="$ol_LIBS"
11487
11488 fi
11489
11490 echo "$ac_t""$ol_cv_db_none" 1>&6
11491
11492         if test $ol_cv_db_none = yes ; then
11493                 ol_cv_lib_db=yes
11494         fi
11495 fi
11496
11497 if test $ol_cv_lib_db = no ; then
11498         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11499 echo "configure:11500: checking for Berkeley DB link (-ldb)" >&5
11500 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11501   echo $ac_n "(cached) $ac_c" 1>&6
11502 else
11503   
11504         ol_DB_LIB=-ldb
11505         ol_LIBS=$LIBS
11506         LIBS="$ol_DB_LIB $LIBS"
11507
11508         cat > conftest.$ac_ext <<EOF
11509 #line 11510 "configure"
11510 #include "confdefs.h"
11511
11512 #ifdef HAVE_DB_185_H
11513 # include <db_185.h>
11514 #else
11515 # include <db.h>
11516 #endif
11517
11518 #ifndef DB_VERSION_MAJOR
11519 # define DB_VERSION_MAJOR 1
11520 #endif
11521
11522 #ifndef NULL
11523 #define NULL ((void*)0)
11524 #endif
11525
11526 int main() {
11527
11528 #if DB_VERSION_MAJOR > 2
11529         db_env_create( NULL, 0 );
11530 #elif DB_VERSION_MAJOR > 1
11531         db_appexit( NULL );
11532 #else
11533         (void) dbopen( NULL, 0, 0, 0, NULL);
11534 #endif
11535
11536 ; return 0; }
11537 EOF
11538 if { (eval echo configure:11539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11539   rm -rf conftest*
11540   ol_cv_db_db=yes
11541 else
11542   echo "configure: failed program was:" >&5
11543   cat conftest.$ac_ext >&5
11544   rm -rf conftest*
11545   ol_cv_db_db=no
11546 fi
11547 rm -f conftest*
11548
11549         LIBS="$ol_LIBS"
11550
11551 fi
11552
11553 echo "$ac_t""$ol_cv_db_db" 1>&6
11554
11555         if test $ol_cv_db_db = yes ; then
11556                 ol_cv_lib_db=-ldb
11557         fi
11558 fi
11559
11560 if test $ol_cv_lib_db = no ; then
11561         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11562 echo "configure:11563: checking for Berkeley DB link (-ldb3)" >&5
11563 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11564   echo $ac_n "(cached) $ac_c" 1>&6
11565 else
11566   
11567         ol_DB_LIB=-ldb3
11568         ol_LIBS=$LIBS
11569         LIBS="$ol_DB_LIB $LIBS"
11570
11571         cat > conftest.$ac_ext <<EOF
11572 #line 11573 "configure"
11573 #include "confdefs.h"
11574
11575 #ifdef HAVE_DB_185_H
11576 # include <db_185.h>
11577 #else
11578 # include <db.h>
11579 #endif
11580
11581 #ifndef DB_VERSION_MAJOR
11582 # define DB_VERSION_MAJOR 1
11583 #endif
11584
11585 #ifndef NULL
11586 #define NULL ((void*)0)
11587 #endif
11588
11589 int main() {
11590
11591 #if DB_VERSION_MAJOR > 2
11592         db_env_create( NULL, 0 );
11593 #elif DB_VERSION_MAJOR > 1
11594         db_appexit( NULL );
11595 #else
11596         (void) dbopen( NULL, 0, 0, 0, NULL);
11597 #endif
11598
11599 ; return 0; }
11600 EOF
11601 if { (eval echo configure:11602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11602   rm -rf conftest*
11603   ol_cv_db_db3=yes
11604 else
11605   echo "configure: failed program was:" >&5
11606   cat conftest.$ac_ext >&5
11607   rm -rf conftest*
11608   ol_cv_db_db3=no
11609 fi
11610 rm -f conftest*
11611
11612         LIBS="$ol_LIBS"
11613
11614 fi
11615
11616 echo "$ac_t""$ol_cv_db_db3" 1>&6
11617
11618         if test $ol_cv_db_db3 = yes ; then
11619                 ol_cv_lib_db=-ldb3
11620         fi
11621 fi
11622
11623 if test $ol_cv_lib_db = no ; then
11624         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11625 echo "configure:11626: checking for Berkeley DB link (-ldb2)" >&5
11626 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11627   echo $ac_n "(cached) $ac_c" 1>&6
11628 else
11629   
11630         ol_DB_LIB=-ldb2
11631         ol_LIBS=$LIBS
11632         LIBS="$ol_DB_LIB $LIBS"
11633
11634         cat > conftest.$ac_ext <<EOF
11635 #line 11636 "configure"
11636 #include "confdefs.h"
11637
11638 #ifdef HAVE_DB_185_H
11639 # include <db_185.h>
11640 #else
11641 # include <db.h>
11642 #endif
11643
11644 #ifndef DB_VERSION_MAJOR
11645 # define DB_VERSION_MAJOR 1
11646 #endif
11647
11648 #ifndef NULL
11649 #define NULL ((void*)0)
11650 #endif
11651
11652 int main() {
11653
11654 #if DB_VERSION_MAJOR > 2
11655         db_env_create( NULL, 0 );
11656 #elif DB_VERSION_MAJOR > 1
11657         db_appexit( NULL );
11658 #else
11659         (void) dbopen( NULL, 0, 0, 0, NULL);
11660 #endif
11661
11662 ; return 0; }
11663 EOF
11664 if { (eval echo configure:11665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11665   rm -rf conftest*
11666   ol_cv_db_db2=yes
11667 else
11668   echo "configure: failed program was:" >&5
11669   cat conftest.$ac_ext >&5
11670   rm -rf conftest*
11671   ol_cv_db_db2=no
11672 fi
11673 rm -f conftest*
11674
11675         LIBS="$ol_LIBS"
11676
11677 fi
11678
11679 echo "$ac_t""$ol_cv_db_db2" 1>&6
11680
11681         if test $ol_cv_db_db2 = yes ; then
11682                 ol_cv_lib_db=-ldb2
11683         fi
11684 fi
11685
11686 if test $ol_cv_lib_db = no ; then
11687         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11688 echo "configure:11689: checking for Berkeley DB link (-ldb1)" >&5
11689 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11690   echo $ac_n "(cached) $ac_c" 1>&6
11691 else
11692   
11693         ol_DB_LIB=-ldb1
11694         ol_LIBS=$LIBS
11695         LIBS="$ol_DB_LIB $LIBS"
11696
11697         cat > conftest.$ac_ext <<EOF
11698 #line 11699 "configure"
11699 #include "confdefs.h"
11700
11701 #ifdef HAVE_DB_185_H
11702 # include <db_185.h>
11703 #else
11704 # include <db.h>
11705 #endif
11706
11707 #ifndef DB_VERSION_MAJOR
11708 # define DB_VERSION_MAJOR 1
11709 #endif
11710
11711 #ifndef NULL
11712 #define NULL ((void*)0)
11713 #endif
11714
11715 int main() {
11716
11717 #if DB_VERSION_MAJOR > 2
11718         db_env_create( NULL, 0 );
11719 #elif DB_VERSION_MAJOR > 1
11720         db_appexit( NULL );
11721 #else
11722         (void) dbopen( NULL, 0, 0, 0, NULL);
11723 #endif
11724
11725 ; return 0; }
11726 EOF
11727 if { (eval echo configure:11728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11728   rm -rf conftest*
11729   ol_cv_db_db1=yes
11730 else
11731   echo "configure: failed program was:" >&5
11732   cat conftest.$ac_ext >&5
11733   rm -rf conftest*
11734   ol_cv_db_db1=no
11735 fi
11736 rm -f conftest*
11737
11738         LIBS="$ol_LIBS"
11739
11740 fi
11741
11742 echo "$ac_t""$ol_cv_db_db1" 1>&6
11743
11744         if test $ol_cv_db_db1 = yes ; then
11745                 ol_cv_lib_db=-ldb1
11746         fi
11747 fi
11748
11749
11750                 if test "$ol_cv_lib_db" != no ; then
11751                         ol_cv_berkeley_db=yes
11752                 fi
11753         fi
11754 fi
11755
11756         else
11757                 ol_cv_berkeley_db=no
11758 for ac_hdr in db.h
11759 do
11760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11762 echo "configure:11763: checking for $ac_hdr" >&5
11763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11764   echo $ac_n "(cached) $ac_c" 1>&6
11765 else
11766   cat > conftest.$ac_ext <<EOF
11767 #line 11768 "configure"
11768 #include "confdefs.h"
11769 #include <$ac_hdr>
11770 EOF
11771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11772 { (eval echo configure:11773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11774 if test -z "$ac_err"; then
11775   rm -rf conftest*
11776   eval "ac_cv_header_$ac_safe=yes"
11777 else
11778   echo "$ac_err" >&5
11779   echo "configure: failed program was:" >&5
11780   cat conftest.$ac_ext >&5
11781   rm -rf conftest*
11782   eval "ac_cv_header_$ac_safe=no"
11783 fi
11784 rm -f conftest*
11785 fi
11786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11787   echo "$ac_t""yes" 1>&6
11788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11789   cat >> confdefs.h <<EOF
11790 #define $ac_tr_hdr 1
11791 EOF
11792  
11793 else
11794   echo "$ac_t""no" 1>&6
11795 fi
11796 done
11797
11798 if test $ac_cv_header_db_h = yes; then
11799         ol_cv_lib_db=no
11800 if test $ol_cv_lib_db = no ; then
11801         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11802 echo "configure:11803: checking for Berkeley DB link (default)" >&5
11803 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11804   echo $ac_n "(cached) $ac_c" 1>&6
11805 else
11806   
11807         ol_DB_LIB=
11808         ol_LIBS=$LIBS
11809         LIBS="$ol_DB_LIB $LIBS"
11810
11811         cat > conftest.$ac_ext <<EOF
11812 #line 11813 "configure"
11813 #include "confdefs.h"
11814
11815 #ifdef HAVE_DB_185_H
11816 # include <db_185.h>
11817 #else
11818 # include <db.h>
11819 #endif
11820
11821 #ifndef DB_VERSION_MAJOR
11822 # define DB_VERSION_MAJOR 1
11823 #endif
11824
11825 #ifndef NULL
11826 #define NULL ((void*)0)
11827 #endif
11828
11829 int main() {
11830
11831 #if DB_VERSION_MAJOR > 2
11832         db_env_create( NULL, 0 );
11833 #elif DB_VERSION_MAJOR > 1
11834         db_appexit( NULL );
11835 #else
11836         (void) dbopen( NULL, 0, 0, 0, NULL);
11837 #endif
11838
11839 ; return 0; }
11840 EOF
11841 if { (eval echo configure:11842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11842   rm -rf conftest*
11843   ol_cv_db_none=yes
11844 else
11845   echo "configure: failed program was:" >&5
11846   cat conftest.$ac_ext >&5
11847   rm -rf conftest*
11848   ol_cv_db_none=no
11849 fi
11850 rm -f conftest*
11851
11852         LIBS="$ol_LIBS"
11853
11854 fi
11855
11856 echo "$ac_t""$ol_cv_db_none" 1>&6
11857
11858         if test $ol_cv_db_none = yes ; then
11859                 ol_cv_lib_db=yes
11860         fi
11861 fi
11862
11863 if test $ol_cv_lib_db = no ; then
11864         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11865 echo "configure:11866: checking for Berkeley DB link (-ldb)" >&5
11866 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11867   echo $ac_n "(cached) $ac_c" 1>&6
11868 else
11869   
11870         ol_DB_LIB=-ldb
11871         ol_LIBS=$LIBS
11872         LIBS="$ol_DB_LIB $LIBS"
11873
11874         cat > conftest.$ac_ext <<EOF
11875 #line 11876 "configure"
11876 #include "confdefs.h"
11877
11878 #ifdef HAVE_DB_185_H
11879 # include <db_185.h>
11880 #else
11881 # include <db.h>
11882 #endif
11883
11884 #ifndef DB_VERSION_MAJOR
11885 # define DB_VERSION_MAJOR 1
11886 #endif
11887
11888 #ifndef NULL
11889 #define NULL ((void*)0)
11890 #endif
11891
11892 int main() {
11893
11894 #if DB_VERSION_MAJOR > 2
11895         db_env_create( NULL, 0 );
11896 #elif DB_VERSION_MAJOR > 1
11897         db_appexit( NULL );
11898 #else
11899         (void) dbopen( NULL, 0, 0, 0, NULL);
11900 #endif
11901
11902 ; return 0; }
11903 EOF
11904 if { (eval echo configure:11905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11905   rm -rf conftest*
11906   ol_cv_db_db=yes
11907 else
11908   echo "configure: failed program was:" >&5
11909   cat conftest.$ac_ext >&5
11910   rm -rf conftest*
11911   ol_cv_db_db=no
11912 fi
11913 rm -f conftest*
11914
11915         LIBS="$ol_LIBS"
11916
11917 fi
11918
11919 echo "$ac_t""$ol_cv_db_db" 1>&6
11920
11921         if test $ol_cv_db_db = yes ; then
11922                 ol_cv_lib_db=-ldb
11923         fi
11924 fi
11925
11926 if test $ol_cv_lib_db = no ; then
11927         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11928 echo "configure:11929: checking for Berkeley DB link (-ldb3)" >&5
11929 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11930   echo $ac_n "(cached) $ac_c" 1>&6
11931 else
11932   
11933         ol_DB_LIB=-ldb3
11934         ol_LIBS=$LIBS
11935         LIBS="$ol_DB_LIB $LIBS"
11936
11937         cat > conftest.$ac_ext <<EOF
11938 #line 11939 "configure"
11939 #include "confdefs.h"
11940
11941 #ifdef HAVE_DB_185_H
11942 # include <db_185.h>
11943 #else
11944 # include <db.h>
11945 #endif
11946
11947 #ifndef DB_VERSION_MAJOR
11948 # define DB_VERSION_MAJOR 1
11949 #endif
11950
11951 #ifndef NULL
11952 #define NULL ((void*)0)
11953 #endif
11954
11955 int main() {
11956
11957 #if DB_VERSION_MAJOR > 2
11958         db_env_create( NULL, 0 );
11959 #elif DB_VERSION_MAJOR > 1
11960         db_appexit( NULL );
11961 #else
11962         (void) dbopen( NULL, 0, 0, 0, NULL);
11963 #endif
11964
11965 ; return 0; }
11966 EOF
11967 if { (eval echo configure:11968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11968   rm -rf conftest*
11969   ol_cv_db_db3=yes
11970 else
11971   echo "configure: failed program was:" >&5
11972   cat conftest.$ac_ext >&5
11973   rm -rf conftest*
11974   ol_cv_db_db3=no
11975 fi
11976 rm -f conftest*
11977
11978         LIBS="$ol_LIBS"
11979
11980 fi
11981
11982 echo "$ac_t""$ol_cv_db_db3" 1>&6
11983
11984         if test $ol_cv_db_db3 = yes ; then
11985                 ol_cv_lib_db=-ldb3
11986         fi
11987 fi
11988
11989 if test $ol_cv_lib_db = no ; then
11990         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11991 echo "configure:11992: checking for Berkeley DB link (-ldb2)" >&5
11992 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11993   echo $ac_n "(cached) $ac_c" 1>&6
11994 else
11995   
11996         ol_DB_LIB=-ldb2
11997         ol_LIBS=$LIBS
11998         LIBS="$ol_DB_LIB $LIBS"
11999
12000         cat > conftest.$ac_ext <<EOF
12001 #line 12002 "configure"
12002 #include "confdefs.h"
12003
12004 #ifdef HAVE_DB_185_H
12005 # include <db_185.h>
12006 #else
12007 # include <db.h>
12008 #endif
12009
12010 #ifndef DB_VERSION_MAJOR
12011 # define DB_VERSION_MAJOR 1
12012 #endif
12013
12014 #ifndef NULL
12015 #define NULL ((void*)0)
12016 #endif
12017
12018 int main() {
12019
12020 #if DB_VERSION_MAJOR > 2
12021         db_env_create( NULL, 0 );
12022 #elif DB_VERSION_MAJOR > 1
12023         db_appexit( NULL );
12024 #else
12025         (void) dbopen( NULL, 0, 0, 0, NULL);
12026 #endif
12027
12028 ; return 0; }
12029 EOF
12030 if { (eval echo configure:12031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12031   rm -rf conftest*
12032   ol_cv_db_db2=yes
12033 else
12034   echo "configure: failed program was:" >&5
12035   cat conftest.$ac_ext >&5
12036   rm -rf conftest*
12037   ol_cv_db_db2=no
12038 fi
12039 rm -f conftest*
12040
12041         LIBS="$ol_LIBS"
12042
12043 fi
12044
12045 echo "$ac_t""$ol_cv_db_db2" 1>&6
12046
12047         if test $ol_cv_db_db2 = yes ; then
12048                 ol_cv_lib_db=-ldb2
12049         fi
12050 fi
12051
12052 if test $ol_cv_lib_db = no ; then
12053         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12054 echo "configure:12055: checking for Berkeley DB link (-ldb1)" >&5
12055 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12056   echo $ac_n "(cached) $ac_c" 1>&6
12057 else
12058   
12059         ol_DB_LIB=-ldb1
12060         ol_LIBS=$LIBS
12061         LIBS="$ol_DB_LIB $LIBS"
12062
12063         cat > conftest.$ac_ext <<EOF
12064 #line 12065 "configure"
12065 #include "confdefs.h"
12066
12067 #ifdef HAVE_DB_185_H
12068 # include <db_185.h>
12069 #else
12070 # include <db.h>
12071 #endif
12072
12073 #ifndef DB_VERSION_MAJOR
12074 # define DB_VERSION_MAJOR 1
12075 #endif
12076
12077 #ifndef NULL
12078 #define NULL ((void*)0)
12079 #endif
12080
12081 int main() {
12082
12083 #if DB_VERSION_MAJOR > 2
12084         db_env_create( NULL, 0 );
12085 #elif DB_VERSION_MAJOR > 1
12086         db_appexit( NULL );
12087 #else
12088         (void) dbopen( NULL, 0, 0, 0, NULL);
12089 #endif
12090
12091 ; return 0; }
12092 EOF
12093 if { (eval echo configure:12094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12094   rm -rf conftest*
12095   ol_cv_db_db1=yes
12096 else
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   rm -rf conftest*
12100   ol_cv_db_db1=no
12101 fi
12102 rm -f conftest*
12103
12104         LIBS="$ol_LIBS"
12105
12106 fi
12107
12108 echo "$ac_t""$ol_cv_db_db1" 1>&6
12109
12110         if test $ol_cv_db_db1 = yes ; then
12111                 ol_cv_lib_db=-ldb1
12112         fi
12113 fi
12114
12115
12116         if test "$ol_cv_lib_db" != no ; then
12117                 ol_cv_berkeley_db=yes
12118                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12119 echo "configure:12120: checking for Berkeley DB thread support" >&5
12120 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12121   echo $ac_n "(cached) $ac_c" 1>&6
12122 else
12123   
12124         ol_LIBS="$LIBS"
12125         if test $ol_cv_lib_db != yes ; then
12126                 LIBS="$ol_cv_lib_db"
12127         fi
12128
12129         if test "$cross_compiling" = yes; then
12130   ol_cv_berkeley_db_thread=cross
12131 else
12132   cat > conftest.$ac_ext <<EOF
12133 #line 12134 "configure"
12134 #include "confdefs.h"
12135
12136 #ifdef HAVE_DB_185_H
12137         choke me;
12138 #else
12139 #include <db.h>
12140 #endif
12141 #ifndef NULL
12142 #define NULL ((void *)0)
12143 #endif
12144 main()
12145 {
12146         int rc;
12147         u_int32_t flags = DB_CREATE | DB_THREAD;
12148
12149
12150 #if DB_VERSION_MAJOR > 2
12151         DB_ENV *env = NULL;
12152
12153         rc = db_env_create( &env, 0 );
12154
12155         if( rc == 0 ) {
12156                 rc = env->open( env, NULL, NULL, flags, 0 );
12157         }
12158
12159 #else
12160         DB_ENV env;
12161         memset( &env, '\0', sizeof(env) );
12162
12163         rc = db_appinit( NULL, NULL, &env, flags );
12164
12165         if( rc == 0 ) {
12166                 db_appexit( &env );
12167         }
12168 #endif
12169
12170         return rc;
12171 }
12172 EOF
12173 if { (eval echo configure:12174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12174 then
12175   ol_cv_berkeley_db_thread=yes
12176 else
12177   echo "configure: failed program was:" >&5
12178   cat conftest.$ac_ext >&5
12179   rm -fr conftest*
12180   ol_cv_berkeley_db_thread=no
12181 fi
12182 rm -fr conftest*
12183 fi
12184
12185
12186         LIBS="$ol_LIBS"
12187
12188         if test $ol_cv_berkeley_db_thread != no ; then
12189                 cat >> confdefs.h <<\EOF
12190 #define HAVE_BERKELEY_DB_THREAD 1
12191 EOF
12192
12193         fi
12194
12195 fi
12196
12197 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12198         fi
12199 fi
12200
12201         fi
12202
12203         if test $ol_cv_berkeley_db != no ; then
12204                 cat >> confdefs.h <<\EOF
12205 #define HAVE_BERKELEY_DB 1
12206 EOF
12207
12208
12209                 ol_link_ldbm=berkeley
12210                 ol_with_ldbm_api=db
12211
12212                 if test $ol_with_ldbm_type = hash ; then
12213                         cat >> confdefs.h <<\EOF
12214 #define LDBM_USE_DBHASH 1
12215 EOF
12216
12217                 else
12218                         cat >> confdefs.h <<\EOF
12219 #define LDBM_USE_DBBTREE 1
12220 EOF
12221
12222                 fi
12223
12224                                                 if test $ol_cv_lib_db != yes ; then
12225                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12226                 fi
12227         fi
12228 fi
12229
12230 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12231         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12232         ol_with_ldbm_api=none
12233 fi
12234
12235 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12236         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12237 echo "configure:12238: checking for MDBM library" >&5
12238 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12239   echo $ac_n "(cached) $ac_c" 1>&6
12240 else
12241         ol_LIBS="$LIBS"
12242         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12243 echo "configure:12244: checking for mdbm_set_chain" >&5
12244 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12245   echo $ac_n "(cached) $ac_c" 1>&6
12246 else
12247   cat > conftest.$ac_ext <<EOF
12248 #line 12249 "configure"
12249 #include "confdefs.h"
12250 /* System header to define __stub macros and hopefully few prototypes,
12251     which can conflict with char mdbm_set_chain(); below.  */
12252 #include <assert.h>
12253 /* Override any gcc2 internal prototype to avoid an error.  */
12254 /* We use char because int might match the return type of a gcc2
12255     builtin and then its argument prototype would still apply.  */
12256 char mdbm_set_chain();
12257 char (*f)();
12258
12259 int main() {
12260
12261 /* The GNU C library defines this for functions which it implements
12262     to always fail with ENOSYS.  Some functions are actually named
12263     something starting with __ and the normal name is an alias.  */
12264 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12265 choke me
12266 #else
12267 f = mdbm_set_chain;
12268 #endif
12269
12270 ; return 0; }
12271 EOF
12272 if { (eval echo configure:12273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12273   rm -rf conftest*
12274   eval "ac_cv_func_mdbm_set_chain=yes"
12275 else
12276   echo "configure: failed program was:" >&5
12277   cat conftest.$ac_ext >&5
12278   rm -rf conftest*
12279   eval "ac_cv_func_mdbm_set_chain=no"
12280 fi
12281 rm -f conftest*
12282 fi
12283
12284 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12285   echo "$ac_t""yes" 1>&6
12286   ol_cv_lib_mdbm=yes
12287 else
12288   echo "$ac_t""no" 1>&6
12289
12290                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12291 echo "configure:12292: checking for mdbm_set_chain in -lmdbm" >&5
12292 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12293 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12294   echo $ac_n "(cached) $ac_c" 1>&6
12295 else
12296   ac_save_LIBS="$LIBS"
12297 LIBS="-lmdbm  $LIBS"
12298 cat > conftest.$ac_ext <<EOF
12299 #line 12300 "configure"
12300 #include "confdefs.h"
12301 /* Override any gcc2 internal prototype to avoid an error.  */
12302 /* We use char because int might match the return type of a gcc2
12303     builtin and then its argument prototype would still apply.  */
12304 char mdbm_set_chain();
12305
12306 int main() {
12307 mdbm_set_chain()
12308 ; return 0; }
12309 EOF
12310 if { (eval echo configure:12311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12311   rm -rf conftest*
12312   eval "ac_cv_lib_$ac_lib_var=yes"
12313 else
12314   echo "configure: failed program was:" >&5
12315   cat conftest.$ac_ext >&5
12316   rm -rf conftest*
12317   eval "ac_cv_lib_$ac_lib_var=no"
12318 fi
12319 rm -f conftest*
12320 LIBS="$ac_save_LIBS"
12321
12322 fi
12323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12324   echo "$ac_t""yes" 1>&6
12325   ol_cv_lib_mdbm=-lmdbm
12326 else
12327   echo "$ac_t""no" 1>&6
12328 ol_cv_lib_mdbm=no
12329 fi
12330
12331         
12332 fi
12333
12334         LIBS="$ol_LIBS"
12335
12336 fi
12337
12338 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12339
12340
12341  for ac_hdr in mdbm.h
12342 do
12343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12345 echo "configure:12346: checking for $ac_hdr" >&5
12346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12347   echo $ac_n "(cached) $ac_c" 1>&6
12348 else
12349   cat > conftest.$ac_ext <<EOF
12350 #line 12351 "configure"
12351 #include "confdefs.h"
12352 #include <$ac_hdr>
12353 EOF
12354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12355 { (eval echo configure:12356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12357 if test -z "$ac_err"; then
12358   rm -rf conftest*
12359   eval "ac_cv_header_$ac_safe=yes"
12360 else
12361   echo "$ac_err" >&5
12362   echo "configure: failed program was:" >&5
12363   cat conftest.$ac_ext >&5
12364   rm -rf conftest*
12365   eval "ac_cv_header_$ac_safe=no"
12366 fi
12367 rm -f conftest*
12368 fi
12369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12370   echo "$ac_t""yes" 1>&6
12371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12372   cat >> confdefs.h <<EOF
12373 #define $ac_tr_hdr 1
12374 EOF
12375  
12376 else
12377   echo "$ac_t""no" 1>&6
12378 fi
12379 done
12380
12381  echo $ac_n "checking for db""... $ac_c" 1>&6
12382 echo "configure:12383: checking for db" >&5
12383 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12384   echo $ac_n "(cached) $ac_c" 1>&6
12385 else
12386   
12387         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12388                 ol_cv_mdbm=no
12389         else
12390                 ol_cv_mdbm=yes
12391         fi
12392
12393 fi
12394
12395 echo "$ac_t""$ol_cv_mdbm" 1>&6
12396  if test $ol_cv_mdbm = yes ; then
12397         cat >> confdefs.h <<\EOF
12398 #define HAVE_MDBM 1
12399 EOF
12400
12401  fi
12402
12403
12404         if test $ol_cv_mdbm = yes ; then
12405                 ol_link_ldbm=mdbm
12406                 ol_with_ldbm_api=mdbm
12407                 if test $ol_cv_lib_mdbm != yes ; then
12408                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12409                 fi
12410         fi
12411 fi
12412
12413 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12414         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12415 echo "configure:12416: checking for GDBM library" >&5
12416 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12417   echo $ac_n "(cached) $ac_c" 1>&6
12418 else
12419         ol_LIBS="$LIBS"
12420         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12421 echo "configure:12422: checking for gdbm_open" >&5
12422 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12423   echo $ac_n "(cached) $ac_c" 1>&6
12424 else
12425   cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 /* System header to define __stub macros and hopefully few prototypes,
12429     which can conflict with char gdbm_open(); below.  */
12430 #include <assert.h>
12431 /* Override any gcc2 internal prototype to avoid an error.  */
12432 /* We use char because int might match the return type of a gcc2
12433     builtin and then its argument prototype would still apply.  */
12434 char gdbm_open();
12435 char (*f)();
12436
12437 int main() {
12438
12439 /* The GNU C library defines this for functions which it implements
12440     to always fail with ENOSYS.  Some functions are actually named
12441     something starting with __ and the normal name is an alias.  */
12442 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12443 choke me
12444 #else
12445 f = gdbm_open;
12446 #endif
12447
12448 ; return 0; }
12449 EOF
12450 if { (eval echo configure:12451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12451   rm -rf conftest*
12452   eval "ac_cv_func_gdbm_open=yes"
12453 else
12454   echo "configure: failed program was:" >&5
12455   cat conftest.$ac_ext >&5
12456   rm -rf conftest*
12457   eval "ac_cv_func_gdbm_open=no"
12458 fi
12459 rm -f conftest*
12460 fi
12461
12462 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12463   echo "$ac_t""yes" 1>&6
12464   ol_cv_lib_gdbm=yes
12465 else
12466   echo "$ac_t""no" 1>&6
12467
12468                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12469 echo "configure:12470: checking for gdbm_open in -lgdbm" >&5
12470 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12471 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12472   echo $ac_n "(cached) $ac_c" 1>&6
12473 else
12474   ac_save_LIBS="$LIBS"
12475 LIBS="-lgdbm  $LIBS"
12476 cat > conftest.$ac_ext <<EOF
12477 #line 12478 "configure"
12478 #include "confdefs.h"
12479 /* Override any gcc2 internal prototype to avoid an error.  */
12480 /* We use char because int might match the return type of a gcc2
12481     builtin and then its argument prototype would still apply.  */
12482 char gdbm_open();
12483
12484 int main() {
12485 gdbm_open()
12486 ; return 0; }
12487 EOF
12488 if { (eval echo configure:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12489   rm -rf conftest*
12490   eval "ac_cv_lib_$ac_lib_var=yes"
12491 else
12492   echo "configure: failed program was:" >&5
12493   cat conftest.$ac_ext >&5
12494   rm -rf conftest*
12495   eval "ac_cv_lib_$ac_lib_var=no"
12496 fi
12497 rm -f conftest*
12498 LIBS="$ac_save_LIBS"
12499
12500 fi
12501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12502   echo "$ac_t""yes" 1>&6
12503   ol_cv_lib_gdbm=-lgdbm
12504 else
12505   echo "$ac_t""no" 1>&6
12506 ol_cv_lib_gdbm=no
12507 fi
12508
12509         
12510 fi
12511
12512         LIBS="$ol_LIBS"
12513
12514 fi
12515
12516 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12517
12518
12519  for ac_hdr in gdbm.h
12520 do
12521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12523 echo "configure:12524: checking for $ac_hdr" >&5
12524 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12525   echo $ac_n "(cached) $ac_c" 1>&6
12526 else
12527   cat > conftest.$ac_ext <<EOF
12528 #line 12529 "configure"
12529 #include "confdefs.h"
12530 #include <$ac_hdr>
12531 EOF
12532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12533 { (eval echo configure:12534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12535 if test -z "$ac_err"; then
12536   rm -rf conftest*
12537   eval "ac_cv_header_$ac_safe=yes"
12538 else
12539   echo "$ac_err" >&5
12540   echo "configure: failed program was:" >&5
12541   cat conftest.$ac_ext >&5
12542   rm -rf conftest*
12543   eval "ac_cv_header_$ac_safe=no"
12544 fi
12545 rm -f conftest*
12546 fi
12547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12548   echo "$ac_t""yes" 1>&6
12549     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12550   cat >> confdefs.h <<EOF
12551 #define $ac_tr_hdr 1
12552 EOF
12553  
12554 else
12555   echo "$ac_t""no" 1>&6
12556 fi
12557 done
12558
12559  echo $ac_n "checking for db""... $ac_c" 1>&6
12560 echo "configure:12561: checking for db" >&5
12561 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12562   echo $ac_n "(cached) $ac_c" 1>&6
12563 else
12564   
12565         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12566                 ol_cv_gdbm=no
12567         else
12568                 ol_cv_gdbm=yes
12569         fi
12570
12571 fi
12572
12573 echo "$ac_t""$ol_cv_gdbm" 1>&6
12574  if test $ol_cv_gdbm = yes ; then
12575         cat >> confdefs.h <<\EOF
12576 #define HAVE_GDBM 1
12577 EOF
12578
12579  fi
12580
12581
12582         if test $ol_cv_gdbm = yes ; then
12583                 ol_link_ldbm=gdbm
12584                 ol_with_ldbm_api=gdbm
12585
12586                 if test $ol_cv_lib_gdbm != yes ; then
12587                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12588                 fi
12589         fi
12590 fi
12591
12592 if test $ol_with_ldbm_api = ndbm ; then
12593         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12594 echo "configure:12595: checking for NDBM library" >&5
12595 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12596   echo $ac_n "(cached) $ac_c" 1>&6
12597 else
12598         ol_LIBS="$LIBS"
12599         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12600 echo "configure:12601: checking for dbm_open" >&5
12601 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12602   echo $ac_n "(cached) $ac_c" 1>&6
12603 else
12604   cat > conftest.$ac_ext <<EOF
12605 #line 12606 "configure"
12606 #include "confdefs.h"
12607 /* System header to define __stub macros and hopefully few prototypes,
12608     which can conflict with char dbm_open(); below.  */
12609 #include <assert.h>
12610 /* Override any gcc2 internal prototype to avoid an error.  */
12611 /* We use char because int might match the return type of a gcc2
12612     builtin and then its argument prototype would still apply.  */
12613 char dbm_open();
12614 char (*f)();
12615
12616 int main() {
12617
12618 /* The GNU C library defines this for functions which it implements
12619     to always fail with ENOSYS.  Some functions are actually named
12620     something starting with __ and the normal name is an alias.  */
12621 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12622 choke me
12623 #else
12624 f = dbm_open;
12625 #endif
12626
12627 ; return 0; }
12628 EOF
12629 if { (eval echo configure:12630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12630   rm -rf conftest*
12631   eval "ac_cv_func_dbm_open=yes"
12632 else
12633   echo "configure: failed program was:" >&5
12634   cat conftest.$ac_ext >&5
12635   rm -rf conftest*
12636   eval "ac_cv_func_dbm_open=no"
12637 fi
12638 rm -f conftest*
12639 fi
12640
12641 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12642   echo "$ac_t""yes" 1>&6
12643   ol_cv_lib_ndbm=yes
12644 else
12645   echo "$ac_t""no" 1>&6
12646
12647                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12648 echo "configure:12649: checking for dbm_open in -lndbm" >&5
12649 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12650 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12651   echo $ac_n "(cached) $ac_c" 1>&6
12652 else
12653   ac_save_LIBS="$LIBS"
12654 LIBS="-lndbm  $LIBS"
12655 cat > conftest.$ac_ext <<EOF
12656 #line 12657 "configure"
12657 #include "confdefs.h"
12658 /* Override any gcc2 internal prototype to avoid an error.  */
12659 /* We use char because int might match the return type of a gcc2
12660     builtin and then its argument prototype would still apply.  */
12661 char dbm_open();
12662
12663 int main() {
12664 dbm_open()
12665 ; return 0; }
12666 EOF
12667 if { (eval echo configure:12668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12668   rm -rf conftest*
12669   eval "ac_cv_lib_$ac_lib_var=yes"
12670 else
12671   echo "configure: failed program was:" >&5
12672   cat conftest.$ac_ext >&5
12673   rm -rf conftest*
12674   eval "ac_cv_lib_$ac_lib_var=no"
12675 fi
12676 rm -f conftest*
12677 LIBS="$ac_save_LIBS"
12678
12679 fi
12680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12681   echo "$ac_t""yes" 1>&6
12682   ol_cv_lib_ndbm=-lndbm
12683 else
12684   echo "$ac_t""no" 1>&6
12685
12686                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12687 echo "configure:12688: checking for dbm_open in -ldbm" >&5
12688 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12690   echo $ac_n "(cached) $ac_c" 1>&6
12691 else
12692   ac_save_LIBS="$LIBS"
12693 LIBS="-ldbm  $LIBS"
12694 cat > conftest.$ac_ext <<EOF
12695 #line 12696 "configure"
12696 #include "confdefs.h"
12697 /* Override any gcc2 internal prototype to avoid an error.  */
12698 /* We use char because int might match the return type of a gcc2
12699     builtin and then its argument prototype would still apply.  */
12700 char dbm_open();
12701
12702 int main() {
12703 dbm_open()
12704 ; return 0; }
12705 EOF
12706 if { (eval echo configure:12707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12707   rm -rf conftest*
12708   eval "ac_cv_lib_$ac_lib_var=yes"
12709 else
12710   echo "configure: failed program was:" >&5
12711   cat conftest.$ac_ext >&5
12712   rm -rf conftest*
12713   eval "ac_cv_lib_$ac_lib_var=no"
12714 fi
12715 rm -f conftest*
12716 LIBS="$ac_save_LIBS"
12717
12718 fi
12719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12720   echo "$ac_t""yes" 1>&6
12721   ol_cv_lib_ndbm=-ldbm
12722 else
12723   echo "$ac_t""no" 1>&6
12724 ol_cv_lib_ndbm=no
12725 fi
12726                 
12727 fi
12728
12729         
12730 fi
12731
12732         LIBS="$ol_LIBS"
12733
12734 fi
12735
12736 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12737
12738
12739  for ac_hdr in ndbm.h
12740 do
12741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12743 echo "configure:12744: checking for $ac_hdr" >&5
12744 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12745   echo $ac_n "(cached) $ac_c" 1>&6
12746 else
12747   cat > conftest.$ac_ext <<EOF
12748 #line 12749 "configure"
12749 #include "confdefs.h"
12750 #include <$ac_hdr>
12751 EOF
12752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12753 { (eval echo configure:12754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12755 if test -z "$ac_err"; then
12756   rm -rf conftest*
12757   eval "ac_cv_header_$ac_safe=yes"
12758 else
12759   echo "$ac_err" >&5
12760   echo "configure: failed program was:" >&5
12761   cat conftest.$ac_ext >&5
12762   rm -rf conftest*
12763   eval "ac_cv_header_$ac_safe=no"
12764 fi
12765 rm -f conftest*
12766 fi
12767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12768   echo "$ac_t""yes" 1>&6
12769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12770   cat >> confdefs.h <<EOF
12771 #define $ac_tr_hdr 1
12772 EOF
12773  
12774 else
12775   echo "$ac_t""no" 1>&6
12776 fi
12777 done
12778
12779  echo $ac_n "checking for db""... $ac_c" 1>&6
12780 echo "configure:12781: checking for db" >&5
12781 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12782   echo $ac_n "(cached) $ac_c" 1>&6
12783 else
12784   
12785         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12786                 ol_cv_ndbm=no
12787         else
12788                 ol_cv_ndbm=yes
12789         fi
12790
12791 fi
12792
12793 echo "$ac_t""$ol_cv_ndbm" 1>&6
12794  if test $ol_cv_ndbm = yes ; then
12795         cat >> confdefs.h <<\EOF
12796 #define HAVE_NDBM 1
12797 EOF
12798
12799  fi
12800
12801
12802         if test $ol_cv_ndbm = yes ; then
12803                 ol_link_ldbm=ndbm
12804                 ol_with_ldbm_api=ndbm
12805
12806                 if test $ol_cv_lib_ndbm != yes ; then
12807                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12808                 fi
12809         fi
12810 fi
12811
12812 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12813         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12814         if test $ol_enable_ldbm = yes ; then
12815                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12816         fi
12817
12818         echo "configure: warning: disabling LDBM" 1>&2
12819         ol_enable_ldbm=no
12820 fi
12821
12822 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12823         LINK_BINS_DYNAMIC="yes"
12824 else
12825         LINK_BINS_DYNAMIC="no"
12826 fi
12827
12828 if test $ol_enable_wrappers != no ; then
12829         for ac_hdr in tcpd.h
12830 do
12831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12833 echo "configure:12834: checking for $ac_hdr" >&5
12834 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12835   echo $ac_n "(cached) $ac_c" 1>&6
12836 else
12837   cat > conftest.$ac_ext <<EOF
12838 #line 12839 "configure"
12839 #include "confdefs.h"
12840 #include <$ac_hdr>
12841 EOF
12842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12843 { (eval echo configure:12844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12845 if test -z "$ac_err"; then
12846   rm -rf conftest*
12847   eval "ac_cv_header_$ac_safe=yes"
12848 else
12849   echo "$ac_err" >&5
12850   echo "configure: failed program was:" >&5
12851   cat conftest.$ac_ext >&5
12852   rm -rf conftest*
12853   eval "ac_cv_header_$ac_safe=no"
12854 fi
12855 rm -f conftest*
12856 fi
12857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12858   echo "$ac_t""yes" 1>&6
12859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12860   cat >> confdefs.h <<EOF
12861 #define $ac_tr_hdr 1
12862 EOF
12863  
12864 else
12865   echo "$ac_t""no" 1>&6
12866 fi
12867 done
12868
12869
12870         if test $ac_cv_header_tcpd_h != yes ; then
12871                 have_wrappers=no
12872         else
12873                 cat > conftest.$ac_ext <<EOF
12874 #line 12875 "configure"
12875 #include "confdefs.h"
12876
12877 int allow_severity = 0;
12878 int deny_severity  = 0;
12879                 
12880 int main() {
12881 hosts_access()
12882 ; return 0; }
12883 EOF
12884 if { (eval echo configure:12885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12885   rm -rf conftest*
12886   have_wrappers=yes
12887 else
12888   echo "configure: failed program was:" >&5
12889   cat conftest.$ac_ext >&5
12890   rm -rf conftest*
12891   have_wrappers=no
12892 fi
12893 rm -f conftest*
12894         fi
12895
12896         if test $have_wrappers = yes ; then
12897                 cat >> confdefs.h <<\EOF
12898 #define HAVE_TCPD 1
12899 EOF
12900
12901                 WRAP_LIBS="-lwrap"
12902
12903                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12904 echo "configure:12905: checking for main in -lnsl" >&5
12905 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12907   echo $ac_n "(cached) $ac_c" 1>&6
12908 else
12909   ac_save_LIBS="$LIBS"
12910 LIBS="-lnsl  $LIBS"
12911 cat > conftest.$ac_ext <<EOF
12912 #line 12913 "configure"
12913 #include "confdefs.h"
12914
12915 int main() {
12916 main()
12917 ; return 0; }
12918 EOF
12919 if { (eval echo configure:12920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12920   rm -rf conftest*
12921   eval "ac_cv_lib_$ac_lib_var=yes"
12922 else
12923   echo "configure: failed program was:" >&5
12924   cat conftest.$ac_ext >&5
12925   rm -rf conftest*
12926   eval "ac_cv_lib_$ac_lib_var=no"
12927 fi
12928 rm -f conftest*
12929 LIBS="$ac_save_LIBS"
12930
12931 fi
12932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12933   echo "$ac_t""yes" 1>&6
12934     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12935     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12936   cat >> confdefs.h <<EOF
12937 #define $ac_tr_lib 1
12938 EOF
12939
12940   LIBS="-lnsl $LIBS"
12941
12942 else
12943   echo "$ac_t""no" 1>&6
12944 fi
12945
12946         else
12947                 echo "configure: warning: could not find -lwrap" 1>&2
12948                 if test $ol_enable_wrappers = yes ; then
12949                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12950                 fi
12951
12952                 echo "configure: warning: disabling wrappers support" 1>&2
12953                 ol_enable_wrappers=no
12954                 WRAP_LIBS=""
12955         fi
12956 fi
12957
12958 if test $ol_enable_syslog != no ; then
12959         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12960 echo "configure:12961: checking for openlog" >&5
12961 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12962   echo $ac_n "(cached) $ac_c" 1>&6
12963 else
12964   cat > conftest.$ac_ext <<EOF
12965 #line 12966 "configure"
12966 #include "confdefs.h"
12967 /* System header to define __stub macros and hopefully few prototypes,
12968     which can conflict with char openlog(); below.  */
12969 #include <assert.h>
12970 /* Override any gcc2 internal prototype to avoid an error.  */
12971 /* We use char because int might match the return type of a gcc2
12972     builtin and then its argument prototype would still apply.  */
12973 char openlog();
12974 char (*f)();
12975
12976 int main() {
12977
12978 /* The GNU C library defines this for functions which it implements
12979     to always fail with ENOSYS.  Some functions are actually named
12980     something starting with __ and the normal name is an alias.  */
12981 #if defined (__stub_openlog) || defined (__stub___openlog)
12982 choke me
12983 #else
12984 f = openlog;
12985 #endif
12986
12987 ; return 0; }
12988 EOF
12989 if { (eval echo configure:12990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12990   rm -rf conftest*
12991   eval "ac_cv_func_openlog=yes"
12992 else
12993   echo "configure: failed program was:" >&5
12994   cat conftest.$ac_ext >&5
12995   rm -rf conftest*
12996   eval "ac_cv_func_openlog=no"
12997 fi
12998 rm -f conftest*
12999 fi
13000
13001 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13002   echo "$ac_t""yes" 1>&6
13003   :
13004 else
13005   echo "$ac_t""no" 1>&6
13006 fi
13007
13008         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13009                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13010         fi
13011         ol_enable_syslog=$ac_cv_func_openlog
13012 fi
13013
13014 if test $ol_enable_tcl != no ; then
13015         for ac_hdr in tcl.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 \"\${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 $ac_cv_header_tcl_h != yes ; then
13057                 have_tcl=no
13058         else
13059                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13060                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13061 echo "configure:13062: checking for main in -l$lib" >&5
13062 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13064   echo $ac_n "(cached) $ac_c" 1>&6
13065 else
13066   ac_save_LIBS="$LIBS"
13067 LIBS="-l$lib  $LIBS"
13068 cat > conftest.$ac_ext <<EOF
13069 #line 13070 "configure"
13070 #include "confdefs.h"
13071
13072 int main() {
13073 main()
13074 ; return 0; }
13075 EOF
13076 if { (eval echo configure:13077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13077   rm -rf conftest*
13078   eval "ac_cv_lib_$ac_lib_var=yes"
13079 else
13080   echo "configure: failed program was:" >&5
13081   cat conftest.$ac_ext >&5
13082   rm -rf conftest*
13083   eval "ac_cv_lib_$ac_lib_var=no"
13084 fi
13085 rm -f conftest*
13086 LIBS="$ac_save_LIBS"
13087
13088 fi
13089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13090   echo "$ac_t""yes" 1>&6
13091   have_tcl=yes
13092                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13093                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13094                            else
13095                                MOD_TCL_LIB="-l${lib}"
13096                            fi;break
13097 else
13098   echo "$ac_t""no" 1>&6
13099 have_tcl=no
13100 fi
13101
13102                 done
13103         fi
13104
13105         if test $have_tcl != yes ; then
13106                 echo "configure: warning: could not find -ltcl" 1>&2
13107                 if test $ol_enable_tcl = yes ; then
13108                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13109                 fi
13110
13111                 ol_enable_tcl=no
13112         fi
13113 fi
13114
13115 ol_link_termcap=no
13116 for ac_hdr in termcap.h ncurses.h
13117 do
13118 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13119 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13120 echo "configure:13121: checking for $ac_hdr" >&5
13121 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13122   echo $ac_n "(cached) $ac_c" 1>&6
13123 else
13124   cat > conftest.$ac_ext <<EOF
13125 #line 13126 "configure"
13126 #include "confdefs.h"
13127 #include <$ac_hdr>
13128 EOF
13129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13130 { (eval echo configure:13131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13132 if test -z "$ac_err"; then
13133   rm -rf conftest*
13134   eval "ac_cv_header_$ac_safe=yes"
13135 else
13136   echo "$ac_err" >&5
13137   echo "configure: failed program was:" >&5
13138   cat conftest.$ac_ext >&5
13139   rm -rf conftest*
13140   eval "ac_cv_header_$ac_safe=no"
13141 fi
13142 rm -f conftest*
13143 fi
13144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13145   echo "$ac_t""yes" 1>&6
13146     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13147   cat >> confdefs.h <<EOF
13148 #define $ac_tr_hdr 1
13149 EOF
13150  
13151 else
13152   echo "$ac_t""no" 1>&6
13153 fi
13154 done
13155
13156
13157 if test $ol_link_termcap = no ; then
13158         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13159 echo "configure:13160: checking for tputs in -ltermcap" >&5
13160 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13162   echo $ac_n "(cached) $ac_c" 1>&6
13163 else
13164   ac_save_LIBS="$LIBS"
13165 LIBS="-ltermcap  $LIBS"
13166 cat > conftest.$ac_ext <<EOF
13167 #line 13168 "configure"
13168 #include "confdefs.h"
13169 /* Override any gcc2 internal prototype to avoid an error.  */
13170 /* We use char because int might match the return type of a gcc2
13171     builtin and then its argument prototype would still apply.  */
13172 char tputs();
13173
13174 int main() {
13175 tputs()
13176 ; return 0; }
13177 EOF
13178 if { (eval echo configure:13179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13179   rm -rf conftest*
13180   eval "ac_cv_lib_$ac_lib_var=yes"
13181 else
13182   echo "configure: failed program was:" >&5
13183   cat conftest.$ac_ext >&5
13184   rm -rf conftest*
13185   eval "ac_cv_lib_$ac_lib_var=no"
13186 fi
13187 rm -f conftest*
13188 LIBS="$ac_save_LIBS"
13189
13190 fi
13191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13192   echo "$ac_t""yes" 1>&6
13193   have_termcap=yes
13194 else
13195   echo "$ac_t""no" 1>&6
13196 have_termcap=no
13197 fi
13198
13199         if test $have_termcap = yes ; then
13200                 cat >> confdefs.h <<\EOF
13201 #define HAVE_TERMCAP 1
13202 EOF
13203
13204                 ol_link_termcap=yes
13205                 TERMCAP_LIBS=-ltermcap
13206         fi
13207 fi
13208
13209 if test $ol_link_termcap = no ; then
13210         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13211 echo "configure:13212: checking for initscr in -lncurses" >&5
13212 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13214   echo $ac_n "(cached) $ac_c" 1>&6
13215 else
13216   ac_save_LIBS="$LIBS"
13217 LIBS="-lncurses  $LIBS"
13218 cat > conftest.$ac_ext <<EOF
13219 #line 13220 "configure"
13220 #include "confdefs.h"
13221 /* Override any gcc2 internal prototype to avoid an error.  */
13222 /* We use char because int might match the return type of a gcc2
13223     builtin and then its argument prototype would still apply.  */
13224 char initscr();
13225
13226 int main() {
13227 initscr()
13228 ; return 0; }
13229 EOF
13230 if { (eval echo configure:13231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13231   rm -rf conftest*
13232   eval "ac_cv_lib_$ac_lib_var=yes"
13233 else
13234   echo "configure: failed program was:" >&5
13235   cat conftest.$ac_ext >&5
13236   rm -rf conftest*
13237   eval "ac_cv_lib_$ac_lib_var=no"
13238 fi
13239 rm -f conftest*
13240 LIBS="$ac_save_LIBS"
13241
13242 fi
13243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13244   echo "$ac_t""yes" 1>&6
13245   have_ncurses=yes
13246 else
13247   echo "$ac_t""no" 1>&6
13248 have_ncurses=no
13249 fi
13250
13251         if test $have_ncurses = yes ; then
13252                 cat >> confdefs.h <<\EOF
13253 #define HAVE_NCURSES 1
13254 EOF
13255
13256                 ol_link_termcap=yes
13257                 TERMCAP_LIBS=-lncurses
13258         fi
13259 fi
13260
13261 if test $ol_link_termcap = no ; then
13262         cat >> confdefs.h <<\EOF
13263 #define NO_TERMCAP 1
13264 EOF
13265
13266         TERMCAP_LIBS=
13267 fi
13268
13269 ol_link_sasl=no
13270 ol_link_spasswd=no
13271 if test $ol_with_cyrus_sasl != no ; then
13272         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13273 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13274 echo "configure:13275: checking for sasl.h" >&5
13275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13276   echo $ac_n "(cached) $ac_c" 1>&6
13277 else
13278   cat > conftest.$ac_ext <<EOF
13279 #line 13280 "configure"
13280 #include "confdefs.h"
13281 #include <sasl.h>
13282 EOF
13283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13284 { (eval echo configure:13285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13286 if test -z "$ac_err"; then
13287   rm -rf conftest*
13288   eval "ac_cv_header_$ac_safe=yes"
13289 else
13290   echo "$ac_err" >&5
13291   echo "configure: failed program was:" >&5
13292   cat conftest.$ac_ext >&5
13293   rm -rf conftest*
13294   eval "ac_cv_header_$ac_safe=no"
13295 fi
13296 rm -f conftest*
13297 fi
13298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13299   echo "$ac_t""yes" 1>&6
13300   :
13301 else
13302   echo "$ac_t""no" 1>&6
13303 fi
13304
13305
13306         if test $ac_cv_header_sasl_h = yes ; then
13307                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13308 echo "configure:13309: checking for sasl_client_init in -lsasl" >&5
13309 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13311   echo $ac_n "(cached) $ac_c" 1>&6
13312 else
13313   ac_save_LIBS="$LIBS"
13314 LIBS="-lsasl  $LIBS"
13315 cat > conftest.$ac_ext <<EOF
13316 #line 13317 "configure"
13317 #include "confdefs.h"
13318 /* Override any gcc2 internal prototype to avoid an error.  */
13319 /* We use char because int might match the return type of a gcc2
13320     builtin and then its argument prototype would still apply.  */
13321 char sasl_client_init();
13322
13323 int main() {
13324 sasl_client_init()
13325 ; return 0; }
13326 EOF
13327 if { (eval echo configure:13328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13328   rm -rf conftest*
13329   eval "ac_cv_lib_$ac_lib_var=yes"
13330 else
13331   echo "configure: failed program was:" >&5
13332   cat conftest.$ac_ext >&5
13333   rm -rf conftest*
13334   eval "ac_cv_lib_$ac_lib_var=no"
13335 fi
13336 rm -f conftest*
13337 LIBS="$ac_save_LIBS"
13338
13339 fi
13340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13341   echo "$ac_t""yes" 1>&6
13342   have_cyrus_sasl=yes
13343 else
13344   echo "$ac_t""no" 1>&6
13345 have_cyrus_sasl=no
13346 fi
13347
13348
13349                 if test $have_cyrus_sasl != no ; then
13350                         SASL_LIBS="-lsasl"
13351                         cat >> confdefs.h <<\EOF
13352 #define HAVE_CYRUS_SASL 1
13353 EOF
13354
13355                         ol_link_sasl=yes
13356                 fi
13357         fi
13358
13359         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13360                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13361         fi
13362 fi
13363
13364 if test $cross_compiling != yes ; then
13365         dev=no
13366         if test -r /dev/urandom ; then
13367                 dev="/dev/urandom";
13368         elif test -r /idev/urandom ; then
13369                 dev="/idev/urandom";
13370         elif test -r /dev/srandom ; then
13371                 dev="/dev/srandom";
13372         elif test -r /dev/random ; then
13373                 dev="/dev/random";
13374         elif test -r /idev/random ; then
13375                 dev="/idev/random";
13376         fi
13377
13378         if test $dev != no ; then
13379                 cat >> confdefs.h <<EOF
13380 #define URANDOM_DEVICE "$dev"
13381 EOF
13382
13383         fi
13384 fi
13385
13386 ol_link_fetch=no
13387 if test $ol_with_fetch != no ; then
13388         ol_LIBS=$LIBS
13389 LIBS="-lfetch -lcom_err $LIBS"
13390 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13391 echo "configure:13392: checking fetch(3) library" >&5
13392 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13393   echo $ac_n "(cached) $ac_c" 1>&6
13394 else
13395   
13396         cat > conftest.$ac_ext <<EOF
13397 #line 13398 "configure"
13398 #include "confdefs.h"
13399
13400 #include <sys/param.h>
13401 #include <stdio.h>
13402 #include <fetch.h>
13403 int main() {
13404 struct url *u = fetchParseURL("file:///"); 
13405 ; return 0; }
13406 EOF
13407 if { (eval echo configure:13408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13408   rm -rf conftest*
13409   ol_cv_lib_fetch=yes
13410 else
13411   echo "configure: failed program was:" >&5
13412   cat conftest.$ac_ext >&5
13413   rm -rf conftest*
13414   ol_cv_lib_fetch=no
13415 fi
13416 rm -f conftest*
13417 fi
13418
13419 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13420 LIBS=$ol_LIBS
13421 if test $ol_cv_lib_fetch != no ; then
13422         ol_link_fetch="-lfetch -lcom_err"
13423         cat >> confdefs.h <<\EOF
13424 #define HAVE_FETCH 1
13425 EOF
13426
13427 fi
13428
13429
13430         if test $ol_cv_lib_fetch != no ; then
13431                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13432                 ol_link_fetch=freebsd
13433
13434         elif test $ol_with_fetch != auto ; then
13435                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13436         fi 
13437 fi
13438
13439 ol_link_readline=no
13440 if test $ol_with_readline != no ; then
13441         for ac_hdr in readline/readline.h readline/history.h
13442 do
13443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13445 echo "configure:13446: checking for $ac_hdr" >&5
13446 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13447   echo $ac_n "(cached) $ac_c" 1>&6
13448 else
13449   cat > conftest.$ac_ext <<EOF
13450 #line 13451 "configure"
13451 #include "confdefs.h"
13452 #include <$ac_hdr>
13453 EOF
13454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13455 { (eval echo configure:13456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13457 if test -z "$ac_err"; then
13458   rm -rf conftest*
13459   eval "ac_cv_header_$ac_safe=yes"
13460 else
13461   echo "$ac_err" >&5
13462   echo "configure: failed program was:" >&5
13463   cat conftest.$ac_ext >&5
13464   rm -rf conftest*
13465   eval "ac_cv_header_$ac_safe=no"
13466 fi
13467 rm -f conftest*
13468 fi
13469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13470   echo "$ac_t""yes" 1>&6
13471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13472   cat >> confdefs.h <<EOF
13473 #define $ac_tr_hdr 1
13474 EOF
13475  
13476 else
13477   echo "$ac_t""no" 1>&6
13478 fi
13479 done
13480
13481
13482         if test $ac_cv_header_readline_readline_h = yes ; then
13483                 save_LIBS="$LIBS"
13484                 LIBS="$TERMCAP_LIBS $LIBS"
13485                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13486 echo "configure:13487: checking for readline in -lreadline" >&5
13487 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13488 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13489   echo $ac_n "(cached) $ac_c" 1>&6
13490 else
13491   ac_save_LIBS="$LIBS"
13492 LIBS="-lreadline  $LIBS"
13493 cat > conftest.$ac_ext <<EOF
13494 #line 13495 "configure"
13495 #include "confdefs.h"
13496 /* Override any gcc2 internal prototype to avoid an error.  */
13497 /* We use char because int might match the return type of a gcc2
13498     builtin and then its argument prototype would still apply.  */
13499 char readline();
13500
13501 int main() {
13502 readline()
13503 ; return 0; }
13504 EOF
13505 if { (eval echo configure:13506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13506   rm -rf conftest*
13507   eval "ac_cv_lib_$ac_lib_var=yes"
13508 else
13509   echo "configure: failed program was:" >&5
13510   cat conftest.$ac_ext >&5
13511   rm -rf conftest*
13512   eval "ac_cv_lib_$ac_lib_var=no"
13513 fi
13514 rm -f conftest*
13515 LIBS="$ac_save_LIBS"
13516
13517 fi
13518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13519   echo "$ac_t""yes" 1>&6
13520   have_readline=yes
13521 else
13522   echo "$ac_t""no" 1>&6
13523 have_readline=no
13524 fi
13525
13526                 LIBS="$save_LIBS"
13527                         
13528                 if test $have_readline = yes ; then
13529                         ol_with_readline=found
13530                         ol_link_readline=yes
13531
13532                         READLINE_LIBS="-lreadline"
13533                 fi
13534         fi
13535 fi
13536
13537 if test $ol_link_readline = yes ; then
13538         cat >> confdefs.h <<\EOF
13539 #define HAVE_READLINE 1
13540 EOF
13541
13542 fi
13543
13544
13545 if test $ol_enable_crypt != no ; then
13546         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13547 echo "configure:13548: checking for crypt" >&5
13548 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13549   echo $ac_n "(cached) $ac_c" 1>&6
13550 else
13551   cat > conftest.$ac_ext <<EOF
13552 #line 13553 "configure"
13553 #include "confdefs.h"
13554 /* System header to define __stub macros and hopefully few prototypes,
13555     which can conflict with char crypt(); below.  */
13556 #include <assert.h>
13557 /* Override any gcc2 internal prototype to avoid an error.  */
13558 /* We use char because int might match the return type of a gcc2
13559     builtin and then its argument prototype would still apply.  */
13560 char crypt();
13561 char (*f)();
13562
13563 int main() {
13564
13565 /* The GNU C library defines this for functions which it implements
13566     to always fail with ENOSYS.  Some functions are actually named
13567     something starting with __ and the normal name is an alias.  */
13568 #if defined (__stub_crypt) || defined (__stub___crypt)
13569 choke me
13570 #else
13571 f = crypt;
13572 #endif
13573
13574 ; return 0; }
13575 EOF
13576 if { (eval echo configure:13577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13577   rm -rf conftest*
13578   eval "ac_cv_func_crypt=yes"
13579 else
13580   echo "configure: failed program was:" >&5
13581   cat conftest.$ac_ext >&5
13582   rm -rf conftest*
13583   eval "ac_cv_func_crypt=no"
13584 fi
13585 rm -f conftest*
13586 fi
13587
13588 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13589   echo "$ac_t""yes" 1>&6
13590   have_crypt=yes
13591 else
13592   echo "$ac_t""no" 1>&6
13593
13594                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13595 echo "configure:13596: checking for crypt in -lcrypt" >&5
13596 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13598   echo $ac_n "(cached) $ac_c" 1>&6
13599 else
13600   ac_save_LIBS="$LIBS"
13601 LIBS="-lcrypt  $LIBS"
13602 cat > conftest.$ac_ext <<EOF
13603 #line 13604 "configure"
13604 #include "confdefs.h"
13605 /* Override any gcc2 internal prototype to avoid an error.  */
13606 /* We use char because int might match the return type of a gcc2
13607     builtin and then its argument prototype would still apply.  */
13608 char crypt();
13609
13610 int main() {
13611 crypt()
13612 ; return 0; }
13613 EOF
13614 if { (eval echo configure:13615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13615   rm -rf conftest*
13616   eval "ac_cv_lib_$ac_lib_var=yes"
13617 else
13618   echo "configure: failed program was:" >&5
13619   cat conftest.$ac_ext >&5
13620   rm -rf conftest*
13621   eval "ac_cv_lib_$ac_lib_var=no"
13622 fi
13623 rm -f conftest*
13624 LIBS="$ac_save_LIBS"
13625
13626 fi
13627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13628   echo "$ac_t""yes" 1>&6
13629   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13630                         have_crypt=yes
13631 else
13632   echo "$ac_t""no" 1>&6
13633 have_crypt=no
13634 fi
13635
13636 fi
13637
13638
13639         if test $have_crypt = yes ; then
13640                 cat >> confdefs.h <<\EOF
13641 #define HAVE_CRYPT 1
13642 EOF
13643
13644         else
13645                 echo "configure: warning: could not find crypt" 1>&2
13646                 if test $ol_enable_crypt = yes ; then
13647                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13648                 fi
13649
13650                 echo "configure: warning: disabling crypt support" 1>&2
13651                 ol_enable_crypt=no
13652         fi
13653 fi
13654
13655 if test $ol_enable_proctitle != no ; then
13656         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13657 echo "configure:13658: checking for setproctitle" >&5
13658 if eval "test \"\${ac_cv_func_setproctitle+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 /* System header to define __stub macros and hopefully few prototypes,
13665     which can conflict with char setproctitle(); below.  */
13666 #include <assert.h>
13667 /* Override any gcc2 internal prototype to avoid an error.  */
13668 /* We use char because int might match the return type of a gcc2
13669     builtin and then its argument prototype would still apply.  */
13670 char setproctitle();
13671 char (*f)();
13672
13673 int main() {
13674
13675 /* The GNU C library defines this for functions which it implements
13676     to always fail with ENOSYS.  Some functions are actually named
13677     something starting with __ and the normal name is an alias.  */
13678 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13679 choke me
13680 #else
13681 f = setproctitle;
13682 #endif
13683
13684 ; return 0; }
13685 EOF
13686 if { (eval echo configure:13687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13687   rm -rf conftest*
13688   eval "ac_cv_func_setproctitle=yes"
13689 else
13690   echo "configure: failed program was:" >&5
13691   cat conftest.$ac_ext >&5
13692   rm -rf conftest*
13693   eval "ac_cv_func_setproctitle=no"
13694 fi
13695 rm -f conftest*
13696 fi
13697
13698 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13699   echo "$ac_t""yes" 1>&6
13700   have_setproctitle=yes
13701 else
13702   echo "$ac_t""no" 1>&6
13703
13704                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13705 echo "configure:13706: checking for setproctitle in -lutil" >&5
13706 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13708   echo $ac_n "(cached) $ac_c" 1>&6
13709 else
13710   ac_save_LIBS="$LIBS"
13711 LIBS="-lutil  $LIBS"
13712 cat > conftest.$ac_ext <<EOF
13713 #line 13714 "configure"
13714 #include "confdefs.h"
13715 /* Override any gcc2 internal prototype to avoid an error.  */
13716 /* We use char because int might match the return type of a gcc2
13717     builtin and then its argument prototype would still apply.  */
13718 char setproctitle();
13719
13720 int main() {
13721 setproctitle()
13722 ; return 0; }
13723 EOF
13724 if { (eval echo configure:13725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13725   rm -rf conftest*
13726   eval "ac_cv_lib_$ac_lib_var=yes"
13727 else
13728   echo "configure: failed program was:" >&5
13729   cat conftest.$ac_ext >&5
13730   rm -rf conftest*
13731   eval "ac_cv_lib_$ac_lib_var=no"
13732 fi
13733 rm -f conftest*
13734 LIBS="$ac_save_LIBS"
13735
13736 fi
13737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13738   echo "$ac_t""yes" 1>&6
13739   have_setproctitle=yes
13740                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13741 else
13742   echo "$ac_t""no" 1>&6
13743 have_setproctitle=no
13744                         LIBOBJS="$LIBOBJS setproctitle.o"
13745                         LIBSRCS="$LIBSRCS setproctitle.c"
13746 fi
13747
13748 fi
13749
13750
13751         if test $have_setproctitle = yes ; then
13752                 cat >> confdefs.h <<\EOF
13753 #define HAVE_SETPROCTITLE 1
13754 EOF
13755
13756         fi
13757 fi
13758
13759 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13760 echo "configure:13761: checking for ANSI C header files" >&5
13761 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13762   echo $ac_n "(cached) $ac_c" 1>&6
13763 else
13764   cat > conftest.$ac_ext <<EOF
13765 #line 13766 "configure"
13766 #include "confdefs.h"
13767 #include <stdlib.h>
13768 #include <stdarg.h>
13769 #include <string.h>
13770 #include <float.h>
13771 EOF
13772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13773 { (eval echo configure:13774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13775 if test -z "$ac_err"; then
13776   rm -rf conftest*
13777   ac_cv_header_stdc=yes
13778 else
13779   echo "$ac_err" >&5
13780   echo "configure: failed program was:" >&5
13781   cat conftest.$ac_ext >&5
13782   rm -rf conftest*
13783   ac_cv_header_stdc=no
13784 fi
13785 rm -f conftest*
13786
13787 if test $ac_cv_header_stdc = yes; then
13788   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13789 cat > conftest.$ac_ext <<EOF
13790 #line 13791 "configure"
13791 #include "confdefs.h"
13792 #include <string.h>
13793 EOF
13794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13795   egrep "memchr" >/dev/null 2>&1; then
13796   :
13797 else
13798   rm -rf conftest*
13799   ac_cv_header_stdc=no
13800 fi
13801 rm -f conftest*
13802
13803 fi
13804
13805 if test $ac_cv_header_stdc = yes; then
13806   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13807 cat > conftest.$ac_ext <<EOF
13808 #line 13809 "configure"
13809 #include "confdefs.h"
13810 #include <stdlib.h>
13811 EOF
13812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13813   egrep "free" >/dev/null 2>&1; then
13814   :
13815 else
13816   rm -rf conftest*
13817   ac_cv_header_stdc=no
13818 fi
13819 rm -f conftest*
13820
13821 fi
13822
13823 if test $ac_cv_header_stdc = yes; then
13824   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13825 if test "$cross_compiling" = yes; then
13826   :
13827 else
13828   cat > conftest.$ac_ext <<EOF
13829 #line 13830 "configure"
13830 #include "confdefs.h"
13831 #include <ctype.h>
13832 #if ((' ' & 0x0FF) == 0x020)
13833 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13834 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13835 #else
13836 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13837  || ('j' <= (c) && (c) <= 'r') \
13838  || ('s' <= (c) && (c) <= 'z'))
13839 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13840 #endif
13841 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13842 int main () { int i; for (i = 0; i < 256; i++)
13843 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13844 exit (0); }
13845
13846 EOF
13847 if { (eval echo configure:13848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13848 then
13849   :
13850 else
13851   echo "configure: failed program was:" >&5
13852   cat conftest.$ac_ext >&5
13853   rm -fr conftest*
13854   ac_cv_header_stdc=no
13855 fi
13856 rm -fr conftest*
13857 fi
13858
13859 fi
13860 fi
13861
13862 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13863 if test $ac_cv_header_stdc = yes; then
13864   cat >> confdefs.h <<\EOF
13865 #define STDC_HEADERS 1
13866 EOF
13867
13868 fi
13869
13870 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13871 echo "configure:13872: checking for mode_t" >&5
13872 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13873   echo $ac_n "(cached) $ac_c" 1>&6
13874 else
13875   cat > conftest.$ac_ext <<EOF
13876 #line 13877 "configure"
13877 #include "confdefs.h"
13878 #include <sys/types.h>
13879 #if STDC_HEADERS
13880 #include <stdlib.h>
13881 #include <stddef.h>
13882 #endif
13883
13884 EOF
13885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13886   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13887   rm -rf conftest*
13888   eval "ac_cv_type_mode_t=yes"
13889 else
13890   rm -rf conftest*
13891   eval "ac_cv_type_mode_t=no"
13892 fi
13893 rm -f conftest*
13894
13895 fi
13896 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13897   echo "$ac_t""yes" 1>&6
13898 else
13899   echo "$ac_t""no" 1>&6
13900   cat >> confdefs.h <<EOF
13901 #define mode_t int
13902 EOF
13903
13904 fi
13905
13906 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13907 echo "configure:13908: checking for off_t" >&5
13908 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13909   echo $ac_n "(cached) $ac_c" 1>&6
13910 else
13911   cat > conftest.$ac_ext <<EOF
13912 #line 13913 "configure"
13913 #include "confdefs.h"
13914 #include <sys/types.h>
13915 #if STDC_HEADERS
13916 #include <stdlib.h>
13917 #include <stddef.h>
13918 #endif
13919
13920 EOF
13921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13922   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13923   rm -rf conftest*
13924   eval "ac_cv_type_off_t=yes"
13925 else
13926   rm -rf conftest*
13927   eval "ac_cv_type_off_t=no"
13928 fi
13929 rm -f conftest*
13930
13931 fi
13932 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13933   echo "$ac_t""yes" 1>&6
13934 else
13935   echo "$ac_t""no" 1>&6
13936   cat >> confdefs.h <<EOF
13937 #define off_t long
13938 EOF
13939
13940 fi
13941
13942 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13943 echo "configure:13944: checking for pid_t" >&5
13944 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13945   echo $ac_n "(cached) $ac_c" 1>&6
13946 else
13947   cat > conftest.$ac_ext <<EOF
13948 #line 13949 "configure"
13949 #include "confdefs.h"
13950 #include <sys/types.h>
13951 #if STDC_HEADERS
13952 #include <stdlib.h>
13953 #include <stddef.h>
13954 #endif
13955
13956 EOF
13957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13958   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13959   rm -rf conftest*
13960   eval "ac_cv_type_pid_t=yes"
13961 else
13962   rm -rf conftest*
13963   eval "ac_cv_type_pid_t=no"
13964 fi
13965 rm -f conftest*
13966
13967 fi
13968 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13969   echo "$ac_t""yes" 1>&6
13970 else
13971   echo "$ac_t""no" 1>&6
13972   cat >> confdefs.h <<EOF
13973 #define pid_t int
13974 EOF
13975
13976 fi
13977
13978 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13979 echo "configure:13980: checking for ptrdiff_t" >&5
13980 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13981   echo $ac_n "(cached) $ac_c" 1>&6
13982 else
13983   cat > conftest.$ac_ext <<EOF
13984 #line 13985 "configure"
13985 #include "confdefs.h"
13986 #include <stddef.h>
13987 int main() {
13988 ptrdiff_t p
13989 ; return 0; }
13990 EOF
13991 if { (eval echo configure:13992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13992   rm -rf conftest*
13993   am_cv_type_ptrdiff_t=yes
13994 else
13995   echo "configure: failed program was:" >&5
13996   cat conftest.$ac_ext >&5
13997   rm -rf conftest*
13998   am_cv_type_ptrdiff_t=no
13999 fi
14000 rm -f conftest*
14001 fi
14002
14003 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14004    if test $am_cv_type_ptrdiff_t = yes; then
14005      cat >> confdefs.h <<\EOF
14006 #define HAVE_PTRDIFF_T 1
14007 EOF
14008
14009    fi
14010
14011 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14012 echo "configure:14013: checking return type of signal handlers" >&5
14013 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14014   echo $ac_n "(cached) $ac_c" 1>&6
14015 else
14016   cat > conftest.$ac_ext <<EOF
14017 #line 14018 "configure"
14018 #include "confdefs.h"
14019 #include <sys/types.h>
14020 #include <signal.h>
14021 #ifdef signal
14022 #undef signal
14023 #endif
14024 #ifdef __cplusplus
14025 extern "C" void (*signal (int, void (*)(int)))(int);
14026 #else
14027 void (*signal ()) ();
14028 #endif
14029
14030 int main() {
14031 int i;
14032 ; return 0; }
14033 EOF
14034 if { (eval echo configure:14035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14035   rm -rf conftest*
14036   ac_cv_type_signal=void
14037 else
14038   echo "configure: failed program was:" >&5
14039   cat conftest.$ac_ext >&5
14040   rm -rf conftest*
14041   ac_cv_type_signal=int
14042 fi
14043 rm -f conftest*
14044 fi
14045
14046 echo "$ac_t""$ac_cv_type_signal" 1>&6
14047 cat >> confdefs.h <<EOF
14048 #define RETSIGTYPE $ac_cv_type_signal
14049 EOF
14050
14051
14052 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14053 echo "configure:14054: checking for size_t" >&5
14054 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14055   echo $ac_n "(cached) $ac_c" 1>&6
14056 else
14057   cat > conftest.$ac_ext <<EOF
14058 #line 14059 "configure"
14059 #include "confdefs.h"
14060 #include <sys/types.h>
14061 #if STDC_HEADERS
14062 #include <stdlib.h>
14063 #include <stddef.h>
14064 #endif
14065
14066 EOF
14067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14068   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14069   rm -rf conftest*
14070   eval "ac_cv_type_size_t=yes"
14071 else
14072   rm -rf conftest*
14073   eval "ac_cv_type_size_t=no"
14074 fi
14075 rm -f conftest*
14076
14077 fi
14078 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14079   echo "$ac_t""yes" 1>&6
14080 else
14081   echo "$ac_t""no" 1>&6
14082   cat >> confdefs.h <<EOF
14083 #define size_t unsigned
14084 EOF
14085
14086 fi
14087
14088
14089 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14090 echo "configure:14091: checking for ssize_t" >&5
14091 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14092   echo $ac_n "(cached) $ac_c" 1>&6
14093 else
14094   cat > conftest.$ac_ext <<EOF
14095 #line 14096 "configure"
14096 #include "confdefs.h"
14097 #include <sys/types.h>
14098 #if STDC_HEADERS
14099 #include <stdlib.h>
14100 #include <stddef.h>
14101 #endif
14102
14103 EOF
14104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14105   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14106   rm -rf conftest*
14107   eval "ac_cv_type_ssize_t=yes"
14108 else
14109   rm -rf conftest*
14110   eval "ac_cv_type_ssize_t=no"
14111 fi
14112 rm -f conftest*
14113
14114 fi
14115 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14116   echo "$ac_t""yes" 1>&6
14117 else
14118   echo "$ac_t""no" 1>&6
14119   cat >> confdefs.h <<EOF
14120 #define ssize_t signed int
14121 EOF
14122
14123 fi
14124
14125 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14126 echo "configure:14127: checking for caddr_t" >&5
14127 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14128   echo $ac_n "(cached) $ac_c" 1>&6
14129 else
14130   cat > conftest.$ac_ext <<EOF
14131 #line 14132 "configure"
14132 #include "confdefs.h"
14133 #include <sys/types.h>
14134 #if STDC_HEADERS
14135 #include <stdlib.h>
14136 #include <stddef.h>
14137 #endif
14138
14139 EOF
14140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14141   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14142   rm -rf conftest*
14143   eval "ac_cv_type_caddr_t=yes"
14144 else
14145   rm -rf conftest*
14146   eval "ac_cv_type_caddr_t=no"
14147 fi
14148 rm -f conftest*
14149
14150 fi
14151 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14152   echo "$ac_t""yes" 1>&6
14153 else
14154   echo "$ac_t""no" 1>&6
14155   cat >> confdefs.h <<EOF
14156 #define caddr_t char *
14157 EOF
14158
14159 fi
14160
14161
14162 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14163 echo "configure:14164: checking for socklen_t" >&5
14164 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14165   echo $ac_n "(cached) $ac_c" 1>&6
14166 else
14167   cat > conftest.$ac_ext <<EOF
14168 #line 14169 "configure"
14169 #include "confdefs.h"
14170
14171 #ifdef HAVE_SYS_TYPES_H
14172 #include <sys/types.h>
14173 #endif
14174 #ifdef HAVE_SYS_SOCKET_H
14175 #include <sys/socket.h>
14176 #endif
14177
14178 int main() {
14179 socklen_t len;
14180 ; return 0; }
14181 EOF
14182 if { (eval echo configure:14183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14183   rm -rf conftest*
14184   ol_cv_type_socklen_t=yes
14185 else
14186   echo "configure: failed program was:" >&5
14187   cat conftest.$ac_ext >&5
14188   rm -rf conftest*
14189   ol_cv_type_socklen_t=no
14190 fi
14191 rm -f conftest*
14192 fi
14193
14194 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14195   if test $ol_cv_type_socklen_t = no; then
14196     cat >> confdefs.h <<\EOF
14197 #define socklen_t int
14198 EOF
14199
14200   fi
14201  
14202 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14203 echo "configure:14204: checking for member st_blksize in aggregate type struct stat" >&5
14204 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14205   echo $ac_n "(cached) $ac_c" 1>&6
14206 else
14207   cat > conftest.$ac_ext <<EOF
14208 #line 14209 "configure"
14209 #include "confdefs.h"
14210 #include <sys/types.h>
14211 #include <sys/stat.h>
14212 int main() {
14213 struct stat foo; foo.st_blksize;
14214 ; return 0; }
14215 EOF
14216 if { (eval echo configure:14217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14217   rm -rf conftest*
14218   ac_cv_c_struct_member_st_blksize=yes
14219 else
14220   echo "configure: failed program was:" >&5
14221   cat conftest.$ac_ext >&5
14222   rm -rf conftest*
14223   ac_cv_c_struct_member_st_blksize=no
14224 fi
14225 rm -f conftest*
14226 fi
14227
14228 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14229 st_blksize="$ac_cv_c_struct_member_st_blksize"
14230 if test $ac_cv_c_struct_member_st_blksize = yes; then
14231   cat >> confdefs.h <<\EOF
14232 #define HAVE_ST_BLKSIZE 1
14233 EOF
14234
14235 fi
14236
14237 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14238 echo "configure:14239: checking whether time.h and sys/time.h may both be included" >&5
14239 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14240   echo $ac_n "(cached) $ac_c" 1>&6
14241 else
14242   cat > conftest.$ac_ext <<EOF
14243 #line 14244 "configure"
14244 #include "confdefs.h"
14245 #include <sys/types.h>
14246 #include <sys/time.h>
14247 #include <time.h>
14248 int main() {
14249 struct tm *tp;
14250 ; return 0; }
14251 EOF
14252 if { (eval echo configure:14253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14253   rm -rf conftest*
14254   ac_cv_header_time=yes
14255 else
14256   echo "configure: failed program was:" >&5
14257   cat conftest.$ac_ext >&5
14258   rm -rf conftest*
14259   ac_cv_header_time=no
14260 fi
14261 rm -f conftest*
14262 fi
14263
14264 echo "$ac_t""$ac_cv_header_time" 1>&6
14265 if test $ac_cv_header_time = yes; then
14266   cat >> confdefs.h <<\EOF
14267 #define TIME_WITH_SYS_TIME 1
14268 EOF
14269
14270 fi
14271
14272 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14273 echo "configure:14274: checking whether struct tm is in sys/time.h or time.h" >&5
14274 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14275   echo $ac_n "(cached) $ac_c" 1>&6
14276 else
14277   cat > conftest.$ac_ext <<EOF
14278 #line 14279 "configure"
14279 #include "confdefs.h"
14280 #include <sys/types.h>
14281 #include <time.h>
14282 int main() {
14283 struct tm *tp; tp->tm_sec;
14284 ; return 0; }
14285 EOF
14286 if { (eval echo configure:14287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14287   rm -rf conftest*
14288   ac_cv_struct_tm=time.h
14289 else
14290   echo "configure: failed program was:" >&5
14291   cat conftest.$ac_ext >&5
14292   rm -rf conftest*
14293   ac_cv_struct_tm=sys/time.h
14294 fi
14295 rm -f conftest*
14296 fi
14297
14298 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14299 if test $ac_cv_struct_tm = sys/time.h; then
14300   cat >> confdefs.h <<\EOF
14301 #define TM_IN_SYS_TIME 1
14302 EOF
14303
14304 fi
14305
14306 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14307 echo "configure:14308: checking for uid_t in sys/types.h" >&5
14308 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14309   echo $ac_n "(cached) $ac_c" 1>&6
14310 else
14311   cat > conftest.$ac_ext <<EOF
14312 #line 14313 "configure"
14313 #include "confdefs.h"
14314 #include <sys/types.h>
14315 EOF
14316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14317   egrep "uid_t" >/dev/null 2>&1; then
14318   rm -rf conftest*
14319   ac_cv_type_uid_t=yes
14320 else
14321   rm -rf conftest*
14322   ac_cv_type_uid_t=no
14323 fi
14324 rm -f conftest*
14325
14326 fi
14327
14328 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14329 if test $ac_cv_type_uid_t = no; then
14330   cat >> confdefs.h <<\EOF
14331 #define uid_t int
14332 EOF
14333
14334   cat >> confdefs.h <<\EOF
14335 #define gid_t int
14336 EOF
14337
14338 fi
14339
14340 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14341 echo "configure:14342: checking for sig_atomic_t" >&5
14342 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14343   echo $ac_n "(cached) $ac_c" 1>&6
14344 else
14345   cat > conftest.$ac_ext <<EOF
14346 #line 14347 "configure"
14347 #include "confdefs.h"
14348 #include <signal.h>
14349 int main() {
14350 sig_atomic_t atomic;
14351 ; return 0; }
14352 EOF
14353 if { (eval echo configure:14354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14354   rm -rf conftest*
14355   ol_cv_type_sig_atomic_t=yes
14356 else
14357   echo "configure: failed program was:" >&5
14358   cat conftest.$ac_ext >&5
14359   rm -rf conftest*
14360   ol_cv_type_sig_atomic_t=no
14361 fi
14362 rm -f conftest*
14363 fi
14364
14365 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14366   if test $ol_cv_type_sig_atomic_t = no; then
14367     cat >> confdefs.h <<\EOF
14368 #define sig_atomic_t int
14369 EOF
14370
14371   fi
14372  
14373
14374
14375 # test for pw_gecos in struct passwd
14376 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14377 echo "configure:14378: checking struct passwd for pw_gecos" >&5
14378 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14379   echo $ac_n "(cached) $ac_c" 1>&6
14380 else
14381   
14382         cat > conftest.$ac_ext <<EOF
14383 #line 14384 "configure"
14384 #include "confdefs.h"
14385 #include <pwd.h>
14386 int main() {
14387
14388         struct passwd pwd;
14389         pwd.pw_gecos = pwd.pw_name;
14390
14391 ; return 0; }
14392 EOF
14393 if { (eval echo configure:14394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14394   rm -rf conftest*
14395   ol_cv_struct_passwd_pw_gecos=yes
14396 else
14397   echo "configure: failed program was:" >&5
14398   cat conftest.$ac_ext >&5
14399   rm -rf conftest*
14400   ol_cv_struct_passwd_pw_gecos=no
14401 fi
14402 rm -f conftest*
14403 fi
14404
14405 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14406 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14407         cat >> confdefs.h <<\EOF
14408 #define HAVE_PW_GECOS 1
14409 EOF
14410
14411 fi
14412
14413 # test for pw_passwd in struct passwd
14414 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14415 echo "configure:14416: checking struct passwd for pw_passwd" >&5
14416 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14417   echo $ac_n "(cached) $ac_c" 1>&6
14418 else
14419   
14420         cat > conftest.$ac_ext <<EOF
14421 #line 14422 "configure"
14422 #include "confdefs.h"
14423 #include <pwd.h>
14424 int main() {
14425
14426         struct passwd pwd;
14427         pwd.pw_passwd = pwd.pw_name;
14428
14429 ; return 0; }
14430 EOF
14431 if { (eval echo configure:14432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14432   rm -rf conftest*
14433   ol_cv_struct_passwd_pw_passwd=yes
14434 else
14435   echo "configure: failed program was:" >&5
14436   cat conftest.$ac_ext >&5
14437   rm -rf conftest*
14438   ol_cv_struct_passwd_pw_passwd=no
14439 fi
14440 rm -f conftest*
14441 fi
14442
14443 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14444 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14445         cat >> confdefs.h <<\EOF
14446 #define HAVE_PW_PASSWD 1
14447 EOF
14448
14449 fi
14450
14451
14452 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14453 echo "configure:14454: checking if toupper() requires islower()" >&5
14454 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14455   echo $ac_n "(cached) $ac_c" 1>&6
14456 else
14457   
14458         if test "$cross_compiling" = yes; then
14459   ol_cv_c_upper_lower=safe
14460 else
14461   cat > conftest.$ac_ext <<EOF
14462 #line 14463 "configure"
14463 #include "confdefs.h"
14464
14465 #include <ctype.h>
14466 main()
14467 {
14468         if ('C' == toupper('C'))
14469                 exit(0);
14470         else
14471                 exit(1);
14472 }
14473 EOF
14474 if { (eval echo configure:14475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14475 then
14476   ol_cv_c_upper_lower=no
14477 else
14478   echo "configure: failed program was:" >&5
14479   cat conftest.$ac_ext >&5
14480   rm -fr conftest*
14481   ol_cv_c_upper_lower=yes
14482 fi
14483 rm -fr conftest*
14484 fi
14485
14486 fi
14487
14488 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14489 if test $ol_cv_c_upper_lower != no ; then
14490         cat >> confdefs.h <<\EOF
14491 #define C_UPPER_LOWER 1
14492 EOF
14493
14494 fi
14495
14496 echo $ac_n "checking for working const""... $ac_c" 1>&6
14497 echo "configure:14498: checking for working const" >&5
14498 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14499   echo $ac_n "(cached) $ac_c" 1>&6
14500 else
14501   cat > conftest.$ac_ext <<EOF
14502 #line 14503 "configure"
14503 #include "confdefs.h"
14504
14505 int main() {
14506
14507 /* Ultrix mips cc rejects this.  */
14508 typedef int charset[2]; const charset x;
14509 /* SunOS 4.1.1 cc rejects this.  */
14510 char const *const *ccp;
14511 char **p;
14512 /* NEC SVR4.0.2 mips cc rejects this.  */
14513 struct point {int x, y;};
14514 static struct point const zero = {0,0};
14515 /* AIX XL C 1.02.0.0 rejects this.
14516    It does not let you subtract one const X* pointer from another in an arm
14517    of an if-expression whose if-part is not a constant expression */
14518 const char *g = "string";
14519 ccp = &g + (g ? g-g : 0);
14520 /* HPUX 7.0 cc rejects these. */
14521 ++ccp;
14522 p = (char**) ccp;
14523 ccp = (char const *const *) p;
14524 { /* SCO 3.2v4 cc rejects this.  */
14525   char *t;
14526   char const *s = 0 ? (char *) 0 : (char const *) 0;
14527
14528   *t++ = 0;
14529 }
14530 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14531   int x[] = {25, 17};
14532   const int *foo = &x[0];
14533   ++foo;
14534 }
14535 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14536   typedef const int *iptr;
14537   iptr p = 0;
14538   ++p;
14539 }
14540 { /* AIX XL C 1.02.0.0 rejects this saying
14541      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14542   struct s { int j; const int *ap[3]; };
14543   struct s *b; b->j = 5;
14544 }
14545 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14546   const int foo = 10;
14547 }
14548
14549 ; return 0; }
14550 EOF
14551 if { (eval echo configure:14552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14552   rm -rf conftest*
14553   ac_cv_c_const=yes
14554 else
14555   echo "configure: failed program was:" >&5
14556   cat conftest.$ac_ext >&5
14557   rm -rf conftest*
14558   ac_cv_c_const=no
14559 fi
14560 rm -f conftest*
14561 fi
14562
14563 echo "$ac_t""$ac_cv_c_const" 1>&6
14564 if test $ac_cv_c_const = no; then
14565   cat >> confdefs.h <<\EOF
14566 #define const 
14567 EOF
14568
14569 fi
14570
14571 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14572 echo "configure:14573: checking if compiler understands volatile" >&5
14573 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14574   echo $ac_n "(cached) $ac_c" 1>&6
14575 else
14576   cat > conftest.$ac_ext <<EOF
14577 #line 14578 "configure"
14578 #include "confdefs.h"
14579 int x, y, z;
14580 int main() {
14581 volatile int a; int * volatile b = x ? &y : &z;
14582       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14583       *b = 0;
14584 ; return 0; }
14585 EOF
14586 if { (eval echo configure:14587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14587   rm -rf conftest*
14588   ol_cv_c_volatile=yes
14589 else
14590   echo "configure: failed program was:" >&5
14591   cat conftest.$ac_ext >&5
14592   rm -rf conftest*
14593   ol_cv_c_volatile=no
14594 fi
14595 rm -f conftest*
14596 fi
14597
14598 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14599   if test $ol_cv_c_volatile = yes; then
14600     : 
14601   else
14602     cat >> confdefs.h <<\EOF
14603 #define volatile 
14604 EOF
14605
14606   fi
14607  
14608
14609 if test $cross_compiling = yes ; then
14610         cat >> confdefs.h <<\EOF
14611 #define CROSS_COMPILING 1
14612 EOF
14613
14614 else
14615         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14616 echo "configure:14617: checking whether byte ordering is bigendian" >&5
14617 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14618   echo $ac_n "(cached) $ac_c" 1>&6
14619 else
14620   ac_cv_c_bigendian=unknown
14621 # See if sys/param.h defines the BYTE_ORDER macro.
14622 cat > conftest.$ac_ext <<EOF
14623 #line 14624 "configure"
14624 #include "confdefs.h"
14625 #include <sys/types.h>
14626 #include <sys/param.h>
14627 int main() {
14628
14629 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14630  bogus endian macros
14631 #endif
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   # It does; now see whether it defined to BIG_ENDIAN or not.
14637 cat > conftest.$ac_ext <<EOF
14638 #line 14639 "configure"
14639 #include "confdefs.h"
14640 #include <sys/types.h>
14641 #include <sys/param.h>
14642 int main() {
14643
14644 #if BYTE_ORDER != BIG_ENDIAN
14645  not big endian
14646 #endif
14647 ; return 0; }
14648 EOF
14649 if { (eval echo configure:14650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14650   rm -rf conftest*
14651   ac_cv_c_bigendian=yes
14652 else
14653   echo "configure: failed program was:" >&5
14654   cat conftest.$ac_ext >&5
14655   rm -rf conftest*
14656   ac_cv_c_bigendian=no
14657 fi
14658 rm -f conftest*
14659 else
14660   echo "configure: failed program was:" >&5
14661   cat conftest.$ac_ext >&5
14662 fi
14663 rm -f conftest*
14664 if test $ac_cv_c_bigendian = unknown; then
14665 if test "$cross_compiling" = yes; then
14666     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14667 else
14668   cat > conftest.$ac_ext <<EOF
14669 #line 14670 "configure"
14670 #include "confdefs.h"
14671 main () {
14672   /* Are we little or big endian?  From Harbison&Steele.  */
14673   union
14674   {
14675     long l;
14676     char c[sizeof (long)];
14677   } u;
14678   u.l = 1;
14679   exit (u.c[sizeof (long) - 1] == 1);
14680 }
14681 EOF
14682 if { (eval echo configure:14683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14683 then
14684   ac_cv_c_bigendian=no
14685 else
14686   echo "configure: failed program was:" >&5
14687   cat conftest.$ac_ext >&5
14688   rm -fr conftest*
14689   ac_cv_c_bigendian=yes
14690 fi
14691 rm -fr conftest*
14692 fi
14693
14694 fi
14695 fi
14696
14697 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14698 if test $ac_cv_c_bigendian = yes; then
14699   cat >> confdefs.h <<\EOF
14700 #define WORDS_BIGENDIAN 1
14701 EOF
14702
14703 fi
14704
14705 fi
14706
14707 echo $ac_n "checking size of short""... $ac_c" 1>&6
14708 echo "configure:14709: checking size of short" >&5 
14709 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14710   echo $ac_n "(cached) $ac_c" 1>&6
14711 else
14712   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14713   cat > conftest.$ac_ext <<EOF
14714 #line 14715 "configure"
14715 #include "confdefs.h"
14716 #include "confdefs.h" 
14717 #include <sys/types.h> 
14718  
14719
14720 int main() {
14721 switch (0) case 0: case (sizeof (short) == $ac_size):;
14722 ; return 0; }
14723 EOF
14724 if { (eval echo configure:14725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14725   rm -rf conftest*
14726   ac_cv_sizeof_short=$ac_size
14727 else
14728   echo "configure: failed program was:" >&5
14729   cat conftest.$ac_ext >&5
14730 fi
14731 rm -f conftest* 
14732   if test x$ac_cv_sizeof_short != x ; then break; fi 
14733 done 
14734
14735 fi
14736  
14737 if test x$ac_cv_sizeof_short = x ; then 
14738   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14739 fi 
14740 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14741 cat >> confdefs.h <<EOF
14742 #define SIZEOF_SHORT $ac_cv_sizeof_short
14743 EOF
14744  
14745  
14746 echo $ac_n "checking size of int""... $ac_c" 1>&6
14747 echo "configure:14748: checking size of int" >&5 
14748 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14749   echo $ac_n "(cached) $ac_c" 1>&6
14750 else
14751   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14752   cat > conftest.$ac_ext <<EOF
14753 #line 14754 "configure"
14754 #include "confdefs.h"
14755 #include "confdefs.h" 
14756 #include <sys/types.h> 
14757  
14758
14759 int main() {
14760 switch (0) case 0: case (sizeof (int) == $ac_size):;
14761 ; return 0; }
14762 EOF
14763 if { (eval echo configure:14764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14764   rm -rf conftest*
14765   ac_cv_sizeof_int=$ac_size
14766 else
14767   echo "configure: failed program was:" >&5
14768   cat conftest.$ac_ext >&5
14769 fi
14770 rm -f conftest* 
14771   if test x$ac_cv_sizeof_int != x ; then break; fi 
14772 done 
14773
14774 fi
14775  
14776 if test x$ac_cv_sizeof_int = x ; then 
14777   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14778 fi 
14779 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14780 cat >> confdefs.h <<EOF
14781 #define SIZEOF_INT $ac_cv_sizeof_int
14782 EOF
14783  
14784  
14785 echo $ac_n "checking size of long""... $ac_c" 1>&6
14786 echo "configure:14787: checking size of long" >&5 
14787 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14788   echo $ac_n "(cached) $ac_c" 1>&6
14789 else
14790   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14791   cat > conftest.$ac_ext <<EOF
14792 #line 14793 "configure"
14793 #include "confdefs.h"
14794 #include "confdefs.h" 
14795 #include <sys/types.h> 
14796  
14797
14798 int main() {
14799 switch (0) case 0: case (sizeof (long) == $ac_size):;
14800 ; return 0; }
14801 EOF
14802 if { (eval echo configure:14803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14803   rm -rf conftest*
14804   ac_cv_sizeof_long=$ac_size
14805 else
14806   echo "configure: failed program was:" >&5
14807   cat conftest.$ac_ext >&5
14808 fi
14809 rm -f conftest* 
14810   if test x$ac_cv_sizeof_long != x ; then break; fi 
14811 done 
14812
14813 fi
14814  
14815 if test x$ac_cv_sizeof_long = x ; then 
14816   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14817 fi 
14818 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14819 cat >> confdefs.h <<EOF
14820 #define SIZEOF_LONG $ac_cv_sizeof_long
14821 EOF
14822  
14823
14824
14825 if test "$ac_cv_sizeof_int" -lt 4 ; then
14826         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14827
14828         cat >> confdefs.h <<\EOF
14829 #define LBER_INT_T long
14830 EOF
14831
14832 else
14833         cat >> confdefs.h <<\EOF
14834 #define LBER_INT_T int
14835 EOF
14836
14837 fi
14838
14839 cat >> confdefs.h <<\EOF
14840 #define LBER_LEN_T long
14841 EOF
14842
14843 cat >> confdefs.h <<\EOF
14844 #define LBER_SOCKET_T int
14845 EOF
14846
14847 cat >> confdefs.h <<\EOF
14848 #define LBER_TAG_T long
14849 EOF
14850
14851
14852 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14853 echo "configure:14854: checking for 8-bit clean memcmp" >&5
14854 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14855   echo $ac_n "(cached) $ac_c" 1>&6
14856 else
14857   if test "$cross_compiling" = yes; then
14858   ac_cv_func_memcmp_clean=no
14859 else
14860   cat > conftest.$ac_ext <<EOF
14861 #line 14862 "configure"
14862 #include "confdefs.h"
14863
14864 main()
14865 {
14866   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14867   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14868 }
14869
14870 EOF
14871 if { (eval echo configure:14872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14872 then
14873   ac_cv_func_memcmp_clean=yes
14874 else
14875   echo "configure: failed program was:" >&5
14876   cat conftest.$ac_ext >&5
14877   rm -fr conftest*
14878   ac_cv_func_memcmp_clean=no
14879 fi
14880 rm -fr conftest*
14881 fi
14882
14883 fi
14884
14885 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14886 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14887
14888 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14889 echo "configure:14890: checking for strftime" >&5
14890 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14891   echo $ac_n "(cached) $ac_c" 1>&6
14892 else
14893   cat > conftest.$ac_ext <<EOF
14894 #line 14895 "configure"
14895 #include "confdefs.h"
14896 /* System header to define __stub macros and hopefully few prototypes,
14897     which can conflict with char strftime(); below.  */
14898 #include <assert.h>
14899 /* Override any gcc2 internal prototype to avoid an error.  */
14900 /* We use char because int might match the return type of a gcc2
14901     builtin and then its argument prototype would still apply.  */
14902 char strftime();
14903 char (*f)();
14904
14905 int main() {
14906
14907 /* The GNU C library defines this for functions which it implements
14908     to always fail with ENOSYS.  Some functions are actually named
14909     something starting with __ and the normal name is an alias.  */
14910 #if defined (__stub_strftime) || defined (__stub___strftime)
14911 choke me
14912 #else
14913 f = strftime;
14914 #endif
14915
14916 ; return 0; }
14917 EOF
14918 if { (eval echo configure:14919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14919   rm -rf conftest*
14920   eval "ac_cv_func_strftime=yes"
14921 else
14922   echo "configure: failed program was:" >&5
14923   cat conftest.$ac_ext >&5
14924   rm -rf conftest*
14925   eval "ac_cv_func_strftime=no"
14926 fi
14927 rm -f conftest*
14928 fi
14929
14930 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14931   echo "$ac_t""yes" 1>&6
14932   cat >> confdefs.h <<\EOF
14933 #define HAVE_STRFTIME 1
14934 EOF
14935
14936 else
14937   echo "$ac_t""no" 1>&6
14938 # strftime is in -lintl on SCO UNIX.
14939 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14940 echo "configure:14941: checking for strftime in -lintl" >&5
14941 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14943   echo $ac_n "(cached) $ac_c" 1>&6
14944 else
14945   ac_save_LIBS="$LIBS"
14946 LIBS="-lintl  $LIBS"
14947 cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950 /* Override any gcc2 internal prototype to avoid an error.  */
14951 /* We use char because int might match the return type of a gcc2
14952     builtin and then its argument prototype would still apply.  */
14953 char strftime();
14954
14955 int main() {
14956 strftime()
14957 ; return 0; }
14958 EOF
14959 if { (eval echo configure:14960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14960   rm -rf conftest*
14961   eval "ac_cv_lib_$ac_lib_var=yes"
14962 else
14963   echo "configure: failed program was:" >&5
14964   cat conftest.$ac_ext >&5
14965   rm -rf conftest*
14966   eval "ac_cv_lib_$ac_lib_var=no"
14967 fi
14968 rm -f conftest*
14969 LIBS="$ac_save_LIBS"
14970
14971 fi
14972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14973   echo "$ac_t""yes" 1>&6
14974   cat >> confdefs.h <<\EOF
14975 #define HAVE_STRFTIME 1
14976 EOF
14977
14978 LIBS="-lintl $LIBS"
14979 else
14980   echo "$ac_t""no" 1>&6
14981 fi
14982
14983 fi
14984
14985
14986 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14987 echo "configure:14988: checking for inet_aton()" >&5
14988 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14989   echo $ac_n "(cached) $ac_c" 1>&6
14990 else
14991   cat > conftest.$ac_ext <<EOF
14992 #line 14993 "configure"
14993 #include "confdefs.h"
14994
14995 #ifdef HAVE_SYS_TYPES_H
14996 #       include <sys/types.h>
14997 #endif
14998 #ifdef HAVE_SYS_SOCKET_H
14999 #       include <sys/socket.h>
15000 #       ifdef HAVE_SYS_SELECT_H
15001 #               include <sys/select.h>
15002 #       endif
15003 #       include <netinet/in.h>
15004 #       ifdef HAVE_ARPA_INET_H
15005 #               include <arpa/inet.h>
15006 #       endif
15007 #endif
15008
15009 int main() {
15010 struct in_addr in;
15011 int rc = inet_aton( "255.255.255.255", &in );
15012 ; return 0; }
15013 EOF
15014 if { (eval echo configure:15015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15015   rm -rf conftest*
15016   ol_cv_func_inet_aton=yes
15017 else
15018   echo "configure: failed program was:" >&5
15019   cat conftest.$ac_ext >&5
15020   rm -rf conftest*
15021   ol_cv_func_inet_aton=no
15022 fi
15023 rm -f conftest*
15024 fi
15025
15026 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15027   if test $ol_cv_func_inet_aton != no; then
15028     cat >> confdefs.h <<\EOF
15029 #define HAVE_INET_ATON 1
15030 EOF
15031
15032   fi
15033  
15034
15035 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15036 echo "configure:15037: checking for _spawnlp" >&5
15037 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15038   echo $ac_n "(cached) $ac_c" 1>&6
15039 else
15040   cat > conftest.$ac_ext <<EOF
15041 #line 15042 "configure"
15042 #include "confdefs.h"
15043 /* System header to define __stub macros and hopefully few prototypes,
15044     which can conflict with char _spawnlp(); below.  */
15045 #include <assert.h>
15046 /* Override any gcc2 internal prototype to avoid an error.  */
15047 /* We use char because int might match the return type of a gcc2
15048     builtin and then its argument prototype would still apply.  */
15049 char _spawnlp();
15050 char (*f)();
15051
15052 int main() {
15053
15054 /* The GNU C library defines this for functions which it implements
15055     to always fail with ENOSYS.  Some functions are actually named
15056     something starting with __ and the normal name is an alias.  */
15057 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15058 choke me
15059 #else
15060 f = _spawnlp;
15061 #endif
15062
15063 ; return 0; }
15064 EOF
15065 if { (eval echo configure:15066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15066   rm -rf conftest*
15067   eval "ac_cv_func__spawnlp=yes"
15068 else
15069   echo "configure: failed program was:" >&5
15070   cat conftest.$ac_ext >&5
15071   rm -rf conftest*
15072   eval "ac_cv_func__spawnlp=no"
15073 fi
15074 rm -f conftest*
15075 fi
15076
15077 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15078   echo "$ac_t""yes" 1>&6
15079   cat >> confdefs.h <<\EOF
15080 #define HAVE_SPAWNLP 1
15081 EOF
15082
15083 else
15084   echo "$ac_t""no" 1>&6
15085 fi
15086
15087
15088 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15089 echo "configure:15090: checking for _snprintf" >&5
15090 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15091   echo $ac_n "(cached) $ac_c" 1>&6
15092 else
15093   cat > conftest.$ac_ext <<EOF
15094 #line 15095 "configure"
15095 #include "confdefs.h"
15096 /* System header to define __stub macros and hopefully few prototypes,
15097     which can conflict with char _snprintf(); below.  */
15098 #include <assert.h>
15099 /* Override any gcc2 internal prototype to avoid an error.  */
15100 /* We use char because int might match the return type of a gcc2
15101     builtin and then its argument prototype would still apply.  */
15102 char _snprintf();
15103 char (*f)();
15104
15105 int main() {
15106
15107 /* The GNU C library defines this for functions which it implements
15108     to always fail with ENOSYS.  Some functions are actually named
15109     something starting with __ and the normal name is an alias.  */
15110 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15111 choke me
15112 #else
15113 f = _snprintf;
15114 #endif
15115
15116 ; return 0; }
15117 EOF
15118 if { (eval echo configure:15119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15119   rm -rf conftest*
15120   eval "ac_cv_func__snprintf=yes"
15121 else
15122   echo "configure: failed program was:" >&5
15123   cat conftest.$ac_ext >&5
15124   rm -rf conftest*
15125   eval "ac_cv_func__snprintf=no"
15126 fi
15127 rm -f conftest*
15128 fi
15129
15130 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15131   echo "$ac_t""yes" 1>&6
15132   ac_cv_func_snprintf=yes
15133         cat >> confdefs.h <<\EOF
15134 #define snprintf _snprintf
15135 EOF
15136
15137
15138 else
15139   echo "$ac_t""no" 1>&6
15140 fi
15141
15142
15143 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15144 echo "configure:15145: checking for _vsnprintf" >&5
15145 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15146   echo $ac_n "(cached) $ac_c" 1>&6
15147 else
15148   cat > conftest.$ac_ext <<EOF
15149 #line 15150 "configure"
15150 #include "confdefs.h"
15151 /* System header to define __stub macros and hopefully few prototypes,
15152     which can conflict with char _vsnprintf(); below.  */
15153 #include <assert.h>
15154 /* Override any gcc2 internal prototype to avoid an error.  */
15155 /* We use char because int might match the return type of a gcc2
15156     builtin and then its argument prototype would still apply.  */
15157 char _vsnprintf();
15158 char (*f)();
15159
15160 int main() {
15161
15162 /* The GNU C library defines this for functions which it implements
15163     to always fail with ENOSYS.  Some functions are actually named
15164     something starting with __ and the normal name is an alias.  */
15165 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15166 choke me
15167 #else
15168 f = _vsnprintf;
15169 #endif
15170
15171 ; return 0; }
15172 EOF
15173 if { (eval echo configure:15174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15174   rm -rf conftest*
15175   eval "ac_cv_func__vsnprintf=yes"
15176 else
15177   echo "configure: failed program was:" >&5
15178   cat conftest.$ac_ext >&5
15179   rm -rf conftest*
15180   eval "ac_cv_func__vsnprintf=no"
15181 fi
15182 rm -f conftest*
15183 fi
15184
15185 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15186   echo "$ac_t""yes" 1>&6
15187   ac_cv_func_vsnprintf=yes
15188         cat >> confdefs.h <<\EOF
15189 #define vsnprintf _vsnprintf
15190 EOF
15191
15192
15193 else
15194   echo "$ac_t""no" 1>&6
15195 fi
15196
15197
15198 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15199 echo "configure:15200: checking for vprintf" >&5
15200 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15201   echo $ac_n "(cached) $ac_c" 1>&6
15202 else
15203   cat > conftest.$ac_ext <<EOF
15204 #line 15205 "configure"
15205 #include "confdefs.h"
15206 /* System header to define __stub macros and hopefully few prototypes,
15207     which can conflict with char vprintf(); below.  */
15208 #include <assert.h>
15209 /* Override any gcc2 internal prototype to avoid an error.  */
15210 /* We use char because int might match the return type of a gcc2
15211     builtin and then its argument prototype would still apply.  */
15212 char vprintf();
15213 char (*f)();
15214
15215 int main() {
15216
15217 /* The GNU C library defines this for functions which it implements
15218     to always fail with ENOSYS.  Some functions are actually named
15219     something starting with __ and the normal name is an alias.  */
15220 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15221 choke me
15222 #else
15223 f = vprintf;
15224 #endif
15225
15226 ; return 0; }
15227 EOF
15228 if { (eval echo configure:15229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15229   rm -rf conftest*
15230   eval "ac_cv_func_vprintf=yes"
15231 else
15232   echo "configure: failed program was:" >&5
15233   cat conftest.$ac_ext >&5
15234   rm -rf conftest*
15235   eval "ac_cv_func_vprintf=no"
15236 fi
15237 rm -f conftest*
15238 fi
15239
15240 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15241   echo "$ac_t""yes" 1>&6
15242   cat >> confdefs.h <<\EOF
15243 #define HAVE_VPRINTF 1
15244 EOF
15245
15246 else
15247   echo "$ac_t""no" 1>&6
15248 fi
15249
15250 if test "$ac_cv_func_vprintf" != yes; then
15251 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15252 echo "configure:15253: checking for _doprnt" >&5
15253 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15254   echo $ac_n "(cached) $ac_c" 1>&6
15255 else
15256   cat > conftest.$ac_ext <<EOF
15257 #line 15258 "configure"
15258 #include "confdefs.h"
15259 /* System header to define __stub macros and hopefully few prototypes,
15260     which can conflict with char _doprnt(); below.  */
15261 #include <assert.h>
15262 /* Override any gcc2 internal prototype to avoid an error.  */
15263 /* We use char because int might match the return type of a gcc2
15264     builtin and then its argument prototype would still apply.  */
15265 char _doprnt();
15266 char (*f)();
15267
15268 int main() {
15269
15270 /* The GNU C library defines this for functions which it implements
15271     to always fail with ENOSYS.  Some functions are actually named
15272     something starting with __ and the normal name is an alias.  */
15273 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15274 choke me
15275 #else
15276 f = _doprnt;
15277 #endif
15278
15279 ; return 0; }
15280 EOF
15281 if { (eval echo configure:15282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15282   rm -rf conftest*
15283   eval "ac_cv_func__doprnt=yes"
15284 else
15285   echo "configure: failed program was:" >&5
15286   cat conftest.$ac_ext >&5
15287   rm -rf conftest*
15288   eval "ac_cv_func__doprnt=no"
15289 fi
15290 rm -f conftest*
15291 fi
15292
15293 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15294   echo "$ac_t""yes" 1>&6
15295   cat >> confdefs.h <<\EOF
15296 #define HAVE_DOPRNT 1
15297 EOF
15298
15299 else
15300   echo "$ac_t""no" 1>&6
15301 fi
15302
15303 fi
15304
15305
15306 if test $ac_cv_func_vprintf = yes ; then
15307                 for ac_func in vsnprintf vsprintf
15308 do
15309 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15310 echo "configure:15311: checking for $ac_func" >&5
15311 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15312   echo $ac_n "(cached) $ac_c" 1>&6
15313 else
15314   cat > conftest.$ac_ext <<EOF
15315 #line 15316 "configure"
15316 #include "confdefs.h"
15317 /* System header to define __stub macros and hopefully few prototypes,
15318     which can conflict with char $ac_func(); below.  */
15319 #include <assert.h>
15320 /* Override any gcc2 internal prototype to avoid an error.  */
15321 /* We use char because int might match the return type of a gcc2
15322     builtin and then its argument prototype would still apply.  */
15323 char $ac_func();
15324 char (*f)();
15325
15326 int main() {
15327
15328 /* The GNU C library defines this for functions which it implements
15329     to always fail with ENOSYS.  Some functions are actually named
15330     something starting with __ and the normal name is an alias.  */
15331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15332 choke me
15333 #else
15334 f = $ac_func;
15335 #endif
15336
15337 ; return 0; }
15338 EOF
15339 if { (eval echo configure:15340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15340   rm -rf conftest*
15341   eval "ac_cv_func_$ac_func=yes"
15342 else
15343   echo "configure: failed program was:" >&5
15344   cat conftest.$ac_ext >&5
15345   rm -rf conftest*
15346   eval "ac_cv_func_$ac_func=no"
15347 fi
15348 rm -f conftest*
15349 fi
15350
15351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15352   echo "$ac_t""yes" 1>&6
15353     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15354   cat >> confdefs.h <<EOF
15355 #define $ac_tr_func 1
15356 EOF
15357  
15358 else
15359   echo "$ac_t""no" 1>&6
15360 fi
15361 done
15362
15363 fi
15364
15365 for ac_func in \
15366         bcopy                   \
15367         closesocket             \
15368         chroot                  \
15369         endgrent                \
15370         endpwent                \
15371         flock                   \
15372         getdtablesize   \
15373         getgrgid                \
15374         gethostname             \
15375         getpass                 \
15376         getpassphrase   \
15377         getpwuid                \
15378         getpwnam                \
15379         getspnam                \
15380         gettimeofday    \
15381         initgroups              \
15382         lockf                   \
15383         memcpy                  \
15384         memmove                 \
15385         mkstemp                 \
15386         pipe                    \
15387         read                    \
15388         recv                    \
15389         recvfrom                \
15390         setpwfile               \
15391         setgid                  \
15392         setegid                 \
15393         setsid                  \
15394         setuid                  \
15395         seteuid                 \
15396         sigaction               \
15397         signal                  \
15398         sigset                  \
15399         snprintf                \
15400         strdup                  \
15401         strerror                \
15402         strpbrk                 \
15403         strrchr                 \
15404         strsep                  \
15405         strstr                  \
15406         strtol                  \
15407         strtoul                 \
15408         strspn                  \
15409         sysconf                 \
15410         waitpid                 \
15411         wait4                   \
15412         write                   \
15413         send                    \
15414         sendto                  \
15415
15416 do
15417 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15418 echo "configure:15419: checking for $ac_func" >&5
15419 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15420   echo $ac_n "(cached) $ac_c" 1>&6
15421 else
15422   cat > conftest.$ac_ext <<EOF
15423 #line 15424 "configure"
15424 #include "confdefs.h"
15425 /* System header to define __stub macros and hopefully few prototypes,
15426     which can conflict with char $ac_func(); below.  */
15427 #include <assert.h>
15428 /* Override any gcc2 internal prototype to avoid an error.  */
15429 /* We use char because int might match the return type of a gcc2
15430     builtin and then its argument prototype would still apply.  */
15431 char $ac_func();
15432 char (*f)();
15433
15434 int main() {
15435
15436 /* The GNU C library defines this for functions which it implements
15437     to always fail with ENOSYS.  Some functions are actually named
15438     something starting with __ and the normal name is an alias.  */
15439 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15440 choke me
15441 #else
15442 f = $ac_func;
15443 #endif
15444
15445 ; return 0; }
15446 EOF
15447 if { (eval echo configure:15448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15448   rm -rf conftest*
15449   eval "ac_cv_func_$ac_func=yes"
15450 else
15451   echo "configure: failed program was:" >&5
15452   cat conftest.$ac_ext >&5
15453   rm -rf conftest*
15454   eval "ac_cv_func_$ac_func=no"
15455 fi
15456 rm -f conftest*
15457 fi
15458
15459 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15460   echo "$ac_t""yes" 1>&6
15461     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15462   cat >> confdefs.h <<EOF
15463 #define $ac_tr_func 1
15464 EOF
15465  
15466 else
15467   echo "$ac_t""no" 1>&6
15468 fi
15469 done
15470
15471
15472 for ac_func in getopt tempnam
15473 do
15474 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15475 echo "configure:15476: checking for $ac_func" >&5
15476 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15477   echo $ac_n "(cached) $ac_c" 1>&6
15478 else
15479   cat > conftest.$ac_ext <<EOF
15480 #line 15481 "configure"
15481 #include "confdefs.h"
15482 /* System header to define __stub macros and hopefully few prototypes,
15483     which can conflict with char $ac_func(); below.  */
15484 #include <assert.h>
15485 /* Override any gcc2 internal prototype to avoid an error.  */
15486 /* We use char because int might match the return type of a gcc2
15487     builtin and then its argument prototype would still apply.  */
15488 char $ac_func();
15489 char (*f)();
15490
15491 int main() {
15492
15493 /* The GNU C library defines this for functions which it implements
15494     to always fail with ENOSYS.  Some functions are actually named
15495     something starting with __ and the normal name is an alias.  */
15496 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15497 choke me
15498 #else
15499 f = $ac_func;
15500 #endif
15501
15502 ; return 0; }
15503 EOF
15504 if { (eval echo configure:15505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15505   rm -rf conftest*
15506   eval "ac_cv_func_$ac_func=yes"
15507 else
15508   echo "configure: failed program was:" >&5
15509   cat conftest.$ac_ext >&5
15510   rm -rf conftest*
15511   eval "ac_cv_func_$ac_func=no"
15512 fi
15513 rm -f conftest*
15514 fi
15515
15516 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15517   echo "$ac_t""yes" 1>&6
15518     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15519   cat >> confdefs.h <<EOF
15520 #define $ac_tr_func 1
15521 EOF
15522  
15523 else
15524   echo "$ac_t""no" 1>&6
15525 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15526 fi
15527 done
15528
15529
15530
15531 if test "$ac_cv_func_getopt" != yes; then
15532     LIBSRCS="$LIBSRCS getopt.c"
15533 fi
15534
15535 if test "$ac_cv_func_tempnam" != yes; then
15536     LIBSRCS="$LIBSRCS tempnam.c"
15537 fi
15538
15539 # Check Configuration
15540 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15541 echo "configure:15542: checking declaration of sys_errlist" >&5
15542 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15543   echo $ac_n "(cached) $ac_c" 1>&6
15544 else
15545   
15546         cat > conftest.$ac_ext <<EOF
15547 #line 15548 "configure"
15548 #include "confdefs.h"
15549
15550 #include <stdio.h>
15551 #include <sys/types.h>
15552 #include <errno.h>
15553 #ifdef WINNT
15554 #include <stdlib.h>
15555 #endif 
15556 int main() {
15557 char *c = (char *) *sys_errlist
15558 ; return 0; }
15559 EOF
15560 if { (eval echo configure:15561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15561   rm -rf conftest*
15562   ol_cv_dcl_sys_errlist=yes
15563         ol_cv_have_sys_errlist=yes
15564 else
15565   echo "configure: failed program was:" >&5
15566   cat conftest.$ac_ext >&5
15567   rm -rf conftest*
15568   ol_cv_dcl_sys_errlist=no
15569 fi
15570 rm -f conftest*
15571 fi
15572
15573 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15574 #
15575 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15576 if test $ol_cv_dcl_sys_errlist = no ; then
15577         cat >> confdefs.h <<\EOF
15578 #define DECL_SYS_ERRLIST 1
15579 EOF
15580
15581
15582         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15583 echo "configure:15584: checking existence of sys_errlist" >&5
15584 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15585   echo $ac_n "(cached) $ac_c" 1>&6
15586 else
15587   
15588                 cat > conftest.$ac_ext <<EOF
15589 #line 15590 "configure"
15590 #include "confdefs.h"
15591 #include <errno.h>
15592 int main() {
15593 char *c = (char *) *sys_errlist
15594 ; return 0; }
15595 EOF
15596 if { (eval echo configure:15597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15597   rm -rf conftest*
15598   ol_cv_have_sys_errlist=yes
15599 else
15600   echo "configure: failed program was:" >&5
15601   cat conftest.$ac_ext >&5
15602   rm -rf conftest*
15603   ol_cv_have_sys_errlist=no
15604 fi
15605 rm -f conftest*
15606 fi
15607
15608 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15609 fi
15610 if test $ol_cv_have_sys_errlist = yes ; then
15611         cat >> confdefs.h <<\EOF
15612 #define HAVE_SYS_ERRLIST 1
15613 EOF
15614
15615 fi
15616
15617
15618
15619 if test "$ol_enable_debug" != no ; then
15620         cat >> confdefs.h <<\EOF
15621 #define LDAP_DEBUG 1
15622 EOF
15623
15624 fi
15625 if test "$ol_enable_syslog" = yes ; then
15626         cat >> confdefs.h <<\EOF
15627 #define LDAP_SYSLOG 1
15628 EOF
15629
15630 fi
15631 if test "$ol_enable_libui" = yes ; then
15632         cat >> confdefs.h <<\EOF
15633 #define LDAP_LIBUI 1
15634 EOF
15635
15636 fi
15637 if test "$ol_enable_cache" = no ; then
15638         cat >> confdefs.h <<\EOF
15639 #define LDAP_NOCACHE 1
15640 EOF
15641
15642 fi
15643 if test "$ol_link_kbind" != no ; then
15644         cat >> confdefs.h <<\EOF
15645 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15646 EOF
15647
15648 fi
15649 if test "$ol_enable_proctitle" != no ; then
15650         cat >> confdefs.h <<\EOF
15651 #define LDAP_PROCTITLE 1
15652 EOF
15653
15654 fi
15655 if test "$ol_enable_referrals" != no ; then
15656         cat >> confdefs.h <<\EOF
15657 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15658 EOF
15659
15660 fi
15661 if test "$ol_enable_cldap" != no ; then
15662         cat >> confdefs.h <<\EOF
15663 #define LDAP_CONNECTIONLESS 1
15664 EOF
15665
15666 fi
15667 if test "$ol_enable_ldapi" != no; then
15668         cat >> confdefs.h <<\EOF
15669 #define USE_PF_LOCAL 1
15670 EOF
15671
15672 fi
15673
15674 if test "$ol_enable_cleartext" != no ; then
15675         cat >> confdefs.h <<\EOF
15676 #define SLAPD_CLEARTEXT 1
15677 EOF
15678
15679 fi
15680 if test "$ol_enable_crypt" != no ; then
15681         cat >> confdefs.h <<\EOF
15682 #define SLAPD_CRYPT 1
15683 EOF
15684
15685 fi
15686 if test "$ol_link_kpasswd" != no ; then
15687         cat >> confdefs.h <<\EOF
15688 #define SLAPD_KPASSWD 1
15689 EOF
15690
15691 fi
15692 if test "$ol_link_spasswd" != no ; then
15693         cat >> confdefs.h <<\EOF
15694 #define SLAPD_SPASSWD 1
15695 EOF
15696
15697 fi
15698 if test "$ol_enable_multimaster" != no ; then
15699         cat >> confdefs.h <<\EOF
15700 #define SLAPD_MULTIMASTER 1
15701 EOF
15702
15703 fi
15704 if test "$ol_enable_phonetic" != no ; then
15705         cat >> confdefs.h <<\EOF
15706 #define SLAPD_PHONETIC 1
15707 EOF
15708
15709 fi
15710 if test "$ol_enable_rlookups" != no ; then
15711         cat >> confdefs.h <<\EOF
15712 #define SLAPD_RLOOKUPS 1
15713 EOF
15714
15715 fi
15716 if test "$ol_enable_aci" != no ; then
15717         cat >> confdefs.h <<\EOF
15718 #define SLAPD_ACI_ENABLED 1
15719 EOF
15720
15721 fi
15722
15723 if test "$ol_link_modules" != no ; then
15724         cat >> confdefs.h <<\EOF
15725 #define SLAPD_MODULES 1
15726 EOF
15727
15728         BUILD_SLAPD=yes
15729         SLAPD_MODULES_LDFLAGS="-dlopen self"
15730 fi
15731
15732 if test "$ol_link_dnssrv" != no ; then
15733         cat >> confdefs.h <<\EOF
15734 #define SLAPD_DNSSRV 1
15735 EOF
15736
15737         BUILD_SLAPD=yes
15738         BUILD_DNSSRV=yes
15739         if test "$ol_with_dnssrv_module" != static ; then
15740                 cat >> confdefs.h <<\EOF
15741 #define SLAPD_DNSSRV_DYNAMIC 1
15742 EOF
15743
15744                 BUILD_DNSSRV=mod
15745                 BUILD_DNSSRV_DYNAMIC=shared
15746                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15747         fi
15748 fi
15749
15750 if test "$ol_enable_ldap" != no ; then
15751         cat >> confdefs.h <<\EOF
15752 #define SLAPD_LDAP 1
15753 EOF
15754
15755         BUILD_SLAPD=yes
15756         BUILD_LDAP=yes
15757         if test "$ol_with_ldap_module" != static ; then
15758                 cat >> confdefs.h <<\EOF
15759 #define SLAPD_LDAP_DYNAMIC 1
15760 EOF
15761
15762                 BUILD_LDAP=mod
15763                 BUILD_LDAP_DYNAMIC=shared
15764                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15765         fi
15766 fi
15767
15768 if test "$ol_link_ldbm" != no ; then
15769         cat >> confdefs.h <<\EOF
15770 #define SLAPD_LDBM 1
15771 EOF
15772
15773         BUILD_SLAPD=yes
15774         BUILD_LDBM=yes
15775         if test "$ol_with_ldbm_module" != static ; then
15776                 cat >> confdefs.h <<\EOF
15777 #define SLAPD_LDBM_DYNAMIC 1
15778 EOF
15779
15780                 BUILD_LDBM=mod
15781                 BUILD_LDBM_DYNAMIC=shared
15782                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15783         fi
15784 fi
15785
15786 if test "$ol_enable_passwd" != no ; then
15787         cat >> confdefs.h <<\EOF
15788 #define SLAPD_PASSWD 1
15789 EOF
15790
15791         BUILD_SLAPD=yes
15792         BUILD_PASSWD=yes
15793         if test "$ol_with_passwd_module" != static ; then
15794                 cat >> confdefs.h <<\EOF
15795 #define SLAPD_PASSWD_DYNAMIC 1
15796 EOF
15797
15798                 BUILD_PASSWD=mod
15799                 BUILD_PASSWD_DYNAMIC=shared
15800                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15801         fi
15802 fi
15803
15804 if test "$ol_link_perl" != no ; then
15805         cat >> confdefs.h <<\EOF
15806 #define SLAPD_PERL 1
15807 EOF
15808
15809         BUILD_SLAPD=yes
15810         BUILD_PERL=yes
15811         if test "$ol_with_perl_module" != static ; then
15812                 cat >> confdefs.h <<\EOF
15813 #define SLAPD_PERL_DYNAMIC 1
15814 EOF
15815
15816                 BUILD_PERL=mod
15817                 BUILD_PERL_DYNAMIC=shared
15818                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15819         fi
15820 fi
15821
15822 if test "$ol_enable_shell" != no ; then
15823         cat >> confdefs.h <<\EOF
15824 #define SLAPD_SHELL 1
15825 EOF
15826
15827         BUILD_SLAPD=yes
15828         BUILD_SHELL=yes
15829         if test "$ol_with_shell_module" != static ; then
15830                 cat >> confdefs.h <<\EOF
15831 #define SLAPD_SHELL_DYNAMIC 1
15832 EOF
15833
15834                 BUILD_SHELL=mod
15835                 BUILD_SHELL_DYNAMIC=shared
15836                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15837         fi
15838 fi
15839
15840 if test "$ol_enable_tcl" != no ; then
15841         cat >> confdefs.h <<\EOF
15842 #define SLAPD_TCL 1
15843 EOF
15844
15845         BUILD_SLAPD=yes
15846         BUILD_TCL=yes
15847         if test "$ol_with_tcl_module" != static; then
15848                 cat >> confdefs.h <<\EOF
15849 #define SLAPD_TCL_DYNAMIC 1
15850 EOF
15851
15852                 BUILD_TCL=mod
15853                 BUILD_TCL_DYNAMIC=shared
15854                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15855         fi
15856 fi
15857
15858 if test "$ol_enable_sql" != no ; then
15859         cat >> confdefs.h <<\EOF
15860 #define SLAPD_SQL 1
15861 EOF
15862
15863         BUILD_SLAPD=yes
15864         BUILD_SQL=yes
15865         SLAPD_SQL_LIBS=-liodbc
15866         if test "$ol_with_sql_module" != static; then
15867                 cat >> confdefs.h <<\EOF
15868 #define SLAPD_SQL_DYNAMIC 1
15869 EOF
15870
15871                 BUILD_SQL=mod
15872                 BUILD_SQL_DYNAMIC=shared
15873                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15874         fi
15875 fi
15876
15877 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15878         $BUILD_SLAPD = yes ; then
15879         BUILD_SLURPD=yes
15880 fi
15881
15882
15883 if test "$LINK_BINS_DYNAMIC" = yes; then
15884     LIB_LINKAGE=DYN
15885     LT_LIB_LINKAGE=shared
15886 else
15887     LIB_LINKAGE=STAT
15888     LT_LIB_LINKAGE=static
15889 fi
15890
15891 if test "$ac_cv_mingw32" = yes ; then
15892     PLAT=NT
15893     DYN_EXT=dll
15894 else
15895     PLAT=UNIX
15896     DYN_EXT=so
15897 fi
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907   
15908   
15909   
15910   
15911   
15912   
15913   
15914   
15915   
15916   
15917   
15918   
15919   
15920   
15921   
15922   
15923   
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960 trap '' 1 2 15
15961
15962 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15963
15964 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15965 # Let make expand exec_prefix.
15966 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15967
15968 # Any assignment to VPATH causes Sun make to only execute
15969 # the first set of double-colon rules, so remove it if not needed.
15970 # If there is a colon in the path, we need to keep it.
15971 if test "x$srcdir" = x.; then
15972   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15973 fi
15974
15975 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15976
15977 DEFS=-DHAVE_CONFIG_H
15978
15979 # Without the "./", some shells look in PATH for config.status.
15980 : ${CONFIG_STATUS=./config.status}
15981
15982 echo creating $CONFIG_STATUS
15983 rm -f $CONFIG_STATUS
15984 cat > $CONFIG_STATUS <<EOF
15985 #! /bin/sh
15986 # Generated automatically by configure.
15987 # Run this file to recreate the current configuration.
15988 # This directory was configured as follows,
15989 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15990 #
15991 # $0 $ac_configure_args
15992 #
15993 # Compiler output produced by configure, useful for debugging
15994 # configure, is in ./config.log if it exists.
15995
15996 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15997 for ac_option
15998 do
15999   case "\$ac_option" in
16000   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16001     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16002     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16003   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16004     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16005     exit 0 ;;
16006   -help | --help | --hel | --he | --h)
16007     echo "\$ac_cs_usage"; exit 0 ;;
16008   *) echo "\$ac_cs_usage"; exit 1 ;;
16009   esac
16010 done
16011
16012 ac_given_srcdir=$srcdir
16013 ac_given_INSTALL="$INSTALL"
16014
16015 trap 'rm -fr `echo "\
16016 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16017 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16018 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16019 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16020 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16021 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16022 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16023 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16024 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16025 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16026 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16027 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16028 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16029 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16030 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16031 include/Makefile:build/top.mk:include/Makefile.in \
16032 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16033 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16034 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16035 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16036 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16037 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16038 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16039 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16040 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16041 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16042 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16043 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16044 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16045 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16046 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16047 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16048 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16049 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16050 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16051 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16052 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16053 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16054 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16055 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16056 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16057 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16058 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16059  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16060 EOF
16061 cat >> $CONFIG_STATUS <<EOF
16062
16063 # Protect against being on the right side of a sed subst in config.status.
16064 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16065  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16066 $ac_vpsub
16067 $extrasub
16068 s%@SHELL@%$SHELL%g
16069 s%@CFLAGS@%$CFLAGS%g
16070 s%@CPPFLAGS@%$CPPFLAGS%g
16071 s%@CXXFLAGS@%$CXXFLAGS%g
16072 s%@FFLAGS@%$FFLAGS%g
16073 s%@DEFS@%$DEFS%g
16074 s%@LDFLAGS@%$LDFLAGS%g
16075 s%@LIBS@%$LIBS%g
16076 s%@exec_prefix@%$exec_prefix%g
16077 s%@prefix@%$prefix%g
16078 s%@program_transform_name@%$program_transform_name%g
16079 s%@bindir@%$bindir%g
16080 s%@sbindir@%$sbindir%g
16081 s%@libexecdir@%$libexecdir%g
16082 s%@datadir@%$datadir%g
16083 s%@sysconfdir@%$sysconfdir%g
16084 s%@sharedstatedir@%$sharedstatedir%g
16085 s%@localstatedir@%$localstatedir%g
16086 s%@libdir@%$libdir%g
16087 s%@includedir@%$includedir%g
16088 s%@oldincludedir@%$oldincludedir%g
16089 s%@infodir@%$infodir%g
16090 s%@mandir@%$mandir%g
16091 s%@host@%$host%g
16092 s%@host_alias@%$host_alias%g
16093 s%@host_cpu@%$host_cpu%g
16094 s%@host_vendor@%$host_vendor%g
16095 s%@host_os@%$host_os%g
16096 s%@target@%$target%g
16097 s%@target_alias@%$target_alias%g
16098 s%@target_cpu@%$target_cpu%g
16099 s%@target_vendor@%$target_vendor%g
16100 s%@target_os@%$target_os%g
16101 s%@build@%$build%g
16102 s%@build_alias@%$build_alias%g
16103 s%@build_cpu@%$build_cpu%g
16104 s%@build_vendor@%$build_vendor%g
16105 s%@build_os@%$build_os%g
16106 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16107 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16108 s%@INSTALL_DATA@%$INSTALL_DATA%g
16109 s%@PACKAGE@%$PACKAGE%g
16110 s%@VERSION@%$VERSION%g
16111 s%@ACLOCAL@%$ACLOCAL%g
16112 s%@AUTOCONF@%$AUTOCONF%g
16113 s%@AUTOMAKE@%$AUTOMAKE%g
16114 s%@AUTOHEADER@%$AUTOHEADER%g
16115 s%@MAKEINFO@%$MAKEINFO%g
16116 s%@install_sh@%$install_sh%g
16117 s%@AMTAR@%$AMTAR%g
16118 s%@AWK@%$AWK%g
16119 s%@AMTARFLAGS@%$AMTARFLAGS%g
16120 s%@SET_MAKE@%$SET_MAKE%g
16121 s%@top_builddir@%$top_builddir%g
16122 s%@ldap_subdir@%$ldap_subdir%g
16123 s%@CC@%$CC%g
16124 s%@RANLIB@%$RANLIB%g
16125 s%@LN_S@%$LN_S%g
16126 s%@DLLTOOL@%$DLLTOOL%g
16127 s%@AS@%$AS%g
16128 s%@OBJDUMP@%$OBJDUMP%g
16129 s%@LIBTOOL@%$LIBTOOL%g
16130 s%@LN_H@%$LN_H%g
16131 s%@SENDMAIL@%$SENDMAIL%g
16132 s%@EDITOR@%$EDITOR%g
16133 s%@FINGER@%$FINGER%g
16134 s%@PERLBIN@%$PERLBIN%g
16135 s%@CPP@%$CPP%g
16136 s%@EXEEXT@%$EXEEXT%g
16137 s%@OBJEXT@%$OBJEXT%g
16138 s%@OL_MKDEP@%$OL_MKDEP%g
16139 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16140 s%@LIBOBJS@%$LIBOBJS%g
16141 s%@LIBSRCS@%$LIBSRCS%g
16142 s%@PLAT@%$PLAT%g
16143 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16144 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16145 s%@DYN_EXT@%$DYN_EXT%g
16146 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16147 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16148 s%@BUILD_LDAP@%$BUILD_LDAP%g
16149 s%@BUILD_LDBM@%$BUILD_LDBM%g
16150 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16151 s%@BUILD_PERL@%$BUILD_PERL%g
16152 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16153 s%@BUILD_SHELL@%$BUILD_SHELL%g
16154 s%@BUILD_SQL@%$BUILD_SQL%g
16155 s%@BUILD_TCL@%$BUILD_TCL%g
16156 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16157 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16158 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16159 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16160 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16161 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16162 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16163 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16164 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16165 s%@LDAP_LIBS@%$LDAP_LIBS%g
16166 s%@LDIF_LIBS@%$LDIF_LIBS%g
16167 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16168 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16169 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16170 s%@LDBM_LIBS@%$LDBM_LIBS%g
16171 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16172 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16173 s%@WRAP_LIBS@%$WRAP_LIBS%g
16174 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16175 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16176 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16177 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16178 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16179 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16180 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16181 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16182 s%@KRB4_LIBS@%$KRB4_LIBS%g
16183 s%@KRB5_LIBS@%$KRB5_LIBS%g
16184 s%@READLINE_LIBS@%$READLINE_LIBS%g
16185 s%@SASL_LIBS@%$SASL_LIBS%g
16186 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16187 s%@TLS_LIBS@%$TLS_LIBS%g
16188 s%@MODULES_LIBS@%$MODULES_LIBS%g
16189 s%@AUTH_LIBS@%$AUTH_LIBS%g
16190 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16191 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16192 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16193
16194 CEOF
16195 EOF
16196
16197 cat >> $CONFIG_STATUS <<\EOF
16198
16199 # Split the substitutions into bite-sized pieces for seds with
16200 # small command number limits, like on Digital OSF/1 and HP-UX.
16201 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16202 ac_file=1 # Number of current file.
16203 ac_beg=1 # First line for current file.
16204 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16205 ac_more_lines=:
16206 ac_sed_cmds=""
16207 while $ac_more_lines; do
16208   if test $ac_beg -gt 1; then
16209     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16210   else
16211     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16212   fi
16213   if test ! -s conftest.s$ac_file; then
16214     ac_more_lines=false
16215     rm -f conftest.s$ac_file
16216   else
16217     if test -z "$ac_sed_cmds"; then
16218       ac_sed_cmds="sed -f conftest.s$ac_file"
16219     else
16220       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16221     fi
16222     ac_file=`expr $ac_file + 1`
16223     ac_beg=$ac_end
16224     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16225   fi
16226 done
16227 if test -z "$ac_sed_cmds"; then
16228   ac_sed_cmds=cat
16229 fi
16230 EOF
16231
16232 cat >> $CONFIG_STATUS <<EOF
16233
16234 CONFIG_FILES=\${CONFIG_FILES-"\
16235 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16236 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16237 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16238 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16239 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16240 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16241 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16242 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16243 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16244 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16245 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16246 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16247 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16248 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16249 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16250 include/Makefile:build/top.mk:include/Makefile.in \
16251 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16252 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16253 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16254 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16255 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16256 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16257 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16258 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16259 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16260 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16261 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16262 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16263 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16264 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16265 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16266 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16267 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16268 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16269 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16270 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16271 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16272 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16273 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16274 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16275 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16276 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16277 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16278 "}
16279 EOF
16280 cat >> $CONFIG_STATUS <<\EOF
16281 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16282   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16283   case "$ac_file" in
16284   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16285        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16286   *) ac_file_in="${ac_file}.in" ;;
16287   esac
16288
16289   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16290
16291   # Remove last slash and all that follows it.  Not all systems have dirname.
16292   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16293   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16294     # The file is in a subdirectory.
16295     test ! -d "$ac_dir" && mkdir "$ac_dir"
16296     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16297     # A "../" for each directory in $ac_dir_suffix.
16298     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16299   else
16300     ac_dir_suffix= ac_dots=
16301   fi
16302
16303   case "$ac_given_srcdir" in
16304   .)  srcdir=.
16305       if test -z "$ac_dots"; then top_srcdir=.
16306       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16307   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16308   *) # Relative path.
16309     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16310     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16311   esac
16312
16313   case "$ac_given_INSTALL" in
16314   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16315   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16316   esac
16317
16318   echo creating "$ac_file"
16319   rm -f "$ac_file"
16320   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16321   case "$ac_file" in
16322   *[Mm]akefile*) ac_comsub="1i\\
16323 # $configure_input" ;;
16324   *) ac_comsub= ;;
16325   esac
16326
16327   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16328   sed -e "$ac_comsub
16329 s%@configure_input@%$configure_input%g
16330 s%@srcdir@%$srcdir%g
16331 s%@top_srcdir@%$top_srcdir%g
16332 s%@INSTALL@%$INSTALL%g
16333 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16334 fi; done
16335 rm -f conftest.s*
16336
16337 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16338 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16339 #
16340 # ac_d sets the value in "#define NAME VALUE" lines.
16341 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16342 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16343 ac_dC='\3'
16344 ac_dD='%g'
16345 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16346 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16347 ac_uB='\([      ]\)%\1#\2define\3'
16348 ac_uC=' '
16349 ac_uD='\4%g'
16350 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16351 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16352 ac_eB='$%\1#\2define\3'
16353 ac_eC=' '
16354 ac_eD='%g'
16355
16356 if test "${CONFIG_HEADERS+set}" != set; then
16357 EOF
16358 cat >> $CONFIG_STATUS <<EOF
16359   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16360 EOF
16361 cat >> $CONFIG_STATUS <<\EOF
16362 fi
16363 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16364   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16365   case "$ac_file" in
16366   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16367        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16368   *) ac_file_in="${ac_file}.in" ;;
16369   esac
16370
16371   echo creating $ac_file
16372
16373   rm -f conftest.frag conftest.in conftest.out
16374   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16375   cat $ac_file_inputs > conftest.in
16376
16377 EOF
16378
16379 # Transform confdefs.h into a sed script conftest.vals that substitutes
16380 # the proper values into config.h.in to produce config.h.  And first:
16381 # Protect against being on the right side of a sed subst in config.status.
16382 # Protect against being in an unquoted here document in config.status.
16383 rm -f conftest.vals
16384 cat > conftest.hdr <<\EOF
16385 s/[\\&%]/\\&/g
16386 s%[\\$`]%\\&%g
16387 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16388 s%ac_d%ac_u%gp
16389 s%ac_u%ac_e%gp
16390 EOF
16391 sed -n -f conftest.hdr confdefs.h > conftest.vals
16392 rm -f conftest.hdr
16393
16394 # This sed command replaces #undef with comments.  This is necessary, for
16395 # example, in the case of _POSIX_SOURCE, which is predefined and required
16396 # on some systems where configure will not decide to define it.
16397 cat >> conftest.vals <<\EOF
16398 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16399 EOF
16400
16401 # Break up conftest.vals because some shells have a limit on
16402 # the size of here documents, and old seds have small limits too.
16403
16404 rm -f conftest.tail
16405 while :
16406 do
16407   ac_lines=`grep -c . conftest.vals`
16408   # grep -c gives empty output for an empty file on some AIX systems.
16409   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16410   # Write a limited-size here document to conftest.frag.
16411   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16412   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16413   echo 'CEOF
16414   sed -f conftest.frag conftest.in > conftest.out
16415   rm -f conftest.in
16416   mv conftest.out conftest.in
16417 ' >> $CONFIG_STATUS
16418   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16419   rm -f conftest.vals
16420   mv conftest.tail conftest.vals
16421 done
16422 rm -f conftest.vals
16423
16424 cat >> $CONFIG_STATUS <<\EOF
16425   rm -f conftest.frag conftest.h
16426   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16427   cat conftest.in >> conftest.h
16428   rm -f conftest.in
16429   if cmp -s $ac_file conftest.h 2>/dev/null; then
16430     echo "$ac_file is unchanged"
16431     rm -f conftest.h
16432   else
16433     # Remove last slash and all that follows it.  Not all systems have dirname.
16434       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16435       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16436       # The file is in a subdirectory.
16437       test ! -d "$ac_dir" && mkdir "$ac_dir"
16438     fi
16439     rm -f $ac_file
16440     mv conftest.h $ac_file
16441   fi
16442 fi; done
16443
16444 EOF
16445 cat >> $CONFIG_STATUS <<EOF
16446
16447 EOF
16448 cat >> $CONFIG_STATUS <<\EOF
16449
16450 date > stamp-h
16451 echo Please \"make depend\" to build dependencies
16452
16453 exit 0
16454 EOF
16455 chmod +x $CONFIG_STATUS
16456 rm -fr confdefs* $ac_clean_files
16457 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16458