]> git.sur5r.net Git - openldap/blob - configure
s/enable-unix/enable-local/
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.316 2000/06/25 19:40:13 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 "Restrictions apply, see COPYRIGHT and LICENSE files."
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-ipv6         enable IPv6 support (auto)"
45 ac_help="$ac_help
46   --enable-local                enable AF_LOCAL socket support (auto)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --with-cyrus-sasl     with Cyrus SASL support (auto)"
51 ac_help="$ac_help
52   --with-fetch          with fetch URL support (auto)"
53 ac_help="$ac_help
54   --with-kerberos       with support (auto)"
55 ac_help="$ac_help
56   --with-readline       with readline support (auto)"
57 ac_help="$ac_help
58   --with-threads        use threads (auto)"
59 ac_help="$ac_help
60   --with-tls            with TLS/SSL support (auto)"
61 ac_help="$ac_help
62   --with-yielding-select        with implicitly yielding select (auto)"
63 ac_help="$ac_help
64 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd        enable building slapd (yes)"
67 ac_help="$ac_help
68     --enable-cleartext  enable cleartext passwords (yes)"
69 ac_help="$ac_help
70     --enable-crypt      enable crypt(3) passwords (auto)"
71 ac_help="$ac_help
72     --enable-kpasswd    enable kerberos password verification (no)"
73 ac_help="$ac_help
74     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
75 ac_help="$ac_help
76     --enable-modules    enable dynamic module support (no)"
77 ac_help="$ac_help
78     --enable-multimaster        enable multimaster replication (no)"
79 ac_help="$ac_help
80     --enable-phonetic   enable phonetic/soundex (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
644 # set unset (borrowed from autoconf 2.14a)
645 if (unset FOO) >/dev/null 2>&1; then
646   ol_unset=unset
647 else
648   ol_unset=false
649 fi
650 # unset CDPATH
651 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
652
653 ac_aux_dir=
654 for ac_dir in build $srcdir/build; do
655   if test -f $ac_dir/install-sh; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/install-sh -c"
658     break
659   elif test -f $ac_dir/install.sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install.sh -c"
662     break
663   elif test -f $ac_dir/shtool; then
664     ac_aux_dir=$ac_dir
665     ac_install_sh="$ac_aux_dir/shtool install -c"
666     break
667   fi
668 done
669 if test -z "$ac_aux_dir"; then
670   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
671 fi
672 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
673 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
674 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
675
676 OL_VERSION=`cat $ac_aux_dir/version`
677 if test -z "$OL_VERSION"; then
678         { echo "configure: error: could not determine version" 1>&2; exit 1; }
679 fi
680
681 echo "Configuring OpenLDAP $OL_VERSION ..."
682
683
684 echo $ac_n "checking host system type""... $ac_c" 1>&6
685 echo "configure:686: checking host system type" >&5
686 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
687
688 # Make sure we can run config.sub.
689   if $ac_config_sub sun4 >/dev/null 2>&1; then :
690     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
691   fi
692
693   ac_cv_host_alias=$host
694   case "$ac_cv_host_alias" in
695   NONE)
696     case $nonopt in
697     NONE)
698       if ac_cv_host_alias=`$ac_config_guess`; then :
699       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
700       fi ;;
701     *) ac_cv_host_alias=$nonopt ;;
702     esac ;;
703   esac
704
705   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
706   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
707   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
708   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
709 else
710   echo $ac_n "(cached) $ac_c" 1>&6
711 fi
712
713 echo "$ac_t""$ac_cv_host" 1>&6
714
715 host=$ac_cv_host
716 host_alias=$ac_cv_host_alias
717 host_cpu=$ac_cv_host_cpu
718 host_vendor=$ac_cv_host_vendor
719 host_os=$ac_cv_host_os
720
721
722
723
724
725 echo $ac_n "checking target system type""... $ac_c" 1>&6
726 echo "configure:727: checking target system type" >&5
727 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
728
729 # Make sure we can run config.sub.
730   if $ac_config_sub sun4 >/dev/null 2>&1; then :
731     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
732   fi
733
734   ac_cv_target_alias=$target
735   case "$ac_cv_target_alias" in
736   NONE)
737     case $nonopt in
738     NONE)
739       ac_cv_target_alias=$host_alias ;;
740
741     *) ac_cv_target_alias=$nonopt ;;
742     esac ;;
743   esac
744
745   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
746   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
747   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
748   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
749 else
750   echo $ac_n "(cached) $ac_c" 1>&6
751 fi
752
753 echo "$ac_t""$ac_cv_target" 1>&6
754
755 target=$ac_cv_target
756 target_alias=$ac_cv_target_alias
757 target_cpu=$ac_cv_target_cpu
758 target_vendor=$ac_cv_target_vendor
759 target_os=$ac_cv_target_os
760
761
762
763
764
765 echo $ac_n "checking build system type""... $ac_c" 1>&6
766 echo "configure:767: checking build system type" >&5
767 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
768
769 # Make sure we can run config.sub.
770   if $ac_config_sub sun4 >/dev/null 2>&1; then :
771     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
772   fi
773
774   ac_cv_build_alias=$build
775   case "$ac_cv_build_alias" in
776   NONE)
777     case $nonopt in
778     NONE)
779       ac_cv_build_alias=$host_alias ;;
780
781     *) ac_cv_build_alias=$nonopt ;;
782     esac ;;
783   esac
784
785   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
786   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
787   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
788   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
789 else
790   echo $ac_n "(cached) $ac_c" 1>&6
791 fi
792
793 echo "$ac_t""$ac_cv_build" 1>&6
794
795 build=$ac_cv_build
796 build_alias=$ac_cv_build_alias
797 build_cpu=$ac_cv_build_cpu
798 build_vendor=$ac_cv_build_vendor
799 build_os=$ac_cv_build_os
800
801
802
803
804
805 # Do some error checking and defaulting for the host and target type.
806 # The inputs are:
807 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
808 #
809 # The rules are:
810 # 1. You are not allowed to specify --host, --target, and nonopt at the
811 #    same time.
812 # 2. Host defaults to nonopt.
813 # 3. If nonopt is not specified, then host defaults to the current host,
814 #    as determined by config.guess.
815 # 4. Target and build default to nonopt.
816 # 5. If nonopt is not specified, then target and build default to host.
817
818 # The aliases save the names the user supplied, while $host etc.
819 # will get canonicalized.
820 case $host---$target---$nonopt in
821 NONE---*---* | *---NONE---* | *---*---NONE) ;;
822 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
823 esac
824
825 test "$host_alias" != "$target_alias" &&
826   test "$program_prefix$program_suffix$program_transform_name" = \
827     NONENONEs,x,x, &&
828   program_prefix=${target_alias}-
829
830
831 # Find a good install program.  We prefer a C program (faster),
832 # so one script is as good as another.  But avoid the broken or
833 # incompatible versions:
834 # SysV /etc/install, /usr/sbin/install
835 # SunOS /usr/etc/install
836 # IRIX /sbin/install
837 # AIX /bin/install
838 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
839 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
840 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
841 # ./install, which can be erroneously created by make from ./install.sh.
842 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
843 echo "configure:844: checking for a BSD compatible install" >&5
844 if test -z "$INSTALL"; then
845 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
846   echo $ac_n "(cached) $ac_c" 1>&6
847 else
848     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
849   for ac_dir in $PATH; do
850     # Account for people who put trailing slashes in PATH elements.
851     case "$ac_dir/" in
852     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
853     *)
854       # OSF1 and SCO ODT 3.0 have their own names for install.
855       # Don't use installbsd from OSF since it installs stuff as root
856       # by default.
857       for ac_prog in ginstall scoinst install; do
858         if test -f $ac_dir/$ac_prog; then
859           if test $ac_prog = install &&
860             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
861             # AIX install.  It has an incompatible calling convention.
862             :
863           elif test $ac_prog = install &&
864             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
865             # program-specific install script used by HP pwplus--don't use.
866             :
867           else
868             ac_cv_path_install="$ac_dir/$ac_prog -c"
869             break 2
870           fi
871         fi
872       done
873       ;;
874     esac
875   done
876   IFS="$ac_save_IFS"
877
878 fi
879   if test "${ac_cv_path_install+set}" = set; then
880     INSTALL="$ac_cv_path_install"
881   else
882     # As a last resort, use the slow shell script.  We don't cache a
883     # path for INSTALL within a source directory, because that will
884     # break other packages using the cache if that directory is
885     # removed, or if the path is relative.
886     INSTALL="$ac_install_sh"
887   fi
888 fi
889 echo "$ac_t""$INSTALL" 1>&6
890
891 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
892 # It thinks the first close brace ends the variable substitution.
893 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
894
895 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
896
897 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
898
899 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
900 echo "configure:901: checking whether build environment is sane" >&5
901 # Just in case
902 sleep 1
903 echo timestamp > conftestfile
904 # Do `set' in a subshell so we don't clobber the current shell's
905 # arguments.  Must try -L first in case configure is actually a
906 # symlink; some systems play weird games with the mod time of symlinks
907 # (eg FreeBSD returns the mod time of the symlink's containing
908 # directory).
909 if (
910    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
911    if test "$*" = "X"; then
912       # -L didn't work.
913       set X `ls -t $srcdir/configure conftestfile`
914    fi
915    if test "$*" != "X $srcdir/configure conftestfile" \
916       && test "$*" != "X conftestfile $srcdir/configure"; then
917
918       # If neither matched, then we have a broken ls.  This can happen
919       # if, for instance, CONFIG_SHELL is bash and it inherits a
920       # broken ls alias from the environment.  This has actually
921       # happened.  Such a system could not be considered "sane".
922       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
923 alias in your environment" 1>&2; exit 1; }
924    fi
925
926    test "$2" = conftestfile
927    )
928 then
929    # Ok.
930    :
931 else
932    { echo "configure: error: newly created file is older than distributed files!
933 Check your system clock" 1>&2; exit 1; }
934 fi
935 rm -f conftest*
936 echo "$ac_t""yes" 1>&6
937 if test "$program_transform_name" = s,x,x,; then
938   program_transform_name=
939 else
940   # Double any \ or $.  echo might interpret backslashes.
941   cat <<\EOF_SED > conftestsed
942 s,\\,\\\\,g; s,\$,$$,g
943 EOF_SED
944   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
945   rm -f conftestsed
946 fi
947 test "$program_prefix" != NONE &&
948   program_transform_name="s,^,${program_prefix},;$program_transform_name"
949 # Use a double $ so make ignores it.
950 test "$program_suffix" != NONE &&
951   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
952
953 # sed with no file args requires a program.
954 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
955
956 for ac_prog in mawk gawk nawk awk
957 do
958 # Extract the first word of "$ac_prog", so it can be a program name with args.
959 set dummy $ac_prog; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
963   echo $ac_n "(cached) $ac_c" 1>&6
964 else
965   if test -n "$AWK"; then
966   ac_cv_prog_AWK="$AWK" # Let the user override the test.
967 else
968   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
969   ac_dummy="$PATH"
970   for ac_dir in $ac_dummy; do
971     test -z "$ac_dir" && ac_dir=.
972     if test -f $ac_dir/$ac_word; then
973       ac_cv_prog_AWK="$ac_prog"
974       break
975     fi
976   done
977   IFS="$ac_save_ifs"
978 fi
979 fi
980 AWK="$ac_cv_prog_AWK"
981 if test -n "$AWK"; then
982   echo "$ac_t""$AWK" 1>&6
983 else
984   echo "$ac_t""no" 1>&6
985 fi
986
987 test -n "$AWK" && break
988 done
989
990 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
991 echo "configure:992: checking whether ${MAKE-make} sets \${MAKE}" >&5
992 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
993 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
994   echo $ac_n "(cached) $ac_c" 1>&6
995 else
996   cat > conftestmake <<\EOF
997 all:
998         @echo 'ac_maketemp="${MAKE}"'
999 EOF
1000 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1001 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1002 if test -n "$ac_maketemp"; then
1003   eval ac_cv_prog_make_${ac_make}_set=yes
1004 else
1005   eval ac_cv_prog_make_${ac_make}_set=no
1006 fi
1007 rm -f conftestmake
1008 fi
1009 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1010   echo "$ac_t""yes" 1>&6
1011   SET_MAKE=
1012 else
1013   echo "$ac_t""no" 1>&6
1014   SET_MAKE="MAKE=${MAKE-make}"
1015 fi
1016
1017
1018
1019 PACKAGE=OpenLDAP
1020
1021 VERSION=$OL_VERSION
1022
1023 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1024   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1025 fi
1026
1027
1028
1029 missing_dir=`cd $ac_aux_dir && pwd`
1030 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1031 echo "configure:1032: checking for working aclocal" >&5
1032 # Run test in a subshell; some versions of sh will print an error if
1033 # an executable is not found, even if stderr is redirected.
1034 # Redirect stdin to placate older versions of autoconf.  Sigh.
1035 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1036    ACLOCAL=aclocal
1037    echo "$ac_t""found" 1>&6
1038 else
1039    ACLOCAL="$missing_dir/missing aclocal"
1040    echo "$ac_t""missing" 1>&6
1041 fi
1042
1043 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1044 echo "configure:1045: checking for working autoconf" >&5
1045 # Run test in a subshell; some versions of sh will print an error if
1046 # an executable is not found, even if stderr is redirected.
1047 # Redirect stdin to placate older versions of autoconf.  Sigh.
1048 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1049    AUTOCONF=autoconf
1050    echo "$ac_t""found" 1>&6
1051 else
1052    AUTOCONF="$missing_dir/missing autoconf"
1053    echo "$ac_t""missing" 1>&6
1054 fi
1055
1056 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1057 echo "configure:1058: checking for working automake" >&5
1058 # Run test in a subshell; some versions of sh will print an error if
1059 # an executable is not found, even if stderr is redirected.
1060 # Redirect stdin to placate older versions of autoconf.  Sigh.
1061 if (automake --version) < /dev/null > /dev/null 2>&1; then
1062    AUTOMAKE=automake
1063    echo "$ac_t""found" 1>&6
1064 else
1065    AUTOMAKE="$missing_dir/missing automake"
1066    echo "$ac_t""missing" 1>&6
1067 fi
1068
1069 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1070 echo "configure:1071: checking for working autoheader" >&5
1071 # Run test in a subshell; some versions of sh will print an error if
1072 # an executable is not found, even if stderr is redirected.
1073 # Redirect stdin to placate older versions of autoconf.  Sigh.
1074 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1075    AUTOHEADER=autoheader
1076    echo "$ac_t""found" 1>&6
1077 else
1078    AUTOHEADER="$missing_dir/missing autoheader"
1079    echo "$ac_t""missing" 1>&6
1080 fi
1081
1082 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1083 echo "configure:1084: checking for working makeinfo" >&5
1084 # Run test in a subshell; some versions of sh will print an error if
1085 # an executable is not found, even if stderr is redirected.
1086 # Redirect stdin to placate older versions of autoconf.  Sigh.
1087 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1088    MAKEINFO=makeinfo
1089    echo "$ac_t""found" 1>&6
1090 else
1091    MAKEINFO="$missing_dir/missing makeinfo"
1092    echo "$ac_t""missing" 1>&6
1093 fi
1094
1095 install_sh="$missing_dir/install-sh"
1096 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1097
1098 for ac_prog in gnutar gtar tar
1099 do
1100 # Extract the first word of "$ac_prog", so it can be a program name with args.
1101 set dummy $ac_prog; ac_word=$2
1102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1103 echo "configure:1104: checking for $ac_word" >&5
1104 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1105   echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107   if test -n "$AMTAR"; then
1108   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1109 else
1110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1111   ac_dummy="$PATH"
1112   for ac_dir in $ac_dummy; do
1113     test -z "$ac_dir" && ac_dir=.
1114     if test -f $ac_dir/$ac_word; then
1115       ac_cv_prog_AMTAR="$ac_prog"
1116       break
1117     fi
1118   done
1119   IFS="$ac_save_ifs"
1120 fi
1121 fi
1122 AMTAR="$ac_cv_prog_AMTAR"
1123 if test -n "$AMTAR"; then
1124   echo "$ac_t""$AMTAR" 1>&6
1125 else
1126   echo "$ac_t""no" 1>&6
1127 fi
1128
1129 test -n "$AMTAR" && break
1130 done
1131
1132
1133 AMTARFLAGS=
1134 if test -n "$AMTAR"; then
1135   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1136         AMTARFLAGS=o
1137   fi
1138 fi
1139
1140
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_PACKAGE "$PACKAGE"
1144 EOF
1145
1146 cat >> confdefs.h <<EOF
1147 #define OPENLDAP_VERSION "$VERSION"
1148 EOF
1149
1150
1151
1152
1153 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1154 echo "configure:1155: checking configure arguments" >&5
1155
1156
1157 top_builddir=`pwd`
1158
1159 ldap_subdir="/openldap"
1160
1161 # Check whether --with-subdir or --without-subdir was given.
1162 if test "${with_subdir+set}" = set; then
1163   withval="$with_subdir"
1164   case "$withval" in
1165         no) ldap_subdir=""
1166                 ;;
1167         yes)
1168                 ;;
1169         /*|\\*)
1170                 ldap_subdir="$withval"
1171                 ;;
1172         *)
1173                 ldap_subdir="/$withval"
1174                 ;;
1175 esac
1176
1177 fi
1178
1179
1180 # OpenLDAP --enable-debug
1181         # Check whether --enable-debug or --disable-debug was given.
1182 if test "${enable_debug+set}" = set; then
1183   enableval="$enable_debug"
1184   
1185         ol_arg=invalid
1186         for ol_val in auto yes no ; do
1187                 if test "$enableval" = "$ol_val" ; then
1188                         ol_arg="$ol_val"
1189                 fi
1190         done
1191         if test "$ol_arg" = "invalid" ; then
1192                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1193         fi
1194         ol_enable_debug="$ol_arg"
1195
1196 else
1197         ol_enable_debug="yes"
1198 fi
1199 # end --enable-debug
1200 # OpenLDAP --enable-syslog
1201         # Check whether --enable-syslog or --disable-syslog was given.
1202 if test "${enable_syslog+set}" = set; then
1203   enableval="$enable_syslog"
1204   
1205         ol_arg=invalid
1206         for ol_val in auto yes no ; do
1207                 if test "$enableval" = "$ol_val" ; then
1208                         ol_arg="$ol_val"
1209                 fi
1210         done
1211         if test "$ol_arg" = "invalid" ; then
1212                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1213         fi
1214         ol_enable_syslog="$ol_arg"
1215
1216 else
1217         ol_enable_syslog="auto"
1218 fi
1219 # end --enable-syslog
1220 # OpenLDAP --enable-proctitle
1221         # Check whether --enable-proctitle or --disable-proctitle was given.
1222 if test "${enable_proctitle+set}" = set; then
1223   enableval="$enable_proctitle"
1224   
1225         ol_arg=invalid
1226         for ol_val in auto yes no ; do
1227                 if test "$enableval" = "$ol_val" ; then
1228                         ol_arg="$ol_val"
1229                 fi
1230         done
1231         if test "$ol_arg" = "invalid" ; then
1232                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1233         fi
1234         ol_enable_proctitle="$ol_arg"
1235
1236 else
1237         ol_enable_proctitle="yes"
1238 fi
1239 # end --enable-proctitle
1240 # OpenLDAP --enable-cache
1241         # Check whether --enable-cache or --disable-cache was given.
1242 if test "${enable_cache+set}" = set; then
1243   enableval="$enable_cache"
1244   
1245         ol_arg=invalid
1246         for ol_val in auto yes no ; do
1247                 if test "$enableval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1253         fi
1254         ol_enable_cache="$ol_arg"
1255
1256 else
1257         ol_enable_cache="yes"
1258 fi
1259 # end --enable-cache
1260 # OpenLDAP --enable-referrals
1261         # Check whether --enable-referrals or --disable-referrals was given.
1262 if test "${enable_referrals+set}" = set; then
1263   enableval="$enable_referrals"
1264   
1265         ol_arg=invalid
1266         for ol_val in auto yes no ; do
1267                 if test "$enableval" = "$ol_val" ; then
1268                         ol_arg="$ol_val"
1269                 fi
1270         done
1271         if test "$ol_arg" = "invalid" ; then
1272                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1273         fi
1274         ol_enable_referrals="$ol_arg"
1275
1276 else
1277         ol_enable_referrals="yes"
1278 fi
1279 # end --enable-referrals
1280 # OpenLDAP --enable-kbind
1281         # Check whether --enable-kbind or --disable-kbind was given.
1282 if test "${enable_kbind+set}" = set; then
1283   enableval="$enable_kbind"
1284   
1285         ol_arg=invalid
1286         for ol_val in auto yes no ; do
1287                 if test "$enableval" = "$ol_val" ; then
1288                         ol_arg="$ol_val"
1289                 fi
1290         done
1291         if test "$ol_arg" = "invalid" ; then
1292                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1293         fi
1294         ol_enable_kbind="$ol_arg"
1295
1296 else
1297         ol_enable_kbind="auto"
1298 fi
1299 # end --enable-kbind
1300 # OpenLDAP --enable-cldap
1301         # Check whether --enable-cldap or --disable-cldap was given.
1302 if test "${enable_cldap+set}" = set; then
1303   enableval="$enable_cldap"
1304   
1305         ol_arg=invalid
1306         for ol_val in auto yes no ; do
1307                 if test "$enableval" = "$ol_val" ; then
1308                         ol_arg="$ol_val"
1309                 fi
1310         done
1311         if test "$ol_arg" = "invalid" ; then
1312                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1313         fi
1314         ol_enable_cldap="$ol_arg"
1315
1316 else
1317         ol_enable_cldap="no"
1318 fi
1319 # end --enable-cldap
1320 # OpenLDAP --enable-ipv6
1321         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1322 if test "${enable_ipv6+set}" = set; then
1323   enableval="$enable_ipv6"
1324   
1325         ol_arg=invalid
1326         for ol_val in auto yes no ; do
1327                 if test "$enableval" = "$ol_val" ; then
1328                         ol_arg="$ol_val"
1329                 fi
1330         done
1331         if test "$ol_arg" = "invalid" ; then
1332                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1333         fi
1334         ol_enable_ipv6="$ol_arg"
1335
1336 else
1337         ol_enable_ipv6="auto"
1338 fi
1339 # end --enable-ipv6
1340 # OpenLDAP --enable-local
1341         # Check whether --enable-local or --disable-local was given.
1342 if test "${enable_local+set}" = set; then
1343   enableval="$enable_local"
1344   
1345         ol_arg=invalid
1346         for ol_val in auto yes no ; do
1347                 if test "$enableval" = "$ol_val" ; then
1348                         ol_arg="$ol_val"
1349                 fi
1350         done
1351         if test "$ol_arg" = "invalid" ; then
1352                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1353         fi
1354         ol_enable_local="$ol_arg"
1355
1356 else
1357         ol_enable_local="auto"
1358 fi
1359 # end --enable-local
1360 # OpenLDAP --enable-x_compile
1361         # Check whether --enable-x_compile or --disable-x_compile was given.
1362 if test "${enable_x_compile+set}" = set; then
1363   enableval="$enable_x_compile"
1364   
1365         ol_arg=invalid
1366         for ol_val in yes no ; do
1367                 if test "$enableval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1373         fi
1374         ol_enable_x_compile="$ol_arg"
1375
1376 else
1377         ol_enable_x_compile="no"
1378 fi
1379 # end --enable-x_compile
1380
1381
1382 # OpenLDAP --with-cyrus_sasl
1383         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1384 if test "${with_cyrus_sasl+set}" = set; then
1385   withval="$with_cyrus_sasl"
1386   
1387         ol_arg=invalid
1388         for ol_val in auto yes no  ; do
1389                 if test "$withval" = "$ol_val" ; then
1390                         ol_arg="$ol_val"
1391                 fi
1392         done
1393         if test "$ol_arg" = "invalid" ; then
1394                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1395         fi
1396         ol_with_cyrus_sasl="$ol_arg"
1397
1398 else
1399         ol_with_cyrus_sasl="auto"
1400 fi
1401 # end --with-cyrus_sasl
1402
1403 # OpenLDAP --with-fetch
1404         # Check whether --with-fetch or --without-fetch was given.
1405 if test "${with_fetch+set}" = set; then
1406   withval="$with_fetch"
1407   
1408         ol_arg=invalid
1409         for ol_val in auto yes no  ; do
1410                 if test "$withval" = "$ol_val" ; then
1411                         ol_arg="$ol_val"
1412                 fi
1413         done
1414         if test "$ol_arg" = "invalid" ; then
1415                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1416         fi
1417         ol_with_fetch="$ol_arg"
1418
1419 else
1420         ol_with_fetch="auto"
1421 fi
1422 # end --with-fetch
1423
1424 # OpenLDAP --with-kerberos
1425         # Check whether --with-kerberos or --without-kerberos was given.
1426 if test "${with_kerberos+set}" = set; then
1427   withval="$with_kerberos"
1428   
1429         ol_arg=invalid
1430         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1431                 if test "$withval" = "$ol_val" ; then
1432                         ol_arg="$ol_val"
1433                 fi
1434         done
1435         if test "$ol_arg" = "invalid" ; then
1436                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1437         fi
1438         ol_with_kerberos="$ol_arg"
1439
1440 else
1441         ol_with_kerberos="auto"
1442 fi
1443 # end --with-kerberos
1444
1445 # OpenLDAP --with-readline
1446         # Check whether --with-readline or --without-readline was given.
1447 if test "${with_readline+set}" = set; then
1448   withval="$with_readline"
1449   
1450         ol_arg=invalid
1451         for ol_val in auto yes no  ; do
1452                 if test "$withval" = "$ol_val" ; then
1453                         ol_arg="$ol_val"
1454                 fi
1455         done
1456         if test "$ol_arg" = "invalid" ; then
1457                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1458         fi
1459         ol_with_readline="$ol_arg"
1460
1461 else
1462         ol_with_readline="auto"
1463 fi
1464 # end --with-readline
1465
1466 # OpenLDAP --with-threads
1467         # Check whether --with-threads or --without-threads was given.
1468 if test "${with_threads+set}" = set; then
1469   withval="$with_threads"
1470   
1471         ol_arg=invalid
1472         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1473                 if test "$withval" = "$ol_val" ; then
1474                         ol_arg="$ol_val"
1475                 fi
1476         done
1477         if test "$ol_arg" = "invalid" ; then
1478                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1479         fi
1480         ol_with_threads="$ol_arg"
1481
1482 else
1483         ol_with_threads="auto"
1484 fi
1485 # end --with-threads
1486
1487 # OpenLDAP --with-tls
1488         # Check whether --with-tls or --without-tls was given.
1489 if test "${with_tls+set}" = set; then
1490   withval="$with_tls"
1491   
1492         ol_arg=invalid
1493         for ol_val in auto ssleay openssl yes no  ; do
1494                 if test "$withval" = "$ol_val" ; then
1495                         ol_arg="$ol_val"
1496                 fi
1497         done
1498         if test "$ol_arg" = "invalid" ; then
1499                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1500         fi
1501         ol_with_tls="$ol_arg"
1502
1503 else
1504         ol_with_tls="auto"
1505 fi
1506 # end --with-tls
1507
1508 # OpenLDAP --with-yielding_select
1509         # Check whether --with-yielding_select or --without-yielding_select was given.
1510 if test "${with_yielding_select+set}" = set; then
1511   withval="$with_yielding_select"
1512   
1513         ol_arg=invalid
1514         for ol_val in auto yes no manual  ; do
1515                 if test "$withval" = "$ol_val" ; then
1516                         ol_arg="$ol_val"
1517                 fi
1518         done
1519         if test "$ol_arg" = "invalid" ; then
1520                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1521         fi
1522         ol_with_yielding_select="$ol_arg"
1523
1524 else
1525         ol_with_yielding_select="auto"
1526 fi
1527 # end --with-yielding_select
1528
1529
1530
1531 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1532 if test "${with_xxslapdoptions+set}" = set; then
1533   withval="$with_xxslapdoptions"
1534   :
1535 fi
1536
1537 # OpenLDAP --enable-slapd
1538         # Check whether --enable-slapd or --disable-slapd was given.
1539 if test "${enable_slapd+set}" = set; then
1540   enableval="$enable_slapd"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no ; do
1544                 if test "$enableval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1550         fi
1551         ol_enable_slapd="$ol_arg"
1552
1553 else
1554         ol_enable_slapd="yes"
1555 fi
1556 # end --enable-slapd
1557 # OpenLDAP --enable-cleartext
1558         # Check whether --enable-cleartext or --disable-cleartext was given.
1559 if test "${enable_cleartext+set}" = set; then
1560   enableval="$enable_cleartext"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no ; do
1564                 if test "$enableval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1570         fi
1571         ol_enable_cleartext="$ol_arg"
1572
1573 else
1574         ol_enable_cleartext="yes"
1575 fi
1576 # end --enable-cleartext
1577 # OpenLDAP --enable-crypt
1578         # Check whether --enable-crypt or --disable-crypt was given.
1579 if test "${enable_crypt+set}" = set; then
1580   enableval="$enable_crypt"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto yes no ; do
1584                 if test "$enableval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1590         fi
1591         ol_enable_crypt="$ol_arg"
1592
1593 else
1594         ol_enable_crypt="auto"
1595 fi
1596 # end --enable-crypt
1597 # OpenLDAP --enable-kpasswd
1598         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1599 if test "${enable_kpasswd+set}" = set; then
1600   enableval="$enable_kpasswd"
1601   
1602         ol_arg=invalid
1603         for ol_val in auto yes no ; do
1604                 if test "$enableval" = "$ol_val" ; then
1605                         ol_arg="$ol_val"
1606                 fi
1607         done
1608         if test "$ol_arg" = "invalid" ; then
1609                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1610         fi
1611         ol_enable_kpasswd="$ol_arg"
1612
1613 else
1614         ol_enable_kpasswd="no"
1615 fi
1616 # end --enable-kpasswd
1617 # OpenLDAP --enable-spasswd
1618         # Check whether --enable-spasswd or --disable-spasswd was given.
1619 if test "${enable_spasswd+set}" = set; then
1620   enableval="$enable_spasswd"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no ; do
1624                 if test "$enableval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1630         fi
1631         ol_enable_spasswd="$ol_arg"
1632
1633 else
1634         ol_enable_spasswd="no"
1635 fi
1636 # end --enable-spasswd
1637 # OpenLDAP --enable-modules
1638         # Check whether --enable-modules or --disable-modules was given.
1639 if test "${enable_modules+set}" = set; then
1640   enableval="$enable_modules"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto yes no ; do
1644                 if test "$enableval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1650         fi
1651         ol_enable_modules="$ol_arg"
1652
1653 else
1654         ol_enable_modules="no"
1655 fi
1656 # end --enable-modules
1657 # OpenLDAP --enable-multimaster
1658         # Check whether --enable-multimaster or --disable-multimaster was given.
1659 if test "${enable_multimaster+set}" = set; then
1660   enableval="$enable_multimaster"
1661   
1662         ol_arg=invalid
1663         for ol_val in auto yes no ; do
1664                 if test "$enableval" = "$ol_val" ; then
1665                         ol_arg="$ol_val"
1666                 fi
1667         done
1668         if test "$ol_arg" = "invalid" ; then
1669                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1670         fi
1671         ol_enable_multimaster="$ol_arg"
1672
1673 else
1674         ol_enable_multimaster="no"
1675 fi
1676 # end --enable-multimaster
1677 # OpenLDAP --enable-phonetic
1678         # Check whether --enable-phonetic or --disable-phonetic was given.
1679 if test "${enable_phonetic+set}" = set; then
1680   enableval="$enable_phonetic"
1681   
1682         ol_arg=invalid
1683         for ol_val in auto yes no ; do
1684                 if test "$enableval" = "$ol_val" ; then
1685                         ol_arg="$ol_val"
1686                 fi
1687         done
1688         if test "$ol_arg" = "invalid" ; then
1689                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1690         fi
1691         ol_enable_phonetic="$ol_arg"
1692
1693 else
1694         ol_enable_phonetic="no"
1695 fi
1696 # end --enable-phonetic
1697 # OpenLDAP --enable-rlookups
1698         # Check whether --enable-rlookups or --disable-rlookups was given.
1699 if test "${enable_rlookups+set}" = set; then
1700   enableval="$enable_rlookups"
1701   
1702         ol_arg=invalid
1703         for ol_val in auto yes no ; do
1704                 if test "$enableval" = "$ol_val" ; then
1705                         ol_arg="$ol_val"
1706                 fi
1707         done
1708         if test "$ol_arg" = "invalid" ; then
1709                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1710         fi
1711         ol_enable_rlookups="$ol_arg"
1712
1713 else
1714         ol_enable_rlookups="auto"
1715 fi
1716 # end --enable-rlookups
1717 # OpenLDAP --enable-aci
1718         # Check whether --enable-aci or --disable-aci was given.
1719 if test "${enable_aci+set}" = set; then
1720   enableval="$enable_aci"
1721   
1722         ol_arg=invalid
1723         for ol_val in auto yes no ; do
1724                 if test "$enableval" = "$ol_val" ; then
1725                         ol_arg="$ol_val"
1726                 fi
1727         done
1728         if test "$ol_arg" = "invalid" ; then
1729                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1730         fi
1731         ol_enable_aci="$ol_arg"
1732
1733 else
1734         ol_enable_aci="no"
1735 fi
1736 # end --enable-aci
1737 # OpenLDAP --enable-wrappers
1738         # Check whether --enable-wrappers or --disable-wrappers was given.
1739 if test "${enable_wrappers+set}" = set; then
1740   enableval="$enable_wrappers"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1750         fi
1751         ol_enable_wrappers="$ol_arg"
1752
1753 else
1754         ol_enable_wrappers="no"
1755 fi
1756 # end --enable-wrappers
1757 # OpenLDAP --enable-dynamic
1758         # Check whether --enable-dynamic or --disable-dynamic was given.
1759 if test "${enable_dynamic+set}" = set; then
1760   enableval="$enable_dynamic"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1770         fi
1771         ol_enable_dynamic="$ol_arg"
1772
1773 else
1774         ol_enable_dynamic="no"
1775 fi
1776 # end --enable-dynamic
1777
1778 # OpenLDAP --enable-dnssrv
1779         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1780 if test "${enable_dnssrv+set}" = set; then
1781   enableval="$enable_dnssrv"
1782   
1783         ol_arg=invalid
1784         for ol_val in auto yes no ; do
1785                 if test "$enableval" = "$ol_val" ; then
1786                         ol_arg="$ol_val"
1787                 fi
1788         done
1789         if test "$ol_arg" = "invalid" ; then
1790                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1791         fi
1792         ol_enable_dnssrv="$ol_arg"
1793
1794 else
1795         ol_enable_dnssrv="no"
1796 fi
1797 # end --enable-dnssrv
1798 # OpenLDAP --with-dnssrv_module
1799         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1800 if test "${with_dnssrv_module+set}" = set; then
1801   withval="$with_dnssrv_module"
1802   
1803         ol_arg=invalid
1804         for ol_val in static dynamic ; do
1805                 if test "$withval" = "$ol_val" ; then
1806                         ol_arg="$ol_val"
1807                 fi
1808         done
1809         if test "$ol_arg" = "invalid" ; then
1810                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1811         fi
1812         ol_with_dnssrv_module="$ol_arg"
1813
1814 else
1815         ol_with_dnssrv_module="static"
1816 fi
1817 # end --with-dnssrv_module
1818
1819 # OpenLDAP --enable-ldap
1820         # Check whether --enable-ldap or --disable-ldap was given.
1821 if test "${enable_ldap+set}" = set; then
1822   enableval="$enable_ldap"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1832         fi
1833         ol_enable_ldap="$ol_arg"
1834
1835 else
1836         ol_enable_ldap="no"
1837 fi
1838 # end --enable-ldap
1839 # OpenLDAP --with-ldap_module
1840         # Check whether --with-ldap_module or --without-ldap_module was given.
1841 if test "${with_ldap_module+set}" = set; then
1842   withval="$with_ldap_module"
1843   
1844         ol_arg=invalid
1845         for ol_val in static dynamic ; do
1846                 if test "$withval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1852         fi
1853         ol_with_ldap_module="$ol_arg"
1854
1855 else
1856         ol_with_ldap_module="static"
1857 fi
1858 # end --with-ldap_module
1859
1860 # OpenLDAP --enable-ldbm
1861         # Check whether --enable-ldbm or --disable-ldbm was given.
1862 if test "${enable_ldbm+set}" = set; then
1863   enableval="$enable_ldbm"
1864   
1865         ol_arg=invalid
1866         for ol_val in auto yes no ; do
1867                 if test "$enableval" = "$ol_val" ; then
1868                         ol_arg="$ol_val"
1869                 fi
1870         done
1871         if test "$ol_arg" = "invalid" ; then
1872                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1873         fi
1874         ol_enable_ldbm="$ol_arg"
1875
1876 else
1877         ol_enable_ldbm="yes"
1878 fi
1879 # end --enable-ldbm
1880 # OpenLDAP --with-ldbm_api
1881         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1882 if test "${with_ldbm_api+set}" = set; then
1883   withval="$with_ldbm_api"
1884   
1885         ol_arg=invalid
1886         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1887                 if test "$withval" = "$ol_val" ; then
1888                         ol_arg="$ol_val"
1889                 fi
1890         done
1891         if test "$ol_arg" = "invalid" ; then
1892                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1893         fi
1894         ol_with_ldbm_api="$ol_arg"
1895
1896 else
1897         ol_with_ldbm_api="auto"
1898 fi
1899 # end --with-ldbm_api
1900
1901 # OpenLDAP --with-ldbm_module
1902         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1903 if test "${with_ldbm_module+set}" = set; then
1904   withval="$with_ldbm_module"
1905   
1906         ol_arg=invalid
1907         for ol_val in static dynamic ; do
1908                 if test "$withval" = "$ol_val" ; then
1909                         ol_arg="$ol_val"
1910                 fi
1911         done
1912         if test "$ol_arg" = "invalid" ; then
1913                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1914         fi
1915         ol_with_ldbm_module="$ol_arg"
1916
1917 else
1918         ol_with_ldbm_module="static"
1919 fi
1920 # end --with-ldbm_module
1921
1922 # OpenLDAP --with-ldbm_type
1923         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1924 if test "${with_ldbm_type+set}" = set; then
1925   withval="$with_ldbm_type"
1926   
1927         ol_arg=invalid
1928         for ol_val in auto btree hash ; do
1929                 if test "$withval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1935         fi
1936         ol_with_ldbm_type="$ol_arg"
1937
1938 else
1939         ol_with_ldbm_type="auto"
1940 fi
1941 # end --with-ldbm_type
1942
1943 # OpenLDAP --enable-passwd
1944         # Check whether --enable-passwd or --disable-passwd was given.
1945 if test "${enable_passwd+set}" = set; then
1946   enableval="$enable_passwd"
1947   
1948         ol_arg=invalid
1949         for ol_val in auto yes no ; do
1950                 if test "$enableval" = "$ol_val" ; then
1951                         ol_arg="$ol_val"
1952                 fi
1953         done
1954         if test "$ol_arg" = "invalid" ; then
1955                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1956         fi
1957         ol_enable_passwd="$ol_arg"
1958
1959 else
1960         ol_enable_passwd="no"
1961 fi
1962 # end --enable-passwd
1963 # OpenLDAP --with-passwd_module
1964         # Check whether --with-passwd_module or --without-passwd_module was given.
1965 if test "${with_passwd_module+set}" = set; then
1966   withval="$with_passwd_module"
1967   
1968         ol_arg=invalid
1969         for ol_val in static dynamic ; do
1970                 if test "$withval" = "$ol_val" ; then
1971                         ol_arg="$ol_val"
1972                 fi
1973         done
1974         if test "$ol_arg" = "invalid" ; then
1975                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1976         fi
1977         ol_with_passwd_module="$ol_arg"
1978
1979 else
1980         ol_with_passwd_module="static"
1981 fi
1982 # end --with-passwd_module
1983
1984 # OpenLDAP --enable-perl
1985         # Check whether --enable-perl or --disable-perl was given.
1986 if test "${enable_perl+set}" = set; then
1987   enableval="$enable_perl"
1988   
1989         ol_arg=invalid
1990         for ol_val in auto yes no ; do
1991                 if test "$enableval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1997         fi
1998         ol_enable_perl="$ol_arg"
1999
2000 else
2001         ol_enable_perl="no"
2002 fi
2003 # end --enable-perl
2004 # OpenLDAP --with-perl_module
2005         # Check whether --with-perl_module or --without-perl_module was given.
2006 if test "${with_perl_module+set}" = set; then
2007   withval="$with_perl_module"
2008   
2009         ol_arg=invalid
2010         for ol_val in static dynamic ; do
2011                 if test "$withval" = "$ol_val" ; then
2012                         ol_arg="$ol_val"
2013                 fi
2014         done
2015         if test "$ol_arg" = "invalid" ; then
2016                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2017         fi
2018         ol_with_perl_module="$ol_arg"
2019
2020 else
2021         ol_with_perl_module="static"
2022 fi
2023 # end --with-perl_module
2024
2025 # OpenLDAP --enable-shell
2026         # Check whether --enable-shell or --disable-shell was given.
2027 if test "${enable_shell+set}" = set; then
2028   enableval="$enable_shell"
2029   
2030         ol_arg=invalid
2031         for ol_val in auto yes no ; do
2032                 if test "$enableval" = "$ol_val" ; then
2033                         ol_arg="$ol_val"
2034                 fi
2035         done
2036         if test "$ol_arg" = "invalid" ; then
2037                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2038         fi
2039         ol_enable_shell="$ol_arg"
2040
2041 else
2042         ol_enable_shell="no"
2043 fi
2044 # end --enable-shell
2045 # OpenLDAP --with-shell_module
2046         # Check whether --with-shell_module or --without-shell_module was given.
2047 if test "${with_shell_module+set}" = set; then
2048   withval="$with_shell_module"
2049   
2050         ol_arg=invalid
2051         for ol_val in static dynamic ; do
2052                 if test "$withval" = "$ol_val" ; then
2053                         ol_arg="$ol_val"
2054                 fi
2055         done
2056         if test "$ol_arg" = "invalid" ; then
2057                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2058         fi
2059         ol_with_shell_module="$ol_arg"
2060
2061 else
2062         ol_with_shell_module="static"
2063 fi
2064 # end --with-shell_module
2065
2066 # OpenLDAP --enable-sql
2067         # Check whether --enable-sql or --disable-sql was given.
2068 if test "${enable_sql+set}" = set; then
2069   enableval="$enable_sql"
2070   
2071         ol_arg=invalid
2072         for ol_val in auto yes no ; do
2073                 if test "$enableval" = "$ol_val" ; then
2074                         ol_arg="$ol_val"
2075                 fi
2076         done
2077         if test "$ol_arg" = "invalid" ; then
2078                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2079         fi
2080         ol_enable_sql="$ol_arg"
2081
2082 else
2083         ol_enable_sql="no"
2084 fi
2085 # end --enable-sql
2086 # OpenLDAP --with-sql_module
2087         # Check whether --with-sql_module or --without-sql_module was given.
2088 if test "${with_sql_module+set}" = set; then
2089   withval="$with_sql_module"
2090   
2091         ol_arg=invalid
2092         for ol_val in static dynamic ; do
2093                 if test "$withval" = "$ol_val" ; then
2094                         ol_arg="$ol_val"
2095                 fi
2096         done
2097         if test "$ol_arg" = "invalid" ; then
2098                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2099         fi
2100         ol_with_sql_module="$ol_arg"
2101
2102 else
2103         ol_with_sql_module="static"
2104 fi
2105 # end --with-sql_module
2106
2107 # OpenLDAP --enable-tcl
2108         # Check whether --enable-tcl or --disable-tcl was given.
2109 if test "${enable_tcl+set}" = set; then
2110   enableval="$enable_tcl"
2111   
2112         ol_arg=invalid
2113         for ol_val in auto yes no ; do
2114                 if test "$enableval" = "$ol_val" ; then
2115                         ol_arg="$ol_val"
2116                 fi
2117         done
2118         if test "$ol_arg" = "invalid" ; then
2119                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2120         fi
2121         ol_enable_tcl="$ol_arg"
2122
2123 else
2124         ol_enable_tcl="no"
2125 fi
2126 # end --enable-tcl
2127 # OpenLDAP --with-tcl_module
2128         # Check whether --with-tcl_module or --without-tcl_module was given.
2129 if test "${with_tcl_module+set}" = set; then
2130   withval="$with_tcl_module"
2131   
2132         ol_arg=invalid
2133         for ol_val in static dynamic ; do
2134                 if test "$withval" = "$ol_val" ; then
2135                         ol_arg="$ol_val"
2136                 fi
2137         done
2138         if test "$ol_arg" = "invalid" ; then
2139                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2140         fi
2141         ol_with_tcl_module="$ol_arg"
2142
2143 else
2144         ol_with_tcl_module="static"
2145 fi
2146 # end --with-tcl_module
2147
2148
2149 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2150 if test "${with_xxslurpdoptions+set}" = set; then
2151   withval="$with_xxslurpdoptions"
2152   :
2153 fi
2154
2155 # OpenLDAP --enable-slurpd
2156         # Check whether --enable-slurpd or --disable-slurpd was given.
2157 if test "${enable_slurpd+set}" = set; then
2158   enableval="$enable_slurpd"
2159   
2160         ol_arg=invalid
2161         for ol_val in auto yes no ; do
2162                 if test "$enableval" = "$ol_val" ; then
2163                         ol_arg="$ol_val"
2164                 fi
2165         done
2166         if test "$ol_arg" = "invalid" ; then
2167                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2168         fi
2169         ol_enable_slurpd="$ol_arg"
2170
2171 else
2172         ol_enable_slurpd="auto"
2173 fi
2174 # end --enable-slurpd
2175
2176 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2177 if test "${with_xxliboptions+set}" = set; then
2178   withval="$with_xxliboptions"
2179   :
2180 fi
2181
2182 # Check whether --enable-static or --disable-static was given.
2183 if test "${enable_static+set}" = set; then
2184   enableval="$enable_static"
2185   p=${PACKAGE-default}
2186 case "$enableval" in
2187 yes) enable_static=yes ;;
2188 no) enable_static=no ;;
2189 *)
2190   enable_static=no
2191   # Look at the argument we got.  We use all the common list separators.
2192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2193   for pkg in $enableval; do
2194     if test "X$pkg" = "X$p"; then
2195       enable_static=yes
2196     fi
2197   done
2198   IFS="$ac_save_ifs"
2199   ;;
2200 esac
2201 else
2202   enable_static=yes
2203 fi
2204
2205 # Check whether --enable-shared or --disable-shared was given.
2206 if test "${enable_shared+set}" = set; then
2207   enableval="$enable_shared"
2208   p=${PACKAGE-default}
2209 case "$enableval" in
2210 yes) enable_shared=yes ;;
2211 no) enable_shared=no ;;
2212 *)
2213   enable_shared=no
2214   # Look at the argument we got.  We use all the common list separators.
2215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2216   for pkg in $enableval; do
2217     if test "X$pkg" = "X$p"; then
2218       enable_shared=yes
2219     fi
2220   done
2221   IFS="$ac_save_ifs"
2222   ;;
2223 esac
2224 else
2225   enable_shared=yes
2226 fi
2227
2228
2229
2230 # validate options
2231 if test $ol_enable_slapd = no ; then
2232                 if test $ol_enable_dnssrv = yes ; then
2233                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2234         fi
2235         if test $ol_enable_ldap = yes ; then
2236                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2237         fi
2238         if test $ol_enable_ldbm = yes ; then
2239                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2240         fi
2241         if test $ol_enable_passwd = yes ; then
2242                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2243         fi
2244         if test $ol_enable_perl = yes ; then
2245                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2246         fi
2247         if test $ol_enable_shell = yes ; then
2248                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2249         fi
2250         if test $ol_enable_tcl = yes ; then
2251                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2252         fi
2253         if test $ol_enable_sql = yes ; then
2254                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2255         fi
2256         if test $ol_enable_modules = yes ; then
2257                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2258         fi
2259         if test $ol_enable_multimaster = yes ; then
2260                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2261         fi
2262         if test $ol_enable_wrappers = yes ; then
2263                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2264         fi
2265         if test $ol_enable_phonetic = yes ; then
2266                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2267         fi
2268         if test $ol_enable_rlookups = yes ; then
2269                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2270         fi
2271         if test $ol_enable_aci = yes ; then
2272                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2273         fi
2274         if test $ol_with_ldbm_api != auto ; then
2275                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2276         fi
2277         if test $ol_with_ldbm_type != auto ; then
2278                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2279         fi
2280         if test $ol_with_dnssrv_module != static ; then
2281                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2282         fi
2283         if test $ol_with_ldap_module != static ; then
2284                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2285         fi
2286         if test $ol_with_ldbm_module != static ; then
2287                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2288         fi
2289         if test $ol_with_passwd_module != static ; then
2290                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2291         fi
2292         if test $ol_with_perl_module != static ; then
2293                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2294         fi
2295         if test $ol_with_shell_module != static ; then
2296                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2297         fi
2298         if test $ol_with_tcl_module != static ; then
2299                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2300         fi
2301         if test $ol_with_sql_module != static ; then
2302                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2303         fi
2304         if test $ol_enable_slurpd = yes ; then
2305                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2306         fi
2307
2308         # force settings to no
2309         ol_enable_dnssrv=no
2310         ol_enable_ldap=no
2311         ol_enable_ldbm=no
2312         ol_enable_passwd=no
2313         ol_enable_perl=no
2314         ol_enable_shell=no
2315         ol_enable_tcl=no
2316         ol_enable_sql=no
2317
2318         ol_enable_modules=no
2319         ol_enable_multimaster=no
2320         ol_enable_phonetic=no
2321         ol_enable_rlookups=no
2322         ol_enable_aci=no
2323         ol_enable_wrappers=no
2324         ol_enable_dynamic=no
2325
2326         ol_with_ldbm_api=no
2327         ol_with_ldbm_type=no
2328
2329         ol_with_dnssrv_module=static
2330         ol_with_ldap_module=static
2331         ol_with_ldbm_module=static
2332         ol_with_passwd_module=static
2333         ol_with_perl_module=static
2334         ol_with_shell_module=static
2335         ol_with_tcl_module=static
2336         ol_with_sql_module=static
2337
2338         ol_enable_slurpd=no
2339
2340 elif test $ol_enable_ldbm = no ; then
2341         
2342         if test $ol_with_ldbm_api != auto ; then
2343                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2344         fi
2345
2346         if test $ol_with_ldbm_type != auto ; then
2347                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2348         fi
2349
2350         if test $ol_with_ldbm_module != static ; then
2351                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2352         fi
2353
2354         if test $ol_enable_modules != yes -a \
2355                 $ol_enable_dnssrv = no -a \
2356                 $ol_enable_ldap = no -a \
2357                 $ol_enable_passwd = no -a \
2358                 $ol_enable_perl = no -a \
2359                 $ol_enable_shell = no -a \
2360                 $ol_enable_sql = no -a \
2361                 $ol_enable_tcl = no ; then
2362                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2363         fi
2364
2365         ol_with_ldbm_api=no
2366         ol_with_ldbm_type=no
2367         ol_with_ldbm_module=static
2368
2369 else
2370                 if test $ol_with_ldbm_api = gdbm -a \
2371                 $ol_with_ldbm_type = btree ; then
2372                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2373         fi
2374         if test $ol_with_ldbm_api = mdbm -a \
2375                 $ol_with_ldbm_type = btree ; then
2376                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2377         fi
2378         if test $ol_with_ldbm_api = ndbm -a \
2379                 $ol_with_ldbm_type = btree ; then
2380                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2381         fi
2382 fi
2383
2384 if test $ol_enable_slurpd = yes ; then
2385                 if test $ol_with_threads = no ; then
2386                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2387         fi
2388 fi
2389
2390 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2391         if test $ol_with_kerberos = no ; then
2392                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2393         fi
2394 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2395         if test $ol_with_kerberos != auto ; then
2396                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2397         else
2398                 ol_with_kerberos=no
2399         fi
2400 fi
2401
2402 if test $ol_enable_spasswd = yes ; then
2403         if test $ol_with_cyrus_sasl = no ; then
2404                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2405         fi
2406         ol_link_spasswd=yes
2407 fi
2408
2409 echo "$ac_t""done" 1>&6
2410
2411 LDAP_LIBS=
2412 LDIF_LIBS=
2413 LDBM_LIBS=
2414 LTHREAD_LIBS=
2415 LUTIL_LIBS=
2416
2417 SLAPD_LIBS=
2418 SLURPD_LIBS=
2419
2420 BUILD_SLAPD=no
2421 BUILD_SLURPD=no
2422
2423 BUILD_THREAD=no
2424
2425 BUILD_DNSSRV=no
2426 BUILD_LDAP=no
2427 BUILD_LDBM=no
2428 BUILD_PASSWD=no
2429 BUILD_PERL=no
2430 BUILD_SHELL=no
2431 BUILD_SQL=no
2432 BUILD_TCL=no
2433
2434 BUILD_DNSSRV_DYNAMIC=static
2435 BUILD_LDAP_DYNAMIC=static
2436 BUILD_LDBM_DYNAMIC=static
2437 BUILD_PASSWD_DYNAMIC=static
2438 BUILD_PERL_DYNAMIC=static
2439 BUILD_SHELL_DYNAMIC=static
2440 BUILD_TCL_DYNAMIC=static
2441 BUILD_SQL_DYNAMIC=static
2442
2443 SLAPD_MODULES_LDFLAGS=
2444 SLAPD_MODULES_CPPFLAGS=
2445 SLAPD_MODULES_LIST=
2446
2447 SLAPD_PERL_LDFLAGS=
2448 MOD_PERL_LDFLAGS=
2449 PERL_CPPFLAGS=
2450
2451 SLAPD_SQL_LDFLAGS=
2452 SLAPD_SQL_LIBS=
2453 SLAPD_SQL_INCLUDES=
2454
2455 MOD_TCL_LIB=
2456 KRB4_LIBS=
2457 KRB5_LIBS=
2458 READLINE_LIBS=
2459 SASL_LIBS=
2460 TERMCAP_LIBS=
2461 TLS_LIBS=
2462 MODULES_LIBS=
2463 AUTH_LIBS=
2464
2465
2466
2467 cat >> confdefs.h <<\EOF
2468 #define HAVE_MKVERSION 1
2469 EOF
2470
2471
2472
2473
2474 ol_aix_threads=no
2475 case "$target" in
2476 *-*-aix*)       if test -z "$CC" ; then
2477                 case "$ol_with_threads" in
2478                 auto | yes |  posix) ol_aix_threads=yes ;;
2479                 esac
2480         fi
2481 ;;
2482 esac
2483
2484 if test $ol_aix_threads = yes ; then
2485         if test -z "${CC}" ; then
2486                 for ac_prog in cc_r xlc_r cc
2487 do
2488 # Extract the first word of "$ac_prog", so it can be a program name with args.
2489 set dummy $ac_prog; ac_word=$2
2490 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2491 echo "configure:2492: checking for $ac_word" >&5
2492 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2493   echo $ac_n "(cached) $ac_c" 1>&6
2494 else
2495   if test -n "$CC"; then
2496   ac_cv_prog_CC="$CC" # Let the user override the test.
2497 else
2498   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2499   ac_dummy="$PATH"
2500   for ac_dir in $ac_dummy; do
2501     test -z "$ac_dir" && ac_dir=.
2502     if test -f $ac_dir/$ac_word; then
2503       ac_cv_prog_CC="$ac_prog"
2504       break
2505     fi
2506   done
2507   IFS="$ac_save_ifs"
2508 fi
2509 fi
2510 CC="$ac_cv_prog_CC"
2511 if test -n "$CC"; then
2512   echo "$ac_t""$CC" 1>&6
2513 else
2514   echo "$ac_t""no" 1>&6
2515 fi
2516
2517 test -n "$CC" && break
2518 done
2519
2520
2521                 if test "$CC" = cc ; then
2522                                                 if test $ol_with_threads != auto ; then
2523                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2524                         else
2525                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2526                         fi
2527                         ol_with_threads=no
2528                 fi
2529         fi
2530
2531         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2532                 ol_with_threads=posix
2533                 ol_cv_pthread_create=yes
2534         fi
2535 fi
2536
2537 if test -z "${CC}"; then
2538         for ac_prog in cc
2539 do
2540 # Extract the first word of "$ac_prog", so it can be a program name with args.
2541 set dummy $ac_prog; ac_word=$2
2542 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2543 echo "configure:2544: checking for $ac_word" >&5
2544 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   if test -n "$CC"; then
2548   ac_cv_prog_CC="$CC" # Let the user override the test.
2549 else
2550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2551   ac_dummy="$PATH"
2552   for ac_dir in $ac_dummy; do
2553     test -z "$ac_dir" && ac_dir=.
2554     if test -f $ac_dir/$ac_word; then
2555       ac_cv_prog_CC="$ac_prog"
2556       break
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560 fi
2561 fi
2562 CC="$ac_cv_prog_CC"
2563 if test -n "$CC"; then
2564   echo "$ac_t""$CC" 1>&6
2565 else
2566   echo "$ac_t""no" 1>&6
2567 fi
2568
2569 test -n "$CC" && break
2570 done
2571
2572 fi
2573
2574
2575
2576
2577 # Check whether --enable-fast-install or --disable-fast-install was given.
2578 if test "${enable_fast_install+set}" = set; then
2579   enableval="$enable_fast_install"
2580   p=${PACKAGE-default}
2581 case "$enableval" in
2582 yes) enable_fast_install=yes ;;
2583 no) enable_fast_install=no ;;
2584 *)
2585   enable_fast_install=no
2586   # Look at the argument we got.  We use all the common list separators.
2587   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2588   for pkg in $enableval; do
2589     if test "X$pkg" = "X$p"; then
2590       enable_fast_install=yes
2591     fi
2592   done
2593   IFS="$ac_save_ifs"
2594   ;;
2595 esac
2596 else
2597   enable_fast_install=yes
2598 fi
2599
2600 # Extract the first word of "ranlib", so it can be a program name with args.
2601 set dummy ranlib; ac_word=$2
2602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2603 echo "configure:2604: checking for $ac_word" >&5
2604 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2605   echo $ac_n "(cached) $ac_c" 1>&6
2606 else
2607   if test -n "$RANLIB"; then
2608   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2609 else
2610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2611   ac_dummy="$PATH"
2612   for ac_dir in $ac_dummy; do
2613     test -z "$ac_dir" && ac_dir=.
2614     if test -f $ac_dir/$ac_word; then
2615       ac_cv_prog_RANLIB="ranlib"
2616       break
2617     fi
2618   done
2619   IFS="$ac_save_ifs"
2620   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2621 fi
2622 fi
2623 RANLIB="$ac_cv_prog_RANLIB"
2624 if test -n "$RANLIB"; then
2625   echo "$ac_t""$RANLIB" 1>&6
2626 else
2627   echo "$ac_t""no" 1>&6
2628 fi
2629
2630 # Extract the first word of "gcc", so it can be a program name with args.
2631 set dummy gcc; ac_word=$2
2632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2633 echo "configure:2634: checking for $ac_word" >&5
2634 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2635   echo $ac_n "(cached) $ac_c" 1>&6
2636 else
2637   if test -n "$CC"; then
2638   ac_cv_prog_CC="$CC" # Let the user override the test.
2639 else
2640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2641   ac_dummy="$PATH"
2642   for ac_dir in $ac_dummy; do
2643     test -z "$ac_dir" && ac_dir=.
2644     if test -f $ac_dir/$ac_word; then
2645       ac_cv_prog_CC="gcc"
2646       break
2647     fi
2648   done
2649   IFS="$ac_save_ifs"
2650 fi
2651 fi
2652 CC="$ac_cv_prog_CC"
2653 if test -n "$CC"; then
2654   echo "$ac_t""$CC" 1>&6
2655 else
2656   echo "$ac_t""no" 1>&6
2657 fi
2658
2659 if test -z "$CC"; then
2660   # Extract the first word of "cc", so it can be a program name with args.
2661 set dummy cc; ac_word=$2
2662 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2663 echo "configure:2664: checking for $ac_word" >&5
2664 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2665   echo $ac_n "(cached) $ac_c" 1>&6
2666 else
2667   if test -n "$CC"; then
2668   ac_cv_prog_CC="$CC" # Let the user override the test.
2669 else
2670   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2671   ac_prog_rejected=no
2672   ac_dummy="$PATH"
2673   for ac_dir in $ac_dummy; do
2674     test -z "$ac_dir" && ac_dir=.
2675     if test -f $ac_dir/$ac_word; then
2676       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2677         ac_prog_rejected=yes
2678         continue
2679       fi
2680       ac_cv_prog_CC="cc"
2681       break
2682     fi
2683   done
2684   IFS="$ac_save_ifs"
2685 if test $ac_prog_rejected = yes; then
2686   # We found a bogon in the path, so make sure we never use it.
2687   set dummy $ac_cv_prog_CC
2688   shift
2689   if test $# -gt 0; then
2690     # We chose a different compiler from the bogus one.
2691     # However, it has the same basename, so the bogon will be chosen
2692     # first if we set CC to just the basename; use the full file name.
2693     shift
2694     set dummy "$ac_dir/$ac_word" "$@"
2695     shift
2696     ac_cv_prog_CC="$@"
2697   fi
2698 fi
2699 fi
2700 fi
2701 CC="$ac_cv_prog_CC"
2702 if test -n "$CC"; then
2703   echo "$ac_t""$CC" 1>&6
2704 else
2705   echo "$ac_t""no" 1>&6
2706 fi
2707
2708   if test -z "$CC"; then
2709     case "`uname -s`" in
2710     *win32* | *WIN32* | *CYGWIN*)
2711       # Extract the first word of "cl", so it can be a program name with args.
2712 set dummy cl; ac_word=$2
2713 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2714 echo "configure:2715: checking for $ac_word" >&5
2715 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2716   echo $ac_n "(cached) $ac_c" 1>&6
2717 else
2718   if test -n "$CC"; then
2719   ac_cv_prog_CC="$CC" # Let the user override the test.
2720 else
2721   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2722   ac_dummy="$PATH"
2723   for ac_dir in $ac_dummy; do
2724     test -z "$ac_dir" && ac_dir=.
2725     if test -f $ac_dir/$ac_word; then
2726       ac_cv_prog_CC="cl"
2727       break
2728     fi
2729   done
2730   IFS="$ac_save_ifs"
2731 fi
2732 fi
2733 CC="$ac_cv_prog_CC"
2734 if test -n "$CC"; then
2735   echo "$ac_t""$CC" 1>&6
2736 else
2737   echo "$ac_t""no" 1>&6
2738 fi
2739  ;;
2740     esac
2741   fi
2742   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2743 fi
2744
2745 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2746 echo "configure:2747: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2747
2748 ac_ext=c
2749 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2752 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2753 cross_compiling=$ac_cv_prog_cc_cross
2754
2755 cat > conftest.$ac_ext << EOF
2756
2757 #line 2758 "configure"
2758 #include "confdefs.h"
2759
2760 main(){return(0);}
2761 EOF
2762 if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2763   ac_cv_prog_cc_works=yes
2764   # If we can't run a trivial program, we are probably using a cross compiler.
2765   if (./conftest; exit) 2>/dev/null; then
2766     ac_cv_prog_cc_cross=no
2767   else
2768     ac_cv_prog_cc_cross=yes
2769   fi
2770 else
2771   echo "configure: failed program was:" >&5
2772   cat conftest.$ac_ext >&5
2773   ac_cv_prog_cc_works=no
2774 fi
2775 rm -fr conftest*
2776 ac_ext=c
2777 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2778 ac_cpp='$CPP $CPPFLAGS'
2779 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2780 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2781 cross_compiling=$ac_cv_prog_cc_cross
2782
2783 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2784 if test $ac_cv_prog_cc_works = no; then
2785   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2786 fi
2787 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2788 echo "configure:2789: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2789 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2790 cross_compiling=$ac_cv_prog_cc_cross
2791
2792 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2793 echo "configure:2794: checking whether we are using GNU C" >&5
2794 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2795   echo $ac_n "(cached) $ac_c" 1>&6
2796 else
2797   cat > conftest.c <<EOF
2798 #ifdef __GNUC__
2799   yes;
2800 #endif
2801 EOF
2802 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2803   ac_cv_prog_gcc=yes
2804 else
2805   ac_cv_prog_gcc=no
2806 fi
2807 fi
2808
2809 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2810
2811 if test $ac_cv_prog_gcc = yes; then
2812   GCC=yes
2813 else
2814   GCC=
2815 fi
2816
2817 ac_test_CFLAGS="${CFLAGS+set}"
2818 ac_save_CFLAGS="$CFLAGS"
2819 CFLAGS=
2820 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2821 echo "configure:2822: checking whether ${CC-cc} accepts -g" >&5
2822 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   echo 'void f(){}' > conftest.c
2826 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2827   ac_cv_prog_cc_g=yes
2828 else
2829   ac_cv_prog_cc_g=no
2830 fi
2831 rm -f conftest*
2832
2833 fi
2834
2835 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2836 if test "$ac_test_CFLAGS" = set; then
2837   CFLAGS="$ac_save_CFLAGS"
2838 elif test $ac_cv_prog_cc_g = yes; then
2839   if test "$GCC" = yes; then
2840     CFLAGS="-g -O2"
2841   else
2842     CFLAGS="-g"
2843   fi
2844 else
2845   if test "$GCC" = yes; then
2846     CFLAGS="-O2"
2847   else
2848     CFLAGS=
2849   fi
2850 fi
2851
2852 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2853 if test "${with_gnu_ld+set}" = set; then
2854   withval="$with_gnu_ld"
2855   test "$withval" = no || with_gnu_ld=yes
2856 else
2857   with_gnu_ld=no
2858 fi
2859
2860 ac_prog=ld
2861 if test "$ac_cv_prog_gcc" = yes; then
2862   # Check if gcc -print-prog-name=ld gives a path.
2863   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2864 echo "configure:2865: checking for ld used by GCC" >&5
2865   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2866   case "$ac_prog" in
2867     # Accept absolute paths.
2868     [\\/]* | [A-Za-z]:[\\/]*)
2869       re_direlt='/[^/][^/]*/\.\./'
2870       # Canonicalize the path of ld
2871       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2872       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2873         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2874       done
2875       test -z "$LD" && LD="$ac_prog"
2876       ;;
2877   "")
2878     # If it fails, then pretend we aren't using GCC.
2879     ac_prog=ld
2880     ;;
2881   *)
2882     # If it is relative, then search for the first ld in PATH.
2883     with_gnu_ld=unknown
2884     ;;
2885   esac
2886 elif test "$with_gnu_ld" = yes; then
2887   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2888 echo "configure:2889: checking for GNU ld" >&5
2889 else
2890   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2891 echo "configure:2892: checking for non-GNU ld" >&5
2892 fi
2893 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2894   echo $ac_n "(cached) $ac_c" 1>&6
2895 else
2896   if test -z "$LD"; then
2897   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2898   for ac_dir in $PATH; do
2899     test -z "$ac_dir" && ac_dir=.
2900     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2901       ac_cv_path_LD="$ac_dir/$ac_prog"
2902       # Check to see if the program is GNU ld.  I'd rather use --version,
2903       # but apparently some GNU ld's only accept -v.
2904       # Break only if it was the GNU/non-GNU ld that we prefer.
2905       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2906         test "$with_gnu_ld" != no && break
2907       else
2908         test "$with_gnu_ld" != yes && break
2909       fi
2910     fi
2911   done
2912   IFS="$ac_save_ifs"
2913 else
2914   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2915 fi
2916 fi
2917
2918 LD="$ac_cv_path_LD"
2919 if test -n "$LD"; then
2920   echo "$ac_t""$LD" 1>&6
2921 else
2922   echo "$ac_t""no" 1>&6
2923 fi
2924 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2925 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2926 echo "configure:2927: checking if the linker ($LD) is GNU ld" >&5
2927 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2928   echo $ac_n "(cached) $ac_c" 1>&6
2929 else
2930   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2931 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2932   ac_cv_prog_gnu_ld=yes
2933 else
2934   ac_cv_prog_gnu_ld=no
2935 fi
2936 fi
2937
2938 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2939
2940
2941 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2942 echo "configure:2943: checking for BSD-compatible nm" >&5
2943 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2944   echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946   if test -n "$NM"; then
2947   # Let the user override the test.
2948   ac_cv_path_NM="$NM"
2949 else
2950   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2951   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2952     test -z "$ac_dir" && ac_dir=.
2953     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2954       # Check to see if the nm accepts a BSD-compat flag.
2955       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2956       #   nm: unknown option "B" ignored
2957       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2958         ac_cv_path_NM="$ac_dir/nm -B"
2959         break
2960       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2961         ac_cv_path_NM="$ac_dir/nm -p"
2962         break
2963       else
2964         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2965         continue # so that we can try to find one that supports BSD flags
2966       fi
2967     fi
2968   done
2969   IFS="$ac_save_ifs"
2970   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2971 fi
2972 fi
2973
2974 NM="$ac_cv_path_NM"
2975 echo "$ac_t""$NM" 1>&6
2976
2977 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2978 echo "configure:2979: checking whether ln -s works" >&5
2979 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2980   echo $ac_n "(cached) $ac_c" 1>&6
2981 else
2982   rm -f conftestdata
2983 if ln -s X conftestdata 2>/dev/null
2984 then
2985   rm -f conftestdata
2986   ac_cv_prog_LN_S="ln -s"
2987 else
2988   ac_cv_prog_LN_S=ln
2989 fi
2990 fi
2991 LN_S="$ac_cv_prog_LN_S"
2992 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2993   echo "$ac_t""yes" 1>&6
2994 else
2995   echo "$ac_t""no" 1>&6
2996 fi
2997
2998 if test $host != $build; then
2999   ac_tool_prefix=${host_alias}-
3000 else
3001   ac_tool_prefix=
3002 fi
3003
3004
3005 case "$target" in
3006 NONE) lt_target="$host" ;;
3007 *) lt_target="$target" ;;
3008 esac
3009
3010 # Check for any special flags to pass to ltconfig.
3011 libtool_flags="--cache-file=$cache_file"
3012 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3013 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3014 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3015 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3016 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3017 libtool_flags="$libtool_flags --enable-dlopen"
3018 libtool_flags="$libtool_flags --enable-win32-dll"
3019 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3020 if test "${enable_libtool_lock+set}" = set; then
3021   enableval="$enable_libtool_lock"
3022   :
3023 fi
3024
3025 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3026 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3027
3028 # Some flags need to be propagated to the compiler or linker for good
3029 # libtool support.
3030 case "$lt_target" in
3031 *-*-irix6*)
3032   # Find out which ABI we are using.
3033   echo '#line 3034 "configure"' > conftest.$ac_ext
3034   if { (eval echo configure:3035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3035     case "`/usr/bin/file conftest.o`" in
3036     *32-bit*)
3037       LD="${LD-ld} -32"
3038       ;;
3039     *N32*)
3040       LD="${LD-ld} -n32"
3041       ;;
3042     *64-bit*)
3043       LD="${LD-ld} -64"
3044       ;;
3045     esac
3046   fi
3047   rm -rf conftest*
3048   ;;
3049
3050 *-*-sco3.2v5*)
3051   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3052   SAVE_CFLAGS="$CFLAGS"
3053   CFLAGS="$CFLAGS -belf"
3054   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3055 echo "configure:3056: checking whether the C compiler needs -belf" >&5
3056 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3057   echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059   cat > conftest.$ac_ext <<EOF
3060 #line 3061 "configure"
3061 #include "confdefs.h"
3062
3063 int main() {
3064
3065 ; return 0; }
3066 EOF
3067 if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3068   rm -rf conftest*
3069   lt_cv_cc_needs_belf=yes
3070 else
3071   echo "configure: failed program was:" >&5
3072   cat conftest.$ac_ext >&5
3073   rm -rf conftest*
3074   lt_cv_cc_needs_belf=no
3075 fi
3076 rm -f conftest*
3077 fi
3078
3079 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3080   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3081     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3082     CFLAGS="$SAVE_CFLAGS"
3083   fi
3084   ;;
3085
3086 *-*-cygwin* | *-*-mingw*)
3087   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3088 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3089 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3090 echo "configure:3091: checking for $ac_word" >&5
3091 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3092   echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094   if test -n "$DLLTOOL"; then
3095   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3096 else
3097   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3098   ac_dummy="$PATH"
3099   for ac_dir in $ac_dummy; do
3100     test -z "$ac_dir" && ac_dir=.
3101     if test -f $ac_dir/$ac_word; then
3102       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3103       break
3104     fi
3105   done
3106   IFS="$ac_save_ifs"
3107 fi
3108 fi
3109 DLLTOOL="$ac_cv_prog_DLLTOOL"
3110 if test -n "$DLLTOOL"; then
3111   echo "$ac_t""$DLLTOOL" 1>&6
3112 else
3113   echo "$ac_t""no" 1>&6
3114 fi
3115
3116
3117 if test -z "$ac_cv_prog_DLLTOOL"; then
3118 if test -n "$ac_tool_prefix"; then
3119   # Extract the first word of "dlltool", so it can be a program name with args.
3120 set dummy dlltool; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   if test -n "$DLLTOOL"; then
3127   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3128 else
3129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3130   ac_dummy="$PATH"
3131   for ac_dir in $ac_dummy; do
3132     test -z "$ac_dir" && ac_dir=.
3133     if test -f $ac_dir/$ac_word; then
3134       ac_cv_prog_DLLTOOL="dlltool"
3135       break
3136     fi
3137   done
3138   IFS="$ac_save_ifs"
3139   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3140 fi
3141 fi
3142 DLLTOOL="$ac_cv_prog_DLLTOOL"
3143 if test -n "$DLLTOOL"; then
3144   echo "$ac_t""$DLLTOOL" 1>&6
3145 else
3146   echo "$ac_t""no" 1>&6
3147 fi
3148
3149 else
3150   DLLTOOL="false"
3151 fi
3152 fi
3153
3154   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3155 set dummy ${ac_tool_prefix}as; ac_word=$2
3156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3157 echo "configure:3158: checking for $ac_word" >&5
3158 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3159   echo $ac_n "(cached) $ac_c" 1>&6
3160 else
3161   if test -n "$AS"; then
3162   ac_cv_prog_AS="$AS" # Let the user override the test.
3163 else
3164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3165   ac_dummy="$PATH"
3166   for ac_dir in $ac_dummy; do
3167     test -z "$ac_dir" && ac_dir=.
3168     if test -f $ac_dir/$ac_word; then
3169       ac_cv_prog_AS="${ac_tool_prefix}as"
3170       break
3171     fi
3172   done
3173   IFS="$ac_save_ifs"
3174 fi
3175 fi
3176 AS="$ac_cv_prog_AS"
3177 if test -n "$AS"; then
3178   echo "$ac_t""$AS" 1>&6
3179 else
3180   echo "$ac_t""no" 1>&6
3181 fi
3182
3183
3184 if test -z "$ac_cv_prog_AS"; then
3185 if test -n "$ac_tool_prefix"; then
3186   # Extract the first word of "as", so it can be a program name with args.
3187 set dummy as; ac_word=$2
3188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3189 echo "configure:3190: checking for $ac_word" >&5
3190 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3191   echo $ac_n "(cached) $ac_c" 1>&6
3192 else
3193   if test -n "$AS"; then
3194   ac_cv_prog_AS="$AS" # Let the user override the test.
3195 else
3196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3197   ac_dummy="$PATH"
3198   for ac_dir in $ac_dummy; do
3199     test -z "$ac_dir" && ac_dir=.
3200     if test -f $ac_dir/$ac_word; then
3201       ac_cv_prog_AS="as"
3202       break
3203     fi
3204   done
3205   IFS="$ac_save_ifs"
3206   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3207 fi
3208 fi
3209 AS="$ac_cv_prog_AS"
3210 if test -n "$AS"; then
3211   echo "$ac_t""$AS" 1>&6
3212 else
3213   echo "$ac_t""no" 1>&6
3214 fi
3215
3216 else
3217   AS="false"
3218 fi
3219 fi
3220
3221   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3222 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3224 echo "configure:3225: checking for $ac_word" >&5
3225 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   if test -n "$OBJDUMP"; then
3229   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3230 else
3231   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3232   ac_dummy="$PATH"
3233   for ac_dir in $ac_dummy; do
3234     test -z "$ac_dir" && ac_dir=.
3235     if test -f $ac_dir/$ac_word; then
3236       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3237       break
3238     fi
3239   done
3240   IFS="$ac_save_ifs"
3241 fi
3242 fi
3243 OBJDUMP="$ac_cv_prog_OBJDUMP"
3244 if test -n "$OBJDUMP"; then
3245   echo "$ac_t""$OBJDUMP" 1>&6
3246 else
3247   echo "$ac_t""no" 1>&6
3248 fi
3249
3250
3251 if test -z "$ac_cv_prog_OBJDUMP"; then
3252 if test -n "$ac_tool_prefix"; then
3253   # Extract the first word of "objdump", so it can be a program name with args.
3254 set dummy objdump; ac_word=$2
3255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3256 echo "configure:3257: checking for $ac_word" >&5
3257 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3258   echo $ac_n "(cached) $ac_c" 1>&6
3259 else
3260   if test -n "$OBJDUMP"; then
3261   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3262 else
3263   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3264   ac_dummy="$PATH"
3265   for ac_dir in $ac_dummy; do
3266     test -z "$ac_dir" && ac_dir=.
3267     if test -f $ac_dir/$ac_word; then
3268       ac_cv_prog_OBJDUMP="objdump"
3269       break
3270     fi
3271   done
3272   IFS="$ac_save_ifs"
3273   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3274 fi
3275 fi
3276 OBJDUMP="$ac_cv_prog_OBJDUMP"
3277 if test -n "$OBJDUMP"; then
3278   echo "$ac_t""$OBJDUMP" 1>&6
3279 else
3280   echo "$ac_t""no" 1>&6
3281 fi
3282
3283 else
3284   OBJDUMP="false"
3285 fi
3286 fi
3287
3288   ;;
3289
3290 esac
3291
3292
3293 # Save cache, so that ltconfig can load it
3294
3295
3296 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3297 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3298 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3299 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3300 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3301 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3302 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3303 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3304
3305 # Reload cache, that may have been modified by ltconfig
3306
3307
3308 # This can be used to rebuild libtool when needed
3309 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3310
3311 # Always use our own libtool.
3312 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3313
3314 # Redirect the config.log output again, so that the ltconfig log is not
3315 # clobbered by the next message.
3316 exec 5>>./config.log
3317
3318
3319 for ac_prog in mawk gawk nawk awk
3320 do
3321 # Extract the first word of "$ac_prog", so it can be a program name with args.
3322 set dummy $ac_prog; ac_word=$2
3323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3324 echo "configure:3325: checking for $ac_word" >&5
3325 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3326   echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328   if test -n "$AWK"; then
3329   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3330 else
3331   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3332   ac_dummy="$PATH"
3333   for ac_dir in $ac_dummy; do
3334     test -z "$ac_dir" && ac_dir=.
3335     if test -f $ac_dir/$ac_word; then
3336       ac_cv_prog_AWK="$ac_prog"
3337       break
3338     fi
3339   done
3340   IFS="$ac_save_ifs"
3341 fi
3342 fi
3343 AWK="$ac_cv_prog_AWK"
3344 if test -n "$AWK"; then
3345   echo "$ac_t""$AWK" 1>&6
3346 else
3347   echo "$ac_t""no" 1>&6
3348 fi
3349
3350 test -n "$AWK" && break
3351 done
3352
3353 # test for ln hardlink support
3354 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3355 echo "configure:3356: checking whether ln works" >&5
3356 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   rm -f conftest.src conftest.dst
3360 echo "conftest" > conftest.src
3361 if ln conftest.src conftest.dst 2>/dev/null
3362 then
3363   ol_cv_prog_LN_H="ln"
3364 else
3365   ol_cv_prog_LN_H="cp"
3366 fi
3367 rm -f conftest.src conftest.dst
3368
3369 fi
3370 LN_H="$ol_cv_prog_LN_H"
3371 if test "$ol_cv_prog_LN_H" = "ln"; then
3372         echo "$ac_t""yes" 1>&6
3373 else
3374         echo "$ac_t""no" 1>&6
3375 fi
3376
3377 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3378 echo "configure:3379: checking whether ln -s works" >&5
3379 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   rm -f conftestdata
3383 if ln -s X conftestdata 2>/dev/null
3384 then
3385   rm -f conftestdata
3386   ac_cv_prog_LN_S="ln -s"
3387 else
3388   ac_cv_prog_LN_S=ln
3389 fi
3390 fi
3391 LN_S="$ac_cv_prog_LN_S"
3392 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3393   echo "$ac_t""yes" 1>&6
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398
3399 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3400         LN_S="$LN_H"
3401 fi
3402
3403 # Extract the first word of "sendmail", so it can be a program name with args.
3404 set dummy sendmail; ac_word=$2
3405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_word" >&5
3407 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   case "$SENDMAIL" in
3411   /*)
3412   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3413   ;;
3414   ?:/*)
3415   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3416   ;;
3417   *)
3418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3419   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3420   for ac_dir in $ac_dummy; do 
3421     test -z "$ac_dir" && ac_dir=.
3422     if test -f $ac_dir/$ac_word; then
3423       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3424       break
3425     fi
3426   done
3427   IFS="$ac_save_ifs"
3428   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3429   ;;
3430 esac
3431 fi
3432 SENDMAIL="$ac_cv_path_SENDMAIL"
3433 if test -n "$SENDMAIL"; then
3434   echo "$ac_t""$SENDMAIL" 1>&6
3435 else
3436   echo "$ac_t""no" 1>&6
3437 fi
3438
3439 # Extract the first word of "vi", so it can be a program name with args.
3440 set dummy vi; ac_word=$2
3441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3442 echo "configure:3443: checking for $ac_word" >&5
3443 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3444   echo $ac_n "(cached) $ac_c" 1>&6
3445 else
3446   case "$EDITOR" in
3447   /*)
3448   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3449   ;;
3450   ?:/*)
3451   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3452   ;;
3453   *)
3454   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3455   ac_dummy="$PATH:/usr/ucb"
3456   for ac_dir in $ac_dummy; do 
3457     test -z "$ac_dir" && ac_dir=.
3458     if test -f $ac_dir/$ac_word; then
3459       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3460       break
3461     fi
3462   done
3463   IFS="$ac_save_ifs"
3464   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3465   ;;
3466 esac
3467 fi
3468 EDITOR="$ac_cv_path_EDITOR"
3469 if test -n "$EDITOR"; then
3470   echo "$ac_t""$EDITOR" 1>&6
3471 else
3472   echo "$ac_t""no" 1>&6
3473 fi
3474
3475 # Extract the first word of "finger", so it can be a program name with args.
3476 set dummy finger; ac_word=$2
3477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3478 echo "configure:3479: checking for $ac_word" >&5
3479 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   case "$FINGER" in
3483   /*)
3484   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3485   ;;
3486   ?:/*)
3487   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3488   ;;
3489   *)
3490   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3491   ac_dummy="$PATH:/usr/ucb"
3492   for ac_dir in $ac_dummy; do 
3493     test -z "$ac_dir" && ac_dir=.
3494     if test -f $ac_dir/$ac_word; then
3495       ac_cv_path_FINGER="$ac_dir/$ac_word"
3496       break
3497     fi
3498   done
3499   IFS="$ac_save_ifs"
3500   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3501   ;;
3502 esac
3503 fi
3504 FINGER="$ac_cv_path_FINGER"
3505 if test -n "$FINGER"; then
3506   echo "$ac_t""$FINGER" 1>&6
3507 else
3508   echo "$ac_t""no" 1>&6
3509 fi
3510
3511
3512 ol_link_perl=no
3513 if test $ol_enable_perl != no ; then
3514         # Extract the first word of "perl", so it can be a program name with args.
3515 set dummy perl; ac_word=$2
3516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3517 echo "configure:3518: checking for $ac_word" >&5
3518 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3519   echo $ac_n "(cached) $ac_c" 1>&6
3520 else
3521   case "$PERLBIN" in
3522   /*)
3523   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3524   ;;
3525   ?:/*)
3526   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3527   ;;
3528   *)
3529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3530   ac_dummy="$PATH"
3531   for ac_dir in $ac_dummy; do 
3532     test -z "$ac_dir" && ac_dir=.
3533     if test -f $ac_dir/$ac_word; then
3534       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3535       break
3536     fi
3537   done
3538   IFS="$ac_save_ifs"
3539   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3540   ;;
3541 esac
3542 fi
3543 PERLBIN="$ac_cv_path_PERLBIN"
3544 if test -n "$PERLBIN"; then
3545   echo "$ac_t""$PERLBIN" 1>&6
3546 else
3547   echo "$ac_t""no" 1>&6
3548 fi
3549
3550
3551         if test "no$PERLBIN" = "no" ; then
3552                 if test $ol_enable_perl = yes ; then
3553                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3554                 fi
3555
3556         else
3557                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3558                 if test x"$ol_with_perl_module" = "xstatic" ; then
3559                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3560                 else
3561                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3562                 fi
3563                                 ol_link_perl=yes
3564         fi
3565 fi
3566
3567 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3568 echo "configure:3569: checking how to run the C preprocessor" >&5
3569 # On Suns, sometimes $CPP names a directory.
3570 if test -n "$CPP" && test -d "$CPP"; then
3571   CPP=
3572 fi
3573 if test -z "$CPP"; then
3574 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3575   echo $ac_n "(cached) $ac_c" 1>&6
3576 else
3577     # This must be in double quotes, not single quotes, because CPP may get
3578   # substituted into the Makefile and "${CC-cc}" will confuse make.
3579   CPP="${CC-cc} -E"
3580   # On the NeXT, cc -E runs the code through the compiler's parser,
3581   # not just through cpp.
3582   cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 #include <assert.h>
3586 Syntax Error
3587 EOF
3588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3589 { (eval echo configure:3590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3591 if test -z "$ac_err"; then
3592   :
3593 else
3594   echo "$ac_err" >&5
3595   echo "configure: failed program was:" >&5
3596   cat conftest.$ac_ext >&5
3597   rm -rf conftest*
3598   CPP="${CC-cc} -E -traditional-cpp"
3599   cat > conftest.$ac_ext <<EOF
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602 #include <assert.h>
3603 Syntax Error
3604 EOF
3605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3606 { (eval echo configure:3607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3608 if test -z "$ac_err"; then
3609   :
3610 else
3611   echo "$ac_err" >&5
3612   echo "configure: failed program was:" >&5
3613   cat conftest.$ac_ext >&5
3614   rm -rf conftest*
3615   CPP="${CC-cc} -nologo -E"
3616   cat > conftest.$ac_ext <<EOF
3617 #line 3618 "configure"
3618 #include "confdefs.h"
3619 #include <assert.h>
3620 Syntax Error
3621 EOF
3622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3623 { (eval echo configure:3624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3625 if test -z "$ac_err"; then
3626   :
3627 else
3628   echo "$ac_err" >&5
3629   echo "configure: failed program was:" >&5
3630   cat conftest.$ac_ext >&5
3631   rm -rf conftest*
3632   CPP=/lib/cpp
3633 fi
3634 rm -f conftest*
3635 fi
3636 rm -f conftest*
3637 fi
3638 rm -f conftest*
3639   ac_cv_prog_CPP="$CPP"
3640 fi
3641   CPP="$ac_cv_prog_CPP"
3642 else
3643   ac_cv_prog_CPP="$CPP"
3644 fi
3645 echo "$ac_t""$CPP" 1>&6
3646
3647
3648 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3649         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3650
3651 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3652         echo "configure: warning: programs compiled here do run here..." 1>&2
3653         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3654
3655 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3656         echo "configure: warning: programs compiled here do not run here..." 1>&2
3657         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3658 fi
3659
3660 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3661 echo "configure:3662: checking for AIX" >&5
3662 cat > conftest.$ac_ext <<EOF
3663 #line 3664 "configure"
3664 #include "confdefs.h"
3665 #ifdef _AIX
3666   yes
3667 #endif
3668
3669 EOF
3670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3671   egrep "yes" >/dev/null 2>&1; then
3672   rm -rf conftest*
3673   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3674 #define _ALL_SOURCE 1
3675 EOF
3676
3677 else
3678   rm -rf conftest*
3679   echo "$ac_t""no" 1>&6
3680 fi
3681 rm -f conftest*
3682
3683
3684 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3685 echo "configure:3686: checking for POSIXized ISC" >&5
3686 if test -d /etc/conf/kconfig.d &&
3687   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3688 then
3689   echo "$ac_t""yes" 1>&6
3690   ISC=yes # If later tests want to check for ISC.
3691   cat >> confdefs.h <<\EOF
3692 #define _POSIX_SOURCE 1
3693 EOF
3694
3695   if test "$GCC" = yes; then
3696     CC="$CC -posix"
3697   else
3698     CC="$CC -Xp"
3699   fi
3700 else
3701   echo "$ac_t""no" 1>&6
3702   ISC=
3703 fi
3704
3705 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3706 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3707 echo "configure:3708: checking for minix/config.h" >&5
3708 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3709   echo $ac_n "(cached) $ac_c" 1>&6
3710 else
3711   cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714 #include <minix/config.h>
3715 EOF
3716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3717 { (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3719 if test -z "$ac_err"; then
3720   rm -rf conftest*
3721   eval "ac_cv_header_$ac_safe=yes"
3722 else
3723   echo "$ac_err" >&5
3724   echo "configure: failed program was:" >&5
3725   cat conftest.$ac_ext >&5
3726   rm -rf conftest*
3727   eval "ac_cv_header_$ac_safe=no"
3728 fi
3729 rm -f conftest*
3730 fi
3731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3732   echo "$ac_t""yes" 1>&6
3733   MINIX=yes
3734 else
3735   echo "$ac_t""no" 1>&6
3736 MINIX=
3737 fi
3738
3739 if test "$MINIX" = yes; then
3740   cat >> confdefs.h <<\EOF
3741 #define _POSIX_SOURCE 1
3742 EOF
3743
3744   cat >> confdefs.h <<\EOF
3745 #define _POSIX_1_SOURCE 2
3746 EOF
3747
3748   cat >> confdefs.h <<\EOF
3749 #define _MINIX 1
3750 EOF
3751
3752 fi
3753
3754
3755 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3756 echo "configure:3757: checking for Cygwin environment" >&5
3757 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763
3764 int main() {
3765
3766 #ifndef __CYGWIN__
3767 #define __CYGWIN__ __CYGWIN32__
3768 #endif
3769 return __CYGWIN__;
3770 ; return 0; }
3771 EOF
3772 if { (eval echo configure:3773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3773   rm -rf conftest*
3774   ac_cv_cygwin=yes
3775 else
3776   echo "configure: failed program was:" >&5
3777   cat conftest.$ac_ext >&5
3778   rm -rf conftest*
3779   ac_cv_cygwin=no
3780 fi
3781 rm -f conftest*
3782 fi
3783
3784 echo "$ac_t""$ac_cv_cygwin" 1>&6
3785 CYGWIN=
3786 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3787 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3788 echo "configure:3789: checking for mingw32 environment" >&5
3789 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   cat > conftest.$ac_ext <<EOF
3793 #line 3794 "configure"
3794 #include "confdefs.h"
3795
3796 int main() {
3797 return __MINGW32__;
3798 ; return 0; }
3799 EOF
3800 if { (eval echo configure:3801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3801   rm -rf conftest*
3802   ac_cv_mingw32=yes
3803 else
3804   echo "configure: failed program was:" >&5
3805   cat conftest.$ac_ext >&5
3806   rm -rf conftest*
3807   ac_cv_mingw32=no
3808 fi
3809 rm -f conftest*
3810 fi
3811
3812 echo "$ac_t""$ac_cv_mingw32" 1>&6
3813 MINGW32=
3814 test "$ac_cv_mingw32" = yes && MINGW32=yes
3815 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3816 echo "configure:3817: checking for EMX OS/2 environment" >&5
3817 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3818   echo $ac_n "(cached) $ac_c" 1>&6
3819 else
3820   cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823
3824 int main() {
3825 return __EMX__;
3826 ; return 0; }
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3829   rm -rf conftest*
3830   ac_cv_emxos2=yes
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -rf conftest*
3835   ac_cv_emxos2=no
3836 fi
3837 rm -f conftest*
3838 fi
3839
3840 echo "$ac_t""$ac_cv_emxos2" 1>&6
3841 EMXOS2=
3842 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3843
3844
3845
3846 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3847 echo "configure:3848: checking for executable suffix" >&5
3848 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3849   echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3852   ac_cv_exeext=.exe
3853 else
3854   rm -f conftest*
3855   echo 'int main () { return 0; }' > conftest.$ac_ext
3856   ac_cv_exeext=
3857   if { (eval echo configure:3858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3858     for file in conftest.*; do
3859       case $file in
3860       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3861       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3862       esac
3863     done
3864   else
3865     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3866   fi
3867   rm -f conftest*
3868   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3869 fi
3870 fi
3871
3872 EXEEXT=""
3873 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3874 echo "$ac_t""${ac_cv_exeext}" 1>&6
3875 ac_exeext=$EXEEXT
3876
3877 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3878 echo "configure:3879: checking for object suffix" >&5
3879 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3880   echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882   rm -f conftest*
3883 echo 'int i = 1;' > conftest.$ac_ext
3884 if { (eval echo configure:3885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3885   for ac_file in conftest.*; do
3886     case $ac_file in
3887     *.c) ;;
3888     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3889     esac
3890   done
3891 else
3892   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3893 fi
3894 rm -f conftest*
3895 fi
3896
3897 echo "$ac_t""$ac_cv_objext" 1>&6
3898 OBJEXT=$ac_cv_objext
3899 ac_objext=$ac_cv_objext
3900
3901
3902 cat >> confdefs.h <<EOF
3903 #define EXEEXT "${EXEEXT}"
3904 EOF
3905
3906
3907 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3908 echo "configure:3909: checking for be_app in -lbe" >&5
3909 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3910 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   ac_save_LIBS="$LIBS"
3914 LIBS="-lbe -lroot -lnet $LIBS"
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918 /* Override any gcc2 internal prototype to avoid an error.  */
3919 /* We use char because int might match the return type of a gcc2
3920     builtin and then its argument prototype would still apply.  */
3921 char be_app();
3922
3923 int main() {
3924 be_app()
3925 ; return 0; }
3926 EOF
3927 if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3928   rm -rf conftest*
3929   eval "ac_cv_lib_$ac_lib_var=yes"
3930 else
3931   echo "configure: failed program was:" >&5
3932   cat conftest.$ac_ext >&5
3933   rm -rf conftest*
3934   eval "ac_cv_lib_$ac_lib_var=no"
3935 fi
3936 rm -f conftest*
3937 LIBS="$ac_save_LIBS"
3938
3939 fi
3940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3941   echo "$ac_t""yes" 1>&6
3942   LIBS="$LIBS -lbe -lroot -lnet"
3943 else
3944   echo "$ac_t""no" 1>&6
3945 :
3946 fi
3947
3948
3949
3950
3951
3952 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3953 echo "configure:3954: checking for ${CC-cc} option to accept ANSI C" >&5
3954 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   am_cv_prog_cc_stdc=no
3958 ac_save_CC="$CC"
3959 # Don't try gcc -ansi; that turns off useful extensions and
3960 # breaks some systems' header files.
3961 # AIX                   -qlanglvl=ansi
3962 # Ultrix and OSF/1      -std1
3963 # HP-UX 10.20 and later -Ae
3964 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3965 # SVR4                  -Xc -D__EXTENSIONS__
3966 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3967 do
3968   CC="$ac_save_CC $ac_arg"
3969   cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 #include <stdarg.h>
3973 #include <stdio.h>
3974 #include <sys/types.h>
3975 #include <sys/stat.h>
3976 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3977 struct buf { int x; };
3978 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3979 static char *e (p, i)
3980      char **p;
3981      int i;
3982 {
3983   return p[i];
3984 }
3985 static char *f (char * (*g) (char **, int), char **p, ...)
3986 {
3987   char *s;
3988   va_list v;
3989   va_start (v,p);
3990   s = g (p, va_arg (v,int));
3991   va_end (v);
3992   return s;
3993 }
3994 int test (int i, double x);
3995 struct s1 {int (*f) (int a);};
3996 struct s2 {int (*f) (double a);};
3997 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3998 int argc;
3999 char **argv;
4000
4001 int main() {
4002
4003 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4004
4005 ; return 0; }
4006 EOF
4007 if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4008   rm -rf conftest*
4009   am_cv_prog_cc_stdc="$ac_arg"; break
4010 else
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013 fi
4014 rm -f conftest*
4015 done
4016 CC="$ac_save_CC"
4017
4018 fi
4019
4020 if test -z "$am_cv_prog_cc_stdc"; then
4021   echo "$ac_t""none needed" 1>&6
4022 else
4023   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4024 fi
4025 case "x$am_cv_prog_cc_stdc" in
4026   x|xno) ;;
4027   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4028 esac
4029
4030 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4031         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4032 fi
4033
4034 # test for make depend flag
4035 OL_MKDEP=
4036 OL_MKDEP_FLAGS=
4037 if test -z "${MKDEP}"; then
4038         OL_MKDEP="${CC-cc}"
4039         if test -z "${MKDEP_FLAGS}"; then
4040                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4041 echo "configure:4042: checking for ${OL_MKDEP} depend flag" >&5
4042 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4043   echo $ac_n "(cached) $ac_c" 1>&6
4044 else
4045   
4046                         ol_cv_mkdep=no
4047                         for flag in "-M" "-xM"; do
4048                                 cat > conftest.c <<EOF
4049  noCode;
4050 EOF
4051                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4052                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4053                                 then
4054                                         if test ! -f conftest."${ac_object}" ; then
4055                                                 ol_cv_mkdep=$flag
4056                                                 OL_MKDEP_FLAGS="$flag"
4057                                                 break
4058                                         fi
4059                                 fi
4060                         done
4061                         rm -f conftest*
4062                 
4063 fi
4064
4065 echo "$ac_t""$ol_cv_mkdep" 1>&6
4066         else
4067                 cc_cv_mkdep=yes
4068                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4069         fi
4070 else
4071         cc_cv_mkdep=yes
4072         OL_MKDEP="${MKDEP}"
4073         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4074 fi
4075
4076
4077
4078 if test "${ol_cv_mkdep}" = no ; then
4079         # this will soon become an error
4080         echo "configure: warning: do not know how to generate dependencies" 1>&2
4081 fi
4082
4083 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4084 echo "configure:4085: checking for afopen in -ls" >&5
4085 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4086 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   ac_save_LIBS="$LIBS"
4090 LIBS="-ls  $LIBS"
4091 cat > conftest.$ac_ext <<EOF
4092 #line 4093 "configure"
4093 #include "confdefs.h"
4094 /* Override any gcc2 internal prototype to avoid an error.  */
4095 /* We use char because int might match the return type of a gcc2
4096     builtin and then its argument prototype would still apply.  */
4097 char afopen();
4098
4099 int main() {
4100 afopen()
4101 ; return 0; }
4102 EOF
4103 if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4104   rm -rf conftest*
4105   eval "ac_cv_lib_$ac_lib_var=yes"
4106 else
4107   echo "configure: failed program was:" >&5
4108   cat conftest.$ac_ext >&5
4109   rm -rf conftest*
4110   eval "ac_cv_lib_$ac_lib_var=no"
4111 fi
4112 rm -f conftest*
4113 LIBS="$ac_save_LIBS"
4114
4115 fi
4116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4117   echo "$ac_t""yes" 1>&6
4118   
4119         AUTH_LIBS=-ls
4120         cat >> confdefs.h <<\EOF
4121 #define HAVE_AIX_SECURITY 1
4122 EOF
4123
4124
4125 else
4126   echo "$ac_t""no" 1>&6
4127 fi
4128
4129
4130
4131 for ac_func in getaddrinfo 
4132 do
4133 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4134 echo "configure:4135: checking for $ac_func" >&5
4135 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4136   echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138   cat > conftest.$ac_ext <<EOF
4139 #line 4140 "configure"
4140 #include "confdefs.h"
4141 /* System header to define __stub macros and hopefully few prototypes,
4142     which can conflict with char $ac_func(); below.  */
4143 #include <assert.h>
4144 /* Override any gcc2 internal prototype to avoid an error.  */
4145 /* We use char because int might match the return type of a gcc2
4146     builtin and then its argument prototype would still apply.  */
4147 char $ac_func();
4148 char (*f)();
4149
4150 int main() {
4151
4152 /* The GNU C library defines this for functions which it implements
4153     to always fail with ENOSYS.  Some functions are actually named
4154     something starting with __ and the normal name is an alias.  */
4155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4156 choke me
4157 #else
4158 f = $ac_func;
4159 #endif
4160
4161 ; return 0; }
4162 EOF
4163 if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4164   rm -rf conftest*
4165   eval "ac_cv_func_$ac_func=yes"
4166 else
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   eval "ac_cv_func_$ac_func=no"
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4176   echo "$ac_t""yes" 1>&6
4177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4178   cat >> confdefs.h <<EOF
4179 #define $ac_tr_func 1
4180 EOF
4181  
4182 else
4183   echo "$ac_t""no" 1>&6
4184 fi
4185 done
4186
4187
4188 if test $ac_cv_func_getaddrinfo = no ; then
4189         if test $ol_enable_ipv6 = yes ; then
4190                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4191         fi
4192         ol_enable_ipv6=no
4193 fi
4194
4195 if test $ol_enable_local != no ; then
4196         for ac_hdr in sys/un.h 
4197 do
4198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4200 echo "configure:4201: checking for $ac_hdr" >&5
4201 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4202   echo $ac_n "(cached) $ac_c" 1>&6
4203 else
4204   cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 #include <$ac_hdr>
4208 EOF
4209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4210 { (eval echo configure:4211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4212 if test -z "$ac_err"; then
4213   rm -rf conftest*
4214   eval "ac_cv_header_$ac_safe=yes"
4215 else
4216   echo "$ac_err" >&5
4217   echo "configure: failed program was:" >&5
4218   cat conftest.$ac_ext >&5
4219   rm -rf conftest*
4220   eval "ac_cv_header_$ac_safe=no"
4221 fi
4222 rm -f conftest*
4223 fi
4224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4225   echo "$ac_t""yes" 1>&6
4226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4227   cat >> confdefs.h <<EOF
4228 #define $ac_tr_hdr 1
4229 EOF
4230  
4231 else
4232   echo "$ac_t""no" 1>&6
4233 fi
4234 done
4235
4236
4237         if test $ol_enable_local = auto ; then
4238                 ol_enable_local=$ac_cv_header_sys_un_h
4239         elif test $ac_cv_header_sys_un_h = no ; then
4240                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
4241         fi
4242 fi
4243
4244 ol_link_modules=no
4245 if test $ol_enable_modules != no ; then
4246         for ac_hdr in ltdl.h
4247 do
4248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4250 echo "configure:4251: checking for $ac_hdr" >&5
4251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4252   echo $ac_n "(cached) $ac_c" 1>&6
4253 else
4254   cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 #include <$ac_hdr>
4258 EOF
4259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4260 { (eval echo configure:4261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4262 if test -z "$ac_err"; then
4263   rm -rf conftest*
4264   eval "ac_cv_header_$ac_safe=yes"
4265 else
4266   echo "$ac_err" >&5
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   eval "ac_cv_header_$ac_safe=no"
4271 fi
4272 rm -f conftest*
4273 fi
4274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4275   echo "$ac_t""yes" 1>&6
4276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4277   cat >> confdefs.h <<EOF
4278 #define $ac_tr_hdr 1
4279 EOF
4280  
4281 else
4282   echo "$ac_t""no" 1>&6
4283 fi
4284 done
4285
4286
4287         if test $ac_cv_header_ltdl_h = no ; then
4288                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4289         fi
4290
4291         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4292 echo "configure:4293: checking for lt_dlinit in -lltdl" >&5
4293 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4294 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4295   echo $ac_n "(cached) $ac_c" 1>&6
4296 else
4297   ac_save_LIBS="$LIBS"
4298 LIBS="-lltdl  $LIBS"
4299 cat > conftest.$ac_ext <<EOF
4300 #line 4301 "configure"
4301 #include "confdefs.h"
4302 /* Override any gcc2 internal prototype to avoid an error.  */
4303 /* We use char because int might match the return type of a gcc2
4304     builtin and then its argument prototype would still apply.  */
4305 char lt_dlinit();
4306
4307 int main() {
4308 lt_dlinit()
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4312   rm -rf conftest*
4313   eval "ac_cv_lib_$ac_lib_var=yes"
4314 else
4315   echo "configure: failed program was:" >&5
4316   cat conftest.$ac_ext >&5
4317   rm -rf conftest*
4318   eval "ac_cv_lib_$ac_lib_var=no"
4319 fi
4320 rm -f conftest*
4321 LIBS="$ac_save_LIBS"
4322
4323 fi
4324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4325   echo "$ac_t""yes" 1>&6
4326   
4327             MODULES_LIBS=-lltdl
4328             cat >> confdefs.h <<\EOF
4329 #define HAVE_LIBLTDL 1
4330 EOF
4331
4332         
4333 else
4334   echo "$ac_t""no" 1>&6
4335 fi
4336
4337
4338         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4339                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4340         fi
4341         ol_link_modules=yes
4342 else
4343         ol_with_dnssrv_module=static
4344         ol_with_ldap_module=static
4345         ol_with_ldbm_module=static
4346         ol_with_passwd_module=static
4347         ol_with_perl_module=static
4348         ol_with_shell_module=static
4349         ol_with_tcl_module=static
4350         ol_with_sql_module=static
4351 fi
4352
4353 # test for EBCDIC
4354 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4355 echo "configure:4356: checking for EBCDIC" >&5
4356 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   
4360         cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363
4364 #if !('M' == 0xd4)
4365 #include <__ASCII__/generate_error.h>
4366 #endif
4367
4368 EOF
4369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4370 { (eval echo configure:4371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4372 if test -z "$ac_err"; then
4373   rm -rf conftest*
4374   ol_cv_cpp_ebcdic=yes
4375 else
4376   echo "$ac_err" >&5
4377   echo "configure: failed program was:" >&5
4378   cat conftest.$ac_ext >&5
4379   rm -rf conftest*
4380   ol_cv_cpp_ebcdic=no
4381 fi
4382 rm -f conftest*
4383 fi
4384
4385 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4386 if test $ol_cv_cpp_ebcdic = yes ; then
4387         cat >> confdefs.h <<\EOF
4388 #define HAVE_EBCDIC 1
4389 EOF
4390
4391 fi
4392
4393 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4394 echo "configure:4395: checking for ANSI C header files" >&5
4395 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4396   echo $ac_n "(cached) $ac_c" 1>&6
4397 else
4398   cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401 #include <stdlib.h>
4402 #include <stdarg.h>
4403 #include <string.h>
4404 #include <float.h>
4405 EOF
4406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4407 { (eval echo configure:4408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4409 if test -z "$ac_err"; then
4410   rm -rf conftest*
4411   ol_cv_header_stdc=yes
4412 else
4413   echo "$ac_err" >&5
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -rf conftest*
4417   ol_cv_header_stdc=no
4418 fi
4419 rm -f conftest*
4420
4421 if test $ol_cv_header_stdc = yes; then
4422   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4423 cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426 #include <string.h>
4427 EOF
4428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4429   egrep "memchr" >/dev/null 2>&1; then
4430   :
4431 else
4432   rm -rf conftest*
4433   ol_cv_header_stdc=no
4434 fi
4435 rm -f conftest*
4436
4437 fi
4438
4439 if test $ol_cv_header_stdc = yes; then
4440   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4441 cat > conftest.$ac_ext <<EOF
4442 #line 4443 "configure"
4443 #include "confdefs.h"
4444 #include <stdlib.h>
4445 EOF
4446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4447   egrep "free" >/dev/null 2>&1; then
4448   :
4449 else
4450   rm -rf conftest*
4451   ol_cv_header_stdc=no
4452 fi
4453 rm -f conftest*
4454
4455 fi
4456
4457 if test $ol_cv_header_stdc = yes; then
4458   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4459 if test "$cross_compiling" = yes; then
4460   :
4461 else
4462   cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465 #include <ctype.h>
4466 #ifndef HAVE_EBCDIC
4467 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4468 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4469 #else
4470 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4471                 || ('j' <= (c) && (c) <= 'r') \
4472                 || ('s' <= (c) && (c) <= 'z'))
4473 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4474 #endif
4475 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4476 int main () { int i; for (i = 0; i < 256; i++)
4477 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4478 exit (0); }
4479
4480 EOF
4481 if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4482 then
4483   :
4484 else
4485   echo "configure: failed program was:" >&5
4486   cat conftest.$ac_ext >&5
4487   rm -fr conftest*
4488   ol_cv_header_stdc=no
4489 fi
4490 rm -fr conftest*
4491 fi
4492
4493 fi
4494 fi
4495
4496 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4497 if test $ol_cv_header_stdc = yes; then
4498   cat >> confdefs.h <<\EOF
4499 #define STDC_HEADERS 1
4500 EOF
4501
4502 fi
4503 ac_cv_header_stdc=disable
4504
4505
4506 if test $ol_cv_header_stdc != yes; then
4507         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4508 fi
4509
4510 ac_header_dirent=no
4511 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4512 do
4513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4514 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4515 echo "configure:4516: checking for $ac_hdr that defines DIR" >&5
4516 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 #include <sys/types.h>
4523 #include <$ac_hdr>
4524 int main() {
4525 DIR *dirp = 0;
4526 ; return 0; }
4527 EOF
4528 if { (eval echo configure:4529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4529   rm -rf conftest*
4530   eval "ac_cv_header_dirent_$ac_safe=yes"
4531 else
4532   echo "configure: failed program was:" >&5
4533   cat conftest.$ac_ext >&5
4534   rm -rf conftest*
4535   eval "ac_cv_header_dirent_$ac_safe=no"
4536 fi
4537 rm -f conftest*
4538 fi
4539 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4540   echo "$ac_t""yes" 1>&6
4541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4542   cat >> confdefs.h <<EOF
4543 #define $ac_tr_hdr 1
4544 EOF
4545  ac_header_dirent=$ac_hdr; break
4546 else
4547   echo "$ac_t""no" 1>&6
4548 fi
4549 done
4550 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4551 if test $ac_header_dirent = dirent.h; then
4552 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4553 echo "configure:4554: checking for opendir in -ldir" >&5
4554 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   ac_save_LIBS="$LIBS"
4559 LIBS="-ldir  $LIBS"
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 /* Override any gcc2 internal prototype to avoid an error.  */
4564 /* We use char because int might match the return type of a gcc2
4565     builtin and then its argument prototype would still apply.  */
4566 char opendir();
4567
4568 int main() {
4569 opendir()
4570 ; return 0; }
4571 EOF
4572 if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4573   rm -rf conftest*
4574   eval "ac_cv_lib_$ac_lib_var=yes"
4575 else
4576   echo "configure: failed program was:" >&5
4577   cat conftest.$ac_ext >&5
4578   rm -rf conftest*
4579   eval "ac_cv_lib_$ac_lib_var=no"
4580 fi
4581 rm -f conftest*
4582 LIBS="$ac_save_LIBS"
4583
4584 fi
4585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4586   echo "$ac_t""yes" 1>&6
4587   LIBS="$LIBS -ldir"
4588 else
4589   echo "$ac_t""no" 1>&6
4590 fi
4591
4592 else
4593 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4594 echo "configure:4595: checking for opendir in -lx" >&5
4595 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   ac_save_LIBS="$LIBS"
4600 LIBS="-lx  $LIBS"
4601 cat > conftest.$ac_ext <<EOF
4602 #line 4603 "configure"
4603 #include "confdefs.h"
4604 /* Override any gcc2 internal prototype to avoid an error.  */
4605 /* We use char because int might match the return type of a gcc2
4606     builtin and then its argument prototype would still apply.  */
4607 char opendir();
4608
4609 int main() {
4610 opendir()
4611 ; return 0; }
4612 EOF
4613 if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4614   rm -rf conftest*
4615   eval "ac_cv_lib_$ac_lib_var=yes"
4616 else
4617   echo "configure: failed program was:" >&5
4618   cat conftest.$ac_ext >&5
4619   rm -rf conftest*
4620   eval "ac_cv_lib_$ac_lib_var=no"
4621 fi
4622 rm -f conftest*
4623 LIBS="$ac_save_LIBS"
4624
4625 fi
4626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4627   echo "$ac_t""yes" 1>&6
4628   LIBS="$LIBS -lx"
4629 else
4630   echo "$ac_t""no" 1>&6
4631 fi
4632
4633 fi
4634
4635 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4636 echo "configure:4637: checking for sys/wait.h that is POSIX.1 compatible" >&5
4637 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4638   echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640   cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 #include <sys/types.h>
4644 #include <sys/wait.h>
4645 #ifndef WEXITSTATUS
4646 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4647 #endif
4648 #ifndef WIFEXITED
4649 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4650 #endif
4651 int main() {
4652 int s;
4653 wait (&s);
4654 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4655 ; return 0; }
4656 EOF
4657 if { (eval echo configure:4658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4658   rm -rf conftest*
4659   ac_cv_header_sys_wait_h=yes
4660 else
4661   echo "configure: failed program was:" >&5
4662   cat conftest.$ac_ext >&5
4663   rm -rf conftest*
4664   ac_cv_header_sys_wait_h=no
4665 fi
4666 rm -f conftest*
4667 fi
4668
4669 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4670 if test $ac_cv_header_sys_wait_h = yes; then
4671   cat >> confdefs.h <<\EOF
4672 #define HAVE_SYS_WAIT_H 1
4673 EOF
4674
4675 fi
4676
4677 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4678 echo "configure:4679: checking POSIX termios" >&5
4679 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 #include <sys/types.h>
4686 #include <unistd.h>
4687 #include <termios.h>
4688 int main() {
4689 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4690    tcgetattr(0, 0);
4691 ; return 0; }
4692 EOF
4693 if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4694   rm -rf conftest*
4695   am_cv_sys_posix_termios=yes
4696 else
4697   echo "configure: failed program was:" >&5
4698   cat conftest.$ac_ext >&5
4699   rm -rf conftest*
4700   am_cv_sys_posix_termios=no
4701 fi
4702 rm -f conftest*
4703 fi
4704
4705 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4706
4707
4708  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4709 echo "configure:4710: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4710 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4711   echo $ac_n "(cached) $ac_c" 1>&6
4712 else
4713   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4714
4715   gwinsz_in_termios_h=no
4716   if test $am_cv_sys_posix_termios = yes; then
4717     cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 #include <sys/types.h>
4721 #     include <termios.h>
4722 #     ifdef TIOCGWINSZ
4723         yes
4724 #     endif
4725     
4726 EOF
4727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4728   egrep "yes" >/dev/null 2>&1; then
4729   rm -rf conftest*
4730   gwinsz_in_termios_h=yes
4731 fi
4732 rm -f conftest*
4733
4734   fi
4735
4736   if test $gwinsz_in_termios_h = no; then
4737     cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 #include <sys/types.h>
4741 #     include <sys/ioctl.h>
4742 #     ifdef TIOCGWINSZ
4743         yes
4744 #     endif
4745     
4746 EOF
4747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4748   egrep "yes" >/dev/null 2>&1; then
4749   rm -rf conftest*
4750   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4751 fi
4752 rm -f conftest*
4753
4754   fi
4755   
4756 fi
4757
4758 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4759   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4760     cat >> confdefs.h <<\EOF
4761 #define GWINSZ_IN_SYS_IOCTL 1
4762 EOF
4763
4764   fi
4765
4766 if test $am_cv_sys_posix_termios = yes ; then
4767         cat >> confdefs.h <<\EOF
4768 #define HAVE_POSIX_TERMIOS 1
4769 EOF
4770
4771 fi
4772
4773 for ac_hdr in \
4774         arpa/inet.h             \
4775         arpa/nameser.h  \
4776         assert.h                \
4777         conio.h                 \
4778         crypt.h                 \
4779         direct.h                \
4780         errno.h                 \
4781         fcntl.h                 \
4782         filio.h                 \
4783         getopt.h                \
4784         grp.h                   \
4785         io.h                    \
4786         libutil.h               \
4787         limits.h                \
4788         locale.h                \
4789         netinet/tcp.h   \
4790         malloc.h                \
4791         memory.h                \
4792         psap.h                  \
4793         pwd.h                   \
4794         process.h               \
4795         resolv.h                \
4796         sgtty.h                 \
4797         shadow.h                \
4798         stddef.h                \
4799         string.h                \
4800         strings.h               \
4801         sysexits.h              \
4802         sys/file.h              \
4803         sys/filio.h             \
4804         sys/errno.h             \
4805         sys/ioctl.h             \
4806         sys/param.h             \
4807         sys/resource.h  \
4808         sys/select.h    \
4809         sys/socket.h    \
4810         sys/syslog.h    \
4811         sys/time.h              \
4812         sys/types.h             \
4813         syslog.h                \
4814         termios.h               \
4815         unistd.h                \
4816         winsock.h               \
4817
4818 do
4819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4821 echo "configure:4822: checking for $ac_hdr" >&5
4822 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4823   echo $ac_n "(cached) $ac_c" 1>&6
4824 else
4825   cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 #include <$ac_hdr>
4829 EOF
4830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4831 { (eval echo configure:4832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4833 if test -z "$ac_err"; then
4834   rm -rf conftest*
4835   eval "ac_cv_header_$ac_safe=yes"
4836 else
4837   echo "$ac_err" >&5
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   eval "ac_cv_header_$ac_safe=no"
4842 fi
4843 rm -f conftest*
4844 fi
4845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4846   echo "$ac_t""yes" 1>&6
4847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4848   cat >> confdefs.h <<EOF
4849 #define $ac_tr_hdr 1
4850 EOF
4851  
4852 else
4853   echo "$ac_t""no" 1>&6
4854 fi
4855 done
4856
4857
4858
4859
4860 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4861 echo "configure:4862: checking for sigset in -lV3" >&5
4862 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4863 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4864   echo $ac_n "(cached) $ac_c" 1>&6
4865 else
4866   ac_save_LIBS="$LIBS"
4867 LIBS="-lV3  $LIBS"
4868 cat > conftest.$ac_ext <<EOF
4869 #line 4870 "configure"
4870 #include "confdefs.h"
4871 /* Override any gcc2 internal prototype to avoid an error.  */
4872 /* We use char because int might match the return type of a gcc2
4873     builtin and then its argument prototype would still apply.  */
4874 char sigset();
4875
4876 int main() {
4877 sigset()
4878 ; return 0; }
4879 EOF
4880 if { (eval echo configure:4881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4881   rm -rf conftest*
4882   eval "ac_cv_lib_$ac_lib_var=yes"
4883 else
4884   echo "configure: failed program was:" >&5
4885   cat conftest.$ac_ext >&5
4886   rm -rf conftest*
4887   eval "ac_cv_lib_$ac_lib_var=no"
4888 fi
4889 rm -f conftest*
4890 LIBS="$ac_save_LIBS"
4891
4892 fi
4893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4894   echo "$ac_t""yes" 1>&6
4895     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4896     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4897   cat >> confdefs.h <<EOF
4898 #define $ac_tr_lib 1
4899 EOF
4900
4901   LIBS="-lV3 $LIBS"
4902
4903 else
4904   echo "$ac_t""no" 1>&6
4905 fi
4906
4907
4908 if test $ac_cv_header_winsock_h = yes; then
4909         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4910 echo "configure:4911: checking for winsock" >&5
4911 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4912   echo $ac_n "(cached) $ac_c" 1>&6
4913 else
4914   cat > conftest.$ac_ext <<EOF
4915 #line 4916 "configure"
4916 #include "confdefs.h"
4917 #include <winsock.h>
4918 int main() {
4919
4920                         socket(0,0,0);
4921                         select(0,NULL,NULL,NULL,NULL);
4922                         closesocket(0);
4923                         gethostname(NULL,0);
4924         
4925 ; return 0; }
4926 EOF
4927 if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4928   rm -rf conftest*
4929   ol_cv_winsock=yes
4930 else
4931   echo "configure: failed program was:" >&5
4932   cat conftest.$ac_ext >&5
4933   rm -rf conftest*
4934   ol_cv_winsock=no
4935 fi
4936 rm -f conftest*]
4937 fi
4938
4939 echo "$ac_t""$ol_cv_winsock" 1>&6
4940
4941         if test $ol_cv_winsock = yes ; then
4942                 cat >> confdefs.h <<\EOF
4943 #define HAVE_WINSOCK 1
4944 EOF
4945
4946                 ac_cv_func_socket=yes
4947                 ac_cv_func_select=yes
4948                 ac_cv_func_closesocket=yes
4949                 ac_cv_func_gethostname=yes
4950         fi
4951 fi
4952
4953
4954 echo $ac_n "checking for socket""... $ac_c" 1>&6
4955 echo "configure:4956: checking for socket" >&5
4956 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   cat > conftest.$ac_ext <<EOF
4960 #line 4961 "configure"
4961 #include "confdefs.h"
4962 /* System header to define __stub macros and hopefully few prototypes,
4963     which can conflict with char socket(); below.  */
4964 #include <assert.h>
4965 /* Override any gcc2 internal prototype to avoid an error.  */
4966 /* We use char because int might match the return type of a gcc2
4967     builtin and then its argument prototype would still apply.  */
4968 char socket();
4969 char (*f)();
4970
4971 int main() {
4972
4973 /* The GNU C library defines this for functions which it implements
4974     to always fail with ENOSYS.  Some functions are actually named
4975     something starting with __ and the normal name is an alias.  */
4976 #if defined (__stub_socket) || defined (__stub___socket)
4977 choke me
4978 #else
4979 f = socket;
4980 #endif
4981
4982 ; return 0; }
4983 EOF
4984 if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985   rm -rf conftest*
4986   eval "ac_cv_func_socket=yes"
4987 else
4988   echo "configure: failed program was:" >&5
4989   cat conftest.$ac_ext >&5
4990   rm -rf conftest*
4991   eval "ac_cv_func_socket=no"
4992 fi
4993 rm -f conftest*
4994 fi
4995
4996 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4997   echo "$ac_t""yes" 1>&6
4998   :
4999 else
5000   echo "$ac_t""no" 1>&6
5001         
5002         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5003 echo "configure:5004: checking for main in -lsocket" >&5
5004 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5006   echo $ac_n "(cached) $ac_c" 1>&6
5007 else
5008   ac_save_LIBS="$LIBS"
5009 LIBS="-lsocket  $LIBS"
5010 cat > conftest.$ac_ext <<EOF
5011 #line 5012 "configure"
5012 #include "confdefs.h"
5013
5014 int main() {
5015 main()
5016 ; return 0; }
5017 EOF
5018 if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5019   rm -rf conftest*
5020   eval "ac_cv_lib_$ac_lib_var=yes"
5021 else
5022   echo "configure: failed program was:" >&5
5023   cat conftest.$ac_ext >&5
5024   rm -rf conftest*
5025   eval "ac_cv_lib_$ac_lib_var=no"
5026 fi
5027 rm -f conftest*
5028 LIBS="$ac_save_LIBS"
5029
5030 fi
5031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5032   echo "$ac_t""yes" 1>&6
5033     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5035   cat >> confdefs.h <<EOF
5036 #define $ac_tr_lib 1
5037 EOF
5038
5039   LIBS="-lsocket $LIBS"
5040
5041 else
5042   echo "$ac_t""no" 1>&6
5043 fi
5044
5045         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5046 echo "configure:5047: checking for main in -lnet" >&5
5047 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5049   echo $ac_n "(cached) $ac_c" 1>&6
5050 else
5051   ac_save_LIBS="$LIBS"
5052 LIBS="-lnet  $LIBS"
5053 cat > conftest.$ac_ext <<EOF
5054 #line 5055 "configure"
5055 #include "confdefs.h"
5056
5057 int main() {
5058 main()
5059 ; return 0; }
5060 EOF
5061 if { (eval echo configure:5062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5062   rm -rf conftest*
5063   eval "ac_cv_lib_$ac_lib_var=yes"
5064 else
5065   echo "configure: failed program was:" >&5
5066   cat conftest.$ac_ext >&5
5067   rm -rf conftest*
5068   eval "ac_cv_lib_$ac_lib_var=no"
5069 fi
5070 rm -f conftest*
5071 LIBS="$ac_save_LIBS"
5072
5073 fi
5074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5075   echo "$ac_t""yes" 1>&6
5076     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5077     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5078   cat >> confdefs.h <<EOF
5079 #define $ac_tr_lib 1
5080 EOF
5081
5082   LIBS="-lnet $LIBS"
5083
5084 else
5085   echo "$ac_t""no" 1>&6
5086 fi
5087
5088         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5089 echo "configure:5090: checking for main in -lnsl_s" >&5
5090 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5091 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5092   echo $ac_n "(cached) $ac_c" 1>&6
5093 else
5094   ac_save_LIBS="$LIBS"
5095 LIBS="-lnsl_s  $LIBS"
5096 cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099
5100 int main() {
5101 main()
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=no"
5112 fi
5113 rm -f conftest*
5114 LIBS="$ac_save_LIBS"
5115
5116 fi
5117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5121   cat >> confdefs.h <<EOF
5122 #define $ac_tr_lib 1
5123 EOF
5124
5125   LIBS="-lnsl_s $LIBS"
5126
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130
5131         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5132 echo "configure:5133: checking for main in -lnsl" >&5
5133 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137   ac_save_LIBS="$LIBS"
5138 LIBS="-lnsl  $LIBS"
5139 cat > conftest.$ac_ext <<EOF
5140 #line 5141 "configure"
5141 #include "confdefs.h"
5142
5143 int main() {
5144 main()
5145 ; return 0; }
5146 EOF
5147 if { (eval echo configure:5148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5148   rm -rf conftest*
5149   eval "ac_cv_lib_$ac_lib_var=yes"
5150 else
5151   echo "configure: failed program was:" >&5
5152   cat conftest.$ac_ext >&5
5153   rm -rf conftest*
5154   eval "ac_cv_lib_$ac_lib_var=no"
5155 fi
5156 rm -f conftest*
5157 LIBS="$ac_save_LIBS"
5158
5159 fi
5160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5161   echo "$ac_t""yes" 1>&6
5162     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5163     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5164   cat >> confdefs.h <<EOF
5165 #define $ac_tr_lib 1
5166 EOF
5167
5168   LIBS="-lnsl $LIBS"
5169
5170 else
5171   echo "$ac_t""no" 1>&6
5172 fi
5173
5174         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5175 echo "configure:5176: checking for socket in -linet" >&5
5176 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5178   echo $ac_n "(cached) $ac_c" 1>&6
5179 else
5180   ac_save_LIBS="$LIBS"
5181 LIBS="-linet  $LIBS"
5182 cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 /* Override any gcc2 internal prototype to avoid an error.  */
5186 /* We use char because int might match the return type of a gcc2
5187     builtin and then its argument prototype would still apply.  */
5188 char socket();
5189
5190 int main() {
5191 socket()
5192 ; return 0; }
5193 EOF
5194 if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5195   rm -rf conftest*
5196   eval "ac_cv_lib_$ac_lib_var=yes"
5197 else
5198   echo "configure: failed program was:" >&5
5199   cat conftest.$ac_ext >&5
5200   rm -rf conftest*
5201   eval "ac_cv_lib_$ac_lib_var=no"
5202 fi
5203 rm -f conftest*
5204 LIBS="$ac_save_LIBS"
5205
5206 fi
5207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5208   echo "$ac_t""yes" 1>&6
5209     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5211   cat >> confdefs.h <<EOF
5212 #define $ac_tr_lib 1
5213 EOF
5214
5215   LIBS="-linet $LIBS"
5216
5217 else
5218   echo "$ac_t""no" 1>&6
5219 fi
5220
5221         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5222 echo "configure:5223: checking for main in -lgen" >&5
5223 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5224 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   ac_save_LIBS="$LIBS"
5228 LIBS="-lgen  $LIBS"
5229 cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232
5233 int main() {
5234 main()
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   eval "ac_cv_lib_$ac_lib_var=yes"
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   rm -rf conftest*
5244   eval "ac_cv_lib_$ac_lib_var=no"
5245 fi
5246 rm -f conftest*
5247 LIBS="$ac_save_LIBS"
5248
5249 fi
5250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5251   echo "$ac_t""yes" 1>&6
5252     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5253     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5254   cat >> confdefs.h <<EOF
5255 #define $ac_tr_lib 1
5256 EOF
5257
5258   LIBS="-lgen $LIBS"
5259
5260 else
5261   echo "$ac_t""no" 1>&6
5262 fi
5263
5264
5265 fi
5266
5267
5268 echo $ac_n "checking for select""... $ac_c" 1>&6
5269 echo "configure:5270: checking for select" >&5
5270 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5271   echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273   cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 /* System header to define __stub macros and hopefully few prototypes,
5277     which can conflict with char select(); below.  */
5278 #include <assert.h>
5279 /* Override any gcc2 internal prototype to avoid an error.  */
5280 /* We use char because int might match the return type of a gcc2
5281     builtin and then its argument prototype would still apply.  */
5282 char select();
5283 char (*f)();
5284
5285 int main() {
5286
5287 /* The GNU C library defines this for functions which it implements
5288     to always fail with ENOSYS.  Some functions are actually named
5289     something starting with __ and the normal name is an alias.  */
5290 #if defined (__stub_select) || defined (__stub___select)
5291 choke me
5292 #else
5293 f = select;
5294 #endif
5295
5296 ; return 0; }
5297 EOF
5298 if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5299   rm -rf conftest*
5300   eval "ac_cv_func_select=yes"
5301 else
5302   echo "configure: failed program was:" >&5
5303   cat conftest.$ac_ext >&5
5304   rm -rf conftest*
5305   eval "ac_cv_func_select=no"
5306 fi
5307 rm -f conftest*
5308 fi
5309
5310 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5311   echo "$ac_t""yes" 1>&6
5312   :
5313 else
5314   echo "$ac_t""no" 1>&6
5315 { echo "configure: error: select() required." 1>&2; exit 1; }
5316 fi
5317
5318
5319 if test "${ac_cv_header_winsock_h}" != yes; then
5320                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5321 echo "configure:5322: checking types of arguments for select()" >&5
5322  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5323   echo $ac_n "(cached) $ac_c" 1>&6
5324 else
5325    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5326   echo $ac_n "(cached) $ac_c" 1>&6
5327 else
5328     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5329   echo $ac_n "(cached) $ac_c" 1>&6
5330 else
5331      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5332      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5333       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5334        cat > conftest.$ac_ext <<EOF
5335 #line 5336 "configure"
5336 #include "confdefs.h"
5337 #ifdef HAVE_SYS_TYPES_H
5338 #include <sys/types.h>
5339 #endif
5340 #ifdef HAVE_SYS_TIME_H
5341 #include <sys/time.h>
5342 #endif
5343 #ifdef HAVE_SYS_SELECT_H
5344 #include <sys/select.h>
5345 #endif
5346 #ifdef HAVE_SYS_SOCKET_H
5347 #include <sys/socket.h>
5348 #endif
5349 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);
5350 int main() {
5351
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5355   rm -rf conftest*
5356           ac_not_found=no ; break 3
5357 else
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   ac_not_found=yes
5362 fi
5363 rm -f conftest*
5364       done
5365      done
5366     done
5367    
5368 fi
5369   
5370 fi
5371  
5372 fi
5373  if test "$ac_not_found" = yes; then
5374   ac_cv_func_select_arg1=int 
5375   ac_cv_func_select_arg234='int *' 
5376   ac_cv_func_select_arg5='struct timeval *'
5377  fi
5378  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5379  cat >> confdefs.h <<EOF
5380 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5381 EOF
5382
5383  cat >> confdefs.h <<EOF
5384 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5385 EOF
5386
5387  cat >> confdefs.h <<EOF
5388 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5389 EOF
5390
5391
5392 fi
5393
5394
5395 for ac_hdr in regex.h 
5396 do
5397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5399 echo "configure:5400: checking for $ac_hdr" >&5
5400 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406 #include <$ac_hdr>
5407 EOF
5408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5409 { (eval echo configure:5410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5411 if test -z "$ac_err"; then
5412   rm -rf conftest*
5413   eval "ac_cv_header_$ac_safe=yes"
5414 else
5415   echo "$ac_err" >&5
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418   rm -rf conftest*
5419   eval "ac_cv_header_$ac_safe=no"
5420 fi
5421 rm -f conftest*
5422 fi
5423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5424   echo "$ac_t""yes" 1>&6
5425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5426   cat >> confdefs.h <<EOF
5427 #define $ac_tr_hdr 1
5428 EOF
5429  
5430 else
5431   echo "$ac_t""no" 1>&6
5432 fi
5433 done
5434
5435 if test "$ac_cv_header_regex_h" != yes ; then
5436         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5437 fi
5438 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5439 echo "configure:5440: checking for regfree" >&5
5440 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5441   echo $ac_n "(cached) $ac_c" 1>&6
5442 else
5443   cat > conftest.$ac_ext <<EOF
5444 #line 5445 "configure"
5445 #include "confdefs.h"
5446 /* System header to define __stub macros and hopefully few prototypes,
5447     which can conflict with char regfree(); below.  */
5448 #include <assert.h>
5449 /* Override any gcc2 internal prototype to avoid an error.  */
5450 /* We use char because int might match the return type of a gcc2
5451     builtin and then its argument prototype would still apply.  */
5452 char regfree();
5453 char (*f)();
5454
5455 int main() {
5456
5457 /* The GNU C library defines this for functions which it implements
5458     to always fail with ENOSYS.  Some functions are actually named
5459     something starting with __ and the normal name is an alias.  */
5460 #if defined (__stub_regfree) || defined (__stub___regfree)
5461 choke me
5462 #else
5463 f = regfree;
5464 #endif
5465
5466 ; return 0; }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5469   rm -rf conftest*
5470   eval "ac_cv_func_regfree=yes"
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -rf conftest*
5475   eval "ac_cv_func_regfree=no"
5476 fi
5477 rm -f conftest*
5478 fi
5479
5480 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5481   echo "$ac_t""yes" 1>&6
5482   :
5483 else
5484   echo "$ac_t""no" 1>&6
5485 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5486 fi
5487
5488
5489
5490 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5491 echo "configure:5492: checking for compatible POSIX regex" >&5
5492 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5493   echo $ac_n "(cached) $ac_c" 1>&6
5494 else
5495   
5496         if test "$cross_compiling" = yes; then
5497   ol_cv_c_posix_regex=cross
5498 else
5499   cat > conftest.$ac_ext <<EOF
5500 #line 5501 "configure"
5501 #include "confdefs.h"
5502
5503 #include <sys/types.h>
5504 #include <regex.h>
5505 static char *pattern, *string;
5506 main()
5507 {
5508         int rc;
5509         regex_t re;
5510
5511         pattern = "^A";
5512
5513         if(regcomp(&re, pattern, 0)) {
5514                 return -1;
5515         }
5516         
5517         string = "ALL MATCH";
5518         
5519         rc = regexec(&re, string, 0, (void*)0, 0);
5520
5521         regfree(&re);
5522
5523         return rc;
5524 }
5525 EOF
5526 if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5527 then
5528   ol_cv_c_posix_regex=yes
5529 else
5530   echo "configure: failed program was:" >&5
5531   cat conftest.$ac_ext >&5
5532   rm -fr conftest*
5533   ol_cv_c_posix_regex=no
5534 fi
5535 rm -fr conftest*
5536 fi
5537
5538 fi
5539
5540 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5541
5542 if test "$ol_cv_c_posix_regex" = no ; then
5543         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5544 fi
5545
5546 ol_link_dnssrv=no
5547 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5548 echo "configure:5549: checking for res_query" >&5
5549 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5550   echo $ac_n "(cached) $ac_c" 1>&6
5551 else
5552   cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555 /* System header to define __stub macros and hopefully few prototypes,
5556     which can conflict with char res_query(); below.  */
5557 #include <assert.h>
5558 /* Override any gcc2 internal prototype to avoid an error.  */
5559 /* We use char because int might match the return type of a gcc2
5560     builtin and then its argument prototype would still apply.  */
5561 char res_query();
5562 char (*f)();
5563
5564 int main() {
5565
5566 /* The GNU C library defines this for functions which it implements
5567     to always fail with ENOSYS.  Some functions are actually named
5568     something starting with __ and the normal name is an alias.  */
5569 #if defined (__stub_res_query) || defined (__stub___res_query)
5570 choke me
5571 #else
5572 f = res_query;
5573 #endif
5574
5575 ; return 0; }
5576 EOF
5577 if { (eval echo configure:5578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5578   rm -rf conftest*
5579   eval "ac_cv_func_res_query=yes"
5580 else
5581   echo "configure: failed program was:" >&5
5582   cat conftest.$ac_ext >&5
5583   rm -rf conftest*
5584   eval "ac_cv_func_res_query=no"
5585 fi
5586 rm -f conftest*
5587 fi
5588
5589 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5590   echo "$ac_t""yes" 1>&6
5591   :
5592 else
5593   echo "$ac_t""no" 1>&6
5594 fi
5595
5596 if test $ac_cv_func_res_query = no ; then 
5597         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5598 echo "configure:5599: checking for res_query in -lbind" >&5
5599 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5600 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5601   echo $ac_n "(cached) $ac_c" 1>&6
5602 else
5603   ac_save_LIBS="$LIBS"
5604 LIBS="-lbind  $LIBS"
5605 cat > conftest.$ac_ext <<EOF
5606 #line 5607 "configure"
5607 #include "confdefs.h"
5608 /* Override any gcc2 internal prototype to avoid an error.  */
5609 /* We use char because int might match the return type of a gcc2
5610     builtin and then its argument prototype would still apply.  */
5611 char res_query();
5612
5613 int main() {
5614 res_query()
5615 ; return 0; }
5616 EOF
5617 if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5618   rm -rf conftest*
5619   eval "ac_cv_lib_$ac_lib_var=yes"
5620 else
5621   echo "configure: failed program was:" >&5
5622   cat conftest.$ac_ext >&5
5623   rm -rf conftest*
5624   eval "ac_cv_lib_$ac_lib_var=no"
5625 fi
5626 rm -f conftest*
5627 LIBS="$ac_save_LIBS"
5628
5629 fi
5630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5631   echo "$ac_t""yes" 1>&6
5632     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5633     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5634   cat >> confdefs.h <<EOF
5635 #define $ac_tr_lib 1
5636 EOF
5637
5638   LIBS="-lbind $LIBS"
5639
5640 else
5641   echo "$ac_t""no" 1>&6
5642 fi
5643
5644         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5645 fi
5646
5647 if test $ac_cv_func_res_query = no ; then 
5648         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5649 echo "configure:5650: checking for __res_query in -lbind" >&5
5650 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5652   echo $ac_n "(cached) $ac_c" 1>&6
5653 else
5654   ac_save_LIBS="$LIBS"
5655 LIBS="-lbind  $LIBS"
5656 cat > conftest.$ac_ext <<EOF
5657 #line 5658 "configure"
5658 #include "confdefs.h"
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 /* We use char because int might match the return type of a gcc2
5661     builtin and then its argument prototype would still apply.  */
5662 char __res_query();
5663
5664 int main() {
5665 __res_query()
5666 ; return 0; }
5667 EOF
5668 if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5669   rm -rf conftest*
5670   eval "ac_cv_lib_$ac_lib_var=yes"
5671 else
5672   echo "configure: failed program was:" >&5
5673   cat conftest.$ac_ext >&5
5674   rm -rf conftest*
5675   eval "ac_cv_lib_$ac_lib_var=no"
5676 fi
5677 rm -f conftest*
5678 LIBS="$ac_save_LIBS"
5679
5680 fi
5681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5682   echo "$ac_t""yes" 1>&6
5683     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5684     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5685   cat >> confdefs.h <<EOF
5686 #define $ac_tr_lib 1
5687 EOF
5688
5689   LIBS="-lbind $LIBS"
5690
5691 else
5692   echo "$ac_t""no" 1>&6
5693 fi
5694
5695         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5696 fi
5697
5698 if test $ac_cv_func_res_query = no ; then 
5699         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5700 echo "configure:5701: checking for res_query in -lresolv" >&5
5701 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5703   echo $ac_n "(cached) $ac_c" 1>&6
5704 else
5705   ac_save_LIBS="$LIBS"
5706 LIBS="-lresolv  $LIBS"
5707 cat > conftest.$ac_ext <<EOF
5708 #line 5709 "configure"
5709 #include "confdefs.h"
5710 /* Override any gcc2 internal prototype to avoid an error.  */
5711 /* We use char because int might match the return type of a gcc2
5712     builtin and then its argument prototype would still apply.  */
5713 char res_query();
5714
5715 int main() {
5716 res_query()
5717 ; return 0; }
5718 EOF
5719 if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5720   rm -rf conftest*
5721   eval "ac_cv_lib_$ac_lib_var=yes"
5722 else
5723   echo "configure: failed program was:" >&5
5724   cat conftest.$ac_ext >&5
5725   rm -rf conftest*
5726   eval "ac_cv_lib_$ac_lib_var=no"
5727 fi
5728 rm -f conftest*
5729 LIBS="$ac_save_LIBS"
5730
5731 fi
5732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5733   echo "$ac_t""yes" 1>&6
5734     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5735     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5736   cat >> confdefs.h <<EOF
5737 #define $ac_tr_lib 1
5738 EOF
5739
5740   LIBS="-lresolv $LIBS"
5741
5742 else
5743   echo "$ac_t""no" 1>&6
5744 fi
5745
5746         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5747 fi
5748
5749 if test "$ac_cv_func_res_query" = yes ; then
5750         cat >> confdefs.h <<\EOF
5751 #define HAVE_RES_QUERY 1
5752 EOF
5753
5754
5755         if test $ol_enable_dnssrv != no ; then
5756                 ol_link_dnssrv=yes
5757         fi
5758 fi
5759
5760 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5761         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5762 fi
5763
5764 ol_link_kbind=no
5765 ol_link_kpasswd=no
5766 ol_link_krb5=no
5767 ol_link_krb4=no
5768
5769 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5770         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5771
5772         for ac_hdr in krb5.h
5773 do
5774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5776 echo "configure:5777: checking for $ac_hdr" >&5
5777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5778   echo $ac_n "(cached) $ac_c" 1>&6
5779 else
5780   cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5783 #include <$ac_hdr>
5784 EOF
5785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5786 { (eval echo configure:5787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5788 if test -z "$ac_err"; then
5789   rm -rf conftest*
5790   eval "ac_cv_header_$ac_safe=yes"
5791 else
5792   echo "$ac_err" >&5
5793   echo "configure: failed program was:" >&5
5794   cat conftest.$ac_ext >&5
5795   rm -rf conftest*
5796   eval "ac_cv_header_$ac_safe=no"
5797 fi
5798 rm -f conftest*
5799 fi
5800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5801   echo "$ac_t""yes" 1>&6
5802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5803   cat >> confdefs.h <<EOF
5804 #define $ac_tr_hdr 1
5805 EOF
5806  
5807 else
5808   echo "$ac_t""no" 1>&6
5809 fi
5810 done
5811
5812
5813         if test $ac_cv_header_krb5_h = yes ; then
5814                                 for ac_hdr in heim_err.h
5815 do
5816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5818 echo "configure:5819: checking for $ac_hdr" >&5
5819 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5820   echo $ac_n "(cached) $ac_c" 1>&6
5821 else
5822   cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825 #include <$ac_hdr>
5826 EOF
5827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5828 { (eval echo configure:5829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5830 if test -z "$ac_err"; then
5831   rm -rf conftest*
5832   eval "ac_cv_header_$ac_safe=yes"
5833 else
5834   echo "$ac_err" >&5
5835   echo "configure: failed program was:" >&5
5836   cat conftest.$ac_ext >&5
5837   rm -rf conftest*
5838   eval "ac_cv_header_$ac_safe=no"
5839 fi
5840 rm -f conftest*
5841 fi
5842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5843   echo "$ac_t""yes" 1>&6
5844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5845   cat >> confdefs.h <<EOF
5846 #define $ac_tr_hdr 1
5847 EOF
5848  
5849 else
5850   echo "$ac_t""no" 1>&6
5851 fi
5852 done
5853
5854                 if test $ac_cv_header_heim_err_h = yes ; then
5855                         krb5_impl=heimdal
5856                 else
5857                         krb5_impl=mit
5858                 fi
5859
5860                 if test $krb5_impl = mit; then
5861                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5862 echo "configure:5863: checking for main in -lkrb5" >&5
5863 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5865   echo $ac_n "(cached) $ac_c" 1>&6
5866 else
5867   ac_save_LIBS="$LIBS"
5868 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5869 cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872
5873 int main() {
5874 main()
5875 ; return 0; }
5876 EOF
5877 if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5878   rm -rf conftest*
5879   eval "ac_cv_lib_$ac_lib_var=yes"
5880 else
5881   echo "configure: failed program was:" >&5
5882   cat conftest.$ac_ext >&5
5883   rm -rf conftest*
5884   eval "ac_cv_lib_$ac_lib_var=no"
5885 fi
5886 rm -f conftest*
5887 LIBS="$ac_save_LIBS"
5888
5889 fi
5890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5891   echo "$ac_t""yes" 1>&6
5892   have_krb5=yes
5893                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5894 else
5895   echo "$ac_t""no" 1>&6
5896 have_krb5=no
5897 fi
5898
5899
5900                 elif test $krb5_impl = heimdal; then
5901                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5902 echo "configure:5903: checking for main in -lkrb5" >&5
5903 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5905   echo $ac_n "(cached) $ac_c" 1>&6
5906 else
5907   ac_save_LIBS="$LIBS"
5908 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5909 cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912
5913 int main() {
5914 main()
5915 ; return 0; }
5916 EOF
5917 if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5918   rm -rf conftest*
5919   eval "ac_cv_lib_$ac_lib_var=yes"
5920 else
5921   echo "configure: failed program was:" >&5
5922   cat conftest.$ac_ext >&5
5923   rm -rf conftest*
5924   eval "ac_cv_lib_$ac_lib_var=no"
5925 fi
5926 rm -f conftest*
5927 LIBS="$ac_save_LIBS"
5928
5929 fi
5930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5931   echo "$ac_t""yes" 1>&6
5932   have_krb5=yes
5933                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5934 else
5935   echo "$ac_t""no" 1>&6
5936 have_krb5=no
5937 fi
5938
5939
5940                         cat >> confdefs.h <<\EOF
5941 #define HAVE_HEIMDAL_KERBEROS 1
5942 EOF
5943
5944                 else
5945                         have_krb5=no
5946                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5947                 fi
5948
5949                 if test $have_krb5 = yes ; then
5950                         ol_link_krb5=yes
5951
5952                         cat >> confdefs.h <<\EOF
5953 #define HAVE_KRB5 1
5954 EOF
5955
5956
5957                         if test $ol_enable_kpasswd != no ; then
5958                                 ol_link_kpasswd=yes;
5959                         fi
5960
5961                         if test $ol_with_kerberos = k5only ; then
5962                                 ol_with_kerberos=found
5963                         fi
5964
5965                 elif test $ol_with_kerberos != auto ; then
5966                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5967                 fi
5968
5969         fi
5970 fi
5971
5972 if test $ol_link_krb5 = yes -a \
5973         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5974
5975         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5976 do
5977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5979 echo "configure:5980: checking for $ac_hdr" >&5
5980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5981   echo $ac_n "(cached) $ac_c" 1>&6
5982 else
5983   cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986 #include <$ac_hdr>
5987 EOF
5988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5989 { (eval echo configure:5990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5991 if test -z "$ac_err"; then
5992   rm -rf conftest*
5993   eval "ac_cv_header_$ac_safe=yes"
5994 else
5995   echo "$ac_err" >&5
5996   echo "configure: failed program was:" >&5
5997   cat conftest.$ac_ext >&5
5998   rm -rf conftest*
5999   eval "ac_cv_header_$ac_safe=no"
6000 fi
6001 rm -f conftest*
6002 fi
6003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6004   echo "$ac_t""yes" 1>&6
6005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6006   cat >> confdefs.h <<EOF
6007 #define $ac_tr_hdr 1
6008 EOF
6009  
6010 else
6011   echo "$ac_t""no" 1>&6
6012 fi
6013 done
6014
6015
6016         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6017                 if test $krb5_impl = mit; then
6018                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6019 echo "configure:6020: checking for main in -lkrb4" >&5
6020 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6022   echo $ac_n "(cached) $ac_c" 1>&6
6023 else
6024   ac_save_LIBS="$LIBS"
6025 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6026 cat > conftest.$ac_ext <<EOF
6027 #line 6028 "configure"
6028 #include "confdefs.h"
6029
6030 int main() {
6031 main()
6032 ; return 0; }
6033 EOF
6034 if { (eval echo configure:6035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6035   rm -rf conftest*
6036   eval "ac_cv_lib_$ac_lib_var=yes"
6037 else
6038   echo "configure: failed program was:" >&5
6039   cat conftest.$ac_ext >&5
6040   rm -rf conftest*
6041   eval "ac_cv_lib_$ac_lib_var=no"
6042 fi
6043 rm -f conftest*
6044 LIBS="$ac_save_LIBS"
6045
6046 fi
6047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6048   echo "$ac_t""yes" 1>&6
6049   have_k425=yes
6050                                 KRB4_LIBS="-lkrb4 -ldes425"
6051 else
6052   echo "$ac_t""no" 1>&6
6053 have_k425=no
6054 fi
6055
6056
6057                 elif test $krb5_impl = heimdal; then
6058                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6059 echo "configure:6060: checking for main in -lkrb4" >&5
6060 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6062   echo $ac_n "(cached) $ac_c" 1>&6
6063 else
6064   ac_save_LIBS="$LIBS"
6065 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6066 cat > conftest.$ac_ext <<EOF
6067 #line 6068 "configure"
6068 #include "confdefs.h"
6069
6070 int main() {
6071 main()
6072 ; return 0; }
6073 EOF
6074 if { (eval echo configure:6075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6075   rm -rf conftest*
6076   eval "ac_cv_lib_$ac_lib_var=yes"
6077 else
6078   echo "configure: failed program was:" >&5
6079   cat conftest.$ac_ext >&5
6080   rm -rf conftest*
6081   eval "ac_cv_lib_$ac_lib_var=no"
6082 fi
6083 rm -f conftest*
6084 LIBS="$ac_save_LIBS"
6085
6086 fi
6087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6088   echo "$ac_t""yes" 1>&6
6089   have_k425=yes
6090                                 KRB4_LIBS="-lkrb4"
6091 else
6092   echo "$ac_t""no" 1>&6
6093 have_k425=no
6094 fi
6095
6096
6097                 else
6098                         have_425=no
6099                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6100                 fi
6101
6102                 if test $have_k425 = yes ; then
6103                         ol_with_kerberos=found
6104                         ol_link_krb4=yes
6105
6106                         cat >> confdefs.h <<\EOF
6107 #define HAVE_KRB425 1
6108 EOF
6109
6110                         cat >> confdefs.h <<\EOF
6111 #define HAVE_KRB4 1
6112 EOF
6113
6114
6115                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6116 echo "configure:6117: checking for des_debug in Kerberos libraries" >&5
6117 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6118   echo $ac_n "(cached) $ac_c" 1>&6
6119 else
6120   
6121                                                                 save_LIBS="$LIBS"
6122                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6123                                 cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126
6127 #include <kerberosIV/krb.h>
6128 #include <kerberosIV/des.h>
6129 extern int des_debug;
6130
6131 int main() {
6132
6133 des_debug = 1;
6134
6135 ; return 0; }
6136 EOF
6137 if { (eval echo configure:6138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6138   rm -rf conftest*
6139   ol_cv_var_des_debug=yes
6140 else
6141   echo "configure: failed program was:" >&5
6142   cat conftest.$ac_ext >&5
6143   rm -rf conftest*
6144   ol_cv_var_des_debug=no
6145 fi
6146 rm -f conftest*
6147                                                                 LIBS="$save_LIBS"
6148                         
6149 fi
6150
6151 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6152
6153                         if test $ol_cv_var_des_debug = yes ; then
6154                                 cat >> confdefs.h <<\EOF
6155 #define HAVE_DES_DEBUG 1
6156 EOF
6157
6158                         fi
6159
6160                         LIBS="$save_LIBS"
6161                 fi
6162         fi
6163 fi
6164
6165 if test $ol_link_krb5 = yes ; then
6166         ol_with_kerberos=found
6167 fi
6168
6169 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6170         -o $ol_with_kerberos = kth ; then
6171
6172         for ac_hdr in krb.h des.h krb-archaeology.h 
6173 do
6174 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6175 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6176 echo "configure:6177: checking for $ac_hdr" >&5
6177 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6178   echo $ac_n "(cached) $ac_c" 1>&6
6179 else
6180   cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183 #include <$ac_hdr>
6184 EOF
6185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6186 { (eval echo configure:6187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6187 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6188 if test -z "$ac_err"; then
6189   rm -rf conftest*
6190   eval "ac_cv_header_$ac_safe=yes"
6191 else
6192   echo "$ac_err" >&5
6193   echo "configure: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   rm -rf conftest*
6196   eval "ac_cv_header_$ac_safe=no"
6197 fi
6198 rm -f conftest*
6199 fi
6200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6201   echo "$ac_t""yes" 1>&6
6202     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6203   cat >> confdefs.h <<EOF
6204 #define $ac_tr_hdr 1
6205 EOF
6206  
6207 else
6208   echo "$ac_t""no" 1>&6
6209 fi
6210 done
6211
6212
6213         if test $ac_cv_header_krb_h = yes ; then
6214                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6215 echo "configure:6216: checking for main in -lkrb" >&5
6216 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6217 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6218   echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220   ac_save_LIBS="$LIBS"
6221 LIBS="-lkrb -ldes $LIBS"
6222 cat > conftest.$ac_ext <<EOF
6223 #line 6224 "configure"
6224 #include "confdefs.h"
6225
6226 int main() {
6227 main()
6228 ; return 0; }
6229 EOF
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6231   rm -rf conftest*
6232   eval "ac_cv_lib_$ac_lib_var=yes"
6233 else
6234   echo "configure: failed program was:" >&5
6235   cat conftest.$ac_ext >&5
6236   rm -rf conftest*
6237   eval "ac_cv_lib_$ac_lib_var=no"
6238 fi
6239 rm -f conftest*
6240 LIBS="$ac_save_LIBS"
6241
6242 fi
6243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6244   echo "$ac_t""yes" 1>&6
6245   have_k4=yes
6246 else
6247   echo "$ac_t""no" 1>&6
6248 have_k4=no
6249 fi
6250
6251
6252                 if test $have_k4 = yes ; then
6253                         ol_with_kerberos=found
6254                         ol_link_krb4=yes
6255
6256                         cat >> confdefs.h <<\EOF
6257 #define HAVE_KRB4 1
6258 EOF
6259
6260
6261                         KRB4_LIBS="-lkrb -ldes"
6262
6263                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6264                                 cat >> confdefs.h <<\EOF
6265 #define HAVE_KTH_KERBEROS 1
6266 EOF
6267
6268                         fi
6269                 fi
6270         fi
6271 fi
6272
6273 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6274         ol_link_kpasswd=yes;
6275 fi
6276
6277 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6278         cat >> confdefs.h <<\EOF
6279 #define HAVE_KERBEROS 1
6280 EOF
6281
6282
6283 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6284         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6285 fi
6286
6287 ol_link_tls=no
6288 if test $ol_with_tls != no ; then
6289         
6290         for ac_hdr in openssl/ssl.h ssl.h
6291 do
6292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6294 echo "configure:6295: checking for $ac_hdr" >&5
6295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6296   echo $ac_n "(cached) $ac_c" 1>&6
6297 else
6298   cat > conftest.$ac_ext <<EOF
6299 #line 6300 "configure"
6300 #include "confdefs.h"
6301 #include <$ac_hdr>
6302 EOF
6303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6304 { (eval echo configure:6305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6306 if test -z "$ac_err"; then
6307   rm -rf conftest*
6308   eval "ac_cv_header_$ac_safe=yes"
6309 else
6310   echo "$ac_err" >&5
6311   echo "configure: failed program was:" >&5
6312   cat conftest.$ac_ext >&5
6313   rm -rf conftest*
6314   eval "ac_cv_header_$ac_safe=no"
6315 fi
6316 rm -f conftest*
6317 fi
6318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6319   echo "$ac_t""yes" 1>&6
6320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6321   cat >> confdefs.h <<EOF
6322 #define $ac_tr_hdr 1
6323 EOF
6324  
6325 else
6326   echo "$ac_t""no" 1>&6
6327 fi
6328 done
6329
6330         
6331         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6332                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6333 echo "configure:6334: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6334 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6336   echo $ac_n "(cached) $ac_c" 1>&6
6337 else
6338   ac_save_LIBS="$LIBS"
6339 LIBS="-lssl -lcrypto $LIBS"
6340 cat > conftest.$ac_ext <<EOF
6341 #line 6342 "configure"
6342 #include "confdefs.h"
6343 /* Override any gcc2 internal prototype to avoid an error.  */
6344 /* We use char because int might match the return type of a gcc2
6345     builtin and then its argument prototype would still apply.  */
6346 char SSLeay_add_ssl_algorithms();
6347
6348 int main() {
6349 SSLeay_add_ssl_algorithms()
6350 ; return 0; }
6351 EOF
6352 if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6353   rm -rf conftest*
6354   eval "ac_cv_lib_$ac_lib_var=yes"
6355 else
6356   echo "configure: failed program was:" >&5
6357   cat conftest.$ac_ext >&5
6358   rm -rf conftest*
6359   eval "ac_cv_lib_$ac_lib_var=no"
6360 fi
6361 rm -f conftest*
6362 LIBS="$ac_save_LIBS"
6363
6364 fi
6365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6366   echo "$ac_t""yes" 1>&6
6367   have_ssleay=yes
6368                         need_rsaref=no
6369 else
6370   echo "$ac_t""no" 1>&6
6371 have_ssleay=no
6372 fi
6373
6374                         
6375                 if test $have_ssleay = no ; then
6376                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6377 echo "configure:6378: checking for SSL_library_init in -lssl" >&5
6378 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6379 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6380   echo $ac_n "(cached) $ac_c" 1>&6
6381 else
6382   ac_save_LIBS="$LIBS"
6383 LIBS="-lssl -lcrypto $LIBS"
6384 cat > conftest.$ac_ext <<EOF
6385 #line 6386 "configure"
6386 #include "confdefs.h"
6387 /* Override any gcc2 internal prototype to avoid an error.  */
6388 /* We use char because int might match the return type of a gcc2
6389     builtin and then its argument prototype would still apply.  */
6390 char SSL_library_init();
6391
6392 int main() {
6393 SSL_library_init()
6394 ; return 0; }
6395 EOF
6396 if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6397   rm -rf conftest*
6398   eval "ac_cv_lib_$ac_lib_var=yes"
6399 else
6400   echo "configure: failed program was:" >&5
6401   cat conftest.$ac_ext >&5
6402   rm -rf conftest*
6403   eval "ac_cv_lib_$ac_lib_var=no"
6404 fi
6405 rm -f conftest*
6406 LIBS="$ac_save_LIBS"
6407
6408 fi
6409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6410   echo "$ac_t""yes" 1>&6
6411   have_ssleay=yes
6412                                 need_rsaref=no
6413 else
6414   echo "$ac_t""no" 1>&6
6415 have_ssleay=no
6416 fi
6417
6418                 fi
6419
6420                 if test $have_ssleay = no ; then
6421                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6422 echo "configure:6423: checking for ssl3_accept in -lssl" >&5
6423 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6424 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6425   echo $ac_n "(cached) $ac_c" 1>&6
6426 else
6427   ac_save_LIBS="$LIBS"
6428 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6429 cat > conftest.$ac_ext <<EOF
6430 #line 6431 "configure"
6431 #include "confdefs.h"
6432 /* Override any gcc2 internal prototype to avoid an error.  */
6433 /* We use char because int might match the return type of a gcc2
6434     builtin and then its argument prototype would still apply.  */
6435 char ssl3_accept();
6436
6437 int main() {
6438 ssl3_accept()
6439 ; return 0; }
6440 EOF
6441 if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6442   rm -rf conftest*
6443   eval "ac_cv_lib_$ac_lib_var=yes"
6444 else
6445   echo "configure: failed program was:" >&5
6446   cat conftest.$ac_ext >&5
6447   rm -rf conftest*
6448   eval "ac_cv_lib_$ac_lib_var=no"
6449 fi
6450 rm -f conftest*
6451 LIBS="$ac_save_LIBS"
6452
6453 fi
6454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6455   echo "$ac_t""yes" 1>&6
6456   have_ssleay=yes
6457                                 need_rsaref=yes
6458 else
6459   echo "$ac_t""no" 1>&6
6460 have_ssleay=no
6461 fi
6462
6463                 fi
6464
6465                 if test $have_ssleay = yes ; then
6466                         ol_with_tls=found
6467                         ol_link_tls=yes
6468
6469                         cat >> confdefs.h <<\EOF
6470 #define HAVE_SSLEAY 1
6471 EOF
6472
6473
6474                         if test $need_rsaref = yes; then
6475                                 cat >> confdefs.h <<\EOF
6476 #define HAVE_RSAREF 1
6477 EOF
6478
6479
6480                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6481                         else
6482                                 TLS_LIBS="-lssl -lcrypto"
6483                         fi
6484                 fi
6485         fi
6486 fi
6487
6488 if test $ol_link_tls = yes ; then
6489         cat >> confdefs.h <<\EOF
6490 #define HAVE_TLS 1
6491 EOF
6492
6493 fi      
6494
6495 for ac_func in \
6496         ctime_r                 \
6497         gethostbyname_r gethostbyaddr_r \
6498
6499 do
6500 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6501 echo "configure:6502: checking for $ac_func" >&5
6502 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6503   echo $ac_n "(cached) $ac_c" 1>&6
6504 else
6505   cat > conftest.$ac_ext <<EOF
6506 #line 6507 "configure"
6507 #include "confdefs.h"
6508 /* System header to define __stub macros and hopefully few prototypes,
6509     which can conflict with char $ac_func(); below.  */
6510 #include <assert.h>
6511 /* Override any gcc2 internal prototype to avoid an error.  */
6512 /* We use char because int might match the return type of a gcc2
6513     builtin and then its argument prototype would still apply.  */
6514 char $ac_func();
6515 char (*f)();
6516
6517 int main() {
6518
6519 /* The GNU C library defines this for functions which it implements
6520     to always fail with ENOSYS.  Some functions are actually named
6521     something starting with __ and the normal name is an alias.  */
6522 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6523 choke me
6524 #else
6525 f = $ac_func;
6526 #endif
6527
6528 ; return 0; }
6529 EOF
6530 if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6531   rm -rf conftest*
6532   eval "ac_cv_func_$ac_func=yes"
6533 else
6534   echo "configure: failed program was:" >&5
6535   cat conftest.$ac_ext >&5
6536   rm -rf conftest*
6537   eval "ac_cv_func_$ac_func=no"
6538 fi
6539 rm -f conftest*
6540 fi
6541
6542 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6543   echo "$ac_t""yes" 1>&6
6544     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6545   cat >> confdefs.h <<EOF
6546 #define $ac_tr_func 1
6547 EOF
6548  
6549 else
6550   echo "$ac_t""no" 1>&6
6551 fi
6552 done
6553
6554
6555 if test "$ac_cv_func_ctime_r" = no ; then
6556         ol_cv_func_ctime_r_nargs=0
6557 else
6558         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6559 echo "configure:6560: checking number of arguments of ctime_r" >&5
6560 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6561   echo $ac_n "(cached) $ac_c" 1>&6
6562 else
6563   cat > conftest.$ac_ext <<EOF
6564 #line 6565 "configure"
6565 #include "confdefs.h"
6566 #include <time.h>
6567 int main() {
6568 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6569 ; return 0; }
6570 EOF
6571 if { (eval echo configure:6572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6572   rm -rf conftest*
6573   ol_cv_func_ctime_r_nargs3=yes
6574 else
6575   echo "configure: failed program was:" >&5
6576   cat conftest.$ac_ext >&5
6577   rm -rf conftest*
6578   ol_cv_func_ctime_r_nargs3=no
6579 fi
6580 rm -f conftest*
6581
6582         cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 #include <time.h>
6586 int main() {
6587 time_t ti; char *buffer; ctime_r(&ti,buffer);
6588 ; return 0; }
6589 EOF
6590 if { (eval echo configure:6591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6591   rm -rf conftest*
6592   ol_cv_func_ctime_r_nargs2=yes
6593 else
6594   echo "configure: failed program was:" >&5
6595   cat conftest.$ac_ext >&5
6596   rm -rf conftest*
6597   ol_cv_func_ctime_r_nargs2=no
6598 fi
6599 rm -f conftest*
6600
6601         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6602                 $ol_cv_func_ctime_r_nargs2 = no ; then
6603
6604                 ol_cv_func_ctime_r_nargs=3
6605
6606         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6607                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6608
6609                 ol_cv_func_ctime_r_nargs=2
6610
6611         else
6612                 ol_cv_func_ctime_r_nargs=0
6613         fi
6614   
6615 fi
6616
6617 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6618
6619   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6620         cat >> confdefs.h <<EOF
6621 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6622 EOF
6623
6624   fi
6625
6626 fi
6627
6628 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6629         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6630 echo "configure:6631: checking number of arguments of gethostbyname_r" >&5
6631 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6632   echo $ac_n "(cached) $ac_c" 1>&6
6633 else
6634   cat > conftest.$ac_ext <<EOF
6635 #line 6636 "configure"
6636 #include "confdefs.h"
6637 #include <sys/types.h>
6638 #include <sys/socket.h>
6639 #include <netinet/in.h>
6640 #include <netdb.h>
6641 #define BUFSIZE (sizeof(struct hostent)+10)
6642 int main() {
6643 struct hostent hent; char buffer[BUFSIZE];
6644                 int bufsize=BUFSIZE;int h_errno;
6645                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6646                         buffer, bufsize, &h_errno);
6647 ; return 0; }
6648 EOF
6649 if { (eval echo configure:6650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6650   rm -rf conftest*
6651   ol_cv_func_gethostbyname_r_nargs5=yes
6652 else
6653   echo "configure: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   rm -rf conftest*
6656   ol_cv_func_gethostbyname_r_nargs5=no
6657 fi
6658 rm -f conftest*
6659
6660         cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 #include <sys/types.h>
6664 #include <sys/socket.h>
6665 #include <netinet/in.h>
6666 #include <netdb.h>
6667 #define BUFSIZE (sizeof(struct hostent)+10)
6668 int main() {
6669 struct hostent hent;struct hostent *rhent;
6670                 char buffer[BUFSIZE];
6671                 int bufsize=BUFSIZE;int h_errno;
6672                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6673                         &rhent, &h_errno);
6674 ; return 0; }
6675 EOF
6676 if { (eval echo configure:6677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6677   rm -rf conftest*
6678   ol_cv_func_gethostbyname_r_nargs6=yes
6679 else
6680   echo "configure: failed program was:" >&5
6681   cat conftest.$ac_ext >&5
6682   rm -rf conftest*
6683   ol_cv_func_gethostbyname_r_nargs6=no
6684 fi
6685 rm -f conftest*
6686
6687         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6688                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6689
6690                 ol_cv_func_gethostbyname_r_nargs=5
6691
6692         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6693                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6694
6695                 ol_cv_func_gethostbyname_r_nargs=6
6696
6697         else
6698                 ol_cv_func_gethostbyname_r_nargs=0
6699         fi
6700   
6701 fi
6702
6703 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6704   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6705         cat >> confdefs.h <<EOF
6706 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6707 EOF
6708
6709   fi
6710
6711 else
6712         ol_cv_func_gethostbyname_r_nargs=0
6713 fi
6714  
6715 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6716         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6717 echo "configure:6718: checking number of arguments of gethostbyaddr_r" >&5
6718 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   cat > conftest.$ac_ext <<EOF
6722 #line 6723 "configure"
6723 #include "confdefs.h"
6724 #include <sys/types.h>
6725 #include <sys/socket.h>
6726 #include <netinet/in.h>
6727 #include <netdb.h>
6728 #define BUFSIZE (sizeof(struct hostent)+10)
6729 int main() {
6730 struct hostent hent; char buffer[BUFSIZE]; 
6731             struct in_addr add;
6732             size_t alen=sizeof(struct in_addr);
6733             int bufsize=BUFSIZE;int h_errno;
6734                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6735                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6736 ; return 0; }
6737 EOF
6738 if { (eval echo configure:6739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6739   rm -rf conftest*
6740   ol_cv_func_gethostbyaddr_r_nargs7=yes
6741 else
6742   echo "configure: failed program was:" >&5
6743   cat conftest.$ac_ext >&5
6744   rm -rf conftest*
6745   ol_cv_func_gethostbyaddr_r_nargs7=no
6746 fi
6747 rm -f conftest*
6748
6749         cat > conftest.$ac_ext <<EOF
6750 #line 6751 "configure"
6751 #include "confdefs.h"
6752 #include <sys/types.h>
6753 #include <sys/socket.h>
6754 #include <netinet/in.h>
6755 #include <netdb.h>
6756 #define BUFSIZE (sizeof(struct hostent)+10)
6757 int main() {
6758 struct hostent hent;
6759                 struct hostent *rhent; char buffer[BUFSIZE]; 
6760                 struct in_addr add;
6761                 size_t alen=sizeof(struct in_addr);
6762                 int bufsize=BUFSIZE;int h_errno;
6763                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6764                         alen, AF_INET, &hent, buffer, bufsize, 
6765                         &rhent, &h_errno);
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6769   rm -rf conftest*
6770   ol_cv_func_gethostbyaddr_r_nargs8=yes
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   ol_cv_func_gethostbyaddr_r_nargs8=no
6776 fi
6777 rm -f conftest*
6778
6779         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6780                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6781
6782                 ol_cv_func_gethostbyaddr_r_nargs=7
6783
6784         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6785                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6786
6787                 ol_cv_func_gethostbyaddr_r_nargs=8
6788
6789         else
6790                 ol_cv_func_gethostbyaddr_r_nargs=0
6791         fi
6792   
6793 fi
6794
6795 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6796   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6797     cat >> confdefs.h <<EOF
6798 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6799 EOF
6800
6801   fi
6802
6803 else
6804         ol_cv_func_gethostbyaddr_r_nargs=0
6805 fi
6806
6807 if test "$ac_cv_func_ctime_r" = yes \
6808         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6809         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6810         -a "$ac_cv_func_gethostbyname_r" = yes \
6811         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6812         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6813         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6814         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6815         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6816         ; then
6817  
6818         cat >> confdefs.h <<\EOF
6819 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6820 EOF
6821
6822 fi
6823
6824 ol_link_threads=no
6825
6826 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6827         -o $ol_with_threads = nt ; then
6828
6829         
6830         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6831 echo "configure:6832: checking for NT Threads" >&5
6832 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6833   echo $ac_n "(cached) $ac_c" 1>&6
6834 else
6835   
6836                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6837 echo "configure:6838: checking for _beginthread" >&5
6838 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6839   echo $ac_n "(cached) $ac_c" 1>&6
6840 else
6841   cat > conftest.$ac_ext <<EOF
6842 #line 6843 "configure"
6843 #include "confdefs.h"
6844 /* System header to define __stub macros and hopefully few prototypes,
6845     which can conflict with char _beginthread(); below.  */
6846 #include <assert.h>
6847 /* Override any gcc2 internal prototype to avoid an error.  */
6848 /* We use char because int might match the return type of a gcc2
6849     builtin and then its argument prototype would still apply.  */
6850 char _beginthread();
6851 char (*f)();
6852
6853 int main() {
6854
6855 /* The GNU C library defines this for functions which it implements
6856     to always fail with ENOSYS.  Some functions are actually named
6857     something starting with __ and the normal name is an alias.  */
6858 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6859 choke me
6860 #else
6861 f = _beginthread;
6862 #endif
6863
6864 ; return 0; }
6865 EOF
6866 if { (eval echo configure:6867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6867   rm -rf conftest*
6868   eval "ac_cv_func__beginthread=yes"
6869 else
6870   echo "configure: failed program was:" >&5
6871   cat conftest.$ac_ext >&5
6872   rm -rf conftest*
6873   eval "ac_cv_func__beginthread=no"
6874 fi
6875 rm -f conftest*
6876 fi
6877
6878 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6879   echo "$ac_t""yes" 1>&6
6880   ol_cv_nt_threads=yes
6881 else
6882   echo "$ac_t""no" 1>&6
6883 ol_cv_nt_threads=no
6884 fi
6885
6886         
6887 fi
6888
6889 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6890
6891         if test $ol_cv_nt_threads = yes ; then
6892                 cat >> confdefs.h <<\EOF
6893 #define HAVE_NT_THREADS 1
6894 EOF
6895
6896         fi
6897
6898
6899         if test "$ol_cv_nt_threads" = yes ; then
6900         ol_link_threads=nt
6901         ol_with_threads=found
6902         ol_with_yielding_select=yes
6903
6904                 cat >> confdefs.h <<\EOF
6905 #define HAVE_NT_SERVICE_MANAGER 1
6906 EOF
6907
6908                 cat >> confdefs.h <<\EOF
6909 #define HAVE_NT_EVENT_LOG 1
6910 EOF
6911
6912         fi
6913
6914         if test $ol_with_threads = nt ; then
6915                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6916         fi
6917 fi
6918
6919 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6920         -o $ol_with_threads = posix ; then
6921
6922         for ac_hdr in pthread.h
6923 do
6924 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6925 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6926 echo "configure:6927: checking for $ac_hdr" >&5
6927 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6928   echo $ac_n "(cached) $ac_c" 1>&6
6929 else
6930   cat > conftest.$ac_ext <<EOF
6931 #line 6932 "configure"
6932 #include "confdefs.h"
6933 #include <$ac_hdr>
6934 EOF
6935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6936 { (eval echo configure:6937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6938 if test -z "$ac_err"; then
6939   rm -rf conftest*
6940   eval "ac_cv_header_$ac_safe=yes"
6941 else
6942   echo "$ac_err" >&5
6943   echo "configure: failed program was:" >&5
6944   cat conftest.$ac_ext >&5
6945   rm -rf conftest*
6946   eval "ac_cv_header_$ac_safe=no"
6947 fi
6948 rm -f conftest*
6949 fi
6950 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6951   echo "$ac_t""yes" 1>&6
6952     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6953   cat >> confdefs.h <<EOF
6954 #define $ac_tr_hdr 1
6955 EOF
6956  
6957 else
6958   echo "$ac_t""no" 1>&6
6959 fi
6960 done
6961
6962
6963         if test $ac_cv_header_pthread_h = yes ; then
6964                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6965 echo "configure:6966: checking POSIX thread version" >&5
6966 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6967   echo $ac_n "(cached) $ac_c" 1>&6
6968 else
6969   
6970         cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973
6974 #               include <pthread.h>
6975                 /* this check could be improved */
6976 #               ifdef PTHREAD_ONCE_INIT
6977                         pthread_version_final;
6978 #               endif
6979         
6980 EOF
6981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6982   egrep "pthread_version_final" >/dev/null 2>&1; then
6983   rm -rf conftest*
6984   ol_pthread_final=yes
6985 else
6986   rm -rf conftest*
6987   ol_pthread_final=no
6988 fi
6989 rm -f conftest*
6990
6991
6992         cat > conftest.$ac_ext <<EOF
6993 #line 6994 "configure"
6994 #include "confdefs.h"
6995
6996 #               include <pthread.h>
6997                 /* this check could be improved */
6998 #               ifdef pthread_once_init
6999                         pthread_version_draft4;
7000 #               endif
7001         
7002 EOF
7003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7004   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7005   rm -rf conftest*
7006   ol_pthread_draft4=yes
7007 else
7008   rm -rf conftest*
7009   ol_pthread_draft4=no
7010 fi
7011 rm -f conftest*
7012
7013
7014         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7015                 ol_cv_pthread_version=final
7016         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7017                 ol_cv_pthread_version=draft4
7018         else
7019                 ol_cv_pthread_version=unknown
7020         fi
7021
7022 fi
7023
7024 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7025
7026
7027                 if test $ol_cv_pthread_version = final ; then
7028                         cat >> confdefs.h <<\EOF
7029 #define HAVE_PTHREADS_FINAL 1
7030 EOF
7031
7032                 elif test $ol_cv_pthread_version = draft4 ; then
7033                         cat >> confdefs.h <<\EOF
7034 #define HAVE_PTHREADS_D4 1
7035 EOF
7036
7037                 else
7038                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7039                 fi
7040
7041                 # consider threads found
7042                 ol_with_threads=found
7043
7044                 
7045         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7046 echo "configure:7047: checking for LinuxThreads pthread.h" >&5
7047 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7048   echo $ac_n "(cached) $ac_c" 1>&6
7049 else
7050   cat > conftest.$ac_ext <<EOF
7051 #line 7052 "configure"
7052 #include "confdefs.h"
7053 #include <pthread.h>
7054 EOF
7055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7056   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7057   rm -rf conftest*
7058   ol_cv_header_linux_threads=yes
7059 else
7060   rm -rf conftest*
7061   ol_cv_header_linux_threads=no
7062 fi
7063 rm -f conftest*
7064
7065                 
7066 fi
7067
7068 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7069         if test $ol_cv_header_linux_threads = yes; then
7070                 cat >> confdefs.h <<\EOF
7071 #define HAVE_LINUX_THREADS 1
7072 EOF
7073
7074         fi
7075
7076                 
7077         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7078 echo "configure:7079: checking for GNU Pth pthread.h" >&5
7079 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7080   echo $ac_n "(cached) $ac_c" 1>&6
7081 else
7082   cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085 #include <pthread.h>
7086 #ifdef _POSIX_THREAD_IS_GNU_PTH
7087         __gnu_pth__;
7088 #endif
7089
7090 EOF
7091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7092   egrep "__gnu_pth__" >/dev/null 2>&1; then
7093   rm -rf conftest*
7094   ol_cv_header_gnu_pth_pthread_h=yes
7095 else
7096   rm -rf conftest*
7097   ol_cv_header_gnu_pth_pthread_h=no
7098 fi
7099 rm -f conftest*
7100
7101                 
7102 fi
7103
7104 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7105
7106
7107                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7108                         for ac_hdr in sched.h
7109 do
7110 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7111 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7112 echo "configure:7113: checking for $ac_hdr" >&5
7113 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7114   echo $ac_n "(cached) $ac_c" 1>&6
7115 else
7116   cat > conftest.$ac_ext <<EOF
7117 #line 7118 "configure"
7118 #include "confdefs.h"
7119 #include <$ac_hdr>
7120 EOF
7121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7122 { (eval echo configure:7123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7124 if test -z "$ac_err"; then
7125   rm -rf conftest*
7126   eval "ac_cv_header_$ac_safe=yes"
7127 else
7128   echo "$ac_err" >&5
7129   echo "configure: failed program was:" >&5
7130   cat conftest.$ac_ext >&5
7131   rm -rf conftest*
7132   eval "ac_cv_header_$ac_safe=no"
7133 fi
7134 rm -f conftest*
7135 fi
7136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7137   echo "$ac_t""yes" 1>&6
7138     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7139   cat >> confdefs.h <<EOF
7140 #define $ac_tr_hdr 1
7141 EOF
7142  
7143 else
7144   echo "$ac_t""no" 1>&6
7145 fi
7146 done
7147
7148                 fi
7149
7150                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7151                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7152 echo "configure:7153: checking for pthread_create in default libraries" >&5
7153 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7154   echo $ac_n "(cached) $ac_c" 1>&6
7155 else
7156   
7157                 if test "$cross_compiling" = yes; then
7158   cat > conftest.$ac_ext <<EOF
7159 #line 7160 "configure"
7160 #include "confdefs.h"
7161 /* pthread test headers */
7162 #include <pthread.h>
7163 #ifndef NULL
7164 #define NULL (void*)0
7165 #endif
7166
7167 static void *task(p)
7168         void *p;
7169 {
7170         return (void *) (p == NULL);
7171 }
7172
7173 int main() {
7174
7175         /* pthread test function */
7176         pthread_t t;
7177         int status;
7178 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7179         /* This system (e.g. AIX) defaults detached; must override */
7180         pthread_attr_t attr;
7181
7182         status = pthread_attr_init(&attr);
7183         if( status ) exit( status );
7184
7185         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7186         if( status ) exit( status );
7187
7188 #define ATTR    &attr
7189 #else
7190 #if HAVE_PTHREADS_D4
7191 #define ATTR    pthread_attr_default
7192 #else
7193 #define ATTR    NULL
7194 #endif
7195 #endif
7196         /* make sure pthread_create() isn't just a stub */
7197         status = pthread_create(&t, ATTR, task, NULL);
7198         if( status ) exit( status );
7199
7200         /* make sure pthread_detach() isn't just a stub */
7201 #if HAVE_PTHREADS_D4
7202         status = pthread_detach( &t );
7203 #else
7204         status = pthread_detach( t );
7205 #endif
7206
7207 #ifdef HAVE_LINUX_THREADS
7208         pthread_kill_other_threads_np();
7209 #endif
7210
7211         exit( status );
7212
7213 ; return 0; }
7214 EOF
7215 if { (eval echo configure:7216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7216   rm -rf conftest*
7217   ol_cv_pthread_create=yes
7218 else
7219   echo "configure: failed program was:" >&5
7220   cat conftest.$ac_ext >&5
7221   rm -rf conftest*
7222   ol_cv_pthread_create=no
7223 fi
7224 rm -f conftest*
7225 else
7226   cat > conftest.$ac_ext <<EOF
7227 #line 7228 "configure"
7228 #include "confdefs.h"
7229 /* pthread test headers */
7230 #include <pthread.h>
7231 #ifndef NULL
7232 #define NULL (void*)0
7233 #endif
7234
7235 static void *task(p)
7236         void *p;
7237 {
7238         return (void *) (p == NULL);
7239 }
7240
7241
7242 int main(argc, argv)
7243         int argc;
7244         char **argv;
7245 {
7246
7247         /* pthread test function */
7248         pthread_t t;
7249         int status;
7250 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7251         /* This system (e.g. AIX) defaults detached; must override */
7252         pthread_attr_t attr;
7253
7254         status = pthread_attr_init(&attr);
7255         if( status ) exit( status );
7256
7257         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7258         if( status ) exit( status );
7259
7260 #define ATTR    &attr
7261 #else
7262 #if HAVE_PTHREADS_D4
7263 #define ATTR    pthread_attr_default
7264 #else
7265 #define ATTR    NULL
7266 #endif
7267 #endif
7268         /* make sure pthread_create() isn't just a stub */
7269         status = pthread_create(&t, ATTR, task, NULL);
7270         if( status ) exit( status );
7271
7272         /* make sure pthread_detach() isn't just a stub */
7273 #if HAVE_PTHREADS_D4
7274         status = pthread_detach( &t );
7275 #else
7276         status = pthread_detach( t );
7277 #endif
7278
7279 #ifdef HAVE_LINUX_THREADS
7280         pthread_kill_other_threads_np();
7281 #endif
7282
7283         exit( status );
7284
7285 }
7286
7287 EOF
7288 if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7289 then
7290   ol_cv_pthread_create=yes
7291 else
7292   echo "configure: failed program was:" >&5
7293   cat conftest.$ac_ext >&5
7294   rm -fr conftest*
7295   ol_cv_pthread_create=no
7296 fi
7297 rm -fr conftest*
7298 fi
7299
7300 fi
7301
7302 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7303
7304                 if test $ol_cv_pthread_create != no ; then
7305                         ol_link_threads=posix
7306                         ol_link_pthreads=""
7307                 fi
7308                 
7309                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7310 if test "$ol_link_threads" = no ; then
7311         # try -kthread
7312         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7313 echo "configure:7314: checking for pthread link with -kthread" >&5
7314 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7315   echo $ac_n "(cached) $ac_c" 1>&6
7316 else
7317   
7318                 # save the flags
7319                 ol_LIBS="$LIBS"
7320                 LIBS="-kthread $LIBS"
7321
7322                 if test "$cross_compiling" = yes; then
7323   cat > conftest.$ac_ext <<EOF
7324 #line 7325 "configure"
7325 #include "confdefs.h"
7326 /* pthread test headers */
7327 #include <pthread.h>
7328 #ifndef NULL
7329 #define NULL (void*)0
7330 #endif
7331
7332 static void *task(p)
7333         void *p;
7334 {
7335         return (void *) (p == NULL);
7336 }
7337
7338 int main() {
7339
7340         /* pthread test function */
7341         pthread_t t;
7342         int status;
7343 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7344         /* This system (e.g. AIX) defaults detached; must override */
7345         pthread_attr_t attr;
7346
7347         status = pthread_attr_init(&attr);
7348         if( status ) exit( status );
7349
7350         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7351         if( status ) exit( status );
7352
7353 #define ATTR    &attr
7354 #else
7355 #if HAVE_PTHREADS_D4
7356 #define ATTR    pthread_attr_default
7357 #else
7358 #define ATTR    NULL
7359 #endif
7360 #endif
7361         /* make sure pthread_create() isn't just a stub */
7362         status = pthread_create(&t, ATTR, task, NULL);
7363         if( status ) exit( status );
7364
7365         /* make sure pthread_detach() isn't just a stub */
7366 #if HAVE_PTHREADS_D4
7367         status = pthread_detach( &t );
7368 #else
7369         status = pthread_detach( t );
7370 #endif
7371
7372 #ifdef HAVE_LINUX_THREADS
7373         pthread_kill_other_threads_np();
7374 #endif
7375
7376         exit( status );
7377
7378 ; return 0; }
7379 EOF
7380 if { (eval echo configure:7381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7381   rm -rf conftest*
7382   ol_cv_pthread_kthread=yes
7383 else
7384   echo "configure: failed program was:" >&5
7385   cat conftest.$ac_ext >&5
7386   rm -rf conftest*
7387   ol_cv_pthread_kthread=no
7388 fi
7389 rm -f conftest*
7390 else
7391   cat > conftest.$ac_ext <<EOF
7392 #line 7393 "configure"
7393 #include "confdefs.h"
7394 /* pthread test headers */
7395 #include <pthread.h>
7396 #ifndef NULL
7397 #define NULL (void*)0
7398 #endif
7399
7400 static void *task(p)
7401         void *p;
7402 {
7403         return (void *) (p == NULL);
7404 }
7405
7406
7407 int main(argc, argv)
7408         int argc;
7409         char **argv;
7410 {
7411
7412         /* pthread test function */
7413         pthread_t t;
7414         int status;
7415 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7416         /* This system (e.g. AIX) defaults detached; must override */
7417         pthread_attr_t attr;
7418
7419         status = pthread_attr_init(&attr);
7420         if( status ) exit( status );
7421
7422         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7423         if( status ) exit( status );
7424
7425 #define ATTR    &attr
7426 #else
7427 #if HAVE_PTHREADS_D4
7428 #define ATTR    pthread_attr_default
7429 #else
7430 #define ATTR    NULL
7431 #endif
7432 #endif
7433         /* make sure pthread_create() isn't just a stub */
7434         status = pthread_create(&t, ATTR, task, NULL);
7435         if( status ) exit( status );
7436
7437         /* make sure pthread_detach() isn't just a stub */
7438 #if HAVE_PTHREADS_D4
7439         status = pthread_detach( &t );
7440 #else
7441         status = pthread_detach( t );
7442 #endif
7443
7444 #ifdef HAVE_LINUX_THREADS
7445         pthread_kill_other_threads_np();
7446 #endif
7447
7448         exit( status );
7449
7450 }
7451
7452 EOF
7453 if { (eval echo configure:7454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7454 then
7455   ol_cv_pthread_kthread=yes
7456 else
7457   echo "configure: failed program was:" >&5
7458   cat conftest.$ac_ext >&5
7459   rm -fr conftest*
7460   ol_cv_pthread_kthread=no
7461 fi
7462 rm -fr conftest*
7463 fi
7464
7465
7466                 # restore the LIBS
7467                 LIBS="$ol_LIBS"
7468         
7469 fi
7470
7471 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7472
7473         if test $ol_cv_pthread_kthread = yes ; then
7474                 ol_link_pthreads="-kthread"
7475                 ol_link_threads=posix
7476         fi
7477 fi
7478
7479                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7480 if test "$ol_link_threads" = no ; then
7481         # try -pthread
7482         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7483 echo "configure:7484: checking for pthread link with -pthread" >&5
7484 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7485   echo $ac_n "(cached) $ac_c" 1>&6
7486 else
7487   
7488                 # save the flags
7489                 ol_LIBS="$LIBS"
7490                 LIBS="-pthread $LIBS"
7491
7492                 if test "$cross_compiling" = yes; then
7493   cat > conftest.$ac_ext <<EOF
7494 #line 7495 "configure"
7495 #include "confdefs.h"
7496 /* pthread test headers */
7497 #include <pthread.h>
7498 #ifndef NULL
7499 #define NULL (void*)0
7500 #endif
7501
7502 static void *task(p)
7503         void *p;
7504 {
7505         return (void *) (p == NULL);
7506 }
7507
7508 int main() {
7509
7510         /* pthread test function */
7511         pthread_t t;
7512         int status;
7513 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7514         /* This system (e.g. AIX) defaults detached; must override */
7515         pthread_attr_t attr;
7516
7517         status = pthread_attr_init(&attr);
7518         if( status ) exit( status );
7519
7520         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7521         if( status ) exit( status );
7522
7523 #define ATTR    &attr
7524 #else
7525 #if HAVE_PTHREADS_D4
7526 #define ATTR    pthread_attr_default
7527 #else
7528 #define ATTR    NULL
7529 #endif
7530 #endif
7531         /* make sure pthread_create() isn't just a stub */
7532         status = pthread_create(&t, ATTR, task, NULL);
7533         if( status ) exit( status );
7534
7535         /* make sure pthread_detach() isn't just a stub */
7536 #if HAVE_PTHREADS_D4
7537         status = pthread_detach( &t );
7538 #else
7539         status = pthread_detach( t );
7540 #endif
7541
7542 #ifdef HAVE_LINUX_THREADS
7543         pthread_kill_other_threads_np();
7544 #endif
7545
7546         exit( status );
7547
7548 ; return 0; }
7549 EOF
7550 if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7551   rm -rf conftest*
7552   ol_cv_pthread_pthread=yes
7553 else
7554   echo "configure: failed program was:" >&5
7555   cat conftest.$ac_ext >&5
7556   rm -rf conftest*
7557   ol_cv_pthread_pthread=no
7558 fi
7559 rm -f conftest*
7560 else
7561   cat > conftest.$ac_ext <<EOF
7562 #line 7563 "configure"
7563 #include "confdefs.h"
7564 /* pthread test headers */
7565 #include <pthread.h>
7566 #ifndef NULL
7567 #define NULL (void*)0
7568 #endif
7569
7570 static void *task(p)
7571         void *p;
7572 {
7573         return (void *) (p == NULL);
7574 }
7575
7576
7577 int main(argc, argv)
7578         int argc;
7579         char **argv;
7580 {
7581
7582         /* pthread test function */
7583         pthread_t t;
7584         int status;
7585 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7586         /* This system (e.g. AIX) defaults detached; must override */
7587         pthread_attr_t attr;
7588
7589         status = pthread_attr_init(&attr);
7590         if( status ) exit( status );
7591
7592         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7593         if( status ) exit( status );
7594
7595 #define ATTR    &attr
7596 #else
7597 #if HAVE_PTHREADS_D4
7598 #define ATTR    pthread_attr_default
7599 #else
7600 #define ATTR    NULL
7601 #endif
7602 #endif
7603         /* make sure pthread_create() isn't just a stub */
7604         status = pthread_create(&t, ATTR, task, NULL);
7605         if( status ) exit( status );
7606
7607         /* make sure pthread_detach() isn't just a stub */
7608 #if HAVE_PTHREADS_D4
7609         status = pthread_detach( &t );
7610 #else
7611         status = pthread_detach( t );
7612 #endif
7613
7614 #ifdef HAVE_LINUX_THREADS
7615         pthread_kill_other_threads_np();
7616 #endif
7617
7618         exit( status );
7619
7620 }
7621
7622 EOF
7623 if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7624 then
7625   ol_cv_pthread_pthread=yes
7626 else
7627   echo "configure: failed program was:" >&5
7628   cat conftest.$ac_ext >&5
7629   rm -fr conftest*
7630   ol_cv_pthread_pthread=no
7631 fi
7632 rm -fr conftest*
7633 fi
7634
7635
7636                 # restore the LIBS
7637                 LIBS="$ol_LIBS"
7638         
7639 fi
7640
7641 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7642
7643         if test $ol_cv_pthread_pthread = yes ; then
7644                 ol_link_pthreads="-pthread"
7645                 ol_link_threads=posix
7646         fi
7647 fi
7648
7649                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7650 if test "$ol_link_threads" = no ; then
7651         # try -pthreads
7652         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7653 echo "configure:7654: checking for pthread link with -pthreads" >&5
7654 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7655   echo $ac_n "(cached) $ac_c" 1>&6
7656 else
7657   
7658                 # save the flags
7659                 ol_LIBS="$LIBS"
7660                 LIBS="-pthreads $LIBS"
7661
7662                 if test "$cross_compiling" = yes; then
7663   cat > conftest.$ac_ext <<EOF
7664 #line 7665 "configure"
7665 #include "confdefs.h"
7666 /* pthread test headers */
7667 #include <pthread.h>
7668 #ifndef NULL
7669 #define NULL (void*)0
7670 #endif
7671
7672 static void *task(p)
7673         void *p;
7674 {
7675         return (void *) (p == NULL);
7676 }
7677
7678 int main() {
7679
7680         /* pthread test function */
7681         pthread_t t;
7682         int status;
7683 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7684         /* This system (e.g. AIX) defaults detached; must override */
7685         pthread_attr_t attr;
7686
7687         status = pthread_attr_init(&attr);
7688         if( status ) exit( status );
7689
7690         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7691         if( status ) exit( status );
7692
7693 #define ATTR    &attr
7694 #else
7695 #if HAVE_PTHREADS_D4
7696 #define ATTR    pthread_attr_default
7697 #else
7698 #define ATTR    NULL
7699 #endif
7700 #endif
7701         /* make sure pthread_create() isn't just a stub */
7702         status = pthread_create(&t, ATTR, task, NULL);
7703         if( status ) exit( status );
7704
7705         /* make sure pthread_detach() isn't just a stub */
7706 #if HAVE_PTHREADS_D4
7707         status = pthread_detach( &t );
7708 #else
7709         status = pthread_detach( t );
7710 #endif
7711
7712 #ifdef HAVE_LINUX_THREADS
7713         pthread_kill_other_threads_np();
7714 #endif
7715
7716         exit( status );
7717
7718 ; return 0; }
7719 EOF
7720 if { (eval echo configure:7721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7721   rm -rf conftest*
7722   ol_cv_pthread_pthreads=yes
7723 else
7724   echo "configure: failed program was:" >&5
7725   cat conftest.$ac_ext >&5
7726   rm -rf conftest*
7727   ol_cv_pthread_pthreads=no
7728 fi
7729 rm -f conftest*
7730 else
7731   cat > conftest.$ac_ext <<EOF
7732 #line 7733 "configure"
7733 #include "confdefs.h"
7734 /* pthread test headers */
7735 #include <pthread.h>
7736 #ifndef NULL
7737 #define NULL (void*)0
7738 #endif
7739
7740 static void *task(p)
7741         void *p;
7742 {
7743         return (void *) (p == NULL);
7744 }
7745
7746
7747 int main(argc, argv)
7748         int argc;
7749         char **argv;
7750 {
7751
7752         /* pthread test function */
7753         pthread_t t;
7754         int status;
7755 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7756         /* This system (e.g. AIX) defaults detached; must override */
7757         pthread_attr_t attr;
7758
7759         status = pthread_attr_init(&attr);
7760         if( status ) exit( status );
7761
7762         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7763         if( status ) exit( status );
7764
7765 #define ATTR    &attr
7766 #else
7767 #if HAVE_PTHREADS_D4
7768 #define ATTR    pthread_attr_default
7769 #else
7770 #define ATTR    NULL
7771 #endif
7772 #endif
7773         /* make sure pthread_create() isn't just a stub */
7774         status = pthread_create(&t, ATTR, task, NULL);
7775         if( status ) exit( status );
7776
7777         /* make sure pthread_detach() isn't just a stub */
7778 #if HAVE_PTHREADS_D4
7779         status = pthread_detach( &t );
7780 #else
7781         status = pthread_detach( t );
7782 #endif
7783
7784 #ifdef HAVE_LINUX_THREADS
7785         pthread_kill_other_threads_np();
7786 #endif
7787
7788         exit( status );
7789
7790 }
7791
7792 EOF
7793 if { (eval echo configure:7794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7794 then
7795   ol_cv_pthread_pthreads=yes
7796 else
7797   echo "configure: failed program was:" >&5
7798   cat conftest.$ac_ext >&5
7799   rm -fr conftest*
7800   ol_cv_pthread_pthreads=no
7801 fi
7802 rm -fr conftest*
7803 fi
7804
7805
7806                 # restore the LIBS
7807                 LIBS="$ol_LIBS"
7808         
7809 fi
7810
7811 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7812
7813         if test $ol_cv_pthread_pthreads = yes ; then
7814                 ol_link_pthreads="-pthreads"
7815                 ol_link_threads=posix
7816         fi
7817 fi
7818
7819                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7820 if test "$ol_link_threads" = no ; then
7821         # try -mthreads
7822         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7823 echo "configure:7824: checking for pthread link with -mthreads" >&5
7824 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7825   echo $ac_n "(cached) $ac_c" 1>&6
7826 else
7827   
7828                 # save the flags
7829                 ol_LIBS="$LIBS"
7830                 LIBS="-mthreads $LIBS"
7831
7832                 if test "$cross_compiling" = yes; then
7833   cat > conftest.$ac_ext <<EOF
7834 #line 7835 "configure"
7835 #include "confdefs.h"
7836 /* pthread test headers */
7837 #include <pthread.h>
7838 #ifndef NULL
7839 #define NULL (void*)0
7840 #endif
7841
7842 static void *task(p)
7843         void *p;
7844 {
7845         return (void *) (p == NULL);
7846 }
7847
7848 int main() {
7849
7850         /* pthread test function */
7851         pthread_t t;
7852         int status;
7853 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7854         /* This system (e.g. AIX) defaults detached; must override */
7855         pthread_attr_t attr;
7856
7857         status = pthread_attr_init(&attr);
7858         if( status ) exit( status );
7859
7860         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7861         if( status ) exit( status );
7862
7863 #define ATTR    &attr
7864 #else
7865 #if HAVE_PTHREADS_D4
7866 #define ATTR    pthread_attr_default
7867 #else
7868 #define ATTR    NULL
7869 #endif
7870 #endif
7871         /* make sure pthread_create() isn't just a stub */
7872         status = pthread_create(&t, ATTR, task, NULL);
7873         if( status ) exit( status );
7874
7875         /* make sure pthread_detach() isn't just a stub */
7876 #if HAVE_PTHREADS_D4
7877         status = pthread_detach( &t );
7878 #else
7879         status = pthread_detach( t );
7880 #endif
7881
7882 #ifdef HAVE_LINUX_THREADS
7883         pthread_kill_other_threads_np();
7884 #endif
7885
7886         exit( status );
7887
7888 ; return 0; }
7889 EOF
7890 if { (eval echo configure:7891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7891   rm -rf conftest*
7892   ol_cv_pthread_mthreads=yes
7893 else
7894   echo "configure: failed program was:" >&5
7895   cat conftest.$ac_ext >&5
7896   rm -rf conftest*
7897   ol_cv_pthread_mthreads=no
7898 fi
7899 rm -f conftest*
7900 else
7901   cat > conftest.$ac_ext <<EOF
7902 #line 7903 "configure"
7903 #include "confdefs.h"
7904 /* pthread test headers */
7905 #include <pthread.h>
7906 #ifndef NULL
7907 #define NULL (void*)0
7908 #endif
7909
7910 static void *task(p)
7911         void *p;
7912 {
7913         return (void *) (p == NULL);
7914 }
7915
7916
7917 int main(argc, argv)
7918         int argc;
7919         char **argv;
7920 {
7921
7922         /* pthread test function */
7923         pthread_t t;
7924         int status;
7925 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7926         /* This system (e.g. AIX) defaults detached; must override */
7927         pthread_attr_t attr;
7928
7929         status = pthread_attr_init(&attr);
7930         if( status ) exit( status );
7931
7932         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7933         if( status ) exit( status );
7934
7935 #define ATTR    &attr
7936 #else
7937 #if HAVE_PTHREADS_D4
7938 #define ATTR    pthread_attr_default
7939 #else
7940 #define ATTR    NULL
7941 #endif
7942 #endif
7943         /* make sure pthread_create() isn't just a stub */
7944         status = pthread_create(&t, ATTR, task, NULL);
7945         if( status ) exit( status );
7946
7947         /* make sure pthread_detach() isn't just a stub */
7948 #if HAVE_PTHREADS_D4
7949         status = pthread_detach( &t );
7950 #else
7951         status = pthread_detach( t );
7952 #endif
7953
7954 #ifdef HAVE_LINUX_THREADS
7955         pthread_kill_other_threads_np();
7956 #endif
7957
7958         exit( status );
7959
7960 }
7961
7962 EOF
7963 if { (eval echo configure:7964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7964 then
7965   ol_cv_pthread_mthreads=yes
7966 else
7967   echo "configure: failed program was:" >&5
7968   cat conftest.$ac_ext >&5
7969   rm -fr conftest*
7970   ol_cv_pthread_mthreads=no
7971 fi
7972 rm -fr conftest*
7973 fi
7974
7975
7976                 # restore the LIBS
7977                 LIBS="$ol_LIBS"
7978         
7979 fi
7980
7981 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7982
7983         if test $ol_cv_pthread_mthreads = yes ; then
7984                 ol_link_pthreads="-mthreads"
7985                 ol_link_threads=posix
7986         fi
7987 fi
7988
7989                 # Pthread try link: -thread (ol_cv_pthread_thread)
7990 if test "$ol_link_threads" = no ; then
7991         # try -thread
7992         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7993 echo "configure:7994: checking for pthread link with -thread" >&5
7994 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7995   echo $ac_n "(cached) $ac_c" 1>&6
7996 else
7997   
7998                 # save the flags
7999                 ol_LIBS="$LIBS"
8000                 LIBS="-thread $LIBS"
8001
8002                 if test "$cross_compiling" = yes; then
8003   cat > conftest.$ac_ext <<EOF
8004 #line 8005 "configure"
8005 #include "confdefs.h"
8006 /* pthread test headers */
8007 #include <pthread.h>
8008 #ifndef NULL
8009 #define NULL (void*)0
8010 #endif
8011
8012 static void *task(p)
8013         void *p;
8014 {
8015         return (void *) (p == NULL);
8016 }
8017
8018 int main() {
8019
8020         /* pthread test function */
8021         pthread_t t;
8022         int status;
8023 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8024         /* This system (e.g. AIX) defaults detached; must override */
8025         pthread_attr_t attr;
8026
8027         status = pthread_attr_init(&attr);
8028         if( status ) exit( status );
8029
8030         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8031         if( status ) exit( status );
8032
8033 #define ATTR    &attr
8034 #else
8035 #if HAVE_PTHREADS_D4
8036 #define ATTR    pthread_attr_default
8037 #else
8038 #define ATTR    NULL
8039 #endif
8040 #endif
8041         /* make sure pthread_create() isn't just a stub */
8042         status = pthread_create(&t, ATTR, task, NULL);
8043         if( status ) exit( status );
8044
8045         /* make sure pthread_detach() isn't just a stub */
8046 #if HAVE_PTHREADS_D4
8047         status = pthread_detach( &t );
8048 #else
8049         status = pthread_detach( t );
8050 #endif
8051
8052 #ifdef HAVE_LINUX_THREADS
8053         pthread_kill_other_threads_np();
8054 #endif
8055
8056         exit( status );
8057
8058 ; return 0; }
8059 EOF
8060 if { (eval echo configure:8061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8061   rm -rf conftest*
8062   ol_cv_pthread_thread=yes
8063 else
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -rf conftest*
8067   ol_cv_pthread_thread=no
8068 fi
8069 rm -f conftest*
8070 else
8071   cat > conftest.$ac_ext <<EOF
8072 #line 8073 "configure"
8073 #include "confdefs.h"
8074 /* pthread test headers */
8075 #include <pthread.h>
8076 #ifndef NULL
8077 #define NULL (void*)0
8078 #endif
8079
8080 static void *task(p)
8081         void *p;
8082 {
8083         return (void *) (p == NULL);
8084 }
8085
8086
8087 int main(argc, argv)
8088         int argc;
8089         char **argv;
8090 {
8091
8092         /* pthread test function */
8093         pthread_t t;
8094         int status;
8095 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8096         /* This system (e.g. AIX) defaults detached; must override */
8097         pthread_attr_t attr;
8098
8099         status = pthread_attr_init(&attr);
8100         if( status ) exit( status );
8101
8102         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8103         if( status ) exit( status );
8104
8105 #define ATTR    &attr
8106 #else
8107 #if HAVE_PTHREADS_D4
8108 #define ATTR    pthread_attr_default
8109 #else
8110 #define ATTR    NULL
8111 #endif
8112 #endif
8113         /* make sure pthread_create() isn't just a stub */
8114         status = pthread_create(&t, ATTR, task, NULL);
8115         if( status ) exit( status );
8116
8117         /* make sure pthread_detach() isn't just a stub */
8118 #if HAVE_PTHREADS_D4
8119         status = pthread_detach( &t );
8120 #else
8121         status = pthread_detach( t );
8122 #endif
8123
8124 #ifdef HAVE_LINUX_THREADS
8125         pthread_kill_other_threads_np();
8126 #endif
8127
8128         exit( status );
8129
8130 }
8131
8132 EOF
8133 if { (eval echo configure:8134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8134 then
8135   ol_cv_pthread_thread=yes
8136 else
8137   echo "configure: failed program was:" >&5
8138   cat conftest.$ac_ext >&5
8139   rm -fr conftest*
8140   ol_cv_pthread_thread=no
8141 fi
8142 rm -fr conftest*
8143 fi
8144
8145
8146                 # restore the LIBS
8147                 LIBS="$ol_LIBS"
8148         
8149 fi
8150
8151 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8152
8153         if test $ol_cv_pthread_thread = yes ; then
8154                 ol_link_pthreads="-thread"
8155                 ol_link_threads=posix
8156         fi
8157 fi
8158
8159
8160                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8161 if test "$ol_link_threads" = no ; then
8162         # try -lpthread -lmach -lexc -lc_r
8163         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8164 echo "configure:8165: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8165 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8166   echo $ac_n "(cached) $ac_c" 1>&6
8167 else
8168   
8169                 # save the flags
8170                 ol_LIBS="$LIBS"
8171                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8172
8173                 if test "$cross_compiling" = yes; then
8174   cat > conftest.$ac_ext <<EOF
8175 #line 8176 "configure"
8176 #include "confdefs.h"
8177 /* pthread test headers */
8178 #include <pthread.h>
8179 #ifndef NULL
8180 #define NULL (void*)0
8181 #endif
8182
8183 static void *task(p)
8184         void *p;
8185 {
8186         return (void *) (p == NULL);
8187 }
8188
8189 int main() {
8190
8191         /* pthread test function */
8192         pthread_t t;
8193         int status;
8194 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8195         /* This system (e.g. AIX) defaults detached; must override */
8196         pthread_attr_t attr;
8197
8198         status = pthread_attr_init(&attr);
8199         if( status ) exit( status );
8200
8201         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8202         if( status ) exit( status );
8203
8204 #define ATTR    &attr
8205 #else
8206 #if HAVE_PTHREADS_D4
8207 #define ATTR    pthread_attr_default
8208 #else
8209 #define ATTR    NULL
8210 #endif
8211 #endif
8212         /* make sure pthread_create() isn't just a stub */
8213         status = pthread_create(&t, ATTR, task, NULL);
8214         if( status ) exit( status );
8215
8216         /* make sure pthread_detach() isn't just a stub */
8217 #if HAVE_PTHREADS_D4
8218         status = pthread_detach( &t );
8219 #else
8220         status = pthread_detach( t );
8221 #endif
8222
8223 #ifdef HAVE_LINUX_THREADS
8224         pthread_kill_other_threads_np();
8225 #endif
8226
8227         exit( status );
8228
8229 ; return 0; }
8230 EOF
8231 if { (eval echo configure:8232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8232   rm -rf conftest*
8233   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8234 else
8235   echo "configure: failed program was:" >&5
8236   cat conftest.$ac_ext >&5
8237   rm -rf conftest*
8238   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8239 fi
8240 rm -f conftest*
8241 else
8242   cat > conftest.$ac_ext <<EOF
8243 #line 8244 "configure"
8244 #include "confdefs.h"
8245 /* pthread test headers */
8246 #include <pthread.h>
8247 #ifndef NULL
8248 #define NULL (void*)0
8249 #endif
8250
8251 static void *task(p)
8252         void *p;
8253 {
8254         return (void *) (p == NULL);
8255 }
8256
8257
8258 int main(argc, argv)
8259         int argc;
8260         char **argv;
8261 {
8262
8263         /* pthread test function */
8264         pthread_t t;
8265         int status;
8266 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8267         /* This system (e.g. AIX) defaults detached; must override */
8268         pthread_attr_t attr;
8269
8270         status = pthread_attr_init(&attr);
8271         if( status ) exit( status );
8272
8273         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8274         if( status ) exit( status );
8275
8276 #define ATTR    &attr
8277 #else
8278 #if HAVE_PTHREADS_D4
8279 #define ATTR    pthread_attr_default
8280 #else
8281 #define ATTR    NULL
8282 #endif
8283 #endif
8284         /* make sure pthread_create() isn't just a stub */
8285         status = pthread_create(&t, ATTR, task, NULL);
8286         if( status ) exit( status );
8287
8288         /* make sure pthread_detach() isn't just a stub */
8289 #if HAVE_PTHREADS_D4
8290         status = pthread_detach( &t );
8291 #else
8292         status = pthread_detach( t );
8293 #endif
8294
8295 #ifdef HAVE_LINUX_THREADS
8296         pthread_kill_other_threads_np();
8297 #endif
8298
8299         exit( status );
8300
8301 }
8302
8303 EOF
8304 if { (eval echo configure:8305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8305 then
8306   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8307 else
8308   echo "configure: failed program was:" >&5
8309   cat conftest.$ac_ext >&5
8310   rm -fr conftest*
8311   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8312 fi
8313 rm -fr conftest*
8314 fi
8315
8316
8317                 # restore the LIBS
8318                 LIBS="$ol_LIBS"
8319         
8320 fi
8321
8322 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8323
8324         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8325                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8326                 ol_link_threads=posix
8327         fi
8328 fi
8329
8330                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8331 if test "$ol_link_threads" = no ; then
8332         # try -lpthread -lmach -lexc
8333         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8334 echo "configure:8335: checking for pthread link with -lpthread -lmach -lexc" >&5
8335 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8336   echo $ac_n "(cached) $ac_c" 1>&6
8337 else
8338   
8339                 # save the flags
8340                 ol_LIBS="$LIBS"
8341                 LIBS="-lpthread -lmach -lexc $LIBS"
8342
8343                 if test "$cross_compiling" = yes; then
8344   cat > conftest.$ac_ext <<EOF
8345 #line 8346 "configure"
8346 #include "confdefs.h"
8347 /* pthread test headers */
8348 #include <pthread.h>
8349 #ifndef NULL
8350 #define NULL (void*)0
8351 #endif
8352
8353 static void *task(p)
8354         void *p;
8355 {
8356         return (void *) (p == NULL);
8357 }
8358
8359 int main() {
8360
8361         /* pthread test function */
8362         pthread_t t;
8363         int status;
8364 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8365         /* This system (e.g. AIX) defaults detached; must override */
8366         pthread_attr_t attr;
8367
8368         status = pthread_attr_init(&attr);
8369         if( status ) exit( status );
8370
8371         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8372         if( status ) exit( status );
8373
8374 #define ATTR    &attr
8375 #else
8376 #if HAVE_PTHREADS_D4
8377 #define ATTR    pthread_attr_default
8378 #else
8379 #define ATTR    NULL
8380 #endif
8381 #endif
8382         /* make sure pthread_create() isn't just a stub */
8383         status = pthread_create(&t, ATTR, task, NULL);
8384         if( status ) exit( status );
8385
8386         /* make sure pthread_detach() isn't just a stub */
8387 #if HAVE_PTHREADS_D4
8388         status = pthread_detach( &t );
8389 #else
8390         status = pthread_detach( t );
8391 #endif
8392
8393 #ifdef HAVE_LINUX_THREADS
8394         pthread_kill_other_threads_np();
8395 #endif
8396
8397         exit( status );
8398
8399 ; return 0; }
8400 EOF
8401 if { (eval echo configure:8402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8402   rm -rf conftest*
8403   ol_cv_pthread_lpthread_lmach_lexc=yes
8404 else
8405   echo "configure: failed program was:" >&5
8406   cat conftest.$ac_ext >&5
8407   rm -rf conftest*
8408   ol_cv_pthread_lpthread_lmach_lexc=no
8409 fi
8410 rm -f conftest*
8411 else
8412   cat > conftest.$ac_ext <<EOF
8413 #line 8414 "configure"
8414 #include "confdefs.h"
8415 /* pthread test headers */
8416 #include <pthread.h>
8417 #ifndef NULL
8418 #define NULL (void*)0
8419 #endif
8420
8421 static void *task(p)
8422         void *p;
8423 {
8424         return (void *) (p == NULL);
8425 }
8426
8427
8428 int main(argc, argv)
8429         int argc;
8430         char **argv;
8431 {
8432
8433         /* pthread test function */
8434         pthread_t t;
8435         int status;
8436 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8437         /* This system (e.g. AIX) defaults detached; must override */
8438         pthread_attr_t attr;
8439
8440         status = pthread_attr_init(&attr);
8441         if( status ) exit( status );
8442
8443         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8444         if( status ) exit( status );
8445
8446 #define ATTR    &attr
8447 #else
8448 #if HAVE_PTHREADS_D4
8449 #define ATTR    pthread_attr_default
8450 #else
8451 #define ATTR    NULL
8452 #endif
8453 #endif
8454         /* make sure pthread_create() isn't just a stub */
8455         status = pthread_create(&t, ATTR, task, NULL);
8456         if( status ) exit( status );
8457
8458         /* make sure pthread_detach() isn't just a stub */
8459 #if HAVE_PTHREADS_D4
8460         status = pthread_detach( &t );
8461 #else
8462         status = pthread_detach( t );
8463 #endif
8464
8465 #ifdef HAVE_LINUX_THREADS
8466         pthread_kill_other_threads_np();
8467 #endif
8468
8469         exit( status );
8470
8471 }
8472
8473 EOF
8474 if { (eval echo configure:8475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8475 then
8476   ol_cv_pthread_lpthread_lmach_lexc=yes
8477 else
8478   echo "configure: failed program was:" >&5
8479   cat conftest.$ac_ext >&5
8480   rm -fr conftest*
8481   ol_cv_pthread_lpthread_lmach_lexc=no
8482 fi
8483 rm -fr conftest*
8484 fi
8485
8486
8487                 # restore the LIBS
8488                 LIBS="$ol_LIBS"
8489         
8490 fi
8491
8492 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8493
8494         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8495                 ol_link_pthreads="-lpthread -lmach -lexc"
8496                 ol_link_threads=posix
8497         fi
8498 fi
8499
8500
8501                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8502 if test "$ol_link_threads" = no ; then
8503         # try -lpthread -Wl,-woff,85
8504         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8505 echo "configure:8506: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8506 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8507   echo $ac_n "(cached) $ac_c" 1>&6
8508 else
8509   
8510                 # save the flags
8511                 ol_LIBS="$LIBS"
8512                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8513
8514                 if test "$cross_compiling" = yes; then
8515   cat > conftest.$ac_ext <<EOF
8516 #line 8517 "configure"
8517 #include "confdefs.h"
8518 /* pthread test headers */
8519 #include <pthread.h>
8520 #ifndef NULL
8521 #define NULL (void*)0
8522 #endif
8523
8524 static void *task(p)
8525         void *p;
8526 {
8527         return (void *) (p == NULL);
8528 }
8529
8530 int main() {
8531
8532         /* pthread test function */
8533         pthread_t t;
8534         int status;
8535 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8536         /* This system (e.g. AIX) defaults detached; must override */
8537         pthread_attr_t attr;
8538
8539         status = pthread_attr_init(&attr);
8540         if( status ) exit( status );
8541
8542         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8543         if( status ) exit( status );
8544
8545 #define ATTR    &attr
8546 #else
8547 #if HAVE_PTHREADS_D4
8548 #define ATTR    pthread_attr_default
8549 #else
8550 #define ATTR    NULL
8551 #endif
8552 #endif
8553         /* make sure pthread_create() isn't just a stub */
8554         status = pthread_create(&t, ATTR, task, NULL);
8555         if( status ) exit( status );
8556
8557         /* make sure pthread_detach() isn't just a stub */
8558 #if HAVE_PTHREADS_D4
8559         status = pthread_detach( &t );
8560 #else
8561         status = pthread_detach( t );
8562 #endif
8563
8564 #ifdef HAVE_LINUX_THREADS
8565         pthread_kill_other_threads_np();
8566 #endif
8567
8568         exit( status );
8569
8570 ; return 0; }
8571 EOF
8572 if { (eval echo configure:8573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8573   rm -rf conftest*
8574   ol_cv_pthread_lib_lpthread_woff=yes
8575 else
8576   echo "configure: failed program was:" >&5
8577   cat conftest.$ac_ext >&5
8578   rm -rf conftest*
8579   ol_cv_pthread_lib_lpthread_woff=no
8580 fi
8581 rm -f conftest*
8582 else
8583   cat > conftest.$ac_ext <<EOF
8584 #line 8585 "configure"
8585 #include "confdefs.h"
8586 /* pthread test headers */
8587 #include <pthread.h>
8588 #ifndef NULL
8589 #define NULL (void*)0
8590 #endif
8591
8592 static void *task(p)
8593         void *p;
8594 {
8595         return (void *) (p == NULL);
8596 }
8597
8598
8599 int main(argc, argv)
8600         int argc;
8601         char **argv;
8602 {
8603
8604         /* pthread test function */
8605         pthread_t t;
8606         int status;
8607 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8608         /* This system (e.g. AIX) defaults detached; must override */
8609         pthread_attr_t attr;
8610
8611         status = pthread_attr_init(&attr);
8612         if( status ) exit( status );
8613
8614         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8615         if( status ) exit( status );
8616
8617 #define ATTR    &attr
8618 #else
8619 #if HAVE_PTHREADS_D4
8620 #define ATTR    pthread_attr_default
8621 #else
8622 #define ATTR    NULL
8623 #endif
8624 #endif
8625         /* make sure pthread_create() isn't just a stub */
8626         status = pthread_create(&t, ATTR, task, NULL);
8627         if( status ) exit( status );
8628
8629         /* make sure pthread_detach() isn't just a stub */
8630 #if HAVE_PTHREADS_D4
8631         status = pthread_detach( &t );
8632 #else
8633         status = pthread_detach( t );
8634 #endif
8635
8636 #ifdef HAVE_LINUX_THREADS
8637         pthread_kill_other_threads_np();
8638 #endif
8639
8640         exit( status );
8641
8642 }
8643
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8646 then
8647   ol_cv_pthread_lib_lpthread_woff=yes
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -fr conftest*
8652   ol_cv_pthread_lib_lpthread_woff=no
8653 fi
8654 rm -fr conftest*
8655 fi
8656
8657
8658                 # restore the LIBS
8659                 LIBS="$ol_LIBS"
8660         
8661 fi
8662
8663 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8664
8665         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8666                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8667                 ol_link_threads=posix
8668         fi
8669 fi
8670
8671
8672                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8673 if test "$ol_link_threads" = no ; then
8674         # try -lpthread
8675         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8676 echo "configure:8677: checking for pthread link with -lpthread" >&5
8677 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8678   echo $ac_n "(cached) $ac_c" 1>&6
8679 else
8680   
8681                 # save the flags
8682                 ol_LIBS="$LIBS"
8683                 LIBS="-lpthread $LIBS"
8684
8685                 if test "$cross_compiling" = yes; then
8686   cat > conftest.$ac_ext <<EOF
8687 #line 8688 "configure"
8688 #include "confdefs.h"
8689 /* pthread test headers */
8690 #include <pthread.h>
8691 #ifndef NULL
8692 #define NULL (void*)0
8693 #endif
8694
8695 static void *task(p)
8696         void *p;
8697 {
8698         return (void *) (p == NULL);
8699 }
8700
8701 int main() {
8702
8703         /* pthread test function */
8704         pthread_t t;
8705         int status;
8706 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8707         /* This system (e.g. AIX) defaults detached; must override */
8708         pthread_attr_t attr;
8709
8710         status = pthread_attr_init(&attr);
8711         if( status ) exit( status );
8712
8713         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8714         if( status ) exit( status );
8715
8716 #define ATTR    &attr
8717 #else
8718 #if HAVE_PTHREADS_D4
8719 #define ATTR    pthread_attr_default
8720 #else
8721 #define ATTR    NULL
8722 #endif
8723 #endif
8724         /* make sure pthread_create() isn't just a stub */
8725         status = pthread_create(&t, ATTR, task, NULL);
8726         if( status ) exit( status );
8727
8728         /* make sure pthread_detach() isn't just a stub */
8729 #if HAVE_PTHREADS_D4
8730         status = pthread_detach( &t );
8731 #else
8732         status = pthread_detach( t );
8733 #endif
8734
8735 #ifdef HAVE_LINUX_THREADS
8736         pthread_kill_other_threads_np();
8737 #endif
8738
8739         exit( status );
8740
8741 ; return 0; }
8742 EOF
8743 if { (eval echo configure:8744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8744   rm -rf conftest*
8745   ol_cv_pthread_lpthread=yes
8746 else
8747   echo "configure: failed program was:" >&5
8748   cat conftest.$ac_ext >&5
8749   rm -rf conftest*
8750   ol_cv_pthread_lpthread=no
8751 fi
8752 rm -f conftest*
8753 else
8754   cat > conftest.$ac_ext <<EOF
8755 #line 8756 "configure"
8756 #include "confdefs.h"
8757 /* pthread test headers */
8758 #include <pthread.h>
8759 #ifndef NULL
8760 #define NULL (void*)0
8761 #endif
8762
8763 static void *task(p)
8764         void *p;
8765 {
8766         return (void *) (p == NULL);
8767 }
8768
8769
8770 int main(argc, argv)
8771         int argc;
8772         char **argv;
8773 {
8774
8775         /* pthread test function */
8776         pthread_t t;
8777         int status;
8778 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8779         /* This system (e.g. AIX) defaults detached; must override */
8780         pthread_attr_t attr;
8781
8782         status = pthread_attr_init(&attr);
8783         if( status ) exit( status );
8784
8785         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8786         if( status ) exit( status );
8787
8788 #define ATTR    &attr
8789 #else
8790 #if HAVE_PTHREADS_D4
8791 #define ATTR    pthread_attr_default
8792 #else
8793 #define ATTR    NULL
8794 #endif
8795 #endif
8796         /* make sure pthread_create() isn't just a stub */
8797         status = pthread_create(&t, ATTR, task, NULL);
8798         if( status ) exit( status );
8799
8800         /* make sure pthread_detach() isn't just a stub */
8801 #if HAVE_PTHREADS_D4
8802         status = pthread_detach( &t );
8803 #else
8804         status = pthread_detach( t );
8805 #endif
8806
8807 #ifdef HAVE_LINUX_THREADS
8808         pthread_kill_other_threads_np();
8809 #endif
8810
8811         exit( status );
8812
8813 }
8814
8815 EOF
8816 if { (eval echo configure:8817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8817 then
8818   ol_cv_pthread_lpthread=yes
8819 else
8820   echo "configure: failed program was:" >&5
8821   cat conftest.$ac_ext >&5
8822   rm -fr conftest*
8823   ol_cv_pthread_lpthread=no
8824 fi
8825 rm -fr conftest*
8826 fi
8827
8828
8829                 # restore the LIBS
8830                 LIBS="$ol_LIBS"
8831         
8832 fi
8833
8834 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8835
8836         if test $ol_cv_pthread_lpthread = yes ; then
8837                 ol_link_pthreads="-lpthread"
8838                 ol_link_threads=posix
8839         fi
8840 fi
8841
8842                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8843 if test "$ol_link_threads" = no ; then
8844         # try -lc_r
8845         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8846 echo "configure:8847: checking for pthread link with -lc_r" >&5
8847 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8848   echo $ac_n "(cached) $ac_c" 1>&6
8849 else
8850   
8851                 # save the flags
8852                 ol_LIBS="$LIBS"
8853                 LIBS="-lc_r $LIBS"
8854
8855                 if test "$cross_compiling" = yes; then
8856   cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 /* pthread test headers */
8860 #include <pthread.h>
8861 #ifndef NULL
8862 #define NULL (void*)0
8863 #endif
8864
8865 static void *task(p)
8866         void *p;
8867 {
8868         return (void *) (p == NULL);
8869 }
8870
8871 int main() {
8872
8873         /* pthread test function */
8874         pthread_t t;
8875         int status;
8876 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8877         /* This system (e.g. AIX) defaults detached; must override */
8878         pthread_attr_t attr;
8879
8880         status = pthread_attr_init(&attr);
8881         if( status ) exit( status );
8882
8883         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8884         if( status ) exit( status );
8885
8886 #define ATTR    &attr
8887 #else
8888 #if HAVE_PTHREADS_D4
8889 #define ATTR    pthread_attr_default
8890 #else
8891 #define ATTR    NULL
8892 #endif
8893 #endif
8894         /* make sure pthread_create() isn't just a stub */
8895         status = pthread_create(&t, ATTR, task, NULL);
8896         if( status ) exit( status );
8897
8898         /* make sure pthread_detach() isn't just a stub */
8899 #if HAVE_PTHREADS_D4
8900         status = pthread_detach( &t );
8901 #else
8902         status = pthread_detach( t );
8903 #endif
8904
8905 #ifdef HAVE_LINUX_THREADS
8906         pthread_kill_other_threads_np();
8907 #endif
8908
8909         exit( status );
8910
8911 ; return 0; }
8912 EOF
8913 if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8914   rm -rf conftest*
8915   ol_cv_pthread_lc_r=yes
8916 else
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -rf conftest*
8920   ol_cv_pthread_lc_r=no
8921 fi
8922 rm -f conftest*
8923 else
8924   cat > conftest.$ac_ext <<EOF
8925 #line 8926 "configure"
8926 #include "confdefs.h"
8927 /* pthread test headers */
8928 #include <pthread.h>
8929 #ifndef NULL
8930 #define NULL (void*)0
8931 #endif
8932
8933 static void *task(p)
8934         void *p;
8935 {
8936         return (void *) (p == NULL);
8937 }
8938
8939
8940 int main(argc, argv)
8941         int argc;
8942         char **argv;
8943 {
8944
8945         /* pthread test function */
8946         pthread_t t;
8947         int status;
8948 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8949         /* This system (e.g. AIX) defaults detached; must override */
8950         pthread_attr_t attr;
8951
8952         status = pthread_attr_init(&attr);
8953         if( status ) exit( status );
8954
8955         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8956         if( status ) exit( status );
8957
8958 #define ATTR    &attr
8959 #else
8960 #if HAVE_PTHREADS_D4
8961 #define ATTR    pthread_attr_default
8962 #else
8963 #define ATTR    NULL
8964 #endif
8965 #endif
8966         /* make sure pthread_create() isn't just a stub */
8967         status = pthread_create(&t, ATTR, task, NULL);
8968         if( status ) exit( status );
8969
8970         /* make sure pthread_detach() isn't just a stub */
8971 #if HAVE_PTHREADS_D4
8972         status = pthread_detach( &t );
8973 #else
8974         status = pthread_detach( t );
8975 #endif
8976
8977 #ifdef HAVE_LINUX_THREADS
8978         pthread_kill_other_threads_np();
8979 #endif
8980
8981         exit( status );
8982
8983 }
8984
8985 EOF
8986 if { (eval echo configure:8987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8987 then
8988   ol_cv_pthread_lc_r=yes
8989 else
8990   echo "configure: failed program was:" >&5
8991   cat conftest.$ac_ext >&5
8992   rm -fr conftest*
8993   ol_cv_pthread_lc_r=no
8994 fi
8995 rm -fr conftest*
8996 fi
8997
8998
8999                 # restore the LIBS
9000                 LIBS="$ol_LIBS"
9001         
9002 fi
9003
9004 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9005
9006         if test $ol_cv_pthread_lc_r = yes ; then
9007                 ol_link_pthreads="-lc_r"
9008                 ol_link_threads=posix
9009         fi
9010 fi
9011
9012
9013                 # Pthread try link: -threads (ol_cv_pthread_threads)
9014 if test "$ol_link_threads" = no ; then
9015         # try -threads
9016         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9017 echo "configure:9018: checking for pthread link with -threads" >&5
9018 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9019   echo $ac_n "(cached) $ac_c" 1>&6
9020 else
9021   
9022                 # save the flags
9023                 ol_LIBS="$LIBS"
9024                 LIBS="-threads $LIBS"
9025
9026                 if test "$cross_compiling" = yes; then
9027   cat > conftest.$ac_ext <<EOF
9028 #line 9029 "configure"
9029 #include "confdefs.h"
9030 /* pthread test headers */
9031 #include <pthread.h>
9032 #ifndef NULL
9033 #define NULL (void*)0
9034 #endif
9035
9036 static void *task(p)
9037         void *p;
9038 {
9039         return (void *) (p == NULL);
9040 }
9041
9042 int main() {
9043
9044         /* pthread test function */
9045         pthread_t t;
9046         int status;
9047 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9048         /* This system (e.g. AIX) defaults detached; must override */
9049         pthread_attr_t attr;
9050
9051         status = pthread_attr_init(&attr);
9052         if( status ) exit( status );
9053
9054         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9055         if( status ) exit( status );
9056
9057 #define ATTR    &attr
9058 #else
9059 #if HAVE_PTHREADS_D4
9060 #define ATTR    pthread_attr_default
9061 #else
9062 #define ATTR    NULL
9063 #endif
9064 #endif
9065         /* make sure pthread_create() isn't just a stub */
9066         status = pthread_create(&t, ATTR, task, NULL);
9067         if( status ) exit( status );
9068
9069         /* make sure pthread_detach() isn't just a stub */
9070 #if HAVE_PTHREADS_D4
9071         status = pthread_detach( &t );
9072 #else
9073         status = pthread_detach( t );
9074 #endif
9075
9076 #ifdef HAVE_LINUX_THREADS
9077         pthread_kill_other_threads_np();
9078 #endif
9079
9080         exit( status );
9081
9082 ; return 0; }
9083 EOF
9084 if { (eval echo configure:9085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9085   rm -rf conftest*
9086   ol_cv_pthread_threads=yes
9087 else
9088   echo "configure: failed program was:" >&5
9089   cat conftest.$ac_ext >&5
9090   rm -rf conftest*
9091   ol_cv_pthread_threads=no
9092 fi
9093 rm -f conftest*
9094 else
9095   cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 /* pthread test headers */
9099 #include <pthread.h>
9100 #ifndef NULL
9101 #define NULL (void*)0
9102 #endif
9103
9104 static void *task(p)
9105         void *p;
9106 {
9107         return (void *) (p == NULL);
9108 }
9109
9110
9111 int main(argc, argv)
9112         int argc;
9113         char **argv;
9114 {
9115
9116         /* pthread test function */
9117         pthread_t t;
9118         int status;
9119 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9120         /* This system (e.g. AIX) defaults detached; must override */
9121         pthread_attr_t attr;
9122
9123         status = pthread_attr_init(&attr);
9124         if( status ) exit( status );
9125
9126         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9127         if( status ) exit( status );
9128
9129 #define ATTR    &attr
9130 #else
9131 #if HAVE_PTHREADS_D4
9132 #define ATTR    pthread_attr_default
9133 #else
9134 #define ATTR    NULL
9135 #endif
9136 #endif
9137         /* make sure pthread_create() isn't just a stub */
9138         status = pthread_create(&t, ATTR, task, NULL);
9139         if( status ) exit( status );
9140
9141         /* make sure pthread_detach() isn't just a stub */
9142 #if HAVE_PTHREADS_D4
9143         status = pthread_detach( &t );
9144 #else
9145         status = pthread_detach( t );
9146 #endif
9147
9148 #ifdef HAVE_LINUX_THREADS
9149         pthread_kill_other_threads_np();
9150 #endif
9151
9152         exit( status );
9153
9154 }
9155
9156 EOF
9157 if { (eval echo configure:9158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9158 then
9159   ol_cv_pthread_threads=yes
9160 else
9161   echo "configure: failed program was:" >&5
9162   cat conftest.$ac_ext >&5
9163   rm -fr conftest*
9164   ol_cv_pthread_threads=no
9165 fi
9166 rm -fr conftest*
9167 fi
9168
9169
9170                 # restore the LIBS
9171                 LIBS="$ol_LIBS"
9172         
9173 fi
9174
9175 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9176
9177         if test $ol_cv_pthread_threads = yes ; then
9178                 ol_link_pthreads="-threads"
9179                 ol_link_threads=posix
9180         fi
9181 fi
9182
9183
9184                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9185 if test "$ol_link_threads" = no ; then
9186         # try -lpthreads -lmach -lexc -lc_r
9187         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9188 echo "configure:9189: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9189 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9190   echo $ac_n "(cached) $ac_c" 1>&6
9191 else
9192   
9193                 # save the flags
9194                 ol_LIBS="$LIBS"
9195                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9196
9197                 if test "$cross_compiling" = yes; then
9198   cat > conftest.$ac_ext <<EOF
9199 #line 9200 "configure"
9200 #include "confdefs.h"
9201 /* pthread test headers */
9202 #include <pthread.h>
9203 #ifndef NULL
9204 #define NULL (void*)0
9205 #endif
9206
9207 static void *task(p)
9208         void *p;
9209 {
9210         return (void *) (p == NULL);
9211 }
9212
9213 int main() {
9214
9215         /* pthread test function */
9216         pthread_t t;
9217         int status;
9218 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9219         /* This system (e.g. AIX) defaults detached; must override */
9220         pthread_attr_t attr;
9221
9222         status = pthread_attr_init(&attr);
9223         if( status ) exit( status );
9224
9225         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9226         if( status ) exit( status );
9227
9228 #define ATTR    &attr
9229 #else
9230 #if HAVE_PTHREADS_D4
9231 #define ATTR    pthread_attr_default
9232 #else
9233 #define ATTR    NULL
9234 #endif
9235 #endif
9236         /* make sure pthread_create() isn't just a stub */
9237         status = pthread_create(&t, ATTR, task, NULL);
9238         if( status ) exit( status );
9239
9240         /* make sure pthread_detach() isn't just a stub */
9241 #if HAVE_PTHREADS_D4
9242         status = pthread_detach( &t );
9243 #else
9244         status = pthread_detach( t );
9245 #endif
9246
9247 #ifdef HAVE_LINUX_THREADS
9248         pthread_kill_other_threads_np();
9249 #endif
9250
9251         exit( status );
9252
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9258 else
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9263 fi
9264 rm -f conftest*
9265 else
9266   cat > conftest.$ac_ext <<EOF
9267 #line 9268 "configure"
9268 #include "confdefs.h"
9269 /* pthread test headers */
9270 #include <pthread.h>
9271 #ifndef NULL
9272 #define NULL (void*)0
9273 #endif
9274
9275 static void *task(p)
9276         void *p;
9277 {
9278         return (void *) (p == NULL);
9279 }
9280
9281
9282 int main(argc, argv)
9283         int argc;
9284         char **argv;
9285 {
9286
9287         /* pthread test function */
9288         pthread_t t;
9289         int status;
9290 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9291         /* This system (e.g. AIX) defaults detached; must override */
9292         pthread_attr_t attr;
9293
9294         status = pthread_attr_init(&attr);
9295         if( status ) exit( status );
9296
9297         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9298         if( status ) exit( status );
9299
9300 #define ATTR    &attr
9301 #else
9302 #if HAVE_PTHREADS_D4
9303 #define ATTR    pthread_attr_default
9304 #else
9305 #define ATTR    NULL
9306 #endif
9307 #endif
9308         /* make sure pthread_create() isn't just a stub */
9309         status = pthread_create(&t, ATTR, task, NULL);
9310         if( status ) exit( status );
9311
9312         /* make sure pthread_detach() isn't just a stub */
9313 #if HAVE_PTHREADS_D4
9314         status = pthread_detach( &t );
9315 #else
9316         status = pthread_detach( t );
9317 #endif
9318
9319 #ifdef HAVE_LINUX_THREADS
9320         pthread_kill_other_threads_np();
9321 #endif
9322
9323         exit( status );
9324
9325 }
9326
9327 EOF
9328 if { (eval echo configure:9329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9329 then
9330   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9331 else
9332   echo "configure: failed program was:" >&5
9333   cat conftest.$ac_ext >&5
9334   rm -fr conftest*
9335   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9336 fi
9337 rm -fr conftest*
9338 fi
9339
9340
9341                 # restore the LIBS
9342                 LIBS="$ol_LIBS"
9343         
9344 fi
9345
9346 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9347
9348         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9349                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9350                 ol_link_threads=posix
9351         fi
9352 fi
9353
9354                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9355 if test "$ol_link_threads" = no ; then
9356         # try -lpthreads -lmach -lexc
9357         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9358 echo "configure:9359: checking for pthread link with -lpthreads -lmach -lexc" >&5
9359 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9360   echo $ac_n "(cached) $ac_c" 1>&6
9361 else
9362   
9363                 # save the flags
9364                 ol_LIBS="$LIBS"
9365                 LIBS="-lpthreads -lmach -lexc $LIBS"
9366
9367                 if test "$cross_compiling" = yes; then
9368   cat > conftest.$ac_ext <<EOF
9369 #line 9370 "configure"
9370 #include "confdefs.h"
9371 /* pthread test headers */
9372 #include <pthread.h>
9373 #ifndef NULL
9374 #define NULL (void*)0
9375 #endif
9376
9377 static void *task(p)
9378         void *p;
9379 {
9380         return (void *) (p == NULL);
9381 }
9382
9383 int main() {
9384
9385         /* pthread test function */
9386         pthread_t t;
9387         int status;
9388 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9389         /* This system (e.g. AIX) defaults detached; must override */
9390         pthread_attr_t attr;
9391
9392         status = pthread_attr_init(&attr);
9393         if( status ) exit( status );
9394
9395         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9396         if( status ) exit( status );
9397
9398 #define ATTR    &attr
9399 #else
9400 #if HAVE_PTHREADS_D4
9401 #define ATTR    pthread_attr_default
9402 #else
9403 #define ATTR    NULL
9404 #endif
9405 #endif
9406         /* make sure pthread_create() isn't just a stub */
9407         status = pthread_create(&t, ATTR, task, NULL);
9408         if( status ) exit( status );
9409
9410         /* make sure pthread_detach() isn't just a stub */
9411 #if HAVE_PTHREADS_D4
9412         status = pthread_detach( &t );
9413 #else
9414         status = pthread_detach( t );
9415 #endif
9416
9417 #ifdef HAVE_LINUX_THREADS
9418         pthread_kill_other_threads_np();
9419 #endif
9420
9421         exit( status );
9422
9423 ; return 0; }
9424 EOF
9425 if { (eval echo configure:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9426   rm -rf conftest*
9427   ol_cv_pthread_lpthreads_lmach_lexc=yes
9428 else
9429   echo "configure: failed program was:" >&5
9430   cat conftest.$ac_ext >&5
9431   rm -rf conftest*
9432   ol_cv_pthread_lpthreads_lmach_lexc=no
9433 fi
9434 rm -f conftest*
9435 else
9436   cat > conftest.$ac_ext <<EOF
9437 #line 9438 "configure"
9438 #include "confdefs.h"
9439 /* pthread test headers */
9440 #include <pthread.h>
9441 #ifndef NULL
9442 #define NULL (void*)0
9443 #endif
9444
9445 static void *task(p)
9446         void *p;
9447 {
9448         return (void *) (p == NULL);
9449 }
9450
9451
9452 int main(argc, argv)
9453         int argc;
9454         char **argv;
9455 {
9456
9457         /* pthread test function */
9458         pthread_t t;
9459         int status;
9460 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9461         /* This system (e.g. AIX) defaults detached; must override */
9462         pthread_attr_t attr;
9463
9464         status = pthread_attr_init(&attr);
9465         if( status ) exit( status );
9466
9467         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9468         if( status ) exit( status );
9469
9470 #define ATTR    &attr
9471 #else
9472 #if HAVE_PTHREADS_D4
9473 #define ATTR    pthread_attr_default
9474 #else
9475 #define ATTR    NULL
9476 #endif
9477 #endif
9478         /* make sure pthread_create() isn't just a stub */
9479         status = pthread_create(&t, ATTR, task, NULL);
9480         if( status ) exit( status );
9481
9482         /* make sure pthread_detach() isn't just a stub */
9483 #if HAVE_PTHREADS_D4
9484         status = pthread_detach( &t );
9485 #else
9486         status = pthread_detach( t );
9487 #endif
9488
9489 #ifdef HAVE_LINUX_THREADS
9490         pthread_kill_other_threads_np();
9491 #endif
9492
9493         exit( status );
9494
9495 }
9496
9497 EOF
9498 if { (eval echo configure:9499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9499 then
9500   ol_cv_pthread_lpthreads_lmach_lexc=yes
9501 else
9502   echo "configure: failed program was:" >&5
9503   cat conftest.$ac_ext >&5
9504   rm -fr conftest*
9505   ol_cv_pthread_lpthreads_lmach_lexc=no
9506 fi
9507 rm -fr conftest*
9508 fi
9509
9510
9511                 # restore the LIBS
9512                 LIBS="$ol_LIBS"
9513         
9514 fi
9515
9516 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9517
9518         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9519                 ol_link_pthreads="-lpthreads -lmach -lexc"
9520                 ol_link_threads=posix
9521         fi
9522 fi
9523
9524                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9525 if test "$ol_link_threads" = no ; then
9526         # try -lpthreads -lexc
9527         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9528 echo "configure:9529: checking for pthread link with -lpthreads -lexc" >&5
9529 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9530   echo $ac_n "(cached) $ac_c" 1>&6
9531 else
9532   
9533                 # save the flags
9534                 ol_LIBS="$LIBS"
9535                 LIBS="-lpthreads -lexc $LIBS"
9536
9537                 if test "$cross_compiling" = yes; then
9538   cat > conftest.$ac_ext <<EOF
9539 #line 9540 "configure"
9540 #include "confdefs.h"
9541 /* pthread test headers */
9542 #include <pthread.h>
9543 #ifndef NULL
9544 #define NULL (void*)0
9545 #endif
9546
9547 static void *task(p)
9548         void *p;
9549 {
9550         return (void *) (p == NULL);
9551 }
9552
9553 int main() {
9554
9555         /* pthread test function */
9556         pthread_t t;
9557         int status;
9558 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9559         /* This system (e.g. AIX) defaults detached; must override */
9560         pthread_attr_t attr;
9561
9562         status = pthread_attr_init(&attr);
9563         if( status ) exit( status );
9564
9565         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9566         if( status ) exit( status );
9567
9568 #define ATTR    &attr
9569 #else
9570 #if HAVE_PTHREADS_D4
9571 #define ATTR    pthread_attr_default
9572 #else
9573 #define ATTR    NULL
9574 #endif
9575 #endif
9576         /* make sure pthread_create() isn't just a stub */
9577         status = pthread_create(&t, ATTR, task, NULL);
9578         if( status ) exit( status );
9579
9580         /* make sure pthread_detach() isn't just a stub */
9581 #if HAVE_PTHREADS_D4
9582         status = pthread_detach( &t );
9583 #else
9584         status = pthread_detach( t );
9585 #endif
9586
9587 #ifdef HAVE_LINUX_THREADS
9588         pthread_kill_other_threads_np();
9589 #endif
9590
9591         exit( status );
9592
9593 ; return 0; }
9594 EOF
9595 if { (eval echo configure:9596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9596   rm -rf conftest*
9597   ol_cv_pthread_lpthreads_lexc=yes
9598 else
9599   echo "configure: failed program was:" >&5
9600   cat conftest.$ac_ext >&5
9601   rm -rf conftest*
9602   ol_cv_pthread_lpthreads_lexc=no
9603 fi
9604 rm -f conftest*
9605 else
9606   cat > conftest.$ac_ext <<EOF
9607 #line 9608 "configure"
9608 #include "confdefs.h"
9609 /* pthread test headers */
9610 #include <pthread.h>
9611 #ifndef NULL
9612 #define NULL (void*)0
9613 #endif
9614
9615 static void *task(p)
9616         void *p;
9617 {
9618         return (void *) (p == NULL);
9619 }
9620
9621
9622 int main(argc, argv)
9623         int argc;
9624         char **argv;
9625 {
9626
9627         /* pthread test function */
9628         pthread_t t;
9629         int status;
9630 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9631         /* This system (e.g. AIX) defaults detached; must override */
9632         pthread_attr_t attr;
9633
9634         status = pthread_attr_init(&attr);
9635         if( status ) exit( status );
9636
9637         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9638         if( status ) exit( status );
9639
9640 #define ATTR    &attr
9641 #else
9642 #if HAVE_PTHREADS_D4
9643 #define ATTR    pthread_attr_default
9644 #else
9645 #define ATTR    NULL
9646 #endif
9647 #endif
9648         /* make sure pthread_create() isn't just a stub */
9649         status = pthread_create(&t, ATTR, task, NULL);
9650         if( status ) exit( status );
9651
9652         /* make sure pthread_detach() isn't just a stub */
9653 #if HAVE_PTHREADS_D4
9654         status = pthread_detach( &t );
9655 #else
9656         status = pthread_detach( t );
9657 #endif
9658
9659 #ifdef HAVE_LINUX_THREADS
9660         pthread_kill_other_threads_np();
9661 #endif
9662
9663         exit( status );
9664
9665 }
9666
9667 EOF
9668 if { (eval echo configure:9669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9669 then
9670   ol_cv_pthread_lpthreads_lexc=yes
9671 else
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674   rm -fr conftest*
9675   ol_cv_pthread_lpthreads_lexc=no
9676 fi
9677 rm -fr conftest*
9678 fi
9679
9680
9681                 # restore the LIBS
9682                 LIBS="$ol_LIBS"
9683         
9684 fi
9685
9686 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9687
9688         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9689                 ol_link_pthreads="-lpthreads -lexc"
9690                 ol_link_threads=posix
9691         fi
9692 fi
9693
9694
9695                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9696 if test "$ol_link_threads" = no ; then
9697         # try -lpthreads
9698         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9699 echo "configure:9700: checking for pthread link with -lpthreads" >&5
9700 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9701   echo $ac_n "(cached) $ac_c" 1>&6
9702 else
9703   
9704                 # save the flags
9705                 ol_LIBS="$LIBS"
9706                 LIBS="-lpthreads $LIBS"
9707
9708                 if test "$cross_compiling" = yes; then
9709   cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 /* pthread test headers */
9713 #include <pthread.h>
9714 #ifndef NULL
9715 #define NULL (void*)0
9716 #endif
9717
9718 static void *task(p)
9719         void *p;
9720 {
9721         return (void *) (p == NULL);
9722 }
9723
9724 int main() {
9725
9726         /* pthread test function */
9727         pthread_t t;
9728         int status;
9729 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9730         /* This system (e.g. AIX) defaults detached; must override */
9731         pthread_attr_t attr;
9732
9733         status = pthread_attr_init(&attr);
9734         if( status ) exit( status );
9735
9736         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9737         if( status ) exit( status );
9738
9739 #define ATTR    &attr
9740 #else
9741 #if HAVE_PTHREADS_D4
9742 #define ATTR    pthread_attr_default
9743 #else
9744 #define ATTR    NULL
9745 #endif
9746 #endif
9747         /* make sure pthread_create() isn't just a stub */
9748         status = pthread_create(&t, ATTR, task, NULL);
9749         if( status ) exit( status );
9750
9751         /* make sure pthread_detach() isn't just a stub */
9752 #if HAVE_PTHREADS_D4
9753         status = pthread_detach( &t );
9754 #else
9755         status = pthread_detach( t );
9756 #endif
9757
9758 #ifdef HAVE_LINUX_THREADS
9759         pthread_kill_other_threads_np();
9760 #endif
9761
9762         exit( status );
9763
9764 ; return 0; }
9765 EOF
9766 if { (eval echo configure:9767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9767   rm -rf conftest*
9768   ol_cv_pthread_lib_lpthreads=yes
9769 else
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -rf conftest*
9773   ol_cv_pthread_lib_lpthreads=no
9774 fi
9775 rm -f conftest*
9776 else
9777   cat > conftest.$ac_ext <<EOF
9778 #line 9779 "configure"
9779 #include "confdefs.h"
9780 /* pthread test headers */
9781 #include <pthread.h>
9782 #ifndef NULL
9783 #define NULL (void*)0
9784 #endif
9785
9786 static void *task(p)
9787         void *p;
9788 {
9789         return (void *) (p == NULL);
9790 }
9791
9792
9793 int main(argc, argv)
9794         int argc;
9795         char **argv;
9796 {
9797
9798         /* pthread test function */
9799         pthread_t t;
9800         int status;
9801 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9802         /* This system (e.g. AIX) defaults detached; must override */
9803         pthread_attr_t attr;
9804
9805         status = pthread_attr_init(&attr);
9806         if( status ) exit( status );
9807
9808         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9809         if( status ) exit( status );
9810
9811 #define ATTR    &attr
9812 #else
9813 #if HAVE_PTHREADS_D4
9814 #define ATTR    pthread_attr_default
9815 #else
9816 #define ATTR    NULL
9817 #endif
9818 #endif
9819         /* make sure pthread_create() isn't just a stub */
9820         status = pthread_create(&t, ATTR, task, NULL);
9821         if( status ) exit( status );
9822
9823         /* make sure pthread_detach() isn't just a stub */
9824 #if HAVE_PTHREADS_D4
9825         status = pthread_detach( &t );
9826 #else
9827         status = pthread_detach( t );
9828 #endif
9829
9830 #ifdef HAVE_LINUX_THREADS
9831         pthread_kill_other_threads_np();
9832 #endif
9833
9834         exit( status );
9835
9836 }
9837
9838 EOF
9839 if { (eval echo configure:9840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9840 then
9841   ol_cv_pthread_lib_lpthreads=yes
9842 else
9843   echo "configure: failed program was:" >&5
9844   cat conftest.$ac_ext >&5
9845   rm -fr conftest*
9846   ol_cv_pthread_lib_lpthreads=no
9847 fi
9848 rm -fr conftest*
9849 fi
9850
9851
9852                 # restore the LIBS
9853                 LIBS="$ol_LIBS"
9854         
9855 fi
9856
9857 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9858
9859         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9860                 ol_link_pthreads="-lpthreads"
9861                 ol_link_threads=posix
9862         fi
9863 fi
9864
9865
9866                 if test $ol_link_threads != no ; then
9867                         cat >> confdefs.h <<\EOF
9868 #define HAVE_PTHREADS 1
9869 EOF
9870
9871
9872                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9873
9874                                                 save_CPPFLAGS="$CPPFLAGS"
9875                         save_LIBS="$LIBS"
9876                         LIBS="$LTHREAD_LIBS $LIBS"
9877
9878                                                                                                 for ac_func in sched_yield pthread_yield
9879 do
9880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9881 echo "configure:9882: checking for $ac_func" >&5
9882 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9883   echo $ac_n "(cached) $ac_c" 1>&6
9884 else
9885   cat > conftest.$ac_ext <<EOF
9886 #line 9887 "configure"
9887 #include "confdefs.h"
9888 /* System header to define __stub macros and hopefully few prototypes,
9889     which can conflict with char $ac_func(); below.  */
9890 #include <assert.h>
9891 /* Override any gcc2 internal prototype to avoid an error.  */
9892 /* We use char because int might match the return type of a gcc2
9893     builtin and then its argument prototype would still apply.  */
9894 char $ac_func();
9895 char (*f)();
9896
9897 int main() {
9898
9899 /* The GNU C library defines this for functions which it implements
9900     to always fail with ENOSYS.  Some functions are actually named
9901     something starting with __ and the normal name is an alias.  */
9902 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9903 choke me
9904 #else
9905 f = $ac_func;
9906 #endif
9907
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9911   rm -rf conftest*
9912   eval "ac_cv_func_$ac_func=yes"
9913 else
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   eval "ac_cv_func_$ac_func=no"
9918 fi
9919 rm -f conftest*
9920 fi
9921
9922 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9923   echo "$ac_t""yes" 1>&6
9924     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9925   cat >> confdefs.h <<EOF
9926 #define $ac_tr_func 1
9927 EOF
9928  
9929 else
9930   echo "$ac_t""no" 1>&6
9931 fi
9932 done
9933
9934
9935                         if test $ac_cv_func_sched_yield = no -a \
9936                                 $ac_cv_func_pthread_yield = no ; then
9937                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9938 echo "configure:9939: checking for sched_yield in -lrt" >&5
9939 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9941   echo $ac_n "(cached) $ac_c" 1>&6
9942 else
9943   ac_save_LIBS="$LIBS"
9944 LIBS="-lrt  $LIBS"
9945 cat > conftest.$ac_ext <<EOF
9946 #line 9947 "configure"
9947 #include "confdefs.h"
9948 /* Override any gcc2 internal prototype to avoid an error.  */
9949 /* We use char because int might match the return type of a gcc2
9950     builtin and then its argument prototype would still apply.  */
9951 char sched_yield();
9952
9953 int main() {
9954 sched_yield()
9955 ; return 0; }
9956 EOF
9957 if { (eval echo configure:9958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9958   rm -rf conftest*
9959   eval "ac_cv_lib_$ac_lib_var=yes"
9960 else
9961   echo "configure: failed program was:" >&5
9962   cat conftest.$ac_ext >&5
9963   rm -rf conftest*
9964   eval "ac_cv_lib_$ac_lib_var=no"
9965 fi
9966 rm -f conftest*
9967 LIBS="$ac_save_LIBS"
9968
9969 fi
9970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9971   echo "$ac_t""yes" 1>&6
9972   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9973                                         cat >> confdefs.h <<\EOF
9974 #define HAVE_SCHED_YIELD 1
9975 EOF
9976
9977                                         ac_cv_func_sched_yield=yes
9978 else
9979   echo "$ac_t""no" 1>&6
9980 ac_cv_func_sched_yield=no
9981 fi
9982
9983                         fi
9984                         if test $ac_cv_func_sched_yield = no -a \
9985                                 $ac_cv_func_pthread_yield = no ; then
9986                                                                                                 for ac_func in thr_yield
9987 do
9988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9989 echo "configure:9990: checking for $ac_func" >&5
9990 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9991   echo $ac_n "(cached) $ac_c" 1>&6
9992 else
9993   cat > conftest.$ac_ext <<EOF
9994 #line 9995 "configure"
9995 #include "confdefs.h"
9996 /* System header to define __stub macros and hopefully few prototypes,
9997     which can conflict with char $ac_func(); below.  */
9998 #include <assert.h>
9999 /* Override any gcc2 internal prototype to avoid an error.  */
10000 /* We use char because int might match the return type of a gcc2
10001     builtin and then its argument prototype would still apply.  */
10002 char $ac_func();
10003 char (*f)();
10004
10005 int main() {
10006
10007 /* The GNU C library defines this for functions which it implements
10008     to always fail with ENOSYS.  Some functions are actually named
10009     something starting with __ and the normal name is an alias.  */
10010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10011 choke me
10012 #else
10013 f = $ac_func;
10014 #endif
10015
10016 ; return 0; }
10017 EOF
10018 if { (eval echo configure:10019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10019   rm -rf conftest*
10020   eval "ac_cv_func_$ac_func=yes"
10021 else
10022   echo "configure: failed program was:" >&5
10023   cat conftest.$ac_ext >&5
10024   rm -rf conftest*
10025   eval "ac_cv_func_$ac_func=no"
10026 fi
10027 rm -f conftest*
10028 fi
10029
10030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10031   echo "$ac_t""yes" 1>&6
10032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10033   cat >> confdefs.h <<EOF
10034 #define $ac_tr_func 1
10035 EOF
10036  
10037 else
10038   echo "$ac_t""no" 1>&6
10039 fi
10040 done
10041
10042                         fi
10043                         if test $ac_cv_func_sched_yield = no -a \
10044                                 $ac_cv_func_pthread_yield = no -a \
10045                                 "$ac_cv_func_thr_yield" = no ; then
10046                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10047                         fi
10048
10049                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10050 do
10051 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10052 echo "configure:10053: checking for $ac_func" >&5
10053 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10054   echo $ac_n "(cached) $ac_c" 1>&6
10055 else
10056   cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10059 /* System header to define __stub macros and hopefully few prototypes,
10060     which can conflict with char $ac_func(); below.  */
10061 #include <assert.h>
10062 /* Override any gcc2 internal prototype to avoid an error.  */
10063 /* We use char because int might match the return type of a gcc2
10064     builtin and then its argument prototype would still apply.  */
10065 char $ac_func();
10066 char (*f)();
10067
10068 int main() {
10069
10070 /* The GNU C library defines this for functions which it implements
10071     to always fail with ENOSYS.  Some functions are actually named
10072     something starting with __ and the normal name is an alias.  */
10073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10074 choke me
10075 #else
10076 f = $ac_func;
10077 #endif
10078
10079 ; return 0; }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10082   rm -rf conftest*
10083   eval "ac_cv_func_$ac_func=yes"
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -rf conftest*
10088   eval "ac_cv_func_$ac_func=no"
10089 fi
10090 rm -f conftest*
10091 fi
10092
10093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10094   echo "$ac_t""yes" 1>&6
10095     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10096   cat >> confdefs.h <<EOF
10097 #define $ac_tr_func 1
10098 EOF
10099  
10100 else
10101   echo "$ac_t""no" 1>&6
10102 fi
10103 done
10104
10105
10106                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10107 echo "configure:10108: checking for pthread_detach with <pthread.h>" >&5
10108 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10109   echo $ac_n "(cached) $ac_c" 1>&6
10110 else
10111   
10112                                                                 cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115
10116 #include <pthread.h>
10117 #ifndef NULL
10118 #define NULL (void*)0
10119 #endif
10120
10121 int main() {
10122 pthread_detach(NULL);
10123 ; return 0; }
10124 EOF
10125 if { (eval echo configure:10126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10126   rm -rf conftest*
10127   ol_cv_func_pthread_detach=yes
10128 else
10129   echo "configure: failed program was:" >&5
10130   cat conftest.$ac_ext >&5
10131   rm -rf conftest*
10132   ol_cv_func_pthread_detach=no
10133 fi
10134 rm -f conftest*
10135                         
10136 fi
10137
10138 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10139
10140                         if test $ol_cv_func_pthread_detach = no ; then
10141                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10142                         fi
10143
10144                         cat >> confdefs.h <<\EOF
10145 #define HAVE_PTHREAD_DETACH 1
10146 EOF
10147
10148
10149                                                 for ac_func in \
10150                                 pthread_setconcurrency \
10151                                 pthread_getconcurrency \
10152                                 thr_setconcurrency \
10153                                 thr_getconcurrency \
10154                         
10155 do
10156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10157 echo "configure:10158: checking for $ac_func" >&5
10158 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   cat > conftest.$ac_ext <<EOF
10162 #line 10163 "configure"
10163 #include "confdefs.h"
10164 /* System header to define __stub macros and hopefully few prototypes,
10165     which can conflict with char $ac_func(); below.  */
10166 #include <assert.h>
10167 /* Override any gcc2 internal prototype to avoid an error.  */
10168 /* We use char because int might match the return type of a gcc2
10169     builtin and then its argument prototype would still apply.  */
10170 char $ac_func();
10171 char (*f)();
10172
10173 int main() {
10174
10175 /* The GNU C library defines this for functions which it implements
10176     to always fail with ENOSYS.  Some functions are actually named
10177     something starting with __ and the normal name is an alias.  */
10178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10179 choke me
10180 #else
10181 f = $ac_func;
10182 #endif
10183
10184 ; return 0; }
10185 EOF
10186 if { (eval echo configure:10187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10187   rm -rf conftest*
10188   eval "ac_cv_func_$ac_func=yes"
10189 else
10190   echo "configure: failed program was:" >&5
10191   cat conftest.$ac_ext >&5
10192   rm -rf conftest*
10193   eval "ac_cv_func_$ac_func=no"
10194 fi
10195 rm -f conftest*
10196 fi
10197
10198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10199   echo "$ac_t""yes" 1>&6
10200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10201   cat >> confdefs.h <<EOF
10202 #define $ac_tr_func 1
10203 EOF
10204  
10205 else
10206   echo "$ac_t""no" 1>&6
10207 fi
10208 done
10209
10210
10211                         
10212         for ac_func in pthread_kill_other_threads_np
10213 do
10214 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10215 echo "configure:10216: checking for $ac_func" >&5
10216 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10217   echo $ac_n "(cached) $ac_c" 1>&6
10218 else
10219   cat > conftest.$ac_ext <<EOF
10220 #line 10221 "configure"
10221 #include "confdefs.h"
10222 /* System header to define __stub macros and hopefully few prototypes,
10223     which can conflict with char $ac_func(); below.  */
10224 #include <assert.h>
10225 /* Override any gcc2 internal prototype to avoid an error.  */
10226 /* We use char because int might match the return type of a gcc2
10227     builtin and then its argument prototype would still apply.  */
10228 char $ac_func();
10229 char (*f)();
10230
10231 int main() {
10232
10233 /* The GNU C library defines this for functions which it implements
10234     to always fail with ENOSYS.  Some functions are actually named
10235     something starting with __ and the normal name is an alias.  */
10236 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10237 choke me
10238 #else
10239 f = $ac_func;
10240 #endif
10241
10242 ; return 0; }
10243 EOF
10244 if { (eval echo configure:10245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10245   rm -rf conftest*
10246   eval "ac_cv_func_$ac_func=yes"
10247 else
10248   echo "configure: failed program was:" >&5
10249   cat conftest.$ac_ext >&5
10250   rm -rf conftest*
10251   eval "ac_cv_func_$ac_func=no"
10252 fi
10253 rm -f conftest*
10254 fi
10255
10256 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10257   echo "$ac_t""yes" 1>&6
10258     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10259   cat >> confdefs.h <<EOF
10260 #define $ac_tr_func 1
10261 EOF
10262  
10263 else
10264   echo "$ac_t""no" 1>&6
10265 fi
10266 done
10267
10268         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10269 echo "configure:10270: checking for LinuxThreads implementation" >&5
10270 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10271   echo $ac_n "(cached) $ac_c" 1>&6
10272 else
10273   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10274 fi
10275
10276 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10277
10278                         
10279         
10280         
10281         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10282 echo "configure:10283: checking for LinuxThreads consistency" >&5
10283 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10284   echo $ac_n "(cached) $ac_c" 1>&6
10285 else
10286   
10287                 if test $ol_cv_header_linux_threads = yes -a \
10288                         $ol_cv_sys_linux_threads = yes; then
10289                         ol_cv_linux_threads=yes
10290                 elif test $ol_cv_header_linux_threads = no -a \
10291                         $ol_cv_sys_linux_threads = no; then
10292                         ol_cv_linux_threads=no
10293                 else
10294                         ol_cv_linux_threads=error
10295                 fi
10296         
10297 fi
10298
10299 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10300
10301
10302                         if test $ol_cv_linux_threads = error; then
10303                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10304                         fi
10305
10306                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10307 echo "configure:10308: checking if pthread_create() works" >&5
10308 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10309   echo $ac_n "(cached) $ac_c" 1>&6
10310 else
10311   
10312                         if test "$cross_compiling" = yes; then
10313                                 ol_cv_pthread_create_works=yes
10314 else
10315   cat > conftest.$ac_ext <<EOF
10316 #line 10317 "configure"
10317 #include "confdefs.h"
10318 /* pthread test headers */
10319 #include <pthread.h>
10320 #ifndef NULL
10321 #define NULL (void*)0
10322 #endif
10323
10324 static void *task(p)
10325         void *p;
10326 {
10327         return (void *) (p == NULL);
10328 }
10329
10330
10331 int main(argc, argv)
10332         int argc;
10333         char **argv;
10334 {
10335
10336         /* pthread test function */
10337         pthread_t t;
10338         int status;
10339 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10340         /* This system (e.g. AIX) defaults detached; must override */
10341         pthread_attr_t attr;
10342
10343         status = pthread_attr_init(&attr);
10344         if( status ) exit( status );
10345
10346         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10347         if( status ) exit( status );
10348
10349 #define ATTR    &attr
10350 #else
10351 #if HAVE_PTHREADS_D4
10352 #define ATTR    pthread_attr_default
10353 #else
10354 #define ATTR    NULL
10355 #endif
10356 #endif
10357         /* make sure pthread_create() isn't just a stub */
10358         status = pthread_create(&t, ATTR, task, NULL);
10359         if( status ) exit( status );
10360
10361         /* make sure pthread_detach() isn't just a stub */
10362 #if HAVE_PTHREADS_D4
10363         status = pthread_detach( &t );
10364 #else
10365         status = pthread_detach( t );
10366 #endif
10367
10368 #ifdef HAVE_LINUX_THREADS
10369         pthread_kill_other_threads_np();
10370 #endif
10371
10372         exit( status );
10373
10374 }
10375
10376 EOF
10377 if { (eval echo configure:10378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10378 then
10379   ol_cv_pthread_create_works=yes
10380 else
10381   echo "configure: failed program was:" >&5
10382   cat conftest.$ac_ext >&5
10383   rm -fr conftest*
10384   ol_cv_pthread_create_works=no
10385 fi
10386 rm -fr conftest*
10387 fi
10388
10389 fi
10390
10391 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10392
10393                         if test $ol_cv_pthread_create_works = no ; then
10394                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10395                         fi
10396
10397                                                 if test $ol_with_yielding_select = auto ; then
10398                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10399 echo "configure:10400: checking if select yields when using pthreads" >&5
10400 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10401   echo $ac_n "(cached) $ac_c" 1>&6
10402 else
10403   
10404                                 if test "$cross_compiling" = yes; then
10405   ol_cv_pthread_select_yields=cross
10406 else
10407   cat > conftest.$ac_ext <<EOF
10408 #line 10409 "configure"
10409 #include "confdefs.h"
10410
10411 #include <sys/types.h>
10412 #include <sys/time.h>
10413 #include <unistd.h>
10414 #include <pthread.h>
10415 #ifndef NULL
10416 #define NULL (void*) 0
10417 #endif
10418
10419 static int fildes[2];
10420
10421 static void *task(p)
10422         void *p;
10423 {
10424         int i;
10425         struct timeval tv;
10426
10427         fd_set rfds;
10428
10429         tv.tv_sec=10;
10430         tv.tv_usec=0;
10431
10432         FD_ZERO(&rfds);
10433         FD_SET(fildes[0], &rfds);
10434
10435         /* we're not interested in any fds */
10436         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10437
10438         if(i < 0) {
10439                 perror("select");
10440                 exit(10);
10441         }
10442
10443         exit(0); /* if we exit here, the select blocked the whole process */
10444 }
10445
10446 int main(argc, argv)
10447         int argc;
10448         char **argv;
10449 {
10450         pthread_t t;
10451
10452         /* create a pipe to select */
10453         if(pipe(&fildes[0])) {
10454                 perror("select");
10455                 exit(1);
10456         }
10457
10458 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10459         (void) pthread_setconcurrency(2);
10460 #else
10461 #ifdef HAVE_THR_SETCONCURRENCY
10462         /* Set Solaris LWP concurrency to 2 */
10463         thr_setconcurrency(2);
10464 #endif
10465 #endif
10466
10467 #if HAVE_PTHREADS_D4
10468         pthread_create(&t, pthread_attr_default, task, NULL);
10469 #else
10470         pthread_create(&t, NULL, task, NULL);
10471 #endif
10472
10473 #if HAVE_SCHED_YIELD
10474         sched_yield();  /* make sure task runs first */
10475 #else
10476 #ifdef HAVE_PTHREAD_YIELD
10477         pthread_yield();        /* make sure task runs first */
10478 #endif
10479 #endif
10480
10481         exit(2);
10482 }
10483 EOF
10484 if { (eval echo configure:10485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10485 then
10486   ol_cv_pthread_select_yields=no
10487 else
10488   echo "configure: failed program was:" >&5
10489   cat conftest.$ac_ext >&5
10490   rm -fr conftest*
10491   ol_cv_pthread_select_yields=yes
10492 fi
10493 rm -fr conftest*
10494 fi
10495
10496 fi
10497
10498 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10499
10500                                 if test $ol_cv_pthread_select_yields = cross ; then
10501                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10502                                 fi
10503
10504                                 if test $ol_cv_pthread_select_yields = yes ; then
10505                                         ol_with_yielding_select=yes
10506                                 fi
10507                         fi
10508
10509                                                 CPPFLAGS="$save_CPPFLAGS"
10510                         LIBS="$save_LIBS"
10511                 else
10512                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10513                 fi
10514         fi
10515
10516         if test $ol_with_threads = posix ; then
10517                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10518         fi
10519 fi
10520
10521 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10522         -o $ol_with_threads = mach ; then
10523
10524                 for ac_hdr in mach/cthreads.h
10525 do
10526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10528 echo "configure:10529: checking for $ac_hdr" >&5
10529 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10530   echo $ac_n "(cached) $ac_c" 1>&6
10531 else
10532   cat > conftest.$ac_ext <<EOF
10533 #line 10534 "configure"
10534 #include "confdefs.h"
10535 #include <$ac_hdr>
10536 EOF
10537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10538 { (eval echo configure:10539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10540 if test -z "$ac_err"; then
10541   rm -rf conftest*
10542   eval "ac_cv_header_$ac_safe=yes"
10543 else
10544   echo "$ac_err" >&5
10545   echo "configure: failed program was:" >&5
10546   cat conftest.$ac_ext >&5
10547   rm -rf conftest*
10548   eval "ac_cv_header_$ac_safe=no"
10549 fi
10550 rm -f conftest*
10551 fi
10552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10553   echo "$ac_t""yes" 1>&6
10554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10555   cat >> confdefs.h <<EOF
10556 #define $ac_tr_hdr 1
10557 EOF
10558  
10559 else
10560   echo "$ac_t""no" 1>&6
10561 fi
10562 done
10563
10564         if test $ac_cv_header_mach_cthreads_h = yes ; then
10565                 ol_with_threads=found
10566
10567                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10568 echo "configure:10569: checking for cthread_fork" >&5
10569 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10570   echo $ac_n "(cached) $ac_c" 1>&6
10571 else
10572   cat > conftest.$ac_ext <<EOF
10573 #line 10574 "configure"
10574 #include "confdefs.h"
10575 /* System header to define __stub macros and hopefully few prototypes,
10576     which can conflict with char cthread_fork(); below.  */
10577 #include <assert.h>
10578 /* Override any gcc2 internal prototype to avoid an error.  */
10579 /* We use char because int might match the return type of a gcc2
10580     builtin and then its argument prototype would still apply.  */
10581 char cthread_fork();
10582 char (*f)();
10583
10584 int main() {
10585
10586 /* The GNU C library defines this for functions which it implements
10587     to always fail with ENOSYS.  Some functions are actually named
10588     something starting with __ and the normal name is an alias.  */
10589 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10590 choke me
10591 #else
10592 f = cthread_fork;
10593 #endif
10594
10595 ; return 0; }
10596 EOF
10597 if { (eval echo configure:10598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10598   rm -rf conftest*
10599   eval "ac_cv_func_cthread_fork=yes"
10600 else
10601   echo "configure: failed program was:" >&5
10602   cat conftest.$ac_ext >&5
10603   rm -rf conftest*
10604   eval "ac_cv_func_cthread_fork=no"
10605 fi
10606 rm -f conftest*
10607 fi
10608
10609 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10610   echo "$ac_t""yes" 1>&6
10611   ol_link_threads=yes
10612 else
10613   echo "$ac_t""no" 1>&6
10614 fi
10615
10616
10617                 if test $ol_link_threads = no ; then
10618                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10619 echo "configure:10620: checking for cthread_fork with -all_load" >&5
10620 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10621   echo $ac_n "(cached) $ac_c" 1>&6
10622 else
10623   
10624                                                                 save_LIBS="$LIBS"
10625                                 LIBS="-all_load $LIBS"
10626                                 cat > conftest.$ac_ext <<EOF
10627 #line 10628 "configure"
10628 #include "confdefs.h"
10629 #include <mach/cthreads.h>
10630 int main() {
10631
10632                                         cthread_fork((void *)0, (void *)0);
10633                                         
10634 ; return 0; }
10635 EOF
10636 if { (eval echo configure:10637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10637   rm -rf conftest*
10638   ol_cv_cthread_all_load=yes
10639 else
10640   echo "configure: failed program was:" >&5
10641   cat conftest.$ac_ext >&5
10642   rm -rf conftest*
10643   ol_cv_cthread_all_load=no
10644 fi
10645 rm -f conftest*
10646                                                                 LIBS="$save_LIBS"
10647                         
10648 fi
10649
10650 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10651
10652                         if test $ol_cv_cthread_all_load = yes ; then
10653                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10654                                 ol_link_threads=mach
10655                         fi
10656                 fi
10657
10658                 if test $ol_link_threads != no ; then
10659                         : check for cthread specific functionality here
10660                         cat >> confdefs.h <<\EOF
10661 #define HAVE_MACH_CTHREADS 1
10662 EOF
10663
10664                 else
10665                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10666                 fi
10667         fi
10668
10669         if test $ol_with_threads = mach ; then
10670                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10671         fi
10672 fi
10673
10674 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10675         -o $ol_with_threads = pth ; then
10676
10677         for ac_hdr in pth.h
10678 do
10679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10681 echo "configure:10682: checking for $ac_hdr" >&5
10682 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10683   echo $ac_n "(cached) $ac_c" 1>&6
10684 else
10685   cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688 #include <$ac_hdr>
10689 EOF
10690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10691 { (eval echo configure:10692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10693 if test -z "$ac_err"; then
10694   rm -rf conftest*
10695   eval "ac_cv_header_$ac_safe=yes"
10696 else
10697   echo "$ac_err" >&5
10698   echo "configure: failed program was:" >&5
10699   cat conftest.$ac_ext >&5
10700   rm -rf conftest*
10701   eval "ac_cv_header_$ac_safe=no"
10702 fi
10703 rm -f conftest*
10704 fi
10705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10706   echo "$ac_t""yes" 1>&6
10707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10708   cat >> confdefs.h <<EOF
10709 #define $ac_tr_hdr 1
10710 EOF
10711  
10712 else
10713   echo "$ac_t""no" 1>&6
10714 fi
10715 done
10716
10717
10718         if test $ac_cv_header_pth_h = yes ; then
10719                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10720 echo "configure:10721: checking for pth_version in -lpth" >&5
10721 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10722 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10723   echo $ac_n "(cached) $ac_c" 1>&6
10724 else
10725   ac_save_LIBS="$LIBS"
10726 LIBS="-lpth  $LIBS"
10727 cat > conftest.$ac_ext <<EOF
10728 #line 10729 "configure"
10729 #include "confdefs.h"
10730 /* Override any gcc2 internal prototype to avoid an error.  */
10731 /* We use char because int might match the return type of a gcc2
10732     builtin and then its argument prototype would still apply.  */
10733 char pth_version();
10734
10735 int main() {
10736 pth_version()
10737 ; return 0; }
10738 EOF
10739 if { (eval echo configure:10740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10740   rm -rf conftest*
10741   eval "ac_cv_lib_$ac_lib_var=yes"
10742 else
10743   echo "configure: failed program was:" >&5
10744   cat conftest.$ac_ext >&5
10745   rm -rf conftest*
10746   eval "ac_cv_lib_$ac_lib_var=no"
10747 fi
10748 rm -f conftest*
10749 LIBS="$ac_save_LIBS"
10750
10751 fi
10752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10753   echo "$ac_t""yes" 1>&6
10754   have_pth=yes
10755 else
10756   echo "$ac_t""no" 1>&6
10757 have_pth=no
10758 fi
10759
10760
10761                 if test $have_pth = yes ; then
10762                         cat >> confdefs.h <<\EOF
10763 #define HAVE_GNU_PTH 1
10764 EOF
10765
10766                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10767                         ol_link_threads=pth
10768
10769                         if test $ol_with_yielding_select = auto ; then
10770                                 ol_with_yielding_select=yes
10771                         fi
10772                 fi
10773         fi
10774 fi
10775
10776 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10777         -o $ol_with_threads = lwp ; then
10778
10779                 for ac_hdr in thread.h synch.h
10780 do
10781 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10782 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10783 echo "configure:10784: checking for $ac_hdr" >&5
10784 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10785   echo $ac_n "(cached) $ac_c" 1>&6
10786 else
10787   cat > conftest.$ac_ext <<EOF
10788 #line 10789 "configure"
10789 #include "confdefs.h"
10790 #include <$ac_hdr>
10791 EOF
10792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10793 { (eval echo configure:10794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10795 if test -z "$ac_err"; then
10796   rm -rf conftest*
10797   eval "ac_cv_header_$ac_safe=yes"
10798 else
10799   echo "$ac_err" >&5
10800   echo "configure: failed program was:" >&5
10801   cat conftest.$ac_ext >&5
10802   rm -rf conftest*
10803   eval "ac_cv_header_$ac_safe=no"
10804 fi
10805 rm -f conftest*
10806 fi
10807 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10808   echo "$ac_t""yes" 1>&6
10809     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10810   cat >> confdefs.h <<EOF
10811 #define $ac_tr_hdr 1
10812 EOF
10813  
10814 else
10815   echo "$ac_t""no" 1>&6
10816 fi
10817 done
10818
10819         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10820                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10821 echo "configure:10822: checking for thr_create in -lthread" >&5
10822 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   ac_save_LIBS="$LIBS"
10827 LIBS="-lthread  $LIBS"
10828 cat > conftest.$ac_ext <<EOF
10829 #line 10830 "configure"
10830 #include "confdefs.h"
10831 /* Override any gcc2 internal prototype to avoid an error.  */
10832 /* We use char because int might match the return type of a gcc2
10833     builtin and then its argument prototype would still apply.  */
10834 char thr_create();
10835
10836 int main() {
10837 thr_create()
10838 ; return 0; }
10839 EOF
10840 if { (eval echo configure:10841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10841   rm -rf conftest*
10842   eval "ac_cv_lib_$ac_lib_var=yes"
10843 else
10844   echo "configure: failed program was:" >&5
10845   cat conftest.$ac_ext >&5
10846   rm -rf conftest*
10847   eval "ac_cv_lib_$ac_lib_var=no"
10848 fi
10849 rm -f conftest*
10850 LIBS="$ac_save_LIBS"
10851
10852 fi
10853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10854   echo "$ac_t""yes" 1>&6
10855   have_thr=yes
10856 else
10857   echo "$ac_t""no" 1>&6
10858 have_thr=no
10859 fi
10860
10861
10862                 if test $have_thr = yes ; then
10863                         cat >> confdefs.h <<\EOF
10864 #define HAVE_THR 1
10865 EOF
10866
10867                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10868                         ol_link_threads=thr
10869
10870                         if test $ol_with_yielding_select = auto ; then
10871                                 ol_with_yielding_select=yes
10872                         fi
10873
10874                                                 for ac_func in \
10875                                 thr_setconcurrency \
10876                                 thr_getconcurrency \
10877                         
10878 do
10879 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10880 echo "configure:10881: checking for $ac_func" >&5
10881 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10882   echo $ac_n "(cached) $ac_c" 1>&6
10883 else
10884   cat > conftest.$ac_ext <<EOF
10885 #line 10886 "configure"
10886 #include "confdefs.h"
10887 /* System header to define __stub macros and hopefully few prototypes,
10888     which can conflict with char $ac_func(); below.  */
10889 #include <assert.h>
10890 /* Override any gcc2 internal prototype to avoid an error.  */
10891 /* We use char because int might match the return type of a gcc2
10892     builtin and then its argument prototype would still apply.  */
10893 char $ac_func();
10894 char (*f)();
10895
10896 int main() {
10897
10898 /* The GNU C library defines this for functions which it implements
10899     to always fail with ENOSYS.  Some functions are actually named
10900     something starting with __ and the normal name is an alias.  */
10901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10902 choke me
10903 #else
10904 f = $ac_func;
10905 #endif
10906
10907 ; return 0; }
10908 EOF
10909 if { (eval echo configure:10910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10910   rm -rf conftest*
10911   eval "ac_cv_func_$ac_func=yes"
10912 else
10913   echo "configure: failed program was:" >&5
10914   cat conftest.$ac_ext >&5
10915   rm -rf conftest*
10916   eval "ac_cv_func_$ac_func=no"
10917 fi
10918 rm -f conftest*
10919 fi
10920
10921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10922   echo "$ac_t""yes" 1>&6
10923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10924   cat >> confdefs.h <<EOF
10925 #define $ac_tr_func 1
10926 EOF
10927  
10928 else
10929   echo "$ac_t""no" 1>&6
10930 fi
10931 done
10932
10933                 fi
10934         fi
10935
10936                 for ac_hdr in lwp/lwp.h
10937 do
10938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10940 echo "configure:10941: checking for $ac_hdr" >&5
10941 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10942   echo $ac_n "(cached) $ac_c" 1>&6
10943 else
10944   cat > conftest.$ac_ext <<EOF
10945 #line 10946 "configure"
10946 #include "confdefs.h"
10947 #include <$ac_hdr>
10948 EOF
10949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10950 { (eval echo configure:10951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10952 if test -z "$ac_err"; then
10953   rm -rf conftest*
10954   eval "ac_cv_header_$ac_safe=yes"
10955 else
10956   echo "$ac_err" >&5
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -rf conftest*
10960   eval "ac_cv_header_$ac_safe=no"
10961 fi
10962 rm -f conftest*
10963 fi
10964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10965   echo "$ac_t""yes" 1>&6
10966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10967   cat >> confdefs.h <<EOF
10968 #define $ac_tr_hdr 1
10969 EOF
10970  
10971 else
10972   echo "$ac_t""no" 1>&6
10973 fi
10974 done
10975
10976         if test $ac_cv_header_lwp_lwp_h = yes ; then
10977                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10978 echo "configure:10979: checking for lwp_create in -llwp" >&5
10979 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10981   echo $ac_n "(cached) $ac_c" 1>&6
10982 else
10983   ac_save_LIBS="$LIBS"
10984 LIBS="-llwp  $LIBS"
10985 cat > conftest.$ac_ext <<EOF
10986 #line 10987 "configure"
10987 #include "confdefs.h"
10988 /* Override any gcc2 internal prototype to avoid an error.  */
10989 /* We use char because int might match the return type of a gcc2
10990     builtin and then its argument prototype would still apply.  */
10991 char lwp_create();
10992
10993 int main() {
10994 lwp_create()
10995 ; return 0; }
10996 EOF
10997 if { (eval echo configure:10998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10998   rm -rf conftest*
10999   eval "ac_cv_lib_$ac_lib_var=yes"
11000 else
11001   echo "configure: failed program was:" >&5
11002   cat conftest.$ac_ext >&5
11003   rm -rf conftest*
11004   eval "ac_cv_lib_$ac_lib_var=no"
11005 fi
11006 rm -f conftest*
11007 LIBS="$ac_save_LIBS"
11008
11009 fi
11010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012   have_lwp=yes
11013 else
11014   echo "$ac_t""no" 1>&6
11015 have_lwp=no
11016 fi
11017
11018
11019                 if test $have_lwp = yes ; then
11020                         cat >> confdefs.h <<\EOF
11021 #define HAVE_LWP 1
11022 EOF
11023
11024                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11025                         ol_link_threads=lwp
11026
11027                         if test $ol_with_yielding_select = auto ; then
11028                                 ol_with_yielding_select=no
11029                         fi
11030                 fi
11031         fi
11032 fi
11033
11034 if test $ol_with_yielding_select = yes ; then
11035         cat >> confdefs.h <<\EOF
11036 #define HAVE_YIELDING_SELECT 1
11037 EOF
11038
11039 fi
11040
11041 if test $ol_with_threads = manual ; then
11042                 ol_link_threads=yes
11043
11044         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11045
11046         for ac_hdr in pthread.h sched.h
11047 do
11048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11049 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11050 echo "configure:11051: checking for $ac_hdr" >&5
11051 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11052   echo $ac_n "(cached) $ac_c" 1>&6
11053 else
11054   cat > conftest.$ac_ext <<EOF
11055 #line 11056 "configure"
11056 #include "confdefs.h"
11057 #include <$ac_hdr>
11058 EOF
11059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11060 { (eval echo configure:11061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11062 if test -z "$ac_err"; then
11063   rm -rf conftest*
11064   eval "ac_cv_header_$ac_safe=yes"
11065 else
11066   echo "$ac_err" >&5
11067   echo "configure: failed program was:" >&5
11068   cat conftest.$ac_ext >&5
11069   rm -rf conftest*
11070   eval "ac_cv_header_$ac_safe=no"
11071 fi
11072 rm -f conftest*
11073 fi
11074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11075   echo "$ac_t""yes" 1>&6
11076     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11077   cat >> confdefs.h <<EOF
11078 #define $ac_tr_hdr 1
11079 EOF
11080  
11081 else
11082   echo "$ac_t""no" 1>&6
11083 fi
11084 done
11085
11086         for ac_func in sched_yield pthread_yield
11087 do
11088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11089 echo "configure:11090: checking for $ac_func" >&5
11090 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11091   echo $ac_n "(cached) $ac_c" 1>&6
11092 else
11093   cat > conftest.$ac_ext <<EOF
11094 #line 11095 "configure"
11095 #include "confdefs.h"
11096 /* System header to define __stub macros and hopefully few prototypes,
11097     which can conflict with char $ac_func(); below.  */
11098 #include <assert.h>
11099 /* Override any gcc2 internal prototype to avoid an error.  */
11100 /* We use char because int might match the return type of a gcc2
11101     builtin and then its argument prototype would still apply.  */
11102 char $ac_func();
11103 char (*f)();
11104
11105 int main() {
11106
11107 /* The GNU C library defines this for functions which it implements
11108     to always fail with ENOSYS.  Some functions are actually named
11109     something starting with __ and the normal name is an alias.  */
11110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11111 choke me
11112 #else
11113 f = $ac_func;
11114 #endif
11115
11116 ; return 0; }
11117 EOF
11118 if { (eval echo configure:11119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11119   rm -rf conftest*
11120   eval "ac_cv_func_$ac_func=yes"
11121 else
11122   echo "configure: failed program was:" >&5
11123   cat conftest.$ac_ext >&5
11124   rm -rf conftest*
11125   eval "ac_cv_func_$ac_func=no"
11126 fi
11127 rm -f conftest*
11128 fi
11129
11130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11131   echo "$ac_t""yes" 1>&6
11132     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11133   cat >> confdefs.h <<EOF
11134 #define $ac_tr_func 1
11135 EOF
11136  
11137 else
11138   echo "$ac_t""no" 1>&6
11139 fi
11140 done
11141
11142         
11143         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11144 echo "configure:11145: checking for LinuxThreads pthread.h" >&5
11145 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11146   echo $ac_n "(cached) $ac_c" 1>&6
11147 else
11148   cat > conftest.$ac_ext <<EOF
11149 #line 11150 "configure"
11150 #include "confdefs.h"
11151 #include <pthread.h>
11152 EOF
11153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11154   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11155   rm -rf conftest*
11156   ol_cv_header_linux_threads=yes
11157 else
11158   rm -rf conftest*
11159   ol_cv_header_linux_threads=no
11160 fi
11161 rm -f conftest*
11162
11163                 
11164 fi
11165
11166 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11167         if test $ol_cv_header_linux_threads = yes; then
11168                 cat >> confdefs.h <<\EOF
11169 #define HAVE_LINUX_THREADS 1
11170 EOF
11171
11172         fi
11173
11174
11175         for ac_hdr in mach/cthreads.h
11176 do
11177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11179 echo "configure:11180: checking for $ac_hdr" >&5
11180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11181   echo $ac_n "(cached) $ac_c" 1>&6
11182 else
11183   cat > conftest.$ac_ext <<EOF
11184 #line 11185 "configure"
11185 #include "confdefs.h"
11186 #include <$ac_hdr>
11187 EOF
11188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11189 { (eval echo configure:11190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11191 if test -z "$ac_err"; then
11192   rm -rf conftest*
11193   eval "ac_cv_header_$ac_safe=yes"
11194 else
11195   echo "$ac_err" >&5
11196   echo "configure: failed program was:" >&5
11197   cat conftest.$ac_ext >&5
11198   rm -rf conftest*
11199   eval "ac_cv_header_$ac_safe=no"
11200 fi
11201 rm -f conftest*
11202 fi
11203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11204   echo "$ac_t""yes" 1>&6
11205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11206   cat >> confdefs.h <<EOF
11207 #define $ac_tr_hdr 1
11208 EOF
11209  
11210 else
11211   echo "$ac_t""no" 1>&6
11212 fi
11213 done
11214
11215         for ac_hdr in lwp/lwp.h
11216 do
11217 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11218 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11219 echo "configure:11220: checking for $ac_hdr" >&5
11220 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11221   echo $ac_n "(cached) $ac_c" 1>&6
11222 else
11223   cat > conftest.$ac_ext <<EOF
11224 #line 11225 "configure"
11225 #include "confdefs.h"
11226 #include <$ac_hdr>
11227 EOF
11228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11229 { (eval echo configure:11230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11231 if test -z "$ac_err"; then
11232   rm -rf conftest*
11233   eval "ac_cv_header_$ac_safe=yes"
11234 else
11235   echo "$ac_err" >&5
11236   echo "configure: failed program was:" >&5
11237   cat conftest.$ac_ext >&5
11238   rm -rf conftest*
11239   eval "ac_cv_header_$ac_safe=no"
11240 fi
11241 rm -f conftest*
11242 fi
11243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11244   echo "$ac_t""yes" 1>&6
11245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11246   cat >> confdefs.h <<EOF
11247 #define $ac_tr_hdr 1
11248 EOF
11249  
11250 else
11251   echo "$ac_t""no" 1>&6
11252 fi
11253 done
11254
11255         for ac_hdr in thread.h synch.h
11256 do
11257 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11258 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11259 echo "configure:11260: checking for $ac_hdr" >&5
11260 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11261   echo $ac_n "(cached) $ac_c" 1>&6
11262 else
11263   cat > conftest.$ac_ext <<EOF
11264 #line 11265 "configure"
11265 #include "confdefs.h"
11266 #include <$ac_hdr>
11267 EOF
11268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11269 { (eval echo configure:11270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11271 if test -z "$ac_err"; then
11272   rm -rf conftest*
11273   eval "ac_cv_header_$ac_safe=yes"
11274 else
11275   echo "$ac_err" >&5
11276   echo "configure: failed program was:" >&5
11277   cat conftest.$ac_ext >&5
11278   rm -rf conftest*
11279   eval "ac_cv_header_$ac_safe=no"
11280 fi
11281 rm -f conftest*
11282 fi
11283 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11284   echo "$ac_t""yes" 1>&6
11285     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11286   cat >> confdefs.h <<EOF
11287 #define $ac_tr_hdr 1
11288 EOF
11289  
11290 else
11291   echo "$ac_t""no" 1>&6
11292 fi
11293 done
11294
11295 fi
11296
11297 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11298                         cat >> confdefs.h <<\EOF
11299 #define REENTRANT 1
11300 EOF
11301
11302         cat >> confdefs.h <<\EOF
11303 #define _REENTRANT 1
11304 EOF
11305
11306         cat >> confdefs.h <<\EOF
11307 #define THREAD_SAFE 1
11308 EOF
11309
11310         cat >> confdefs.h <<\EOF
11311 #define _THREAD_SAFE 1
11312 EOF
11313
11314         cat >> confdefs.h <<\EOF
11315 #define THREADSAFE 1
11316 EOF
11317
11318         cat >> confdefs.h <<\EOF
11319 #define _THREADSAFE 1
11320 EOF
11321
11322         cat >> confdefs.h <<\EOF
11323 #define _SGI_MP_SOURCE 1
11324 EOF
11325
11326
11327                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11328 echo "configure:11329: checking for thread specific errno" >&5
11329 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11330   echo $ac_n "(cached) $ac_c" 1>&6
11331 else
11332   
11333                 cat > conftest.$ac_ext <<EOF
11334 #line 11335 "configure"
11335 #include "confdefs.h"
11336 #include <errno.h>
11337 int main() {
11338 errno = 0;
11339 ; return 0; }
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11342   rm -rf conftest*
11343   ol_cv_errno_thread_specific=yes
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   ol_cv_errno_thread_specific=no
11349 fi
11350 rm -f conftest*
11351         
11352 fi
11353
11354 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11355
11356                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11357 echo "configure:11358: checking for thread specific h_errno" >&5
11358 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11359   echo $ac_n "(cached) $ac_c" 1>&6
11360 else
11361   
11362                 cat > conftest.$ac_ext <<EOF
11363 #line 11364 "configure"
11364 #include "confdefs.h"
11365 #include <netdb.h>
11366 int main() {
11367 h_errno = 0;
11368 ; return 0; }
11369 EOF
11370 if { (eval echo configure:11371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11371   rm -rf conftest*
11372   ol_cv_h_errno_thread_specific=yes
11373 else
11374   echo "configure: failed program was:" >&5
11375   cat conftest.$ac_ext >&5
11376   rm -rf conftest*
11377   ol_cv_h_errno_thread_specific=no
11378 fi
11379 rm -f conftest*
11380         
11381 fi
11382
11383 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11384
11385         if test $ol_cv_errno_thread_specific != yes \
11386                 -o $ol_cv_h_errno_thread_specific != yes ; then
11387                 LIBS="$LTHREAD_LIBS $LIBS"
11388                 LTHREAD_LIBS=""
11389         fi
11390
11391 fi  
11392
11393 if test $ol_link_threads = no ; then
11394         if test $ol_with_threads = yes ; then
11395                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11396         fi
11397
11398         if test $ol_with_threads = auto ; then
11399                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11400                 ol_with_threads=no
11401         fi
11402
11403         cat >> confdefs.h <<\EOF
11404 #define NO_THREADS 1
11405 EOF
11406
11407         LTHREAD_LIBS=""
11408 fi
11409
11410 if test $ol_link_threads != no ; then
11411         cat >> confdefs.h <<\EOF
11412 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11413 EOF
11414
11415 fi
11416
11417 ol_link_ldbm=no 
11418
11419 if test $ol_with_ldbm_api = auto \
11420         -o $ol_with_ldbm_api = berkeley \
11421         -o $ol_with_ldbm_api = bcompat ; then
11422
11423         if test $ol_with_ldbm_api = bcompat; then \
11424                 ol_cv_berkeley_db=no
11425 for ac_hdr in db_185.h db.h
11426 do
11427 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11428 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11429 echo "configure:11430: checking for $ac_hdr" >&5
11430 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11431   echo $ac_n "(cached) $ac_c" 1>&6
11432 else
11433   cat > conftest.$ac_ext <<EOF
11434 #line 11435 "configure"
11435 #include "confdefs.h"
11436 #include <$ac_hdr>
11437 EOF
11438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11439 { (eval echo configure:11440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11441 if test -z "$ac_err"; then
11442   rm -rf conftest*
11443   eval "ac_cv_header_$ac_safe=yes"
11444 else
11445   echo "$ac_err" >&5
11446   echo "configure: failed program was:" >&5
11447   cat conftest.$ac_ext >&5
11448   rm -rf conftest*
11449   eval "ac_cv_header_$ac_safe=no"
11450 fi
11451 rm -f conftest*
11452 fi
11453 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11454   echo "$ac_t""yes" 1>&6
11455     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11456   cat >> confdefs.h <<EOF
11457 #define $ac_tr_hdr 1
11458 EOF
11459  
11460 else
11461   echo "$ac_t""no" 1>&6
11462 fi
11463 done
11464
11465 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11466         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11467 echo "configure:11468: checking if Berkeley DB header compatibility" >&5
11468 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11469   echo $ac_n "(cached) $ac_c" 1>&6
11470 else
11471   
11472                 cat > conftest.$ac_ext <<EOF
11473 #line 11474 "configure"
11474 #include "confdefs.h"
11475
11476 #if HAVE_DB_185_H
11477 #       include <db_185.h>
11478 #else
11479 #       include <db.h>
11480 #endif
11481
11482  /* this check could be improved */
11483 #ifndef DB_VERSION_MAJOR
11484 #       define DB_VERSION_MAJOR 1
11485 #endif
11486
11487 #if DB_VERSION_MAJOR == 1 
11488         __db_version_1
11489 #endif
11490
11491 EOF
11492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11493   egrep "__db_version_1" >/dev/null 2>&1; then
11494   rm -rf conftest*
11495   ol_cv_header_db1=yes
11496 else
11497   rm -rf conftest*
11498   ol_cv_header_db1=no
11499 fi
11500 rm -f conftest*
11501
11502 fi
11503
11504 echo "$ac_t""$ol_cv_header_db1" 1>&6
11505
11506         if test ol_cv_header_db1=yes ; then
11507                 ol_cv_lib_db=no
11508 if test $ol_cv_lib_db = no ; then
11509         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11510 echo "configure:11511: checking for Berkeley DB link (default)" >&5
11511 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11512   echo $ac_n "(cached) $ac_c" 1>&6
11513 else
11514   
11515         ol_DB_LIB=
11516         ol_LIBS=$LIBS
11517         LIBS="$ol_DB_LIB $LIBS"
11518
11519         cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522
11523 #ifdef HAVE_DB_185_H
11524 # include <db_185.h>
11525 #else
11526 # include <db.h>
11527 #endif
11528
11529 #ifndef DB_VERSION_MAJOR
11530 # define DB_VERSION_MAJOR 1
11531 #endif
11532
11533 #ifndef NULL
11534 #define NULL ((void*)0)
11535 #endif
11536
11537 int main() {
11538
11539 #if DB_VERSION_MAJOR > 2
11540         db_env_create( NULL, 0 );
11541 #elif DB_VERSION_MAJOR > 1
11542         db_appexit( NULL );
11543 #else
11544         (void) dbopen( NULL, 0, 0, 0, NULL);
11545 #endif
11546
11547 ; return 0; }
11548 EOF
11549 if { (eval echo configure:11550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11550   rm -rf conftest*
11551   ol_cv_db_none=yes
11552 else
11553   echo "configure: failed program was:" >&5
11554   cat conftest.$ac_ext >&5
11555   rm -rf conftest*
11556   ol_cv_db_none=no
11557 fi
11558 rm -f conftest*
11559
11560         LIBS="$ol_LIBS"
11561
11562 fi
11563
11564 echo "$ac_t""$ol_cv_db_none" 1>&6
11565
11566         if test $ol_cv_db_none = yes ; then
11567                 ol_cv_lib_db=yes
11568         fi
11569 fi
11570
11571 if test $ol_cv_lib_db = no ; then
11572         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11573 echo "configure:11574: checking for Berkeley DB link (-ldb)" >&5
11574 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11575   echo $ac_n "(cached) $ac_c" 1>&6
11576 else
11577   
11578         ol_DB_LIB=-ldb
11579         ol_LIBS=$LIBS
11580         LIBS="$ol_DB_LIB $LIBS"
11581
11582         cat > conftest.$ac_ext <<EOF
11583 #line 11584 "configure"
11584 #include "confdefs.h"
11585
11586 #ifdef HAVE_DB_185_H
11587 # include <db_185.h>
11588 #else
11589 # include <db.h>
11590 #endif
11591
11592 #ifndef DB_VERSION_MAJOR
11593 # define DB_VERSION_MAJOR 1
11594 #endif
11595
11596 #ifndef NULL
11597 #define NULL ((void*)0)
11598 #endif
11599
11600 int main() {
11601
11602 #if DB_VERSION_MAJOR > 2
11603         db_env_create( NULL, 0 );
11604 #elif DB_VERSION_MAJOR > 1
11605         db_appexit( NULL );
11606 #else
11607         (void) dbopen( NULL, 0, 0, 0, NULL);
11608 #endif
11609
11610 ; return 0; }
11611 EOF
11612 if { (eval echo configure:11613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11613   rm -rf conftest*
11614   ol_cv_db_db=yes
11615 else
11616   echo "configure: failed program was:" >&5
11617   cat conftest.$ac_ext >&5
11618   rm -rf conftest*
11619   ol_cv_db_db=no
11620 fi
11621 rm -f conftest*
11622
11623         LIBS="$ol_LIBS"
11624
11625 fi
11626
11627 echo "$ac_t""$ol_cv_db_db" 1>&6
11628
11629         if test $ol_cv_db_db = yes ; then
11630                 ol_cv_lib_db=-ldb
11631         fi
11632 fi
11633
11634 if test $ol_cv_lib_db = no ; then
11635         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11636 echo "configure:11637: checking for Berkeley DB link (-ldb3)" >&5
11637 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11638   echo $ac_n "(cached) $ac_c" 1>&6
11639 else
11640   
11641         ol_DB_LIB=-ldb3
11642         ol_LIBS=$LIBS
11643         LIBS="$ol_DB_LIB $LIBS"
11644
11645         cat > conftest.$ac_ext <<EOF
11646 #line 11647 "configure"
11647 #include "confdefs.h"
11648
11649 #ifdef HAVE_DB_185_H
11650 # include <db_185.h>
11651 #else
11652 # include <db.h>
11653 #endif
11654
11655 #ifndef DB_VERSION_MAJOR
11656 # define DB_VERSION_MAJOR 1
11657 #endif
11658
11659 #ifndef NULL
11660 #define NULL ((void*)0)
11661 #endif
11662
11663 int main() {
11664
11665 #if DB_VERSION_MAJOR > 2
11666         db_env_create( NULL, 0 );
11667 #elif DB_VERSION_MAJOR > 1
11668         db_appexit( NULL );
11669 #else
11670         (void) dbopen( NULL, 0, 0, 0, NULL);
11671 #endif
11672
11673 ; return 0; }
11674 EOF
11675 if { (eval echo configure:11676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11676   rm -rf conftest*
11677   ol_cv_db_db3=yes
11678 else
11679   echo "configure: failed program was:" >&5
11680   cat conftest.$ac_ext >&5
11681   rm -rf conftest*
11682   ol_cv_db_db3=no
11683 fi
11684 rm -f conftest*
11685
11686         LIBS="$ol_LIBS"
11687
11688 fi
11689
11690 echo "$ac_t""$ol_cv_db_db3" 1>&6
11691
11692         if test $ol_cv_db_db3 = yes ; then
11693                 ol_cv_lib_db=-ldb3
11694         fi
11695 fi
11696
11697 if test $ol_cv_lib_db = no ; then
11698         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11699 echo "configure:11700: checking for Berkeley DB link (-ldb2)" >&5
11700 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11701   echo $ac_n "(cached) $ac_c" 1>&6
11702 else
11703   
11704         ol_DB_LIB=-ldb2
11705         ol_LIBS=$LIBS
11706         LIBS="$ol_DB_LIB $LIBS"
11707
11708         cat > conftest.$ac_ext <<EOF
11709 #line 11710 "configure"
11710 #include "confdefs.h"
11711
11712 #ifdef HAVE_DB_185_H
11713 # include <db_185.h>
11714 #else
11715 # include <db.h>
11716 #endif
11717
11718 #ifndef DB_VERSION_MAJOR
11719 # define DB_VERSION_MAJOR 1
11720 #endif
11721
11722 #ifndef NULL
11723 #define NULL ((void*)0)
11724 #endif
11725
11726 int main() {
11727
11728 #if DB_VERSION_MAJOR > 2
11729         db_env_create( NULL, 0 );
11730 #elif DB_VERSION_MAJOR > 1
11731         db_appexit( NULL );
11732 #else
11733         (void) dbopen( NULL, 0, 0, 0, NULL);
11734 #endif
11735
11736 ; return 0; }
11737 EOF
11738 if { (eval echo configure:11739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11739   rm -rf conftest*
11740   ol_cv_db_db2=yes
11741 else
11742   echo "configure: failed program was:" >&5
11743   cat conftest.$ac_ext >&5
11744   rm -rf conftest*
11745   ol_cv_db_db2=no
11746 fi
11747 rm -f conftest*
11748
11749         LIBS="$ol_LIBS"
11750
11751 fi
11752
11753 echo "$ac_t""$ol_cv_db_db2" 1>&6
11754
11755         if test $ol_cv_db_db2 = yes ; then
11756                 ol_cv_lib_db=-ldb2
11757         fi
11758 fi
11759
11760 if test $ol_cv_lib_db = no ; then
11761         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11762 echo "configure:11763: checking for Berkeley DB link (-ldb1)" >&5
11763 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11764   echo $ac_n "(cached) $ac_c" 1>&6
11765 else
11766   
11767         ol_DB_LIB=-ldb1
11768         ol_LIBS=$LIBS
11769         LIBS="$ol_DB_LIB $LIBS"
11770
11771         cat > conftest.$ac_ext <<EOF
11772 #line 11773 "configure"
11773 #include "confdefs.h"
11774
11775 #ifdef HAVE_DB_185_H
11776 # include <db_185.h>
11777 #else
11778 # include <db.h>
11779 #endif
11780
11781 #ifndef DB_VERSION_MAJOR
11782 # define DB_VERSION_MAJOR 1
11783 #endif
11784
11785 #ifndef NULL
11786 #define NULL ((void*)0)
11787 #endif
11788
11789 int main() {
11790
11791 #if DB_VERSION_MAJOR > 2
11792         db_env_create( NULL, 0 );
11793 #elif DB_VERSION_MAJOR > 1
11794         db_appexit( NULL );
11795 #else
11796         (void) dbopen( NULL, 0, 0, 0, NULL);
11797 #endif
11798
11799 ; return 0; }
11800 EOF
11801 if { (eval echo configure:11802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11802   rm -rf conftest*
11803   ol_cv_db_db1=yes
11804 else
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807   rm -rf conftest*
11808   ol_cv_db_db1=no
11809 fi
11810 rm -f conftest*
11811
11812         LIBS="$ol_LIBS"
11813
11814 fi
11815
11816 echo "$ac_t""$ol_cv_db_db1" 1>&6
11817
11818         if test $ol_cv_db_db1 = yes ; then
11819                 ol_cv_lib_db=-ldb1
11820         fi
11821 fi
11822
11823
11824                 if test "$ol_cv_lib_db" != no ; then
11825                         ol_cv_berkeley_db=yes
11826                 fi
11827         fi
11828 fi
11829
11830         else
11831                 ol_cv_berkeley_db=no
11832 for ac_hdr in db.h
11833 do
11834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11836 echo "configure:11837: checking for $ac_hdr" >&5
11837 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11838   echo $ac_n "(cached) $ac_c" 1>&6
11839 else
11840   cat > conftest.$ac_ext <<EOF
11841 #line 11842 "configure"
11842 #include "confdefs.h"
11843 #include <$ac_hdr>
11844 EOF
11845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11846 { (eval echo configure:11847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11848 if test -z "$ac_err"; then
11849   rm -rf conftest*
11850   eval "ac_cv_header_$ac_safe=yes"
11851 else
11852   echo "$ac_err" >&5
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -rf conftest*
11856   eval "ac_cv_header_$ac_safe=no"
11857 fi
11858 rm -f conftest*
11859 fi
11860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11861   echo "$ac_t""yes" 1>&6
11862     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11863   cat >> confdefs.h <<EOF
11864 #define $ac_tr_hdr 1
11865 EOF
11866  
11867 else
11868   echo "$ac_t""no" 1>&6
11869 fi
11870 done
11871
11872 if test $ac_cv_header_db_h = yes; then
11873         ol_cv_lib_db=no
11874 if test $ol_cv_lib_db = no ; then
11875         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11876 echo "configure:11877: checking for Berkeley DB link (default)" >&5
11877 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11878   echo $ac_n "(cached) $ac_c" 1>&6
11879 else
11880   
11881         ol_DB_LIB=
11882         ol_LIBS=$LIBS
11883         LIBS="$ol_DB_LIB $LIBS"
11884
11885         cat > conftest.$ac_ext <<EOF
11886 #line 11887 "configure"
11887 #include "confdefs.h"
11888
11889 #ifdef HAVE_DB_185_H
11890 # include <db_185.h>
11891 #else
11892 # include <db.h>
11893 #endif
11894
11895 #ifndef DB_VERSION_MAJOR
11896 # define DB_VERSION_MAJOR 1
11897 #endif
11898
11899 #ifndef NULL
11900 #define NULL ((void*)0)
11901 #endif
11902
11903 int main() {
11904
11905 #if DB_VERSION_MAJOR > 2
11906         db_env_create( NULL, 0 );
11907 #elif DB_VERSION_MAJOR > 1
11908         db_appexit( NULL );
11909 #else
11910         (void) dbopen( NULL, 0, 0, 0, NULL);
11911 #endif
11912
11913 ; return 0; }
11914 EOF
11915 if { (eval echo configure:11916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11916   rm -rf conftest*
11917   ol_cv_db_none=yes
11918 else
11919   echo "configure: failed program was:" >&5
11920   cat conftest.$ac_ext >&5
11921   rm -rf conftest*
11922   ol_cv_db_none=no
11923 fi
11924 rm -f conftest*
11925
11926         LIBS="$ol_LIBS"
11927
11928 fi
11929
11930 echo "$ac_t""$ol_cv_db_none" 1>&6
11931
11932         if test $ol_cv_db_none = yes ; then
11933                 ol_cv_lib_db=yes
11934         fi
11935 fi
11936
11937 if test $ol_cv_lib_db = no ; then
11938         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11939 echo "configure:11940: checking for Berkeley DB link (-ldb)" >&5
11940 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11941   echo $ac_n "(cached) $ac_c" 1>&6
11942 else
11943   
11944         ol_DB_LIB=-ldb
11945         ol_LIBS=$LIBS
11946         LIBS="$ol_DB_LIB $LIBS"
11947
11948         cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951
11952 #ifdef HAVE_DB_185_H
11953 # include <db_185.h>
11954 #else
11955 # include <db.h>
11956 #endif
11957
11958 #ifndef DB_VERSION_MAJOR
11959 # define DB_VERSION_MAJOR 1
11960 #endif
11961
11962 #ifndef NULL
11963 #define NULL ((void*)0)
11964 #endif
11965
11966 int main() {
11967
11968 #if DB_VERSION_MAJOR > 2
11969         db_env_create( NULL, 0 );
11970 #elif DB_VERSION_MAJOR > 1
11971         db_appexit( NULL );
11972 #else
11973         (void) dbopen( NULL, 0, 0, 0, NULL);
11974 #endif
11975
11976 ; return 0; }
11977 EOF
11978 if { (eval echo configure:11979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11979   rm -rf conftest*
11980   ol_cv_db_db=yes
11981 else
11982   echo "configure: failed program was:" >&5
11983   cat conftest.$ac_ext >&5
11984   rm -rf conftest*
11985   ol_cv_db_db=no
11986 fi
11987 rm -f conftest*
11988
11989         LIBS="$ol_LIBS"
11990
11991 fi
11992
11993 echo "$ac_t""$ol_cv_db_db" 1>&6
11994
11995         if test $ol_cv_db_db = yes ; then
11996                 ol_cv_lib_db=-ldb
11997         fi
11998 fi
11999
12000 if test $ol_cv_lib_db = no ; then
12001         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12002 echo "configure:12003: checking for Berkeley DB link (-ldb3)" >&5
12003 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12004   echo $ac_n "(cached) $ac_c" 1>&6
12005 else
12006   
12007         ol_DB_LIB=-ldb3
12008         ol_LIBS=$LIBS
12009         LIBS="$ol_DB_LIB $LIBS"
12010
12011         cat > conftest.$ac_ext <<EOF
12012 #line 12013 "configure"
12013 #include "confdefs.h"
12014
12015 #ifdef HAVE_DB_185_H
12016 # include <db_185.h>
12017 #else
12018 # include <db.h>
12019 #endif
12020
12021 #ifndef DB_VERSION_MAJOR
12022 # define DB_VERSION_MAJOR 1
12023 #endif
12024
12025 #ifndef NULL
12026 #define NULL ((void*)0)
12027 #endif
12028
12029 int main() {
12030
12031 #if DB_VERSION_MAJOR > 2
12032         db_env_create( NULL, 0 );
12033 #elif DB_VERSION_MAJOR > 1
12034         db_appexit( NULL );
12035 #else
12036         (void) dbopen( NULL, 0, 0, 0, NULL);
12037 #endif
12038
12039 ; return 0; }
12040 EOF
12041 if { (eval echo configure:12042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12042   rm -rf conftest*
12043   ol_cv_db_db3=yes
12044 else
12045   echo "configure: failed program was:" >&5
12046   cat conftest.$ac_ext >&5
12047   rm -rf conftest*
12048   ol_cv_db_db3=no
12049 fi
12050 rm -f conftest*
12051
12052         LIBS="$ol_LIBS"
12053
12054 fi
12055
12056 echo "$ac_t""$ol_cv_db_db3" 1>&6
12057
12058         if test $ol_cv_db_db3 = yes ; then
12059                 ol_cv_lib_db=-ldb3
12060         fi
12061 fi
12062
12063 if test $ol_cv_lib_db = no ; then
12064         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12065 echo "configure:12066: checking for Berkeley DB link (-ldb2)" >&5
12066 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12067   echo $ac_n "(cached) $ac_c" 1>&6
12068 else
12069   
12070         ol_DB_LIB=-ldb2
12071         ol_LIBS=$LIBS
12072         LIBS="$ol_DB_LIB $LIBS"
12073
12074         cat > conftest.$ac_ext <<EOF
12075 #line 12076 "configure"
12076 #include "confdefs.h"
12077
12078 #ifdef HAVE_DB_185_H
12079 # include <db_185.h>
12080 #else
12081 # include <db.h>
12082 #endif
12083
12084 #ifndef DB_VERSION_MAJOR
12085 # define DB_VERSION_MAJOR 1
12086 #endif
12087
12088 #ifndef NULL
12089 #define NULL ((void*)0)
12090 #endif
12091
12092 int main() {
12093
12094 #if DB_VERSION_MAJOR > 2
12095         db_env_create( NULL, 0 );
12096 #elif DB_VERSION_MAJOR > 1
12097         db_appexit( NULL );
12098 #else
12099         (void) dbopen( NULL, 0, 0, 0, NULL);
12100 #endif
12101
12102 ; return 0; }
12103 EOF
12104 if { (eval echo configure:12105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12105   rm -rf conftest*
12106   ol_cv_db_db2=yes
12107 else
12108   echo "configure: failed program was:" >&5
12109   cat conftest.$ac_ext >&5
12110   rm -rf conftest*
12111   ol_cv_db_db2=no
12112 fi
12113 rm -f conftest*
12114
12115         LIBS="$ol_LIBS"
12116
12117 fi
12118
12119 echo "$ac_t""$ol_cv_db_db2" 1>&6
12120
12121         if test $ol_cv_db_db2 = yes ; then
12122                 ol_cv_lib_db=-ldb2
12123         fi
12124 fi
12125
12126 if test $ol_cv_lib_db = no ; then
12127         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12128 echo "configure:12129: checking for Berkeley DB link (-ldb1)" >&5
12129 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12130   echo $ac_n "(cached) $ac_c" 1>&6
12131 else
12132   
12133         ol_DB_LIB=-ldb1
12134         ol_LIBS=$LIBS
12135         LIBS="$ol_DB_LIB $LIBS"
12136
12137         cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140
12141 #ifdef HAVE_DB_185_H
12142 # include <db_185.h>
12143 #else
12144 # include <db.h>
12145 #endif
12146
12147 #ifndef DB_VERSION_MAJOR
12148 # define DB_VERSION_MAJOR 1
12149 #endif
12150
12151 #ifndef NULL
12152 #define NULL ((void*)0)
12153 #endif
12154
12155 int main() {
12156
12157 #if DB_VERSION_MAJOR > 2
12158         db_env_create( NULL, 0 );
12159 #elif DB_VERSION_MAJOR > 1
12160         db_appexit( NULL );
12161 #else
12162         (void) dbopen( NULL, 0, 0, 0, NULL);
12163 #endif
12164
12165 ; return 0; }
12166 EOF
12167 if { (eval echo configure:12168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12168   rm -rf conftest*
12169   ol_cv_db_db1=yes
12170 else
12171   echo "configure: failed program was:" >&5
12172   cat conftest.$ac_ext >&5
12173   rm -rf conftest*
12174   ol_cv_db_db1=no
12175 fi
12176 rm -f conftest*
12177
12178         LIBS="$ol_LIBS"
12179
12180 fi
12181
12182 echo "$ac_t""$ol_cv_db_db1" 1>&6
12183
12184         if test $ol_cv_db_db1 = yes ; then
12185                 ol_cv_lib_db=-ldb1
12186         fi
12187 fi
12188
12189
12190         if test "$ol_cv_lib_db" != no ; then
12191                 ol_cv_berkeley_db=yes
12192                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12193 echo "configure:12194: checking for Berkeley DB thread support" >&5
12194 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12195   echo $ac_n "(cached) $ac_c" 1>&6
12196 else
12197   
12198         ol_LIBS="$LIBS"
12199         if test $ol_cv_lib_db != yes ; then
12200                 LIBS="$ol_cv_lib_db"
12201         fi
12202
12203         if test "$cross_compiling" = yes; then
12204   ol_cv_berkeley_db_thread=cross
12205 else
12206   cat > conftest.$ac_ext <<EOF
12207 #line 12208 "configure"
12208 #include "confdefs.h"
12209
12210 #ifdef HAVE_DB_185_H
12211         choke me;
12212 #else
12213 #include <db.h>
12214 #endif
12215 #ifndef NULL
12216 #define NULL ((void *)0)
12217 #endif
12218 main()
12219 {
12220         int rc;
12221         u_int32_t flags = DB_CREATE | DB_THREAD;
12222
12223
12224 #if DB_VERSION_MAJOR > 2
12225         DB_ENV *env = NULL;
12226
12227         rc = db_env_create( &env, 0 );
12228
12229         if( rc == 0 ) {
12230                 rc = env->open( env, NULL, NULL, flags, 0 );
12231         }
12232
12233 #else
12234         DB_ENV env;
12235         memset( &env, '\0', sizeof(env) );
12236
12237         rc = db_appinit( NULL, NULL, &env, flags );
12238
12239         if( rc == 0 ) {
12240                 db_appexit( &env );
12241         }
12242 #endif
12243
12244         return rc;
12245 }
12246 EOF
12247 if { (eval echo configure:12248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12248 then
12249   ol_cv_berkeley_db_thread=yes
12250 else
12251   echo "configure: failed program was:" >&5
12252   cat conftest.$ac_ext >&5
12253   rm -fr conftest*
12254   ol_cv_berkeley_db_thread=no
12255 fi
12256 rm -fr conftest*
12257 fi
12258
12259
12260         LIBS="$ol_LIBS"
12261
12262         if test $ol_cv_berkeley_db_thread != no ; then
12263                 cat >> confdefs.h <<\EOF
12264 #define HAVE_BERKELEY_DB_THREAD 1
12265 EOF
12266
12267         fi
12268
12269 fi
12270
12271 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12272         fi
12273 fi
12274
12275         fi
12276
12277         if test $ol_cv_berkeley_db != no ; then
12278                 cat >> confdefs.h <<\EOF
12279 #define HAVE_BERKELEY_DB 1
12280 EOF
12281
12282
12283                 ol_link_ldbm=berkeley
12284                 ol_with_ldbm_api=db
12285
12286                 if test $ol_with_ldbm_type = hash ; then
12287                         cat >> confdefs.h <<\EOF
12288 #define LDBM_USE_DBHASH 1
12289 EOF
12290
12291                 else
12292                         cat >> confdefs.h <<\EOF
12293 #define LDBM_USE_DBBTREE 1
12294 EOF
12295
12296                 fi
12297
12298                                                 if test $ol_cv_lib_db != yes ; then
12299                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12300                 fi
12301         fi
12302 fi
12303
12304 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12305         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12306         ol_with_ldbm_api=none
12307 fi
12308
12309 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12310         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12311 echo "configure:12312: checking for MDBM library" >&5
12312 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12313   echo $ac_n "(cached) $ac_c" 1>&6
12314 else
12315         ol_LIBS="$LIBS"
12316         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12317 echo "configure:12318: checking for mdbm_set_chain" >&5
12318 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12319   echo $ac_n "(cached) $ac_c" 1>&6
12320 else
12321   cat > conftest.$ac_ext <<EOF
12322 #line 12323 "configure"
12323 #include "confdefs.h"
12324 /* System header to define __stub macros and hopefully few prototypes,
12325     which can conflict with char mdbm_set_chain(); below.  */
12326 #include <assert.h>
12327 /* Override any gcc2 internal prototype to avoid an error.  */
12328 /* We use char because int might match the return type of a gcc2
12329     builtin and then its argument prototype would still apply.  */
12330 char mdbm_set_chain();
12331 char (*f)();
12332
12333 int main() {
12334
12335 /* The GNU C library defines this for functions which it implements
12336     to always fail with ENOSYS.  Some functions are actually named
12337     something starting with __ and the normal name is an alias.  */
12338 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12339 choke me
12340 #else
12341 f = mdbm_set_chain;
12342 #endif
12343
12344 ; return 0; }
12345 EOF
12346 if { (eval echo configure:12347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12347   rm -rf conftest*
12348   eval "ac_cv_func_mdbm_set_chain=yes"
12349 else
12350   echo "configure: failed program was:" >&5
12351   cat conftest.$ac_ext >&5
12352   rm -rf conftest*
12353   eval "ac_cv_func_mdbm_set_chain=no"
12354 fi
12355 rm -f conftest*
12356 fi
12357
12358 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12359   echo "$ac_t""yes" 1>&6
12360   ol_cv_lib_mdbm=yes
12361 else
12362   echo "$ac_t""no" 1>&6
12363
12364                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12365 echo "configure:12366: checking for mdbm_set_chain in -lmdbm" >&5
12366 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12367 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12368   echo $ac_n "(cached) $ac_c" 1>&6
12369 else
12370   ac_save_LIBS="$LIBS"
12371 LIBS="-lmdbm  $LIBS"
12372 cat > conftest.$ac_ext <<EOF
12373 #line 12374 "configure"
12374 #include "confdefs.h"
12375 /* Override any gcc2 internal prototype to avoid an error.  */
12376 /* We use char because int might match the return type of a gcc2
12377     builtin and then its argument prototype would still apply.  */
12378 char mdbm_set_chain();
12379
12380 int main() {
12381 mdbm_set_chain()
12382 ; return 0; }
12383 EOF
12384 if { (eval echo configure:12385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12385   rm -rf conftest*
12386   eval "ac_cv_lib_$ac_lib_var=yes"
12387 else
12388   echo "configure: failed program was:" >&5
12389   cat conftest.$ac_ext >&5
12390   rm -rf conftest*
12391   eval "ac_cv_lib_$ac_lib_var=no"
12392 fi
12393 rm -f conftest*
12394 LIBS="$ac_save_LIBS"
12395
12396 fi
12397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12398   echo "$ac_t""yes" 1>&6
12399   ol_cv_lib_mdbm=-lmdbm
12400 else
12401   echo "$ac_t""no" 1>&6
12402 ol_cv_lib_mdbm=no
12403 fi
12404
12405         
12406 fi
12407
12408         LIBS="$ol_LIBS"
12409
12410 fi
12411
12412 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12413
12414
12415  for ac_hdr in mdbm.h
12416 do
12417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12419 echo "configure:12420: checking for $ac_hdr" >&5
12420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12421   echo $ac_n "(cached) $ac_c" 1>&6
12422 else
12423   cat > conftest.$ac_ext <<EOF
12424 #line 12425 "configure"
12425 #include "confdefs.h"
12426 #include <$ac_hdr>
12427 EOF
12428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12429 { (eval echo configure:12430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12431 if test -z "$ac_err"; then
12432   rm -rf conftest*
12433   eval "ac_cv_header_$ac_safe=yes"
12434 else
12435   echo "$ac_err" >&5
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -rf conftest*
12439   eval "ac_cv_header_$ac_safe=no"
12440 fi
12441 rm -f conftest*
12442 fi
12443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12444   echo "$ac_t""yes" 1>&6
12445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12446   cat >> confdefs.h <<EOF
12447 #define $ac_tr_hdr 1
12448 EOF
12449  
12450 else
12451   echo "$ac_t""no" 1>&6
12452 fi
12453 done
12454
12455  echo $ac_n "checking for db""... $ac_c" 1>&6
12456 echo "configure:12457: checking for db" >&5
12457 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12458   echo $ac_n "(cached) $ac_c" 1>&6
12459 else
12460   
12461         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12462                 ol_cv_mdbm=no
12463         else
12464                 ol_cv_mdbm=yes
12465         fi
12466
12467 fi
12468
12469 echo "$ac_t""$ol_cv_mdbm" 1>&6
12470  if test $ol_cv_mdbm = yes ; then
12471         cat >> confdefs.h <<\EOF
12472 #define HAVE_MDBM 1
12473 EOF
12474
12475  fi
12476
12477
12478         if test $ol_cv_mdbm = yes ; then
12479                 ol_link_ldbm=mdbm
12480                 ol_with_ldbm_api=mdbm
12481                 if test $ol_cv_lib_mdbm != yes ; then
12482                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12483                 fi
12484         fi
12485 fi
12486
12487 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12488         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12489 echo "configure:12490: checking for GDBM library" >&5
12490 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12491   echo $ac_n "(cached) $ac_c" 1>&6
12492 else
12493         ol_LIBS="$LIBS"
12494         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12495 echo "configure:12496: checking for gdbm_open" >&5
12496 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12497   echo $ac_n "(cached) $ac_c" 1>&6
12498 else
12499   cat > conftest.$ac_ext <<EOF
12500 #line 12501 "configure"
12501 #include "confdefs.h"
12502 /* System header to define __stub macros and hopefully few prototypes,
12503     which can conflict with char gdbm_open(); below.  */
12504 #include <assert.h>
12505 /* Override any gcc2 internal prototype to avoid an error.  */
12506 /* We use char because int might match the return type of a gcc2
12507     builtin and then its argument prototype would still apply.  */
12508 char gdbm_open();
12509 char (*f)();
12510
12511 int main() {
12512
12513 /* The GNU C library defines this for functions which it implements
12514     to always fail with ENOSYS.  Some functions are actually named
12515     something starting with __ and the normal name is an alias.  */
12516 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12517 choke me
12518 #else
12519 f = gdbm_open;
12520 #endif
12521
12522 ; return 0; }
12523 EOF
12524 if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12525   rm -rf conftest*
12526   eval "ac_cv_func_gdbm_open=yes"
12527 else
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -rf conftest*
12531   eval "ac_cv_func_gdbm_open=no"
12532 fi
12533 rm -f conftest*
12534 fi
12535
12536 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12537   echo "$ac_t""yes" 1>&6
12538   ol_cv_lib_gdbm=yes
12539 else
12540   echo "$ac_t""no" 1>&6
12541
12542                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12543 echo "configure:12544: checking for gdbm_open in -lgdbm" >&5
12544 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12546   echo $ac_n "(cached) $ac_c" 1>&6
12547 else
12548   ac_save_LIBS="$LIBS"
12549 LIBS="-lgdbm  $LIBS"
12550 cat > conftest.$ac_ext <<EOF
12551 #line 12552 "configure"
12552 #include "confdefs.h"
12553 /* Override any gcc2 internal prototype to avoid an error.  */
12554 /* We use char because int might match the return type of a gcc2
12555     builtin and then its argument prototype would still apply.  */
12556 char gdbm_open();
12557
12558 int main() {
12559 gdbm_open()
12560 ; return 0; }
12561 EOF
12562 if { (eval echo configure:12563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12563   rm -rf conftest*
12564   eval "ac_cv_lib_$ac_lib_var=yes"
12565 else
12566   echo "configure: failed program was:" >&5
12567   cat conftest.$ac_ext >&5
12568   rm -rf conftest*
12569   eval "ac_cv_lib_$ac_lib_var=no"
12570 fi
12571 rm -f conftest*
12572 LIBS="$ac_save_LIBS"
12573
12574 fi
12575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12576   echo "$ac_t""yes" 1>&6
12577   ol_cv_lib_gdbm=-lgdbm
12578 else
12579   echo "$ac_t""no" 1>&6
12580 ol_cv_lib_gdbm=no
12581 fi
12582
12583         
12584 fi
12585
12586         LIBS="$ol_LIBS"
12587
12588 fi
12589
12590 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12591
12592
12593  for ac_hdr in gdbm.h
12594 do
12595 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12596 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12597 echo "configure:12598: checking for $ac_hdr" >&5
12598 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12599   echo $ac_n "(cached) $ac_c" 1>&6
12600 else
12601   cat > conftest.$ac_ext <<EOF
12602 #line 12603 "configure"
12603 #include "confdefs.h"
12604 #include <$ac_hdr>
12605 EOF
12606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12607 { (eval echo configure:12608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12609 if test -z "$ac_err"; then
12610   rm -rf conftest*
12611   eval "ac_cv_header_$ac_safe=yes"
12612 else
12613   echo "$ac_err" >&5
12614   echo "configure: failed program was:" >&5
12615   cat conftest.$ac_ext >&5
12616   rm -rf conftest*
12617   eval "ac_cv_header_$ac_safe=no"
12618 fi
12619 rm -f conftest*
12620 fi
12621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12622   echo "$ac_t""yes" 1>&6
12623     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12624   cat >> confdefs.h <<EOF
12625 #define $ac_tr_hdr 1
12626 EOF
12627  
12628 else
12629   echo "$ac_t""no" 1>&6
12630 fi
12631 done
12632
12633  echo $ac_n "checking for db""... $ac_c" 1>&6
12634 echo "configure:12635: checking for db" >&5
12635 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12636   echo $ac_n "(cached) $ac_c" 1>&6
12637 else
12638   
12639         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12640                 ol_cv_gdbm=no
12641         else
12642                 ol_cv_gdbm=yes
12643         fi
12644
12645 fi
12646
12647 echo "$ac_t""$ol_cv_gdbm" 1>&6
12648  if test $ol_cv_gdbm = yes ; then
12649         cat >> confdefs.h <<\EOF
12650 #define HAVE_GDBM 1
12651 EOF
12652
12653  fi
12654
12655
12656         if test $ol_cv_gdbm = yes ; then
12657                 ol_link_ldbm=gdbm
12658                 ol_with_ldbm_api=gdbm
12659
12660                 if test $ol_cv_lib_gdbm != yes ; then
12661                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12662                 fi
12663         fi
12664 fi
12665
12666 if test $ol_with_ldbm_api = ndbm ; then
12667         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12668 echo "configure:12669: checking for NDBM library" >&5
12669 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12670   echo $ac_n "(cached) $ac_c" 1>&6
12671 else
12672         ol_LIBS="$LIBS"
12673         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12674 echo "configure:12675: checking for dbm_open" >&5
12675 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12676   echo $ac_n "(cached) $ac_c" 1>&6
12677 else
12678   cat > conftest.$ac_ext <<EOF
12679 #line 12680 "configure"
12680 #include "confdefs.h"
12681 /* System header to define __stub macros and hopefully few prototypes,
12682     which can conflict with char dbm_open(); below.  */
12683 #include <assert.h>
12684 /* Override any gcc2 internal prototype to avoid an error.  */
12685 /* We use char because int might match the return type of a gcc2
12686     builtin and then its argument prototype would still apply.  */
12687 char dbm_open();
12688 char (*f)();
12689
12690 int main() {
12691
12692 /* The GNU C library defines this for functions which it implements
12693     to always fail with ENOSYS.  Some functions are actually named
12694     something starting with __ and the normal name is an alias.  */
12695 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12696 choke me
12697 #else
12698 f = dbm_open;
12699 #endif
12700
12701 ; return 0; }
12702 EOF
12703 if { (eval echo configure:12704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12704   rm -rf conftest*
12705   eval "ac_cv_func_dbm_open=yes"
12706 else
12707   echo "configure: failed program was:" >&5
12708   cat conftest.$ac_ext >&5
12709   rm -rf conftest*
12710   eval "ac_cv_func_dbm_open=no"
12711 fi
12712 rm -f conftest*
12713 fi
12714
12715 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12716   echo "$ac_t""yes" 1>&6
12717   ol_cv_lib_ndbm=yes
12718 else
12719   echo "$ac_t""no" 1>&6
12720
12721                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12722 echo "configure:12723: checking for dbm_open in -lndbm" >&5
12723 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12724 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12725   echo $ac_n "(cached) $ac_c" 1>&6
12726 else
12727   ac_save_LIBS="$LIBS"
12728 LIBS="-lndbm  $LIBS"
12729 cat > conftest.$ac_ext <<EOF
12730 #line 12731 "configure"
12731 #include "confdefs.h"
12732 /* Override any gcc2 internal prototype to avoid an error.  */
12733 /* We use char because int might match the return type of a gcc2
12734     builtin and then its argument prototype would still apply.  */
12735 char dbm_open();
12736
12737 int main() {
12738 dbm_open()
12739 ; return 0; }
12740 EOF
12741 if { (eval echo configure:12742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12742   rm -rf conftest*
12743   eval "ac_cv_lib_$ac_lib_var=yes"
12744 else
12745   echo "configure: failed program was:" >&5
12746   cat conftest.$ac_ext >&5
12747   rm -rf conftest*
12748   eval "ac_cv_lib_$ac_lib_var=no"
12749 fi
12750 rm -f conftest*
12751 LIBS="$ac_save_LIBS"
12752
12753 fi
12754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12755   echo "$ac_t""yes" 1>&6
12756   ol_cv_lib_ndbm=-lndbm
12757 else
12758   echo "$ac_t""no" 1>&6
12759
12760                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12761 echo "configure:12762: checking for dbm_open in -ldbm" >&5
12762 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12764   echo $ac_n "(cached) $ac_c" 1>&6
12765 else
12766   ac_save_LIBS="$LIBS"
12767 LIBS="-ldbm  $LIBS"
12768 cat > conftest.$ac_ext <<EOF
12769 #line 12770 "configure"
12770 #include "confdefs.h"
12771 /* Override any gcc2 internal prototype to avoid an error.  */
12772 /* We use char because int might match the return type of a gcc2
12773     builtin and then its argument prototype would still apply.  */
12774 char dbm_open();
12775
12776 int main() {
12777 dbm_open()
12778 ; return 0; }
12779 EOF
12780 if { (eval echo configure:12781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12781   rm -rf conftest*
12782   eval "ac_cv_lib_$ac_lib_var=yes"
12783 else
12784   echo "configure: failed program was:" >&5
12785   cat conftest.$ac_ext >&5
12786   rm -rf conftest*
12787   eval "ac_cv_lib_$ac_lib_var=no"
12788 fi
12789 rm -f conftest*
12790 LIBS="$ac_save_LIBS"
12791
12792 fi
12793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12794   echo "$ac_t""yes" 1>&6
12795   ol_cv_lib_ndbm=-ldbm
12796 else
12797   echo "$ac_t""no" 1>&6
12798 ol_cv_lib_ndbm=no
12799 fi
12800                 
12801 fi
12802
12803         
12804 fi
12805
12806         LIBS="$ol_LIBS"
12807
12808 fi
12809
12810 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12811
12812
12813  for ac_hdr in ndbm.h
12814 do
12815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12817 echo "configure:12818: checking for $ac_hdr" >&5
12818 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12819   echo $ac_n "(cached) $ac_c" 1>&6
12820 else
12821   cat > conftest.$ac_ext <<EOF
12822 #line 12823 "configure"
12823 #include "confdefs.h"
12824 #include <$ac_hdr>
12825 EOF
12826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12827 { (eval echo configure:12828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12829 if test -z "$ac_err"; then
12830   rm -rf conftest*
12831   eval "ac_cv_header_$ac_safe=yes"
12832 else
12833   echo "$ac_err" >&5
12834   echo "configure: failed program was:" >&5
12835   cat conftest.$ac_ext >&5
12836   rm -rf conftest*
12837   eval "ac_cv_header_$ac_safe=no"
12838 fi
12839 rm -f conftest*
12840 fi
12841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12842   echo "$ac_t""yes" 1>&6
12843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12844   cat >> confdefs.h <<EOF
12845 #define $ac_tr_hdr 1
12846 EOF
12847  
12848 else
12849   echo "$ac_t""no" 1>&6
12850 fi
12851 done
12852
12853  echo $ac_n "checking for db""... $ac_c" 1>&6
12854 echo "configure:12855: checking for db" >&5
12855 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12856   echo $ac_n "(cached) $ac_c" 1>&6
12857 else
12858   
12859         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12860                 ol_cv_ndbm=no
12861         else
12862                 ol_cv_ndbm=yes
12863         fi
12864
12865 fi
12866
12867 echo "$ac_t""$ol_cv_ndbm" 1>&6
12868  if test $ol_cv_ndbm = yes ; then
12869         cat >> confdefs.h <<\EOF
12870 #define HAVE_NDBM 1
12871 EOF
12872
12873  fi
12874
12875
12876         if test $ol_cv_ndbm = yes ; then
12877                 ol_link_ldbm=ndbm
12878                 ol_with_ldbm_api=ndbm
12879
12880                 if test $ol_cv_lib_ndbm != yes ; then
12881                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12882                 fi
12883         fi
12884 fi
12885
12886 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12887         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12888         if test $ol_enable_ldbm = yes ; then
12889                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12890         fi
12891
12892         echo "configure: warning: disabling LDBM" 1>&2
12893         ol_enable_ldbm=no
12894 fi
12895
12896 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12897         LINK_BINS_DYNAMIC="yes"
12898 else
12899         LINK_BINS_DYNAMIC="no"
12900 fi
12901
12902 if test $ol_enable_wrappers != no ; then
12903         for ac_hdr in tcpd.h
12904 do
12905 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12906 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12907 echo "configure:12908: checking for $ac_hdr" >&5
12908 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12909   echo $ac_n "(cached) $ac_c" 1>&6
12910 else
12911   cat > conftest.$ac_ext <<EOF
12912 #line 12913 "configure"
12913 #include "confdefs.h"
12914 #include <$ac_hdr>
12915 EOF
12916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12917 { (eval echo configure:12918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12919 if test -z "$ac_err"; then
12920   rm -rf conftest*
12921   eval "ac_cv_header_$ac_safe=yes"
12922 else
12923   echo "$ac_err" >&5
12924   echo "configure: failed program was:" >&5
12925   cat conftest.$ac_ext >&5
12926   rm -rf conftest*
12927   eval "ac_cv_header_$ac_safe=no"
12928 fi
12929 rm -f conftest*
12930 fi
12931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12932   echo "$ac_t""yes" 1>&6
12933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12934   cat >> confdefs.h <<EOF
12935 #define $ac_tr_hdr 1
12936 EOF
12937  
12938 else
12939   echo "$ac_t""no" 1>&6
12940 fi
12941 done
12942
12943
12944         if test $ac_cv_header_tcpd_h != yes ; then
12945                 have_wrappers=no
12946         else
12947                 cat > conftest.$ac_ext <<EOF
12948 #line 12949 "configure"
12949 #include "confdefs.h"
12950
12951 int allow_severity = 0;
12952 int deny_severity  = 0;
12953                 
12954 int main() {
12955 hosts_access()
12956 ; return 0; }
12957 EOF
12958 if { (eval echo configure:12959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12959   rm -rf conftest*
12960   have_wrappers=yes
12961 else
12962   echo "configure: failed program was:" >&5
12963   cat conftest.$ac_ext >&5
12964   rm -rf conftest*
12965   have_wrappers=no
12966 fi
12967 rm -f conftest*
12968         fi
12969
12970         if test $have_wrappers = yes ; then
12971                 cat >> confdefs.h <<\EOF
12972 #define HAVE_TCPD 1
12973 EOF
12974
12975                 WRAP_LIBS="-lwrap"
12976
12977                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12978 echo "configure:12979: checking for main in -lnsl" >&5
12979 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12981   echo $ac_n "(cached) $ac_c" 1>&6
12982 else
12983   ac_save_LIBS="$LIBS"
12984 LIBS="-lnsl  $LIBS"
12985 cat > conftest.$ac_ext <<EOF
12986 #line 12987 "configure"
12987 #include "confdefs.h"
12988
12989 int main() {
12990 main()
12991 ; return 0; }
12992 EOF
12993 if { (eval echo configure:12994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12994   rm -rf conftest*
12995   eval "ac_cv_lib_$ac_lib_var=yes"
12996 else
12997   echo "configure: failed program was:" >&5
12998   cat conftest.$ac_ext >&5
12999   rm -rf conftest*
13000   eval "ac_cv_lib_$ac_lib_var=no"
13001 fi
13002 rm -f conftest*
13003 LIBS="$ac_save_LIBS"
13004
13005 fi
13006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13007   echo "$ac_t""yes" 1>&6
13008     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13009     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13010   cat >> confdefs.h <<EOF
13011 #define $ac_tr_lib 1
13012 EOF
13013
13014   LIBS="-lnsl $LIBS"
13015
13016 else
13017   echo "$ac_t""no" 1>&6
13018 fi
13019
13020         else
13021                 echo "configure: warning: could not find -lwrap" 1>&2
13022                 if test $ol_enable_wrappers = yes ; then
13023                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13024                 fi
13025
13026                 echo "configure: warning: disabling wrappers support" 1>&2
13027                 ol_enable_wrappers=no
13028                 WRAP_LIBS=""
13029         fi
13030 fi
13031
13032 if test $ol_enable_syslog != no ; then
13033         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13034 echo "configure:13035: checking for openlog" >&5
13035 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13036   echo $ac_n "(cached) $ac_c" 1>&6
13037 else
13038   cat > conftest.$ac_ext <<EOF
13039 #line 13040 "configure"
13040 #include "confdefs.h"
13041 /* System header to define __stub macros and hopefully few prototypes,
13042     which can conflict with char openlog(); below.  */
13043 #include <assert.h>
13044 /* Override any gcc2 internal prototype to avoid an error.  */
13045 /* We use char because int might match the return type of a gcc2
13046     builtin and then its argument prototype would still apply.  */
13047 char openlog();
13048 char (*f)();
13049
13050 int main() {
13051
13052 /* The GNU C library defines this for functions which it implements
13053     to always fail with ENOSYS.  Some functions are actually named
13054     something starting with __ and the normal name is an alias.  */
13055 #if defined (__stub_openlog) || defined (__stub___openlog)
13056 choke me
13057 #else
13058 f = openlog;
13059 #endif
13060
13061 ; return 0; }
13062 EOF
13063 if { (eval echo configure:13064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13064   rm -rf conftest*
13065   eval "ac_cv_func_openlog=yes"
13066 else
13067   echo "configure: failed program was:" >&5
13068   cat conftest.$ac_ext >&5
13069   rm -rf conftest*
13070   eval "ac_cv_func_openlog=no"
13071 fi
13072 rm -f conftest*
13073 fi
13074
13075 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13076   echo "$ac_t""yes" 1>&6
13077   :
13078 else
13079   echo "$ac_t""no" 1>&6
13080 fi
13081
13082         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13083                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13084         fi
13085         ol_enable_syslog=$ac_cv_func_openlog
13086 fi
13087
13088 if test $ol_enable_tcl != no ; then
13089         for ac_hdr in tcl.h
13090 do
13091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13093 echo "configure:13094: checking for $ac_hdr" >&5
13094 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13095   echo $ac_n "(cached) $ac_c" 1>&6
13096 else
13097   cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 #include <$ac_hdr>
13101 EOF
13102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13103 { (eval echo configure:13104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13105 if test -z "$ac_err"; then
13106   rm -rf conftest*
13107   eval "ac_cv_header_$ac_safe=yes"
13108 else
13109   echo "$ac_err" >&5
13110   echo "configure: failed program was:" >&5
13111   cat conftest.$ac_ext >&5
13112   rm -rf conftest*
13113   eval "ac_cv_header_$ac_safe=no"
13114 fi
13115 rm -f conftest*
13116 fi
13117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13118   echo "$ac_t""yes" 1>&6
13119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13120   cat >> confdefs.h <<EOF
13121 #define $ac_tr_hdr 1
13122 EOF
13123  
13124 else
13125   echo "$ac_t""no" 1>&6
13126 fi
13127 done
13128
13129
13130         if test $ac_cv_header_tcl_h != yes ; then
13131                 have_tcl=no
13132         else
13133                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13134                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13135 echo "configure:13136: checking for main in -l$lib" >&5
13136 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13138   echo $ac_n "(cached) $ac_c" 1>&6
13139 else
13140   ac_save_LIBS="$LIBS"
13141 LIBS="-l$lib  $LIBS"
13142 cat > conftest.$ac_ext <<EOF
13143 #line 13144 "configure"
13144 #include "confdefs.h"
13145
13146 int main() {
13147 main()
13148 ; return 0; }
13149 EOF
13150 if { (eval echo configure:13151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13151   rm -rf conftest*
13152   eval "ac_cv_lib_$ac_lib_var=yes"
13153 else
13154   echo "configure: failed program was:" >&5
13155   cat conftest.$ac_ext >&5
13156   rm -rf conftest*
13157   eval "ac_cv_lib_$ac_lib_var=no"
13158 fi
13159 rm -f conftest*
13160 LIBS="$ac_save_LIBS"
13161
13162 fi
13163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13164   echo "$ac_t""yes" 1>&6
13165   have_tcl=yes
13166                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13167                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13168                            else
13169                                MOD_TCL_LIB="-l${lib}"
13170                            fi;break
13171 else
13172   echo "$ac_t""no" 1>&6
13173 have_tcl=no
13174 fi
13175
13176                 done
13177         fi
13178
13179         if test $have_tcl != yes ; then
13180                 echo "configure: warning: could not find -ltcl" 1>&2
13181                 if test $ol_enable_tcl = yes ; then
13182                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13183                 fi
13184
13185                 ol_enable_tcl=no
13186         fi
13187 fi
13188
13189 ol_link_termcap=no
13190 for ac_hdr in termcap.h ncurses.h
13191 do
13192 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13193 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13194 echo "configure:13195: checking for $ac_hdr" >&5
13195 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13196   echo $ac_n "(cached) $ac_c" 1>&6
13197 else
13198   cat > conftest.$ac_ext <<EOF
13199 #line 13200 "configure"
13200 #include "confdefs.h"
13201 #include <$ac_hdr>
13202 EOF
13203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13204 { (eval echo configure:13205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13206 if test -z "$ac_err"; then
13207   rm -rf conftest*
13208   eval "ac_cv_header_$ac_safe=yes"
13209 else
13210   echo "$ac_err" >&5
13211   echo "configure: failed program was:" >&5
13212   cat conftest.$ac_ext >&5
13213   rm -rf conftest*
13214   eval "ac_cv_header_$ac_safe=no"
13215 fi
13216 rm -f conftest*
13217 fi
13218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13219   echo "$ac_t""yes" 1>&6
13220     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13221   cat >> confdefs.h <<EOF
13222 #define $ac_tr_hdr 1
13223 EOF
13224  
13225 else
13226   echo "$ac_t""no" 1>&6
13227 fi
13228 done
13229
13230
13231 if test $ol_link_termcap = no ; then
13232         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13233 echo "configure:13234: checking for tputs in -ltermcap" >&5
13234 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13236   echo $ac_n "(cached) $ac_c" 1>&6
13237 else
13238   ac_save_LIBS="$LIBS"
13239 LIBS="-ltermcap  $LIBS"
13240 cat > conftest.$ac_ext <<EOF
13241 #line 13242 "configure"
13242 #include "confdefs.h"
13243 /* Override any gcc2 internal prototype to avoid an error.  */
13244 /* We use char because int might match the return type of a gcc2
13245     builtin and then its argument prototype would still apply.  */
13246 char tputs();
13247
13248 int main() {
13249 tputs()
13250 ; return 0; }
13251 EOF
13252 if { (eval echo configure:13253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13253   rm -rf conftest*
13254   eval "ac_cv_lib_$ac_lib_var=yes"
13255 else
13256   echo "configure: failed program was:" >&5
13257   cat conftest.$ac_ext >&5
13258   rm -rf conftest*
13259   eval "ac_cv_lib_$ac_lib_var=no"
13260 fi
13261 rm -f conftest*
13262 LIBS="$ac_save_LIBS"
13263
13264 fi
13265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13266   echo "$ac_t""yes" 1>&6
13267   have_termcap=yes
13268 else
13269   echo "$ac_t""no" 1>&6
13270 have_termcap=no
13271 fi
13272
13273         if test $have_termcap = yes ; then
13274                 cat >> confdefs.h <<\EOF
13275 #define HAVE_TERMCAP 1
13276 EOF
13277
13278                 ol_link_termcap=yes
13279                 TERMCAP_LIBS=-ltermcap
13280         fi
13281 fi
13282
13283 if test $ol_link_termcap = no ; then
13284         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13285 echo "configure:13286: checking for initscr in -lncurses" >&5
13286 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13288   echo $ac_n "(cached) $ac_c" 1>&6
13289 else
13290   ac_save_LIBS="$LIBS"
13291 LIBS="-lncurses  $LIBS"
13292 cat > conftest.$ac_ext <<EOF
13293 #line 13294 "configure"
13294 #include "confdefs.h"
13295 /* Override any gcc2 internal prototype to avoid an error.  */
13296 /* We use char because int might match the return type of a gcc2
13297     builtin and then its argument prototype would still apply.  */
13298 char initscr();
13299
13300 int main() {
13301 initscr()
13302 ; return 0; }
13303 EOF
13304 if { (eval echo configure:13305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13305   rm -rf conftest*
13306   eval "ac_cv_lib_$ac_lib_var=yes"
13307 else
13308   echo "configure: failed program was:" >&5
13309   cat conftest.$ac_ext >&5
13310   rm -rf conftest*
13311   eval "ac_cv_lib_$ac_lib_var=no"
13312 fi
13313 rm -f conftest*
13314 LIBS="$ac_save_LIBS"
13315
13316 fi
13317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13318   echo "$ac_t""yes" 1>&6
13319   have_ncurses=yes
13320 else
13321   echo "$ac_t""no" 1>&6
13322 have_ncurses=no
13323 fi
13324
13325         if test $have_ncurses = yes ; then
13326                 cat >> confdefs.h <<\EOF
13327 #define HAVE_NCURSES 1
13328 EOF
13329
13330                 ol_link_termcap=yes
13331                 TERMCAP_LIBS=-lncurses
13332         fi
13333 fi
13334
13335 if test $ol_link_termcap = no ; then
13336         cat >> confdefs.h <<\EOF
13337 #define NO_TERMCAP 1
13338 EOF
13339
13340         TERMCAP_LIBS=
13341 fi
13342
13343 ol_link_sasl=no
13344 ol_link_spasswd=no
13345 if test $ol_with_cyrus_sasl != no ; then
13346         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13347 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13348 echo "configure:13349: checking for sasl.h" >&5
13349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13350   echo $ac_n "(cached) $ac_c" 1>&6
13351 else
13352   cat > conftest.$ac_ext <<EOF
13353 #line 13354 "configure"
13354 #include "confdefs.h"
13355 #include <sasl.h>
13356 EOF
13357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13358 { (eval echo configure:13359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13360 if test -z "$ac_err"; then
13361   rm -rf conftest*
13362   eval "ac_cv_header_$ac_safe=yes"
13363 else
13364   echo "$ac_err" >&5
13365   echo "configure: failed program was:" >&5
13366   cat conftest.$ac_ext >&5
13367   rm -rf conftest*
13368   eval "ac_cv_header_$ac_safe=no"
13369 fi
13370 rm -f conftest*
13371 fi
13372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13373   echo "$ac_t""yes" 1>&6
13374   :
13375 else
13376   echo "$ac_t""no" 1>&6
13377 fi
13378
13379
13380         if test $ac_cv_header_sasl_h = yes ; then
13381                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13382 echo "configure:13383: checking for sasl_client_init in -lsasl" >&5
13383 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13384 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13385   echo $ac_n "(cached) $ac_c" 1>&6
13386 else
13387   ac_save_LIBS="$LIBS"
13388 LIBS="-lsasl  $LIBS"
13389 cat > conftest.$ac_ext <<EOF
13390 #line 13391 "configure"
13391 #include "confdefs.h"
13392 /* Override any gcc2 internal prototype to avoid an error.  */
13393 /* We use char because int might match the return type of a gcc2
13394     builtin and then its argument prototype would still apply.  */
13395 char sasl_client_init();
13396
13397 int main() {
13398 sasl_client_init()
13399 ; return 0; }
13400 EOF
13401 if { (eval echo configure:13402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13402   rm -rf conftest*
13403   eval "ac_cv_lib_$ac_lib_var=yes"
13404 else
13405   echo "configure: failed program was:" >&5
13406   cat conftest.$ac_ext >&5
13407   rm -rf conftest*
13408   eval "ac_cv_lib_$ac_lib_var=no"
13409 fi
13410 rm -f conftest*
13411 LIBS="$ac_save_LIBS"
13412
13413 fi
13414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13415   echo "$ac_t""yes" 1>&6
13416   have_cyrus_sasl=yes
13417 else
13418   echo "$ac_t""no" 1>&6
13419 have_cyrus_sasl=no
13420 fi
13421
13422
13423                 if test $have_cyrus_sasl != no ; then
13424                         SASL_LIBS="-lsasl"
13425                         cat >> confdefs.h <<\EOF
13426 #define HAVE_CYRUS_SASL 1
13427 EOF
13428
13429                         ol_link_sasl=yes
13430                 fi
13431         fi
13432
13433         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13434                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13435         fi
13436 fi
13437
13438 if test $cross_compiling != yes ; then
13439         dev=no
13440         if test -r /dev/urandom ; then
13441                 dev="/dev/urandom";
13442         elif test -r /idev/urandom ; then
13443                 dev="/idev/urandom";
13444         elif test -r /dev/srandom ; then
13445                 dev="/dev/srandom";
13446         elif test -r /dev/random ; then
13447                 dev="/dev/random";
13448         elif test -r /idev/random ; then
13449                 dev="/idev/random";
13450         fi
13451
13452         if test $dev != no ; then
13453                 cat >> confdefs.h <<EOF
13454 #define URANDOM_DEVICE "$dev"
13455 EOF
13456
13457         fi
13458 fi
13459
13460 ol_link_fetch=no
13461 if test $ol_with_fetch != no ; then
13462         ol_LIBS=$LIBS
13463 LIBS="-lfetch -lcom_err $LIBS"
13464 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13465 echo "configure:13466: checking fetch(3) library" >&5
13466 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13467   echo $ac_n "(cached) $ac_c" 1>&6
13468 else
13469   
13470         cat > conftest.$ac_ext <<EOF
13471 #line 13472 "configure"
13472 #include "confdefs.h"
13473
13474 #include <sys/param.h>
13475 #include <stdio.h>
13476 #include <fetch.h>
13477 int main() {
13478 struct url *u = fetchParseURL("file:///"); 
13479 ; return 0; }
13480 EOF
13481 if { (eval echo configure:13482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13482   rm -rf conftest*
13483   ol_cv_lib_fetch=yes
13484 else
13485   echo "configure: failed program was:" >&5
13486   cat conftest.$ac_ext >&5
13487   rm -rf conftest*
13488   ol_cv_lib_fetch=no
13489 fi
13490 rm -f conftest*
13491 fi
13492
13493 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13494 LIBS=$ol_LIBS
13495 if test $ol_cv_lib_fetch != no ; then
13496         ol_link_fetch="-lfetch -lcom_err"
13497         cat >> confdefs.h <<\EOF
13498 #define HAVE_FETCH 1
13499 EOF
13500
13501 fi
13502
13503
13504         if test $ol_cv_lib_fetch != no ; then
13505                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13506                 ol_link_fetch=freebsd
13507
13508         elif test $ol_with_fetch != auto ; then
13509                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13510         fi 
13511 fi
13512
13513 ol_link_readline=no
13514 if test $ol_with_readline != no ; then
13515         for ac_hdr in readline/readline.h readline/history.h
13516 do
13517 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13518 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13519 echo "configure:13520: checking for $ac_hdr" >&5
13520 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13521   echo $ac_n "(cached) $ac_c" 1>&6
13522 else
13523   cat > conftest.$ac_ext <<EOF
13524 #line 13525 "configure"
13525 #include "confdefs.h"
13526 #include <$ac_hdr>
13527 EOF
13528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13529 { (eval echo configure:13530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13531 if test -z "$ac_err"; then
13532   rm -rf conftest*
13533   eval "ac_cv_header_$ac_safe=yes"
13534 else
13535   echo "$ac_err" >&5
13536   echo "configure: failed program was:" >&5
13537   cat conftest.$ac_ext >&5
13538   rm -rf conftest*
13539   eval "ac_cv_header_$ac_safe=no"
13540 fi
13541 rm -f conftest*
13542 fi
13543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13544   echo "$ac_t""yes" 1>&6
13545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13546   cat >> confdefs.h <<EOF
13547 #define $ac_tr_hdr 1
13548 EOF
13549  
13550 else
13551   echo "$ac_t""no" 1>&6
13552 fi
13553 done
13554
13555
13556         if test $ac_cv_header_readline_readline_h = yes ; then
13557                 save_LIBS="$LIBS"
13558                 LIBS="$TERMCAP_LIBS $LIBS"
13559                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13560 echo "configure:13561: checking for readline in -lreadline" >&5
13561 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13562 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13563   echo $ac_n "(cached) $ac_c" 1>&6
13564 else
13565   ac_save_LIBS="$LIBS"
13566 LIBS="-lreadline  $LIBS"
13567 cat > conftest.$ac_ext <<EOF
13568 #line 13569 "configure"
13569 #include "confdefs.h"
13570 /* Override any gcc2 internal prototype to avoid an error.  */
13571 /* We use char because int might match the return type of a gcc2
13572     builtin and then its argument prototype would still apply.  */
13573 char readline();
13574
13575 int main() {
13576 readline()
13577 ; return 0; }
13578 EOF
13579 if { (eval echo configure:13580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13580   rm -rf conftest*
13581   eval "ac_cv_lib_$ac_lib_var=yes"
13582 else
13583   echo "configure: failed program was:" >&5
13584   cat conftest.$ac_ext >&5
13585   rm -rf conftest*
13586   eval "ac_cv_lib_$ac_lib_var=no"
13587 fi
13588 rm -f conftest*
13589 LIBS="$ac_save_LIBS"
13590
13591 fi
13592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13593   echo "$ac_t""yes" 1>&6
13594   have_readline=yes
13595 else
13596   echo "$ac_t""no" 1>&6
13597 have_readline=no
13598 fi
13599
13600                 LIBS="$save_LIBS"
13601                         
13602                 if test $have_readline = yes ; then
13603                         ol_with_readline=found
13604                         ol_link_readline=yes
13605
13606                         READLINE_LIBS="-lreadline"
13607                 fi
13608         fi
13609 fi
13610
13611 if test $ol_link_readline = yes ; then
13612         cat >> confdefs.h <<\EOF
13613 #define HAVE_READLINE 1
13614 EOF
13615
13616 fi
13617
13618
13619 if test $ol_enable_crypt != no ; then
13620         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13621 echo "configure:13622: checking for crypt" >&5
13622 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13623   echo $ac_n "(cached) $ac_c" 1>&6
13624 else
13625   cat > conftest.$ac_ext <<EOF
13626 #line 13627 "configure"
13627 #include "confdefs.h"
13628 /* System header to define __stub macros and hopefully few prototypes,
13629     which can conflict with char crypt(); below.  */
13630 #include <assert.h>
13631 /* Override any gcc2 internal prototype to avoid an error.  */
13632 /* We use char because int might match the return type of a gcc2
13633     builtin and then its argument prototype would still apply.  */
13634 char crypt();
13635 char (*f)();
13636
13637 int main() {
13638
13639 /* The GNU C library defines this for functions which it implements
13640     to always fail with ENOSYS.  Some functions are actually named
13641     something starting with __ and the normal name is an alias.  */
13642 #if defined (__stub_crypt) || defined (__stub___crypt)
13643 choke me
13644 #else
13645 f = crypt;
13646 #endif
13647
13648 ; return 0; }
13649 EOF
13650 if { (eval echo configure:13651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13651   rm -rf conftest*
13652   eval "ac_cv_func_crypt=yes"
13653 else
13654   echo "configure: failed program was:" >&5
13655   cat conftest.$ac_ext >&5
13656   rm -rf conftest*
13657   eval "ac_cv_func_crypt=no"
13658 fi
13659 rm -f conftest*
13660 fi
13661
13662 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13663   echo "$ac_t""yes" 1>&6
13664   have_crypt=yes
13665 else
13666   echo "$ac_t""no" 1>&6
13667
13668                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13669 echo "configure:13670: checking for crypt in -lcrypt" >&5
13670 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13671 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13672   echo $ac_n "(cached) $ac_c" 1>&6
13673 else
13674   ac_save_LIBS="$LIBS"
13675 LIBS="-lcrypt  $LIBS"
13676 cat > conftest.$ac_ext <<EOF
13677 #line 13678 "configure"
13678 #include "confdefs.h"
13679 /* Override any gcc2 internal prototype to avoid an error.  */
13680 /* We use char because int might match the return type of a gcc2
13681     builtin and then its argument prototype would still apply.  */
13682 char crypt();
13683
13684 int main() {
13685 crypt()
13686 ; return 0; }
13687 EOF
13688 if { (eval echo configure:13689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13689   rm -rf conftest*
13690   eval "ac_cv_lib_$ac_lib_var=yes"
13691 else
13692   echo "configure: failed program was:" >&5
13693   cat conftest.$ac_ext >&5
13694   rm -rf conftest*
13695   eval "ac_cv_lib_$ac_lib_var=no"
13696 fi
13697 rm -f conftest*
13698 LIBS="$ac_save_LIBS"
13699
13700 fi
13701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13702   echo "$ac_t""yes" 1>&6
13703   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13704                         have_crypt=yes
13705 else
13706   echo "$ac_t""no" 1>&6
13707 have_crypt=no
13708 fi
13709
13710 fi
13711
13712
13713         if test $have_crypt = yes ; then
13714                 cat >> confdefs.h <<\EOF
13715 #define HAVE_CRYPT 1
13716 EOF
13717
13718         else
13719                 echo "configure: warning: could not find crypt" 1>&2
13720                 if test $ol_enable_crypt = yes ; then
13721                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13722                 fi
13723
13724                 echo "configure: warning: disabling crypt support" 1>&2
13725                 ol_enable_crypt=no
13726         fi
13727 fi
13728
13729 if test $ol_enable_proctitle != no ; then
13730         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13731 echo "configure:13732: checking for setproctitle" >&5
13732 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13733   echo $ac_n "(cached) $ac_c" 1>&6
13734 else
13735   cat > conftest.$ac_ext <<EOF
13736 #line 13737 "configure"
13737 #include "confdefs.h"
13738 /* System header to define __stub macros and hopefully few prototypes,
13739     which can conflict with char setproctitle(); below.  */
13740 #include <assert.h>
13741 /* Override any gcc2 internal prototype to avoid an error.  */
13742 /* We use char because int might match the return type of a gcc2
13743     builtin and then its argument prototype would still apply.  */
13744 char setproctitle();
13745 char (*f)();
13746
13747 int main() {
13748
13749 /* The GNU C library defines this for functions which it implements
13750     to always fail with ENOSYS.  Some functions are actually named
13751     something starting with __ and the normal name is an alias.  */
13752 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13753 choke me
13754 #else
13755 f = setproctitle;
13756 #endif
13757
13758 ; return 0; }
13759 EOF
13760 if { (eval echo configure:13761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13761   rm -rf conftest*
13762   eval "ac_cv_func_setproctitle=yes"
13763 else
13764   echo "configure: failed program was:" >&5
13765   cat conftest.$ac_ext >&5
13766   rm -rf conftest*
13767   eval "ac_cv_func_setproctitle=no"
13768 fi
13769 rm -f conftest*
13770 fi
13771
13772 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13773   echo "$ac_t""yes" 1>&6
13774   have_setproctitle=yes
13775 else
13776   echo "$ac_t""no" 1>&6
13777
13778                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13779 echo "configure:13780: checking for setproctitle in -lutil" >&5
13780 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13782   echo $ac_n "(cached) $ac_c" 1>&6
13783 else
13784   ac_save_LIBS="$LIBS"
13785 LIBS="-lutil  $LIBS"
13786 cat > conftest.$ac_ext <<EOF
13787 #line 13788 "configure"
13788 #include "confdefs.h"
13789 /* Override any gcc2 internal prototype to avoid an error.  */
13790 /* We use char because int might match the return type of a gcc2
13791     builtin and then its argument prototype would still apply.  */
13792 char setproctitle();
13793
13794 int main() {
13795 setproctitle()
13796 ; return 0; }
13797 EOF
13798 if { (eval echo configure:13799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13799   rm -rf conftest*
13800   eval "ac_cv_lib_$ac_lib_var=yes"
13801 else
13802   echo "configure: failed program was:" >&5
13803   cat conftest.$ac_ext >&5
13804   rm -rf conftest*
13805   eval "ac_cv_lib_$ac_lib_var=no"
13806 fi
13807 rm -f conftest*
13808 LIBS="$ac_save_LIBS"
13809
13810 fi
13811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13812   echo "$ac_t""yes" 1>&6
13813   have_setproctitle=yes
13814                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13815 else
13816   echo "$ac_t""no" 1>&6
13817 have_setproctitle=no
13818                         LIBOBJS="$LIBOBJS setproctitle.o"
13819                         LIBSRCS="$LIBSRCS setproctitle.c"
13820 fi
13821
13822 fi
13823
13824
13825         if test $have_setproctitle = yes ; then
13826                 cat >> confdefs.h <<\EOF
13827 #define HAVE_SETPROCTITLE 1
13828 EOF
13829
13830         fi
13831 fi
13832
13833 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13834 echo "configure:13835: checking for ANSI C header files" >&5
13835 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13836   echo $ac_n "(cached) $ac_c" 1>&6
13837 else
13838   cat > conftest.$ac_ext <<EOF
13839 #line 13840 "configure"
13840 #include "confdefs.h"
13841 #include <stdlib.h>
13842 #include <stdarg.h>
13843 #include <string.h>
13844 #include <float.h>
13845 EOF
13846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13847 { (eval echo configure:13848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13849 if test -z "$ac_err"; then
13850   rm -rf conftest*
13851   ac_cv_header_stdc=yes
13852 else
13853   echo "$ac_err" >&5
13854   echo "configure: failed program was:" >&5
13855   cat conftest.$ac_ext >&5
13856   rm -rf conftest*
13857   ac_cv_header_stdc=no
13858 fi
13859 rm -f conftest*
13860
13861 if test $ac_cv_header_stdc = yes; then
13862   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13863 cat > conftest.$ac_ext <<EOF
13864 #line 13865 "configure"
13865 #include "confdefs.h"
13866 #include <string.h>
13867 EOF
13868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13869   egrep "memchr" >/dev/null 2>&1; then
13870   :
13871 else
13872   rm -rf conftest*
13873   ac_cv_header_stdc=no
13874 fi
13875 rm -f conftest*
13876
13877 fi
13878
13879 if test $ac_cv_header_stdc = yes; then
13880   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13881 cat > conftest.$ac_ext <<EOF
13882 #line 13883 "configure"
13883 #include "confdefs.h"
13884 #include <stdlib.h>
13885 EOF
13886 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13887   egrep "free" >/dev/null 2>&1; then
13888   :
13889 else
13890   rm -rf conftest*
13891   ac_cv_header_stdc=no
13892 fi
13893 rm -f conftest*
13894
13895 fi
13896
13897 if test $ac_cv_header_stdc = yes; then
13898   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13899 if test "$cross_compiling" = yes; then
13900   :
13901 else
13902   cat > conftest.$ac_ext <<EOF
13903 #line 13904 "configure"
13904 #include "confdefs.h"
13905 #include <ctype.h>
13906 #if ((' ' & 0x0FF) == 0x020)
13907 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13908 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13909 #else
13910 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13911  || ('j' <= (c) && (c) <= 'r') \
13912  || ('s' <= (c) && (c) <= 'z'))
13913 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13914 #endif
13915 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13916 int main () { int i; for (i = 0; i < 256; i++)
13917 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13918 exit (0); }
13919
13920 EOF
13921 if { (eval echo configure:13922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13922 then
13923   :
13924 else
13925   echo "configure: failed program was:" >&5
13926   cat conftest.$ac_ext >&5
13927   rm -fr conftest*
13928   ac_cv_header_stdc=no
13929 fi
13930 rm -fr conftest*
13931 fi
13932
13933 fi
13934 fi
13935
13936 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13937 if test $ac_cv_header_stdc = yes; then
13938   cat >> confdefs.h <<\EOF
13939 #define STDC_HEADERS 1
13940 EOF
13941
13942 fi
13943
13944 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13945 echo "configure:13946: checking for mode_t" >&5
13946 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13947   echo $ac_n "(cached) $ac_c" 1>&6
13948 else
13949   cat > conftest.$ac_ext <<EOF
13950 #line 13951 "configure"
13951 #include "confdefs.h"
13952 #include <sys/types.h>
13953 #if STDC_HEADERS
13954 #include <stdlib.h>
13955 #include <stddef.h>
13956 #endif
13957
13958 EOF
13959 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13960   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13961   rm -rf conftest*
13962   eval "ac_cv_type_mode_t=yes"
13963 else
13964   rm -rf conftest*
13965   eval "ac_cv_type_mode_t=no"
13966 fi
13967 rm -f conftest*
13968
13969 fi
13970 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13971   echo "$ac_t""yes" 1>&6
13972 else
13973   echo "$ac_t""no" 1>&6
13974   cat >> confdefs.h <<EOF
13975 #define mode_t int
13976 EOF
13977
13978 fi
13979
13980 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13981 echo "configure:13982: checking for off_t" >&5
13982 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13983   echo $ac_n "(cached) $ac_c" 1>&6
13984 else
13985   cat > conftest.$ac_ext <<EOF
13986 #line 13987 "configure"
13987 #include "confdefs.h"
13988 #include <sys/types.h>
13989 #if STDC_HEADERS
13990 #include <stdlib.h>
13991 #include <stddef.h>
13992 #endif
13993
13994 EOF
13995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13996   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13997   rm -rf conftest*
13998   eval "ac_cv_type_off_t=yes"
13999 else
14000   rm -rf conftest*
14001   eval "ac_cv_type_off_t=no"
14002 fi
14003 rm -f conftest*
14004
14005 fi
14006 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14007   echo "$ac_t""yes" 1>&6
14008 else
14009   echo "$ac_t""no" 1>&6
14010   cat >> confdefs.h <<EOF
14011 #define off_t long
14012 EOF
14013
14014 fi
14015
14016 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14017 echo "configure:14018: checking for pid_t" >&5
14018 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14019   echo $ac_n "(cached) $ac_c" 1>&6
14020 else
14021   cat > conftest.$ac_ext <<EOF
14022 #line 14023 "configure"
14023 #include "confdefs.h"
14024 #include <sys/types.h>
14025 #if STDC_HEADERS
14026 #include <stdlib.h>
14027 #include <stddef.h>
14028 #endif
14029
14030 EOF
14031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14032   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14033   rm -rf conftest*
14034   eval "ac_cv_type_pid_t=yes"
14035 else
14036   rm -rf conftest*
14037   eval "ac_cv_type_pid_t=no"
14038 fi
14039 rm -f conftest*
14040
14041 fi
14042 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14043   echo "$ac_t""yes" 1>&6
14044 else
14045   echo "$ac_t""no" 1>&6
14046   cat >> confdefs.h <<EOF
14047 #define pid_t int
14048 EOF
14049
14050 fi
14051
14052 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14053 echo "configure:14054: checking for ptrdiff_t" >&5
14054 if eval "test \"\${am_cv_type_ptrdiff_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 <stddef.h>
14061 int main() {
14062 ptrdiff_t p
14063 ; return 0; }
14064 EOF
14065 if { (eval echo configure:14066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14066   rm -rf conftest*
14067   am_cv_type_ptrdiff_t=yes
14068 else
14069   echo "configure: failed program was:" >&5
14070   cat conftest.$ac_ext >&5
14071   rm -rf conftest*
14072   am_cv_type_ptrdiff_t=no
14073 fi
14074 rm -f conftest*
14075 fi
14076
14077 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14078    if test $am_cv_type_ptrdiff_t = yes; then
14079      cat >> confdefs.h <<\EOF
14080 #define HAVE_PTRDIFF_T 1
14081 EOF
14082
14083    fi
14084
14085 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14086 echo "configure:14087: checking return type of signal handlers" >&5
14087 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14088   echo $ac_n "(cached) $ac_c" 1>&6
14089 else
14090   cat > conftest.$ac_ext <<EOF
14091 #line 14092 "configure"
14092 #include "confdefs.h"
14093 #include <sys/types.h>
14094 #include <signal.h>
14095 #ifdef signal
14096 #undef signal
14097 #endif
14098 #ifdef __cplusplus
14099 extern "C" void (*signal (int, void (*)(int)))(int);
14100 #else
14101 void (*signal ()) ();
14102 #endif
14103
14104 int main() {
14105 int i;
14106 ; return 0; }
14107 EOF
14108 if { (eval echo configure:14109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14109   rm -rf conftest*
14110   ac_cv_type_signal=void
14111 else
14112   echo "configure: failed program was:" >&5
14113   cat conftest.$ac_ext >&5
14114   rm -rf conftest*
14115   ac_cv_type_signal=int
14116 fi
14117 rm -f conftest*
14118 fi
14119
14120 echo "$ac_t""$ac_cv_type_signal" 1>&6
14121 cat >> confdefs.h <<EOF
14122 #define RETSIGTYPE $ac_cv_type_signal
14123 EOF
14124
14125
14126 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14127 echo "configure:14128: checking for size_t" >&5
14128 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14129   echo $ac_n "(cached) $ac_c" 1>&6
14130 else
14131   cat > conftest.$ac_ext <<EOF
14132 #line 14133 "configure"
14133 #include "confdefs.h"
14134 #include <sys/types.h>
14135 #if STDC_HEADERS
14136 #include <stdlib.h>
14137 #include <stddef.h>
14138 #endif
14139
14140 EOF
14141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14142   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14143   rm -rf conftest*
14144   eval "ac_cv_type_size_t=yes"
14145 else
14146   rm -rf conftest*
14147   eval "ac_cv_type_size_t=no"
14148 fi
14149 rm -f conftest*
14150
14151 fi
14152 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14153   echo "$ac_t""yes" 1>&6
14154 else
14155   echo "$ac_t""no" 1>&6
14156   cat >> confdefs.h <<EOF
14157 #define size_t unsigned
14158 EOF
14159
14160 fi
14161
14162
14163 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14164 echo "configure:14165: checking for ssize_t" >&5
14165 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14166   echo $ac_n "(cached) $ac_c" 1>&6
14167 else
14168   cat > conftest.$ac_ext <<EOF
14169 #line 14170 "configure"
14170 #include "confdefs.h"
14171 #include <sys/types.h>
14172 #if STDC_HEADERS
14173 #include <stdlib.h>
14174 #include <stddef.h>
14175 #endif
14176
14177 EOF
14178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14179   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14180   rm -rf conftest*
14181   eval "ac_cv_type_ssize_t=yes"
14182 else
14183   rm -rf conftest*
14184   eval "ac_cv_type_ssize_t=no"
14185 fi
14186 rm -f conftest*
14187
14188 fi
14189 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14190   echo "$ac_t""yes" 1>&6
14191 else
14192   echo "$ac_t""no" 1>&6
14193   cat >> confdefs.h <<EOF
14194 #define ssize_t signed int
14195 EOF
14196
14197 fi
14198
14199 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14200 echo "configure:14201: checking for caddr_t" >&5
14201 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14202   echo $ac_n "(cached) $ac_c" 1>&6
14203 else
14204   cat > conftest.$ac_ext <<EOF
14205 #line 14206 "configure"
14206 #include "confdefs.h"
14207 #include <sys/types.h>
14208 #if STDC_HEADERS
14209 #include <stdlib.h>
14210 #include <stddef.h>
14211 #endif
14212
14213 EOF
14214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14215   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14216   rm -rf conftest*
14217   eval "ac_cv_type_caddr_t=yes"
14218 else
14219   rm -rf conftest*
14220   eval "ac_cv_type_caddr_t=no"
14221 fi
14222 rm -f conftest*
14223
14224 fi
14225 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14226   echo "$ac_t""yes" 1>&6
14227 else
14228   echo "$ac_t""no" 1>&6
14229   cat >> confdefs.h <<EOF
14230 #define caddr_t char *
14231 EOF
14232
14233 fi
14234
14235
14236 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14237 echo "configure:14238: checking for socklen_t" >&5
14238 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14239   echo $ac_n "(cached) $ac_c" 1>&6
14240 else
14241   cat > conftest.$ac_ext <<EOF
14242 #line 14243 "configure"
14243 #include "confdefs.h"
14244
14245 #ifdef HAVE_SYS_TYPES_H
14246 #include <sys/types.h>
14247 #endif
14248 #ifdef HAVE_SYS_SOCKET_H
14249 #include <sys/socket.h>
14250 #endif
14251
14252 int main() {
14253 socklen_t len;
14254 ; return 0; }
14255 EOF
14256 if { (eval echo configure:14257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14257   rm -rf conftest*
14258   ol_cv_type_socklen_t=yes
14259 else
14260   echo "configure: failed program was:" >&5
14261   cat conftest.$ac_ext >&5
14262   rm -rf conftest*
14263   ol_cv_type_socklen_t=no
14264 fi
14265 rm -f conftest*
14266 fi
14267
14268 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14269   if test $ol_cv_type_socklen_t = no; then
14270     cat >> confdefs.h <<\EOF
14271 #define socklen_t int
14272 EOF
14273
14274   fi
14275  
14276 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14277 echo "configure:14278: checking for member st_blksize in aggregate type struct stat" >&5
14278 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14279   echo $ac_n "(cached) $ac_c" 1>&6
14280 else
14281   cat > conftest.$ac_ext <<EOF
14282 #line 14283 "configure"
14283 #include "confdefs.h"
14284 #include <sys/types.h>
14285 #include <sys/stat.h>
14286 int main() {
14287 struct stat foo; foo.st_blksize;
14288 ; return 0; }
14289 EOF
14290 if { (eval echo configure:14291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14291   rm -rf conftest*
14292   ac_cv_c_struct_member_st_blksize=yes
14293 else
14294   echo "configure: failed program was:" >&5
14295   cat conftest.$ac_ext >&5
14296   rm -rf conftest*
14297   ac_cv_c_struct_member_st_blksize=no
14298 fi
14299 rm -f conftest*
14300 fi
14301
14302 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14303 st_blksize="$ac_cv_c_struct_member_st_blksize"
14304 if test $ac_cv_c_struct_member_st_blksize = yes; then
14305   cat >> confdefs.h <<\EOF
14306 #define HAVE_ST_BLKSIZE 1
14307 EOF
14308
14309 fi
14310
14311 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14312 echo "configure:14313: checking whether time.h and sys/time.h may both be included" >&5
14313 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14314   echo $ac_n "(cached) $ac_c" 1>&6
14315 else
14316   cat > conftest.$ac_ext <<EOF
14317 #line 14318 "configure"
14318 #include "confdefs.h"
14319 #include <sys/types.h>
14320 #include <sys/time.h>
14321 #include <time.h>
14322 int main() {
14323 struct tm *tp;
14324 ; return 0; }
14325 EOF
14326 if { (eval echo configure:14327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14327   rm -rf conftest*
14328   ac_cv_header_time=yes
14329 else
14330   echo "configure: failed program was:" >&5
14331   cat conftest.$ac_ext >&5
14332   rm -rf conftest*
14333   ac_cv_header_time=no
14334 fi
14335 rm -f conftest*
14336 fi
14337
14338 echo "$ac_t""$ac_cv_header_time" 1>&6
14339 if test $ac_cv_header_time = yes; then
14340   cat >> confdefs.h <<\EOF
14341 #define TIME_WITH_SYS_TIME 1
14342 EOF
14343
14344 fi
14345
14346 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14347 echo "configure:14348: checking whether struct tm is in sys/time.h or time.h" >&5
14348 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14349   echo $ac_n "(cached) $ac_c" 1>&6
14350 else
14351   cat > conftest.$ac_ext <<EOF
14352 #line 14353 "configure"
14353 #include "confdefs.h"
14354 #include <sys/types.h>
14355 #include <time.h>
14356 int main() {
14357 struct tm *tp; tp->tm_sec;
14358 ; return 0; }
14359 EOF
14360 if { (eval echo configure:14361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14361   rm -rf conftest*
14362   ac_cv_struct_tm=time.h
14363 else
14364   echo "configure: failed program was:" >&5
14365   cat conftest.$ac_ext >&5
14366   rm -rf conftest*
14367   ac_cv_struct_tm=sys/time.h
14368 fi
14369 rm -f conftest*
14370 fi
14371
14372 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14373 if test $ac_cv_struct_tm = sys/time.h; then
14374   cat >> confdefs.h <<\EOF
14375 #define TM_IN_SYS_TIME 1
14376 EOF
14377
14378 fi
14379
14380 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14381 echo "configure:14382: checking for uid_t in sys/types.h" >&5
14382 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14383   echo $ac_n "(cached) $ac_c" 1>&6
14384 else
14385   cat > conftest.$ac_ext <<EOF
14386 #line 14387 "configure"
14387 #include "confdefs.h"
14388 #include <sys/types.h>
14389 EOF
14390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14391   egrep "uid_t" >/dev/null 2>&1; then
14392   rm -rf conftest*
14393   ac_cv_type_uid_t=yes
14394 else
14395   rm -rf conftest*
14396   ac_cv_type_uid_t=no
14397 fi
14398 rm -f conftest*
14399
14400 fi
14401
14402 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14403 if test $ac_cv_type_uid_t = no; then
14404   cat >> confdefs.h <<\EOF
14405 #define uid_t int
14406 EOF
14407
14408   cat >> confdefs.h <<\EOF
14409 #define gid_t int
14410 EOF
14411
14412 fi
14413
14414 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14415 echo "configure:14416: checking for sig_atomic_t" >&5
14416 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14417   echo $ac_n "(cached) $ac_c" 1>&6
14418 else
14419   cat > conftest.$ac_ext <<EOF
14420 #line 14421 "configure"
14421 #include "confdefs.h"
14422 #include <signal.h>
14423 int main() {
14424 sig_atomic_t atomic;
14425 ; return 0; }
14426 EOF
14427 if { (eval echo configure:14428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14428   rm -rf conftest*
14429   ol_cv_type_sig_atomic_t=yes
14430 else
14431   echo "configure: failed program was:" >&5
14432   cat conftest.$ac_ext >&5
14433   rm -rf conftest*
14434   ol_cv_type_sig_atomic_t=no
14435 fi
14436 rm -f conftest*
14437 fi
14438
14439 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14440   if test $ol_cv_type_sig_atomic_t = no; then
14441     cat >> confdefs.h <<\EOF
14442 #define sig_atomic_t int
14443 EOF
14444
14445   fi
14446  
14447
14448
14449 # test for pw_gecos in struct passwd
14450 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14451 echo "configure:14452: checking struct passwd for pw_gecos" >&5
14452 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14453   echo $ac_n "(cached) $ac_c" 1>&6
14454 else
14455   
14456         cat > conftest.$ac_ext <<EOF
14457 #line 14458 "configure"
14458 #include "confdefs.h"
14459 #include <pwd.h>
14460 int main() {
14461
14462         struct passwd pwd;
14463         pwd.pw_gecos = pwd.pw_name;
14464
14465 ; return 0; }
14466 EOF
14467 if { (eval echo configure:14468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14468   rm -rf conftest*
14469   ol_cv_struct_passwd_pw_gecos=yes
14470 else
14471   echo "configure: failed program was:" >&5
14472   cat conftest.$ac_ext >&5
14473   rm -rf conftest*
14474   ol_cv_struct_passwd_pw_gecos=no
14475 fi
14476 rm -f conftest*
14477 fi
14478
14479 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14480 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14481         cat >> confdefs.h <<\EOF
14482 #define HAVE_PW_GECOS 1
14483 EOF
14484
14485 fi
14486
14487 # test for pw_passwd in struct passwd
14488 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14489 echo "configure:14490: checking struct passwd for pw_passwd" >&5
14490 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14491   echo $ac_n "(cached) $ac_c" 1>&6
14492 else
14493   
14494         cat > conftest.$ac_ext <<EOF
14495 #line 14496 "configure"
14496 #include "confdefs.h"
14497 #include <pwd.h>
14498 int main() {
14499
14500         struct passwd pwd;
14501         pwd.pw_passwd = pwd.pw_name;
14502
14503 ; return 0; }
14504 EOF
14505 if { (eval echo configure:14506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14506   rm -rf conftest*
14507   ol_cv_struct_passwd_pw_passwd=yes
14508 else
14509   echo "configure: failed program was:" >&5
14510   cat conftest.$ac_ext >&5
14511   rm -rf conftest*
14512   ol_cv_struct_passwd_pw_passwd=no
14513 fi
14514 rm -f conftest*
14515 fi
14516
14517 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14518 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14519         cat >> confdefs.h <<\EOF
14520 #define HAVE_PW_PASSWD 1
14521 EOF
14522
14523 fi
14524
14525
14526 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14527 echo "configure:14528: checking if toupper() requires islower()" >&5
14528 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14529   echo $ac_n "(cached) $ac_c" 1>&6
14530 else
14531   
14532         if test "$cross_compiling" = yes; then
14533   ol_cv_c_upper_lower=safe
14534 else
14535   cat > conftest.$ac_ext <<EOF
14536 #line 14537 "configure"
14537 #include "confdefs.h"
14538
14539 #include <ctype.h>
14540 main()
14541 {
14542         if ('C' == toupper('C'))
14543                 exit(0);
14544         else
14545                 exit(1);
14546 }
14547 EOF
14548 if { (eval echo configure:14549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14549 then
14550   ol_cv_c_upper_lower=no
14551 else
14552   echo "configure: failed program was:" >&5
14553   cat conftest.$ac_ext >&5
14554   rm -fr conftest*
14555   ol_cv_c_upper_lower=yes
14556 fi
14557 rm -fr conftest*
14558 fi
14559
14560 fi
14561
14562 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14563 if test $ol_cv_c_upper_lower != no ; then
14564         cat >> confdefs.h <<\EOF
14565 #define C_UPPER_LOWER 1
14566 EOF
14567
14568 fi
14569
14570 echo $ac_n "checking for working const""... $ac_c" 1>&6
14571 echo "configure:14572: checking for working const" >&5
14572 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14573   echo $ac_n "(cached) $ac_c" 1>&6
14574 else
14575   cat > conftest.$ac_ext <<EOF
14576 #line 14577 "configure"
14577 #include "confdefs.h"
14578
14579 int main() {
14580
14581 /* Ultrix mips cc rejects this.  */
14582 typedef int charset[2]; const charset x;
14583 /* SunOS 4.1.1 cc rejects this.  */
14584 char const *const *ccp;
14585 char **p;
14586 /* NEC SVR4.0.2 mips cc rejects this.  */
14587 struct point {int x, y;};
14588 static struct point const zero = {0,0};
14589 /* AIX XL C 1.02.0.0 rejects this.
14590    It does not let you subtract one const X* pointer from another in an arm
14591    of an if-expression whose if-part is not a constant expression */
14592 const char *g = "string";
14593 ccp = &g + (g ? g-g : 0);
14594 /* HPUX 7.0 cc rejects these. */
14595 ++ccp;
14596 p = (char**) ccp;
14597 ccp = (char const *const *) p;
14598 { /* SCO 3.2v4 cc rejects this.  */
14599   char *t;
14600   char const *s = 0 ? (char *) 0 : (char const *) 0;
14601
14602   *t++ = 0;
14603 }
14604 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14605   int x[] = {25, 17};
14606   const int *foo = &x[0];
14607   ++foo;
14608 }
14609 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14610   typedef const int *iptr;
14611   iptr p = 0;
14612   ++p;
14613 }
14614 { /* AIX XL C 1.02.0.0 rejects this saying
14615      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14616   struct s { int j; const int *ap[3]; };
14617   struct s *b; b->j = 5;
14618 }
14619 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14620   const int foo = 10;
14621 }
14622
14623 ; return 0; }
14624 EOF
14625 if { (eval echo configure:14626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14626   rm -rf conftest*
14627   ac_cv_c_const=yes
14628 else
14629   echo "configure: failed program was:" >&5
14630   cat conftest.$ac_ext >&5
14631   rm -rf conftest*
14632   ac_cv_c_const=no
14633 fi
14634 rm -f conftest*
14635 fi
14636
14637 echo "$ac_t""$ac_cv_c_const" 1>&6
14638 if test $ac_cv_c_const = no; then
14639   cat >> confdefs.h <<\EOF
14640 #define const 
14641 EOF
14642
14643 fi
14644
14645 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14646 echo "configure:14647: checking if compiler understands volatile" >&5
14647 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14648   echo $ac_n "(cached) $ac_c" 1>&6
14649 else
14650   cat > conftest.$ac_ext <<EOF
14651 #line 14652 "configure"
14652 #include "confdefs.h"
14653 int x, y, z;
14654 int main() {
14655 volatile int a; int * volatile b = x ? &y : &z;
14656       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14657       *b = 0;
14658 ; return 0; }
14659 EOF
14660 if { (eval echo configure:14661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14661   rm -rf conftest*
14662   ol_cv_c_volatile=yes
14663 else
14664   echo "configure: failed program was:" >&5
14665   cat conftest.$ac_ext >&5
14666   rm -rf conftest*
14667   ol_cv_c_volatile=no
14668 fi
14669 rm -f conftest*
14670 fi
14671
14672 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14673   if test $ol_cv_c_volatile = yes; then
14674     : 
14675   else
14676     cat >> confdefs.h <<\EOF
14677 #define volatile 
14678 EOF
14679
14680   fi
14681  
14682
14683 if test $cross_compiling = yes ; then
14684         cat >> confdefs.h <<\EOF
14685 #define CROSS_COMPILING 1
14686 EOF
14687
14688 else
14689         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14690 echo "configure:14691: checking whether byte ordering is bigendian" >&5
14691 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14692   echo $ac_n "(cached) $ac_c" 1>&6
14693 else
14694   ac_cv_c_bigendian=unknown
14695 # See if sys/param.h defines the BYTE_ORDER macro.
14696 cat > conftest.$ac_ext <<EOF
14697 #line 14698 "configure"
14698 #include "confdefs.h"
14699 #include <sys/types.h>
14700 #include <sys/param.h>
14701 int main() {
14702
14703 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14704  bogus endian macros
14705 #endif
14706 ; return 0; }
14707 EOF
14708 if { (eval echo configure:14709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14709   rm -rf conftest*
14710   # It does; now see whether it defined to BIG_ENDIAN or not.
14711 cat > conftest.$ac_ext <<EOF
14712 #line 14713 "configure"
14713 #include "confdefs.h"
14714 #include <sys/types.h>
14715 #include <sys/param.h>
14716 int main() {
14717
14718 #if BYTE_ORDER != BIG_ENDIAN
14719  not big endian
14720 #endif
14721 ; return 0; }
14722 EOF
14723 if { (eval echo configure:14724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14724   rm -rf conftest*
14725   ac_cv_c_bigendian=yes
14726 else
14727   echo "configure: failed program was:" >&5
14728   cat conftest.$ac_ext >&5
14729   rm -rf conftest*
14730   ac_cv_c_bigendian=no
14731 fi
14732 rm -f conftest*
14733 else
14734   echo "configure: failed program was:" >&5
14735   cat conftest.$ac_ext >&5
14736 fi
14737 rm -f conftest*
14738 if test $ac_cv_c_bigendian = unknown; then
14739 if test "$cross_compiling" = yes; then
14740     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14741 else
14742   cat > conftest.$ac_ext <<EOF
14743 #line 14744 "configure"
14744 #include "confdefs.h"
14745 main () {
14746   /* Are we little or big endian?  From Harbison&Steele.  */
14747   union
14748   {
14749     long l;
14750     char c[sizeof (long)];
14751   } u;
14752   u.l = 1;
14753   exit (u.c[sizeof (long) - 1] == 1);
14754 }
14755 EOF
14756 if { (eval echo configure:14757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14757 then
14758   ac_cv_c_bigendian=no
14759 else
14760   echo "configure: failed program was:" >&5
14761   cat conftest.$ac_ext >&5
14762   rm -fr conftest*
14763   ac_cv_c_bigendian=yes
14764 fi
14765 rm -fr conftest*
14766 fi
14767
14768 fi
14769 fi
14770
14771 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14772 if test $ac_cv_c_bigendian = yes; then
14773   cat >> confdefs.h <<\EOF
14774 #define WORDS_BIGENDIAN 1
14775 EOF
14776
14777 fi
14778
14779 fi
14780
14781 echo $ac_n "checking size of short""... $ac_c" 1>&6
14782 echo "configure:14783: checking size of short" >&5 
14783 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14784   echo $ac_n "(cached) $ac_c" 1>&6
14785 else
14786   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14787   cat > conftest.$ac_ext <<EOF
14788 #line 14789 "configure"
14789 #include "confdefs.h"
14790 #include "confdefs.h" 
14791 #include <sys/types.h> 
14792  
14793
14794 int main() {
14795 switch (0) case 0: case (sizeof (short) == $ac_size):;
14796 ; return 0; }
14797 EOF
14798 if { (eval echo configure:14799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14799   rm -rf conftest*
14800   ac_cv_sizeof_short=$ac_size
14801 else
14802   echo "configure: failed program was:" >&5
14803   cat conftest.$ac_ext >&5
14804 fi
14805 rm -f conftest* 
14806   if test x$ac_cv_sizeof_short != x ; then break; fi 
14807 done 
14808
14809 fi
14810  
14811 if test x$ac_cv_sizeof_short = x ; then 
14812   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14813 fi 
14814 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14815 cat >> confdefs.h <<EOF
14816 #define SIZEOF_SHORT $ac_cv_sizeof_short
14817 EOF
14818  
14819  
14820 echo $ac_n "checking size of int""... $ac_c" 1>&6
14821 echo "configure:14822: checking size of int" >&5 
14822 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14823   echo $ac_n "(cached) $ac_c" 1>&6
14824 else
14825   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14826   cat > conftest.$ac_ext <<EOF
14827 #line 14828 "configure"
14828 #include "confdefs.h"
14829 #include "confdefs.h" 
14830 #include <sys/types.h> 
14831  
14832
14833 int main() {
14834 switch (0) case 0: case (sizeof (int) == $ac_size):;
14835 ; return 0; }
14836 EOF
14837 if { (eval echo configure:14838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14838   rm -rf conftest*
14839   ac_cv_sizeof_int=$ac_size
14840 else
14841   echo "configure: failed program was:" >&5
14842   cat conftest.$ac_ext >&5
14843 fi
14844 rm -f conftest* 
14845   if test x$ac_cv_sizeof_int != x ; then break; fi 
14846 done 
14847
14848 fi
14849  
14850 if test x$ac_cv_sizeof_int = x ; then 
14851   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14852 fi 
14853 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14854 cat >> confdefs.h <<EOF
14855 #define SIZEOF_INT $ac_cv_sizeof_int
14856 EOF
14857  
14858  
14859 echo $ac_n "checking size of long""... $ac_c" 1>&6
14860 echo "configure:14861: checking size of long" >&5 
14861 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14862   echo $ac_n "(cached) $ac_c" 1>&6
14863 else
14864   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14865   cat > conftest.$ac_ext <<EOF
14866 #line 14867 "configure"
14867 #include "confdefs.h"
14868 #include "confdefs.h" 
14869 #include <sys/types.h> 
14870  
14871
14872 int main() {
14873 switch (0) case 0: case (sizeof (long) == $ac_size):;
14874 ; return 0; }
14875 EOF
14876 if { (eval echo configure:14877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14877   rm -rf conftest*
14878   ac_cv_sizeof_long=$ac_size
14879 else
14880   echo "configure: failed program was:" >&5
14881   cat conftest.$ac_ext >&5
14882 fi
14883 rm -f conftest* 
14884   if test x$ac_cv_sizeof_long != x ; then break; fi 
14885 done 
14886
14887 fi
14888  
14889 if test x$ac_cv_sizeof_long = x ; then 
14890   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14891 fi 
14892 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14893 cat >> confdefs.h <<EOF
14894 #define SIZEOF_LONG $ac_cv_sizeof_long
14895 EOF
14896  
14897
14898
14899 if test "$ac_cv_sizeof_int" -lt 4 ; then
14900         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14901
14902         cat >> confdefs.h <<\EOF
14903 #define LBER_INT_T long
14904 EOF
14905
14906 else
14907         cat >> confdefs.h <<\EOF
14908 #define LBER_INT_T int
14909 EOF
14910
14911 fi
14912
14913 cat >> confdefs.h <<\EOF
14914 #define LBER_LEN_T long
14915 EOF
14916
14917 cat >> confdefs.h <<\EOF
14918 #define LBER_SOCKET_T int
14919 EOF
14920
14921 cat >> confdefs.h <<\EOF
14922 #define LBER_TAG_T long
14923 EOF
14924
14925
14926 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14927 echo "configure:14928: checking for 8-bit clean memcmp" >&5
14928 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14929   echo $ac_n "(cached) $ac_c" 1>&6
14930 else
14931   if test "$cross_compiling" = yes; then
14932   ac_cv_func_memcmp_clean=no
14933 else
14934   cat > conftest.$ac_ext <<EOF
14935 #line 14936 "configure"
14936 #include "confdefs.h"
14937
14938 main()
14939 {
14940   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14941   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14942 }
14943
14944 EOF
14945 if { (eval echo configure:14946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14946 then
14947   ac_cv_func_memcmp_clean=yes
14948 else
14949   echo "configure: failed program was:" >&5
14950   cat conftest.$ac_ext >&5
14951   rm -fr conftest*
14952   ac_cv_func_memcmp_clean=no
14953 fi
14954 rm -fr conftest*
14955 fi
14956
14957 fi
14958
14959 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14960 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14961
14962 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14963 echo "configure:14964: checking for strftime" >&5
14964 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14965   echo $ac_n "(cached) $ac_c" 1>&6
14966 else
14967   cat > conftest.$ac_ext <<EOF
14968 #line 14969 "configure"
14969 #include "confdefs.h"
14970 /* System header to define __stub macros and hopefully few prototypes,
14971     which can conflict with char strftime(); below.  */
14972 #include <assert.h>
14973 /* Override any gcc2 internal prototype to avoid an error.  */
14974 /* We use char because int might match the return type of a gcc2
14975     builtin and then its argument prototype would still apply.  */
14976 char strftime();
14977 char (*f)();
14978
14979 int main() {
14980
14981 /* The GNU C library defines this for functions which it implements
14982     to always fail with ENOSYS.  Some functions are actually named
14983     something starting with __ and the normal name is an alias.  */
14984 #if defined (__stub_strftime) || defined (__stub___strftime)
14985 choke me
14986 #else
14987 f = strftime;
14988 #endif
14989
14990 ; return 0; }
14991 EOF
14992 if { (eval echo configure:14993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14993   rm -rf conftest*
14994   eval "ac_cv_func_strftime=yes"
14995 else
14996   echo "configure: failed program was:" >&5
14997   cat conftest.$ac_ext >&5
14998   rm -rf conftest*
14999   eval "ac_cv_func_strftime=no"
15000 fi
15001 rm -f conftest*
15002 fi
15003
15004 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15005   echo "$ac_t""yes" 1>&6
15006   cat >> confdefs.h <<\EOF
15007 #define HAVE_STRFTIME 1
15008 EOF
15009
15010 else
15011   echo "$ac_t""no" 1>&6
15012 # strftime is in -lintl on SCO UNIX.
15013 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15014 echo "configure:15015: checking for strftime in -lintl" >&5
15015 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15016 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15017   echo $ac_n "(cached) $ac_c" 1>&6
15018 else
15019   ac_save_LIBS="$LIBS"
15020 LIBS="-lintl  $LIBS"
15021 cat > conftest.$ac_ext <<EOF
15022 #line 15023 "configure"
15023 #include "confdefs.h"
15024 /* Override any gcc2 internal prototype to avoid an error.  */
15025 /* We use char because int might match the return type of a gcc2
15026     builtin and then its argument prototype would still apply.  */
15027 char strftime();
15028
15029 int main() {
15030 strftime()
15031 ; return 0; }
15032 EOF
15033 if { (eval echo configure:15034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15034   rm -rf conftest*
15035   eval "ac_cv_lib_$ac_lib_var=yes"
15036 else
15037   echo "configure: failed program was:" >&5
15038   cat conftest.$ac_ext >&5
15039   rm -rf conftest*
15040   eval "ac_cv_lib_$ac_lib_var=no"
15041 fi
15042 rm -f conftest*
15043 LIBS="$ac_save_LIBS"
15044
15045 fi
15046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15047   echo "$ac_t""yes" 1>&6
15048   cat >> confdefs.h <<\EOF
15049 #define HAVE_STRFTIME 1
15050 EOF
15051
15052 LIBS="-lintl $LIBS"
15053 else
15054   echo "$ac_t""no" 1>&6
15055 fi
15056
15057 fi
15058
15059
15060 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15061 echo "configure:15062: checking for inet_aton()" >&5
15062 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15063   echo $ac_n "(cached) $ac_c" 1>&6
15064 else
15065   cat > conftest.$ac_ext <<EOF
15066 #line 15067 "configure"
15067 #include "confdefs.h"
15068
15069 #ifdef HAVE_SYS_TYPES_H
15070 #       include <sys/types.h>
15071 #endif
15072 #ifdef HAVE_SYS_SOCKET_H
15073 #       include <sys/socket.h>
15074 #       ifdef HAVE_SYS_SELECT_H
15075 #               include <sys/select.h>
15076 #       endif
15077 #       include <netinet/in.h>
15078 #       ifdef HAVE_ARPA_INET_H
15079 #               include <arpa/inet.h>
15080 #       endif
15081 #endif
15082
15083 int main() {
15084 struct in_addr in;
15085 int rc = inet_aton( "255.255.255.255", &in );
15086 ; return 0; }
15087 EOF
15088 if { (eval echo configure:15089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15089   rm -rf conftest*
15090   ol_cv_func_inet_aton=yes
15091 else
15092   echo "configure: failed program was:" >&5
15093   cat conftest.$ac_ext >&5
15094   rm -rf conftest*
15095   ol_cv_func_inet_aton=no
15096 fi
15097 rm -f conftest*
15098 fi
15099
15100 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15101   if test $ol_cv_func_inet_aton != no; then
15102     cat >> confdefs.h <<\EOF
15103 #define HAVE_INET_ATON 1
15104 EOF
15105
15106   fi
15107  
15108
15109 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15110 echo "configure:15111: checking for _spawnlp" >&5
15111 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15112   echo $ac_n "(cached) $ac_c" 1>&6
15113 else
15114   cat > conftest.$ac_ext <<EOF
15115 #line 15116 "configure"
15116 #include "confdefs.h"
15117 /* System header to define __stub macros and hopefully few prototypes,
15118     which can conflict with char _spawnlp(); below.  */
15119 #include <assert.h>
15120 /* Override any gcc2 internal prototype to avoid an error.  */
15121 /* We use char because int might match the return type of a gcc2
15122     builtin and then its argument prototype would still apply.  */
15123 char _spawnlp();
15124 char (*f)();
15125
15126 int main() {
15127
15128 /* The GNU C library defines this for functions which it implements
15129     to always fail with ENOSYS.  Some functions are actually named
15130     something starting with __ and the normal name is an alias.  */
15131 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15132 choke me
15133 #else
15134 f = _spawnlp;
15135 #endif
15136
15137 ; return 0; }
15138 EOF
15139 if { (eval echo configure:15140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15140   rm -rf conftest*
15141   eval "ac_cv_func__spawnlp=yes"
15142 else
15143   echo "configure: failed program was:" >&5
15144   cat conftest.$ac_ext >&5
15145   rm -rf conftest*
15146   eval "ac_cv_func__spawnlp=no"
15147 fi
15148 rm -f conftest*
15149 fi
15150
15151 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15152   echo "$ac_t""yes" 1>&6
15153   cat >> confdefs.h <<\EOF
15154 #define HAVE_SPAWNLP 1
15155 EOF
15156
15157 else
15158   echo "$ac_t""no" 1>&6
15159 fi
15160
15161
15162 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15163 echo "configure:15164: checking for _snprintf" >&5
15164 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15165   echo $ac_n "(cached) $ac_c" 1>&6
15166 else
15167   cat > conftest.$ac_ext <<EOF
15168 #line 15169 "configure"
15169 #include "confdefs.h"
15170 /* System header to define __stub macros and hopefully few prototypes,
15171     which can conflict with char _snprintf(); below.  */
15172 #include <assert.h>
15173 /* Override any gcc2 internal prototype to avoid an error.  */
15174 /* We use char because int might match the return type of a gcc2
15175     builtin and then its argument prototype would still apply.  */
15176 char _snprintf();
15177 char (*f)();
15178
15179 int main() {
15180
15181 /* The GNU C library defines this for functions which it implements
15182     to always fail with ENOSYS.  Some functions are actually named
15183     something starting with __ and the normal name is an alias.  */
15184 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15185 choke me
15186 #else
15187 f = _snprintf;
15188 #endif
15189
15190 ; return 0; }
15191 EOF
15192 if { (eval echo configure:15193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15193   rm -rf conftest*
15194   eval "ac_cv_func__snprintf=yes"
15195 else
15196   echo "configure: failed program was:" >&5
15197   cat conftest.$ac_ext >&5
15198   rm -rf conftest*
15199   eval "ac_cv_func__snprintf=no"
15200 fi
15201 rm -f conftest*
15202 fi
15203
15204 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15205   echo "$ac_t""yes" 1>&6
15206   ac_cv_func_snprintf=yes
15207         cat >> confdefs.h <<\EOF
15208 #define snprintf _snprintf
15209 EOF
15210
15211
15212 else
15213   echo "$ac_t""no" 1>&6
15214 fi
15215
15216
15217 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15218 echo "configure:15219: checking for _vsnprintf" >&5
15219 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15220   echo $ac_n "(cached) $ac_c" 1>&6
15221 else
15222   cat > conftest.$ac_ext <<EOF
15223 #line 15224 "configure"
15224 #include "confdefs.h"
15225 /* System header to define __stub macros and hopefully few prototypes,
15226     which can conflict with char _vsnprintf(); below.  */
15227 #include <assert.h>
15228 /* Override any gcc2 internal prototype to avoid an error.  */
15229 /* We use char because int might match the return type of a gcc2
15230     builtin and then its argument prototype would still apply.  */
15231 char _vsnprintf();
15232 char (*f)();
15233
15234 int main() {
15235
15236 /* The GNU C library defines this for functions which it implements
15237     to always fail with ENOSYS.  Some functions are actually named
15238     something starting with __ and the normal name is an alias.  */
15239 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15240 choke me
15241 #else
15242 f = _vsnprintf;
15243 #endif
15244
15245 ; return 0; }
15246 EOF
15247 if { (eval echo configure:15248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15248   rm -rf conftest*
15249   eval "ac_cv_func__vsnprintf=yes"
15250 else
15251   echo "configure: failed program was:" >&5
15252   cat conftest.$ac_ext >&5
15253   rm -rf conftest*
15254   eval "ac_cv_func__vsnprintf=no"
15255 fi
15256 rm -f conftest*
15257 fi
15258
15259 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15260   echo "$ac_t""yes" 1>&6
15261   ac_cv_func_vsnprintf=yes
15262         cat >> confdefs.h <<\EOF
15263 #define vsnprintf _vsnprintf
15264 EOF
15265
15266
15267 else
15268   echo "$ac_t""no" 1>&6
15269 fi
15270
15271
15272 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15273 echo "configure:15274: checking for vprintf" >&5
15274 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15275   echo $ac_n "(cached) $ac_c" 1>&6
15276 else
15277   cat > conftest.$ac_ext <<EOF
15278 #line 15279 "configure"
15279 #include "confdefs.h"
15280 /* System header to define __stub macros and hopefully few prototypes,
15281     which can conflict with char vprintf(); below.  */
15282 #include <assert.h>
15283 /* Override any gcc2 internal prototype to avoid an error.  */
15284 /* We use char because int might match the return type of a gcc2
15285     builtin and then its argument prototype would still apply.  */
15286 char vprintf();
15287 char (*f)();
15288
15289 int main() {
15290
15291 /* The GNU C library defines this for functions which it implements
15292     to always fail with ENOSYS.  Some functions are actually named
15293     something starting with __ and the normal name is an alias.  */
15294 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15295 choke me
15296 #else
15297 f = vprintf;
15298 #endif
15299
15300 ; return 0; }
15301 EOF
15302 if { (eval echo configure:15303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15303   rm -rf conftest*
15304   eval "ac_cv_func_vprintf=yes"
15305 else
15306   echo "configure: failed program was:" >&5
15307   cat conftest.$ac_ext >&5
15308   rm -rf conftest*
15309   eval "ac_cv_func_vprintf=no"
15310 fi
15311 rm -f conftest*
15312 fi
15313
15314 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15315   echo "$ac_t""yes" 1>&6
15316   cat >> confdefs.h <<\EOF
15317 #define HAVE_VPRINTF 1
15318 EOF
15319
15320 else
15321   echo "$ac_t""no" 1>&6
15322 fi
15323
15324 if test "$ac_cv_func_vprintf" != yes; then
15325 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15326 echo "configure:15327: checking for _doprnt" >&5
15327 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15328   echo $ac_n "(cached) $ac_c" 1>&6
15329 else
15330   cat > conftest.$ac_ext <<EOF
15331 #line 15332 "configure"
15332 #include "confdefs.h"
15333 /* System header to define __stub macros and hopefully few prototypes,
15334     which can conflict with char _doprnt(); below.  */
15335 #include <assert.h>
15336 /* Override any gcc2 internal prototype to avoid an error.  */
15337 /* We use char because int might match the return type of a gcc2
15338     builtin and then its argument prototype would still apply.  */
15339 char _doprnt();
15340 char (*f)();
15341
15342 int main() {
15343
15344 /* The GNU C library defines this for functions which it implements
15345     to always fail with ENOSYS.  Some functions are actually named
15346     something starting with __ and the normal name is an alias.  */
15347 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15348 choke me
15349 #else
15350 f = _doprnt;
15351 #endif
15352
15353 ; return 0; }
15354 EOF
15355 if { (eval echo configure:15356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15356   rm -rf conftest*
15357   eval "ac_cv_func__doprnt=yes"
15358 else
15359   echo "configure: failed program was:" >&5
15360   cat conftest.$ac_ext >&5
15361   rm -rf conftest*
15362   eval "ac_cv_func__doprnt=no"
15363 fi
15364 rm -f conftest*
15365 fi
15366
15367 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15368   echo "$ac_t""yes" 1>&6
15369   cat >> confdefs.h <<\EOF
15370 #define HAVE_DOPRNT 1
15371 EOF
15372
15373 else
15374   echo "$ac_t""no" 1>&6
15375 fi
15376
15377 fi
15378
15379
15380 if test $ac_cv_func_vprintf = yes ; then
15381                 for ac_func in vsnprintf vsprintf
15382 do
15383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15384 echo "configure:15385: checking for $ac_func" >&5
15385 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15386   echo $ac_n "(cached) $ac_c" 1>&6
15387 else
15388   cat > conftest.$ac_ext <<EOF
15389 #line 15390 "configure"
15390 #include "confdefs.h"
15391 /* System header to define __stub macros and hopefully few prototypes,
15392     which can conflict with char $ac_func(); below.  */
15393 #include <assert.h>
15394 /* Override any gcc2 internal prototype to avoid an error.  */
15395 /* We use char because int might match the return type of a gcc2
15396     builtin and then its argument prototype would still apply.  */
15397 char $ac_func();
15398 char (*f)();
15399
15400 int main() {
15401
15402 /* The GNU C library defines this for functions which it implements
15403     to always fail with ENOSYS.  Some functions are actually named
15404     something starting with __ and the normal name is an alias.  */
15405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15406 choke me
15407 #else
15408 f = $ac_func;
15409 #endif
15410
15411 ; return 0; }
15412 EOF
15413 if { (eval echo configure:15414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15414   rm -rf conftest*
15415   eval "ac_cv_func_$ac_func=yes"
15416 else
15417   echo "configure: failed program was:" >&5
15418   cat conftest.$ac_ext >&5
15419   rm -rf conftest*
15420   eval "ac_cv_func_$ac_func=no"
15421 fi
15422 rm -f conftest*
15423 fi
15424
15425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15426   echo "$ac_t""yes" 1>&6
15427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15428   cat >> confdefs.h <<EOF
15429 #define $ac_tr_func 1
15430 EOF
15431  
15432 else
15433   echo "$ac_t""no" 1>&6
15434 fi
15435 done
15436
15437 fi
15438
15439 for ac_func in \
15440         bcopy                   \
15441         closesocket             \
15442         chroot                  \
15443         endgrent                \
15444         endpwent                \
15445         flock                   \
15446         getdtablesize   \
15447         getgrgid                \
15448         gethostname             \
15449         getpass                 \
15450         getpassphrase   \
15451         getpwuid                \
15452         getpwnam                \
15453         getspnam                \
15454         gettimeofday    \
15455         initgroups              \
15456         lockf                   \
15457         memcpy                  \
15458         memmove                 \
15459         mkstemp                 \
15460         pipe                    \
15461         read                    \
15462         recv                    \
15463         recvfrom                \
15464         setpwfile               \
15465         setgid                  \
15466         setegid                 \
15467         setsid                  \
15468         setuid                  \
15469         seteuid                 \
15470         sigaction               \
15471         signal                  \
15472         sigset                  \
15473         snprintf                \
15474         strdup                  \
15475         strerror                \
15476         strpbrk                 \
15477         strrchr                 \
15478         strsep                  \
15479         strstr                  \
15480         strtol                  \
15481         strtoul                 \
15482         strspn                  \
15483         sysconf                 \
15484         waitpid                 \
15485         wait4                   \
15486         write                   \
15487         send                    \
15488         sendto                  \
15489
15490 do
15491 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15492 echo "configure:15493: checking for $ac_func" >&5
15493 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15494   echo $ac_n "(cached) $ac_c" 1>&6
15495 else
15496   cat > conftest.$ac_ext <<EOF
15497 #line 15498 "configure"
15498 #include "confdefs.h"
15499 /* System header to define __stub macros and hopefully few prototypes,
15500     which can conflict with char $ac_func(); below.  */
15501 #include <assert.h>
15502 /* Override any gcc2 internal prototype to avoid an error.  */
15503 /* We use char because int might match the return type of a gcc2
15504     builtin and then its argument prototype would still apply.  */
15505 char $ac_func();
15506 char (*f)();
15507
15508 int main() {
15509
15510 /* The GNU C library defines this for functions which it implements
15511     to always fail with ENOSYS.  Some functions are actually named
15512     something starting with __ and the normal name is an alias.  */
15513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15514 choke me
15515 #else
15516 f = $ac_func;
15517 #endif
15518
15519 ; return 0; }
15520 EOF
15521 if { (eval echo configure:15522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15522   rm -rf conftest*
15523   eval "ac_cv_func_$ac_func=yes"
15524 else
15525   echo "configure: failed program was:" >&5
15526   cat conftest.$ac_ext >&5
15527   rm -rf conftest*
15528   eval "ac_cv_func_$ac_func=no"
15529 fi
15530 rm -f conftest*
15531 fi
15532
15533 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15534   echo "$ac_t""yes" 1>&6
15535     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15536   cat >> confdefs.h <<EOF
15537 #define $ac_tr_func 1
15538 EOF
15539  
15540 else
15541   echo "$ac_t""no" 1>&6
15542 fi
15543 done
15544
15545
15546 for ac_func in getopt tempnam
15547 do
15548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15549 echo "configure:15550: checking for $ac_func" >&5
15550 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15551   echo $ac_n "(cached) $ac_c" 1>&6
15552 else
15553   cat > conftest.$ac_ext <<EOF
15554 #line 15555 "configure"
15555 #include "confdefs.h"
15556 /* System header to define __stub macros and hopefully few prototypes,
15557     which can conflict with char $ac_func(); below.  */
15558 #include <assert.h>
15559 /* Override any gcc2 internal prototype to avoid an error.  */
15560 /* We use char because int might match the return type of a gcc2
15561     builtin and then its argument prototype would still apply.  */
15562 char $ac_func();
15563 char (*f)();
15564
15565 int main() {
15566
15567 /* The GNU C library defines this for functions which it implements
15568     to always fail with ENOSYS.  Some functions are actually named
15569     something starting with __ and the normal name is an alias.  */
15570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15571 choke me
15572 #else
15573 f = $ac_func;
15574 #endif
15575
15576 ; return 0; }
15577 EOF
15578 if { (eval echo configure:15579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15579   rm -rf conftest*
15580   eval "ac_cv_func_$ac_func=yes"
15581 else
15582   echo "configure: failed program was:" >&5
15583   cat conftest.$ac_ext >&5
15584   rm -rf conftest*
15585   eval "ac_cv_func_$ac_func=no"
15586 fi
15587 rm -f conftest*
15588 fi
15589
15590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15591   echo "$ac_t""yes" 1>&6
15592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15593   cat >> confdefs.h <<EOF
15594 #define $ac_tr_func 1
15595 EOF
15596  
15597 else
15598   echo "$ac_t""no" 1>&6
15599 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15600 fi
15601 done
15602
15603
15604
15605 if test "$ac_cv_func_getopt" != yes; then
15606     LIBSRCS="$LIBSRCS getopt.c"
15607 fi
15608
15609 if test "$ac_cv_func_tempnam" != yes; then
15610     LIBSRCS="$LIBSRCS tempnam.c"
15611 fi
15612
15613 # Check Configuration
15614 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15615 echo "configure:15616: checking declaration of sys_errlist" >&5
15616 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15617   echo $ac_n "(cached) $ac_c" 1>&6
15618 else
15619   
15620         cat > conftest.$ac_ext <<EOF
15621 #line 15622 "configure"
15622 #include "confdefs.h"
15623
15624 #include <stdio.h>
15625 #include <sys/types.h>
15626 #include <errno.h>
15627 #ifdef WINNT
15628 #include <stdlib.h>
15629 #endif 
15630 int main() {
15631 char *c = (char *) *sys_errlist
15632 ; return 0; }
15633 EOF
15634 if { (eval echo configure:15635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15635   rm -rf conftest*
15636   ol_cv_dcl_sys_errlist=yes
15637         ol_cv_have_sys_errlist=yes
15638 else
15639   echo "configure: failed program was:" >&5
15640   cat conftest.$ac_ext >&5
15641   rm -rf conftest*
15642   ol_cv_dcl_sys_errlist=no
15643 fi
15644 rm -f conftest*
15645 fi
15646
15647 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15648 #
15649 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15650 if test $ol_cv_dcl_sys_errlist = no ; then
15651         cat >> confdefs.h <<\EOF
15652 #define DECL_SYS_ERRLIST 1
15653 EOF
15654
15655
15656         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15657 echo "configure:15658: checking existence of sys_errlist" >&5
15658 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15659   echo $ac_n "(cached) $ac_c" 1>&6
15660 else
15661   
15662                 cat > conftest.$ac_ext <<EOF
15663 #line 15664 "configure"
15664 #include "confdefs.h"
15665 #include <errno.h>
15666 int main() {
15667 char *c = (char *) *sys_errlist
15668 ; return 0; }
15669 EOF
15670 if { (eval echo configure:15671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15671   rm -rf conftest*
15672   ol_cv_have_sys_errlist=yes
15673 else
15674   echo "configure: failed program was:" >&5
15675   cat conftest.$ac_ext >&5
15676   rm -rf conftest*
15677   ol_cv_have_sys_errlist=no
15678 fi
15679 rm -f conftest*
15680 fi
15681
15682 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15683 fi
15684 if test $ol_cv_have_sys_errlist = yes ; then
15685         cat >> confdefs.h <<\EOF
15686 #define HAVE_SYS_ERRLIST 1
15687 EOF
15688
15689 fi
15690
15691
15692
15693 if test "$ol_enable_debug" != no ; then
15694         cat >> confdefs.h <<\EOF
15695 #define LDAP_DEBUG 1
15696 EOF
15697
15698 fi
15699 if test "$ol_enable_syslog" = yes ; then
15700         cat >> confdefs.h <<\EOF
15701 #define LDAP_SYSLOG 1
15702 EOF
15703
15704 fi
15705 if test "$ol_enable_libui" = yes ; then
15706         cat >> confdefs.h <<\EOF
15707 #define LDAP_LIBUI 1
15708 EOF
15709
15710 fi
15711 if test "$ol_enable_cache" = no ; then
15712         cat >> confdefs.h <<\EOF
15713 #define LDAP_NOCACHE 1
15714 EOF
15715
15716 fi
15717 if test "$ol_link_kbind" != no ; then
15718         cat >> confdefs.h <<\EOF
15719 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15720 EOF
15721
15722 fi
15723 if test "$ol_enable_proctitle" != no ; then
15724         cat >> confdefs.h <<\EOF
15725 #define LDAP_PROCTITLE 1
15726 EOF
15727
15728 fi
15729 if test "$ol_enable_referrals" != no ; then
15730         cat >> confdefs.h <<\EOF
15731 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15732 EOF
15733
15734 fi
15735 if test "$ol_enable_cldap" != no ; then
15736         cat >> confdefs.h <<\EOF
15737 #define LDAP_CONNECTIONLESS 1
15738 EOF
15739
15740 fi
15741 if test "$ol_enable_local" != no; then
15742         cat >> confdefs.h <<\EOF
15743 #define LDAP_PF_LOCAL 1
15744 EOF
15745
15746 fi
15747 if test "$ol_enable_ipv6" != no; then
15748         cat >> confdefs.h <<\EOF
15749 #define LDAP_PF_INET6 1
15750 EOF
15751
15752 fi
15753 if test "$ol_enable_cleartext" != no ; then
15754         cat >> confdefs.h <<\EOF
15755 #define SLAPD_CLEARTEXT 1
15756 EOF
15757
15758 fi
15759 if test "$ol_enable_crypt" != no ; then
15760         cat >> confdefs.h <<\EOF
15761 #define SLAPD_CRYPT 1
15762 EOF
15763
15764 fi
15765 if test "$ol_link_kpasswd" != no ; then
15766         cat >> confdefs.h <<\EOF
15767 #define SLAPD_KPASSWD 1
15768 EOF
15769
15770 fi
15771 if test "$ol_link_spasswd" != no ; then
15772         cat >> confdefs.h <<\EOF
15773 #define SLAPD_SPASSWD 1
15774 EOF
15775
15776 fi
15777 if test "$ol_enable_multimaster" != no ; then
15778         cat >> confdefs.h <<\EOF
15779 #define SLAPD_MULTIMASTER 1
15780 EOF
15781
15782 fi
15783 if test "$ol_enable_phonetic" != no ; then
15784         cat >> confdefs.h <<\EOF
15785 #define SLAPD_PHONETIC 1
15786 EOF
15787
15788 fi
15789 if test "$ol_enable_rlookups" != no ; then
15790         cat >> confdefs.h <<\EOF
15791 #define SLAPD_RLOOKUPS 1
15792 EOF
15793
15794 fi
15795 if test "$ol_enable_aci" != no ; then
15796         cat >> confdefs.h <<\EOF
15797 #define SLAPD_ACI_ENABLED 1
15798 EOF
15799
15800 fi
15801
15802 if test "$ol_link_modules" != no ; then
15803         cat >> confdefs.h <<\EOF
15804 #define SLAPD_MODULES 1
15805 EOF
15806
15807         BUILD_SLAPD=yes
15808         SLAPD_MODULES_LDFLAGS="-dlopen self"
15809 fi
15810
15811 if test "$ol_link_dnssrv" != no ; then
15812         cat >> confdefs.h <<\EOF
15813 #define SLAPD_DNSSRV 1
15814 EOF
15815
15816         BUILD_SLAPD=yes
15817         BUILD_DNSSRV=yes
15818         if test "$ol_with_dnssrv_module" != static ; then
15819                 cat >> confdefs.h <<\EOF
15820 #define SLAPD_DNSSRV_DYNAMIC 1
15821 EOF
15822
15823                 BUILD_DNSSRV=mod
15824                 BUILD_DNSSRV_DYNAMIC=shared
15825                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15826         fi
15827 fi
15828
15829 if test "$ol_enable_ldap" != no ; then
15830         cat >> confdefs.h <<\EOF
15831 #define SLAPD_LDAP 1
15832 EOF
15833
15834         BUILD_SLAPD=yes
15835         BUILD_LDAP=yes
15836         if test "$ol_with_ldap_module" != static ; then
15837                 cat >> confdefs.h <<\EOF
15838 #define SLAPD_LDAP_DYNAMIC 1
15839 EOF
15840
15841                 BUILD_LDAP=mod
15842                 BUILD_LDAP_DYNAMIC=shared
15843                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15844         fi
15845 fi
15846
15847 if test "$ol_link_ldbm" != no ; then
15848         cat >> confdefs.h <<\EOF
15849 #define SLAPD_LDBM 1
15850 EOF
15851
15852         BUILD_SLAPD=yes
15853         BUILD_LDBM=yes
15854         if test "$ol_with_ldbm_module" != static ; then
15855                 cat >> confdefs.h <<\EOF
15856 #define SLAPD_LDBM_DYNAMIC 1
15857 EOF
15858
15859                 BUILD_LDBM=mod
15860                 BUILD_LDBM_DYNAMIC=shared
15861                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15862         fi
15863 fi
15864
15865 if test "$ol_enable_passwd" != no ; then
15866         cat >> confdefs.h <<\EOF
15867 #define SLAPD_PASSWD 1
15868 EOF
15869
15870         BUILD_SLAPD=yes
15871         BUILD_PASSWD=yes
15872         if test "$ol_with_passwd_module" != static ; then
15873                 cat >> confdefs.h <<\EOF
15874 #define SLAPD_PASSWD_DYNAMIC 1
15875 EOF
15876
15877                 BUILD_PASSWD=mod
15878                 BUILD_PASSWD_DYNAMIC=shared
15879                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15880         fi
15881 fi
15882
15883 if test "$ol_link_perl" != no ; then
15884         cat >> confdefs.h <<\EOF
15885 #define SLAPD_PERL 1
15886 EOF
15887
15888         BUILD_SLAPD=yes
15889         BUILD_PERL=yes
15890         if test "$ol_with_perl_module" != static ; then
15891                 cat >> confdefs.h <<\EOF
15892 #define SLAPD_PERL_DYNAMIC 1
15893 EOF
15894
15895                 BUILD_PERL=mod
15896                 BUILD_PERL_DYNAMIC=shared
15897                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15898         fi
15899 fi
15900
15901 if test "$ol_enable_shell" != no ; then
15902         cat >> confdefs.h <<\EOF
15903 #define SLAPD_SHELL 1
15904 EOF
15905
15906         BUILD_SLAPD=yes
15907         BUILD_SHELL=yes
15908         if test "$ol_with_shell_module" != static ; then
15909                 cat >> confdefs.h <<\EOF
15910 #define SLAPD_SHELL_DYNAMIC 1
15911 EOF
15912
15913                 BUILD_SHELL=mod
15914                 BUILD_SHELL_DYNAMIC=shared
15915                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15916         fi
15917 fi
15918
15919 if test "$ol_enable_tcl" != no ; then
15920         cat >> confdefs.h <<\EOF
15921 #define SLAPD_TCL 1
15922 EOF
15923
15924         BUILD_SLAPD=yes
15925         BUILD_TCL=yes
15926         if test "$ol_with_tcl_module" != static; then
15927                 cat >> confdefs.h <<\EOF
15928 #define SLAPD_TCL_DYNAMIC 1
15929 EOF
15930
15931                 BUILD_TCL=mod
15932                 BUILD_TCL_DYNAMIC=shared
15933                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15934         fi
15935 fi
15936
15937 if test "$ol_enable_sql" != no ; then
15938         cat >> confdefs.h <<\EOF
15939 #define SLAPD_SQL 1
15940 EOF
15941
15942         BUILD_SLAPD=yes
15943         BUILD_SQL=yes
15944         SLAPD_SQL_LIBS=-liodbc
15945         if test "$ol_with_sql_module" != static; then
15946                 cat >> confdefs.h <<\EOF
15947 #define SLAPD_SQL_DYNAMIC 1
15948 EOF
15949
15950                 BUILD_SQL=mod
15951                 BUILD_SQL_DYNAMIC=shared
15952                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15953         fi
15954 fi
15955
15956 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15957         $BUILD_SLAPD = yes ; then
15958         BUILD_SLURPD=yes
15959 fi
15960
15961
15962 if test "$LINK_BINS_DYNAMIC" = yes; then
15963     LIB_LINKAGE=DYN
15964     LT_LIB_LINKAGE=shared
15965 else
15966     LIB_LINKAGE=STAT
15967     LT_LIB_LINKAGE=static
15968 fi
15969
15970 if test "$ac_cv_mingw32" = yes ; then
15971     PLAT=NT
15972     DYN_EXT=dll
15973 else
15974     PLAT=UNIX
15975     DYN_EXT=so
15976 fi
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986   
15987   
15988   
15989   
15990   
15991   
15992   
15993   
15994   
15995   
15996   
15997   
15998   
15999   
16000   
16001   
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037 trap '' 1 2 15
16038
16039 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16040
16041 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16042 # Let make expand exec_prefix.
16043 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16044
16045 # Any assignment to VPATH causes Sun make to only execute
16046 # the first set of double-colon rules, so remove it if not needed.
16047 # If there is a colon in the path, we need to keep it.
16048 if test "x$srcdir" = x.; then
16049   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16050 fi
16051
16052 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16053
16054 DEFS=-DHAVE_CONFIG_H
16055
16056 # Without the "./", some shells look in PATH for config.status.
16057 : ${CONFIG_STATUS=./config.status}
16058
16059 echo creating $CONFIG_STATUS
16060 rm -f $CONFIG_STATUS
16061 cat > $CONFIG_STATUS <<EOF
16062 #! /bin/sh
16063 # Generated automatically by configure.
16064 # Run this file to recreate the current configuration.
16065 # This directory was configured as follows,
16066 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16067 #
16068 # $0 $ac_configure_args
16069 #
16070 # Compiler output produced by configure, useful for debugging
16071 # configure, is in ./config.log if it exists.
16072
16073 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16074 for ac_option
16075 do
16076   case "\$ac_option" in
16077   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16078     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16079     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16080   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16081     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16082     exit 0 ;;
16083   -help | --help | --hel | --he | --h)
16084     echo "\$ac_cs_usage"; exit 0 ;;
16085   *) echo "\$ac_cs_usage"; exit 1 ;;
16086   esac
16087 done
16088
16089 ac_given_srcdir=$srcdir
16090 ac_given_INSTALL="$INSTALL"
16091
16092 trap 'rm -fr `echo "\
16093 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16094 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16095 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16096 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16097 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16098 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16099 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16100 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16101 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16102 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16103 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16104 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16105 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16106 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16107 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16108 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16109 include/Makefile:build/top.mk:include/Makefile.in \
16110 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16111 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16112 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16113 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16114 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16115 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16116 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16117 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16118 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16119 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16120 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16121 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16122 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16123 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16124 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16125 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16126 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16127 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16128 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16129 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16130 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16131 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16132 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16133 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16134 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16135 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16136 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16137  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16138 EOF
16139 cat >> $CONFIG_STATUS <<EOF
16140
16141 # Protect against being on the right side of a sed subst in config.status.
16142 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16143  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16144 $ac_vpsub
16145 $extrasub
16146 s%@SHELL@%$SHELL%g
16147 s%@CFLAGS@%$CFLAGS%g
16148 s%@CPPFLAGS@%$CPPFLAGS%g
16149 s%@CXXFLAGS@%$CXXFLAGS%g
16150 s%@FFLAGS@%$FFLAGS%g
16151 s%@DEFS@%$DEFS%g
16152 s%@LDFLAGS@%$LDFLAGS%g
16153 s%@LIBS@%$LIBS%g
16154 s%@exec_prefix@%$exec_prefix%g
16155 s%@prefix@%$prefix%g
16156 s%@program_transform_name@%$program_transform_name%g
16157 s%@bindir@%$bindir%g
16158 s%@sbindir@%$sbindir%g
16159 s%@libexecdir@%$libexecdir%g
16160 s%@datadir@%$datadir%g
16161 s%@sysconfdir@%$sysconfdir%g
16162 s%@sharedstatedir@%$sharedstatedir%g
16163 s%@localstatedir@%$localstatedir%g
16164 s%@libdir@%$libdir%g
16165 s%@includedir@%$includedir%g
16166 s%@oldincludedir@%$oldincludedir%g
16167 s%@infodir@%$infodir%g
16168 s%@mandir@%$mandir%g
16169 s%@host@%$host%g
16170 s%@host_alias@%$host_alias%g
16171 s%@host_cpu@%$host_cpu%g
16172 s%@host_vendor@%$host_vendor%g
16173 s%@host_os@%$host_os%g
16174 s%@target@%$target%g
16175 s%@target_alias@%$target_alias%g
16176 s%@target_cpu@%$target_cpu%g
16177 s%@target_vendor@%$target_vendor%g
16178 s%@target_os@%$target_os%g
16179 s%@build@%$build%g
16180 s%@build_alias@%$build_alias%g
16181 s%@build_cpu@%$build_cpu%g
16182 s%@build_vendor@%$build_vendor%g
16183 s%@build_os@%$build_os%g
16184 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16185 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16186 s%@INSTALL_DATA@%$INSTALL_DATA%g
16187 s%@PACKAGE@%$PACKAGE%g
16188 s%@VERSION@%$VERSION%g
16189 s%@ACLOCAL@%$ACLOCAL%g
16190 s%@AUTOCONF@%$AUTOCONF%g
16191 s%@AUTOMAKE@%$AUTOMAKE%g
16192 s%@AUTOHEADER@%$AUTOHEADER%g
16193 s%@MAKEINFO@%$MAKEINFO%g
16194 s%@install_sh@%$install_sh%g
16195 s%@AMTAR@%$AMTAR%g
16196 s%@AWK@%$AWK%g
16197 s%@AMTARFLAGS@%$AMTARFLAGS%g
16198 s%@SET_MAKE@%$SET_MAKE%g
16199 s%@top_builddir@%$top_builddir%g
16200 s%@ldap_subdir@%$ldap_subdir%g
16201 s%@CC@%$CC%g
16202 s%@RANLIB@%$RANLIB%g
16203 s%@LN_S@%$LN_S%g
16204 s%@DLLTOOL@%$DLLTOOL%g
16205 s%@AS@%$AS%g
16206 s%@OBJDUMP@%$OBJDUMP%g
16207 s%@LIBTOOL@%$LIBTOOL%g
16208 s%@LN_H@%$LN_H%g
16209 s%@SENDMAIL@%$SENDMAIL%g
16210 s%@EDITOR@%$EDITOR%g
16211 s%@FINGER@%$FINGER%g
16212 s%@PERLBIN@%$PERLBIN%g
16213 s%@CPP@%$CPP%g
16214 s%@EXEEXT@%$EXEEXT%g
16215 s%@OBJEXT@%$OBJEXT%g
16216 s%@OL_MKDEP@%$OL_MKDEP%g
16217 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16218 s%@LIBOBJS@%$LIBOBJS%g
16219 s%@LIBSRCS@%$LIBSRCS%g
16220 s%@PLAT@%$PLAT%g
16221 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16222 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16223 s%@DYN_EXT@%$DYN_EXT%g
16224 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16225 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16226 s%@BUILD_LDAP@%$BUILD_LDAP%g
16227 s%@BUILD_LDBM@%$BUILD_LDBM%g
16228 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16229 s%@BUILD_PERL@%$BUILD_PERL%g
16230 s%@BUILD_SHELL@%$BUILD_SHELL%g
16231 s%@BUILD_SQL@%$BUILD_SQL%g
16232 s%@BUILD_TCL@%$BUILD_TCL%g
16233 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16234 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16235 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16236 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16237 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16238 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16239 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16240 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16241 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16242 s%@LDAP_LIBS@%$LDAP_LIBS%g
16243 s%@LDIF_LIBS@%$LDIF_LIBS%g
16244 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16245 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16246 s%@LDBM_LIBS@%$LDBM_LIBS%g
16247 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16248 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16249 s%@WRAP_LIBS@%$WRAP_LIBS%g
16250 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16251 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16252 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16253 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16254 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16255 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16256 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16257 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16258 s%@KRB4_LIBS@%$KRB4_LIBS%g
16259 s%@KRB5_LIBS@%$KRB5_LIBS%g
16260 s%@READLINE_LIBS@%$READLINE_LIBS%g
16261 s%@SASL_LIBS@%$SASL_LIBS%g
16262 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16263 s%@TLS_LIBS@%$TLS_LIBS%g
16264 s%@MODULES_LIBS@%$MODULES_LIBS%g
16265 s%@AUTH_LIBS@%$AUTH_LIBS%g
16266 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16267 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16268 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16269
16270 CEOF
16271 EOF
16272
16273 cat >> $CONFIG_STATUS <<\EOF
16274
16275 # Split the substitutions into bite-sized pieces for seds with
16276 # small command number limits, like on Digital OSF/1 and HP-UX.
16277 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16278 ac_file=1 # Number of current file.
16279 ac_beg=1 # First line for current file.
16280 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16281 ac_more_lines=:
16282 ac_sed_cmds=""
16283 while $ac_more_lines; do
16284   if test $ac_beg -gt 1; then
16285     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16286   else
16287     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16288   fi
16289   if test ! -s conftest.s$ac_file; then
16290     ac_more_lines=false
16291     rm -f conftest.s$ac_file
16292   else
16293     if test -z "$ac_sed_cmds"; then
16294       ac_sed_cmds="sed -f conftest.s$ac_file"
16295     else
16296       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16297     fi
16298     ac_file=`expr $ac_file + 1`
16299     ac_beg=$ac_end
16300     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16301   fi
16302 done
16303 if test -z "$ac_sed_cmds"; then
16304   ac_sed_cmds=cat
16305 fi
16306 EOF
16307
16308 cat >> $CONFIG_STATUS <<EOF
16309
16310 CONFIG_FILES=\${CONFIG_FILES-"\
16311 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16312 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16313 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16314 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16315 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16316 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16317 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16318 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16319 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16320 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16321 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16322 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16323 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16324 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16325 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16326 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16327 include/Makefile:build/top.mk:include/Makefile.in \
16328 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16329 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16330 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16331 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16332 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16333 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16334 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16335 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16336 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16337 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16338 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16339 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16340 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16341 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16342 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16343 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16344 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16345 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16346 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16347 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16348 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16349 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16350 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16351 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16352 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16353 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16354 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16355 "}
16356 EOF
16357 cat >> $CONFIG_STATUS <<\EOF
16358 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16359   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16360   case "$ac_file" in
16361   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16362        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16363   *) ac_file_in="${ac_file}.in" ;;
16364   esac
16365
16366   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16367
16368   # Remove last slash and all that follows it.  Not all systems have dirname.
16369   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16370   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16371     # The file is in a subdirectory.
16372     test ! -d "$ac_dir" && mkdir "$ac_dir"
16373     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16374     # A "../" for each directory in $ac_dir_suffix.
16375     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16376   else
16377     ac_dir_suffix= ac_dots=
16378   fi
16379
16380   case "$ac_given_srcdir" in
16381   .)  srcdir=.
16382       if test -z "$ac_dots"; then top_srcdir=.
16383       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16384   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16385   *) # Relative path.
16386     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16387     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16388   esac
16389
16390   case "$ac_given_INSTALL" in
16391   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16392   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16393   esac
16394
16395   echo creating "$ac_file"
16396   rm -f "$ac_file"
16397   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16398   case "$ac_file" in
16399   *[Mm]akefile*) ac_comsub="1i\\
16400 # $configure_input" ;;
16401   *) ac_comsub= ;;
16402   esac
16403
16404   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16405   sed -e "$ac_comsub
16406 s%@configure_input@%$configure_input%g
16407 s%@srcdir@%$srcdir%g
16408 s%@top_srcdir@%$top_srcdir%g
16409 s%@INSTALL@%$INSTALL%g
16410 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16411 fi; done
16412 rm -f conftest.s*
16413
16414 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16415 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16416 #
16417 # ac_d sets the value in "#define NAME VALUE" lines.
16418 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16419 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16420 ac_dC='\3'
16421 ac_dD='%g'
16422 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16423 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16424 ac_uB='\([      ]\)%\1#\2define\3'
16425 ac_uC=' '
16426 ac_uD='\4%g'
16427 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16428 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16429 ac_eB='$%\1#\2define\3'
16430 ac_eC=' '
16431 ac_eD='%g'
16432
16433 if test "${CONFIG_HEADERS+set}" != set; then
16434 EOF
16435 cat >> $CONFIG_STATUS <<EOF
16436   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16437 EOF
16438 cat >> $CONFIG_STATUS <<\EOF
16439 fi
16440 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16441   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16442   case "$ac_file" in
16443   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16444        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16445   *) ac_file_in="${ac_file}.in" ;;
16446   esac
16447
16448   echo creating $ac_file
16449
16450   rm -f conftest.frag conftest.in conftest.out
16451   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16452   cat $ac_file_inputs > conftest.in
16453
16454 EOF
16455
16456 # Transform confdefs.h into a sed script conftest.vals that substitutes
16457 # the proper values into config.h.in to produce config.h.  And first:
16458 # Protect against being on the right side of a sed subst in config.status.
16459 # Protect against being in an unquoted here document in config.status.
16460 rm -f conftest.vals
16461 cat > conftest.hdr <<\EOF
16462 s/[\\&%]/\\&/g
16463 s%[\\$`]%\\&%g
16464 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16465 s%ac_d%ac_u%gp
16466 s%ac_u%ac_e%gp
16467 EOF
16468 sed -n -f conftest.hdr confdefs.h > conftest.vals
16469 rm -f conftest.hdr
16470
16471 # This sed command replaces #undef with comments.  This is necessary, for
16472 # example, in the case of _POSIX_SOURCE, which is predefined and required
16473 # on some systems where configure will not decide to define it.
16474 cat >> conftest.vals <<\EOF
16475 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16476 EOF
16477
16478 # Break up conftest.vals because some shells have a limit on
16479 # the size of here documents, and old seds have small limits too.
16480
16481 rm -f conftest.tail
16482 while :
16483 do
16484   ac_lines=`grep -c . conftest.vals`
16485   # grep -c gives empty output for an empty file on some AIX systems.
16486   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16487   # Write a limited-size here document to conftest.frag.
16488   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16489   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16490   echo 'CEOF
16491   sed -f conftest.frag conftest.in > conftest.out
16492   rm -f conftest.in
16493   mv conftest.out conftest.in
16494 ' >> $CONFIG_STATUS
16495   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16496   rm -f conftest.vals
16497   mv conftest.tail conftest.vals
16498 done
16499 rm -f conftest.vals
16500
16501 cat >> $CONFIG_STATUS <<\EOF
16502   rm -f conftest.frag conftest.h
16503   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16504   cat conftest.in >> conftest.h
16505   rm -f conftest.in
16506   if cmp -s $ac_file conftest.h 2>/dev/null; then
16507     echo "$ac_file is unchanged"
16508     rm -f conftest.h
16509   else
16510     # Remove last slash and all that follows it.  Not all systems have dirname.
16511       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16512       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16513       # The file is in a subdirectory.
16514       test ! -d "$ac_dir" && mkdir "$ac_dir"
16515     fi
16516     rm -f $ac_file
16517     mv conftest.h $ac_file
16518   fi
16519 fi; done
16520
16521 EOF
16522 cat >> $CONFIG_STATUS <<EOF
16523
16524 EOF
16525 cat >> $CONFIG_STATUS <<\EOF
16526
16527 date > stamp-h
16528 echo Please \"make depend\" to build dependencies
16529
16530 exit 0
16531 EOF
16532 chmod +x $CONFIG_STATUS
16533 rm -fr confdefs* $ac_clean_files
16534 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16535