]> git.sur5r.net Git - openldap/blob - configure
Regenerate based on option changes
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.344 2001/01/03 19:47:08 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 (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-phonetic     enable phonetic/soundex (no)"
77 ac_help="$ac_help
78     --enable-rlookups     enable reverse lookups (no)"
79 ac_help="$ac_help
80     --enable-aci          enable per-object ACIs (no)"
81 ac_help="$ac_help
82     --enable-wrappers     enable tcp wrapper support (no)"
83 ac_help="$ac_help
84     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
85 ac_help="$ac_help
86     --enable-bdb          enable Berkeley DB backend (no)"
87 ac_help="$ac_help
88     --with-bdb-module  module type (static)"
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       with 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.sh
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.49c)
645 if (OL_FOO=OL_FOO; unset OL_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 eval `$ac_aux_dir/version.sh`
677 if test -z "$OL_STRING"; then
678         { echo "configure: error: could not determine version" 1>&2; exit 1; }
679 fi
680
681 echo "Configuring $OL_STRING ..."
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=$OL_PACKAGE
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 cat >> confdefs.h <<EOF
1141 #define OPENLDAP_PACKAGE "$PACKAGE"
1142 EOF
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_VERSION "$VERSION"
1146 EOF
1147
1148
1149 cat >> confdefs.h <<EOF
1150 #define LDAP_VENDOR_VERSION $OL_API_INC
1151 EOF
1152
1153 cat >> confdefs.h <<EOF
1154 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1155 EOF
1156
1157 cat >> confdefs.h <<EOF
1158 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1159 EOF
1160
1161 cat >> confdefs.h <<EOF
1162 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1163 EOF
1164
1165
1166 OPENLDAP_LIBVERSION=$OL_API_LIB
1167
1168
1169
1170 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1171 echo "configure:1172: checking configure arguments" >&5
1172
1173
1174 top_builddir=`pwd`
1175
1176 ldap_subdir="/openldap"
1177
1178 # Check whether --with-subdir or --without-subdir was given.
1179 if test "${with_subdir+set}" = set; then
1180   withval="$with_subdir"
1181   case "$withval" in
1182         no) ldap_subdir=""
1183                 ;;
1184         yes)
1185                 ;;
1186         /*|\\*)
1187                 ldap_subdir="$withval"
1188                 ;;
1189         *)
1190                 ldap_subdir="/$withval"
1191                 ;;
1192 esac
1193
1194 fi
1195
1196
1197 # OpenLDAP --enable-debug
1198         # Check whether --enable-debug or --disable-debug was given.
1199 if test "${enable_debug+set}" = set; then
1200   enableval="$enable_debug"
1201   
1202         ol_arg=invalid
1203         for ol_val in auto yes no ; do
1204                 if test "$enableval" = "$ol_val" ; then
1205                         ol_arg="$ol_val"
1206                 fi
1207         done
1208         if test "$ol_arg" = "invalid" ; then
1209                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1210         fi
1211         ol_enable_debug="$ol_arg"
1212
1213 else
1214         ol_enable_debug="yes"
1215 fi
1216 # end --enable-debug
1217 # OpenLDAP --enable-syslog
1218         # Check whether --enable-syslog or --disable-syslog was given.
1219 if test "${enable_syslog+set}" = set; then
1220   enableval="$enable_syslog"
1221   
1222         ol_arg=invalid
1223         for ol_val in auto yes no ; do
1224                 if test "$enableval" = "$ol_val" ; then
1225                         ol_arg="$ol_val"
1226                 fi
1227         done
1228         if test "$ol_arg" = "invalid" ; then
1229                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1230         fi
1231         ol_enable_syslog="$ol_arg"
1232
1233 else
1234         ol_enable_syslog="auto"
1235 fi
1236 # end --enable-syslog
1237 # OpenLDAP --enable-proctitle
1238         # Check whether --enable-proctitle or --disable-proctitle was given.
1239 if test "${enable_proctitle+set}" = set; then
1240   enableval="$enable_proctitle"
1241   
1242         ol_arg=invalid
1243         for ol_val in auto yes no ; do
1244                 if test "$enableval" = "$ol_val" ; then
1245                         ol_arg="$ol_val"
1246                 fi
1247         done
1248         if test "$ol_arg" = "invalid" ; then
1249                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1250         fi
1251         ol_enable_proctitle="$ol_arg"
1252
1253 else
1254         ol_enable_proctitle="yes"
1255 fi
1256 # end --enable-proctitle
1257 # OpenLDAP --enable-cache
1258         # Check whether --enable-cache or --disable-cache was given.
1259 if test "${enable_cache+set}" = set; then
1260   enableval="$enable_cache"
1261   
1262         ol_arg=invalid
1263         for ol_val in auto yes no ; do
1264                 if test "$enableval" = "$ol_val" ; then
1265                         ol_arg="$ol_val"
1266                 fi
1267         done
1268         if test "$ol_arg" = "invalid" ; then
1269                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1270         fi
1271         ol_enable_cache="$ol_arg"
1272
1273 else
1274         ol_enable_cache="yes"
1275 fi
1276 # end --enable-cache
1277 # OpenLDAP --enable-referrals
1278         # Check whether --enable-referrals or --disable-referrals was given.
1279 if test "${enable_referrals+set}" = set; then
1280   enableval="$enable_referrals"
1281   
1282         ol_arg=invalid
1283         for ol_val in auto yes no ; do
1284                 if test "$enableval" = "$ol_val" ; then
1285                         ol_arg="$ol_val"
1286                 fi
1287         done
1288         if test "$ol_arg" = "invalid" ; then
1289                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1290         fi
1291         ol_enable_referrals="$ol_arg"
1292
1293 else
1294         ol_enable_referrals="yes"
1295 fi
1296 # end --enable-referrals
1297 # OpenLDAP --enable-kbind
1298         # Check whether --enable-kbind or --disable-kbind was given.
1299 if test "${enable_kbind+set}" = set; then
1300   enableval="$enable_kbind"
1301   
1302         ol_arg=invalid
1303         for ol_val in auto yes no ; do
1304                 if test "$enableval" = "$ol_val" ; then
1305                         ol_arg="$ol_val"
1306                 fi
1307         done
1308         if test "$ol_arg" = "invalid" ; then
1309                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1310         fi
1311         ol_enable_kbind="$ol_arg"
1312
1313 else
1314         ol_enable_kbind="no"
1315 fi
1316 # end --enable-kbind
1317 # OpenLDAP --enable-ipv6
1318         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1319 if test "${enable_ipv6+set}" = set; then
1320   enableval="$enable_ipv6"
1321   
1322         ol_arg=invalid
1323         for ol_val in auto yes no ; do
1324                 if test "$enableval" = "$ol_val" ; then
1325                         ol_arg="$ol_val"
1326                 fi
1327         done
1328         if test "$ol_arg" = "invalid" ; then
1329                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1330         fi
1331         ol_enable_ipv6="$ol_arg"
1332
1333 else
1334         ol_enable_ipv6="auto"
1335 fi
1336 # end --enable-ipv6
1337 # OpenLDAP --enable-local
1338         # Check whether --enable-local or --disable-local was given.
1339 if test "${enable_local+set}" = set; then
1340   enableval="$enable_local"
1341   
1342         ol_arg=invalid
1343         for ol_val in auto yes no ; do
1344                 if test "$enableval" = "$ol_val" ; then
1345                         ol_arg="$ol_val"
1346                 fi
1347         done
1348         if test "$ol_arg" = "invalid" ; then
1349                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1350         fi
1351         ol_enable_local="$ol_arg"
1352
1353 else
1354         ol_enable_local="auto"
1355 fi
1356 # end --enable-local
1357 # OpenLDAP --enable-x_compile
1358         # Check whether --enable-x_compile or --disable-x_compile was given.
1359 if test "${enable_x_compile+set}" = set; then
1360   enableval="$enable_x_compile"
1361   
1362         ol_arg=invalid
1363         for ol_val in yes no ; do
1364                 if test "$enableval" = "$ol_val" ; then
1365                         ol_arg="$ol_val"
1366                 fi
1367         done
1368         if test "$ol_arg" = "invalid" ; then
1369                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1370         fi
1371         ol_enable_x_compile="$ol_arg"
1372
1373 else
1374         ol_enable_x_compile="no"
1375 fi
1376 # end --enable-x_compile
1377
1378
1379 # OpenLDAP --with-cyrus_sasl
1380         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1381 if test "${with_cyrus_sasl+set}" = set; then
1382   withval="$with_cyrus_sasl"
1383   
1384         ol_arg=invalid
1385         for ol_val in auto yes no  ; do
1386                 if test "$withval" = "$ol_val" ; then
1387                         ol_arg="$ol_val"
1388                 fi
1389         done
1390         if test "$ol_arg" = "invalid" ; then
1391                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1392         fi
1393         ol_with_cyrus_sasl="$ol_arg"
1394
1395 else
1396         ol_with_cyrus_sasl="auto"
1397 fi
1398 # end --with-cyrus_sasl
1399
1400 # OpenLDAP --with-fetch
1401         # Check whether --with-fetch or --without-fetch was given.
1402 if test "${with_fetch+set}" = set; then
1403   withval="$with_fetch"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto yes no  ; do
1407                 if test "$withval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1413         fi
1414         ol_with_fetch="$ol_arg"
1415
1416 else
1417         ol_with_fetch="auto"
1418 fi
1419 # end --with-fetch
1420
1421 # OpenLDAP --with-kerberos
1422         # Check whether --with-kerberos or --without-kerberos was given.
1423 if test "${with_kerberos+set}" = set; then
1424   withval="$with_kerberos"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1428                 if test "$withval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1434         fi
1435         ol_with_kerberos="$ol_arg"
1436
1437 else
1438         ol_with_kerberos="auto"
1439 fi
1440 # end --with-kerberos
1441
1442 # OpenLDAP --with-readline
1443         # Check whether --with-readline or --without-readline was given.
1444 if test "${with_readline+set}" = set; then
1445   withval="$with_readline"
1446   
1447         ol_arg=invalid
1448         for ol_val in auto yes no  ; do
1449                 if test "$withval" = "$ol_val" ; then
1450                         ol_arg="$ol_val"
1451                 fi
1452         done
1453         if test "$ol_arg" = "invalid" ; then
1454                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1455         fi
1456         ol_with_readline="$ol_arg"
1457
1458 else
1459         ol_with_readline="auto"
1460 fi
1461 # end --with-readline
1462
1463 # OpenLDAP --with-threads
1464         # Check whether --with-threads or --without-threads was given.
1465 if test "${with_threads+set}" = set; then
1466   withval="$with_threads"
1467   
1468         ol_arg=invalid
1469         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1470                 if test "$withval" = "$ol_val" ; then
1471                         ol_arg="$ol_val"
1472                 fi
1473         done
1474         if test "$ol_arg" = "invalid" ; then
1475                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1476         fi
1477         ol_with_threads="$ol_arg"
1478
1479 else
1480         ol_with_threads="auto"
1481 fi
1482 # end --with-threads
1483
1484 # OpenLDAP --with-tls
1485         # Check whether --with-tls or --without-tls was given.
1486 if test "${with_tls+set}" = set; then
1487   withval="$with_tls"
1488   
1489         ol_arg=invalid
1490         for ol_val in auto ssleay openssl yes no  ; do
1491                 if test "$withval" = "$ol_val" ; then
1492                         ol_arg="$ol_val"
1493                 fi
1494         done
1495         if test "$ol_arg" = "invalid" ; then
1496                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1497         fi
1498         ol_with_tls="$ol_arg"
1499
1500 else
1501         ol_with_tls="auto"
1502 fi
1503 # end --with-tls
1504
1505 # OpenLDAP --with-yielding_select
1506         # Check whether --with-yielding_select or --without-yielding_select was given.
1507 if test "${with_yielding_select+set}" = set; then
1508   withval="$with_yielding_select"
1509   
1510         ol_arg=invalid
1511         for ol_val in auto yes no manual  ; do
1512                 if test "$withval" = "$ol_val" ; then
1513                         ol_arg="$ol_val"
1514                 fi
1515         done
1516         if test "$ol_arg" = "invalid" ; then
1517                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1518         fi
1519         ol_with_yielding_select="$ol_arg"
1520
1521 else
1522         ol_with_yielding_select="auto"
1523 fi
1524 # end --with-yielding_select
1525
1526
1527
1528 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1529 if test "${with_xxslapdoptions+set}" = set; then
1530   withval="$with_xxslapdoptions"
1531   :
1532 fi
1533
1534 # OpenLDAP --enable-slapd
1535         # Check whether --enable-slapd or --disable-slapd was given.
1536 if test "${enable_slapd+set}" = set; then
1537   enableval="$enable_slapd"
1538   
1539         ol_arg=invalid
1540         for ol_val in auto yes no ; do
1541                 if test "$enableval" = "$ol_val" ; then
1542                         ol_arg="$ol_val"
1543                 fi
1544         done
1545         if test "$ol_arg" = "invalid" ; then
1546                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1547         fi
1548         ol_enable_slapd="$ol_arg"
1549
1550 else
1551         ol_enable_slapd="yes"
1552 fi
1553 # end --enable-slapd
1554 # OpenLDAP --enable-cleartext
1555         # Check whether --enable-cleartext or --disable-cleartext was given.
1556 if test "${enable_cleartext+set}" = set; then
1557   enableval="$enable_cleartext"
1558   
1559         ol_arg=invalid
1560         for ol_val in auto yes no ; do
1561                 if test "$enableval" = "$ol_val" ; then
1562                         ol_arg="$ol_val"
1563                 fi
1564         done
1565         if test "$ol_arg" = "invalid" ; then
1566                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1567         fi
1568         ol_enable_cleartext="$ol_arg"
1569
1570 else
1571         ol_enable_cleartext="yes"
1572 fi
1573 # end --enable-cleartext
1574 # OpenLDAP --enable-crypt
1575         # Check whether --enable-crypt or --disable-crypt was given.
1576 if test "${enable_crypt+set}" = set; then
1577   enableval="$enable_crypt"
1578   
1579         ol_arg=invalid
1580         for ol_val in auto yes no ; do
1581                 if test "$enableval" = "$ol_val" ; then
1582                         ol_arg="$ol_val"
1583                 fi
1584         done
1585         if test "$ol_arg" = "invalid" ; then
1586                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1587         fi
1588         ol_enable_crypt="$ol_arg"
1589
1590 else
1591         ol_enable_crypt="auto"
1592 fi
1593 # end --enable-crypt
1594 # OpenLDAP --enable-kpasswd
1595         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1596 if test "${enable_kpasswd+set}" = set; then
1597   enableval="$enable_kpasswd"
1598   
1599         ol_arg=invalid
1600         for ol_val in auto yes no ; do
1601                 if test "$enableval" = "$ol_val" ; then
1602                         ol_arg="$ol_val"
1603                 fi
1604         done
1605         if test "$ol_arg" = "invalid" ; then
1606                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1607         fi
1608         ol_enable_kpasswd="$ol_arg"
1609
1610 else
1611         ol_enable_kpasswd="no"
1612 fi
1613 # end --enable-kpasswd
1614 # OpenLDAP --enable-spasswd
1615         # Check whether --enable-spasswd or --disable-spasswd was given.
1616 if test "${enable_spasswd+set}" = set; then
1617   enableval="$enable_spasswd"
1618   
1619         ol_arg=invalid
1620         for ol_val in auto yes no ; do
1621                 if test "$enableval" = "$ol_val" ; then
1622                         ol_arg="$ol_val"
1623                 fi
1624         done
1625         if test "$ol_arg" = "invalid" ; then
1626                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1627         fi
1628         ol_enable_spasswd="$ol_arg"
1629
1630 else
1631         ol_enable_spasswd="no"
1632 fi
1633 # end --enable-spasswd
1634 # OpenLDAP --enable-modules
1635         # Check whether --enable-modules or --disable-modules was given.
1636 if test "${enable_modules+set}" = set; then
1637   enableval="$enable_modules"
1638   
1639         ol_arg=invalid
1640         for ol_val in auto yes no ; do
1641                 if test "$enableval" = "$ol_val" ; then
1642                         ol_arg="$ol_val"
1643                 fi
1644         done
1645         if test "$ol_arg" = "invalid" ; then
1646                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1647         fi
1648         ol_enable_modules="$ol_arg"
1649
1650 else
1651         ol_enable_modules="no"
1652 fi
1653 # end --enable-modules
1654 # OpenLDAP --enable-phonetic
1655         # Check whether --enable-phonetic or --disable-phonetic was given.
1656 if test "${enable_phonetic+set}" = set; then
1657   enableval="$enable_phonetic"
1658   
1659         ol_arg=invalid
1660         for ol_val in auto yes no ; do
1661                 if test "$enableval" = "$ol_val" ; then
1662                         ol_arg="$ol_val"
1663                 fi
1664         done
1665         if test "$ol_arg" = "invalid" ; then
1666                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1667         fi
1668         ol_enable_phonetic="$ol_arg"
1669
1670 else
1671         ol_enable_phonetic="no"
1672 fi
1673 # end --enable-phonetic
1674 # OpenLDAP --enable-rlookups
1675         # Check whether --enable-rlookups or --disable-rlookups was given.
1676 if test "${enable_rlookups+set}" = set; then
1677   enableval="$enable_rlookups"
1678   
1679         ol_arg=invalid
1680         for ol_val in auto yes no ; do
1681                 if test "$enableval" = "$ol_val" ; then
1682                         ol_arg="$ol_val"
1683                 fi
1684         done
1685         if test "$ol_arg" = "invalid" ; then
1686                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1687         fi
1688         ol_enable_rlookups="$ol_arg"
1689
1690 else
1691         ol_enable_rlookups="no"
1692 fi
1693 # end --enable-rlookups
1694 # OpenLDAP --enable-aci
1695         # Check whether --enable-aci or --disable-aci was given.
1696 if test "${enable_aci+set}" = set; then
1697   enableval="$enable_aci"
1698   
1699         ol_arg=invalid
1700         for ol_val in auto yes no ; do
1701                 if test "$enableval" = "$ol_val" ; then
1702                         ol_arg="$ol_val"
1703                 fi
1704         done
1705         if test "$ol_arg" = "invalid" ; then
1706                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1707         fi
1708         ol_enable_aci="$ol_arg"
1709
1710 else
1711         ol_enable_aci="no"
1712 fi
1713 # end --enable-aci
1714 # OpenLDAP --enable-wrappers
1715         # Check whether --enable-wrappers or --disable-wrappers was given.
1716 if test "${enable_wrappers+set}" = set; then
1717   enableval="$enable_wrappers"
1718   
1719         ol_arg=invalid
1720         for ol_val in auto yes no ; do
1721                 if test "$enableval" = "$ol_val" ; then
1722                         ol_arg="$ol_val"
1723                 fi
1724         done
1725         if test "$ol_arg" = "invalid" ; then
1726                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1727         fi
1728         ol_enable_wrappers="$ol_arg"
1729
1730 else
1731         ol_enable_wrappers="no"
1732 fi
1733 # end --enable-wrappers
1734 # OpenLDAP --enable-dynamic
1735         # Check whether --enable-dynamic or --disable-dynamic was given.
1736 if test "${enable_dynamic+set}" = set; then
1737   enableval="$enable_dynamic"
1738   
1739         ol_arg=invalid
1740         for ol_val in auto yes no ; do
1741                 if test "$enableval" = "$ol_val" ; then
1742                         ol_arg="$ol_val"
1743                 fi
1744         done
1745         if test "$ol_arg" = "invalid" ; then
1746                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1747         fi
1748         ol_enable_dynamic="$ol_arg"
1749
1750 else
1751         ol_enable_dynamic="no"
1752 fi
1753 # end --enable-dynamic
1754
1755 # OpenLDAP --enable-bdb
1756         # Check whether --enable-bdb or --disable-bdb was given.
1757 if test "${enable_bdb+set}" = set; then
1758   enableval="$enable_bdb"
1759   
1760         ol_arg=invalid
1761         for ol_val in auto yes no ; do
1762                 if test "$enableval" = "$ol_val" ; then
1763                         ol_arg="$ol_val"
1764                 fi
1765         done
1766         if test "$ol_arg" = "invalid" ; then
1767                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1768         fi
1769         ol_enable_bdb="$ol_arg"
1770
1771 else
1772         ol_enable_bdb="no"
1773 fi
1774 # end --enable-bdb
1775 # OpenLDAP --with-bdb_module
1776         # Check whether --with-bdb_module or --without-bdb_module was given.
1777 if test "${with_bdb_module+set}" = set; then
1778   withval="$with_bdb_module"
1779   
1780         ol_arg=invalid
1781         for ol_val in static dynamic ; do
1782                 if test "$withval" = "$ol_val" ; then
1783                         ol_arg="$ol_val"
1784                 fi
1785         done
1786         if test "$ol_arg" = "invalid" ; then
1787                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1788         fi
1789         ol_with_bdb_module="$ol_arg"
1790
1791 else
1792         ol_with_bdb_module="static"
1793 fi
1794 # end --with-bdb_module
1795
1796 # OpenLDAP --enable-dnssrv
1797         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1798 if test "${enable_dnssrv+set}" = set; then
1799   enableval="$enable_dnssrv"
1800   
1801         ol_arg=invalid
1802         for ol_val in auto yes no ; do
1803                 if test "$enableval" = "$ol_val" ; then
1804                         ol_arg="$ol_val"
1805                 fi
1806         done
1807         if test "$ol_arg" = "invalid" ; then
1808                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1809         fi
1810         ol_enable_dnssrv="$ol_arg"
1811
1812 else
1813         ol_enable_dnssrv="no"
1814 fi
1815 # end --enable-dnssrv
1816 # OpenLDAP --with-dnssrv_module
1817         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1818 if test "${with_dnssrv_module+set}" = set; then
1819   withval="$with_dnssrv_module"
1820   
1821         ol_arg=invalid
1822         for ol_val in static dynamic ; do
1823                 if test "$withval" = "$ol_val" ; then
1824                         ol_arg="$ol_val"
1825                 fi
1826         done
1827         if test "$ol_arg" = "invalid" ; then
1828                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1829         fi
1830         ol_with_dnssrv_module="$ol_arg"
1831
1832 else
1833         ol_with_dnssrv_module="static"
1834 fi
1835 # end --with-dnssrv_module
1836
1837 # OpenLDAP --enable-ldap
1838         # Check whether --enable-ldap or --disable-ldap was given.
1839 if test "${enable_ldap+set}" = set; then
1840   enableval="$enable_ldap"
1841   
1842         ol_arg=invalid
1843         for ol_val in auto yes no ; do
1844                 if test "$enableval" = "$ol_val" ; then
1845                         ol_arg="$ol_val"
1846                 fi
1847         done
1848         if test "$ol_arg" = "invalid" ; then
1849                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1850         fi
1851         ol_enable_ldap="$ol_arg"
1852
1853 else
1854         ol_enable_ldap="no"
1855 fi
1856 # end --enable-ldap
1857 # OpenLDAP --with-ldap_module
1858         # Check whether --with-ldap_module or --without-ldap_module was given.
1859 if test "${with_ldap_module+set}" = set; then
1860   withval="$with_ldap_module"
1861   
1862         ol_arg=invalid
1863         for ol_val in static dynamic ; do
1864                 if test "$withval" = "$ol_val" ; then
1865                         ol_arg="$ol_val"
1866                 fi
1867         done
1868         if test "$ol_arg" = "invalid" ; then
1869                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1870         fi
1871         ol_with_ldap_module="$ol_arg"
1872
1873 else
1874         ol_with_ldap_module="static"
1875 fi
1876 # end --with-ldap_module
1877
1878 # OpenLDAP --enable-ldbm
1879         # Check whether --enable-ldbm or --disable-ldbm was given.
1880 if test "${enable_ldbm+set}" = set; then
1881   enableval="$enable_ldbm"
1882   
1883         ol_arg=invalid
1884         for ol_val in auto yes no ; do
1885                 if test "$enableval" = "$ol_val" ; then
1886                         ol_arg="$ol_val"
1887                 fi
1888         done
1889         if test "$ol_arg" = "invalid" ; then
1890                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1891         fi
1892         ol_enable_ldbm="$ol_arg"
1893
1894 else
1895         ol_enable_ldbm="yes"
1896 fi
1897 # end --enable-ldbm
1898 # OpenLDAP --with-ldbm_api
1899         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1900 if test "${with_ldbm_api+set}" = set; then
1901   withval="$with_ldbm_api"
1902   
1903         ol_arg=invalid
1904         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1905                 if test "$withval" = "$ol_val" ; then
1906                         ol_arg="$ol_val"
1907                 fi
1908         done
1909         if test "$ol_arg" = "invalid" ; then
1910                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1911         fi
1912         ol_with_ldbm_api="$ol_arg"
1913
1914 else
1915         ol_with_ldbm_api="auto"
1916 fi
1917 # end --with-ldbm_api
1918
1919 # OpenLDAP --with-ldbm_module
1920         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1921 if test "${with_ldbm_module+set}" = set; then
1922   withval="$with_ldbm_module"
1923   
1924         ol_arg=invalid
1925         for ol_val in static dynamic ; do
1926                 if test "$withval" = "$ol_val" ; then
1927                         ol_arg="$ol_val"
1928                 fi
1929         done
1930         if test "$ol_arg" = "invalid" ; then
1931                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1932         fi
1933         ol_with_ldbm_module="$ol_arg"
1934
1935 else
1936         ol_with_ldbm_module="static"
1937 fi
1938 # end --with-ldbm_module
1939
1940 # OpenLDAP --with-ldbm_type
1941         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1942 if test "${with_ldbm_type+set}" = set; then
1943   withval="$with_ldbm_type"
1944   
1945         ol_arg=invalid
1946         for ol_val in auto btree hash ; do
1947                 if test "$withval" = "$ol_val" ; then
1948                         ol_arg="$ol_val"
1949                 fi
1950         done
1951         if test "$ol_arg" = "invalid" ; then
1952                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1953         fi
1954         ol_with_ldbm_type="$ol_arg"
1955
1956 else
1957         ol_with_ldbm_type="auto"
1958 fi
1959 # end --with-ldbm_type
1960
1961 # OpenLDAP --enable-passwd
1962         # Check whether --enable-passwd or --disable-passwd was given.
1963 if test "${enable_passwd+set}" = set; then
1964   enableval="$enable_passwd"
1965   
1966         ol_arg=invalid
1967         for ol_val in auto yes no ; do
1968                 if test "$enableval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1974         fi
1975         ol_enable_passwd="$ol_arg"
1976
1977 else
1978         ol_enable_passwd="no"
1979 fi
1980 # end --enable-passwd
1981 # OpenLDAP --with-passwd_module
1982         # Check whether --with-passwd_module or --without-passwd_module was given.
1983 if test "${with_passwd_module+set}" = set; then
1984   withval="$with_passwd_module"
1985   
1986         ol_arg=invalid
1987         for ol_val in static dynamic ; do
1988                 if test "$withval" = "$ol_val" ; then
1989                         ol_arg="$ol_val"
1990                 fi
1991         done
1992         if test "$ol_arg" = "invalid" ; then
1993                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1994         fi
1995         ol_with_passwd_module="$ol_arg"
1996
1997 else
1998         ol_with_passwd_module="static"
1999 fi
2000 # end --with-passwd_module
2001
2002 # OpenLDAP --enable-perl
2003         # Check whether --enable-perl or --disable-perl was given.
2004 if test "${enable_perl+set}" = set; then
2005   enableval="$enable_perl"
2006   
2007         ol_arg=invalid
2008         for ol_val in auto yes no ; do
2009                 if test "$enableval" = "$ol_val" ; then
2010                         ol_arg="$ol_val"
2011                 fi
2012         done
2013         if test "$ol_arg" = "invalid" ; then
2014                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2015         fi
2016         ol_enable_perl="$ol_arg"
2017
2018 else
2019         ol_enable_perl="no"
2020 fi
2021 # end --enable-perl
2022 # OpenLDAP --with-perl_module
2023         # Check whether --with-perl_module or --without-perl_module was given.
2024 if test "${with_perl_module+set}" = set; then
2025   withval="$with_perl_module"
2026   
2027         ol_arg=invalid
2028         for ol_val in static dynamic ; do
2029                 if test "$withval" = "$ol_val" ; then
2030                         ol_arg="$ol_val"
2031                 fi
2032         done
2033         if test "$ol_arg" = "invalid" ; then
2034                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2035         fi
2036         ol_with_perl_module="$ol_arg"
2037
2038 else
2039         ol_with_perl_module="static"
2040 fi
2041 # end --with-perl_module
2042
2043 # OpenLDAP --enable-shell
2044         # Check whether --enable-shell or --disable-shell was given.
2045 if test "${enable_shell+set}" = set; then
2046   enableval="$enable_shell"
2047   
2048         ol_arg=invalid
2049         for ol_val in auto yes no ; do
2050                 if test "$enableval" = "$ol_val" ; then
2051                         ol_arg="$ol_val"
2052                 fi
2053         done
2054         if test "$ol_arg" = "invalid" ; then
2055                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2056         fi
2057         ol_enable_shell="$ol_arg"
2058
2059 else
2060         ol_enable_shell="no"
2061 fi
2062 # end --enable-shell
2063 # OpenLDAP --with-shell_module
2064         # Check whether --with-shell_module or --without-shell_module was given.
2065 if test "${with_shell_module+set}" = set; then
2066   withval="$with_shell_module"
2067   
2068         ol_arg=invalid
2069         for ol_val in static dynamic ; do
2070                 if test "$withval" = "$ol_val" ; then
2071                         ol_arg="$ol_val"
2072                 fi
2073         done
2074         if test "$ol_arg" = "invalid" ; then
2075                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2076         fi
2077         ol_with_shell_module="$ol_arg"
2078
2079 else
2080         ol_with_shell_module="static"
2081 fi
2082 # end --with-shell_module
2083
2084 # OpenLDAP --enable-sql
2085         # Check whether --enable-sql or --disable-sql was given.
2086 if test "${enable_sql+set}" = set; then
2087   enableval="$enable_sql"
2088   
2089         ol_arg=invalid
2090         for ol_val in auto yes no ; do
2091                 if test "$enableval" = "$ol_val" ; then
2092                         ol_arg="$ol_val"
2093                 fi
2094         done
2095         if test "$ol_arg" = "invalid" ; then
2096                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2097         fi
2098         ol_enable_sql="$ol_arg"
2099
2100 else
2101         ol_enable_sql="no"
2102 fi
2103 # end --enable-sql
2104 # OpenLDAP --with-sql_module
2105         # Check whether --with-sql_module or --without-sql_module was given.
2106 if test "${with_sql_module+set}" = set; then
2107   withval="$with_sql_module"
2108   
2109         ol_arg=invalid
2110         for ol_val in static dynamic ; do
2111                 if test "$withval" = "$ol_val" ; then
2112                         ol_arg="$ol_val"
2113                 fi
2114         done
2115         if test "$ol_arg" = "invalid" ; then
2116                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2117         fi
2118         ol_with_sql_module="$ol_arg"
2119
2120 else
2121         ol_with_sql_module="static"
2122 fi
2123 # end --with-sql_module
2124
2125 # OpenLDAP --enable-tcl
2126         # Check whether --enable-tcl or --disable-tcl was given.
2127 if test "${enable_tcl+set}" = set; then
2128   enableval="$enable_tcl"
2129   
2130         ol_arg=invalid
2131         for ol_val in auto yes no ; do
2132                 if test "$enableval" = "$ol_val" ; then
2133                         ol_arg="$ol_val"
2134                 fi
2135         done
2136         if test "$ol_arg" = "invalid" ; then
2137                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2138         fi
2139         ol_enable_tcl="$ol_arg"
2140
2141 else
2142         ol_enable_tcl="no"
2143 fi
2144 # end --enable-tcl
2145 # OpenLDAP --with-tcl_module
2146         # Check whether --with-tcl_module or --without-tcl_module was given.
2147 if test "${with_tcl_module+set}" = set; then
2148   withval="$with_tcl_module"
2149   
2150         ol_arg=invalid
2151         for ol_val in static dynamic ; do
2152                 if test "$withval" = "$ol_val" ; then
2153                         ol_arg="$ol_val"
2154                 fi
2155         done
2156         if test "$ol_arg" = "invalid" ; then
2157                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2158         fi
2159         ol_with_tcl_module="$ol_arg"
2160
2161 else
2162         ol_with_tcl_module="static"
2163 fi
2164 # end --with-tcl_module
2165
2166
2167 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2168 if test "${with_xxslurpdoptions+set}" = set; then
2169   withval="$with_xxslurpdoptions"
2170   :
2171 fi
2172
2173 # OpenLDAP --enable-slurpd
2174         # Check whether --enable-slurpd or --disable-slurpd was given.
2175 if test "${enable_slurpd+set}" = set; then
2176   enableval="$enable_slurpd"
2177   
2178         ol_arg=invalid
2179         for ol_val in auto yes no ; do
2180                 if test "$enableval" = "$ol_val" ; then
2181                         ol_arg="$ol_val"
2182                 fi
2183         done
2184         if test "$ol_arg" = "invalid" ; then
2185                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2186         fi
2187         ol_enable_slurpd="$ol_arg"
2188
2189 else
2190         ol_enable_slurpd="auto"
2191 fi
2192 # end --enable-slurpd
2193
2194 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2195 if test "${with_xxliboptions+set}" = set; then
2196   withval="$with_xxliboptions"
2197   :
2198 fi
2199
2200 # Check whether --enable-static or --disable-static was given.
2201 if test "${enable_static+set}" = set; then
2202   enableval="$enable_static"
2203   p=${PACKAGE-default}
2204 case "$enableval" in
2205 yes) enable_static=yes ;;
2206 no) enable_static=no ;;
2207 *)
2208   enable_static=no
2209   # Look at the argument we got.  We use all the common list separators.
2210   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2211   for pkg in $enableval; do
2212     if test "X$pkg" = "X$p"; then
2213       enable_static=yes
2214     fi
2215   done
2216   IFS="$ac_save_ifs"
2217   ;;
2218 esac
2219 else
2220   enable_static=yes
2221 fi
2222
2223 # Check whether --enable-shared or --disable-shared was given.
2224 if test "${enable_shared+set}" = set; then
2225   enableval="$enable_shared"
2226   p=${PACKAGE-default}
2227 case "$enableval" in
2228 yes) enable_shared=yes ;;
2229 no) enable_shared=no ;;
2230 *)
2231   enable_shared=no
2232   # Look at the argument we got.  We use all the common list separators.
2233   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2234   for pkg in $enableval; do
2235     if test "X$pkg" = "X$p"; then
2236       enable_shared=yes
2237     fi
2238   done
2239   IFS="$ac_save_ifs"
2240   ;;
2241 esac
2242 else
2243   enable_shared=yes
2244 fi
2245
2246
2247
2248 # validate options
2249 if test $ol_enable_slapd = no ; then
2250                 if test $ol_enable_bdb = yes ; then
2251                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2252         fi
2253         if test $ol_enable_dnssrv = yes ; then
2254                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2255         fi
2256         if test $ol_enable_ldap = yes ; then
2257                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2258         fi
2259         if test $ol_enable_ldbm = yes ; then
2260                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2261         fi
2262         if test $ol_enable_passwd = yes ; then
2263                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2264         fi
2265         if test $ol_enable_perl = yes ; then
2266                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2267         fi
2268         if test $ol_enable_shell = yes ; then
2269                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2270         fi
2271         if test $ol_enable_tcl = yes ; then
2272                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2273         fi
2274         if test $ol_enable_sql = yes ; then
2275                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2276         fi
2277         if test $ol_enable_modules = yes ; then
2278                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2279         fi
2280         if test $ol_enable_wrappers = yes ; then
2281                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2282         fi
2283         if test $ol_enable_phonetic = yes ; then
2284                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2285         fi
2286         if test $ol_enable_rlookups = yes ; then
2287                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2288         fi
2289         if test $ol_enable_aci = yes ; then
2290                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2291         fi
2292         if test $ol_with_ldbm_api != auto ; then
2293                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2294         fi
2295         if test $ol_with_ldbm_type != auto ; then
2296                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2297         fi
2298         if test $ol_with_bdb_module != static ; then
2299                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2300         fi
2301         if test $ol_with_dnssrv_module != static ; then
2302                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2303         fi
2304         if test $ol_with_ldap_module != static ; then
2305                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2306         fi
2307         if test $ol_with_ldbm_module != static ; then
2308                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2309         fi
2310         if test $ol_with_passwd_module != static ; then
2311                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2312         fi
2313         if test $ol_with_perl_module != static ; then
2314                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2315         fi
2316         if test $ol_with_shell_module != static ; then
2317                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2318         fi
2319         if test $ol_with_tcl_module != static ; then
2320                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2321         fi
2322         if test $ol_with_sql_module != static ; then
2323                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2324         fi
2325         if test $ol_enable_slurpd = yes ; then
2326                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2327         fi
2328
2329         # force settings to no
2330         ol_enable_bdb=no
2331         ol_enable_dnssrv=no
2332         ol_enable_ldap=no
2333         ol_enable_ldbm=no
2334         ol_enable_passwd=no
2335         ol_enable_perl=no
2336         ol_enable_shell=no
2337         ol_enable_tcl=no
2338         ol_enable_sql=no
2339
2340         ol_enable_modules=no
2341         ol_enable_phonetic=no
2342         ol_enable_rlookups=no
2343         ol_enable_aci=no
2344         ol_enable_wrappers=no
2345         ol_enable_dynamic=no
2346
2347         ol_with_ldbm_api=no
2348         ol_with_ldbm_type=no
2349
2350         ol_with_bdb_module=static
2351         ol_with_dnssrv_module=static
2352         ol_with_ldap_module=static
2353         ol_with_ldbm_module=static
2354         ol_with_passwd_module=static
2355         ol_with_perl_module=static
2356         ol_with_shell_module=static
2357         ol_with_tcl_module=static
2358         ol_with_sql_module=static
2359
2360         ol_enable_slurpd=no
2361
2362 elif test $ol_enable_ldbm = no ; then
2363         
2364         if test $ol_with_ldbm_api != auto ; then
2365                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2366         fi
2367
2368         if test $ol_with_ldbm_type != auto ; then
2369                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2370         fi
2371
2372         if test $ol_with_ldbm_module != static ; then
2373                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2374         fi
2375
2376         if test $ol_enable_modules != yes -a \
2377                 $ol_enable_bdb = no -a \
2378                 $ol_enable_dnssrv = no -a \
2379                 $ol_enable_ldap = no -a \
2380                 $ol_enable_passwd = no -a \
2381                 $ol_enable_perl = no -a \
2382                 $ol_enable_shell = no -a \
2383                 $ol_enable_sql = no -a \
2384                 $ol_enable_tcl = no ; then
2385                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2386         fi
2387
2388         ol_with_ldbm_api=no
2389         ol_with_ldbm_type=no
2390         ol_with_ldbm_module=static
2391
2392 else
2393                 if test $ol_with_ldbm_api = gdbm -a \
2394                 $ol_with_ldbm_type = btree ; then
2395                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2396         fi
2397         if test $ol_with_ldbm_api = mdbm -a \
2398                 $ol_with_ldbm_type = btree ; then
2399                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2400         fi
2401         if test $ol_with_ldbm_api = ndbm -a \
2402                 $ol_with_ldbm_type = btree ; then
2403                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2404         fi
2405 fi
2406
2407 if test $ol_enable_slurpd = yes ; then
2408                 if test $ol_with_threads = no ; then
2409                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2410         fi
2411 fi
2412
2413 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2414         if test $ol_with_kerberos = no ; then
2415                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2416         fi
2417         ol_with_kerberos=yes
2418 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2419         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2420                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2421         fi
2422         ol_with_kerberos=no
2423 fi
2424
2425 if test $ol_enable_spasswd = yes ; then
2426         if test $ol_with_cyrus_sasl = no ; then
2427                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2428         fi
2429         ol_with_cyrus_sasl=yes
2430 fi
2431
2432 echo "$ac_t""done" 1>&6
2433
2434 LDAP_LIBS=
2435 LDIF_LIBS=
2436 LDBM_LIBS=
2437 LTHREAD_LIBS=
2438 LUTIL_LIBS=
2439
2440 SLAPD_LIBS=
2441 SLURPD_LIBS=
2442
2443 BUILD_SLAPD=no
2444 BUILD_SLURPD=no
2445
2446 BUILD_THREAD=no
2447
2448 BUILD_BDB=no
2449 BUILD_DNSSRV=no
2450 BUILD_LDAP=no
2451 BUILD_LDBM=no
2452 BUILD_PASSWD=no
2453 BUILD_PERL=no
2454 BUILD_SHELL=no
2455 BUILD_SQL=no
2456 BUILD_TCL=no
2457
2458 BUILD_BDB_DYNAMIC=static
2459 BUILD_DNSSRV_DYNAMIC=static
2460 BUILD_LDAP_DYNAMIC=static
2461 BUILD_LDBM_DYNAMIC=static
2462 BUILD_PASSWD_DYNAMIC=static
2463 BUILD_PERL_DYNAMIC=static
2464 BUILD_SHELL_DYNAMIC=static
2465 BUILD_TCL_DYNAMIC=static
2466 BUILD_SQL_DYNAMIC=static
2467
2468 SLAPD_MODULES_LDFLAGS=
2469 SLAPD_MODULES_CPPFLAGS=
2470 SLAPD_MODULES_LIST=
2471
2472 SLAPD_PERL_LDFLAGS=
2473 MOD_PERL_LDFLAGS=
2474 PERL_CPPFLAGS=
2475
2476 SLAPD_SQL_LDFLAGS=
2477 SLAPD_SQL_LIBS=
2478 SLAPD_SQL_INCLUDES=
2479
2480 MOD_TCL_LIB=
2481 KRB4_LIBS=
2482 KRB5_LIBS=
2483 READLINE_LIBS=
2484 SASL_LIBS=
2485 TERMCAP_LIBS=
2486 TLS_LIBS=
2487 MODULES_LIBS=
2488 AUTH_LIBS=
2489
2490
2491
2492 cat >> confdefs.h <<\EOF
2493 #define HAVE_MKVERSION 1
2494 EOF
2495
2496
2497
2498
2499 ol_aix_threads=no
2500 case "$target" in
2501 *-*-aix*)       if test -z "$CC" ; then
2502                 case "$ol_with_threads" in
2503                 auto | yes |  posix) ol_aix_threads=yes ;;
2504                 esac
2505         fi
2506 ;;
2507 esac
2508
2509 if test $ol_aix_threads = yes ; then
2510         if test -z "${CC}" ; then
2511                 for ac_prog in cc_r xlc_r cc
2512 do
2513 # Extract the first word of "$ac_prog", so it can be a program name with args.
2514 set dummy $ac_prog; ac_word=$2
2515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2516 echo "configure:2517: checking for $ac_word" >&5
2517 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2518   echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520   if test -n "$CC"; then
2521   ac_cv_prog_CC="$CC" # Let the user override the test.
2522 else
2523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2524   ac_dummy="$PATH"
2525   for ac_dir in $ac_dummy; do
2526     test -z "$ac_dir" && ac_dir=.
2527     if test -f $ac_dir/$ac_word; then
2528       ac_cv_prog_CC="$ac_prog"
2529       break
2530     fi
2531   done
2532   IFS="$ac_save_ifs"
2533 fi
2534 fi
2535 CC="$ac_cv_prog_CC"
2536 if test -n "$CC"; then
2537   echo "$ac_t""$CC" 1>&6
2538 else
2539   echo "$ac_t""no" 1>&6
2540 fi
2541
2542 test -n "$CC" && break
2543 done
2544
2545
2546                 if test "$CC" = cc ; then
2547                                                 if test $ol_with_threads != auto ; then
2548                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2549                         else
2550                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2551                         fi
2552                         ol_with_threads=no
2553                 fi
2554         fi
2555
2556         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2557                 ol_with_threads=posix
2558                 ol_cv_pthread_create=yes
2559         fi
2560 fi
2561
2562 if test -z "${CC}"; then
2563         for ac_prog in cc
2564 do
2565 # Extract the first word of "$ac_prog", so it can be a program name with args.
2566 set dummy $ac_prog; ac_word=$2
2567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2568 echo "configure:2569: checking for $ac_word" >&5
2569 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2570   echo $ac_n "(cached) $ac_c" 1>&6
2571 else
2572   if test -n "$CC"; then
2573   ac_cv_prog_CC="$CC" # Let the user override the test.
2574 else
2575   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2576   ac_dummy="$PATH"
2577   for ac_dir in $ac_dummy; do
2578     test -z "$ac_dir" && ac_dir=.
2579     if test -f $ac_dir/$ac_word; then
2580       ac_cv_prog_CC="$ac_prog"
2581       break
2582     fi
2583   done
2584   IFS="$ac_save_ifs"
2585 fi
2586 fi
2587 CC="$ac_cv_prog_CC"
2588 if test -n "$CC"; then
2589   echo "$ac_t""$CC" 1>&6
2590 else
2591   echo "$ac_t""no" 1>&6
2592 fi
2593
2594 test -n "$CC" && break
2595 done
2596
2597 fi
2598
2599
2600
2601
2602 # Check whether --enable-fast-install or --disable-fast-install was given.
2603 if test "${enable_fast_install+set}" = set; then
2604   enableval="$enable_fast_install"
2605   p=${PACKAGE-default}
2606 case "$enableval" in
2607 yes) enable_fast_install=yes ;;
2608 no) enable_fast_install=no ;;
2609 *)
2610   enable_fast_install=no
2611   # Look at the argument we got.  We use all the common list separators.
2612   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2613   for pkg in $enableval; do
2614     if test "X$pkg" = "X$p"; then
2615       enable_fast_install=yes
2616     fi
2617   done
2618   IFS="$ac_save_ifs"
2619   ;;
2620 esac
2621 else
2622   enable_fast_install=yes
2623 fi
2624
2625 # Extract the first word of "ranlib", so it can be a program name with args.
2626 set dummy ranlib; ac_word=$2
2627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2628 echo "configure:2629: checking for $ac_word" >&5
2629 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2630   echo $ac_n "(cached) $ac_c" 1>&6
2631 else
2632   if test -n "$RANLIB"; then
2633   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2634 else
2635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2636   ac_dummy="$PATH"
2637   for ac_dir in $ac_dummy; do
2638     test -z "$ac_dir" && ac_dir=.
2639     if test -f $ac_dir/$ac_word; then
2640       ac_cv_prog_RANLIB="ranlib"
2641       break
2642     fi
2643   done
2644   IFS="$ac_save_ifs"
2645   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2646 fi
2647 fi
2648 RANLIB="$ac_cv_prog_RANLIB"
2649 if test -n "$RANLIB"; then
2650   echo "$ac_t""$RANLIB" 1>&6
2651 else
2652   echo "$ac_t""no" 1>&6
2653 fi
2654
2655 # Extract the first word of "gcc", so it can be a program name with args.
2656 set dummy gcc; ac_word=$2
2657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2658 echo "configure:2659: checking for $ac_word" >&5
2659 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2660   echo $ac_n "(cached) $ac_c" 1>&6
2661 else
2662   if test -n "$CC"; then
2663   ac_cv_prog_CC="$CC" # Let the user override the test.
2664 else
2665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2666   ac_dummy="$PATH"
2667   for ac_dir in $ac_dummy; do
2668     test -z "$ac_dir" && ac_dir=.
2669     if test -f $ac_dir/$ac_word; then
2670       ac_cv_prog_CC="gcc"
2671       break
2672     fi
2673   done
2674   IFS="$ac_save_ifs"
2675 fi
2676 fi
2677 CC="$ac_cv_prog_CC"
2678 if test -n "$CC"; then
2679   echo "$ac_t""$CC" 1>&6
2680 else
2681   echo "$ac_t""no" 1>&6
2682 fi
2683
2684 if test -z "$CC"; then
2685   # Extract the first word of "cc", so it can be a program name with args.
2686 set dummy cc; ac_word=$2
2687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2688 echo "configure:2689: checking for $ac_word" >&5
2689 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2690   echo $ac_n "(cached) $ac_c" 1>&6
2691 else
2692   if test -n "$CC"; then
2693   ac_cv_prog_CC="$CC" # Let the user override the test.
2694 else
2695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2696   ac_prog_rejected=no
2697   ac_dummy="$PATH"
2698   for ac_dir in $ac_dummy; do
2699     test -z "$ac_dir" && ac_dir=.
2700     if test -f $ac_dir/$ac_word; then
2701       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2702         ac_prog_rejected=yes
2703         continue
2704       fi
2705       ac_cv_prog_CC="cc"
2706       break
2707     fi
2708   done
2709   IFS="$ac_save_ifs"
2710 if test $ac_prog_rejected = yes; then
2711   # We found a bogon in the path, so make sure we never use it.
2712   set dummy $ac_cv_prog_CC
2713   shift
2714   if test $# -gt 0; then
2715     # We chose a different compiler from the bogus one.
2716     # However, it has the same basename, so the bogon will be chosen
2717     # first if we set CC to just the basename; use the full file name.
2718     shift
2719     set dummy "$ac_dir/$ac_word" "$@"
2720     shift
2721     ac_cv_prog_CC="$@"
2722   fi
2723 fi
2724 fi
2725 fi
2726 CC="$ac_cv_prog_CC"
2727 if test -n "$CC"; then
2728   echo "$ac_t""$CC" 1>&6
2729 else
2730   echo "$ac_t""no" 1>&6
2731 fi
2732
2733   if test -z "$CC"; then
2734     case "`uname -s`" in
2735     *win32* | *WIN32* | *CYGWIN*)
2736       # Extract the first word of "cl", so it can be a program name with args.
2737 set dummy cl; ac_word=$2
2738 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2739 echo "configure:2740: checking for $ac_word" >&5
2740 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2741   echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743   if test -n "$CC"; then
2744   ac_cv_prog_CC="$CC" # Let the user override the test.
2745 else
2746   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2747   ac_dummy="$PATH"
2748   for ac_dir in $ac_dummy; do
2749     test -z "$ac_dir" && ac_dir=.
2750     if test -f $ac_dir/$ac_word; then
2751       ac_cv_prog_CC="cl"
2752       break
2753     fi
2754   done
2755   IFS="$ac_save_ifs"
2756 fi
2757 fi
2758 CC="$ac_cv_prog_CC"
2759 if test -n "$CC"; then
2760   echo "$ac_t""$CC" 1>&6
2761 else
2762   echo "$ac_t""no" 1>&6
2763 fi
2764  ;;
2765     esac
2766   fi
2767   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2768 fi
2769
2770 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2771 echo "configure:2772: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2772
2773 ac_ext=c
2774 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2775 ac_cpp='$CPP $CPPFLAGS'
2776 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2777 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2778 cross_compiling=$ac_cv_prog_cc_cross
2779
2780 cat > conftest.$ac_ext << EOF
2781
2782 #line 2783 "configure"
2783 #include "confdefs.h"
2784
2785 main(){return(0);}
2786 EOF
2787 if { (eval echo configure:2788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2788   ac_cv_prog_cc_works=yes
2789   # If we can't run a trivial program, we are probably using a cross compiler.
2790   if (./conftest; exit) 2>/dev/null; then
2791     ac_cv_prog_cc_cross=no
2792   else
2793     ac_cv_prog_cc_cross=yes
2794   fi
2795 else
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798   ac_cv_prog_cc_works=no
2799 fi
2800 rm -fr conftest*
2801 ac_ext=c
2802 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2803 ac_cpp='$CPP $CPPFLAGS'
2804 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2805 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2806 cross_compiling=$ac_cv_prog_cc_cross
2807
2808 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2809 if test $ac_cv_prog_cc_works = no; then
2810   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2811 fi
2812 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2813 echo "configure:2814: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2814 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2815 cross_compiling=$ac_cv_prog_cc_cross
2816
2817 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2818 echo "configure:2819: checking whether we are using GNU C" >&5
2819 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2820   echo $ac_n "(cached) $ac_c" 1>&6
2821 else
2822   cat > conftest.c <<EOF
2823 #ifdef __GNUC__
2824   yes;
2825 #endif
2826 EOF
2827 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2828   ac_cv_prog_gcc=yes
2829 else
2830   ac_cv_prog_gcc=no
2831 fi
2832 fi
2833
2834 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2835
2836 if test $ac_cv_prog_gcc = yes; then
2837   GCC=yes
2838 else
2839   GCC=
2840 fi
2841
2842 ac_test_CFLAGS="${CFLAGS+set}"
2843 ac_save_CFLAGS="$CFLAGS"
2844 CFLAGS=
2845 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2846 echo "configure:2847: checking whether ${CC-cc} accepts -g" >&5
2847 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2848   echo $ac_n "(cached) $ac_c" 1>&6
2849 else
2850   echo 'void f(){}' > conftest.c
2851 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2852   ac_cv_prog_cc_g=yes
2853 else
2854   ac_cv_prog_cc_g=no
2855 fi
2856 rm -f conftest*
2857
2858 fi
2859
2860 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2861 if test "$ac_test_CFLAGS" = set; then
2862   CFLAGS="$ac_save_CFLAGS"
2863 elif test $ac_cv_prog_cc_g = yes; then
2864   if test "$GCC" = yes; then
2865     CFLAGS="-g -O2"
2866   else
2867     CFLAGS="-g"
2868   fi
2869 else
2870   if test "$GCC" = yes; then
2871     CFLAGS="-O2"
2872   else
2873     CFLAGS=
2874   fi
2875 fi
2876
2877 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2878 if test "${with_gnu_ld+set}" = set; then
2879   withval="$with_gnu_ld"
2880   test "$withval" = no || with_gnu_ld=yes
2881 else
2882   with_gnu_ld=no
2883 fi
2884
2885 ac_prog=ld
2886 if test "$ac_cv_prog_gcc" = yes; then
2887   # Check if gcc -print-prog-name=ld gives a path.
2888   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2889 echo "configure:2890: checking for ld used by GCC" >&5
2890   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2891   case "$ac_prog" in
2892     # Accept absolute paths.
2893     [\\/]* | [A-Za-z]:[\\/]*)
2894       re_direlt='/[^/][^/]*/\.\./'
2895       # Canonicalize the path of ld
2896       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2897       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2898         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2899       done
2900       test -z "$LD" && LD="$ac_prog"
2901       ;;
2902   "")
2903     # If it fails, then pretend we aren't using GCC.
2904     ac_prog=ld
2905     ;;
2906   *)
2907     # If it is relative, then search for the first ld in PATH.
2908     with_gnu_ld=unknown
2909     ;;
2910   esac
2911 elif test "$with_gnu_ld" = yes; then
2912   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2913 echo "configure:2914: checking for GNU ld" >&5
2914 else
2915   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2916 echo "configure:2917: checking for non-GNU ld" >&5
2917 fi
2918 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2919   echo $ac_n "(cached) $ac_c" 1>&6
2920 else
2921   if test -z "$LD"; then
2922   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2923   for ac_dir in $PATH; do
2924     test -z "$ac_dir" && ac_dir=.
2925     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2926       ac_cv_path_LD="$ac_dir/$ac_prog"
2927       # Check to see if the program is GNU ld.  I'd rather use --version,
2928       # but apparently some GNU ld's only accept -v.
2929       # Break only if it was the GNU/non-GNU ld that we prefer.
2930       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2931         test "$with_gnu_ld" != no && break
2932       else
2933         test "$with_gnu_ld" != yes && break
2934       fi
2935     fi
2936   done
2937   IFS="$ac_save_ifs"
2938 else
2939   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2940 fi
2941 fi
2942
2943 LD="$ac_cv_path_LD"
2944 if test -n "$LD"; then
2945   echo "$ac_t""$LD" 1>&6
2946 else
2947   echo "$ac_t""no" 1>&6
2948 fi
2949 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2950 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2951 echo "configure:2952: checking if the linker ($LD) is GNU ld" >&5
2952 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2956 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2957   ac_cv_prog_gnu_ld=yes
2958 else
2959   ac_cv_prog_gnu_ld=no
2960 fi
2961 fi
2962
2963 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2964
2965
2966 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2967 echo "configure:2968: checking for BSD-compatible nm" >&5
2968 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2969   echo $ac_n "(cached) $ac_c" 1>&6
2970 else
2971   if test -n "$NM"; then
2972   # Let the user override the test.
2973   ac_cv_path_NM="$NM"
2974 else
2975   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2976   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2977     test -z "$ac_dir" && ac_dir=.
2978     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2979       # Check to see if the nm accepts a BSD-compat flag.
2980       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2981       #   nm: unknown option "B" ignored
2982       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2983         ac_cv_path_NM="$ac_dir/nm -B"
2984         break
2985       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2986         ac_cv_path_NM="$ac_dir/nm -p"
2987         break
2988       else
2989         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2990         continue # so that we can try to find one that supports BSD flags
2991       fi
2992     fi
2993   done
2994   IFS="$ac_save_ifs"
2995   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2996 fi
2997 fi
2998
2999 NM="$ac_cv_path_NM"
3000 echo "$ac_t""$NM" 1>&6
3001
3002 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3003 echo "configure:3004: checking whether ln -s works" >&5
3004 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3005   echo $ac_n "(cached) $ac_c" 1>&6
3006 else
3007   rm -f conftestdata
3008 if ln -s X conftestdata 2>/dev/null
3009 then
3010   rm -f conftestdata
3011   ac_cv_prog_LN_S="ln -s"
3012 else
3013   ac_cv_prog_LN_S=ln
3014 fi
3015 fi
3016 LN_S="$ac_cv_prog_LN_S"
3017 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3018   echo "$ac_t""yes" 1>&6
3019 else
3020   echo "$ac_t""no" 1>&6
3021 fi
3022
3023 if test $host != $build; then
3024   ac_tool_prefix=${host_alias}-
3025 else
3026   ac_tool_prefix=
3027 fi
3028
3029
3030 case "$target" in
3031 NONE) lt_target="$host" ;;
3032 *) lt_target="$target" ;;
3033 esac
3034
3035 # Check for any special flags to pass to ltconfig.
3036 libtool_flags="--cache-file=$cache_file"
3037 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3038 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3039 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3040 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3041 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3042 libtool_flags="$libtool_flags --enable-dlopen"
3043 libtool_flags="$libtool_flags --enable-win32-dll"
3044 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3045 if test "${enable_libtool_lock+set}" = set; then
3046   enableval="$enable_libtool_lock"
3047   :
3048 fi
3049
3050 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3051 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3052
3053 # Some flags need to be propagated to the compiler or linker for good
3054 # libtool support.
3055 case "$lt_target" in
3056 *-*-irix6*)
3057   # Find out which ABI we are using.
3058   echo '#line 3059 "configure"' > conftest.$ac_ext
3059   if { (eval echo configure:3060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3060     case "`/usr/bin/file conftest.o`" in
3061     *32-bit*)
3062       LD="${LD-ld} -32"
3063       ;;
3064     *N32*)
3065       LD="${LD-ld} -n32"
3066       ;;
3067     *64-bit*)
3068       LD="${LD-ld} -64"
3069       ;;
3070     esac
3071   fi
3072   rm -rf conftest*
3073   ;;
3074
3075 *-*-sco3.2v5*)
3076   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3077   SAVE_CFLAGS="$CFLAGS"
3078   CFLAGS="$CFLAGS -belf"
3079   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3080 echo "configure:3081: checking whether the C compiler needs -belf" >&5
3081 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087
3088 int main() {
3089
3090 ; return 0; }
3091 EOF
3092 if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3093   rm -rf conftest*
3094   lt_cv_cc_needs_belf=yes
3095 else
3096   echo "configure: failed program was:" >&5
3097   cat conftest.$ac_ext >&5
3098   rm -rf conftest*
3099   lt_cv_cc_needs_belf=no
3100 fi
3101 rm -f conftest*
3102 fi
3103
3104 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3105   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3106     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3107     CFLAGS="$SAVE_CFLAGS"
3108   fi
3109   ;;
3110
3111 *-*-cygwin* | *-*-mingw*)
3112   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3113 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3114 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3115 echo "configure:3116: checking for $ac_word" >&5
3116 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3117   echo $ac_n "(cached) $ac_c" 1>&6
3118 else
3119   if test -n "$DLLTOOL"; then
3120   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3121 else
3122   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3123   ac_dummy="$PATH"
3124   for ac_dir in $ac_dummy; do
3125     test -z "$ac_dir" && ac_dir=.
3126     if test -f $ac_dir/$ac_word; then
3127       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3128       break
3129     fi
3130   done
3131   IFS="$ac_save_ifs"
3132 fi
3133 fi
3134 DLLTOOL="$ac_cv_prog_DLLTOOL"
3135 if test -n "$DLLTOOL"; then
3136   echo "$ac_t""$DLLTOOL" 1>&6
3137 else
3138   echo "$ac_t""no" 1>&6
3139 fi
3140
3141
3142 if test -z "$ac_cv_prog_DLLTOOL"; then
3143 if test -n "$ac_tool_prefix"; then
3144   # Extract the first word of "dlltool", so it can be a program name with args.
3145 set dummy dlltool; ac_word=$2
3146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3147 echo "configure:3148: checking for $ac_word" >&5
3148 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   if test -n "$DLLTOOL"; then
3152   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3153 else
3154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3155   ac_dummy="$PATH"
3156   for ac_dir in $ac_dummy; do
3157     test -z "$ac_dir" && ac_dir=.
3158     if test -f $ac_dir/$ac_word; then
3159       ac_cv_prog_DLLTOOL="dlltool"
3160       break
3161     fi
3162   done
3163   IFS="$ac_save_ifs"
3164   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3165 fi
3166 fi
3167 DLLTOOL="$ac_cv_prog_DLLTOOL"
3168 if test -n "$DLLTOOL"; then
3169   echo "$ac_t""$DLLTOOL" 1>&6
3170 else
3171   echo "$ac_t""no" 1>&6
3172 fi
3173
3174 else
3175   DLLTOOL="false"
3176 fi
3177 fi
3178
3179   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3180 set dummy ${ac_tool_prefix}as; ac_word=$2
3181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3182 echo "configure:3183: checking for $ac_word" >&5
3183 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   if test -n "$AS"; then
3187   ac_cv_prog_AS="$AS" # Let the user override the test.
3188 else
3189   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3190   ac_dummy="$PATH"
3191   for ac_dir in $ac_dummy; do
3192     test -z "$ac_dir" && ac_dir=.
3193     if test -f $ac_dir/$ac_word; then
3194       ac_cv_prog_AS="${ac_tool_prefix}as"
3195       break
3196     fi
3197   done
3198   IFS="$ac_save_ifs"
3199 fi
3200 fi
3201 AS="$ac_cv_prog_AS"
3202 if test -n "$AS"; then
3203   echo "$ac_t""$AS" 1>&6
3204 else
3205   echo "$ac_t""no" 1>&6
3206 fi
3207
3208
3209 if test -z "$ac_cv_prog_AS"; then
3210 if test -n "$ac_tool_prefix"; then
3211   # Extract the first word of "as", so it can be a program name with args.
3212 set dummy as; ac_word=$2
3213 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3214 echo "configure:3215: checking for $ac_word" >&5
3215 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   if test -n "$AS"; then
3219   ac_cv_prog_AS="$AS" # Let the user override the test.
3220 else
3221   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3222   ac_dummy="$PATH"
3223   for ac_dir in $ac_dummy; do
3224     test -z "$ac_dir" && ac_dir=.
3225     if test -f $ac_dir/$ac_word; then
3226       ac_cv_prog_AS="as"
3227       break
3228     fi
3229   done
3230   IFS="$ac_save_ifs"
3231   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3232 fi
3233 fi
3234 AS="$ac_cv_prog_AS"
3235 if test -n "$AS"; then
3236   echo "$ac_t""$AS" 1>&6
3237 else
3238   echo "$ac_t""no" 1>&6
3239 fi
3240
3241 else
3242   AS="false"
3243 fi
3244 fi
3245
3246   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3247 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3248 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3249 echo "configure:3250: checking for $ac_word" >&5
3250 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3251   echo $ac_n "(cached) $ac_c" 1>&6
3252 else
3253   if test -n "$OBJDUMP"; then
3254   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3255 else
3256   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3257   ac_dummy="$PATH"
3258   for ac_dir in $ac_dummy; do
3259     test -z "$ac_dir" && ac_dir=.
3260     if test -f $ac_dir/$ac_word; then
3261       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3262       break
3263     fi
3264   done
3265   IFS="$ac_save_ifs"
3266 fi
3267 fi
3268 OBJDUMP="$ac_cv_prog_OBJDUMP"
3269 if test -n "$OBJDUMP"; then
3270   echo "$ac_t""$OBJDUMP" 1>&6
3271 else
3272   echo "$ac_t""no" 1>&6
3273 fi
3274
3275
3276 if test -z "$ac_cv_prog_OBJDUMP"; then
3277 if test -n "$ac_tool_prefix"; then
3278   # Extract the first word of "objdump", so it can be a program name with args.
3279 set dummy objdump; ac_word=$2
3280 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3281 echo "configure:3282: checking for $ac_word" >&5
3282 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3283   echo $ac_n "(cached) $ac_c" 1>&6
3284 else
3285   if test -n "$OBJDUMP"; then
3286   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3287 else
3288   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3289   ac_dummy="$PATH"
3290   for ac_dir in $ac_dummy; do
3291     test -z "$ac_dir" && ac_dir=.
3292     if test -f $ac_dir/$ac_word; then
3293       ac_cv_prog_OBJDUMP="objdump"
3294       break
3295     fi
3296   done
3297   IFS="$ac_save_ifs"
3298   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3299 fi
3300 fi
3301 OBJDUMP="$ac_cv_prog_OBJDUMP"
3302 if test -n "$OBJDUMP"; then
3303   echo "$ac_t""$OBJDUMP" 1>&6
3304 else
3305   echo "$ac_t""no" 1>&6
3306 fi
3307
3308 else
3309   OBJDUMP="false"
3310 fi
3311 fi
3312
3313   ;;
3314
3315 esac
3316
3317
3318 # Save cache, so that ltconfig can load it
3319
3320
3321 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3322 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3323 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3324 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3325 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3326 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3327 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3328 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3329
3330 # Reload cache, that may have been modified by ltconfig
3331
3332
3333 # This can be used to rebuild libtool when needed
3334 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3335
3336 # Always use our own libtool.
3337 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3338
3339 # Redirect the config.log output again, so that the ltconfig log is not
3340 # clobbered by the next message.
3341 exec 5>>./config.log
3342
3343
3344 for ac_prog in mawk gawk nawk awk
3345 do
3346 # Extract the first word of "$ac_prog", so it can be a program name with args.
3347 set dummy $ac_prog; ac_word=$2
3348 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3349 echo "configure:3350: checking for $ac_word" >&5
3350 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3351   echo $ac_n "(cached) $ac_c" 1>&6
3352 else
3353   if test -n "$AWK"; then
3354   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3355 else
3356   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3357   ac_dummy="$PATH"
3358   for ac_dir in $ac_dummy; do
3359     test -z "$ac_dir" && ac_dir=.
3360     if test -f $ac_dir/$ac_word; then
3361       ac_cv_prog_AWK="$ac_prog"
3362       break
3363     fi
3364   done
3365   IFS="$ac_save_ifs"
3366 fi
3367 fi
3368 AWK="$ac_cv_prog_AWK"
3369 if test -n "$AWK"; then
3370   echo "$ac_t""$AWK" 1>&6
3371 else
3372   echo "$ac_t""no" 1>&6
3373 fi
3374
3375 test -n "$AWK" && break
3376 done
3377
3378 # test for ln hardlink support
3379 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3380 echo "configure:3381: checking whether ln works" >&5
3381 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3382   echo $ac_n "(cached) $ac_c" 1>&6
3383 else
3384   rm -f conftest.src conftest.dst
3385 echo "conftest" > conftest.src
3386 if ln conftest.src conftest.dst 2>/dev/null
3387 then
3388   ol_cv_prog_LN_H="ln"
3389 else
3390   ol_cv_prog_LN_H="cp"
3391 fi
3392 rm -f conftest.src conftest.dst
3393
3394 fi
3395 LN_H="$ol_cv_prog_LN_H"
3396 if test "$ol_cv_prog_LN_H" = "ln"; then
3397         echo "$ac_t""yes" 1>&6
3398 else
3399         echo "$ac_t""no" 1>&6
3400 fi
3401
3402 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3403 echo "configure:3404: checking whether ln -s works" >&5
3404 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3405   echo $ac_n "(cached) $ac_c" 1>&6
3406 else
3407   rm -f conftestdata
3408 if ln -s X conftestdata 2>/dev/null
3409 then
3410   rm -f conftestdata
3411   ac_cv_prog_LN_S="ln -s"
3412 else
3413   ac_cv_prog_LN_S=ln
3414 fi
3415 fi
3416 LN_S="$ac_cv_prog_LN_S"
3417 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3418   echo "$ac_t""yes" 1>&6
3419 else
3420   echo "$ac_t""no" 1>&6
3421 fi
3422
3423
3424 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3425         LN_S="$LN_H"
3426 fi
3427
3428 # Extract the first word of "sendmail", so it can be a program name with args.
3429 set dummy sendmail; ac_word=$2
3430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3431 echo "configure:3432: checking for $ac_word" >&5
3432 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3433   echo $ac_n "(cached) $ac_c" 1>&6
3434 else
3435   case "$SENDMAIL" in
3436   /*)
3437   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3438   ;;
3439   ?:/*)
3440   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3441   ;;
3442   *)
3443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3444   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3445   for ac_dir in $ac_dummy; do 
3446     test -z "$ac_dir" && ac_dir=.
3447     if test -f $ac_dir/$ac_word; then
3448       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3449       break
3450     fi
3451   done
3452   IFS="$ac_save_ifs"
3453   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3454   ;;
3455 esac
3456 fi
3457 SENDMAIL="$ac_cv_path_SENDMAIL"
3458 if test -n "$SENDMAIL"; then
3459   echo "$ac_t""$SENDMAIL" 1>&6
3460 else
3461   echo "$ac_t""no" 1>&6
3462 fi
3463
3464 # Extract the first word of "vi", so it can be a program name with args.
3465 set dummy vi; ac_word=$2
3466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3467 echo "configure:3468: checking for $ac_word" >&5
3468 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3469   echo $ac_n "(cached) $ac_c" 1>&6
3470 else
3471   case "$EDITOR" in
3472   /*)
3473   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3474   ;;
3475   ?:/*)
3476   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3477   ;;
3478   *)
3479   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3480   ac_dummy="$PATH:/usr/ucb"
3481   for ac_dir in $ac_dummy; do 
3482     test -z "$ac_dir" && ac_dir=.
3483     if test -f $ac_dir/$ac_word; then
3484       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3485       break
3486     fi
3487   done
3488   IFS="$ac_save_ifs"
3489   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3490   ;;
3491 esac
3492 fi
3493 EDITOR="$ac_cv_path_EDITOR"
3494 if test -n "$EDITOR"; then
3495   echo "$ac_t""$EDITOR" 1>&6
3496 else
3497   echo "$ac_t""no" 1>&6
3498 fi
3499
3500 # Extract the first word of "finger", so it can be a program name with args.
3501 set dummy finger; ac_word=$2
3502 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3503 echo "configure:3504: checking for $ac_word" >&5
3504 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   case "$FINGER" in
3508   /*)
3509   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3510   ;;
3511   ?:/*)
3512   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3513   ;;
3514   *)
3515   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3516   ac_dummy="$PATH:/usr/ucb"
3517   for ac_dir in $ac_dummy; do 
3518     test -z "$ac_dir" && ac_dir=.
3519     if test -f $ac_dir/$ac_word; then
3520       ac_cv_path_FINGER="$ac_dir/$ac_word"
3521       break
3522     fi
3523   done
3524   IFS="$ac_save_ifs"
3525   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3526   ;;
3527 esac
3528 fi
3529 FINGER="$ac_cv_path_FINGER"
3530 if test -n "$FINGER"; then
3531   echo "$ac_t""$FINGER" 1>&6
3532 else
3533   echo "$ac_t""no" 1>&6
3534 fi
3535
3536
3537 ol_link_perl=no
3538 if test $ol_enable_perl != no ; then
3539         # Extract the first word of "perl", so it can be a program name with args.
3540 set dummy perl; ac_word=$2
3541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3542 echo "configure:3543: checking for $ac_word" >&5
3543 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   case "$PERLBIN" in
3547   /*)
3548   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3549   ;;
3550   ?:/*)
3551   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3552   ;;
3553   *)
3554   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3555   ac_dummy="$PATH"
3556   for ac_dir in $ac_dummy; do 
3557     test -z "$ac_dir" && ac_dir=.
3558     if test -f $ac_dir/$ac_word; then
3559       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3560       break
3561     fi
3562   done
3563   IFS="$ac_save_ifs"
3564   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3565   ;;
3566 esac
3567 fi
3568 PERLBIN="$ac_cv_path_PERLBIN"
3569 if test -n "$PERLBIN"; then
3570   echo "$ac_t""$PERLBIN" 1>&6
3571 else
3572   echo "$ac_t""no" 1>&6
3573 fi
3574
3575
3576         if test "no$PERLBIN" = "no" ; then
3577                 if test $ol_enable_perl = yes ; then
3578                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3579                 fi
3580
3581         else
3582                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3583                 if test x"$ol_with_perl_module" = "xstatic" ; then
3584                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3585                 else
3586                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3587                 fi
3588                                 ol_link_perl=yes
3589         fi
3590 fi
3591
3592 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3593 echo "configure:3594: checking how to run the C preprocessor" >&5
3594 # On Suns, sometimes $CPP names a directory.
3595 if test -n "$CPP" && test -d "$CPP"; then
3596   CPP=
3597 fi
3598 if test -z "$CPP"; then
3599 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3600   echo $ac_n "(cached) $ac_c" 1>&6
3601 else
3602     # This must be in double quotes, not single quotes, because CPP may get
3603   # substituted into the Makefile and "${CC-cc}" will confuse make.
3604   CPP="${CC-cc} -E"
3605   # On the NeXT, cc -E runs the code through the compiler's parser,
3606   # not just through cpp.
3607   cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 #include <assert.h>
3611 Syntax Error
3612 EOF
3613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3614 { (eval echo configure:3615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3616 if test -z "$ac_err"; then
3617   :
3618 else
3619   echo "$ac_err" >&5
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -rf conftest*
3623   CPP="${CC-cc} -E -traditional-cpp"
3624   cat > conftest.$ac_ext <<EOF
3625 #line 3626 "configure"
3626 #include "confdefs.h"
3627 #include <assert.h>
3628 Syntax Error
3629 EOF
3630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3631 { (eval echo configure:3632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3633 if test -z "$ac_err"; then
3634   :
3635 else
3636   echo "$ac_err" >&5
3637   echo "configure: failed program was:" >&5
3638   cat conftest.$ac_ext >&5
3639   rm -rf conftest*
3640   CPP="${CC-cc} -nologo -E"
3641   cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3644 #include <assert.h>
3645 Syntax Error
3646 EOF
3647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3648 { (eval echo configure:3649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3650 if test -z "$ac_err"; then
3651   :
3652 else
3653   echo "$ac_err" >&5
3654   echo "configure: failed program was:" >&5
3655   cat conftest.$ac_ext >&5
3656   rm -rf conftest*
3657   CPP=/lib/cpp
3658 fi
3659 rm -f conftest*
3660 fi
3661 rm -f conftest*
3662 fi
3663 rm -f conftest*
3664   ac_cv_prog_CPP="$CPP"
3665 fi
3666   CPP="$ac_cv_prog_CPP"
3667 else
3668   ac_cv_prog_CPP="$CPP"
3669 fi
3670 echo "$ac_t""$CPP" 1>&6
3671
3672
3673 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3674         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3675
3676 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3677         echo "configure: warning: programs compiled here do run here..." 1>&2
3678         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3679
3680 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3681         echo "configure: warning: programs compiled here do not run here..." 1>&2
3682         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3683 fi
3684
3685 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3686 echo "configure:3687: checking for AIX" >&5
3687 cat > conftest.$ac_ext <<EOF
3688 #line 3689 "configure"
3689 #include "confdefs.h"
3690 #ifdef _AIX
3691   yes
3692 #endif
3693
3694 EOF
3695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3696   egrep "yes" >/dev/null 2>&1; then
3697   rm -rf conftest*
3698   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3699 #define _ALL_SOURCE 1
3700 EOF
3701
3702 else
3703   rm -rf conftest*
3704   echo "$ac_t""no" 1>&6
3705 fi
3706 rm -f conftest*
3707
3708
3709 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3710 echo "configure:3711: checking for POSIXized ISC" >&5
3711 if test -d /etc/conf/kconfig.d &&
3712   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3713 then
3714   echo "$ac_t""yes" 1>&6
3715   ISC=yes # If later tests want to check for ISC.
3716   cat >> confdefs.h <<\EOF
3717 #define _POSIX_SOURCE 1
3718 EOF
3719
3720   if test "$GCC" = yes; then
3721     CC="$CC -posix"
3722   else
3723     CC="$CC -Xp"
3724   fi
3725 else
3726   echo "$ac_t""no" 1>&6
3727   ISC=
3728 fi
3729
3730 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3731 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3732 echo "configure:3733: checking for minix/config.h" >&5
3733 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3734   echo $ac_n "(cached) $ac_c" 1>&6
3735 else
3736   cat > conftest.$ac_ext <<EOF
3737 #line 3738 "configure"
3738 #include "confdefs.h"
3739 #include <minix/config.h>
3740 EOF
3741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3742 { (eval echo configure:3743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3744 if test -z "$ac_err"; then
3745   rm -rf conftest*
3746   eval "ac_cv_header_$ac_safe=yes"
3747 else
3748   echo "$ac_err" >&5
3749   echo "configure: failed program was:" >&5
3750   cat conftest.$ac_ext >&5
3751   rm -rf conftest*
3752   eval "ac_cv_header_$ac_safe=no"
3753 fi
3754 rm -f conftest*
3755 fi
3756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3757   echo "$ac_t""yes" 1>&6
3758   MINIX=yes
3759 else
3760   echo "$ac_t""no" 1>&6
3761 MINIX=
3762 fi
3763
3764 if test "$MINIX" = yes; then
3765   cat >> confdefs.h <<\EOF
3766 #define _POSIX_SOURCE 1
3767 EOF
3768
3769   cat >> confdefs.h <<\EOF
3770 #define _POSIX_1_SOURCE 2
3771 EOF
3772
3773   cat >> confdefs.h <<\EOF
3774 #define _MINIX 1
3775 EOF
3776
3777 fi
3778
3779
3780 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3781 echo "configure:3782: checking for Cygwin environment" >&5
3782 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788
3789 int main() {
3790
3791 #ifndef __CYGWIN__
3792 #define __CYGWIN__ __CYGWIN32__
3793 #endif
3794 return __CYGWIN__;
3795 ; return 0; }
3796 EOF
3797 if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3798   rm -rf conftest*
3799   ac_cv_cygwin=yes
3800 else
3801   echo "configure: failed program was:" >&5
3802   cat conftest.$ac_ext >&5
3803   rm -rf conftest*
3804   ac_cv_cygwin=no
3805 fi
3806 rm -f conftest*
3807 fi
3808
3809 echo "$ac_t""$ac_cv_cygwin" 1>&6
3810 CYGWIN=
3811 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3812 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3813 echo "configure:3814: checking for mingw32 environment" >&5
3814 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3815   echo $ac_n "(cached) $ac_c" 1>&6
3816 else
3817   cat > conftest.$ac_ext <<EOF
3818 #line 3819 "configure"
3819 #include "confdefs.h"
3820
3821 int main() {
3822 return __MINGW32__;
3823 ; return 0; }
3824 EOF
3825 if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3826   rm -rf conftest*
3827   ac_cv_mingw32=yes
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   ac_cv_mingw32=no
3833 fi
3834 rm -f conftest*
3835 fi
3836
3837 echo "$ac_t""$ac_cv_mingw32" 1>&6
3838 MINGW32=
3839 test "$ac_cv_mingw32" = yes && MINGW32=yes
3840 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3841 echo "configure:3842: checking for EMX OS/2 environment" >&5
3842 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3843   echo $ac_n "(cached) $ac_c" 1>&6
3844 else
3845   cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848
3849 int main() {
3850 return __EMX__;
3851 ; return 0; }
3852 EOF
3853 if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3854   rm -rf conftest*
3855   ac_cv_emxos2=yes
3856 else
3857   echo "configure: failed program was:" >&5
3858   cat conftest.$ac_ext >&5
3859   rm -rf conftest*
3860   ac_cv_emxos2=no
3861 fi
3862 rm -f conftest*
3863 fi
3864
3865 echo "$ac_t""$ac_cv_emxos2" 1>&6
3866 EMXOS2=
3867 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3868
3869
3870
3871 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3872 echo "configure:3873: checking for executable suffix" >&5
3873 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3874   echo $ac_n "(cached) $ac_c" 1>&6
3875 else
3876   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3877   ac_cv_exeext=.exe
3878 else
3879   rm -f conftest*
3880   echo 'int main () { return 0; }' > conftest.$ac_ext
3881   ac_cv_exeext=
3882   if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3883     for file in conftest.*; do
3884       case $file in
3885       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3886       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3887       esac
3888     done
3889   else
3890     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3891   fi
3892   rm -f conftest*
3893   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3894 fi
3895 fi
3896
3897 EXEEXT=""
3898 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3899 echo "$ac_t""${ac_cv_exeext}" 1>&6
3900 ac_exeext=$EXEEXT
3901
3902 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3903 echo "configure:3904: checking for object suffix" >&5
3904 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3905   echo $ac_n "(cached) $ac_c" 1>&6
3906 else
3907   rm -f conftest*
3908 echo 'int i = 1;' > conftest.$ac_ext
3909 if { (eval echo configure:3910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3910   for ac_file in conftest.*; do
3911     case $ac_file in
3912     *.c) ;;
3913     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3914     esac
3915   done
3916 else
3917   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3918 fi
3919 rm -f conftest*
3920 fi
3921
3922 echo "$ac_t""$ac_cv_objext" 1>&6
3923 OBJEXT=$ac_cv_objext
3924 ac_objext=$ac_cv_objext
3925
3926
3927 cat >> confdefs.h <<EOF
3928 #define EXEEXT "${EXEEXT}"
3929 EOF
3930
3931
3932 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3933 echo "configure:3934: checking for be_app in -lbe" >&5
3934 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3936   echo $ac_n "(cached) $ac_c" 1>&6
3937 else
3938   ac_save_LIBS="$LIBS"
3939 LIBS="-lbe -lroot -lnet $LIBS"
3940 cat > conftest.$ac_ext <<EOF
3941 #line 3942 "configure"
3942 #include "confdefs.h"
3943 /* Override any gcc2 internal prototype to avoid an error.  */
3944 /* We use char because int might match the return type of a gcc2
3945     builtin and then its argument prototype would still apply.  */
3946 char be_app();
3947
3948 int main() {
3949 be_app()
3950 ; return 0; }
3951 EOF
3952 if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3953   rm -rf conftest*
3954   eval "ac_cv_lib_$ac_lib_var=yes"
3955 else
3956   echo "configure: failed program was:" >&5
3957   cat conftest.$ac_ext >&5
3958   rm -rf conftest*
3959   eval "ac_cv_lib_$ac_lib_var=no"
3960 fi
3961 rm -f conftest*
3962 LIBS="$ac_save_LIBS"
3963
3964 fi
3965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3966   echo "$ac_t""yes" 1>&6
3967   LIBS="$LIBS -lbe -lroot -lnet"
3968 else
3969   echo "$ac_t""no" 1>&6
3970 :
3971 fi
3972
3973
3974
3975
3976
3977 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3978 echo "configure:3979: checking for ${CC-cc} option to accept ANSI C" >&5
3979 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3980   echo $ac_n "(cached) $ac_c" 1>&6
3981 else
3982   am_cv_prog_cc_stdc=no
3983 ac_save_CC="$CC"
3984 # Don't try gcc -ansi; that turns off useful extensions and
3985 # breaks some systems' header files.
3986 # AIX                   -qlanglvl=ansi
3987 # Ultrix and OSF/1      -std1
3988 # HP-UX 10.20 and later -Ae
3989 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3990 # SVR4                  -Xc -D__EXTENSIONS__
3991 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3992 do
3993   CC="$ac_save_CC $ac_arg"
3994   cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997 #include <stdarg.h>
3998 #include <stdio.h>
3999 #include <sys/types.h>
4000 #include <sys/stat.h>
4001 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4002 struct buf { int x; };
4003 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4004 static char *e (p, i)
4005      char **p;
4006      int i;
4007 {
4008   return p[i];
4009 }
4010 static char *f (char * (*g) (char **, int), char **p, ...)
4011 {
4012   char *s;
4013   va_list v;
4014   va_start (v,p);
4015   s = g (p, va_arg (v,int));
4016   va_end (v);
4017   return s;
4018 }
4019 int test (int i, double x);
4020 struct s1 {int (*f) (int a);};
4021 struct s2 {int (*f) (double a);};
4022 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4023 int argc;
4024 char **argv;
4025
4026 int main() {
4027
4028 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4029
4030 ; return 0; }
4031 EOF
4032 if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4033   rm -rf conftest*
4034   am_cv_prog_cc_stdc="$ac_arg"; break
4035 else
4036   echo "configure: failed program was:" >&5
4037   cat conftest.$ac_ext >&5
4038 fi
4039 rm -f conftest*
4040 done
4041 CC="$ac_save_CC"
4042
4043 fi
4044
4045 if test -z "$am_cv_prog_cc_stdc"; then
4046   echo "$ac_t""none needed" 1>&6
4047 else
4048   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4049 fi
4050 case "x$am_cv_prog_cc_stdc" in
4051   x|xno) ;;
4052   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4053 esac
4054
4055 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4056         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4057 fi
4058
4059 # test for make depend flag
4060 OL_MKDEP=
4061 OL_MKDEP_FLAGS=
4062 if test -z "${MKDEP}"; then
4063         OL_MKDEP="${CC-cc}"
4064         if test -z "${MKDEP_FLAGS}"; then
4065                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4066 echo "configure:4067: checking for ${OL_MKDEP} depend flag" >&5
4067 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4068   echo $ac_n "(cached) $ac_c" 1>&6
4069 else
4070   
4071                         ol_cv_mkdep=no
4072                         for flag in "-M" "-xM"; do
4073                                 cat > conftest.c <<EOF
4074  noCode;
4075 EOF
4076                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4077                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4078                                 then
4079                                         if test ! -f conftest."${ac_object}" ; then
4080                                                 ol_cv_mkdep=$flag
4081                                                 OL_MKDEP_FLAGS="$flag"
4082                                                 break
4083                                         fi
4084                                 fi
4085                         done
4086                         rm -f conftest*
4087                 
4088 fi
4089
4090 echo "$ac_t""$ol_cv_mkdep" 1>&6
4091         else
4092                 cc_cv_mkdep=yes
4093                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4094         fi
4095 else
4096         cc_cv_mkdep=yes
4097         OL_MKDEP="${MKDEP}"
4098         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4099 fi
4100
4101
4102
4103 if test "${ol_cv_mkdep}" = no ; then
4104         # this will soon become an error
4105         echo "configure: warning: do not know how to generate dependencies" 1>&2
4106 fi
4107
4108 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4109 echo "configure:4110: checking for afopen in -ls" >&5
4110 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4112   echo $ac_n "(cached) $ac_c" 1>&6
4113 else
4114   ac_save_LIBS="$LIBS"
4115 LIBS="-ls  $LIBS"
4116 cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 /* Override any gcc2 internal prototype to avoid an error.  */
4120 /* We use char because int might match the return type of a gcc2
4121     builtin and then its argument prototype would still apply.  */
4122 char afopen();
4123
4124 int main() {
4125 afopen()
4126 ; return 0; }
4127 EOF
4128 if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4129   rm -rf conftest*
4130   eval "ac_cv_lib_$ac_lib_var=yes"
4131 else
4132   echo "configure: failed program was:" >&5
4133   cat conftest.$ac_ext >&5
4134   rm -rf conftest*
4135   eval "ac_cv_lib_$ac_lib_var=no"
4136 fi
4137 rm -f conftest*
4138 LIBS="$ac_save_LIBS"
4139
4140 fi
4141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4142   echo "$ac_t""yes" 1>&6
4143   
4144         AUTH_LIBS=-ls
4145         cat >> confdefs.h <<\EOF
4146 #define HAVE_AIX_SECURITY 1
4147 EOF
4148
4149
4150 else
4151   echo "$ac_t""no" 1>&6
4152 fi
4153
4154
4155
4156 ol_link_modules=no
4157 if test $ol_enable_modules != no ; then
4158         for ac_hdr in ltdl.h
4159 do
4160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4162 echo "configure:4163: checking for $ac_hdr" >&5
4163 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4164   echo $ac_n "(cached) $ac_c" 1>&6
4165 else
4166   cat > conftest.$ac_ext <<EOF
4167 #line 4168 "configure"
4168 #include "confdefs.h"
4169 #include <$ac_hdr>
4170 EOF
4171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4172 { (eval echo configure:4173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4174 if test -z "$ac_err"; then
4175   rm -rf conftest*
4176   eval "ac_cv_header_$ac_safe=yes"
4177 else
4178   echo "$ac_err" >&5
4179   echo "configure: failed program was:" >&5
4180   cat conftest.$ac_ext >&5
4181   rm -rf conftest*
4182   eval "ac_cv_header_$ac_safe=no"
4183 fi
4184 rm -f conftest*
4185 fi
4186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4187   echo "$ac_t""yes" 1>&6
4188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4189   cat >> confdefs.h <<EOF
4190 #define $ac_tr_hdr 1
4191 EOF
4192  
4193 else
4194   echo "$ac_t""no" 1>&6
4195 fi
4196 done
4197
4198
4199         if test $ac_cv_header_ltdl_h = no ; then
4200                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4201         fi
4202
4203         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4204 echo "configure:4205: checking for lt_dlinit in -lltdl" >&5
4205 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4206 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4207   echo $ac_n "(cached) $ac_c" 1>&6
4208 else
4209   ac_save_LIBS="$LIBS"
4210 LIBS="-lltdl  $LIBS"
4211 cat > conftest.$ac_ext <<EOF
4212 #line 4213 "configure"
4213 #include "confdefs.h"
4214 /* Override any gcc2 internal prototype to avoid an error.  */
4215 /* We use char because int might match the return type of a gcc2
4216     builtin and then its argument prototype would still apply.  */
4217 char lt_dlinit();
4218
4219 int main() {
4220 lt_dlinit()
4221 ; return 0; }
4222 EOF
4223 if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4224   rm -rf conftest*
4225   eval "ac_cv_lib_$ac_lib_var=yes"
4226 else
4227   echo "configure: failed program was:" >&5
4228   cat conftest.$ac_ext >&5
4229   rm -rf conftest*
4230   eval "ac_cv_lib_$ac_lib_var=no"
4231 fi
4232 rm -f conftest*
4233 LIBS="$ac_save_LIBS"
4234
4235 fi
4236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4237   echo "$ac_t""yes" 1>&6
4238   
4239             MODULES_LIBS=-lltdl
4240             cat >> confdefs.h <<\EOF
4241 #define HAVE_LIBLTDL 1
4242 EOF
4243
4244         
4245 else
4246   echo "$ac_t""no" 1>&6
4247 fi
4248
4249
4250         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4251                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4252         fi
4253         ol_link_modules=yes
4254 else
4255         ol_with_bdb_module=static
4256         ol_with_dnssrv_module=static
4257         ol_with_ldap_module=static
4258         ol_with_ldbm_module=static
4259         ol_with_passwd_module=static
4260         ol_with_perl_module=static
4261         ol_with_shell_module=static
4262         ol_with_tcl_module=static
4263         ol_with_sql_module=static
4264 fi
4265
4266 # test for EBCDIC
4267 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4268 echo "configure:4269: checking for EBCDIC" >&5
4269 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4270   echo $ac_n "(cached) $ac_c" 1>&6
4271 else
4272   
4273         cat > conftest.$ac_ext <<EOF
4274 #line 4275 "configure"
4275 #include "confdefs.h"
4276
4277 #if !('M' == 0xd4)
4278 #include <__ASCII__/generate_error.h>
4279 #endif
4280
4281 EOF
4282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4283 { (eval echo configure:4284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4285 if test -z "$ac_err"; then
4286   rm -rf conftest*
4287   ol_cv_cpp_ebcdic=yes
4288 else
4289   echo "$ac_err" >&5
4290   echo "configure: failed program was:" >&5
4291   cat conftest.$ac_ext >&5
4292   rm -rf conftest*
4293   ol_cv_cpp_ebcdic=no
4294 fi
4295 rm -f conftest*
4296 fi
4297
4298 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4299 if test $ol_cv_cpp_ebcdic = yes ; then
4300         cat >> confdefs.h <<\EOF
4301 #define HAVE_EBCDIC 1
4302 EOF
4303
4304 fi
4305
4306 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4307 echo "configure:4308: checking for ANSI C header files" >&5
4308 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4309   echo $ac_n "(cached) $ac_c" 1>&6
4310 else
4311   cat > conftest.$ac_ext <<EOF
4312 #line 4313 "configure"
4313 #include "confdefs.h"
4314 #include <stdlib.h>
4315 #include <stdarg.h>
4316 #include <string.h>
4317 #include <float.h>
4318 EOF
4319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4320 { (eval echo configure:4321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4322 if test -z "$ac_err"; then
4323   rm -rf conftest*
4324   ol_cv_header_stdc=yes
4325 else
4326   echo "$ac_err" >&5
4327   echo "configure: failed program was:" >&5
4328   cat conftest.$ac_ext >&5
4329   rm -rf conftest*
4330   ol_cv_header_stdc=no
4331 fi
4332 rm -f conftest*
4333
4334 if test $ol_cv_header_stdc = yes; then
4335   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4336 cat > conftest.$ac_ext <<EOF
4337 #line 4338 "configure"
4338 #include "confdefs.h"
4339 #include <string.h>
4340 EOF
4341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4342   egrep "memchr" >/dev/null 2>&1; then
4343   :
4344 else
4345   rm -rf conftest*
4346   ol_cv_header_stdc=no
4347 fi
4348 rm -f conftest*
4349
4350 fi
4351
4352 if test $ol_cv_header_stdc = yes; then
4353   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4354 cat > conftest.$ac_ext <<EOF
4355 #line 4356 "configure"
4356 #include "confdefs.h"
4357 #include <stdlib.h>
4358 EOF
4359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4360   egrep "free" >/dev/null 2>&1; then
4361   :
4362 else
4363   rm -rf conftest*
4364   ol_cv_header_stdc=no
4365 fi
4366 rm -f conftest*
4367
4368 fi
4369
4370 if test $ol_cv_header_stdc = yes; then
4371   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4372 if test "$cross_compiling" = yes; then
4373   :
4374 else
4375   cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378 #include <ctype.h>
4379 #ifndef HAVE_EBCDIC
4380 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4381 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4382 #else
4383 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4384                 || ('j' <= (c) && (c) <= 'r') \
4385                 || ('s' <= (c) && (c) <= 'z'))
4386 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4387 #endif
4388 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4389 int main () { int i; for (i = 0; i < 256; i++)
4390 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4391 exit (0); }
4392
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4395 then
4396   :
4397 else
4398   echo "configure: failed program was:" >&5
4399   cat conftest.$ac_ext >&5
4400   rm -fr conftest*
4401   ol_cv_header_stdc=no
4402 fi
4403 rm -fr conftest*
4404 fi
4405
4406 fi
4407 fi
4408
4409 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4410 if test $ol_cv_header_stdc = yes; then
4411   cat >> confdefs.h <<\EOF
4412 #define STDC_HEADERS 1
4413 EOF
4414
4415 fi
4416 ac_cv_header_stdc=disable
4417
4418
4419 if test $ol_cv_header_stdc != yes; then
4420         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4421 fi
4422
4423 ac_header_dirent=no
4424 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4425 do
4426 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4427 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4428 echo "configure:4429: checking for $ac_hdr that defines DIR" >&5
4429 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4430   echo $ac_n "(cached) $ac_c" 1>&6
4431 else
4432   cat > conftest.$ac_ext <<EOF
4433 #line 4434 "configure"
4434 #include "confdefs.h"
4435 #include <sys/types.h>
4436 #include <$ac_hdr>
4437 int main() {
4438 DIR *dirp = 0;
4439 ; return 0; }
4440 EOF
4441 if { (eval echo configure:4442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4442   rm -rf conftest*
4443   eval "ac_cv_header_dirent_$ac_safe=yes"
4444 else
4445   echo "configure: failed program was:" >&5
4446   cat conftest.$ac_ext >&5
4447   rm -rf conftest*
4448   eval "ac_cv_header_dirent_$ac_safe=no"
4449 fi
4450 rm -f conftest*
4451 fi
4452 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4453   echo "$ac_t""yes" 1>&6
4454     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4455   cat >> confdefs.h <<EOF
4456 #define $ac_tr_hdr 1
4457 EOF
4458  ac_header_dirent=$ac_hdr; break
4459 else
4460   echo "$ac_t""no" 1>&6
4461 fi
4462 done
4463 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4464 if test $ac_header_dirent = dirent.h; then
4465 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4466 echo "configure:4467: checking for opendir in -ldir" >&5
4467 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4468 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4469   echo $ac_n "(cached) $ac_c" 1>&6
4470 else
4471   ac_save_LIBS="$LIBS"
4472 LIBS="-ldir  $LIBS"
4473 cat > conftest.$ac_ext <<EOF
4474 #line 4475 "configure"
4475 #include "confdefs.h"
4476 /* Override any gcc2 internal prototype to avoid an error.  */
4477 /* We use char because int might match the return type of a gcc2
4478     builtin and then its argument prototype would still apply.  */
4479 char opendir();
4480
4481 int main() {
4482 opendir()
4483 ; return 0; }
4484 EOF
4485 if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4486   rm -rf conftest*
4487   eval "ac_cv_lib_$ac_lib_var=yes"
4488 else
4489   echo "configure: failed program was:" >&5
4490   cat conftest.$ac_ext >&5
4491   rm -rf conftest*
4492   eval "ac_cv_lib_$ac_lib_var=no"
4493 fi
4494 rm -f conftest*
4495 LIBS="$ac_save_LIBS"
4496
4497 fi
4498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4499   echo "$ac_t""yes" 1>&6
4500   LIBS="$LIBS -ldir"
4501 else
4502   echo "$ac_t""no" 1>&6
4503 fi
4504
4505 else
4506 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4507 echo "configure:4508: checking for opendir in -lx" >&5
4508 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4509 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4510   echo $ac_n "(cached) $ac_c" 1>&6
4511 else
4512   ac_save_LIBS="$LIBS"
4513 LIBS="-lx  $LIBS"
4514 cat > conftest.$ac_ext <<EOF
4515 #line 4516 "configure"
4516 #include "confdefs.h"
4517 /* Override any gcc2 internal prototype to avoid an error.  */
4518 /* We use char because int might match the return type of a gcc2
4519     builtin and then its argument prototype would still apply.  */
4520 char opendir();
4521
4522 int main() {
4523 opendir()
4524 ; return 0; }
4525 EOF
4526 if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4527   rm -rf conftest*
4528   eval "ac_cv_lib_$ac_lib_var=yes"
4529 else
4530   echo "configure: failed program was:" >&5
4531   cat conftest.$ac_ext >&5
4532   rm -rf conftest*
4533   eval "ac_cv_lib_$ac_lib_var=no"
4534 fi
4535 rm -f conftest*
4536 LIBS="$ac_save_LIBS"
4537
4538 fi
4539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4540   echo "$ac_t""yes" 1>&6
4541   LIBS="$LIBS -lx"
4542 else
4543   echo "$ac_t""no" 1>&6
4544 fi
4545
4546 fi
4547
4548 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4549 echo "configure:4550: checking for sys/wait.h that is POSIX.1 compatible" >&5
4550 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4551   echo $ac_n "(cached) $ac_c" 1>&6
4552 else
4553   cat > conftest.$ac_ext <<EOF
4554 #line 4555 "configure"
4555 #include "confdefs.h"
4556 #include <sys/types.h>
4557 #include <sys/wait.h>
4558 #ifndef WEXITSTATUS
4559 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4560 #endif
4561 #ifndef WIFEXITED
4562 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4563 #endif
4564 int main() {
4565 int s;
4566 wait (&s);
4567 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4568 ; return 0; }
4569 EOF
4570 if { (eval echo configure:4571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4571   rm -rf conftest*
4572   ac_cv_header_sys_wait_h=yes
4573 else
4574   echo "configure: failed program was:" >&5
4575   cat conftest.$ac_ext >&5
4576   rm -rf conftest*
4577   ac_cv_header_sys_wait_h=no
4578 fi
4579 rm -f conftest*
4580 fi
4581
4582 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4583 if test $ac_cv_header_sys_wait_h = yes; then
4584   cat >> confdefs.h <<\EOF
4585 #define HAVE_SYS_WAIT_H 1
4586 EOF
4587
4588 fi
4589
4590 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4591 echo "configure:4592: checking POSIX termios" >&5
4592 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4593   echo $ac_n "(cached) $ac_c" 1>&6
4594 else
4595   cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 #include <sys/types.h>
4599 #include <unistd.h>
4600 #include <termios.h>
4601 int main() {
4602 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4603    tcgetattr(0, 0);
4604 ; return 0; }
4605 EOF
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4607   rm -rf conftest*
4608   am_cv_sys_posix_termios=yes
4609 else
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -rf conftest*
4613   am_cv_sys_posix_termios=no
4614 fi
4615 rm -f conftest*
4616 fi
4617
4618 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4619
4620
4621  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4622 echo "configure:4623: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4623 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4624   echo $ac_n "(cached) $ac_c" 1>&6
4625 else
4626   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4627
4628   gwinsz_in_termios_h=no
4629   if test $am_cv_sys_posix_termios = yes; then
4630     cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 #include <sys/types.h>
4634 #     include <termios.h>
4635 #     ifdef TIOCGWINSZ
4636         yes
4637 #     endif
4638     
4639 EOF
4640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4641   egrep "yes" >/dev/null 2>&1; then
4642   rm -rf conftest*
4643   gwinsz_in_termios_h=yes
4644 fi
4645 rm -f conftest*
4646
4647   fi
4648
4649   if test $gwinsz_in_termios_h = no; then
4650     cat > conftest.$ac_ext <<EOF
4651 #line 4652 "configure"
4652 #include "confdefs.h"
4653 #include <sys/types.h>
4654 #     include <sys/ioctl.h>
4655 #     ifdef TIOCGWINSZ
4656         yes
4657 #     endif
4658     
4659 EOF
4660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4661   egrep "yes" >/dev/null 2>&1; then
4662   rm -rf conftest*
4663   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4664 fi
4665 rm -f conftest*
4666
4667   fi
4668   
4669 fi
4670
4671 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4672   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4673     cat >> confdefs.h <<\EOF
4674 #define GWINSZ_IN_SYS_IOCTL 1
4675 EOF
4676
4677   fi
4678
4679 if test $am_cv_sys_posix_termios = yes ; then
4680         cat >> confdefs.h <<\EOF
4681 #define HAVE_POSIX_TERMIOS 1
4682 EOF
4683
4684 fi
4685
4686 for ac_hdr in \
4687         arpa/inet.h             \
4688         arpa/nameser.h  \
4689         assert.h                \
4690         conio.h                 \
4691         crypt.h                 \
4692         direct.h                \
4693         errno.h                 \
4694         fcntl.h                 \
4695         filio.h                 \
4696         getopt.h                \
4697         grp.h                   \
4698         io.h                    \
4699         libutil.h               \
4700         limits.h                \
4701         locale.h                \
4702         netinet/tcp.h   \
4703         malloc.h                \
4704         memory.h                \
4705         psap.h                  \
4706         pwd.h                   \
4707         process.h               \
4708         resolv.h                \
4709         sgtty.h                 \
4710         shadow.h                \
4711         stddef.h                \
4712         string.h                \
4713         strings.h               \
4714         sysexits.h              \
4715         sys/file.h              \
4716         sys/filio.h             \
4717         sys/errno.h             \
4718         sys/ioctl.h             \
4719         sys/param.h             \
4720         sys/resource.h  \
4721         sys/select.h    \
4722         sys/socket.h    \
4723         sys/syslog.h    \
4724         sys/time.h              \
4725         sys/types.h             \
4726         syslog.h                \
4727         termios.h               \
4728         unistd.h                \
4729         winsock.h               \
4730
4731 do
4732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4734 echo "configure:4735: checking for $ac_hdr" >&5
4735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4736   echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738   cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 #include <$ac_hdr>
4742 EOF
4743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4744 { (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4746 if test -z "$ac_err"; then
4747   rm -rf conftest*
4748   eval "ac_cv_header_$ac_safe=yes"
4749 else
4750   echo "$ac_err" >&5
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   rm -rf conftest*
4754   eval "ac_cv_header_$ac_safe=no"
4755 fi
4756 rm -f conftest*
4757 fi
4758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4759   echo "$ac_t""yes" 1>&6
4760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4761   cat >> confdefs.h <<EOF
4762 #define $ac_tr_hdr 1
4763 EOF
4764  
4765 else
4766   echo "$ac_t""no" 1>&6
4767 fi
4768 done
4769
4770
4771
4772
4773 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4774 echo "configure:4775: checking for sigset in -lV3" >&5
4775 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4776 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4777   echo $ac_n "(cached) $ac_c" 1>&6
4778 else
4779   ac_save_LIBS="$LIBS"
4780 LIBS="-lV3  $LIBS"
4781 cat > conftest.$ac_ext <<EOF
4782 #line 4783 "configure"
4783 #include "confdefs.h"
4784 /* Override any gcc2 internal prototype to avoid an error.  */
4785 /* We use char because int might match the return type of a gcc2
4786     builtin and then its argument prototype would still apply.  */
4787 char sigset();
4788
4789 int main() {
4790 sigset()
4791 ; return 0; }
4792 EOF
4793 if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4794   rm -rf conftest*
4795   eval "ac_cv_lib_$ac_lib_var=yes"
4796 else
4797   echo "configure: failed program was:" >&5
4798   cat conftest.$ac_ext >&5
4799   rm -rf conftest*
4800   eval "ac_cv_lib_$ac_lib_var=no"
4801 fi
4802 rm -f conftest*
4803 LIBS="$ac_save_LIBS"
4804
4805 fi
4806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4807   echo "$ac_t""yes" 1>&6
4808     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4809     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4810   cat >> confdefs.h <<EOF
4811 #define $ac_tr_lib 1
4812 EOF
4813
4814   LIBS="-lV3 $LIBS"
4815
4816 else
4817   echo "$ac_t""no" 1>&6
4818 fi
4819
4820
4821 if test $ac_cv_header_winsock_h = yes; then
4822         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4823 echo "configure:4824: checking for winsock" >&5
4824 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4825   echo $ac_n "(cached) $ac_c" 1>&6
4826 else
4827   cat > conftest.$ac_ext <<EOF
4828 #line 4829 "configure"
4829 #include "confdefs.h"
4830 #include <winsock.h>
4831 int main() {
4832
4833                         socket(0,0,0);
4834                         select(0,NULL,NULL,NULL,NULL);
4835                         closesocket(0);
4836                         gethostname(NULL,0);
4837         
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   ol_cv_winsock=yes
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   ol_cv_winsock=no
4848 fi
4849 rm -f conftest*]
4850 fi
4851
4852 echo "$ac_t""$ol_cv_winsock" 1>&6
4853
4854         if test $ol_cv_winsock = yes ; then
4855                 cat >> confdefs.h <<\EOF
4856 #define HAVE_WINSOCK 1
4857 EOF
4858
4859                 ac_cv_func_socket=yes
4860                 ac_cv_func_select=yes
4861                 ac_cv_func_closesocket=yes
4862                 ac_cv_func_gethostname=yes
4863         fi
4864 fi
4865
4866
4867 echo $ac_n "checking for socket""... $ac_c" 1>&6
4868 echo "configure:4869: checking for socket" >&5
4869 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4870   echo $ac_n "(cached) $ac_c" 1>&6
4871 else
4872   cat > conftest.$ac_ext <<EOF
4873 #line 4874 "configure"
4874 #include "confdefs.h"
4875 /* System header to define __stub macros and hopefully few prototypes,
4876     which can conflict with char socket(); below.  */
4877 #include <assert.h>
4878 /* Override any gcc2 internal prototype to avoid an error.  */
4879 /* We use char because int might match the return type of a gcc2
4880     builtin and then its argument prototype would still apply.  */
4881 char socket();
4882 char (*f)();
4883
4884 int main() {
4885
4886 /* The GNU C library defines this for functions which it implements
4887     to always fail with ENOSYS.  Some functions are actually named
4888     something starting with __ and the normal name is an alias.  */
4889 #if defined (__stub_socket) || defined (__stub___socket)
4890 choke me
4891 #else
4892 f = socket;
4893 #endif
4894
4895 ; return 0; }
4896 EOF
4897 if { (eval echo configure:4898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4898   rm -rf conftest*
4899   eval "ac_cv_func_socket=yes"
4900 else
4901   echo "configure: failed program was:" >&5
4902   cat conftest.$ac_ext >&5
4903   rm -rf conftest*
4904   eval "ac_cv_func_socket=no"
4905 fi
4906 rm -f conftest*
4907 fi
4908
4909 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4910   echo "$ac_t""yes" 1>&6
4911   :
4912 else
4913   echo "$ac_t""no" 1>&6
4914         
4915         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4916 echo "configure:4917: checking for main in -lsocket" >&5
4917 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4919   echo $ac_n "(cached) $ac_c" 1>&6
4920 else
4921   ac_save_LIBS="$LIBS"
4922 LIBS="-lsocket  $LIBS"
4923 cat > conftest.$ac_ext <<EOF
4924 #line 4925 "configure"
4925 #include "confdefs.h"
4926
4927 int main() {
4928 main()
4929 ; return 0; }
4930 EOF
4931 if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4932   rm -rf conftest*
4933   eval "ac_cv_lib_$ac_lib_var=yes"
4934 else
4935   echo "configure: failed program was:" >&5
4936   cat conftest.$ac_ext >&5
4937   rm -rf conftest*
4938   eval "ac_cv_lib_$ac_lib_var=no"
4939 fi
4940 rm -f conftest*
4941 LIBS="$ac_save_LIBS"
4942
4943 fi
4944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4945   echo "$ac_t""yes" 1>&6
4946     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4947     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4948   cat >> confdefs.h <<EOF
4949 #define $ac_tr_lib 1
4950 EOF
4951
4952   LIBS="-lsocket $LIBS"
4953
4954 else
4955   echo "$ac_t""no" 1>&6
4956 fi
4957
4958         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4959 echo "configure:4960: checking for main in -lnet" >&5
4960 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4961 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4962   echo $ac_n "(cached) $ac_c" 1>&6
4963 else
4964   ac_save_LIBS="$LIBS"
4965 LIBS="-lnet  $LIBS"
4966 cat > conftest.$ac_ext <<EOF
4967 #line 4968 "configure"
4968 #include "confdefs.h"
4969
4970 int main() {
4971 main()
4972 ; return 0; }
4973 EOF
4974 if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4975   rm -rf conftest*
4976   eval "ac_cv_lib_$ac_lib_var=yes"
4977 else
4978   echo "configure: failed program was:" >&5
4979   cat conftest.$ac_ext >&5
4980   rm -rf conftest*
4981   eval "ac_cv_lib_$ac_lib_var=no"
4982 fi
4983 rm -f conftest*
4984 LIBS="$ac_save_LIBS"
4985
4986 fi
4987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4988   echo "$ac_t""yes" 1>&6
4989     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4990     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4991   cat >> confdefs.h <<EOF
4992 #define $ac_tr_lib 1
4993 EOF
4994
4995   LIBS="-lnet $LIBS"
4996
4997 else
4998   echo "$ac_t""no" 1>&6
4999 fi
5000
5001         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5002 echo "configure:5003: checking for main in -lnsl_s" >&5
5003 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5004 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5005   echo $ac_n "(cached) $ac_c" 1>&6
5006 else
5007   ac_save_LIBS="$LIBS"
5008 LIBS="-lnsl_s  $LIBS"
5009 cat > conftest.$ac_ext <<EOF
5010 #line 5011 "configure"
5011 #include "confdefs.h"
5012
5013 int main() {
5014 main()
5015 ; return 0; }
5016 EOF
5017 if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5018   rm -rf conftest*
5019   eval "ac_cv_lib_$ac_lib_var=yes"
5020 else
5021   echo "configure: failed program was:" >&5
5022   cat conftest.$ac_ext >&5
5023   rm -rf conftest*
5024   eval "ac_cv_lib_$ac_lib_var=no"
5025 fi
5026 rm -f conftest*
5027 LIBS="$ac_save_LIBS"
5028
5029 fi
5030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5031   echo "$ac_t""yes" 1>&6
5032     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5033     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5034   cat >> confdefs.h <<EOF
5035 #define $ac_tr_lib 1
5036 EOF
5037
5038   LIBS="-lnsl_s $LIBS"
5039
5040 else
5041   echo "$ac_t""no" 1>&6
5042 fi
5043
5044         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5045 echo "configure:5046: checking for main in -lnsl" >&5
5046 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5047 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5048   echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5050   ac_save_LIBS="$LIBS"
5051 LIBS="-lnsl  $LIBS"
5052 cat > conftest.$ac_ext <<EOF
5053 #line 5054 "configure"
5054 #include "confdefs.h"
5055
5056 int main() {
5057 main()
5058 ; return 0; }
5059 EOF
5060 if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=yes"
5063 else
5064   echo "configure: failed program was:" >&5
5065   cat conftest.$ac_ext >&5
5066   rm -rf conftest*
5067   eval "ac_cv_lib_$ac_lib_var=no"
5068 fi
5069 rm -f conftest*
5070 LIBS="$ac_save_LIBS"
5071
5072 fi
5073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5074   echo "$ac_t""yes" 1>&6
5075     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5076     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5077   cat >> confdefs.h <<EOF
5078 #define $ac_tr_lib 1
5079 EOF
5080
5081   LIBS="-lnsl $LIBS"
5082
5083 else
5084   echo "$ac_t""no" 1>&6
5085 fi
5086
5087         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5088 echo "configure:5089: checking for socket in -linet" >&5
5089 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5091   echo $ac_n "(cached) $ac_c" 1>&6
5092 else
5093   ac_save_LIBS="$LIBS"
5094 LIBS="-linet  $LIBS"
5095 cat > conftest.$ac_ext <<EOF
5096 #line 5097 "configure"
5097 #include "confdefs.h"
5098 /* Override any gcc2 internal prototype to avoid an error.  */
5099 /* We use char because int might match the return type of a gcc2
5100     builtin and then its argument prototype would still apply.  */
5101 char socket();
5102
5103 int main() {
5104 socket()
5105 ; return 0; }
5106 EOF
5107 if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5108   rm -rf conftest*
5109   eval "ac_cv_lib_$ac_lib_var=yes"
5110 else
5111   echo "configure: failed program was:" >&5
5112   cat conftest.$ac_ext >&5
5113   rm -rf conftest*
5114   eval "ac_cv_lib_$ac_lib_var=no"
5115 fi
5116 rm -f conftest*
5117 LIBS="$ac_save_LIBS"
5118
5119 fi
5120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5121   echo "$ac_t""yes" 1>&6
5122     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5123     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5124   cat >> confdefs.h <<EOF
5125 #define $ac_tr_lib 1
5126 EOF
5127
5128   LIBS="-linet $LIBS"
5129
5130 else
5131   echo "$ac_t""no" 1>&6
5132 fi
5133
5134         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5135 echo "configure:5136: checking for main in -lgen" >&5
5136 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-lgen  $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145
5146 int main() {
5147 main()
5148 ; return 0; }
5149 EOF
5150 if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=yes"
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156   rm -rf conftest*
5157   eval "ac_cv_lib_$ac_lib_var=no"
5158 fi
5159 rm -f conftest*
5160 LIBS="$ac_save_LIBS"
5161
5162 fi
5163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5164   echo "$ac_t""yes" 1>&6
5165     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5166     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5167   cat >> confdefs.h <<EOF
5168 #define $ac_tr_lib 1
5169 EOF
5170
5171   LIBS="-lgen $LIBS"
5172
5173 else
5174   echo "$ac_t""no" 1>&6
5175 fi
5176
5177
5178 fi
5179
5180
5181 echo $ac_n "checking for select""... $ac_c" 1>&6
5182 echo "configure:5183: checking for select" >&5
5183 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5184   echo $ac_n "(cached) $ac_c" 1>&6
5185 else
5186   cat > conftest.$ac_ext <<EOF
5187 #line 5188 "configure"
5188 #include "confdefs.h"
5189 /* System header to define __stub macros and hopefully few prototypes,
5190     which can conflict with char select(); below.  */
5191 #include <assert.h>
5192 /* Override any gcc2 internal prototype to avoid an error.  */
5193 /* We use char because int might match the return type of a gcc2
5194     builtin and then its argument prototype would still apply.  */
5195 char select();
5196 char (*f)();
5197
5198 int main() {
5199
5200 /* The GNU C library defines this for functions which it implements
5201     to always fail with ENOSYS.  Some functions are actually named
5202     something starting with __ and the normal name is an alias.  */
5203 #if defined (__stub_select) || defined (__stub___select)
5204 choke me
5205 #else
5206 f = select;
5207 #endif
5208
5209 ; return 0; }
5210 EOF
5211 if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5212   rm -rf conftest*
5213   eval "ac_cv_func_select=yes"
5214 else
5215   echo "configure: failed program was:" >&5
5216   cat conftest.$ac_ext >&5
5217   rm -rf conftest*
5218   eval "ac_cv_func_select=no"
5219 fi
5220 rm -f conftest*
5221 fi
5222
5223 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5224   echo "$ac_t""yes" 1>&6
5225   :
5226 else
5227   echo "$ac_t""no" 1>&6
5228 { echo "configure: error: select() required." 1>&2; exit 1; }
5229 fi
5230
5231
5232 if test "${ac_cv_header_winsock_h}" != yes; then
5233                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5234 echo "configure:5235: checking types of arguments for select()" >&5
5235  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5239   echo $ac_n "(cached) $ac_c" 1>&6
5240 else
5241     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5242   echo $ac_n "(cached) $ac_c" 1>&6
5243 else
5244      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5245      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5246       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5247        cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 #ifdef HAVE_SYS_TYPES_H
5251 #include <sys/types.h>
5252 #endif
5253 #ifdef HAVE_SYS_TIME_H
5254 #include <sys/time.h>
5255 #endif
5256 #ifdef HAVE_SYS_SELECT_H
5257 #include <sys/select.h>
5258 #endif
5259 #ifdef HAVE_SYS_SOCKET_H
5260 #include <sys/socket.h>
5261 #endif
5262 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);
5263 int main() {
5264
5265 ; return 0; }
5266 EOF
5267 if { (eval echo configure:5268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5268   rm -rf conftest*
5269           ac_not_found=no ; break 3
5270 else
5271   echo "configure: failed program was:" >&5
5272   cat conftest.$ac_ext >&5
5273   rm -rf conftest*
5274   ac_not_found=yes
5275 fi
5276 rm -f conftest*
5277       done
5278      done
5279     done
5280    
5281 fi
5282   
5283 fi
5284  
5285 fi
5286  if test "$ac_not_found" = yes; then
5287   ac_cv_func_select_arg1=int 
5288   ac_cv_func_select_arg234='int *' 
5289   ac_cv_func_select_arg5='struct timeval *'
5290  fi
5291  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5292  cat >> confdefs.h <<EOF
5293 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5294 EOF
5295
5296  cat >> confdefs.h <<EOF
5297 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5298 EOF
5299
5300  cat >> confdefs.h <<EOF
5301 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5302 EOF
5303
5304
5305 fi
5306
5307
5308 for ac_hdr in regex.h 
5309 do
5310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5312 echo "configure:5313: checking for $ac_hdr" >&5
5313 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5314   echo $ac_n "(cached) $ac_c" 1>&6
5315 else
5316   cat > conftest.$ac_ext <<EOF
5317 #line 5318 "configure"
5318 #include "confdefs.h"
5319 #include <$ac_hdr>
5320 EOF
5321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5322 { (eval echo configure:5323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5324 if test -z "$ac_err"; then
5325   rm -rf conftest*
5326   eval "ac_cv_header_$ac_safe=yes"
5327 else
5328   echo "$ac_err" >&5
5329   echo "configure: failed program was:" >&5
5330   cat conftest.$ac_ext >&5
5331   rm -rf conftest*
5332   eval "ac_cv_header_$ac_safe=no"
5333 fi
5334 rm -f conftest*
5335 fi
5336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5337   echo "$ac_t""yes" 1>&6
5338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5339   cat >> confdefs.h <<EOF
5340 #define $ac_tr_hdr 1
5341 EOF
5342  
5343 else
5344   echo "$ac_t""no" 1>&6
5345 fi
5346 done
5347
5348 if test "$ac_cv_header_regex_h" != yes ; then
5349         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5350 fi
5351 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5352 echo "configure:5353: checking for regfree" >&5
5353 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5354   echo $ac_n "(cached) $ac_c" 1>&6
5355 else
5356   cat > conftest.$ac_ext <<EOF
5357 #line 5358 "configure"
5358 #include "confdefs.h"
5359 /* System header to define __stub macros and hopefully few prototypes,
5360     which can conflict with char regfree(); below.  */
5361 #include <assert.h>
5362 /* Override any gcc2 internal prototype to avoid an error.  */
5363 /* We use char because int might match the return type of a gcc2
5364     builtin and then its argument prototype would still apply.  */
5365 char regfree();
5366 char (*f)();
5367
5368 int main() {
5369
5370 /* The GNU C library defines this for functions which it implements
5371     to always fail with ENOSYS.  Some functions are actually named
5372     something starting with __ and the normal name is an alias.  */
5373 #if defined (__stub_regfree) || defined (__stub___regfree)
5374 choke me
5375 #else
5376 f = regfree;
5377 #endif
5378
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5382   rm -rf conftest*
5383   eval "ac_cv_func_regfree=yes"
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   eval "ac_cv_func_regfree=no"
5389 fi
5390 rm -f conftest*
5391 fi
5392
5393 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5394   echo "$ac_t""yes" 1>&6
5395   :
5396 else
5397   echo "$ac_t""no" 1>&6
5398 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5399 fi
5400
5401
5402
5403 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5404 echo "configure:5405: checking for compatible POSIX regex" >&5
5405 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5406   echo $ac_n "(cached) $ac_c" 1>&6
5407 else
5408   
5409         if test "$cross_compiling" = yes; then
5410   ol_cv_c_posix_regex=cross
5411 else
5412   cat > conftest.$ac_ext <<EOF
5413 #line 5414 "configure"
5414 #include "confdefs.h"
5415
5416 #include <sys/types.h>
5417 #include <regex.h>
5418 static char *pattern, *string;
5419 main()
5420 {
5421         int rc;
5422         regex_t re;
5423
5424         pattern = "^A";
5425
5426         if(regcomp(&re, pattern, 0)) {
5427                 return -1;
5428         }
5429         
5430         string = "ALL MATCH";
5431         
5432         rc = regexec(&re, string, 0, (void*)0, 0);
5433
5434         regfree(&re);
5435
5436         return rc;
5437 }
5438 EOF
5439 if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5440 then
5441   ol_cv_c_posix_regex=yes
5442 else
5443   echo "configure: failed program was:" >&5
5444   cat conftest.$ac_ext >&5
5445   rm -fr conftest*
5446   ol_cv_c_posix_regex=no
5447 fi
5448 rm -fr conftest*
5449 fi
5450
5451 fi
5452
5453 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5454
5455 if test "$ol_cv_c_posix_regex" = no ; then
5456         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5457 fi
5458
5459 ol_link_dnssrv=no
5460 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5461 echo "configure:5462: checking for res_query" >&5
5462 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5463   echo $ac_n "(cached) $ac_c" 1>&6
5464 else
5465   cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468 /* System header to define __stub macros and hopefully few prototypes,
5469     which can conflict with char res_query(); below.  */
5470 #include <assert.h>
5471 /* Override any gcc2 internal prototype to avoid an error.  */
5472 /* We use char because int might match the return type of a gcc2
5473     builtin and then its argument prototype would still apply.  */
5474 char res_query();
5475 char (*f)();
5476
5477 int main() {
5478
5479 /* The GNU C library defines this for functions which it implements
5480     to always fail with ENOSYS.  Some functions are actually named
5481     something starting with __ and the normal name is an alias.  */
5482 #if defined (__stub_res_query) || defined (__stub___res_query)
5483 choke me
5484 #else
5485 f = res_query;
5486 #endif
5487
5488 ; return 0; }
5489 EOF
5490 if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5491   rm -rf conftest*
5492   eval "ac_cv_func_res_query=yes"
5493 else
5494   echo "configure: failed program was:" >&5
5495   cat conftest.$ac_ext >&5
5496   rm -rf conftest*
5497   eval "ac_cv_func_res_query=no"
5498 fi
5499 rm -f conftest*
5500 fi
5501
5502 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5503   echo "$ac_t""yes" 1>&6
5504   :
5505 else
5506   echo "$ac_t""no" 1>&6
5507 fi
5508
5509 if test $ac_cv_func_res_query = no ; then 
5510         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5511 echo "configure:5512: checking for res_query in -lbind" >&5
5512 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5514   echo $ac_n "(cached) $ac_c" 1>&6
5515 else
5516   ac_save_LIBS="$LIBS"
5517 LIBS="-lbind  $LIBS"
5518 cat > conftest.$ac_ext <<EOF
5519 #line 5520 "configure"
5520 #include "confdefs.h"
5521 /* Override any gcc2 internal prototype to avoid an error.  */
5522 /* We use char because int might match the return type of a gcc2
5523     builtin and then its argument prototype would still apply.  */
5524 char res_query();
5525
5526 int main() {
5527 res_query()
5528 ; return 0; }
5529 EOF
5530 if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5531   rm -rf conftest*
5532   eval "ac_cv_lib_$ac_lib_var=yes"
5533 else
5534   echo "configure: failed program was:" >&5
5535   cat conftest.$ac_ext >&5
5536   rm -rf conftest*
5537   eval "ac_cv_lib_$ac_lib_var=no"
5538 fi
5539 rm -f conftest*
5540 LIBS="$ac_save_LIBS"
5541
5542 fi
5543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5544   echo "$ac_t""yes" 1>&6
5545     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5546     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5547   cat >> confdefs.h <<EOF
5548 #define $ac_tr_lib 1
5549 EOF
5550
5551   LIBS="-lbind $LIBS"
5552
5553 else
5554   echo "$ac_t""no" 1>&6
5555 fi
5556
5557         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5558 fi
5559
5560 if test $ac_cv_func_res_query = no ; then 
5561         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5562 echo "configure:5563: checking for __res_query in -lbind" >&5
5563 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5564 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5565   echo $ac_n "(cached) $ac_c" 1>&6
5566 else
5567   ac_save_LIBS="$LIBS"
5568 LIBS="-lbind  $LIBS"
5569 cat > conftest.$ac_ext <<EOF
5570 #line 5571 "configure"
5571 #include "confdefs.h"
5572 /* Override any gcc2 internal prototype to avoid an error.  */
5573 /* We use char because int might match the return type of a gcc2
5574     builtin and then its argument prototype would still apply.  */
5575 char __res_query();
5576
5577 int main() {
5578 __res_query()
5579 ; return 0; }
5580 EOF
5581 if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5582   rm -rf conftest*
5583   eval "ac_cv_lib_$ac_lib_var=yes"
5584 else
5585   echo "configure: failed program was:" >&5
5586   cat conftest.$ac_ext >&5
5587   rm -rf conftest*
5588   eval "ac_cv_lib_$ac_lib_var=no"
5589 fi
5590 rm -f conftest*
5591 LIBS="$ac_save_LIBS"
5592
5593 fi
5594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5595   echo "$ac_t""yes" 1>&6
5596     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5597     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5598   cat >> confdefs.h <<EOF
5599 #define $ac_tr_lib 1
5600 EOF
5601
5602   LIBS="-lbind $LIBS"
5603
5604 else
5605   echo "$ac_t""no" 1>&6
5606 fi
5607
5608         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5609 fi
5610
5611 if test $ac_cv_func_res_query = no ; then 
5612         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5613 echo "configure:5614: checking for res_query in -lresolv" >&5
5614 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5615 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5616   echo $ac_n "(cached) $ac_c" 1>&6
5617 else
5618   ac_save_LIBS="$LIBS"
5619 LIBS="-lresolv  $LIBS"
5620 cat > conftest.$ac_ext <<EOF
5621 #line 5622 "configure"
5622 #include "confdefs.h"
5623 /* Override any gcc2 internal prototype to avoid an error.  */
5624 /* We use char because int might match the return type of a gcc2
5625     builtin and then its argument prototype would still apply.  */
5626 char res_query();
5627
5628 int main() {
5629 res_query()
5630 ; return 0; }
5631 EOF
5632 if { (eval echo configure:5633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5633   rm -rf conftest*
5634   eval "ac_cv_lib_$ac_lib_var=yes"
5635 else
5636   echo "configure: failed program was:" >&5
5637   cat conftest.$ac_ext >&5
5638   rm -rf conftest*
5639   eval "ac_cv_lib_$ac_lib_var=no"
5640 fi
5641 rm -f conftest*
5642 LIBS="$ac_save_LIBS"
5643
5644 fi
5645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5646   echo "$ac_t""yes" 1>&6
5647     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5648     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5649   cat >> confdefs.h <<EOF
5650 #define $ac_tr_lib 1
5651 EOF
5652
5653   LIBS="-lresolv $LIBS"
5654
5655 else
5656   echo "$ac_t""no" 1>&6
5657 fi
5658
5659         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5660 fi
5661
5662 if test "$ac_cv_func_res_query" = yes ; then
5663         cat >> confdefs.h <<\EOF
5664 #define HAVE_RES_QUERY 1
5665 EOF
5666
5667
5668         if test $ol_enable_dnssrv != no ; then
5669                 ol_link_dnssrv=yes
5670         fi
5671 fi
5672
5673 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5674         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5675 fi
5676
5677 for ac_func in getaddrinfo 
5678 do
5679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5680 echo "configure:5681: checking for $ac_func" >&5
5681 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5682   echo $ac_n "(cached) $ac_c" 1>&6
5683 else
5684   cat > conftest.$ac_ext <<EOF
5685 #line 5686 "configure"
5686 #include "confdefs.h"
5687 /* System header to define __stub macros and hopefully few prototypes,
5688     which can conflict with char $ac_func(); below.  */
5689 #include <assert.h>
5690 /* Override any gcc2 internal prototype to avoid an error.  */
5691 /* We use char because int might match the return type of a gcc2
5692     builtin and then its argument prototype would still apply.  */
5693 char $ac_func();
5694 char (*f)();
5695
5696 int main() {
5697
5698 /* The GNU C library defines this for functions which it implements
5699     to always fail with ENOSYS.  Some functions are actually named
5700     something starting with __ and the normal name is an alias.  */
5701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5702 choke me
5703 #else
5704 f = $ac_func;
5705 #endif
5706
5707 ; return 0; }
5708 EOF
5709 if { (eval echo configure:5710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5710   rm -rf conftest*
5711   eval "ac_cv_func_$ac_func=yes"
5712 else
5713   echo "configure: failed program was:" >&5
5714   cat conftest.$ac_ext >&5
5715   rm -rf conftest*
5716   eval "ac_cv_func_$ac_func=no"
5717 fi
5718 rm -f conftest*
5719 fi
5720
5721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5722   echo "$ac_t""yes" 1>&6
5723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5724   cat >> confdefs.h <<EOF
5725 #define $ac_tr_func 1
5726 EOF
5727  
5728 else
5729   echo "$ac_t""no" 1>&6
5730 fi
5731 done
5732
5733
5734 ol_link_ipv6=no
5735 if test $ac_cv_func_getaddrinfo = no ; then
5736         if test $ol_enable_ipv6 = yes ; then
5737                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5738         fi
5739 else
5740         for ac_func in gai_strerror 
5741 do
5742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5743 echo "configure:5744: checking for $ac_func" >&5
5744 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5745   echo $ac_n "(cached) $ac_c" 1>&6
5746 else
5747   cat > conftest.$ac_ext <<EOF
5748 #line 5749 "configure"
5749 #include "confdefs.h"
5750 /* System header to define __stub macros and hopefully few prototypes,
5751     which can conflict with char $ac_func(); below.  */
5752 #include <assert.h>
5753 /* Override any gcc2 internal prototype to avoid an error.  */
5754 /* We use char because int might match the return type of a gcc2
5755     builtin and then its argument prototype would still apply.  */
5756 char $ac_func();
5757 char (*f)();
5758
5759 int main() {
5760
5761 /* The GNU C library defines this for functions which it implements
5762     to always fail with ENOSYS.  Some functions are actually named
5763     something starting with __ and the normal name is an alias.  */
5764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5765 choke me
5766 #else
5767 f = $ac_func;
5768 #endif
5769
5770 ; return 0; }
5771 EOF
5772 if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5773   rm -rf conftest*
5774   eval "ac_cv_func_$ac_func=yes"
5775 else
5776   echo "configure: failed program was:" >&5
5777   cat conftest.$ac_ext >&5
5778   rm -rf conftest*
5779   eval "ac_cv_func_$ac_func=no"
5780 fi
5781 rm -f conftest*
5782 fi
5783
5784 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5785   echo "$ac_t""yes" 1>&6
5786     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5787   cat >> confdefs.h <<EOF
5788 #define $ac_tr_func 1
5789 EOF
5790  
5791 else
5792   echo "$ac_t""no" 1>&6
5793 fi
5794 done
5795
5796
5797         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5798 echo "configure:5799: checking INET6_ADDRSTRLEN" >&5
5799 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5800   echo $ac_n "(cached) $ac_c" 1>&6
5801 else
5802   
5803                 cat > conftest.$ac_ext <<EOF
5804 #line 5805 "configure"
5805 #include "confdefs.h"
5806
5807 #                       include <netinet/in.h>
5808 #                       ifdef INET6_ADDRSTRLEN
5809                                 __has_inet6_addrstrlen__;
5810 #                       endif
5811                 
5812 EOF
5813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5814   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5815   rm -rf conftest*
5816   ol_cv_inet6_addrstrlen=yes
5817 else
5818   rm -rf conftest*
5819   ol_cv_inet6_addrstrlen=no
5820 fi
5821 rm -f conftest*
5822
5823 fi
5824
5825 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5826
5827         if test $ol_cv_inet6_addrstrlen = yes ; then
5828                 ol_link_ipv6=yes
5829         elif test $ol_enable_ipv6 = yes ; then
5830                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5831         fi
5832 fi
5833
5834 if test $ol_enable_local != no ; then
5835         for ac_hdr in sys/un.h 
5836 do
5837 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5838 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5839 echo "configure:5840: checking for $ac_hdr" >&5
5840 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5841   echo $ac_n "(cached) $ac_c" 1>&6
5842 else
5843   cat > conftest.$ac_ext <<EOF
5844 #line 5845 "configure"
5845 #include "confdefs.h"
5846 #include <$ac_hdr>
5847 EOF
5848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5849 { (eval echo configure:5850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5851 if test -z "$ac_err"; then
5852   rm -rf conftest*
5853   eval "ac_cv_header_$ac_safe=yes"
5854 else
5855   echo "$ac_err" >&5
5856   echo "configure: failed program was:" >&5
5857   cat conftest.$ac_ext >&5
5858   rm -rf conftest*
5859   eval "ac_cv_header_$ac_safe=no"
5860 fi
5861 rm -f conftest*
5862 fi
5863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5864   echo "$ac_t""yes" 1>&6
5865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5866   cat >> confdefs.h <<EOF
5867 #define $ac_tr_hdr 1
5868 EOF
5869  
5870 else
5871   echo "$ac_t""no" 1>&6
5872 fi
5873 done
5874
5875
5876         if test $ol_enable_local = auto ; then
5877                 ol_enable_local=$ac_cv_header_sys_un_h
5878         elif test $ac_cv_header_sys_un_h = no ; then
5879                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5880         fi
5881 fi
5882
5883 ol_link_kbind=no
5884 ol_link_kpasswd=no
5885 ol_link_krb5=no
5886 ol_link_krb4=no
5887
5888 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5889         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5890         -o $ol_with_kerberos = k425 ; then
5891
5892         for ac_hdr in krb5.h
5893 do
5894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5896 echo "configure:5897: checking for $ac_hdr" >&5
5897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5898   echo $ac_n "(cached) $ac_c" 1>&6
5899 else
5900   cat > conftest.$ac_ext <<EOF
5901 #line 5902 "configure"
5902 #include "confdefs.h"
5903 #include <$ac_hdr>
5904 EOF
5905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5906 { (eval echo configure:5907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5908 if test -z "$ac_err"; then
5909   rm -rf conftest*
5910   eval "ac_cv_header_$ac_safe=yes"
5911 else
5912   echo "$ac_err" >&5
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_header_$ac_safe=no"
5917 fi
5918 rm -f conftest*
5919 fi
5920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5921   echo "$ac_t""yes" 1>&6
5922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5923   cat >> confdefs.h <<EOF
5924 #define $ac_tr_hdr 1
5925 EOF
5926  
5927 else
5928   echo "$ac_t""no" 1>&6
5929 fi
5930 done
5931
5932
5933         if test $ac_cv_header_krb5_h = yes ; then
5934                                 for ac_hdr in heim_err.h
5935 do
5936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5938 echo "configure:5939: checking for $ac_hdr" >&5
5939 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5940   echo $ac_n "(cached) $ac_c" 1>&6
5941 else
5942   cat > conftest.$ac_ext <<EOF
5943 #line 5944 "configure"
5944 #include "confdefs.h"
5945 #include <$ac_hdr>
5946 EOF
5947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5948 { (eval echo configure:5949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5950 if test -z "$ac_err"; then
5951   rm -rf conftest*
5952   eval "ac_cv_header_$ac_safe=yes"
5953 else
5954   echo "$ac_err" >&5
5955   echo "configure: failed program was:" >&5
5956   cat conftest.$ac_ext >&5
5957   rm -rf conftest*
5958   eval "ac_cv_header_$ac_safe=no"
5959 fi
5960 rm -f conftest*
5961 fi
5962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5963   echo "$ac_t""yes" 1>&6
5964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5965   cat >> confdefs.h <<EOF
5966 #define $ac_tr_hdr 1
5967 EOF
5968  
5969 else
5970   echo "$ac_t""no" 1>&6
5971 fi
5972 done
5973
5974                 if test $ac_cv_header_heim_err_h = yes ; then
5975                         krb5_impl=heimdal
5976                 else
5977                         krb5_impl=mit
5978                 fi
5979
5980                 if test $krb5_impl = mit; then
5981                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5982 echo "configure:5983: checking for main in -lkrb5" >&5
5983 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5985   echo $ac_n "(cached) $ac_c" 1>&6
5986 else
5987   ac_save_LIBS="$LIBS"
5988 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5989 cat > conftest.$ac_ext <<EOF
5990 #line 5991 "configure"
5991 #include "confdefs.h"
5992
5993 int main() {
5994 main()
5995 ; return 0; }
5996 EOF
5997 if { (eval echo configure:5998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5998   rm -rf conftest*
5999   eval "ac_cv_lib_$ac_lib_var=yes"
6000 else
6001   echo "configure: failed program was:" >&5
6002   cat conftest.$ac_ext >&5
6003   rm -rf conftest*
6004   eval "ac_cv_lib_$ac_lib_var=no"
6005 fi
6006 rm -f conftest*
6007 LIBS="$ac_save_LIBS"
6008
6009 fi
6010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6011   echo "$ac_t""yes" 1>&6
6012   have_krb5=yes
6013                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6014 else
6015   echo "$ac_t""no" 1>&6
6016 have_krb5=no
6017 fi
6018
6019
6020                 elif test $krb5_impl = heimdal; then
6021                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6022 echo "configure:6023: checking for main in -lkrb5" >&5
6023 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6025   echo $ac_n "(cached) $ac_c" 1>&6
6026 else
6027   ac_save_LIBS="$LIBS"
6028 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032
6033 int main() {
6034 main()
6035 ; return 0; }
6036 EOF
6037 if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6038   rm -rf conftest*
6039   eval "ac_cv_lib_$ac_lib_var=yes"
6040 else
6041   echo "configure: failed program was:" >&5
6042   cat conftest.$ac_ext >&5
6043   rm -rf conftest*
6044   eval "ac_cv_lib_$ac_lib_var=no"
6045 fi
6046 rm -f conftest*
6047 LIBS="$ac_save_LIBS"
6048
6049 fi
6050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6051   echo "$ac_t""yes" 1>&6
6052   have_krb5=yes
6053                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6054 else
6055   echo "$ac_t""no" 1>&6
6056 have_krb5=no
6057 fi
6058
6059
6060                         cat >> confdefs.h <<\EOF
6061 #define HAVE_HEIMDAL_KERBEROS 1
6062 EOF
6063
6064                 else
6065                         have_krb5=no
6066                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6067                 fi
6068
6069                 if test $have_krb5 = yes ; then
6070                         ol_link_krb5=yes
6071
6072                         cat >> confdefs.h <<\EOF
6073 #define HAVE_KRB5 1
6074 EOF
6075
6076
6077                         if test $ol_enable_kpasswd != no ; then
6078                                 ol_link_kpasswd=yes;
6079                         fi
6080
6081                         if test $ol_with_kerberos = k5only ; then
6082                                 ol_with_kerberos=found
6083                         fi
6084
6085                 elif test $ol_with_kerberos != auto ; then
6086                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6087                 fi
6088
6089         fi
6090 fi
6091
6092 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6093         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6094
6095         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6096 do
6097 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6098 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6099 echo "configure:6100: checking for $ac_hdr" >&5
6100 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6101   echo $ac_n "(cached) $ac_c" 1>&6
6102 else
6103   cat > conftest.$ac_ext <<EOF
6104 #line 6105 "configure"
6105 #include "confdefs.h"
6106 #include <$ac_hdr>
6107 EOF
6108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6109 { (eval echo configure:6110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6111 if test -z "$ac_err"; then
6112   rm -rf conftest*
6113   eval "ac_cv_header_$ac_safe=yes"
6114 else
6115   echo "$ac_err" >&5
6116   echo "configure: failed program was:" >&5
6117   cat conftest.$ac_ext >&5
6118   rm -rf conftest*
6119   eval "ac_cv_header_$ac_safe=no"
6120 fi
6121 rm -f conftest*
6122 fi
6123 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6124   echo "$ac_t""yes" 1>&6
6125     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6126   cat >> confdefs.h <<EOF
6127 #define $ac_tr_hdr 1
6128 EOF
6129  
6130 else
6131   echo "$ac_t""no" 1>&6
6132 fi
6133 done
6134
6135
6136         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6137                 if test $krb5_impl = mit; then
6138                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6139 echo "configure:6140: checking for main in -lkrb4" >&5
6140 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6141 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6142   echo $ac_n "(cached) $ac_c" 1>&6
6143 else
6144   ac_save_LIBS="$LIBS"
6145 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6146 cat > conftest.$ac_ext <<EOF
6147 #line 6148 "configure"
6148 #include "confdefs.h"
6149
6150 int main() {
6151 main()
6152 ; return 0; }
6153 EOF
6154 if { (eval echo configure:6155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6155   rm -rf conftest*
6156   eval "ac_cv_lib_$ac_lib_var=yes"
6157 else
6158   echo "configure: failed program was:" >&5
6159   cat conftest.$ac_ext >&5
6160   rm -rf conftest*
6161   eval "ac_cv_lib_$ac_lib_var=no"
6162 fi
6163 rm -f conftest*
6164 LIBS="$ac_save_LIBS"
6165
6166 fi
6167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6168   echo "$ac_t""yes" 1>&6
6169   have_k425=yes
6170                                 KRB4_LIBS="-lkrb4 -ldes425"
6171 else
6172   echo "$ac_t""no" 1>&6
6173 have_k425=no
6174 fi
6175
6176
6177                 elif test $krb5_impl = heimdal; then
6178                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6179 echo "configure:6180: checking for main in -lkrb4" >&5
6180 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6181 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6182   echo $ac_n "(cached) $ac_c" 1>&6
6183 else
6184   ac_save_LIBS="$LIBS"
6185 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6186 cat > conftest.$ac_ext <<EOF
6187 #line 6188 "configure"
6188 #include "confdefs.h"
6189
6190 int main() {
6191 main()
6192 ; return 0; }
6193 EOF
6194 if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6195   rm -rf conftest*
6196   eval "ac_cv_lib_$ac_lib_var=yes"
6197 else
6198   echo "configure: failed program was:" >&5
6199   cat conftest.$ac_ext >&5
6200   rm -rf conftest*
6201   eval "ac_cv_lib_$ac_lib_var=no"
6202 fi
6203 rm -f conftest*
6204 LIBS="$ac_save_LIBS"
6205
6206 fi
6207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6208   echo "$ac_t""yes" 1>&6
6209   have_k425=yes
6210                                 KRB4_LIBS="-lkrb4"
6211 else
6212   echo "$ac_t""no" 1>&6
6213 have_k425=no
6214 fi
6215
6216
6217                 else
6218                         have_425=no
6219                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6220                 fi
6221
6222                 if test $have_k425 = yes ; then
6223                         ol_with_kerberos=found
6224                         ol_link_krb4=yes
6225
6226                         cat >> confdefs.h <<\EOF
6227 #define HAVE_KRB425 1
6228 EOF
6229
6230                         cat >> confdefs.h <<\EOF
6231 #define HAVE_KRB4 1
6232 EOF
6233
6234
6235                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6236 echo "configure:6237: checking for des_debug in Kerberos libraries" >&5
6237 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6238   echo $ac_n "(cached) $ac_c" 1>&6
6239 else
6240   
6241                                                                 save_LIBS="$LIBS"
6242                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6243                                 cat > conftest.$ac_ext <<EOF
6244 #line 6245 "configure"
6245 #include "confdefs.h"
6246
6247 #include <kerberosIV/krb.h>
6248 #include <kerberosIV/des.h>
6249 extern int des_debug;
6250
6251 int main() {
6252
6253 des_debug = 1;
6254
6255 ; return 0; }
6256 EOF
6257 if { (eval echo configure:6258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6258   rm -rf conftest*
6259   ol_cv_var_des_debug=yes
6260 else
6261   echo "configure: failed program was:" >&5
6262   cat conftest.$ac_ext >&5
6263   rm -rf conftest*
6264   ol_cv_var_des_debug=no
6265 fi
6266 rm -f conftest*
6267                                                                 LIBS="$save_LIBS"
6268                         
6269 fi
6270
6271 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6272
6273                         if test $ol_cv_var_des_debug = yes ; then
6274                                 cat >> confdefs.h <<\EOF
6275 #define HAVE_DES_DEBUG 1
6276 EOF
6277
6278                         fi
6279
6280                         LIBS="$save_LIBS"
6281                 fi
6282         fi
6283 fi
6284
6285 if test $ol_link_krb5 = yes ; then
6286         ol_with_kerberos=found
6287 fi
6288
6289 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6290         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6291
6292         for ac_hdr in krb.h des.h krb-archaeology.h 
6293 do
6294 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6295 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6296 echo "configure:6297: checking for $ac_hdr" >&5
6297 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6298   echo $ac_n "(cached) $ac_c" 1>&6
6299 else
6300   cat > conftest.$ac_ext <<EOF
6301 #line 6302 "configure"
6302 #include "confdefs.h"
6303 #include <$ac_hdr>
6304 EOF
6305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6306 { (eval echo configure:6307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6308 if test -z "$ac_err"; then
6309   rm -rf conftest*
6310   eval "ac_cv_header_$ac_safe=yes"
6311 else
6312   echo "$ac_err" >&5
6313   echo "configure: failed program was:" >&5
6314   cat conftest.$ac_ext >&5
6315   rm -rf conftest*
6316   eval "ac_cv_header_$ac_safe=no"
6317 fi
6318 rm -f conftest*
6319 fi
6320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6321   echo "$ac_t""yes" 1>&6
6322     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6323   cat >> confdefs.h <<EOF
6324 #define $ac_tr_hdr 1
6325 EOF
6326  
6327 else
6328   echo "$ac_t""no" 1>&6
6329 fi
6330 done
6331
6332
6333         if test $ac_cv_header_krb_h = yes ; then
6334                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6335 echo "configure:6336: checking for main in -lkrb" >&5
6336 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6337 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6338   echo $ac_n "(cached) $ac_c" 1>&6
6339 else
6340   ac_save_LIBS="$LIBS"
6341 LIBS="-lkrb -ldes $LIBS"
6342 cat > conftest.$ac_ext <<EOF
6343 #line 6344 "configure"
6344 #include "confdefs.h"
6345
6346 int main() {
6347 main()
6348 ; return 0; }
6349 EOF
6350 if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6351   rm -rf conftest*
6352   eval "ac_cv_lib_$ac_lib_var=yes"
6353 else
6354   echo "configure: failed program was:" >&5
6355   cat conftest.$ac_ext >&5
6356   rm -rf conftest*
6357   eval "ac_cv_lib_$ac_lib_var=no"
6358 fi
6359 rm -f conftest*
6360 LIBS="$ac_save_LIBS"
6361
6362 fi
6363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6364   echo "$ac_t""yes" 1>&6
6365   have_k4=yes
6366 else
6367   echo "$ac_t""no" 1>&6
6368 have_k4=no
6369 fi
6370
6371
6372                 if test $have_k4 = yes ; then
6373                         ol_with_kerberos=found
6374                         ol_link_krb4=yes
6375
6376                         cat >> confdefs.h <<\EOF
6377 #define HAVE_KRB4 1
6378 EOF
6379
6380
6381                         KRB4_LIBS="-lkrb -ldes"
6382
6383                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6384                                 cat >> confdefs.h <<\EOF
6385 #define HAVE_KTH_KERBEROS 1
6386 EOF
6387
6388                         fi
6389                 fi
6390         fi
6391 fi
6392
6393 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6394         ol_link_kpasswd=yes
6395 fi
6396
6397 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6398         ol_link_kbind=yes
6399
6400 elif test $ol_enable_kbind = yes ; then
6401         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6402 fi
6403
6404 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6405         cat >> confdefs.h <<\EOF
6406 #define HAVE_KERBEROS 1
6407 EOF
6408
6409
6410 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6411         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6412 fi
6413
6414 ol_link_tls=no
6415 if test $ol_with_tls != no ; then
6416         for ac_hdr in openssl/ssl.h ssl.h
6417 do
6418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6420 echo "configure:6421: checking for $ac_hdr" >&5
6421 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6422   echo $ac_n "(cached) $ac_c" 1>&6
6423 else
6424   cat > conftest.$ac_ext <<EOF
6425 #line 6426 "configure"
6426 #include "confdefs.h"
6427 #include <$ac_hdr>
6428 EOF
6429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6430 { (eval echo configure:6431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6432 if test -z "$ac_err"; then
6433   rm -rf conftest*
6434   eval "ac_cv_header_$ac_safe=yes"
6435 else
6436   echo "$ac_err" >&5
6437   echo "configure: failed program was:" >&5
6438   cat conftest.$ac_ext >&5
6439   rm -rf conftest*
6440   eval "ac_cv_header_$ac_safe=no"
6441 fi
6442 rm -f conftest*
6443 fi
6444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6445   echo "$ac_t""yes" 1>&6
6446     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6447   cat >> confdefs.h <<EOF
6448 #define $ac_tr_hdr 1
6449 EOF
6450  
6451 else
6452   echo "$ac_t""no" 1>&6
6453 fi
6454 done
6455
6456         
6457         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6458                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6459 echo "configure:6460: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6460 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6461 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6462   echo $ac_n "(cached) $ac_c" 1>&6
6463 else
6464   ac_save_LIBS="$LIBS"
6465 LIBS="-lssl -lcrypto $LIBS"
6466 cat > conftest.$ac_ext <<EOF
6467 #line 6468 "configure"
6468 #include "confdefs.h"
6469 /* Override any gcc2 internal prototype to avoid an error.  */
6470 /* We use char because int might match the return type of a gcc2
6471     builtin and then its argument prototype would still apply.  */
6472 char SSLeay_add_ssl_algorithms();
6473
6474 int main() {
6475 SSLeay_add_ssl_algorithms()
6476 ; return 0; }
6477 EOF
6478 if { (eval echo configure:6479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6479   rm -rf conftest*
6480   eval "ac_cv_lib_$ac_lib_var=yes"
6481 else
6482   echo "configure: failed program was:" >&5
6483   cat conftest.$ac_ext >&5
6484   rm -rf conftest*
6485   eval "ac_cv_lib_$ac_lib_var=no"
6486 fi
6487 rm -f conftest*
6488 LIBS="$ac_save_LIBS"
6489
6490 fi
6491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6492   echo "$ac_t""yes" 1>&6
6493   have_ssleay=yes
6494                         need_rsaref=no
6495 else
6496   echo "$ac_t""no" 1>&6
6497 have_ssleay=no
6498 fi
6499
6500                         
6501                 if test $have_ssleay = no ; then
6502                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6503 echo "configure:6504: checking for SSL_library_init in -lssl" >&5
6504 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6505 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6506   echo $ac_n "(cached) $ac_c" 1>&6
6507 else
6508   ac_save_LIBS="$LIBS"
6509 LIBS="-lssl -lcrypto $LIBS"
6510 cat > conftest.$ac_ext <<EOF
6511 #line 6512 "configure"
6512 #include "confdefs.h"
6513 /* Override any gcc2 internal prototype to avoid an error.  */
6514 /* We use char because int might match the return type of a gcc2
6515     builtin and then its argument prototype would still apply.  */
6516 char SSL_library_init();
6517
6518 int main() {
6519 SSL_library_init()
6520 ; return 0; }
6521 EOF
6522 if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6523   rm -rf conftest*
6524   eval "ac_cv_lib_$ac_lib_var=yes"
6525 else
6526   echo "configure: failed program was:" >&5
6527   cat conftest.$ac_ext >&5
6528   rm -rf conftest*
6529   eval "ac_cv_lib_$ac_lib_var=no"
6530 fi
6531 rm -f conftest*
6532 LIBS="$ac_save_LIBS"
6533
6534 fi
6535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6536   echo "$ac_t""yes" 1>&6
6537   have_ssleay=yes
6538                                 need_rsaref=no
6539 else
6540   echo "$ac_t""no" 1>&6
6541 have_ssleay=no
6542 fi
6543
6544                 fi
6545
6546                 if test $have_ssleay = no ; then
6547                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6548 echo "configure:6549: checking for ssl3_accept in -lssl" >&5
6549 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6551   echo $ac_n "(cached) $ac_c" 1>&6
6552 else
6553   ac_save_LIBS="$LIBS"
6554 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6555 cat > conftest.$ac_ext <<EOF
6556 #line 6557 "configure"
6557 #include "confdefs.h"
6558 /* Override any gcc2 internal prototype to avoid an error.  */
6559 /* We use char because int might match the return type of a gcc2
6560     builtin and then its argument prototype would still apply.  */
6561 char ssl3_accept();
6562
6563 int main() {
6564 ssl3_accept()
6565 ; return 0; }
6566 EOF
6567 if { (eval echo configure:6568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6568   rm -rf conftest*
6569   eval "ac_cv_lib_$ac_lib_var=yes"
6570 else
6571   echo "configure: failed program was:" >&5
6572   cat conftest.$ac_ext >&5
6573   rm -rf conftest*
6574   eval "ac_cv_lib_$ac_lib_var=no"
6575 fi
6576 rm -f conftest*
6577 LIBS="$ac_save_LIBS"
6578
6579 fi
6580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6581   echo "$ac_t""yes" 1>&6
6582   have_ssleay=yes
6583                                 need_rsaref=yes
6584 else
6585   echo "$ac_t""no" 1>&6
6586 have_ssleay=no
6587 fi
6588
6589                 fi
6590
6591                 if test $have_ssleay = yes ; then
6592                         ol_with_tls=found
6593                         ol_link_tls=yes
6594
6595                         cat >> confdefs.h <<\EOF
6596 #define HAVE_SSLEAY 1
6597 EOF
6598
6599
6600                         if test $need_rsaref = yes; then
6601                                 cat >> confdefs.h <<\EOF
6602 #define HAVE_RSAREF 1
6603 EOF
6604
6605
6606                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6607                         else
6608                                 TLS_LIBS="-lssl -lcrypto"
6609                         fi
6610                 fi
6611         fi
6612
6613 else
6614         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6615 fi
6616
6617 if test $ol_link_tls = yes ; then
6618         cat >> confdefs.h <<\EOF
6619 #define HAVE_TLS 1
6620 EOF
6621
6622
6623 elif test $ol_with_tls = auto ; then
6624         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6625         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6626
6627 elif test $ol_with_tls != no ; then
6628         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6629 fi
6630
6631 for ac_func in \
6632         ctime_r                 \
6633         gethostbyname_r gethostbyaddr_r \
6634
6635 do
6636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6637 echo "configure:6638: checking for $ac_func" >&5
6638 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6639   echo $ac_n "(cached) $ac_c" 1>&6
6640 else
6641   cat > conftest.$ac_ext <<EOF
6642 #line 6643 "configure"
6643 #include "confdefs.h"
6644 /* System header to define __stub macros and hopefully few prototypes,
6645     which can conflict with char $ac_func(); below.  */
6646 #include <assert.h>
6647 /* Override any gcc2 internal prototype to avoid an error.  */
6648 /* We use char because int might match the return type of a gcc2
6649     builtin and then its argument prototype would still apply.  */
6650 char $ac_func();
6651 char (*f)();
6652
6653 int main() {
6654
6655 /* The GNU C library defines this for functions which it implements
6656     to always fail with ENOSYS.  Some functions are actually named
6657     something starting with __ and the normal name is an alias.  */
6658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6659 choke me
6660 #else
6661 f = $ac_func;
6662 #endif
6663
6664 ; return 0; }
6665 EOF
6666 if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6667   rm -rf conftest*
6668   eval "ac_cv_func_$ac_func=yes"
6669 else
6670   echo "configure: failed program was:" >&5
6671   cat conftest.$ac_ext >&5
6672   rm -rf conftest*
6673   eval "ac_cv_func_$ac_func=no"
6674 fi
6675 rm -f conftest*
6676 fi
6677
6678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6679   echo "$ac_t""yes" 1>&6
6680     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6681   cat >> confdefs.h <<EOF
6682 #define $ac_tr_func 1
6683 EOF
6684  
6685 else
6686   echo "$ac_t""no" 1>&6
6687 fi
6688 done
6689
6690
6691 if test "$ac_cv_func_ctime_r" = no ; then
6692         ol_cv_func_ctime_r_nargs=0
6693 else
6694         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6695 echo "configure:6696: checking number of arguments of ctime_r" >&5
6696 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6697   echo $ac_n "(cached) $ac_c" 1>&6
6698 else
6699   cat > conftest.$ac_ext <<EOF
6700 #line 6701 "configure"
6701 #include "confdefs.h"
6702 #include <time.h>
6703 int main() {
6704 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6705 ; return 0; }
6706 EOF
6707 if { (eval echo configure:6708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6708   rm -rf conftest*
6709   ol_cv_func_ctime_r_nargs3=yes
6710 else
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -rf conftest*
6714   ol_cv_func_ctime_r_nargs3=no
6715 fi
6716 rm -f conftest*
6717
6718         cat > conftest.$ac_ext <<EOF
6719 #line 6720 "configure"
6720 #include "confdefs.h"
6721 #include <time.h>
6722 int main() {
6723 time_t ti; char *buffer; ctime_r(&ti,buffer);
6724 ; return 0; }
6725 EOF
6726 if { (eval echo configure:6727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6727   rm -rf conftest*
6728   ol_cv_func_ctime_r_nargs2=yes
6729 else
6730   echo "configure: failed program was:" >&5
6731   cat conftest.$ac_ext >&5
6732   rm -rf conftest*
6733   ol_cv_func_ctime_r_nargs2=no
6734 fi
6735 rm -f conftest*
6736
6737         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6738                 $ol_cv_func_ctime_r_nargs2 = no ; then
6739
6740                 ol_cv_func_ctime_r_nargs=3
6741
6742         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6743                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6744
6745                 ol_cv_func_ctime_r_nargs=2
6746
6747         else
6748                 ol_cv_func_ctime_r_nargs=0
6749         fi
6750   
6751 fi
6752
6753 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6754
6755   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6756         cat >> confdefs.h <<EOF
6757 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6758 EOF
6759
6760   fi
6761
6762 fi
6763
6764 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6765         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6766 echo "configure:6767: checking number of arguments of gethostbyname_r" >&5
6767 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6768   echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770   cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 #include <sys/types.h>
6774 #include <sys/socket.h>
6775 #include <netinet/in.h>
6776 #include <netdb.h>
6777 #define BUFSIZE (sizeof(struct hostent)+10)
6778 int main() {
6779 struct hostent hent; char buffer[BUFSIZE];
6780                 int bufsize=BUFSIZE;int h_errno;
6781                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6782                         buffer, bufsize, &h_errno);
6783 ; return 0; }
6784 EOF
6785 if { (eval echo configure:6786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6786   rm -rf conftest*
6787   ol_cv_func_gethostbyname_r_nargs5=yes
6788 else
6789   echo "configure: failed program was:" >&5
6790   cat conftest.$ac_ext >&5
6791   rm -rf conftest*
6792   ol_cv_func_gethostbyname_r_nargs5=no
6793 fi
6794 rm -f conftest*
6795
6796         cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6799 #include <sys/types.h>
6800 #include <sys/socket.h>
6801 #include <netinet/in.h>
6802 #include <netdb.h>
6803 #define BUFSIZE (sizeof(struct hostent)+10)
6804 int main() {
6805 struct hostent hent;struct hostent *rhent;
6806                 char buffer[BUFSIZE];
6807                 int bufsize=BUFSIZE;int h_errno;
6808                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6809                         &rhent, &h_errno);
6810 ; return 0; }
6811 EOF
6812 if { (eval echo configure:6813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6813   rm -rf conftest*
6814   ol_cv_func_gethostbyname_r_nargs6=yes
6815 else
6816   echo "configure: failed program was:" >&5
6817   cat conftest.$ac_ext >&5
6818   rm -rf conftest*
6819   ol_cv_func_gethostbyname_r_nargs6=no
6820 fi
6821 rm -f conftest*
6822
6823         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6824                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6825
6826                 ol_cv_func_gethostbyname_r_nargs=5
6827
6828         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6829                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6830
6831                 ol_cv_func_gethostbyname_r_nargs=6
6832
6833         else
6834                 ol_cv_func_gethostbyname_r_nargs=0
6835         fi
6836   
6837 fi
6838
6839 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6840   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6841         cat >> confdefs.h <<EOF
6842 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6843 EOF
6844
6845   fi
6846
6847 else
6848         ol_cv_func_gethostbyname_r_nargs=0
6849 fi
6850  
6851 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6852         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6853 echo "configure:6854: checking number of arguments of gethostbyaddr_r" >&5
6854 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6855   echo $ac_n "(cached) $ac_c" 1>&6
6856 else
6857   cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 #include <sys/types.h>
6861 #include <sys/socket.h>
6862 #include <netinet/in.h>
6863 #include <netdb.h>
6864 #define BUFSIZE (sizeof(struct hostent)+10)
6865 int main() {
6866 struct hostent hent; char buffer[BUFSIZE]; 
6867             struct in_addr add;
6868             size_t alen=sizeof(struct in_addr);
6869             int bufsize=BUFSIZE;int h_errno;
6870                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6871                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6872 ; return 0; }
6873 EOF
6874 if { (eval echo configure:6875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6875   rm -rf conftest*
6876   ol_cv_func_gethostbyaddr_r_nargs7=yes
6877 else
6878   echo "configure: failed program was:" >&5
6879   cat conftest.$ac_ext >&5
6880   rm -rf conftest*
6881   ol_cv_func_gethostbyaddr_r_nargs7=no
6882 fi
6883 rm -f conftest*
6884
6885         cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 #include <sys/types.h>
6889 #include <sys/socket.h>
6890 #include <netinet/in.h>
6891 #include <netdb.h>
6892 #define BUFSIZE (sizeof(struct hostent)+10)
6893 int main() {
6894 struct hostent hent;
6895                 struct hostent *rhent; char buffer[BUFSIZE]; 
6896                 struct in_addr add;
6897                 size_t alen=sizeof(struct in_addr);
6898                 int bufsize=BUFSIZE;int h_errno;
6899                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6900                         alen, AF_INET, &hent, buffer, bufsize, 
6901                         &rhent, &h_errno);
6902 ; return 0; }
6903 EOF
6904 if { (eval echo configure:6905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6905   rm -rf conftest*
6906   ol_cv_func_gethostbyaddr_r_nargs8=yes
6907 else
6908   echo "configure: failed program was:" >&5
6909   cat conftest.$ac_ext >&5
6910   rm -rf conftest*
6911   ol_cv_func_gethostbyaddr_r_nargs8=no
6912 fi
6913 rm -f conftest*
6914
6915         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6916                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6917
6918                 ol_cv_func_gethostbyaddr_r_nargs=7
6919
6920         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6921                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6922
6923                 ol_cv_func_gethostbyaddr_r_nargs=8
6924
6925         else
6926                 ol_cv_func_gethostbyaddr_r_nargs=0
6927         fi
6928   
6929 fi
6930
6931 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6932   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6933     cat >> confdefs.h <<EOF
6934 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6935 EOF
6936
6937   fi
6938
6939 else
6940         ol_cv_func_gethostbyaddr_r_nargs=0
6941 fi
6942
6943 if test "$ac_cv_func_ctime_r" = yes \
6944         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6945         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6946         -a "$ac_cv_func_gethostbyname_r" = yes \
6947         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6948         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6949         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6950         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6951         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6952         ; then
6953  
6954         cat >> confdefs.h <<\EOF
6955 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6956 EOF
6957
6958 fi
6959
6960 ol_link_threads=no
6961
6962 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6963         -o $ol_with_threads = nt ; then
6964
6965         
6966         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6967 echo "configure:6968: checking for NT Threads" >&5
6968 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   
6972                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6973 echo "configure:6974: checking for _beginthread" >&5
6974 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6975   echo $ac_n "(cached) $ac_c" 1>&6
6976 else
6977   cat > conftest.$ac_ext <<EOF
6978 #line 6979 "configure"
6979 #include "confdefs.h"
6980 /* System header to define __stub macros and hopefully few prototypes,
6981     which can conflict with char _beginthread(); below.  */
6982 #include <assert.h>
6983 /* Override any gcc2 internal prototype to avoid an error.  */
6984 /* We use char because int might match the return type of a gcc2
6985     builtin and then its argument prototype would still apply.  */
6986 char _beginthread();
6987 char (*f)();
6988
6989 int main() {
6990
6991 /* The GNU C library defines this for functions which it implements
6992     to always fail with ENOSYS.  Some functions are actually named
6993     something starting with __ and the normal name is an alias.  */
6994 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6995 choke me
6996 #else
6997 f = _beginthread;
6998 #endif
6999
7000 ; return 0; }
7001 EOF
7002 if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7003   rm -rf conftest*
7004   eval "ac_cv_func__beginthread=yes"
7005 else
7006   echo "configure: failed program was:" >&5
7007   cat conftest.$ac_ext >&5
7008   rm -rf conftest*
7009   eval "ac_cv_func__beginthread=no"
7010 fi
7011 rm -f conftest*
7012 fi
7013
7014 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7015   echo "$ac_t""yes" 1>&6
7016   ol_cv_nt_threads=yes
7017 else
7018   echo "$ac_t""no" 1>&6
7019 ol_cv_nt_threads=no
7020 fi
7021
7022         
7023 fi
7024
7025 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7026
7027         if test $ol_cv_nt_threads = yes ; then
7028                 cat >> confdefs.h <<\EOF
7029 #define HAVE_NT_THREADS 1
7030 EOF
7031
7032         fi
7033
7034
7035         if test "$ol_cv_nt_threads" = yes ; then
7036         ol_link_threads=nt
7037         ol_with_threads=found
7038         ol_with_yielding_select=yes
7039
7040                 cat >> confdefs.h <<\EOF
7041 #define HAVE_NT_SERVICE_MANAGER 1
7042 EOF
7043
7044                 cat >> confdefs.h <<\EOF
7045 #define HAVE_NT_EVENT_LOG 1
7046 EOF
7047
7048         fi
7049
7050         if test $ol_with_threads = nt ; then
7051                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7052         fi
7053 fi
7054
7055 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7056         -o $ol_with_threads = posix ; then
7057
7058         for ac_hdr in pthread.h
7059 do
7060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7062 echo "configure:7063: checking for $ac_hdr" >&5
7063 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7064   echo $ac_n "(cached) $ac_c" 1>&6
7065 else
7066   cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7069 #include <$ac_hdr>
7070 EOF
7071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7072 { (eval echo configure:7073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7074 if test -z "$ac_err"; then
7075   rm -rf conftest*
7076   eval "ac_cv_header_$ac_safe=yes"
7077 else
7078   echo "$ac_err" >&5
7079   echo "configure: failed program was:" >&5
7080   cat conftest.$ac_ext >&5
7081   rm -rf conftest*
7082   eval "ac_cv_header_$ac_safe=no"
7083 fi
7084 rm -f conftest*
7085 fi
7086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7087   echo "$ac_t""yes" 1>&6
7088     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7089   cat >> confdefs.h <<EOF
7090 #define $ac_tr_hdr 1
7091 EOF
7092  
7093 else
7094   echo "$ac_t""no" 1>&6
7095 fi
7096 done
7097
7098
7099         if test $ac_cv_header_pthread_h = yes ; then
7100                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7101 echo "configure:7102: checking POSIX thread version" >&5
7102 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7103   echo $ac_n "(cached) $ac_c" 1>&6
7104 else
7105   
7106         cat > conftest.$ac_ext <<EOF
7107 #line 7108 "configure"
7108 #include "confdefs.h"
7109
7110 #               include <pthread.h>
7111                 /* this check could be improved */
7112 #               ifdef PTHREAD_ONCE_INIT
7113                         pthread_version_final;
7114 #               endif
7115         
7116 EOF
7117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7118   egrep "pthread_version_final" >/dev/null 2>&1; then
7119   rm -rf conftest*
7120   ol_pthread_final=yes
7121 else
7122   rm -rf conftest*
7123   ol_pthread_final=no
7124 fi
7125 rm -f conftest*
7126
7127
7128         cat > conftest.$ac_ext <<EOF
7129 #line 7130 "configure"
7130 #include "confdefs.h"
7131
7132 #               include <pthread.h>
7133                 /* this check could be improved */
7134 #               ifdef pthread_once_init
7135                         pthread_version_draft4;
7136 #               endif
7137         
7138 EOF
7139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7140   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7141   rm -rf conftest*
7142   ol_pthread_draft4=yes
7143 else
7144   rm -rf conftest*
7145   ol_pthread_draft4=no
7146 fi
7147 rm -f conftest*
7148
7149
7150         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7151                 ol_cv_pthread_version=final
7152         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7153                 ol_cv_pthread_version=draft4
7154         else
7155                 ol_cv_pthread_version=unknown
7156         fi
7157
7158 fi
7159
7160 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7161
7162
7163                 if test $ol_cv_pthread_version = final ; then
7164                         cat >> confdefs.h <<\EOF
7165 #define HAVE_PTHREADS_FINAL 1
7166 EOF
7167
7168                 elif test $ol_cv_pthread_version = draft4 ; then
7169                         cat >> confdefs.h <<\EOF
7170 #define HAVE_PTHREADS_D4 1
7171 EOF
7172
7173                 else
7174                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7175                 fi
7176
7177                 # consider threads found
7178                 ol_with_threads=found
7179
7180                 
7181         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7182 echo "configure:7183: checking for LinuxThreads pthread.h" >&5
7183 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7184   echo $ac_n "(cached) $ac_c" 1>&6
7185 else
7186   cat > conftest.$ac_ext <<EOF
7187 #line 7188 "configure"
7188 #include "confdefs.h"
7189 #include <pthread.h>
7190 EOF
7191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7192   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7193   rm -rf conftest*
7194   ol_cv_header_linux_threads=yes
7195 else
7196   rm -rf conftest*
7197   ol_cv_header_linux_threads=no
7198 fi
7199 rm -f conftest*
7200
7201                 
7202 fi
7203
7204 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7205         if test $ol_cv_header_linux_threads = yes; then
7206                 cat >> confdefs.h <<\EOF
7207 #define HAVE_LINUX_THREADS 1
7208 EOF
7209
7210         fi
7211
7212                 
7213         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7214 echo "configure:7215: checking for GNU Pth pthread.h" >&5
7215 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7216   echo $ac_n "(cached) $ac_c" 1>&6
7217 else
7218   cat > conftest.$ac_ext <<EOF
7219 #line 7220 "configure"
7220 #include "confdefs.h"
7221 #include <pthread.h>
7222 #ifdef _POSIX_THREAD_IS_GNU_PTH
7223         __gnu_pth__;
7224 #endif
7225
7226 EOF
7227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7228   egrep "__gnu_pth__" >/dev/null 2>&1; then
7229   rm -rf conftest*
7230   ol_cv_header_gnu_pth_pthread_h=yes
7231 else
7232   rm -rf conftest*
7233   ol_cv_header_gnu_pth_pthread_h=no
7234 fi
7235 rm -f conftest*
7236
7237                 
7238 fi
7239
7240 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7241
7242
7243                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7244                         for ac_hdr in sched.h
7245 do
7246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7248 echo "configure:7249: checking for $ac_hdr" >&5
7249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7250   echo $ac_n "(cached) $ac_c" 1>&6
7251 else
7252   cat > conftest.$ac_ext <<EOF
7253 #line 7254 "configure"
7254 #include "confdefs.h"
7255 #include <$ac_hdr>
7256 EOF
7257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7258 { (eval echo configure:7259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7260 if test -z "$ac_err"; then
7261   rm -rf conftest*
7262   eval "ac_cv_header_$ac_safe=yes"
7263 else
7264   echo "$ac_err" >&5
7265   echo "configure: failed program was:" >&5
7266   cat conftest.$ac_ext >&5
7267   rm -rf conftest*
7268   eval "ac_cv_header_$ac_safe=no"
7269 fi
7270 rm -f conftest*
7271 fi
7272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7273   echo "$ac_t""yes" 1>&6
7274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7275   cat >> confdefs.h <<EOF
7276 #define $ac_tr_hdr 1
7277 EOF
7278  
7279 else
7280   echo "$ac_t""no" 1>&6
7281 fi
7282 done
7283
7284                 fi
7285
7286                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7287                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7288 echo "configure:7289: checking for pthread_create in default libraries" >&5
7289 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7290   echo $ac_n "(cached) $ac_c" 1>&6
7291 else
7292   
7293                 if test "$cross_compiling" = yes; then
7294   cat > conftest.$ac_ext <<EOF
7295 #line 7296 "configure"
7296 #include "confdefs.h"
7297 /* pthread test headers */
7298 #include <pthread.h>
7299 #ifndef NULL
7300 #define NULL (void*)0
7301 #endif
7302
7303 static void *task(p)
7304         void *p;
7305 {
7306         return (void *) (p == NULL);
7307 }
7308
7309 int main() {
7310
7311         /* pthread test function */
7312         pthread_t t;
7313         int status;
7314 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7315         /* This system (e.g. AIX) defaults detached; must override */
7316         pthread_attr_t attr;
7317
7318         status = pthread_attr_init(&attr);
7319         if( status ) exit( status );
7320
7321         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7322         if( status ) exit( status );
7323
7324 #define ATTR    &attr
7325 #else
7326 #if HAVE_PTHREADS_D4
7327 #define ATTR    pthread_attr_default
7328 #else
7329 #define ATTR    NULL
7330 #endif
7331 #endif
7332         /* make sure pthread_create() isn't just a stub */
7333         status = pthread_create(&t, ATTR, task, NULL);
7334         if( status ) exit( status );
7335
7336         /* make sure pthread_detach() isn't just a stub */
7337 #if HAVE_PTHREADS_D4
7338         status = pthread_detach( &t );
7339 #else
7340         status = pthread_detach( t );
7341 #endif
7342
7343 #ifdef HAVE_LINUX_THREADS
7344         pthread_kill_other_threads_np();
7345 #endif
7346
7347         exit( status );
7348
7349 ; return 0; }
7350 EOF
7351 if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7352   rm -rf conftest*
7353   ol_cv_pthread_create=yes
7354 else
7355   echo "configure: failed program was:" >&5
7356   cat conftest.$ac_ext >&5
7357   rm -rf conftest*
7358   ol_cv_pthread_create=no
7359 fi
7360 rm -f conftest*
7361 else
7362   cat > conftest.$ac_ext <<EOF
7363 #line 7364 "configure"
7364 #include "confdefs.h"
7365 /* pthread test headers */
7366 #include <pthread.h>
7367 #ifndef NULL
7368 #define NULL (void*)0
7369 #endif
7370
7371 static void *task(p)
7372         void *p;
7373 {
7374         return (void *) (p == NULL);
7375 }
7376
7377
7378 int main(argc, argv)
7379         int argc;
7380         char **argv;
7381 {
7382
7383         /* pthread test function */
7384         pthread_t t;
7385         int status;
7386 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7387         /* This system (e.g. AIX) defaults detached; must override */
7388         pthread_attr_t attr;
7389
7390         status = pthread_attr_init(&attr);
7391         if( status ) exit( status );
7392
7393         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7394         if( status ) exit( status );
7395
7396 #define ATTR    &attr
7397 #else
7398 #if HAVE_PTHREADS_D4
7399 #define ATTR    pthread_attr_default
7400 #else
7401 #define ATTR    NULL
7402 #endif
7403 #endif
7404         /* make sure pthread_create() isn't just a stub */
7405         status = pthread_create(&t, ATTR, task, NULL);
7406         if( status ) exit( status );
7407
7408         /* make sure pthread_detach() isn't just a stub */
7409 #if HAVE_PTHREADS_D4
7410         status = pthread_detach( &t );
7411 #else
7412         status = pthread_detach( t );
7413 #endif
7414
7415 #ifdef HAVE_LINUX_THREADS
7416         pthread_kill_other_threads_np();
7417 #endif
7418
7419         exit( status );
7420
7421 }
7422
7423 EOF
7424 if { (eval echo configure:7425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7425 then
7426   ol_cv_pthread_create=yes
7427 else
7428   echo "configure: failed program was:" >&5
7429   cat conftest.$ac_ext >&5
7430   rm -fr conftest*
7431   ol_cv_pthread_create=no
7432 fi
7433 rm -fr conftest*
7434 fi
7435
7436 fi
7437
7438 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7439
7440                 if test $ol_cv_pthread_create != no ; then
7441                         ol_link_threads=posix
7442                         ol_link_pthreads=""
7443                 fi
7444                 
7445                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7446 if test "$ol_link_threads" = no ; then
7447         # try -kthread
7448         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7449 echo "configure:7450: checking for pthread link with -kthread" >&5
7450 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7451   echo $ac_n "(cached) $ac_c" 1>&6
7452 else
7453   
7454                 # save the flags
7455                 ol_LIBS="$LIBS"
7456                 LIBS="-kthread $LIBS"
7457
7458                 if test "$cross_compiling" = yes; then
7459   cat > conftest.$ac_ext <<EOF
7460 #line 7461 "configure"
7461 #include "confdefs.h"
7462 /* pthread test headers */
7463 #include <pthread.h>
7464 #ifndef NULL
7465 #define NULL (void*)0
7466 #endif
7467
7468 static void *task(p)
7469         void *p;
7470 {
7471         return (void *) (p == NULL);
7472 }
7473
7474 int main() {
7475
7476         /* pthread test function */
7477         pthread_t t;
7478         int status;
7479 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7480         /* This system (e.g. AIX) defaults detached; must override */
7481         pthread_attr_t attr;
7482
7483         status = pthread_attr_init(&attr);
7484         if( status ) exit( status );
7485
7486         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7487         if( status ) exit( status );
7488
7489 #define ATTR    &attr
7490 #else
7491 #if HAVE_PTHREADS_D4
7492 #define ATTR    pthread_attr_default
7493 #else
7494 #define ATTR    NULL
7495 #endif
7496 #endif
7497         /* make sure pthread_create() isn't just a stub */
7498         status = pthread_create(&t, ATTR, task, NULL);
7499         if( status ) exit( status );
7500
7501         /* make sure pthread_detach() isn't just a stub */
7502 #if HAVE_PTHREADS_D4
7503         status = pthread_detach( &t );
7504 #else
7505         status = pthread_detach( t );
7506 #endif
7507
7508 #ifdef HAVE_LINUX_THREADS
7509         pthread_kill_other_threads_np();
7510 #endif
7511
7512         exit( status );
7513
7514 ; return 0; }
7515 EOF
7516 if { (eval echo configure:7517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7517   rm -rf conftest*
7518   ol_cv_pthread_kthread=yes
7519 else
7520   echo "configure: failed program was:" >&5
7521   cat conftest.$ac_ext >&5
7522   rm -rf conftest*
7523   ol_cv_pthread_kthread=no
7524 fi
7525 rm -f conftest*
7526 else
7527   cat > conftest.$ac_ext <<EOF
7528 #line 7529 "configure"
7529 #include "confdefs.h"
7530 /* pthread test headers */
7531 #include <pthread.h>
7532 #ifndef NULL
7533 #define NULL (void*)0
7534 #endif
7535
7536 static void *task(p)
7537         void *p;
7538 {
7539         return (void *) (p == NULL);
7540 }
7541
7542
7543 int main(argc, argv)
7544         int argc;
7545         char **argv;
7546 {
7547
7548         /* pthread test function */
7549         pthread_t t;
7550         int status;
7551 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7552         /* This system (e.g. AIX) defaults detached; must override */
7553         pthread_attr_t attr;
7554
7555         status = pthread_attr_init(&attr);
7556         if( status ) exit( status );
7557
7558         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7559         if( status ) exit( status );
7560
7561 #define ATTR    &attr
7562 #else
7563 #if HAVE_PTHREADS_D4
7564 #define ATTR    pthread_attr_default
7565 #else
7566 #define ATTR    NULL
7567 #endif
7568 #endif
7569         /* make sure pthread_create() isn't just a stub */
7570         status = pthread_create(&t, ATTR, task, NULL);
7571         if( status ) exit( status );
7572
7573         /* make sure pthread_detach() isn't just a stub */
7574 #if HAVE_PTHREADS_D4
7575         status = pthread_detach( &t );
7576 #else
7577         status = pthread_detach( t );
7578 #endif
7579
7580 #ifdef HAVE_LINUX_THREADS
7581         pthread_kill_other_threads_np();
7582 #endif
7583
7584         exit( status );
7585
7586 }
7587
7588 EOF
7589 if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7590 then
7591   ol_cv_pthread_kthread=yes
7592 else
7593   echo "configure: failed program was:" >&5
7594   cat conftest.$ac_ext >&5
7595   rm -fr conftest*
7596   ol_cv_pthread_kthread=no
7597 fi
7598 rm -fr conftest*
7599 fi
7600
7601
7602                 # restore the LIBS
7603                 LIBS="$ol_LIBS"
7604         
7605 fi
7606
7607 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7608
7609         if test $ol_cv_pthread_kthread = yes ; then
7610                 ol_link_pthreads="-kthread"
7611                 ol_link_threads=posix
7612         fi
7613 fi
7614
7615                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7616 if test "$ol_link_threads" = no ; then
7617         # try -pthread
7618         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7619 echo "configure:7620: checking for pthread link with -pthread" >&5
7620 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7621   echo $ac_n "(cached) $ac_c" 1>&6
7622 else
7623   
7624                 # save the flags
7625                 ol_LIBS="$LIBS"
7626                 LIBS="-pthread $LIBS"
7627
7628                 if test "$cross_compiling" = yes; then
7629   cat > conftest.$ac_ext <<EOF
7630 #line 7631 "configure"
7631 #include "confdefs.h"
7632 /* pthread test headers */
7633 #include <pthread.h>
7634 #ifndef NULL
7635 #define NULL (void*)0
7636 #endif
7637
7638 static void *task(p)
7639         void *p;
7640 {
7641         return (void *) (p == NULL);
7642 }
7643
7644 int main() {
7645
7646         /* pthread test function */
7647         pthread_t t;
7648         int status;
7649 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7650         /* This system (e.g. AIX) defaults detached; must override */
7651         pthread_attr_t attr;
7652
7653         status = pthread_attr_init(&attr);
7654         if( status ) exit( status );
7655
7656         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7657         if( status ) exit( status );
7658
7659 #define ATTR    &attr
7660 #else
7661 #if HAVE_PTHREADS_D4
7662 #define ATTR    pthread_attr_default
7663 #else
7664 #define ATTR    NULL
7665 #endif
7666 #endif
7667         /* make sure pthread_create() isn't just a stub */
7668         status = pthread_create(&t, ATTR, task, NULL);
7669         if( status ) exit( status );
7670
7671         /* make sure pthread_detach() isn't just a stub */
7672 #if HAVE_PTHREADS_D4
7673         status = pthread_detach( &t );
7674 #else
7675         status = pthread_detach( t );
7676 #endif
7677
7678 #ifdef HAVE_LINUX_THREADS
7679         pthread_kill_other_threads_np();
7680 #endif
7681
7682         exit( status );
7683
7684 ; return 0; }
7685 EOF
7686 if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7687   rm -rf conftest*
7688   ol_cv_pthread_pthread=yes
7689 else
7690   echo "configure: failed program was:" >&5
7691   cat conftest.$ac_ext >&5
7692   rm -rf conftest*
7693   ol_cv_pthread_pthread=no
7694 fi
7695 rm -f conftest*
7696 else
7697   cat > conftest.$ac_ext <<EOF
7698 #line 7699 "configure"
7699 #include "confdefs.h"
7700 /* pthread test headers */
7701 #include <pthread.h>
7702 #ifndef NULL
7703 #define NULL (void*)0
7704 #endif
7705
7706 static void *task(p)
7707         void *p;
7708 {
7709         return (void *) (p == NULL);
7710 }
7711
7712
7713 int main(argc, argv)
7714         int argc;
7715         char **argv;
7716 {
7717
7718         /* pthread test function */
7719         pthread_t t;
7720         int status;
7721 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7722         /* This system (e.g. AIX) defaults detached; must override */
7723         pthread_attr_t attr;
7724
7725         status = pthread_attr_init(&attr);
7726         if( status ) exit( status );
7727
7728         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7729         if( status ) exit( status );
7730
7731 #define ATTR    &attr
7732 #else
7733 #if HAVE_PTHREADS_D4
7734 #define ATTR    pthread_attr_default
7735 #else
7736 #define ATTR    NULL
7737 #endif
7738 #endif
7739         /* make sure pthread_create() isn't just a stub */
7740         status = pthread_create(&t, ATTR, task, NULL);
7741         if( status ) exit( status );
7742
7743         /* make sure pthread_detach() isn't just a stub */
7744 #if HAVE_PTHREADS_D4
7745         status = pthread_detach( &t );
7746 #else
7747         status = pthread_detach( t );
7748 #endif
7749
7750 #ifdef HAVE_LINUX_THREADS
7751         pthread_kill_other_threads_np();
7752 #endif
7753
7754         exit( status );
7755
7756 }
7757
7758 EOF
7759 if { (eval echo configure:7760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7760 then
7761   ol_cv_pthread_pthread=yes
7762 else
7763   echo "configure: failed program was:" >&5
7764   cat conftest.$ac_ext >&5
7765   rm -fr conftest*
7766   ol_cv_pthread_pthread=no
7767 fi
7768 rm -fr conftest*
7769 fi
7770
7771
7772                 # restore the LIBS
7773                 LIBS="$ol_LIBS"
7774         
7775 fi
7776
7777 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7778
7779         if test $ol_cv_pthread_pthread = yes ; then
7780                 ol_link_pthreads="-pthread"
7781                 ol_link_threads=posix
7782         fi
7783 fi
7784
7785                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7786 if test "$ol_link_threads" = no ; then
7787         # try -pthreads
7788         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7789 echo "configure:7790: checking for pthread link with -pthreads" >&5
7790 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7791   echo $ac_n "(cached) $ac_c" 1>&6
7792 else
7793   
7794                 # save the flags
7795                 ol_LIBS="$LIBS"
7796                 LIBS="-pthreads $LIBS"
7797
7798                 if test "$cross_compiling" = yes; then
7799   cat > conftest.$ac_ext <<EOF
7800 #line 7801 "configure"
7801 #include "confdefs.h"
7802 /* pthread test headers */
7803 #include <pthread.h>
7804 #ifndef NULL
7805 #define NULL (void*)0
7806 #endif
7807
7808 static void *task(p)
7809         void *p;
7810 {
7811         return (void *) (p == NULL);
7812 }
7813
7814 int main() {
7815
7816         /* pthread test function */
7817         pthread_t t;
7818         int status;
7819 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7820         /* This system (e.g. AIX) defaults detached; must override */
7821         pthread_attr_t attr;
7822
7823         status = pthread_attr_init(&attr);
7824         if( status ) exit( status );
7825
7826         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7827         if( status ) exit( status );
7828
7829 #define ATTR    &attr
7830 #else
7831 #if HAVE_PTHREADS_D4
7832 #define ATTR    pthread_attr_default
7833 #else
7834 #define ATTR    NULL
7835 #endif
7836 #endif
7837         /* make sure pthread_create() isn't just a stub */
7838         status = pthread_create(&t, ATTR, task, NULL);
7839         if( status ) exit( status );
7840
7841         /* make sure pthread_detach() isn't just a stub */
7842 #if HAVE_PTHREADS_D4
7843         status = pthread_detach( &t );
7844 #else
7845         status = pthread_detach( t );
7846 #endif
7847
7848 #ifdef HAVE_LINUX_THREADS
7849         pthread_kill_other_threads_np();
7850 #endif
7851
7852         exit( status );
7853
7854 ; return 0; }
7855 EOF
7856 if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7857   rm -rf conftest*
7858   ol_cv_pthread_pthreads=yes
7859 else
7860   echo "configure: failed program was:" >&5
7861   cat conftest.$ac_ext >&5
7862   rm -rf conftest*
7863   ol_cv_pthread_pthreads=no
7864 fi
7865 rm -f conftest*
7866 else
7867   cat > conftest.$ac_ext <<EOF
7868 #line 7869 "configure"
7869 #include "confdefs.h"
7870 /* pthread test headers */
7871 #include <pthread.h>
7872 #ifndef NULL
7873 #define NULL (void*)0
7874 #endif
7875
7876 static void *task(p)
7877         void *p;
7878 {
7879         return (void *) (p == NULL);
7880 }
7881
7882
7883 int main(argc, argv)
7884         int argc;
7885         char **argv;
7886 {
7887
7888         /* pthread test function */
7889         pthread_t t;
7890         int status;
7891 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7892         /* This system (e.g. AIX) defaults detached; must override */
7893         pthread_attr_t attr;
7894
7895         status = pthread_attr_init(&attr);
7896         if( status ) exit( status );
7897
7898         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7899         if( status ) exit( status );
7900
7901 #define ATTR    &attr
7902 #else
7903 #if HAVE_PTHREADS_D4
7904 #define ATTR    pthread_attr_default
7905 #else
7906 #define ATTR    NULL
7907 #endif
7908 #endif
7909         /* make sure pthread_create() isn't just a stub */
7910         status = pthread_create(&t, ATTR, task, NULL);
7911         if( status ) exit( status );
7912
7913         /* make sure pthread_detach() isn't just a stub */
7914 #if HAVE_PTHREADS_D4
7915         status = pthread_detach( &t );
7916 #else
7917         status = pthread_detach( t );
7918 #endif
7919
7920 #ifdef HAVE_LINUX_THREADS
7921         pthread_kill_other_threads_np();
7922 #endif
7923
7924         exit( status );
7925
7926 }
7927
7928 EOF
7929 if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7930 then
7931   ol_cv_pthread_pthreads=yes
7932 else
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -fr conftest*
7936   ol_cv_pthread_pthreads=no
7937 fi
7938 rm -fr conftest*
7939 fi
7940
7941
7942                 # restore the LIBS
7943                 LIBS="$ol_LIBS"
7944         
7945 fi
7946
7947 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7948
7949         if test $ol_cv_pthread_pthreads = yes ; then
7950                 ol_link_pthreads="-pthreads"
7951                 ol_link_threads=posix
7952         fi
7953 fi
7954
7955                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7956 if test "$ol_link_threads" = no ; then
7957         # try -mthreads
7958         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7959 echo "configure:7960: checking for pthread link with -mthreads" >&5
7960 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7961   echo $ac_n "(cached) $ac_c" 1>&6
7962 else
7963   
7964                 # save the flags
7965                 ol_LIBS="$LIBS"
7966                 LIBS="-mthreads $LIBS"
7967
7968                 if test "$cross_compiling" = yes; then
7969   cat > conftest.$ac_ext <<EOF
7970 #line 7971 "configure"
7971 #include "confdefs.h"
7972 /* pthread test headers */
7973 #include <pthread.h>
7974 #ifndef NULL
7975 #define NULL (void*)0
7976 #endif
7977
7978 static void *task(p)
7979         void *p;
7980 {
7981         return (void *) (p == NULL);
7982 }
7983
7984 int main() {
7985
7986         /* pthread test function */
7987         pthread_t t;
7988         int status;
7989 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7990         /* This system (e.g. AIX) defaults detached; must override */
7991         pthread_attr_t attr;
7992
7993         status = pthread_attr_init(&attr);
7994         if( status ) exit( status );
7995
7996         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7997         if( status ) exit( status );
7998
7999 #define ATTR    &attr
8000 #else
8001 #if HAVE_PTHREADS_D4
8002 #define ATTR    pthread_attr_default
8003 #else
8004 #define ATTR    NULL
8005 #endif
8006 #endif
8007         /* make sure pthread_create() isn't just a stub */
8008         status = pthread_create(&t, ATTR, task, NULL);
8009         if( status ) exit( status );
8010
8011         /* make sure pthread_detach() isn't just a stub */
8012 #if HAVE_PTHREADS_D4
8013         status = pthread_detach( &t );
8014 #else
8015         status = pthread_detach( t );
8016 #endif
8017
8018 #ifdef HAVE_LINUX_THREADS
8019         pthread_kill_other_threads_np();
8020 #endif
8021
8022         exit( status );
8023
8024 ; return 0; }
8025 EOF
8026 if { (eval echo configure:8027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8027   rm -rf conftest*
8028   ol_cv_pthread_mthreads=yes
8029 else
8030   echo "configure: failed program was:" >&5
8031   cat conftest.$ac_ext >&5
8032   rm -rf conftest*
8033   ol_cv_pthread_mthreads=no
8034 fi
8035 rm -f conftest*
8036 else
8037   cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 /* pthread test headers */
8041 #include <pthread.h>
8042 #ifndef NULL
8043 #define NULL (void*)0
8044 #endif
8045
8046 static void *task(p)
8047         void *p;
8048 {
8049         return (void *) (p == NULL);
8050 }
8051
8052
8053 int main(argc, argv)
8054         int argc;
8055         char **argv;
8056 {
8057
8058         /* pthread test function */
8059         pthread_t t;
8060         int status;
8061 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8062         /* This system (e.g. AIX) defaults detached; must override */
8063         pthread_attr_t attr;
8064
8065         status = pthread_attr_init(&attr);
8066         if( status ) exit( status );
8067
8068         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8069         if( status ) exit( status );
8070
8071 #define ATTR    &attr
8072 #else
8073 #if HAVE_PTHREADS_D4
8074 #define ATTR    pthread_attr_default
8075 #else
8076 #define ATTR    NULL
8077 #endif
8078 #endif
8079         /* make sure pthread_create() isn't just a stub */
8080         status = pthread_create(&t, ATTR, task, NULL);
8081         if( status ) exit( status );
8082
8083         /* make sure pthread_detach() isn't just a stub */
8084 #if HAVE_PTHREADS_D4
8085         status = pthread_detach( &t );
8086 #else
8087         status = pthread_detach( t );
8088 #endif
8089
8090 #ifdef HAVE_LINUX_THREADS
8091         pthread_kill_other_threads_np();
8092 #endif
8093
8094         exit( status );
8095
8096 }
8097
8098 EOF
8099 if { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8100 then
8101   ol_cv_pthread_mthreads=yes
8102 else
8103   echo "configure: failed program was:" >&5
8104   cat conftest.$ac_ext >&5
8105   rm -fr conftest*
8106   ol_cv_pthread_mthreads=no
8107 fi
8108 rm -fr conftest*
8109 fi
8110
8111
8112                 # restore the LIBS
8113                 LIBS="$ol_LIBS"
8114         
8115 fi
8116
8117 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8118
8119         if test $ol_cv_pthread_mthreads = yes ; then
8120                 ol_link_pthreads="-mthreads"
8121                 ol_link_threads=posix
8122         fi
8123 fi
8124
8125                 # Pthread try link: -thread (ol_cv_pthread_thread)
8126 if test "$ol_link_threads" = no ; then
8127         # try -thread
8128         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8129 echo "configure:8130: checking for pthread link with -thread" >&5
8130 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8131   echo $ac_n "(cached) $ac_c" 1>&6
8132 else
8133   
8134                 # save the flags
8135                 ol_LIBS="$LIBS"
8136                 LIBS="-thread $LIBS"
8137
8138                 if test "$cross_compiling" = yes; then
8139   cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142 /* pthread test headers */
8143 #include <pthread.h>
8144 #ifndef NULL
8145 #define NULL (void*)0
8146 #endif
8147
8148 static void *task(p)
8149         void *p;
8150 {
8151         return (void *) (p == NULL);
8152 }
8153
8154 int main() {
8155
8156         /* pthread test function */
8157         pthread_t t;
8158         int status;
8159 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8160         /* This system (e.g. AIX) defaults detached; must override */
8161         pthread_attr_t attr;
8162
8163         status = pthread_attr_init(&attr);
8164         if( status ) exit( status );
8165
8166         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8167         if( status ) exit( status );
8168
8169 #define ATTR    &attr
8170 #else
8171 #if HAVE_PTHREADS_D4
8172 #define ATTR    pthread_attr_default
8173 #else
8174 #define ATTR    NULL
8175 #endif
8176 #endif
8177         /* make sure pthread_create() isn't just a stub */
8178         status = pthread_create(&t, ATTR, task, NULL);
8179         if( status ) exit( status );
8180
8181         /* make sure pthread_detach() isn't just a stub */
8182 #if HAVE_PTHREADS_D4
8183         status = pthread_detach( &t );
8184 #else
8185         status = pthread_detach( t );
8186 #endif
8187
8188 #ifdef HAVE_LINUX_THREADS
8189         pthread_kill_other_threads_np();
8190 #endif
8191
8192         exit( status );
8193
8194 ; return 0; }
8195 EOF
8196 if { (eval echo configure:8197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8197   rm -rf conftest*
8198   ol_cv_pthread_thread=yes
8199 else
8200   echo "configure: failed program was:" >&5
8201   cat conftest.$ac_ext >&5
8202   rm -rf conftest*
8203   ol_cv_pthread_thread=no
8204 fi
8205 rm -f conftest*
8206 else
8207   cat > conftest.$ac_ext <<EOF
8208 #line 8209 "configure"
8209 #include "confdefs.h"
8210 /* pthread test headers */
8211 #include <pthread.h>
8212 #ifndef NULL
8213 #define NULL (void*)0
8214 #endif
8215
8216 static void *task(p)
8217         void *p;
8218 {
8219         return (void *) (p == NULL);
8220 }
8221
8222
8223 int main(argc, argv)
8224         int argc;
8225         char **argv;
8226 {
8227
8228         /* pthread test function */
8229         pthread_t t;
8230         int status;
8231 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8232         /* This system (e.g. AIX) defaults detached; must override */
8233         pthread_attr_t attr;
8234
8235         status = pthread_attr_init(&attr);
8236         if( status ) exit( status );
8237
8238         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8239         if( status ) exit( status );
8240
8241 #define ATTR    &attr
8242 #else
8243 #if HAVE_PTHREADS_D4
8244 #define ATTR    pthread_attr_default
8245 #else
8246 #define ATTR    NULL
8247 #endif
8248 #endif
8249         /* make sure pthread_create() isn't just a stub */
8250         status = pthread_create(&t, ATTR, task, NULL);
8251         if( status ) exit( status );
8252
8253         /* make sure pthread_detach() isn't just a stub */
8254 #if HAVE_PTHREADS_D4
8255         status = pthread_detach( &t );
8256 #else
8257         status = pthread_detach( t );
8258 #endif
8259
8260 #ifdef HAVE_LINUX_THREADS
8261         pthread_kill_other_threads_np();
8262 #endif
8263
8264         exit( status );
8265
8266 }
8267
8268 EOF
8269 if { (eval echo configure:8270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8270 then
8271   ol_cv_pthread_thread=yes
8272 else
8273   echo "configure: failed program was:" >&5
8274   cat conftest.$ac_ext >&5
8275   rm -fr conftest*
8276   ol_cv_pthread_thread=no
8277 fi
8278 rm -fr conftest*
8279 fi
8280
8281
8282                 # restore the LIBS
8283                 LIBS="$ol_LIBS"
8284         
8285 fi
8286
8287 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8288
8289         if test $ol_cv_pthread_thread = yes ; then
8290                 ol_link_pthreads="-thread"
8291                 ol_link_threads=posix
8292         fi
8293 fi
8294
8295
8296                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8297 if test "$ol_link_threads" = no ; then
8298         # try -lpthread -lmach -lexc -lc_r
8299         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8300 echo "configure:8301: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8301 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8302   echo $ac_n "(cached) $ac_c" 1>&6
8303 else
8304   
8305                 # save the flags
8306                 ol_LIBS="$LIBS"
8307                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8308
8309                 if test "$cross_compiling" = yes; then
8310   cat > conftest.$ac_ext <<EOF
8311 #line 8312 "configure"
8312 #include "confdefs.h"
8313 /* pthread test headers */
8314 #include <pthread.h>
8315 #ifndef NULL
8316 #define NULL (void*)0
8317 #endif
8318
8319 static void *task(p)
8320         void *p;
8321 {
8322         return (void *) (p == NULL);
8323 }
8324
8325 int main() {
8326
8327         /* pthread test function */
8328         pthread_t t;
8329         int status;
8330 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8331         /* This system (e.g. AIX) defaults detached; must override */
8332         pthread_attr_t attr;
8333
8334         status = pthread_attr_init(&attr);
8335         if( status ) exit( status );
8336
8337         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8338         if( status ) exit( status );
8339
8340 #define ATTR    &attr
8341 #else
8342 #if HAVE_PTHREADS_D4
8343 #define ATTR    pthread_attr_default
8344 #else
8345 #define ATTR    NULL
8346 #endif
8347 #endif
8348         /* make sure pthread_create() isn't just a stub */
8349         status = pthread_create(&t, ATTR, task, NULL);
8350         if( status ) exit( status );
8351
8352         /* make sure pthread_detach() isn't just a stub */
8353 #if HAVE_PTHREADS_D4
8354         status = pthread_detach( &t );
8355 #else
8356         status = pthread_detach( t );
8357 #endif
8358
8359 #ifdef HAVE_LINUX_THREADS
8360         pthread_kill_other_threads_np();
8361 #endif
8362
8363         exit( status );
8364
8365 ; return 0; }
8366 EOF
8367 if { (eval echo configure:8368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8368   rm -rf conftest*
8369   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8370 else
8371   echo "configure: failed program was:" >&5
8372   cat conftest.$ac_ext >&5
8373   rm -rf conftest*
8374   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8375 fi
8376 rm -f conftest*
8377 else
8378   cat > conftest.$ac_ext <<EOF
8379 #line 8380 "configure"
8380 #include "confdefs.h"
8381 /* pthread test headers */
8382 #include <pthread.h>
8383 #ifndef NULL
8384 #define NULL (void*)0
8385 #endif
8386
8387 static void *task(p)
8388         void *p;
8389 {
8390         return (void *) (p == NULL);
8391 }
8392
8393
8394 int main(argc, argv)
8395         int argc;
8396         char **argv;
8397 {
8398
8399         /* pthread test function */
8400         pthread_t t;
8401         int status;
8402 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8403         /* This system (e.g. AIX) defaults detached; must override */
8404         pthread_attr_t attr;
8405
8406         status = pthread_attr_init(&attr);
8407         if( status ) exit( status );
8408
8409         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8410         if( status ) exit( status );
8411
8412 #define ATTR    &attr
8413 #else
8414 #if HAVE_PTHREADS_D4
8415 #define ATTR    pthread_attr_default
8416 #else
8417 #define ATTR    NULL
8418 #endif
8419 #endif
8420         /* make sure pthread_create() isn't just a stub */
8421         status = pthread_create(&t, ATTR, task, NULL);
8422         if( status ) exit( status );
8423
8424         /* make sure pthread_detach() isn't just a stub */
8425 #if HAVE_PTHREADS_D4
8426         status = pthread_detach( &t );
8427 #else
8428         status = pthread_detach( t );
8429 #endif
8430
8431 #ifdef HAVE_LINUX_THREADS
8432         pthread_kill_other_threads_np();
8433 #endif
8434
8435         exit( status );
8436
8437 }
8438
8439 EOF
8440 if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8441 then
8442   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8443 else
8444   echo "configure: failed program was:" >&5
8445   cat conftest.$ac_ext >&5
8446   rm -fr conftest*
8447   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8448 fi
8449 rm -fr conftest*
8450 fi
8451
8452
8453                 # restore the LIBS
8454                 LIBS="$ol_LIBS"
8455         
8456 fi
8457
8458 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8459
8460         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8461                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8462                 ol_link_threads=posix
8463         fi
8464 fi
8465
8466                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8467 if test "$ol_link_threads" = no ; then
8468         # try -lpthread -lmach -lexc
8469         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8470 echo "configure:8471: checking for pthread link with -lpthread -lmach -lexc" >&5
8471 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8472   echo $ac_n "(cached) $ac_c" 1>&6
8473 else
8474   
8475                 # save the flags
8476                 ol_LIBS="$LIBS"
8477                 LIBS="-lpthread -lmach -lexc $LIBS"
8478
8479                 if test "$cross_compiling" = yes; then
8480   cat > conftest.$ac_ext <<EOF
8481 #line 8482 "configure"
8482 #include "confdefs.h"
8483 /* pthread test headers */
8484 #include <pthread.h>
8485 #ifndef NULL
8486 #define NULL (void*)0
8487 #endif
8488
8489 static void *task(p)
8490         void *p;
8491 {
8492         return (void *) (p == NULL);
8493 }
8494
8495 int main() {
8496
8497         /* pthread test function */
8498         pthread_t t;
8499         int status;
8500 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8501         /* This system (e.g. AIX) defaults detached; must override */
8502         pthread_attr_t attr;
8503
8504         status = pthread_attr_init(&attr);
8505         if( status ) exit( status );
8506
8507         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8508         if( status ) exit( status );
8509
8510 #define ATTR    &attr
8511 #else
8512 #if HAVE_PTHREADS_D4
8513 #define ATTR    pthread_attr_default
8514 #else
8515 #define ATTR    NULL
8516 #endif
8517 #endif
8518         /* make sure pthread_create() isn't just a stub */
8519         status = pthread_create(&t, ATTR, task, NULL);
8520         if( status ) exit( status );
8521
8522         /* make sure pthread_detach() isn't just a stub */
8523 #if HAVE_PTHREADS_D4
8524         status = pthread_detach( &t );
8525 #else
8526         status = pthread_detach( t );
8527 #endif
8528
8529 #ifdef HAVE_LINUX_THREADS
8530         pthread_kill_other_threads_np();
8531 #endif
8532
8533         exit( status );
8534
8535 ; return 0; }
8536 EOF
8537 if { (eval echo configure:8538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8538   rm -rf conftest*
8539   ol_cv_pthread_lpthread_lmach_lexc=yes
8540 else
8541   echo "configure: failed program was:" >&5
8542   cat conftest.$ac_ext >&5
8543   rm -rf conftest*
8544   ol_cv_pthread_lpthread_lmach_lexc=no
8545 fi
8546 rm -f conftest*
8547 else
8548   cat > conftest.$ac_ext <<EOF
8549 #line 8550 "configure"
8550 #include "confdefs.h"
8551 /* pthread test headers */
8552 #include <pthread.h>
8553 #ifndef NULL
8554 #define NULL (void*)0
8555 #endif
8556
8557 static void *task(p)
8558         void *p;
8559 {
8560         return (void *) (p == NULL);
8561 }
8562
8563
8564 int main(argc, argv)
8565         int argc;
8566         char **argv;
8567 {
8568
8569         /* pthread test function */
8570         pthread_t t;
8571         int status;
8572 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8573         /* This system (e.g. AIX) defaults detached; must override */
8574         pthread_attr_t attr;
8575
8576         status = pthread_attr_init(&attr);
8577         if( status ) exit( status );
8578
8579         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8580         if( status ) exit( status );
8581
8582 #define ATTR    &attr
8583 #else
8584 #if HAVE_PTHREADS_D4
8585 #define ATTR    pthread_attr_default
8586 #else
8587 #define ATTR    NULL
8588 #endif
8589 #endif
8590         /* make sure pthread_create() isn't just a stub */
8591         status = pthread_create(&t, ATTR, task, NULL);
8592         if( status ) exit( status );
8593
8594         /* make sure pthread_detach() isn't just a stub */
8595 #if HAVE_PTHREADS_D4
8596         status = pthread_detach( &t );
8597 #else
8598         status = pthread_detach( t );
8599 #endif
8600
8601 #ifdef HAVE_LINUX_THREADS
8602         pthread_kill_other_threads_np();
8603 #endif
8604
8605         exit( status );
8606
8607 }
8608
8609 EOF
8610 if { (eval echo configure:8611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8611 then
8612   ol_cv_pthread_lpthread_lmach_lexc=yes
8613 else
8614   echo "configure: failed program was:" >&5
8615   cat conftest.$ac_ext >&5
8616   rm -fr conftest*
8617   ol_cv_pthread_lpthread_lmach_lexc=no
8618 fi
8619 rm -fr conftest*
8620 fi
8621
8622
8623                 # restore the LIBS
8624                 LIBS="$ol_LIBS"
8625         
8626 fi
8627
8628 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8629
8630         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8631                 ol_link_pthreads="-lpthread -lmach -lexc"
8632                 ol_link_threads=posix
8633         fi
8634 fi
8635
8636
8637                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8638 if test "$ol_link_threads" = no ; then
8639         # try -lpthread -Wl,-woff,85
8640         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8641 echo "configure:8642: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8642 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8643   echo $ac_n "(cached) $ac_c" 1>&6
8644 else
8645   
8646                 # save the flags
8647                 ol_LIBS="$LIBS"
8648                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8649
8650                 if test "$cross_compiling" = yes; then
8651   cat > conftest.$ac_ext <<EOF
8652 #line 8653 "configure"
8653 #include "confdefs.h"
8654 /* pthread test headers */
8655 #include <pthread.h>
8656 #ifndef NULL
8657 #define NULL (void*)0
8658 #endif
8659
8660 static void *task(p)
8661         void *p;
8662 {
8663         return (void *) (p == NULL);
8664 }
8665
8666 int main() {
8667
8668         /* pthread test function */
8669         pthread_t t;
8670         int status;
8671 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8672         /* This system (e.g. AIX) defaults detached; must override */
8673         pthread_attr_t attr;
8674
8675         status = pthread_attr_init(&attr);
8676         if( status ) exit( status );
8677
8678         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8679         if( status ) exit( status );
8680
8681 #define ATTR    &attr
8682 #else
8683 #if HAVE_PTHREADS_D4
8684 #define ATTR    pthread_attr_default
8685 #else
8686 #define ATTR    NULL
8687 #endif
8688 #endif
8689         /* make sure pthread_create() isn't just a stub */
8690         status = pthread_create(&t, ATTR, task, NULL);
8691         if( status ) exit( status );
8692
8693         /* make sure pthread_detach() isn't just a stub */
8694 #if HAVE_PTHREADS_D4
8695         status = pthread_detach( &t );
8696 #else
8697         status = pthread_detach( t );
8698 #endif
8699
8700 #ifdef HAVE_LINUX_THREADS
8701         pthread_kill_other_threads_np();
8702 #endif
8703
8704         exit( status );
8705
8706 ; return 0; }
8707 EOF
8708 if { (eval echo configure:8709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8709   rm -rf conftest*
8710   ol_cv_pthread_lib_lpthread_woff=yes
8711 else
8712   echo "configure: failed program was:" >&5
8713   cat conftest.$ac_ext >&5
8714   rm -rf conftest*
8715   ol_cv_pthread_lib_lpthread_woff=no
8716 fi
8717 rm -f conftest*
8718 else
8719   cat > conftest.$ac_ext <<EOF
8720 #line 8721 "configure"
8721 #include "confdefs.h"
8722 /* pthread test headers */
8723 #include <pthread.h>
8724 #ifndef NULL
8725 #define NULL (void*)0
8726 #endif
8727
8728 static void *task(p)
8729         void *p;
8730 {
8731         return (void *) (p == NULL);
8732 }
8733
8734
8735 int main(argc, argv)
8736         int argc;
8737         char **argv;
8738 {
8739
8740         /* pthread test function */
8741         pthread_t t;
8742         int status;
8743 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8744         /* This system (e.g. AIX) defaults detached; must override */
8745         pthread_attr_t attr;
8746
8747         status = pthread_attr_init(&attr);
8748         if( status ) exit( status );
8749
8750         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8751         if( status ) exit( status );
8752
8753 #define ATTR    &attr
8754 #else
8755 #if HAVE_PTHREADS_D4
8756 #define ATTR    pthread_attr_default
8757 #else
8758 #define ATTR    NULL
8759 #endif
8760 #endif
8761         /* make sure pthread_create() isn't just a stub */
8762         status = pthread_create(&t, ATTR, task, NULL);
8763         if( status ) exit( status );
8764
8765         /* make sure pthread_detach() isn't just a stub */
8766 #if HAVE_PTHREADS_D4
8767         status = pthread_detach( &t );
8768 #else
8769         status = pthread_detach( t );
8770 #endif
8771
8772 #ifdef HAVE_LINUX_THREADS
8773         pthread_kill_other_threads_np();
8774 #endif
8775
8776         exit( status );
8777
8778 }
8779
8780 EOF
8781 if { (eval echo configure:8782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8782 then
8783   ol_cv_pthread_lib_lpthread_woff=yes
8784 else
8785   echo "configure: failed program was:" >&5
8786   cat conftest.$ac_ext >&5
8787   rm -fr conftest*
8788   ol_cv_pthread_lib_lpthread_woff=no
8789 fi
8790 rm -fr conftest*
8791 fi
8792
8793
8794                 # restore the LIBS
8795                 LIBS="$ol_LIBS"
8796         
8797 fi
8798
8799 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8800
8801         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8802                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8803                 ol_link_threads=posix
8804         fi
8805 fi
8806
8807
8808                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8809 if test "$ol_link_threads" = no ; then
8810         # try -lpthread
8811         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8812 echo "configure:8813: checking for pthread link with -lpthread" >&5
8813 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8814   echo $ac_n "(cached) $ac_c" 1>&6
8815 else
8816   
8817                 # save the flags
8818                 ol_LIBS="$LIBS"
8819                 LIBS="-lpthread $LIBS"
8820
8821                 if test "$cross_compiling" = yes; then
8822   cat > conftest.$ac_ext <<EOF
8823 #line 8824 "configure"
8824 #include "confdefs.h"
8825 /* pthread test headers */
8826 #include <pthread.h>
8827 #ifndef NULL
8828 #define NULL (void*)0
8829 #endif
8830
8831 static void *task(p)
8832         void *p;
8833 {
8834         return (void *) (p == NULL);
8835 }
8836
8837 int main() {
8838
8839         /* pthread test function */
8840         pthread_t t;
8841         int status;
8842 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8843         /* This system (e.g. AIX) defaults detached; must override */
8844         pthread_attr_t attr;
8845
8846         status = pthread_attr_init(&attr);
8847         if( status ) exit( status );
8848
8849         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8850         if( status ) exit( status );
8851
8852 #define ATTR    &attr
8853 #else
8854 #if HAVE_PTHREADS_D4
8855 #define ATTR    pthread_attr_default
8856 #else
8857 #define ATTR    NULL
8858 #endif
8859 #endif
8860         /* make sure pthread_create() isn't just a stub */
8861         status = pthread_create(&t, ATTR, task, NULL);
8862         if( status ) exit( status );
8863
8864         /* make sure pthread_detach() isn't just a stub */
8865 #if HAVE_PTHREADS_D4
8866         status = pthread_detach( &t );
8867 #else
8868         status = pthread_detach( t );
8869 #endif
8870
8871 #ifdef HAVE_LINUX_THREADS
8872         pthread_kill_other_threads_np();
8873 #endif
8874
8875         exit( status );
8876
8877 ; return 0; }
8878 EOF
8879 if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8880   rm -rf conftest*
8881   ol_cv_pthread_lpthread=yes
8882 else
8883   echo "configure: failed program was:" >&5
8884   cat conftest.$ac_ext >&5
8885   rm -rf conftest*
8886   ol_cv_pthread_lpthread=no
8887 fi
8888 rm -f conftest*
8889 else
8890   cat > conftest.$ac_ext <<EOF
8891 #line 8892 "configure"
8892 #include "confdefs.h"
8893 /* pthread test headers */
8894 #include <pthread.h>
8895 #ifndef NULL
8896 #define NULL (void*)0
8897 #endif
8898
8899 static void *task(p)
8900         void *p;
8901 {
8902         return (void *) (p == NULL);
8903 }
8904
8905
8906 int main(argc, argv)
8907         int argc;
8908         char **argv;
8909 {
8910
8911         /* pthread test function */
8912         pthread_t t;
8913         int status;
8914 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8915         /* This system (e.g. AIX) defaults detached; must override */
8916         pthread_attr_t attr;
8917
8918         status = pthread_attr_init(&attr);
8919         if( status ) exit( status );
8920
8921         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8922         if( status ) exit( status );
8923
8924 #define ATTR    &attr
8925 #else
8926 #if HAVE_PTHREADS_D4
8927 #define ATTR    pthread_attr_default
8928 #else
8929 #define ATTR    NULL
8930 #endif
8931 #endif
8932         /* make sure pthread_create() isn't just a stub */
8933         status = pthread_create(&t, ATTR, task, NULL);
8934         if( status ) exit( status );
8935
8936         /* make sure pthread_detach() isn't just a stub */
8937 #if HAVE_PTHREADS_D4
8938         status = pthread_detach( &t );
8939 #else
8940         status = pthread_detach( t );
8941 #endif
8942
8943 #ifdef HAVE_LINUX_THREADS
8944         pthread_kill_other_threads_np();
8945 #endif
8946
8947         exit( status );
8948
8949 }
8950
8951 EOF
8952 if { (eval echo configure:8953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8953 then
8954   ol_cv_pthread_lpthread=yes
8955 else
8956   echo "configure: failed program was:" >&5
8957   cat conftest.$ac_ext >&5
8958   rm -fr conftest*
8959   ol_cv_pthread_lpthread=no
8960 fi
8961 rm -fr conftest*
8962 fi
8963
8964
8965                 # restore the LIBS
8966                 LIBS="$ol_LIBS"
8967         
8968 fi
8969
8970 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8971
8972         if test $ol_cv_pthread_lpthread = yes ; then
8973                 ol_link_pthreads="-lpthread"
8974                 ol_link_threads=posix
8975         fi
8976 fi
8977
8978                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8979 if test "$ol_link_threads" = no ; then
8980         # try -lc_r
8981         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8982 echo "configure:8983: checking for pthread link with -lc_r" >&5
8983 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8984   echo $ac_n "(cached) $ac_c" 1>&6
8985 else
8986   
8987                 # save the flags
8988                 ol_LIBS="$LIBS"
8989                 LIBS="-lc_r $LIBS"
8990
8991                 if test "$cross_compiling" = yes; then
8992   cat > conftest.$ac_ext <<EOF
8993 #line 8994 "configure"
8994 #include "confdefs.h"
8995 /* pthread test headers */
8996 #include <pthread.h>
8997 #ifndef NULL
8998 #define NULL (void*)0
8999 #endif
9000
9001 static void *task(p)
9002         void *p;
9003 {
9004         return (void *) (p == NULL);
9005 }
9006
9007 int main() {
9008
9009         /* pthread test function */
9010         pthread_t t;
9011         int status;
9012 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9013         /* This system (e.g. AIX) defaults detached; must override */
9014         pthread_attr_t attr;
9015
9016         status = pthread_attr_init(&attr);
9017         if( status ) exit( status );
9018
9019         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9020         if( status ) exit( status );
9021
9022 #define ATTR    &attr
9023 #else
9024 #if HAVE_PTHREADS_D4
9025 #define ATTR    pthread_attr_default
9026 #else
9027 #define ATTR    NULL
9028 #endif
9029 #endif
9030         /* make sure pthread_create() isn't just a stub */
9031         status = pthread_create(&t, ATTR, task, NULL);
9032         if( status ) exit( status );
9033
9034         /* make sure pthread_detach() isn't just a stub */
9035 #if HAVE_PTHREADS_D4
9036         status = pthread_detach( &t );
9037 #else
9038         status = pthread_detach( t );
9039 #endif
9040
9041 #ifdef HAVE_LINUX_THREADS
9042         pthread_kill_other_threads_np();
9043 #endif
9044
9045         exit( status );
9046
9047 ; return 0; }
9048 EOF
9049 if { (eval echo configure:9050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9050   rm -rf conftest*
9051   ol_cv_pthread_lc_r=yes
9052 else
9053   echo "configure: failed program was:" >&5
9054   cat conftest.$ac_ext >&5
9055   rm -rf conftest*
9056   ol_cv_pthread_lc_r=no
9057 fi
9058 rm -f conftest*
9059 else
9060   cat > conftest.$ac_ext <<EOF
9061 #line 9062 "configure"
9062 #include "confdefs.h"
9063 /* pthread test headers */
9064 #include <pthread.h>
9065 #ifndef NULL
9066 #define NULL (void*)0
9067 #endif
9068
9069 static void *task(p)
9070         void *p;
9071 {
9072         return (void *) (p == NULL);
9073 }
9074
9075
9076 int main(argc, argv)
9077         int argc;
9078         char **argv;
9079 {
9080
9081         /* pthread test function */
9082         pthread_t t;
9083         int status;
9084 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9085         /* This system (e.g. AIX) defaults detached; must override */
9086         pthread_attr_t attr;
9087
9088         status = pthread_attr_init(&attr);
9089         if( status ) exit( status );
9090
9091         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9092         if( status ) exit( status );
9093
9094 #define ATTR    &attr
9095 #else
9096 #if HAVE_PTHREADS_D4
9097 #define ATTR    pthread_attr_default
9098 #else
9099 #define ATTR    NULL
9100 #endif
9101 #endif
9102         /* make sure pthread_create() isn't just a stub */
9103         status = pthread_create(&t, ATTR, task, NULL);
9104         if( status ) exit( status );
9105
9106         /* make sure pthread_detach() isn't just a stub */
9107 #if HAVE_PTHREADS_D4
9108         status = pthread_detach( &t );
9109 #else
9110         status = pthread_detach( t );
9111 #endif
9112
9113 #ifdef HAVE_LINUX_THREADS
9114         pthread_kill_other_threads_np();
9115 #endif
9116
9117         exit( status );
9118
9119 }
9120
9121 EOF
9122 if { (eval echo configure:9123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9123 then
9124   ol_cv_pthread_lc_r=yes
9125 else
9126   echo "configure: failed program was:" >&5
9127   cat conftest.$ac_ext >&5
9128   rm -fr conftest*
9129   ol_cv_pthread_lc_r=no
9130 fi
9131 rm -fr conftest*
9132 fi
9133
9134
9135                 # restore the LIBS
9136                 LIBS="$ol_LIBS"
9137         
9138 fi
9139
9140 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9141
9142         if test $ol_cv_pthread_lc_r = yes ; then
9143                 ol_link_pthreads="-lc_r"
9144                 ol_link_threads=posix
9145         fi
9146 fi
9147
9148
9149                 # Pthread try link: -threads (ol_cv_pthread_threads)
9150 if test "$ol_link_threads" = no ; then
9151         # try -threads
9152         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9153 echo "configure:9154: checking for pthread link with -threads" >&5
9154 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9155   echo $ac_n "(cached) $ac_c" 1>&6
9156 else
9157   
9158                 # save the flags
9159                 ol_LIBS="$LIBS"
9160                 LIBS="-threads $LIBS"
9161
9162                 if test "$cross_compiling" = yes; then
9163   cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166 /* pthread test headers */
9167 #include <pthread.h>
9168 #ifndef NULL
9169 #define NULL (void*)0
9170 #endif
9171
9172 static void *task(p)
9173         void *p;
9174 {
9175         return (void *) (p == NULL);
9176 }
9177
9178 int main() {
9179
9180         /* pthread test function */
9181         pthread_t t;
9182         int status;
9183 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9184         /* This system (e.g. AIX) defaults detached; must override */
9185         pthread_attr_t attr;
9186
9187         status = pthread_attr_init(&attr);
9188         if( status ) exit( status );
9189
9190         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9191         if( status ) exit( status );
9192
9193 #define ATTR    &attr
9194 #else
9195 #if HAVE_PTHREADS_D4
9196 #define ATTR    pthread_attr_default
9197 #else
9198 #define ATTR    NULL
9199 #endif
9200 #endif
9201         /* make sure pthread_create() isn't just a stub */
9202         status = pthread_create(&t, ATTR, task, NULL);
9203         if( status ) exit( status );
9204
9205         /* make sure pthread_detach() isn't just a stub */
9206 #if HAVE_PTHREADS_D4
9207         status = pthread_detach( &t );
9208 #else
9209         status = pthread_detach( t );
9210 #endif
9211
9212 #ifdef HAVE_LINUX_THREADS
9213         pthread_kill_other_threads_np();
9214 #endif
9215
9216         exit( status );
9217
9218 ; return 0; }
9219 EOF
9220 if { (eval echo configure:9221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9221   rm -rf conftest*
9222   ol_cv_pthread_threads=yes
9223 else
9224   echo "configure: failed program was:" >&5
9225   cat conftest.$ac_ext >&5
9226   rm -rf conftest*
9227   ol_cv_pthread_threads=no
9228 fi
9229 rm -f conftest*
9230 else
9231   cat > conftest.$ac_ext <<EOF
9232 #line 9233 "configure"
9233 #include "confdefs.h"
9234 /* pthread test headers */
9235 #include <pthread.h>
9236 #ifndef NULL
9237 #define NULL (void*)0
9238 #endif
9239
9240 static void *task(p)
9241         void *p;
9242 {
9243         return (void *) (p == NULL);
9244 }
9245
9246
9247 int main(argc, argv)
9248         int argc;
9249         char **argv;
9250 {
9251
9252         /* pthread test function */
9253         pthread_t t;
9254         int status;
9255 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9256         /* This system (e.g. AIX) defaults detached; must override */
9257         pthread_attr_t attr;
9258
9259         status = pthread_attr_init(&attr);
9260         if( status ) exit( status );
9261
9262         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9263         if( status ) exit( status );
9264
9265 #define ATTR    &attr
9266 #else
9267 #if HAVE_PTHREADS_D4
9268 #define ATTR    pthread_attr_default
9269 #else
9270 #define ATTR    NULL
9271 #endif
9272 #endif
9273         /* make sure pthread_create() isn't just a stub */
9274         status = pthread_create(&t, ATTR, task, NULL);
9275         if( status ) exit( status );
9276
9277         /* make sure pthread_detach() isn't just a stub */
9278 #if HAVE_PTHREADS_D4
9279         status = pthread_detach( &t );
9280 #else
9281         status = pthread_detach( t );
9282 #endif
9283
9284 #ifdef HAVE_LINUX_THREADS
9285         pthread_kill_other_threads_np();
9286 #endif
9287
9288         exit( status );
9289
9290 }
9291
9292 EOF
9293 if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9294 then
9295   ol_cv_pthread_threads=yes
9296 else
9297   echo "configure: failed program was:" >&5
9298   cat conftest.$ac_ext >&5
9299   rm -fr conftest*
9300   ol_cv_pthread_threads=no
9301 fi
9302 rm -fr conftest*
9303 fi
9304
9305
9306                 # restore the LIBS
9307                 LIBS="$ol_LIBS"
9308         
9309 fi
9310
9311 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9312
9313         if test $ol_cv_pthread_threads = yes ; then
9314                 ol_link_pthreads="-threads"
9315                 ol_link_threads=posix
9316         fi
9317 fi
9318
9319
9320                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9321 if test "$ol_link_threads" = no ; then
9322         # try -lpthreads -lmach -lexc -lc_r
9323         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9324 echo "configure:9325: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9325 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9326   echo $ac_n "(cached) $ac_c" 1>&6
9327 else
9328   
9329                 # save the flags
9330                 ol_LIBS="$LIBS"
9331                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9332
9333                 if test "$cross_compiling" = yes; then
9334   cat > conftest.$ac_ext <<EOF
9335 #line 9336 "configure"
9336 #include "confdefs.h"
9337 /* pthread test headers */
9338 #include <pthread.h>
9339 #ifndef NULL
9340 #define NULL (void*)0
9341 #endif
9342
9343 static void *task(p)
9344         void *p;
9345 {
9346         return (void *) (p == NULL);
9347 }
9348
9349 int main() {
9350
9351         /* pthread test function */
9352         pthread_t t;
9353         int status;
9354 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9355         /* This system (e.g. AIX) defaults detached; must override */
9356         pthread_attr_t attr;
9357
9358         status = pthread_attr_init(&attr);
9359         if( status ) exit( status );
9360
9361         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9362         if( status ) exit( status );
9363
9364 #define ATTR    &attr
9365 #else
9366 #if HAVE_PTHREADS_D4
9367 #define ATTR    pthread_attr_default
9368 #else
9369 #define ATTR    NULL
9370 #endif
9371 #endif
9372         /* make sure pthread_create() isn't just a stub */
9373         status = pthread_create(&t, ATTR, task, NULL);
9374         if( status ) exit( status );
9375
9376         /* make sure pthread_detach() isn't just a stub */
9377 #if HAVE_PTHREADS_D4
9378         status = pthread_detach( &t );
9379 #else
9380         status = pthread_detach( t );
9381 #endif
9382
9383 #ifdef HAVE_LINUX_THREADS
9384         pthread_kill_other_threads_np();
9385 #endif
9386
9387         exit( status );
9388
9389 ; return 0; }
9390 EOF
9391 if { (eval echo configure:9392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9392   rm -rf conftest*
9393   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9394 else
9395   echo "configure: failed program was:" >&5
9396   cat conftest.$ac_ext >&5
9397   rm -rf conftest*
9398   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9399 fi
9400 rm -f conftest*
9401 else
9402   cat > conftest.$ac_ext <<EOF
9403 #line 9404 "configure"
9404 #include "confdefs.h"
9405 /* pthread test headers */
9406 #include <pthread.h>
9407 #ifndef NULL
9408 #define NULL (void*)0
9409 #endif
9410
9411 static void *task(p)
9412         void *p;
9413 {
9414         return (void *) (p == NULL);
9415 }
9416
9417
9418 int main(argc, argv)
9419         int argc;
9420         char **argv;
9421 {
9422
9423         /* pthread test function */
9424         pthread_t t;
9425         int status;
9426 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9427         /* This system (e.g. AIX) defaults detached; must override */
9428         pthread_attr_t attr;
9429
9430         status = pthread_attr_init(&attr);
9431         if( status ) exit( status );
9432
9433         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9434         if( status ) exit( status );
9435
9436 #define ATTR    &attr
9437 #else
9438 #if HAVE_PTHREADS_D4
9439 #define ATTR    pthread_attr_default
9440 #else
9441 #define ATTR    NULL
9442 #endif
9443 #endif
9444         /* make sure pthread_create() isn't just a stub */
9445         status = pthread_create(&t, ATTR, task, NULL);
9446         if( status ) exit( status );
9447
9448         /* make sure pthread_detach() isn't just a stub */
9449 #if HAVE_PTHREADS_D4
9450         status = pthread_detach( &t );
9451 #else
9452         status = pthread_detach( t );
9453 #endif
9454
9455 #ifdef HAVE_LINUX_THREADS
9456         pthread_kill_other_threads_np();
9457 #endif
9458
9459         exit( status );
9460
9461 }
9462
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9465 then
9466   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -fr conftest*
9471   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9472 fi
9473 rm -fr conftest*
9474 fi
9475
9476
9477                 # restore the LIBS
9478                 LIBS="$ol_LIBS"
9479         
9480 fi
9481
9482 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9483
9484         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9485                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9486                 ol_link_threads=posix
9487         fi
9488 fi
9489
9490                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9491 if test "$ol_link_threads" = no ; then
9492         # try -lpthreads -lmach -lexc
9493         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9494 echo "configure:9495: checking for pthread link with -lpthreads -lmach -lexc" >&5
9495 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9496   echo $ac_n "(cached) $ac_c" 1>&6
9497 else
9498   
9499                 # save the flags
9500                 ol_LIBS="$LIBS"
9501                 LIBS="-lpthreads -lmach -lexc $LIBS"
9502
9503                 if test "$cross_compiling" = yes; then
9504   cat > conftest.$ac_ext <<EOF
9505 #line 9506 "configure"
9506 #include "confdefs.h"
9507 /* pthread test headers */
9508 #include <pthread.h>
9509 #ifndef NULL
9510 #define NULL (void*)0
9511 #endif
9512
9513 static void *task(p)
9514         void *p;
9515 {
9516         return (void *) (p == NULL);
9517 }
9518
9519 int main() {
9520
9521         /* pthread test function */
9522         pthread_t t;
9523         int status;
9524 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9525         /* This system (e.g. AIX) defaults detached; must override */
9526         pthread_attr_t attr;
9527
9528         status = pthread_attr_init(&attr);
9529         if( status ) exit( status );
9530
9531         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9532         if( status ) exit( status );
9533
9534 #define ATTR    &attr
9535 #else
9536 #if HAVE_PTHREADS_D4
9537 #define ATTR    pthread_attr_default
9538 #else
9539 #define ATTR    NULL
9540 #endif
9541 #endif
9542         /* make sure pthread_create() isn't just a stub */
9543         status = pthread_create(&t, ATTR, task, NULL);
9544         if( status ) exit( status );
9545
9546         /* make sure pthread_detach() isn't just a stub */
9547 #if HAVE_PTHREADS_D4
9548         status = pthread_detach( &t );
9549 #else
9550         status = pthread_detach( t );
9551 #endif
9552
9553 #ifdef HAVE_LINUX_THREADS
9554         pthread_kill_other_threads_np();
9555 #endif
9556
9557         exit( status );
9558
9559 ; return 0; }
9560 EOF
9561 if { (eval echo configure:9562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9562   rm -rf conftest*
9563   ol_cv_pthread_lpthreads_lmach_lexc=yes
9564 else
9565   echo "configure: failed program was:" >&5
9566   cat conftest.$ac_ext >&5
9567   rm -rf conftest*
9568   ol_cv_pthread_lpthreads_lmach_lexc=no
9569 fi
9570 rm -f conftest*
9571 else
9572   cat > conftest.$ac_ext <<EOF
9573 #line 9574 "configure"
9574 #include "confdefs.h"
9575 /* pthread test headers */
9576 #include <pthread.h>
9577 #ifndef NULL
9578 #define NULL (void*)0
9579 #endif
9580
9581 static void *task(p)
9582         void *p;
9583 {
9584         return (void *) (p == NULL);
9585 }
9586
9587
9588 int main(argc, argv)
9589         int argc;
9590         char **argv;
9591 {
9592
9593         /* pthread test function */
9594         pthread_t t;
9595         int status;
9596 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9597         /* This system (e.g. AIX) defaults detached; must override */
9598         pthread_attr_t attr;
9599
9600         status = pthread_attr_init(&attr);
9601         if( status ) exit( status );
9602
9603         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9604         if( status ) exit( status );
9605
9606 #define ATTR    &attr
9607 #else
9608 #if HAVE_PTHREADS_D4
9609 #define ATTR    pthread_attr_default
9610 #else
9611 #define ATTR    NULL
9612 #endif
9613 #endif
9614         /* make sure pthread_create() isn't just a stub */
9615         status = pthread_create(&t, ATTR, task, NULL);
9616         if( status ) exit( status );
9617
9618         /* make sure pthread_detach() isn't just a stub */
9619 #if HAVE_PTHREADS_D4
9620         status = pthread_detach( &t );
9621 #else
9622         status = pthread_detach( t );
9623 #endif
9624
9625 #ifdef HAVE_LINUX_THREADS
9626         pthread_kill_other_threads_np();
9627 #endif
9628
9629         exit( status );
9630
9631 }
9632
9633 EOF
9634 if { (eval echo configure:9635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9635 then
9636   ol_cv_pthread_lpthreads_lmach_lexc=yes
9637 else
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640   rm -fr conftest*
9641   ol_cv_pthread_lpthreads_lmach_lexc=no
9642 fi
9643 rm -fr conftest*
9644 fi
9645
9646
9647                 # restore the LIBS
9648                 LIBS="$ol_LIBS"
9649         
9650 fi
9651
9652 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9653
9654         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9655                 ol_link_pthreads="-lpthreads -lmach -lexc"
9656                 ol_link_threads=posix
9657         fi
9658 fi
9659
9660                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9661 if test "$ol_link_threads" = no ; then
9662         # try -lpthreads -lexc
9663         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9664 echo "configure:9665: checking for pthread link with -lpthreads -lexc" >&5
9665 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9666   echo $ac_n "(cached) $ac_c" 1>&6
9667 else
9668   
9669                 # save the flags
9670                 ol_LIBS="$LIBS"
9671                 LIBS="-lpthreads -lexc $LIBS"
9672
9673                 if test "$cross_compiling" = yes; then
9674   cat > conftest.$ac_ext <<EOF
9675 #line 9676 "configure"
9676 #include "confdefs.h"
9677 /* pthread test headers */
9678 #include <pthread.h>
9679 #ifndef NULL
9680 #define NULL (void*)0
9681 #endif
9682
9683 static void *task(p)
9684         void *p;
9685 {
9686         return (void *) (p == NULL);
9687 }
9688
9689 int main() {
9690
9691         /* pthread test function */
9692         pthread_t t;
9693         int status;
9694 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9695         /* This system (e.g. AIX) defaults detached; must override */
9696         pthread_attr_t attr;
9697
9698         status = pthread_attr_init(&attr);
9699         if( status ) exit( status );
9700
9701         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9702         if( status ) exit( status );
9703
9704 #define ATTR    &attr
9705 #else
9706 #if HAVE_PTHREADS_D4
9707 #define ATTR    pthread_attr_default
9708 #else
9709 #define ATTR    NULL
9710 #endif
9711 #endif
9712         /* make sure pthread_create() isn't just a stub */
9713         status = pthread_create(&t, ATTR, task, NULL);
9714         if( status ) exit( status );
9715
9716         /* make sure pthread_detach() isn't just a stub */
9717 #if HAVE_PTHREADS_D4
9718         status = pthread_detach( &t );
9719 #else
9720         status = pthread_detach( t );
9721 #endif
9722
9723 #ifdef HAVE_LINUX_THREADS
9724         pthread_kill_other_threads_np();
9725 #endif
9726
9727         exit( status );
9728
9729 ; return 0; }
9730 EOF
9731 if { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9732   rm -rf conftest*
9733   ol_cv_pthread_lpthreads_lexc=yes
9734 else
9735   echo "configure: failed program was:" >&5
9736   cat conftest.$ac_ext >&5
9737   rm -rf conftest*
9738   ol_cv_pthread_lpthreads_lexc=no
9739 fi
9740 rm -f conftest*
9741 else
9742   cat > conftest.$ac_ext <<EOF
9743 #line 9744 "configure"
9744 #include "confdefs.h"
9745 /* pthread test headers */
9746 #include <pthread.h>
9747 #ifndef NULL
9748 #define NULL (void*)0
9749 #endif
9750
9751 static void *task(p)
9752         void *p;
9753 {
9754         return (void *) (p == NULL);
9755 }
9756
9757
9758 int main(argc, argv)
9759         int argc;
9760         char **argv;
9761 {
9762
9763         /* pthread test function */
9764         pthread_t t;
9765         int status;
9766 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9767         /* This system (e.g. AIX) defaults detached; must override */
9768         pthread_attr_t attr;
9769
9770         status = pthread_attr_init(&attr);
9771         if( status ) exit( status );
9772
9773         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9774         if( status ) exit( status );
9775
9776 #define ATTR    &attr
9777 #else
9778 #if HAVE_PTHREADS_D4
9779 #define ATTR    pthread_attr_default
9780 #else
9781 #define ATTR    NULL
9782 #endif
9783 #endif
9784         /* make sure pthread_create() isn't just a stub */
9785         status = pthread_create(&t, ATTR, task, NULL);
9786         if( status ) exit( status );
9787
9788         /* make sure pthread_detach() isn't just a stub */
9789 #if HAVE_PTHREADS_D4
9790         status = pthread_detach( &t );
9791 #else
9792         status = pthread_detach( t );
9793 #endif
9794
9795 #ifdef HAVE_LINUX_THREADS
9796         pthread_kill_other_threads_np();
9797 #endif
9798
9799         exit( status );
9800
9801 }
9802
9803 EOF
9804 if { (eval echo configure:9805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9805 then
9806   ol_cv_pthread_lpthreads_lexc=yes
9807 else
9808   echo "configure: failed program was:" >&5
9809   cat conftest.$ac_ext >&5
9810   rm -fr conftest*
9811   ol_cv_pthread_lpthreads_lexc=no
9812 fi
9813 rm -fr conftest*
9814 fi
9815
9816
9817                 # restore the LIBS
9818                 LIBS="$ol_LIBS"
9819         
9820 fi
9821
9822 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9823
9824         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9825                 ol_link_pthreads="-lpthreads -lexc"
9826                 ol_link_threads=posix
9827         fi
9828 fi
9829
9830
9831                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9832 if test "$ol_link_threads" = no ; then
9833         # try -lpthreads
9834         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9835 echo "configure:9836: checking for pthread link with -lpthreads" >&5
9836 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9837   echo $ac_n "(cached) $ac_c" 1>&6
9838 else
9839   
9840                 # save the flags
9841                 ol_LIBS="$LIBS"
9842                 LIBS="-lpthreads $LIBS"
9843
9844                 if test "$cross_compiling" = yes; then
9845   cat > conftest.$ac_ext <<EOF
9846 #line 9847 "configure"
9847 #include "confdefs.h"
9848 /* pthread test headers */
9849 #include <pthread.h>
9850 #ifndef NULL
9851 #define NULL (void*)0
9852 #endif
9853
9854 static void *task(p)
9855         void *p;
9856 {
9857         return (void *) (p == NULL);
9858 }
9859
9860 int main() {
9861
9862         /* pthread test function */
9863         pthread_t t;
9864         int status;
9865 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9866         /* This system (e.g. AIX) defaults detached; must override */
9867         pthread_attr_t attr;
9868
9869         status = pthread_attr_init(&attr);
9870         if( status ) exit( status );
9871
9872         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9873         if( status ) exit( status );
9874
9875 #define ATTR    &attr
9876 #else
9877 #if HAVE_PTHREADS_D4
9878 #define ATTR    pthread_attr_default
9879 #else
9880 #define ATTR    NULL
9881 #endif
9882 #endif
9883         /* make sure pthread_create() isn't just a stub */
9884         status = pthread_create(&t, ATTR, task, NULL);
9885         if( status ) exit( status );
9886
9887         /* make sure pthread_detach() isn't just a stub */
9888 #if HAVE_PTHREADS_D4
9889         status = pthread_detach( &t );
9890 #else
9891         status = pthread_detach( t );
9892 #endif
9893
9894 #ifdef HAVE_LINUX_THREADS
9895         pthread_kill_other_threads_np();
9896 #endif
9897
9898         exit( status );
9899
9900 ; return 0; }
9901 EOF
9902 if { (eval echo configure:9903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9903   rm -rf conftest*
9904   ol_cv_pthread_lib_lpthreads=yes
9905 else
9906   echo "configure: failed program was:" >&5
9907   cat conftest.$ac_ext >&5
9908   rm -rf conftest*
9909   ol_cv_pthread_lib_lpthreads=no
9910 fi
9911 rm -f conftest*
9912 else
9913   cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 /* pthread test headers */
9917 #include <pthread.h>
9918 #ifndef NULL
9919 #define NULL (void*)0
9920 #endif
9921
9922 static void *task(p)
9923         void *p;
9924 {
9925         return (void *) (p == NULL);
9926 }
9927
9928
9929 int main(argc, argv)
9930         int argc;
9931         char **argv;
9932 {
9933
9934         /* pthread test function */
9935         pthread_t t;
9936         int status;
9937 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9938         /* This system (e.g. AIX) defaults detached; must override */
9939         pthread_attr_t attr;
9940
9941         status = pthread_attr_init(&attr);
9942         if( status ) exit( status );
9943
9944         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9945         if( status ) exit( status );
9946
9947 #define ATTR    &attr
9948 #else
9949 #if HAVE_PTHREADS_D4
9950 #define ATTR    pthread_attr_default
9951 #else
9952 #define ATTR    NULL
9953 #endif
9954 #endif
9955         /* make sure pthread_create() isn't just a stub */
9956         status = pthread_create(&t, ATTR, task, NULL);
9957         if( status ) exit( status );
9958
9959         /* make sure pthread_detach() isn't just a stub */
9960 #if HAVE_PTHREADS_D4
9961         status = pthread_detach( &t );
9962 #else
9963         status = pthread_detach( t );
9964 #endif
9965
9966 #ifdef HAVE_LINUX_THREADS
9967         pthread_kill_other_threads_np();
9968 #endif
9969
9970         exit( status );
9971
9972 }
9973
9974 EOF
9975 if { (eval echo configure:9976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9976 then
9977   ol_cv_pthread_lib_lpthreads=yes
9978 else
9979   echo "configure: failed program was:" >&5
9980   cat conftest.$ac_ext >&5
9981   rm -fr conftest*
9982   ol_cv_pthread_lib_lpthreads=no
9983 fi
9984 rm -fr conftest*
9985 fi
9986
9987
9988                 # restore the LIBS
9989                 LIBS="$ol_LIBS"
9990         
9991 fi
9992
9993 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9994
9995         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9996                 ol_link_pthreads="-lpthreads"
9997                 ol_link_threads=posix
9998         fi
9999 fi
10000
10001
10002                 if test $ol_link_threads != no ; then
10003                         cat >> confdefs.h <<\EOF
10004 #define HAVE_PTHREADS 1
10005 EOF
10006
10007
10008                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10009
10010                                                 save_CPPFLAGS="$CPPFLAGS"
10011                         save_LIBS="$LIBS"
10012                         LIBS="$LTHREAD_LIBS $LIBS"
10013
10014                                                                                                 for ac_func in sched_yield pthread_yield
10015 do
10016 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10017 echo "configure:10018: checking for $ac_func" >&5
10018 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10019   echo $ac_n "(cached) $ac_c" 1>&6
10020 else
10021   cat > conftest.$ac_ext <<EOF
10022 #line 10023 "configure"
10023 #include "confdefs.h"
10024 /* System header to define __stub macros and hopefully few prototypes,
10025     which can conflict with char $ac_func(); below.  */
10026 #include <assert.h>
10027 /* Override any gcc2 internal prototype to avoid an error.  */
10028 /* We use char because int might match the return type of a gcc2
10029     builtin and then its argument prototype would still apply.  */
10030 char $ac_func();
10031 char (*f)();
10032
10033 int main() {
10034
10035 /* The GNU C library defines this for functions which it implements
10036     to always fail with ENOSYS.  Some functions are actually named
10037     something starting with __ and the normal name is an alias.  */
10038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10039 choke me
10040 #else
10041 f = $ac_func;
10042 #endif
10043
10044 ; return 0; }
10045 EOF
10046 if { (eval echo configure:10047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10047   rm -rf conftest*
10048   eval "ac_cv_func_$ac_func=yes"
10049 else
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -rf conftest*
10053   eval "ac_cv_func_$ac_func=no"
10054 fi
10055 rm -f conftest*
10056 fi
10057
10058 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10059   echo "$ac_t""yes" 1>&6
10060     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10061   cat >> confdefs.h <<EOF
10062 #define $ac_tr_func 1
10063 EOF
10064  
10065 else
10066   echo "$ac_t""no" 1>&6
10067 fi
10068 done
10069
10070
10071                         if test $ac_cv_func_sched_yield = no -a \
10072                                 $ac_cv_func_pthread_yield = no ; then
10073                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10074 echo "configure:10075: checking for sched_yield in -lrt" >&5
10075 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10077   echo $ac_n "(cached) $ac_c" 1>&6
10078 else
10079   ac_save_LIBS="$LIBS"
10080 LIBS="-lrt  $LIBS"
10081 cat > conftest.$ac_ext <<EOF
10082 #line 10083 "configure"
10083 #include "confdefs.h"
10084 /* Override any gcc2 internal prototype to avoid an error.  */
10085 /* We use char because int might match the return type of a gcc2
10086     builtin and then its argument prototype would still apply.  */
10087 char sched_yield();
10088
10089 int main() {
10090 sched_yield()
10091 ; return 0; }
10092 EOF
10093 if { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10094   rm -rf conftest*
10095   eval "ac_cv_lib_$ac_lib_var=yes"
10096 else
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   eval "ac_cv_lib_$ac_lib_var=no"
10101 fi
10102 rm -f conftest*
10103 LIBS="$ac_save_LIBS"
10104
10105 fi
10106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10107   echo "$ac_t""yes" 1>&6
10108   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10109                                         cat >> confdefs.h <<\EOF
10110 #define HAVE_SCHED_YIELD 1
10111 EOF
10112
10113                                         ac_cv_func_sched_yield=yes
10114 else
10115   echo "$ac_t""no" 1>&6
10116 ac_cv_func_sched_yield=no
10117 fi
10118
10119                         fi
10120                         if test $ac_cv_func_sched_yield = no -a \
10121                                 $ac_cv_func_pthread_yield = no ; then
10122                                                                                                 for ac_func in thr_yield
10123 do
10124 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10125 echo "configure:10126: checking for $ac_func" >&5
10126 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10127   echo $ac_n "(cached) $ac_c" 1>&6
10128 else
10129   cat > conftest.$ac_ext <<EOF
10130 #line 10131 "configure"
10131 #include "confdefs.h"
10132 /* System header to define __stub macros and hopefully few prototypes,
10133     which can conflict with char $ac_func(); below.  */
10134 #include <assert.h>
10135 /* Override any gcc2 internal prototype to avoid an error.  */
10136 /* We use char because int might match the return type of a gcc2
10137     builtin and then its argument prototype would still apply.  */
10138 char $ac_func();
10139 char (*f)();
10140
10141 int main() {
10142
10143 /* The GNU C library defines this for functions which it implements
10144     to always fail with ENOSYS.  Some functions are actually named
10145     something starting with __ and the normal name is an alias.  */
10146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10147 choke me
10148 #else
10149 f = $ac_func;
10150 #endif
10151
10152 ; return 0; }
10153 EOF
10154 if { (eval echo configure:10155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10155   rm -rf conftest*
10156   eval "ac_cv_func_$ac_func=yes"
10157 else
10158   echo "configure: failed program was:" >&5
10159   cat conftest.$ac_ext >&5
10160   rm -rf conftest*
10161   eval "ac_cv_func_$ac_func=no"
10162 fi
10163 rm -f conftest*
10164 fi
10165
10166 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10167   echo "$ac_t""yes" 1>&6
10168     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10169   cat >> confdefs.h <<EOF
10170 #define $ac_tr_func 1
10171 EOF
10172  
10173 else
10174   echo "$ac_t""no" 1>&6
10175 fi
10176 done
10177
10178                         fi
10179                         if test $ac_cv_func_sched_yield = no -a \
10180                                 $ac_cv_func_pthread_yield = no -a \
10181                                 "$ac_cv_func_thr_yield" = no ; then
10182                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10183                         fi
10184
10185                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10186 do
10187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10188 echo "configure:10189: checking for $ac_func" >&5
10189 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10190   echo $ac_n "(cached) $ac_c" 1>&6
10191 else
10192   cat > conftest.$ac_ext <<EOF
10193 #line 10194 "configure"
10194 #include "confdefs.h"
10195 /* System header to define __stub macros and hopefully few prototypes,
10196     which can conflict with char $ac_func(); below.  */
10197 #include <assert.h>
10198 /* Override any gcc2 internal prototype to avoid an error.  */
10199 /* We use char because int might match the return type of a gcc2
10200     builtin and then its argument prototype would still apply.  */
10201 char $ac_func();
10202 char (*f)();
10203
10204 int main() {
10205
10206 /* The GNU C library defines this for functions which it implements
10207     to always fail with ENOSYS.  Some functions are actually named
10208     something starting with __ and the normal name is an alias.  */
10209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10210 choke me
10211 #else
10212 f = $ac_func;
10213 #endif
10214
10215 ; return 0; }
10216 EOF
10217 if { (eval echo configure:10218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10218   rm -rf conftest*
10219   eval "ac_cv_func_$ac_func=yes"
10220 else
10221   echo "configure: failed program was:" >&5
10222   cat conftest.$ac_ext >&5
10223   rm -rf conftest*
10224   eval "ac_cv_func_$ac_func=no"
10225 fi
10226 rm -f conftest*
10227 fi
10228
10229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10230   echo "$ac_t""yes" 1>&6
10231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10232   cat >> confdefs.h <<EOF
10233 #define $ac_tr_func 1
10234 EOF
10235  
10236 else
10237   echo "$ac_t""no" 1>&6
10238 fi
10239 done
10240
10241
10242                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10243 echo "configure:10244: checking for pthread_detach with <pthread.h>" >&5
10244 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10245   echo $ac_n "(cached) $ac_c" 1>&6
10246 else
10247   
10248                                                                 cat > conftest.$ac_ext <<EOF
10249 #line 10250 "configure"
10250 #include "confdefs.h"
10251
10252 #include <pthread.h>
10253 #ifndef NULL
10254 #define NULL (void*)0
10255 #endif
10256
10257 int main() {
10258 pthread_detach(NULL);
10259 ; return 0; }
10260 EOF
10261 if { (eval echo configure:10262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10262   rm -rf conftest*
10263   ol_cv_func_pthread_detach=yes
10264 else
10265   echo "configure: failed program was:" >&5
10266   cat conftest.$ac_ext >&5
10267   rm -rf conftest*
10268   ol_cv_func_pthread_detach=no
10269 fi
10270 rm -f conftest*
10271                         
10272 fi
10273
10274 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10275
10276                         if test $ol_cv_func_pthread_detach = no ; then
10277                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10278                         fi
10279
10280                         cat >> confdefs.h <<\EOF
10281 #define HAVE_PTHREAD_DETACH 1
10282 EOF
10283
10284
10285                                                 for ac_func in \
10286                                 pthread_setconcurrency \
10287                                 pthread_getconcurrency \
10288                                 thr_setconcurrency \
10289                                 thr_getconcurrency \
10290                         
10291 do
10292 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10293 echo "configure:10294: checking for $ac_func" >&5
10294 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10295   echo $ac_n "(cached) $ac_c" 1>&6
10296 else
10297   cat > conftest.$ac_ext <<EOF
10298 #line 10299 "configure"
10299 #include "confdefs.h"
10300 /* System header to define __stub macros and hopefully few prototypes,
10301     which can conflict with char $ac_func(); below.  */
10302 #include <assert.h>
10303 /* Override any gcc2 internal prototype to avoid an error.  */
10304 /* We use char because int might match the return type of a gcc2
10305     builtin and then its argument prototype would still apply.  */
10306 char $ac_func();
10307 char (*f)();
10308
10309 int main() {
10310
10311 /* The GNU C library defines this for functions which it implements
10312     to always fail with ENOSYS.  Some functions are actually named
10313     something starting with __ and the normal name is an alias.  */
10314 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10315 choke me
10316 #else
10317 f = $ac_func;
10318 #endif
10319
10320 ; return 0; }
10321 EOF
10322 if { (eval echo configure:10323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10323   rm -rf conftest*
10324   eval "ac_cv_func_$ac_func=yes"
10325 else
10326   echo "configure: failed program was:" >&5
10327   cat conftest.$ac_ext >&5
10328   rm -rf conftest*
10329   eval "ac_cv_func_$ac_func=no"
10330 fi
10331 rm -f conftest*
10332 fi
10333
10334 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10335   echo "$ac_t""yes" 1>&6
10336     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10337   cat >> confdefs.h <<EOF
10338 #define $ac_tr_func 1
10339 EOF
10340  
10341 else
10342   echo "$ac_t""no" 1>&6
10343 fi
10344 done
10345
10346
10347                         
10348         for ac_func in pthread_kill_other_threads_np
10349 do
10350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10351 echo "configure:10352: checking for $ac_func" >&5
10352 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10353   echo $ac_n "(cached) $ac_c" 1>&6
10354 else
10355   cat > conftest.$ac_ext <<EOF
10356 #line 10357 "configure"
10357 #include "confdefs.h"
10358 /* System header to define __stub macros and hopefully few prototypes,
10359     which can conflict with char $ac_func(); below.  */
10360 #include <assert.h>
10361 /* Override any gcc2 internal prototype to avoid an error.  */
10362 /* We use char because int might match the return type of a gcc2
10363     builtin and then its argument prototype would still apply.  */
10364 char $ac_func();
10365 char (*f)();
10366
10367 int main() {
10368
10369 /* The GNU C library defines this for functions which it implements
10370     to always fail with ENOSYS.  Some functions are actually named
10371     something starting with __ and the normal name is an alias.  */
10372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10373 choke me
10374 #else
10375 f = $ac_func;
10376 #endif
10377
10378 ; return 0; }
10379 EOF
10380 if { (eval echo configure:10381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10381   rm -rf conftest*
10382   eval "ac_cv_func_$ac_func=yes"
10383 else
10384   echo "configure: failed program was:" >&5
10385   cat conftest.$ac_ext >&5
10386   rm -rf conftest*
10387   eval "ac_cv_func_$ac_func=no"
10388 fi
10389 rm -f conftest*
10390 fi
10391
10392 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10393   echo "$ac_t""yes" 1>&6
10394     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10395   cat >> confdefs.h <<EOF
10396 #define $ac_tr_func 1
10397 EOF
10398  
10399 else
10400   echo "$ac_t""no" 1>&6
10401 fi
10402 done
10403
10404         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10405 echo "configure:10406: checking for LinuxThreads implementation" >&5
10406 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10407   echo $ac_n "(cached) $ac_c" 1>&6
10408 else
10409   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10410 fi
10411
10412 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10413
10414                         
10415         
10416         
10417         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10418 echo "configure:10419: checking for LinuxThreads consistency" >&5
10419 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10420   echo $ac_n "(cached) $ac_c" 1>&6
10421 else
10422   
10423                 if test $ol_cv_header_linux_threads = yes -a \
10424                         $ol_cv_sys_linux_threads = yes; then
10425                         ol_cv_linux_threads=yes
10426                 elif test $ol_cv_header_linux_threads = no -a \
10427                         $ol_cv_sys_linux_threads = no; then
10428                         ol_cv_linux_threads=no
10429                 else
10430                         ol_cv_linux_threads=error
10431                 fi
10432         
10433 fi
10434
10435 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10436
10437
10438                         if test $ol_cv_linux_threads = error; then
10439                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10440                         fi
10441
10442                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10443 echo "configure:10444: checking if pthread_create() works" >&5
10444 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10445   echo $ac_n "(cached) $ac_c" 1>&6
10446 else
10447   
10448                         if test "$cross_compiling" = yes; then
10449                                 ol_cv_pthread_create_works=yes
10450 else
10451   cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454 /* pthread test headers */
10455 #include <pthread.h>
10456 #ifndef NULL
10457 #define NULL (void*)0
10458 #endif
10459
10460 static void *task(p)
10461         void *p;
10462 {
10463         return (void *) (p == NULL);
10464 }
10465
10466
10467 int main(argc, argv)
10468         int argc;
10469         char **argv;
10470 {
10471
10472         /* pthread test function */
10473         pthread_t t;
10474         int status;
10475 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10476         /* This system (e.g. AIX) defaults detached; must override */
10477         pthread_attr_t attr;
10478
10479         status = pthread_attr_init(&attr);
10480         if( status ) exit( status );
10481
10482         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10483         if( status ) exit( status );
10484
10485 #define ATTR    &attr
10486 #else
10487 #if HAVE_PTHREADS_D4
10488 #define ATTR    pthread_attr_default
10489 #else
10490 #define ATTR    NULL
10491 #endif
10492 #endif
10493         /* make sure pthread_create() isn't just a stub */
10494         status = pthread_create(&t, ATTR, task, NULL);
10495         if( status ) exit( status );
10496
10497         /* make sure pthread_detach() isn't just a stub */
10498 #if HAVE_PTHREADS_D4
10499         status = pthread_detach( &t );
10500 #else
10501         status = pthread_detach( t );
10502 #endif
10503
10504 #ifdef HAVE_LINUX_THREADS
10505         pthread_kill_other_threads_np();
10506 #endif
10507
10508         exit( status );
10509
10510 }
10511
10512 EOF
10513 if { (eval echo configure:10514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10514 then
10515   ol_cv_pthread_create_works=yes
10516 else
10517   echo "configure: failed program was:" >&5
10518   cat conftest.$ac_ext >&5
10519   rm -fr conftest*
10520   ol_cv_pthread_create_works=no
10521 fi
10522 rm -fr conftest*
10523 fi
10524
10525 fi
10526
10527 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10528
10529                         if test $ol_cv_pthread_create_works = no ; then
10530                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10531                         fi
10532
10533                                                 if test $ol_with_yielding_select = auto ; then
10534                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10535 echo "configure:10536: checking if select yields when using pthreads" >&5
10536 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10537   echo $ac_n "(cached) $ac_c" 1>&6
10538 else
10539   
10540                                 if test "$cross_compiling" = yes; then
10541   ol_cv_pthread_select_yields=cross
10542 else
10543   cat > conftest.$ac_ext <<EOF
10544 #line 10545 "configure"
10545 #include "confdefs.h"
10546
10547 #include <sys/types.h>
10548 #include <sys/time.h>
10549 #include <unistd.h>
10550 #include <pthread.h>
10551 #ifndef NULL
10552 #define NULL (void*) 0
10553 #endif
10554
10555 static int fildes[2];
10556
10557 static void *task(p)
10558         void *p;
10559 {
10560         int i;
10561         struct timeval tv;
10562
10563         fd_set rfds;
10564
10565         tv.tv_sec=10;
10566         tv.tv_usec=0;
10567
10568         FD_ZERO(&rfds);
10569         FD_SET(fildes[0], &rfds);
10570
10571         /* we're not interested in any fds */
10572         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10573
10574         if(i < 0) {
10575                 perror("select");
10576                 exit(10);
10577         }
10578
10579         exit(0); /* if we exit here, the select blocked the whole process */
10580 }
10581
10582 int main(argc, argv)
10583         int argc;
10584         char **argv;
10585 {
10586         pthread_t t;
10587
10588         /* create a pipe to select */
10589         if(pipe(&fildes[0])) {
10590                 perror("select");
10591                 exit(1);
10592         }
10593
10594 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10595         (void) pthread_setconcurrency(2);
10596 #else
10597 #ifdef HAVE_THR_SETCONCURRENCY
10598         /* Set Solaris LWP concurrency to 2 */
10599         thr_setconcurrency(2);
10600 #endif
10601 #endif
10602
10603 #if HAVE_PTHREADS_D4
10604         pthread_create(&t, pthread_attr_default, task, NULL);
10605 #else
10606         pthread_create(&t, NULL, task, NULL);
10607 #endif
10608
10609 #if HAVE_SCHED_YIELD
10610         sched_yield();  /* make sure task runs first */
10611 #else
10612 #ifdef HAVE_PTHREAD_YIELD
10613         pthread_yield();        /* make sure task runs first */
10614 #endif
10615 #endif
10616
10617         exit(2);
10618 }
10619 EOF
10620 if { (eval echo configure:10621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10621 then
10622   ol_cv_pthread_select_yields=no
10623 else
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -fr conftest*
10627   ol_cv_pthread_select_yields=yes
10628 fi
10629 rm -fr conftest*
10630 fi
10631
10632 fi
10633
10634 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10635
10636                                 if test $ol_cv_pthread_select_yields = cross ; then
10637                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10638                                 fi
10639
10640                                 if test $ol_cv_pthread_select_yields = yes ; then
10641                                         ol_with_yielding_select=yes
10642                                 fi
10643                         fi
10644
10645                                                 CPPFLAGS="$save_CPPFLAGS"
10646                         LIBS="$save_LIBS"
10647                 else
10648                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10649                 fi
10650         fi
10651
10652         if test $ol_with_threads = posix ; then
10653                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10654         fi
10655 fi
10656
10657 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10658         -o $ol_with_threads = mach ; then
10659
10660                 for ac_hdr in mach/cthreads.h
10661 do
10662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10664 echo "configure:10665: checking for $ac_hdr" >&5
10665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10666   echo $ac_n "(cached) $ac_c" 1>&6
10667 else
10668   cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671 #include <$ac_hdr>
10672 EOF
10673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10674 { (eval echo configure:10675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10676 if test -z "$ac_err"; then
10677   rm -rf conftest*
10678   eval "ac_cv_header_$ac_safe=yes"
10679 else
10680   echo "$ac_err" >&5
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -rf conftest*
10684   eval "ac_cv_header_$ac_safe=no"
10685 fi
10686 rm -f conftest*
10687 fi
10688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10689   echo "$ac_t""yes" 1>&6
10690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10691   cat >> confdefs.h <<EOF
10692 #define $ac_tr_hdr 1
10693 EOF
10694  
10695 else
10696   echo "$ac_t""no" 1>&6
10697 fi
10698 done
10699
10700         if test $ac_cv_header_mach_cthreads_h = yes ; then
10701                 ol_with_threads=found
10702
10703                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10704 echo "configure:10705: checking for cthread_fork" >&5
10705 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10706   echo $ac_n "(cached) $ac_c" 1>&6
10707 else
10708   cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711 /* System header to define __stub macros and hopefully few prototypes,
10712     which can conflict with char cthread_fork(); below.  */
10713 #include <assert.h>
10714 /* Override any gcc2 internal prototype to avoid an error.  */
10715 /* We use char because int might match the return type of a gcc2
10716     builtin and then its argument prototype would still apply.  */
10717 char cthread_fork();
10718 char (*f)();
10719
10720 int main() {
10721
10722 /* The GNU C library defines this for functions which it implements
10723     to always fail with ENOSYS.  Some functions are actually named
10724     something starting with __ and the normal name is an alias.  */
10725 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10726 choke me
10727 #else
10728 f = cthread_fork;
10729 #endif
10730
10731 ; return 0; }
10732 EOF
10733 if { (eval echo configure:10734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10734   rm -rf conftest*
10735   eval "ac_cv_func_cthread_fork=yes"
10736 else
10737   echo "configure: failed program was:" >&5
10738   cat conftest.$ac_ext >&5
10739   rm -rf conftest*
10740   eval "ac_cv_func_cthread_fork=no"
10741 fi
10742 rm -f conftest*
10743 fi
10744
10745 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10746   echo "$ac_t""yes" 1>&6
10747   ol_link_threads=yes
10748 else
10749   echo "$ac_t""no" 1>&6
10750 fi
10751
10752
10753                 if test $ol_link_threads = no ; then
10754                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10755 echo "configure:10756: checking for cthread_fork with -all_load" >&5
10756 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10757   echo $ac_n "(cached) $ac_c" 1>&6
10758 else
10759   
10760                                                                 save_LIBS="$LIBS"
10761                                 LIBS="-all_load $LIBS"
10762                                 cat > conftest.$ac_ext <<EOF
10763 #line 10764 "configure"
10764 #include "confdefs.h"
10765 #include <mach/cthreads.h>
10766 int main() {
10767
10768                                         cthread_fork((void *)0, (void *)0);
10769                                         
10770 ; return 0; }
10771 EOF
10772 if { (eval echo configure:10773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10773   rm -rf conftest*
10774   ol_cv_cthread_all_load=yes
10775 else
10776   echo "configure: failed program was:" >&5
10777   cat conftest.$ac_ext >&5
10778   rm -rf conftest*
10779   ol_cv_cthread_all_load=no
10780 fi
10781 rm -f conftest*
10782                                                                 LIBS="$save_LIBS"
10783                         
10784 fi
10785
10786 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10787
10788                         if test $ol_cv_cthread_all_load = yes ; then
10789                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10790                                 ol_link_threads=mach
10791                         fi
10792                 fi
10793
10794                 if test $ol_link_threads != no ; then
10795                         : check for cthread specific functionality here
10796                         cat >> confdefs.h <<\EOF
10797 #define HAVE_MACH_CTHREADS 1
10798 EOF
10799
10800                 else
10801                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10802                 fi
10803         fi
10804
10805         if test $ol_with_threads = mach ; then
10806                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10807         fi
10808 fi
10809
10810 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10811         -o $ol_with_threads = pth ; then
10812
10813         for ac_hdr in pth.h
10814 do
10815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10817 echo "configure:10818: checking for $ac_hdr" >&5
10818 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10819   echo $ac_n "(cached) $ac_c" 1>&6
10820 else
10821   cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824 #include <$ac_hdr>
10825 EOF
10826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10827 { (eval echo configure:10828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10829 if test -z "$ac_err"; then
10830   rm -rf conftest*
10831   eval "ac_cv_header_$ac_safe=yes"
10832 else
10833   echo "$ac_err" >&5
10834   echo "configure: failed program was:" >&5
10835   cat conftest.$ac_ext >&5
10836   rm -rf conftest*
10837   eval "ac_cv_header_$ac_safe=no"
10838 fi
10839 rm -f conftest*
10840 fi
10841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10842   echo "$ac_t""yes" 1>&6
10843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10844   cat >> confdefs.h <<EOF
10845 #define $ac_tr_hdr 1
10846 EOF
10847  
10848 else
10849   echo "$ac_t""no" 1>&6
10850 fi
10851 done
10852
10853
10854         if test $ac_cv_header_pth_h = yes ; then
10855                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10856 echo "configure:10857: checking for pth_version in -lpth" >&5
10857 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10858 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10859   echo $ac_n "(cached) $ac_c" 1>&6
10860 else
10861   ac_save_LIBS="$LIBS"
10862 LIBS="-lpth  $LIBS"
10863 cat > conftest.$ac_ext <<EOF
10864 #line 10865 "configure"
10865 #include "confdefs.h"
10866 /* Override any gcc2 internal prototype to avoid an error.  */
10867 /* We use char because int might match the return type of a gcc2
10868     builtin and then its argument prototype would still apply.  */
10869 char pth_version();
10870
10871 int main() {
10872 pth_version()
10873 ; return 0; }
10874 EOF
10875 if { (eval echo configure:10876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10876   rm -rf conftest*
10877   eval "ac_cv_lib_$ac_lib_var=yes"
10878 else
10879   echo "configure: failed program was:" >&5
10880   cat conftest.$ac_ext >&5
10881   rm -rf conftest*
10882   eval "ac_cv_lib_$ac_lib_var=no"
10883 fi
10884 rm -f conftest*
10885 LIBS="$ac_save_LIBS"
10886
10887 fi
10888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10889   echo "$ac_t""yes" 1>&6
10890   have_pth=yes
10891 else
10892   echo "$ac_t""no" 1>&6
10893 have_pth=no
10894 fi
10895
10896
10897                 if test $have_pth = yes ; then
10898                         cat >> confdefs.h <<\EOF
10899 #define HAVE_GNU_PTH 1
10900 EOF
10901
10902                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10903                         ol_link_threads=pth
10904
10905                         if test $ol_with_yielding_select = auto ; then
10906                                 ol_with_yielding_select=yes
10907                         fi
10908                 fi
10909         fi
10910 fi
10911
10912 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10913         -o $ol_with_threads = lwp ; then
10914
10915                 for ac_hdr in thread.h synch.h
10916 do
10917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10919 echo "configure:10920: checking for $ac_hdr" >&5
10920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10921   echo $ac_n "(cached) $ac_c" 1>&6
10922 else
10923   cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926 #include <$ac_hdr>
10927 EOF
10928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10929 { (eval echo configure:10930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10931 if test -z "$ac_err"; then
10932   rm -rf conftest*
10933   eval "ac_cv_header_$ac_safe=yes"
10934 else
10935   echo "$ac_err" >&5
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_header_$ac_safe=no"
10940 fi
10941 rm -f conftest*
10942 fi
10943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10944   echo "$ac_t""yes" 1>&6
10945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10946   cat >> confdefs.h <<EOF
10947 #define $ac_tr_hdr 1
10948 EOF
10949  
10950 else
10951   echo "$ac_t""no" 1>&6
10952 fi
10953 done
10954
10955         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10956                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10957 echo "configure:10958: checking for thr_create in -lthread" >&5
10958 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10960   echo $ac_n "(cached) $ac_c" 1>&6
10961 else
10962   ac_save_LIBS="$LIBS"
10963 LIBS="-lthread  $LIBS"
10964 cat > conftest.$ac_ext <<EOF
10965 #line 10966 "configure"
10966 #include "confdefs.h"
10967 /* Override any gcc2 internal prototype to avoid an error.  */
10968 /* We use char because int might match the return type of a gcc2
10969     builtin and then its argument prototype would still apply.  */
10970 char thr_create();
10971
10972 int main() {
10973 thr_create()
10974 ; return 0; }
10975 EOF
10976 if { (eval echo configure:10977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10977   rm -rf conftest*
10978   eval "ac_cv_lib_$ac_lib_var=yes"
10979 else
10980   echo "configure: failed program was:" >&5
10981   cat conftest.$ac_ext >&5
10982   rm -rf conftest*
10983   eval "ac_cv_lib_$ac_lib_var=no"
10984 fi
10985 rm -f conftest*
10986 LIBS="$ac_save_LIBS"
10987
10988 fi
10989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10990   echo "$ac_t""yes" 1>&6
10991   have_thr=yes
10992 else
10993   echo "$ac_t""no" 1>&6
10994 have_thr=no
10995 fi
10996
10997
10998                 if test $have_thr = yes ; then
10999                         cat >> confdefs.h <<\EOF
11000 #define HAVE_THR 1
11001 EOF
11002
11003                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11004                         ol_link_threads=thr
11005
11006                         if test $ol_with_yielding_select = auto ; then
11007                                 ol_with_yielding_select=yes
11008                         fi
11009
11010                                                 for ac_func in \
11011                                 thr_setconcurrency \
11012                                 thr_getconcurrency \
11013                         
11014 do
11015 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11016 echo "configure:11017: checking for $ac_func" >&5
11017 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11018   echo $ac_n "(cached) $ac_c" 1>&6
11019 else
11020   cat > conftest.$ac_ext <<EOF
11021 #line 11022 "configure"
11022 #include "confdefs.h"
11023 /* System header to define __stub macros and hopefully few prototypes,
11024     which can conflict with char $ac_func(); below.  */
11025 #include <assert.h>
11026 /* Override any gcc2 internal prototype to avoid an error.  */
11027 /* We use char because int might match the return type of a gcc2
11028     builtin and then its argument prototype would still apply.  */
11029 char $ac_func();
11030 char (*f)();
11031
11032 int main() {
11033
11034 /* The GNU C library defines this for functions which it implements
11035     to always fail with ENOSYS.  Some functions are actually named
11036     something starting with __ and the normal name is an alias.  */
11037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11038 choke me
11039 #else
11040 f = $ac_func;
11041 #endif
11042
11043 ; return 0; }
11044 EOF
11045 if { (eval echo configure:11046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11046   rm -rf conftest*
11047   eval "ac_cv_func_$ac_func=yes"
11048 else
11049   echo "configure: failed program was:" >&5
11050   cat conftest.$ac_ext >&5
11051   rm -rf conftest*
11052   eval "ac_cv_func_$ac_func=no"
11053 fi
11054 rm -f conftest*
11055 fi
11056
11057 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11058   echo "$ac_t""yes" 1>&6
11059     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11060   cat >> confdefs.h <<EOF
11061 #define $ac_tr_func 1
11062 EOF
11063  
11064 else
11065   echo "$ac_t""no" 1>&6
11066 fi
11067 done
11068
11069                 fi
11070         fi
11071
11072                 for ac_hdr in lwp/lwp.h
11073 do
11074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11076 echo "configure:11077: checking for $ac_hdr" >&5
11077 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11078   echo $ac_n "(cached) $ac_c" 1>&6
11079 else
11080   cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 #include <$ac_hdr>
11084 EOF
11085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11086 { (eval echo configure:11087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11088 if test -z "$ac_err"; then
11089   rm -rf conftest*
11090   eval "ac_cv_header_$ac_safe=yes"
11091 else
11092   echo "$ac_err" >&5
11093   echo "configure: failed program was:" >&5
11094   cat conftest.$ac_ext >&5
11095   rm -rf conftest*
11096   eval "ac_cv_header_$ac_safe=no"
11097 fi
11098 rm -f conftest*
11099 fi
11100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11101   echo "$ac_t""yes" 1>&6
11102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11103   cat >> confdefs.h <<EOF
11104 #define $ac_tr_hdr 1
11105 EOF
11106  
11107 else
11108   echo "$ac_t""no" 1>&6
11109 fi
11110 done
11111
11112         if test $ac_cv_header_lwp_lwp_h = yes ; then
11113                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11114 echo "configure:11115: checking for lwp_create in -llwp" >&5
11115 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11117   echo $ac_n "(cached) $ac_c" 1>&6
11118 else
11119   ac_save_LIBS="$LIBS"
11120 LIBS="-llwp  $LIBS"
11121 cat > conftest.$ac_ext <<EOF
11122 #line 11123 "configure"
11123 #include "confdefs.h"
11124 /* Override any gcc2 internal prototype to avoid an error.  */
11125 /* We use char because int might match the return type of a gcc2
11126     builtin and then its argument prototype would still apply.  */
11127 char lwp_create();
11128
11129 int main() {
11130 lwp_create()
11131 ; return 0; }
11132 EOF
11133 if { (eval echo configure:11134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11134   rm -rf conftest*
11135   eval "ac_cv_lib_$ac_lib_var=yes"
11136 else
11137   echo "configure: failed program was:" >&5
11138   cat conftest.$ac_ext >&5
11139   rm -rf conftest*
11140   eval "ac_cv_lib_$ac_lib_var=no"
11141 fi
11142 rm -f conftest*
11143 LIBS="$ac_save_LIBS"
11144
11145 fi
11146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11147   echo "$ac_t""yes" 1>&6
11148   have_lwp=yes
11149 else
11150   echo "$ac_t""no" 1>&6
11151 have_lwp=no
11152 fi
11153
11154
11155                 if test $have_lwp = yes ; then
11156                         cat >> confdefs.h <<\EOF
11157 #define HAVE_LWP 1
11158 EOF
11159
11160                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11161                         ol_link_threads=lwp
11162
11163                         if test $ol_with_yielding_select = auto ; then
11164                                 ol_with_yielding_select=no
11165                         fi
11166                 fi
11167         fi
11168 fi
11169
11170 if test $ol_with_yielding_select = yes ; then
11171         cat >> confdefs.h <<\EOF
11172 #define HAVE_YIELDING_SELECT 1
11173 EOF
11174
11175 fi
11176
11177 if test $ol_with_threads = manual ; then
11178                 ol_link_threads=yes
11179
11180         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11181
11182         for ac_hdr in pthread.h sched.h
11183 do
11184 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11185 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11186 echo "configure:11187: checking for $ac_hdr" >&5
11187 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11188   echo $ac_n "(cached) $ac_c" 1>&6
11189 else
11190   cat > conftest.$ac_ext <<EOF
11191 #line 11192 "configure"
11192 #include "confdefs.h"
11193 #include <$ac_hdr>
11194 EOF
11195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11196 { (eval echo configure:11197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11198 if test -z "$ac_err"; then
11199   rm -rf conftest*
11200   eval "ac_cv_header_$ac_safe=yes"
11201 else
11202   echo "$ac_err" >&5
11203   echo "configure: failed program was:" >&5
11204   cat conftest.$ac_ext >&5
11205   rm -rf conftest*
11206   eval "ac_cv_header_$ac_safe=no"
11207 fi
11208 rm -f conftest*
11209 fi
11210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11211   echo "$ac_t""yes" 1>&6
11212     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11213   cat >> confdefs.h <<EOF
11214 #define $ac_tr_hdr 1
11215 EOF
11216  
11217 else
11218   echo "$ac_t""no" 1>&6
11219 fi
11220 done
11221
11222         for ac_func in sched_yield pthread_yield
11223 do
11224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11225 echo "configure:11226: checking for $ac_func" >&5
11226 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11227   echo $ac_n "(cached) $ac_c" 1>&6
11228 else
11229   cat > conftest.$ac_ext <<EOF
11230 #line 11231 "configure"
11231 #include "confdefs.h"
11232 /* System header to define __stub macros and hopefully few prototypes,
11233     which can conflict with char $ac_func(); below.  */
11234 #include <assert.h>
11235 /* Override any gcc2 internal prototype to avoid an error.  */
11236 /* We use char because int might match the return type of a gcc2
11237     builtin and then its argument prototype would still apply.  */
11238 char $ac_func();
11239 char (*f)();
11240
11241 int main() {
11242
11243 /* The GNU C library defines this for functions which it implements
11244     to always fail with ENOSYS.  Some functions are actually named
11245     something starting with __ and the normal name is an alias.  */
11246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11247 choke me
11248 #else
11249 f = $ac_func;
11250 #endif
11251
11252 ; return 0; }
11253 EOF
11254 if { (eval echo configure:11255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11255   rm -rf conftest*
11256   eval "ac_cv_func_$ac_func=yes"
11257 else
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -rf conftest*
11261   eval "ac_cv_func_$ac_func=no"
11262 fi
11263 rm -f conftest*
11264 fi
11265
11266 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11267   echo "$ac_t""yes" 1>&6
11268     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11269   cat >> confdefs.h <<EOF
11270 #define $ac_tr_func 1
11271 EOF
11272  
11273 else
11274   echo "$ac_t""no" 1>&6
11275 fi
11276 done
11277
11278         
11279         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11280 echo "configure:11281: checking for LinuxThreads pthread.h" >&5
11281 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11282   echo $ac_n "(cached) $ac_c" 1>&6
11283 else
11284   cat > conftest.$ac_ext <<EOF
11285 #line 11286 "configure"
11286 #include "confdefs.h"
11287 #include <pthread.h>
11288 EOF
11289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11290   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11291   rm -rf conftest*
11292   ol_cv_header_linux_threads=yes
11293 else
11294   rm -rf conftest*
11295   ol_cv_header_linux_threads=no
11296 fi
11297 rm -f conftest*
11298
11299                 
11300 fi
11301
11302 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11303         if test $ol_cv_header_linux_threads = yes; then
11304                 cat >> confdefs.h <<\EOF
11305 #define HAVE_LINUX_THREADS 1
11306 EOF
11307
11308         fi
11309
11310
11311         for ac_hdr in mach/cthreads.h
11312 do
11313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11315 echo "configure:11316: checking for $ac_hdr" >&5
11316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11317   echo $ac_n "(cached) $ac_c" 1>&6
11318 else
11319   cat > conftest.$ac_ext <<EOF
11320 #line 11321 "configure"
11321 #include "confdefs.h"
11322 #include <$ac_hdr>
11323 EOF
11324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11325 { (eval echo configure:11326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11327 if test -z "$ac_err"; then
11328   rm -rf conftest*
11329   eval "ac_cv_header_$ac_safe=yes"
11330 else
11331   echo "$ac_err" >&5
11332   echo "configure: failed program was:" >&5
11333   cat conftest.$ac_ext >&5
11334   rm -rf conftest*
11335   eval "ac_cv_header_$ac_safe=no"
11336 fi
11337 rm -f conftest*
11338 fi
11339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11340   echo "$ac_t""yes" 1>&6
11341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11342   cat >> confdefs.h <<EOF
11343 #define $ac_tr_hdr 1
11344 EOF
11345  
11346 else
11347   echo "$ac_t""no" 1>&6
11348 fi
11349 done
11350
11351         for ac_hdr in lwp/lwp.h
11352 do
11353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11355 echo "configure:11356: checking for $ac_hdr" >&5
11356 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11357   echo $ac_n "(cached) $ac_c" 1>&6
11358 else
11359   cat > conftest.$ac_ext <<EOF
11360 #line 11361 "configure"
11361 #include "confdefs.h"
11362 #include <$ac_hdr>
11363 EOF
11364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11365 { (eval echo configure:11366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11367 if test -z "$ac_err"; then
11368   rm -rf conftest*
11369   eval "ac_cv_header_$ac_safe=yes"
11370 else
11371   echo "$ac_err" >&5
11372   echo "configure: failed program was:" >&5
11373   cat conftest.$ac_ext >&5
11374   rm -rf conftest*
11375   eval "ac_cv_header_$ac_safe=no"
11376 fi
11377 rm -f conftest*
11378 fi
11379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11380   echo "$ac_t""yes" 1>&6
11381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11382   cat >> confdefs.h <<EOF
11383 #define $ac_tr_hdr 1
11384 EOF
11385  
11386 else
11387   echo "$ac_t""no" 1>&6
11388 fi
11389 done
11390
11391         for ac_hdr in thread.h synch.h
11392 do
11393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11395 echo "configure:11396: checking for $ac_hdr" >&5
11396 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11397   echo $ac_n "(cached) $ac_c" 1>&6
11398 else
11399   cat > conftest.$ac_ext <<EOF
11400 #line 11401 "configure"
11401 #include "confdefs.h"
11402 #include <$ac_hdr>
11403 EOF
11404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11405 { (eval echo configure:11406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11407 if test -z "$ac_err"; then
11408   rm -rf conftest*
11409   eval "ac_cv_header_$ac_safe=yes"
11410 else
11411   echo "$ac_err" >&5
11412   echo "configure: failed program was:" >&5
11413   cat conftest.$ac_ext >&5
11414   rm -rf conftest*
11415   eval "ac_cv_header_$ac_safe=no"
11416 fi
11417 rm -f conftest*
11418 fi
11419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11420   echo "$ac_t""yes" 1>&6
11421     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11422   cat >> confdefs.h <<EOF
11423 #define $ac_tr_hdr 1
11424 EOF
11425  
11426 else
11427   echo "$ac_t""no" 1>&6
11428 fi
11429 done
11430
11431 fi
11432
11433 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11434                         cat >> confdefs.h <<\EOF
11435 #define REENTRANT 1
11436 EOF
11437
11438         cat >> confdefs.h <<\EOF
11439 #define _REENTRANT 1
11440 EOF
11441
11442         cat >> confdefs.h <<\EOF
11443 #define THREAD_SAFE 1
11444 EOF
11445
11446         cat >> confdefs.h <<\EOF
11447 #define _THREAD_SAFE 1
11448 EOF
11449
11450         cat >> confdefs.h <<\EOF
11451 #define THREADSAFE 1
11452 EOF
11453
11454         cat >> confdefs.h <<\EOF
11455 #define _THREADSAFE 1
11456 EOF
11457
11458         cat >> confdefs.h <<\EOF
11459 #define _SGI_MP_SOURCE 1
11460 EOF
11461
11462
11463                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11464 echo "configure:11465: checking for thread specific errno" >&5
11465 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11466   echo $ac_n "(cached) $ac_c" 1>&6
11467 else
11468   
11469                 cat > conftest.$ac_ext <<EOF
11470 #line 11471 "configure"
11471 #include "confdefs.h"
11472 #include <errno.h>
11473 int main() {
11474 errno = 0;
11475 ; return 0; }
11476 EOF
11477 if { (eval echo configure:11478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11478   rm -rf conftest*
11479   ol_cv_errno_thread_specific=yes
11480 else
11481   echo "configure: failed program was:" >&5
11482   cat conftest.$ac_ext >&5
11483   rm -rf conftest*
11484   ol_cv_errno_thread_specific=no
11485 fi
11486 rm -f conftest*
11487         
11488 fi
11489
11490 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11491
11492                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11493 echo "configure:11494: checking for thread specific h_errno" >&5
11494 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11495   echo $ac_n "(cached) $ac_c" 1>&6
11496 else
11497   
11498                 cat > conftest.$ac_ext <<EOF
11499 #line 11500 "configure"
11500 #include "confdefs.h"
11501 #include <netdb.h>
11502 int main() {
11503 h_errno = 0;
11504 ; return 0; }
11505 EOF
11506 if { (eval echo configure:11507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11507   rm -rf conftest*
11508   ol_cv_h_errno_thread_specific=yes
11509 else
11510   echo "configure: failed program was:" >&5
11511   cat conftest.$ac_ext >&5
11512   rm -rf conftest*
11513   ol_cv_h_errno_thread_specific=no
11514 fi
11515 rm -f conftest*
11516         
11517 fi
11518
11519 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11520
11521         if test $ol_cv_errno_thread_specific != yes \
11522                 -o $ol_cv_h_errno_thread_specific != yes ; then
11523                 LIBS="$LTHREAD_LIBS $LIBS"
11524                 LTHREAD_LIBS=""
11525         fi
11526
11527 fi  
11528
11529 if test $ol_link_threads = no ; then
11530         if test $ol_with_threads = yes ; then
11531                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11532         fi
11533
11534         if test $ol_with_threads = auto ; then
11535                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11536                 ol_with_threads=no
11537         fi
11538
11539         cat >> confdefs.h <<\EOF
11540 #define NO_THREADS 1
11541 EOF
11542
11543         LTHREAD_LIBS=""
11544 fi
11545
11546 if test $ol_link_threads != no ; then
11547         cat >> confdefs.h <<\EOF
11548 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11549 EOF
11550
11551 fi
11552
11553 ol_link_ldbm=no 
11554
11555 if test $ol_with_ldbm_api = auto \
11556         -o $ol_with_ldbm_api = berkeley \
11557         -o $ol_with_ldbm_api = bcompat ; then
11558
11559         if test $ol_with_ldbm_api = bcompat; then \
11560                 ol_cv_berkeley_db=no
11561 for ac_hdr in db_185.h db.h
11562 do
11563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11565 echo "configure:11566: checking for $ac_hdr" >&5
11566 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11567   echo $ac_n "(cached) $ac_c" 1>&6
11568 else
11569   cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572 #include <$ac_hdr>
11573 EOF
11574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11575 { (eval echo configure:11576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11577 if test -z "$ac_err"; then
11578   rm -rf conftest*
11579   eval "ac_cv_header_$ac_safe=yes"
11580 else
11581   echo "$ac_err" >&5
11582   echo "configure: failed program was:" >&5
11583   cat conftest.$ac_ext >&5
11584   rm -rf conftest*
11585   eval "ac_cv_header_$ac_safe=no"
11586 fi
11587 rm -f conftest*
11588 fi
11589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11590   echo "$ac_t""yes" 1>&6
11591     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11592   cat >> confdefs.h <<EOF
11593 #define $ac_tr_hdr 1
11594 EOF
11595  
11596 else
11597   echo "$ac_t""no" 1>&6
11598 fi
11599 done
11600
11601 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11602         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11603 echo "configure:11604: checking if Berkeley DB header compatibility" >&5
11604 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11605   echo $ac_n "(cached) $ac_c" 1>&6
11606 else
11607   
11608                 cat > conftest.$ac_ext <<EOF
11609 #line 11610 "configure"
11610 #include "confdefs.h"
11611
11612 #if HAVE_DB_185_H
11613 #       include <db_185.h>
11614 #else
11615 #       include <db.h>
11616 #endif
11617
11618  /* this check could be improved */
11619 #ifndef DB_VERSION_MAJOR
11620 #       define DB_VERSION_MAJOR 1
11621 #endif
11622
11623 #if DB_VERSION_MAJOR == 1 
11624         __db_version_1
11625 #endif
11626
11627 EOF
11628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11629   egrep "__db_version_1" >/dev/null 2>&1; then
11630   rm -rf conftest*
11631   ol_cv_header_db1=yes
11632 else
11633   rm -rf conftest*
11634   ol_cv_header_db1=no
11635 fi
11636 rm -f conftest*
11637
11638 fi
11639
11640 echo "$ac_t""$ol_cv_header_db1" 1>&6
11641
11642         if test ol_cv_header_db1=yes ; then
11643                 ol_cv_lib_db=no
11644 if test $ol_cv_lib_db = no ; then
11645         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11646 echo "configure:11647: checking for Berkeley DB link (default)" >&5
11647 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11648   echo $ac_n "(cached) $ac_c" 1>&6
11649 else
11650   
11651         ol_DB_LIB=
11652         ol_LIBS=$LIBS
11653         LIBS="$ol_DB_LIB $LIBS"
11654
11655         cat > conftest.$ac_ext <<EOF
11656 #line 11657 "configure"
11657 #include "confdefs.h"
11658
11659 #ifdef HAVE_DB_185_H
11660 # include <db_185.h>
11661 #else
11662 # include <db.h>
11663 #endif
11664
11665 #ifndef DB_VERSION_MAJOR
11666 # define DB_VERSION_MAJOR 1
11667 #endif
11668
11669 #ifndef NULL
11670 #define NULL ((void*)0)
11671 #endif
11672
11673 int main() {
11674
11675 #if DB_VERSION_MAJOR > 2
11676         db_env_create( NULL, 0 );
11677 #elif DB_VERSION_MAJOR > 1
11678         db_appexit( NULL );
11679 #else
11680         (void) dbopen( NULL, 0, 0, 0, NULL);
11681 #endif
11682
11683 ; return 0; }
11684 EOF
11685 if { (eval echo configure:11686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11686   rm -rf conftest*
11687   ol_cv_db_none=yes
11688 else
11689   echo "configure: failed program was:" >&5
11690   cat conftest.$ac_ext >&5
11691   rm -rf conftest*
11692   ol_cv_db_none=no
11693 fi
11694 rm -f conftest*
11695
11696         LIBS="$ol_LIBS"
11697
11698 fi
11699
11700 echo "$ac_t""$ol_cv_db_none" 1>&6
11701
11702         if test $ol_cv_db_none = yes ; then
11703                 ol_cv_lib_db=yes
11704         fi
11705 fi
11706
11707 if test $ol_cv_lib_db = no ; then
11708         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11709 echo "configure:11710: checking for Berkeley DB link (-ldb)" >&5
11710 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11711   echo $ac_n "(cached) $ac_c" 1>&6
11712 else
11713   
11714         ol_DB_LIB=-ldb
11715         ol_LIBS=$LIBS
11716         LIBS="$ol_DB_LIB $LIBS"
11717
11718         cat > conftest.$ac_ext <<EOF
11719 #line 11720 "configure"
11720 #include "confdefs.h"
11721
11722 #ifdef HAVE_DB_185_H
11723 # include <db_185.h>
11724 #else
11725 # include <db.h>
11726 #endif
11727
11728 #ifndef DB_VERSION_MAJOR
11729 # define DB_VERSION_MAJOR 1
11730 #endif
11731
11732 #ifndef NULL
11733 #define NULL ((void*)0)
11734 #endif
11735
11736 int main() {
11737
11738 #if DB_VERSION_MAJOR > 2
11739         db_env_create( NULL, 0 );
11740 #elif DB_VERSION_MAJOR > 1
11741         db_appexit( NULL );
11742 #else
11743         (void) dbopen( NULL, 0, 0, 0, NULL);
11744 #endif
11745
11746 ; return 0; }
11747 EOF
11748 if { (eval echo configure:11749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11749   rm -rf conftest*
11750   ol_cv_db_db=yes
11751 else
11752   echo "configure: failed program was:" >&5
11753   cat conftest.$ac_ext >&5
11754   rm -rf conftest*
11755   ol_cv_db_db=no
11756 fi
11757 rm -f conftest*
11758
11759         LIBS="$ol_LIBS"
11760
11761 fi
11762
11763 echo "$ac_t""$ol_cv_db_db" 1>&6
11764
11765         if test $ol_cv_db_db = yes ; then
11766                 ol_cv_lib_db=-ldb
11767         fi
11768 fi
11769
11770 if test $ol_cv_lib_db = no ; then
11771         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11772 echo "configure:11773: checking for Berkeley DB link (-ldb3)" >&5
11773 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11774   echo $ac_n "(cached) $ac_c" 1>&6
11775 else
11776   
11777         ol_DB_LIB=-ldb3
11778         ol_LIBS=$LIBS
11779         LIBS="$ol_DB_LIB $LIBS"
11780
11781         cat > conftest.$ac_ext <<EOF
11782 #line 11783 "configure"
11783 #include "confdefs.h"
11784
11785 #ifdef HAVE_DB_185_H
11786 # include <db_185.h>
11787 #else
11788 # include <db.h>
11789 #endif
11790
11791 #ifndef DB_VERSION_MAJOR
11792 # define DB_VERSION_MAJOR 1
11793 #endif
11794
11795 #ifndef NULL
11796 #define NULL ((void*)0)
11797 #endif
11798
11799 int main() {
11800
11801 #if DB_VERSION_MAJOR > 2
11802         db_env_create( NULL, 0 );
11803 #elif DB_VERSION_MAJOR > 1
11804         db_appexit( NULL );
11805 #else
11806         (void) dbopen( NULL, 0, 0, 0, NULL);
11807 #endif
11808
11809 ; return 0; }
11810 EOF
11811 if { (eval echo configure:11812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11812   rm -rf conftest*
11813   ol_cv_db_db3=yes
11814 else
11815   echo "configure: failed program was:" >&5
11816   cat conftest.$ac_ext >&5
11817   rm -rf conftest*
11818   ol_cv_db_db3=no
11819 fi
11820 rm -f conftest*
11821
11822         LIBS="$ol_LIBS"
11823
11824 fi
11825
11826 echo "$ac_t""$ol_cv_db_db3" 1>&6
11827
11828         if test $ol_cv_db_db3 = yes ; then
11829                 ol_cv_lib_db=-ldb3
11830         fi
11831 fi
11832
11833 if test $ol_cv_lib_db = no ; then
11834         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11835 echo "configure:11836: checking for Berkeley DB link (-ldb2)" >&5
11836 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11837   echo $ac_n "(cached) $ac_c" 1>&6
11838 else
11839   
11840         ol_DB_LIB=-ldb2
11841         ol_LIBS=$LIBS
11842         LIBS="$ol_DB_LIB $LIBS"
11843
11844         cat > conftest.$ac_ext <<EOF
11845 #line 11846 "configure"
11846 #include "confdefs.h"
11847
11848 #ifdef HAVE_DB_185_H
11849 # include <db_185.h>
11850 #else
11851 # include <db.h>
11852 #endif
11853
11854 #ifndef DB_VERSION_MAJOR
11855 # define DB_VERSION_MAJOR 1
11856 #endif
11857
11858 #ifndef NULL
11859 #define NULL ((void*)0)
11860 #endif
11861
11862 int main() {
11863
11864 #if DB_VERSION_MAJOR > 2
11865         db_env_create( NULL, 0 );
11866 #elif DB_VERSION_MAJOR > 1
11867         db_appexit( NULL );
11868 #else
11869         (void) dbopen( NULL, 0, 0, 0, NULL);
11870 #endif
11871
11872 ; return 0; }
11873 EOF
11874 if { (eval echo configure:11875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11875   rm -rf conftest*
11876   ol_cv_db_db2=yes
11877 else
11878   echo "configure: failed program was:" >&5
11879   cat conftest.$ac_ext >&5
11880   rm -rf conftest*
11881   ol_cv_db_db2=no
11882 fi
11883 rm -f conftest*
11884
11885         LIBS="$ol_LIBS"
11886
11887 fi
11888
11889 echo "$ac_t""$ol_cv_db_db2" 1>&6
11890
11891         if test $ol_cv_db_db2 = yes ; then
11892                 ol_cv_lib_db=-ldb2
11893         fi
11894 fi
11895
11896 if test $ol_cv_lib_db = no ; then
11897         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11898 echo "configure:11899: checking for Berkeley DB link (-ldb1)" >&5
11899 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11900   echo $ac_n "(cached) $ac_c" 1>&6
11901 else
11902   
11903         ol_DB_LIB=-ldb1
11904         ol_LIBS=$LIBS
11905         LIBS="$ol_DB_LIB $LIBS"
11906
11907         cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910
11911 #ifdef HAVE_DB_185_H
11912 # include <db_185.h>
11913 #else
11914 # include <db.h>
11915 #endif
11916
11917 #ifndef DB_VERSION_MAJOR
11918 # define DB_VERSION_MAJOR 1
11919 #endif
11920
11921 #ifndef NULL
11922 #define NULL ((void*)0)
11923 #endif
11924
11925 int main() {
11926
11927 #if DB_VERSION_MAJOR > 2
11928         db_env_create( NULL, 0 );
11929 #elif DB_VERSION_MAJOR > 1
11930         db_appexit( NULL );
11931 #else
11932         (void) dbopen( NULL, 0, 0, 0, NULL);
11933 #endif
11934
11935 ; return 0; }
11936 EOF
11937 if { (eval echo configure:11938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11938   rm -rf conftest*
11939   ol_cv_db_db1=yes
11940 else
11941   echo "configure: failed program was:" >&5
11942   cat conftest.$ac_ext >&5
11943   rm -rf conftest*
11944   ol_cv_db_db1=no
11945 fi
11946 rm -f conftest*
11947
11948         LIBS="$ol_LIBS"
11949
11950 fi
11951
11952 echo "$ac_t""$ol_cv_db_db1" 1>&6
11953
11954         if test $ol_cv_db_db1 = yes ; then
11955                 ol_cv_lib_db=-ldb1
11956         fi
11957 fi
11958
11959
11960                 if test "$ol_cv_lib_db" != no ; then
11961                         ol_cv_berkeley_db=yes
11962                 fi
11963         fi
11964 fi
11965
11966         else
11967                 ol_cv_berkeley_db=no
11968 for ac_hdr in db.h
11969 do
11970 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11971 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11972 echo "configure:11973: checking for $ac_hdr" >&5
11973 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11974   echo $ac_n "(cached) $ac_c" 1>&6
11975 else
11976   cat > conftest.$ac_ext <<EOF
11977 #line 11978 "configure"
11978 #include "confdefs.h"
11979 #include <$ac_hdr>
11980 EOF
11981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11982 { (eval echo configure:11983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11984 if test -z "$ac_err"; then
11985   rm -rf conftest*
11986   eval "ac_cv_header_$ac_safe=yes"
11987 else
11988   echo "$ac_err" >&5
11989   echo "configure: failed program was:" >&5
11990   cat conftest.$ac_ext >&5
11991   rm -rf conftest*
11992   eval "ac_cv_header_$ac_safe=no"
11993 fi
11994 rm -f conftest*
11995 fi
11996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11997   echo "$ac_t""yes" 1>&6
11998     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11999   cat >> confdefs.h <<EOF
12000 #define $ac_tr_hdr 1
12001 EOF
12002  
12003 else
12004   echo "$ac_t""no" 1>&6
12005 fi
12006 done
12007
12008 if test $ac_cv_header_db_h = yes; then
12009         ol_cv_lib_db=no
12010 if test $ol_cv_lib_db = no ; then
12011         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12012 echo "configure:12013: checking for Berkeley DB link (default)" >&5
12013 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12014   echo $ac_n "(cached) $ac_c" 1>&6
12015 else
12016   
12017         ol_DB_LIB=
12018         ol_LIBS=$LIBS
12019         LIBS="$ol_DB_LIB $LIBS"
12020
12021         cat > conftest.$ac_ext <<EOF
12022 #line 12023 "configure"
12023 #include "confdefs.h"
12024
12025 #ifdef HAVE_DB_185_H
12026 # include <db_185.h>
12027 #else
12028 # include <db.h>
12029 #endif
12030
12031 #ifndef DB_VERSION_MAJOR
12032 # define DB_VERSION_MAJOR 1
12033 #endif
12034
12035 #ifndef NULL
12036 #define NULL ((void*)0)
12037 #endif
12038
12039 int main() {
12040
12041 #if DB_VERSION_MAJOR > 2
12042         db_env_create( NULL, 0 );
12043 #elif DB_VERSION_MAJOR > 1
12044         db_appexit( NULL );
12045 #else
12046         (void) dbopen( NULL, 0, 0, 0, NULL);
12047 #endif
12048
12049 ; return 0; }
12050 EOF
12051 if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12052   rm -rf conftest*
12053   ol_cv_db_none=yes
12054 else
12055   echo "configure: failed program was:" >&5
12056   cat conftest.$ac_ext >&5
12057   rm -rf conftest*
12058   ol_cv_db_none=no
12059 fi
12060 rm -f conftest*
12061
12062         LIBS="$ol_LIBS"
12063
12064 fi
12065
12066 echo "$ac_t""$ol_cv_db_none" 1>&6
12067
12068         if test $ol_cv_db_none = yes ; then
12069                 ol_cv_lib_db=yes
12070         fi
12071 fi
12072
12073 if test $ol_cv_lib_db = no ; then
12074         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12075 echo "configure:12076: checking for Berkeley DB link (-ldb)" >&5
12076 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12077   echo $ac_n "(cached) $ac_c" 1>&6
12078 else
12079   
12080         ol_DB_LIB=-ldb
12081         ol_LIBS=$LIBS
12082         LIBS="$ol_DB_LIB $LIBS"
12083
12084         cat > conftest.$ac_ext <<EOF
12085 #line 12086 "configure"
12086 #include "confdefs.h"
12087
12088 #ifdef HAVE_DB_185_H
12089 # include <db_185.h>
12090 #else
12091 # include <db.h>
12092 #endif
12093
12094 #ifndef DB_VERSION_MAJOR
12095 # define DB_VERSION_MAJOR 1
12096 #endif
12097
12098 #ifndef NULL
12099 #define NULL ((void*)0)
12100 #endif
12101
12102 int main() {
12103
12104 #if DB_VERSION_MAJOR > 2
12105         db_env_create( NULL, 0 );
12106 #elif DB_VERSION_MAJOR > 1
12107         db_appexit( NULL );
12108 #else
12109         (void) dbopen( NULL, 0, 0, 0, NULL);
12110 #endif
12111
12112 ; return 0; }
12113 EOF
12114 if { (eval echo configure:12115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12115   rm -rf conftest*
12116   ol_cv_db_db=yes
12117 else
12118   echo "configure: failed program was:" >&5
12119   cat conftest.$ac_ext >&5
12120   rm -rf conftest*
12121   ol_cv_db_db=no
12122 fi
12123 rm -f conftest*
12124
12125         LIBS="$ol_LIBS"
12126
12127 fi
12128
12129 echo "$ac_t""$ol_cv_db_db" 1>&6
12130
12131         if test $ol_cv_db_db = yes ; then
12132                 ol_cv_lib_db=-ldb
12133         fi
12134 fi
12135
12136 if test $ol_cv_lib_db = no ; then
12137         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12138 echo "configure:12139: checking for Berkeley DB link (-ldb3)" >&5
12139 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12140   echo $ac_n "(cached) $ac_c" 1>&6
12141 else
12142   
12143         ol_DB_LIB=-ldb3
12144         ol_LIBS=$LIBS
12145         LIBS="$ol_DB_LIB $LIBS"
12146
12147         cat > conftest.$ac_ext <<EOF
12148 #line 12149 "configure"
12149 #include "confdefs.h"
12150
12151 #ifdef HAVE_DB_185_H
12152 # include <db_185.h>
12153 #else
12154 # include <db.h>
12155 #endif
12156
12157 #ifndef DB_VERSION_MAJOR
12158 # define DB_VERSION_MAJOR 1
12159 #endif
12160
12161 #ifndef NULL
12162 #define NULL ((void*)0)
12163 #endif
12164
12165 int main() {
12166
12167 #if DB_VERSION_MAJOR > 2
12168         db_env_create( NULL, 0 );
12169 #elif DB_VERSION_MAJOR > 1
12170         db_appexit( NULL );
12171 #else
12172         (void) dbopen( NULL, 0, 0, 0, NULL);
12173 #endif
12174
12175 ; return 0; }
12176 EOF
12177 if { (eval echo configure:12178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12178   rm -rf conftest*
12179   ol_cv_db_db3=yes
12180 else
12181   echo "configure: failed program was:" >&5
12182   cat conftest.$ac_ext >&5
12183   rm -rf conftest*
12184   ol_cv_db_db3=no
12185 fi
12186 rm -f conftest*
12187
12188         LIBS="$ol_LIBS"
12189
12190 fi
12191
12192 echo "$ac_t""$ol_cv_db_db3" 1>&6
12193
12194         if test $ol_cv_db_db3 = yes ; then
12195                 ol_cv_lib_db=-ldb3
12196         fi
12197 fi
12198
12199 if test $ol_cv_lib_db = no ; then
12200         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12201 echo "configure:12202: checking for Berkeley DB link (-ldb2)" >&5
12202 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12203   echo $ac_n "(cached) $ac_c" 1>&6
12204 else
12205   
12206         ol_DB_LIB=-ldb2
12207         ol_LIBS=$LIBS
12208         LIBS="$ol_DB_LIB $LIBS"
12209
12210         cat > conftest.$ac_ext <<EOF
12211 #line 12212 "configure"
12212 #include "confdefs.h"
12213
12214 #ifdef HAVE_DB_185_H
12215 # include <db_185.h>
12216 #else
12217 # include <db.h>
12218 #endif
12219
12220 #ifndef DB_VERSION_MAJOR
12221 # define DB_VERSION_MAJOR 1
12222 #endif
12223
12224 #ifndef NULL
12225 #define NULL ((void*)0)
12226 #endif
12227
12228 int main() {
12229
12230 #if DB_VERSION_MAJOR > 2
12231         db_env_create( NULL, 0 );
12232 #elif DB_VERSION_MAJOR > 1
12233         db_appexit( NULL );
12234 #else
12235         (void) dbopen( NULL, 0, 0, 0, NULL);
12236 #endif
12237
12238 ; return 0; }
12239 EOF
12240 if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12241   rm -rf conftest*
12242   ol_cv_db_db2=yes
12243 else
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -rf conftest*
12247   ol_cv_db_db2=no
12248 fi
12249 rm -f conftest*
12250
12251         LIBS="$ol_LIBS"
12252
12253 fi
12254
12255 echo "$ac_t""$ol_cv_db_db2" 1>&6
12256
12257         if test $ol_cv_db_db2 = yes ; then
12258                 ol_cv_lib_db=-ldb2
12259         fi
12260 fi
12261
12262 if test $ol_cv_lib_db = no ; then
12263         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12264 echo "configure:12265: checking for Berkeley DB link (-ldb1)" >&5
12265 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12266   echo $ac_n "(cached) $ac_c" 1>&6
12267 else
12268   
12269         ol_DB_LIB=-ldb1
12270         ol_LIBS=$LIBS
12271         LIBS="$ol_DB_LIB $LIBS"
12272
12273         cat > conftest.$ac_ext <<EOF
12274 #line 12275 "configure"
12275 #include "confdefs.h"
12276
12277 #ifdef HAVE_DB_185_H
12278 # include <db_185.h>
12279 #else
12280 # include <db.h>
12281 #endif
12282
12283 #ifndef DB_VERSION_MAJOR
12284 # define DB_VERSION_MAJOR 1
12285 #endif
12286
12287 #ifndef NULL
12288 #define NULL ((void*)0)
12289 #endif
12290
12291 int main() {
12292
12293 #if DB_VERSION_MAJOR > 2
12294         db_env_create( NULL, 0 );
12295 #elif DB_VERSION_MAJOR > 1
12296         db_appexit( NULL );
12297 #else
12298         (void) dbopen( NULL, 0, 0, 0, NULL);
12299 #endif
12300
12301 ; return 0; }
12302 EOF
12303 if { (eval echo configure:12304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12304   rm -rf conftest*
12305   ol_cv_db_db1=yes
12306 else
12307   echo "configure: failed program was:" >&5
12308   cat conftest.$ac_ext >&5
12309   rm -rf conftest*
12310   ol_cv_db_db1=no
12311 fi
12312 rm -f conftest*
12313
12314         LIBS="$ol_LIBS"
12315
12316 fi
12317
12318 echo "$ac_t""$ol_cv_db_db1" 1>&6
12319
12320         if test $ol_cv_db_db1 = yes ; then
12321                 ol_cv_lib_db=-ldb1
12322         fi
12323 fi
12324
12325
12326         if test "$ol_cv_lib_db" != no ; then
12327                 ol_cv_berkeley_db=yes
12328                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12329 echo "configure:12330: checking for Berkeley DB thread support" >&5
12330 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12331   echo $ac_n "(cached) $ac_c" 1>&6
12332 else
12333   
12334         ol_LIBS="$LIBS"
12335         if test $ol_cv_lib_db != yes ; then
12336                 LIBS="$ol_cv_lib_db"
12337         fi
12338
12339         if test "$cross_compiling" = yes; then
12340   ol_cv_berkeley_db_thread=cross
12341 else
12342   cat > conftest.$ac_ext <<EOF
12343 #line 12344 "configure"
12344 #include "confdefs.h"
12345
12346 #ifdef HAVE_DB_185_H
12347         choke me;
12348 #else
12349 #include <db.h>
12350 #endif
12351 #ifndef NULL
12352 #define NULL ((void *)0)
12353 #endif
12354 main()
12355 {
12356         int rc;
12357         u_int32_t flags = DB_CREATE | DB_THREAD;
12358
12359 #if DB_VERSION_MAJOR > 2
12360         DB_ENV *env = NULL;
12361
12362         rc = db_env_create( &env, 0 );
12363
12364         if( rc == 0 ) {
12365 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12366                 rc = env->open( env, NULL, flags, 0 );
12367 #else
12368                 rc = env->open( env, NULL, NULL, flags, 0 );
12369 #endif
12370         }
12371
12372 #else
12373         DB_ENV env;
12374         memset( &env, '\0', sizeof(env) );
12375
12376         rc = db_appinit( NULL, NULL, &env, flags );
12377
12378         if( rc == 0 ) {
12379                 db_appexit( &env );
12380         }
12381 #endif
12382 #if DB_VERSION_MAJOR > 2
12383 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12384         env->remove( env, NULL, DB_FORCE);
12385 #else
12386         env->remove( env, NULL, NULL, DB_FORCE);
12387 #endif
12388 #endif
12389
12390         return rc;
12391 }
12392 EOF
12393 if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12394 then
12395   ol_cv_berkeley_db_thread=yes
12396 else
12397   echo "configure: failed program was:" >&5
12398   cat conftest.$ac_ext >&5
12399   rm -fr conftest*
12400   ol_cv_berkeley_db_thread=no
12401 fi
12402 rm -fr conftest*
12403 fi
12404
12405
12406         LIBS="$ol_LIBS"
12407
12408         if test $ol_cv_berkeley_db_thread != no ; then
12409                 cat >> confdefs.h <<\EOF
12410 #define HAVE_BERKELEY_DB_THREAD 1
12411 EOF
12412
12413         fi
12414
12415 fi
12416
12417 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12418         fi
12419 fi
12420
12421         fi
12422
12423         if test $ol_cv_berkeley_db != no ; then
12424                 cat >> confdefs.h <<\EOF
12425 #define HAVE_BERKELEY_DB 1
12426 EOF
12427
12428
12429                 ol_link_ldbm=berkeley
12430                 ol_with_ldbm_api=db
12431
12432                 if test $ol_with_ldbm_type = hash ; then
12433                         cat >> confdefs.h <<\EOF
12434 #define LDBM_USE_DBHASH 1
12435 EOF
12436
12437                 else
12438                         cat >> confdefs.h <<\EOF
12439 #define LDBM_USE_DBBTREE 1
12440 EOF
12441
12442                 fi
12443
12444                                                 if test $ol_cv_lib_db != yes ; then
12445                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12446                 fi
12447         fi
12448 fi
12449
12450 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12451         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12452         ol_with_ldbm_api=none
12453 fi
12454
12455 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12456         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12457 echo "configure:12458: checking for MDBM library" >&5
12458 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12459   echo $ac_n "(cached) $ac_c" 1>&6
12460 else
12461         ol_LIBS="$LIBS"
12462         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12463 echo "configure:12464: checking for mdbm_set_chain" >&5
12464 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12465   echo $ac_n "(cached) $ac_c" 1>&6
12466 else
12467   cat > conftest.$ac_ext <<EOF
12468 #line 12469 "configure"
12469 #include "confdefs.h"
12470 /* System header to define __stub macros and hopefully few prototypes,
12471     which can conflict with char mdbm_set_chain(); below.  */
12472 #include <assert.h>
12473 /* Override any gcc2 internal prototype to avoid an error.  */
12474 /* We use char because int might match the return type of a gcc2
12475     builtin and then its argument prototype would still apply.  */
12476 char mdbm_set_chain();
12477 char (*f)();
12478
12479 int main() {
12480
12481 /* The GNU C library defines this for functions which it implements
12482     to always fail with ENOSYS.  Some functions are actually named
12483     something starting with __ and the normal name is an alias.  */
12484 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12485 choke me
12486 #else
12487 f = mdbm_set_chain;
12488 #endif
12489
12490 ; return 0; }
12491 EOF
12492 if { (eval echo configure:12493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12493   rm -rf conftest*
12494   eval "ac_cv_func_mdbm_set_chain=yes"
12495 else
12496   echo "configure: failed program was:" >&5
12497   cat conftest.$ac_ext >&5
12498   rm -rf conftest*
12499   eval "ac_cv_func_mdbm_set_chain=no"
12500 fi
12501 rm -f conftest*
12502 fi
12503
12504 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12505   echo "$ac_t""yes" 1>&6
12506   ol_cv_lib_mdbm=yes
12507 else
12508   echo "$ac_t""no" 1>&6
12509
12510                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12511 echo "configure:12512: checking for mdbm_set_chain in -lmdbm" >&5
12512 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12514   echo $ac_n "(cached) $ac_c" 1>&6
12515 else
12516   ac_save_LIBS="$LIBS"
12517 LIBS="-lmdbm  $LIBS"
12518 cat > conftest.$ac_ext <<EOF
12519 #line 12520 "configure"
12520 #include "confdefs.h"
12521 /* Override any gcc2 internal prototype to avoid an error.  */
12522 /* We use char because int might match the return type of a gcc2
12523     builtin and then its argument prototype would still apply.  */
12524 char mdbm_set_chain();
12525
12526 int main() {
12527 mdbm_set_chain()
12528 ; return 0; }
12529 EOF
12530 if { (eval echo configure:12531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12531   rm -rf conftest*
12532   eval "ac_cv_lib_$ac_lib_var=yes"
12533 else
12534   echo "configure: failed program was:" >&5
12535   cat conftest.$ac_ext >&5
12536   rm -rf conftest*
12537   eval "ac_cv_lib_$ac_lib_var=no"
12538 fi
12539 rm -f conftest*
12540 LIBS="$ac_save_LIBS"
12541
12542 fi
12543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12544   echo "$ac_t""yes" 1>&6
12545   ol_cv_lib_mdbm=-lmdbm
12546 else
12547   echo "$ac_t""no" 1>&6
12548 ol_cv_lib_mdbm=no
12549 fi
12550
12551         
12552 fi
12553
12554         LIBS="$ol_LIBS"
12555
12556 fi
12557
12558 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12559
12560
12561  for ac_hdr in mdbm.h
12562 do
12563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12565 echo "configure:12566: checking for $ac_hdr" >&5
12566 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12567   echo $ac_n "(cached) $ac_c" 1>&6
12568 else
12569   cat > conftest.$ac_ext <<EOF
12570 #line 12571 "configure"
12571 #include "confdefs.h"
12572 #include <$ac_hdr>
12573 EOF
12574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12575 { (eval echo configure:12576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12577 if test -z "$ac_err"; then
12578   rm -rf conftest*
12579   eval "ac_cv_header_$ac_safe=yes"
12580 else
12581   echo "$ac_err" >&5
12582   echo "configure: failed program was:" >&5
12583   cat conftest.$ac_ext >&5
12584   rm -rf conftest*
12585   eval "ac_cv_header_$ac_safe=no"
12586 fi
12587 rm -f conftest*
12588 fi
12589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12590   echo "$ac_t""yes" 1>&6
12591     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12592   cat >> confdefs.h <<EOF
12593 #define $ac_tr_hdr 1
12594 EOF
12595  
12596 else
12597   echo "$ac_t""no" 1>&6
12598 fi
12599 done
12600
12601  echo $ac_n "checking for db""... $ac_c" 1>&6
12602 echo "configure:12603: checking for db" >&5
12603 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12604   echo $ac_n "(cached) $ac_c" 1>&6
12605 else
12606   
12607         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12608                 ol_cv_mdbm=no
12609         else
12610                 ol_cv_mdbm=yes
12611         fi
12612
12613 fi
12614
12615 echo "$ac_t""$ol_cv_mdbm" 1>&6
12616  if test $ol_cv_mdbm = yes ; then
12617         cat >> confdefs.h <<\EOF
12618 #define HAVE_MDBM 1
12619 EOF
12620
12621  fi
12622
12623
12624         if test $ol_cv_mdbm = yes ; then
12625                 ol_link_ldbm=mdbm
12626                 ol_with_ldbm_api=mdbm
12627                 if test $ol_cv_lib_mdbm != yes ; then
12628                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12629                 fi
12630         fi
12631 fi
12632
12633 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12634         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12635 echo "configure:12636: checking for GDBM library" >&5
12636 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12637   echo $ac_n "(cached) $ac_c" 1>&6
12638 else
12639         ol_LIBS="$LIBS"
12640         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12641 echo "configure:12642: checking for gdbm_open" >&5
12642 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12643   echo $ac_n "(cached) $ac_c" 1>&6
12644 else
12645   cat > conftest.$ac_ext <<EOF
12646 #line 12647 "configure"
12647 #include "confdefs.h"
12648 /* System header to define __stub macros and hopefully few prototypes,
12649     which can conflict with char gdbm_open(); below.  */
12650 #include <assert.h>
12651 /* Override any gcc2 internal prototype to avoid an error.  */
12652 /* We use char because int might match the return type of a gcc2
12653     builtin and then its argument prototype would still apply.  */
12654 char gdbm_open();
12655 char (*f)();
12656
12657 int main() {
12658
12659 /* The GNU C library defines this for functions which it implements
12660     to always fail with ENOSYS.  Some functions are actually named
12661     something starting with __ and the normal name is an alias.  */
12662 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12663 choke me
12664 #else
12665 f = gdbm_open;
12666 #endif
12667
12668 ; return 0; }
12669 EOF
12670 if { (eval echo configure:12671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12671   rm -rf conftest*
12672   eval "ac_cv_func_gdbm_open=yes"
12673 else
12674   echo "configure: failed program was:" >&5
12675   cat conftest.$ac_ext >&5
12676   rm -rf conftest*
12677   eval "ac_cv_func_gdbm_open=no"
12678 fi
12679 rm -f conftest*
12680 fi
12681
12682 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12683   echo "$ac_t""yes" 1>&6
12684   ol_cv_lib_gdbm=yes
12685 else
12686   echo "$ac_t""no" 1>&6
12687
12688                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12689 echo "configure:12690: checking for gdbm_open in -lgdbm" >&5
12690 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12692   echo $ac_n "(cached) $ac_c" 1>&6
12693 else
12694   ac_save_LIBS="$LIBS"
12695 LIBS="-lgdbm  $LIBS"
12696 cat > conftest.$ac_ext <<EOF
12697 #line 12698 "configure"
12698 #include "confdefs.h"
12699 /* Override any gcc2 internal prototype to avoid an error.  */
12700 /* We use char because int might match the return type of a gcc2
12701     builtin and then its argument prototype would still apply.  */
12702 char gdbm_open();
12703
12704 int main() {
12705 gdbm_open()
12706 ; return 0; }
12707 EOF
12708 if { (eval echo configure:12709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12709   rm -rf conftest*
12710   eval "ac_cv_lib_$ac_lib_var=yes"
12711 else
12712   echo "configure: failed program was:" >&5
12713   cat conftest.$ac_ext >&5
12714   rm -rf conftest*
12715   eval "ac_cv_lib_$ac_lib_var=no"
12716 fi
12717 rm -f conftest*
12718 LIBS="$ac_save_LIBS"
12719
12720 fi
12721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12722   echo "$ac_t""yes" 1>&6
12723   ol_cv_lib_gdbm=-lgdbm
12724 else
12725   echo "$ac_t""no" 1>&6
12726 ol_cv_lib_gdbm=no
12727 fi
12728
12729         
12730 fi
12731
12732         LIBS="$ol_LIBS"
12733
12734 fi
12735
12736 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12737
12738
12739  for ac_hdr in gdbm.h
12740 do
12741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12743 echo "configure:12744: checking for $ac_hdr" >&5
12744 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12745   echo $ac_n "(cached) $ac_c" 1>&6
12746 else
12747   cat > conftest.$ac_ext <<EOF
12748 #line 12749 "configure"
12749 #include "confdefs.h"
12750 #include <$ac_hdr>
12751 EOF
12752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12753 { (eval echo configure:12754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12755 if test -z "$ac_err"; then
12756   rm -rf conftest*
12757   eval "ac_cv_header_$ac_safe=yes"
12758 else
12759   echo "$ac_err" >&5
12760   echo "configure: failed program was:" >&5
12761   cat conftest.$ac_ext >&5
12762   rm -rf conftest*
12763   eval "ac_cv_header_$ac_safe=no"
12764 fi
12765 rm -f conftest*
12766 fi
12767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12768   echo "$ac_t""yes" 1>&6
12769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12770   cat >> confdefs.h <<EOF
12771 #define $ac_tr_hdr 1
12772 EOF
12773  
12774 else
12775   echo "$ac_t""no" 1>&6
12776 fi
12777 done
12778
12779  echo $ac_n "checking for db""... $ac_c" 1>&6
12780 echo "configure:12781: checking for db" >&5
12781 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12782   echo $ac_n "(cached) $ac_c" 1>&6
12783 else
12784   
12785         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12786                 ol_cv_gdbm=no
12787         else
12788                 ol_cv_gdbm=yes
12789         fi
12790
12791 fi
12792
12793 echo "$ac_t""$ol_cv_gdbm" 1>&6
12794  if test $ol_cv_gdbm = yes ; then
12795         cat >> confdefs.h <<\EOF
12796 #define HAVE_GDBM 1
12797 EOF
12798
12799  fi
12800
12801
12802         if test $ol_cv_gdbm = yes ; then
12803                 ol_link_ldbm=gdbm
12804                 ol_with_ldbm_api=gdbm
12805
12806                 if test $ol_cv_lib_gdbm != yes ; then
12807                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12808                 fi
12809         fi
12810 fi
12811
12812 if test $ol_with_ldbm_api = ndbm ; then
12813         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12814 echo "configure:12815: checking for NDBM library" >&5
12815 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12816   echo $ac_n "(cached) $ac_c" 1>&6
12817 else
12818         ol_LIBS="$LIBS"
12819         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12820 echo "configure:12821: checking for dbm_open" >&5
12821 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12822   echo $ac_n "(cached) $ac_c" 1>&6
12823 else
12824   cat > conftest.$ac_ext <<EOF
12825 #line 12826 "configure"
12826 #include "confdefs.h"
12827 /* System header to define __stub macros and hopefully few prototypes,
12828     which can conflict with char dbm_open(); below.  */
12829 #include <assert.h>
12830 /* Override any gcc2 internal prototype to avoid an error.  */
12831 /* We use char because int might match the return type of a gcc2
12832     builtin and then its argument prototype would still apply.  */
12833 char dbm_open();
12834 char (*f)();
12835
12836 int main() {
12837
12838 /* The GNU C library defines this for functions which it implements
12839     to always fail with ENOSYS.  Some functions are actually named
12840     something starting with __ and the normal name is an alias.  */
12841 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12842 choke me
12843 #else
12844 f = dbm_open;
12845 #endif
12846
12847 ; return 0; }
12848 EOF
12849 if { (eval echo configure:12850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12850   rm -rf conftest*
12851   eval "ac_cv_func_dbm_open=yes"
12852 else
12853   echo "configure: failed program was:" >&5
12854   cat conftest.$ac_ext >&5
12855   rm -rf conftest*
12856   eval "ac_cv_func_dbm_open=no"
12857 fi
12858 rm -f conftest*
12859 fi
12860
12861 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12862   echo "$ac_t""yes" 1>&6
12863   ol_cv_lib_ndbm=yes
12864 else
12865   echo "$ac_t""no" 1>&6
12866
12867                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12868 echo "configure:12869: checking for dbm_open in -lndbm" >&5
12869 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12870 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12871   echo $ac_n "(cached) $ac_c" 1>&6
12872 else
12873   ac_save_LIBS="$LIBS"
12874 LIBS="-lndbm  $LIBS"
12875 cat > conftest.$ac_ext <<EOF
12876 #line 12877 "configure"
12877 #include "confdefs.h"
12878 /* Override any gcc2 internal prototype to avoid an error.  */
12879 /* We use char because int might match the return type of a gcc2
12880     builtin and then its argument prototype would still apply.  */
12881 char dbm_open();
12882
12883 int main() {
12884 dbm_open()
12885 ; return 0; }
12886 EOF
12887 if { (eval echo configure:12888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12888   rm -rf conftest*
12889   eval "ac_cv_lib_$ac_lib_var=yes"
12890 else
12891   echo "configure: failed program was:" >&5
12892   cat conftest.$ac_ext >&5
12893   rm -rf conftest*
12894   eval "ac_cv_lib_$ac_lib_var=no"
12895 fi
12896 rm -f conftest*
12897 LIBS="$ac_save_LIBS"
12898
12899 fi
12900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12901   echo "$ac_t""yes" 1>&6
12902   ol_cv_lib_ndbm=-lndbm
12903 else
12904   echo "$ac_t""no" 1>&6
12905
12906                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12907 echo "configure:12908: checking for dbm_open in -ldbm" >&5
12908 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12910   echo $ac_n "(cached) $ac_c" 1>&6
12911 else
12912   ac_save_LIBS="$LIBS"
12913 LIBS="-ldbm  $LIBS"
12914 cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 /* Override any gcc2 internal prototype to avoid an error.  */
12918 /* We use char because int might match the return type of a gcc2
12919     builtin and then its argument prototype would still apply.  */
12920 char dbm_open();
12921
12922 int main() {
12923 dbm_open()
12924 ; return 0; }
12925 EOF
12926 if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12927   rm -rf conftest*
12928   eval "ac_cv_lib_$ac_lib_var=yes"
12929 else
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -rf conftest*
12933   eval "ac_cv_lib_$ac_lib_var=no"
12934 fi
12935 rm -f conftest*
12936 LIBS="$ac_save_LIBS"
12937
12938 fi
12939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12940   echo "$ac_t""yes" 1>&6
12941   ol_cv_lib_ndbm=-ldbm
12942 else
12943   echo "$ac_t""no" 1>&6
12944 ol_cv_lib_ndbm=no
12945 fi
12946                 
12947 fi
12948
12949         
12950 fi
12951
12952         LIBS="$ol_LIBS"
12953
12954 fi
12955
12956 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12957
12958
12959  for ac_hdr in ndbm.h
12960 do
12961 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12962 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12963 echo "configure:12964: checking for $ac_hdr" >&5
12964 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12965   echo $ac_n "(cached) $ac_c" 1>&6
12966 else
12967   cat > conftest.$ac_ext <<EOF
12968 #line 12969 "configure"
12969 #include "confdefs.h"
12970 #include <$ac_hdr>
12971 EOF
12972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12973 { (eval echo configure:12974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12975 if test -z "$ac_err"; then
12976   rm -rf conftest*
12977   eval "ac_cv_header_$ac_safe=yes"
12978 else
12979   echo "$ac_err" >&5
12980   echo "configure: failed program was:" >&5
12981   cat conftest.$ac_ext >&5
12982   rm -rf conftest*
12983   eval "ac_cv_header_$ac_safe=no"
12984 fi
12985 rm -f conftest*
12986 fi
12987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12988   echo "$ac_t""yes" 1>&6
12989     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12990   cat >> confdefs.h <<EOF
12991 #define $ac_tr_hdr 1
12992 EOF
12993  
12994 else
12995   echo "$ac_t""no" 1>&6
12996 fi
12997 done
12998
12999  echo $ac_n "checking for db""... $ac_c" 1>&6
13000 echo "configure:13001: checking for db" >&5
13001 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13002   echo $ac_n "(cached) $ac_c" 1>&6
13003 else
13004   
13005         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13006                 ol_cv_ndbm=no
13007         else
13008                 ol_cv_ndbm=yes
13009         fi
13010
13011 fi
13012
13013 echo "$ac_t""$ol_cv_ndbm" 1>&6
13014  if test $ol_cv_ndbm = yes ; then
13015         cat >> confdefs.h <<\EOF
13016 #define HAVE_NDBM 1
13017 EOF
13018
13019  fi
13020
13021
13022         if test $ol_cv_ndbm = yes ; then
13023                 ol_link_ldbm=ndbm
13024                 ol_with_ldbm_api=ndbm
13025
13026                 if test $ol_cv_lib_ndbm != yes ; then
13027                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13028                 fi
13029         fi
13030 fi
13031
13032 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13033         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13034         if test $ol_enable_ldbm = yes ; then
13035                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13036         fi
13037
13038         echo "configure: warning: disabling LDBM" 1>&2
13039         ol_enable_ldbm=no
13040 fi
13041
13042 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13043         LINK_BINS_DYNAMIC="yes"
13044 else
13045         LINK_BINS_DYNAMIC="no"
13046 fi
13047
13048 if test $ol_enable_wrappers != no ; then
13049         for ac_hdr in tcpd.h
13050 do
13051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13053 echo "configure:13054: checking for $ac_hdr" >&5
13054 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13055   echo $ac_n "(cached) $ac_c" 1>&6
13056 else
13057   cat > conftest.$ac_ext <<EOF
13058 #line 13059 "configure"
13059 #include "confdefs.h"
13060 #include <$ac_hdr>
13061 EOF
13062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13063 { (eval echo configure:13064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13065 if test -z "$ac_err"; then
13066   rm -rf conftest*
13067   eval "ac_cv_header_$ac_safe=yes"
13068 else
13069   echo "$ac_err" >&5
13070   echo "configure: failed program was:" >&5
13071   cat conftest.$ac_ext >&5
13072   rm -rf conftest*
13073   eval "ac_cv_header_$ac_safe=no"
13074 fi
13075 rm -f conftest*
13076 fi
13077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13078   echo "$ac_t""yes" 1>&6
13079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13080   cat >> confdefs.h <<EOF
13081 #define $ac_tr_hdr 1
13082 EOF
13083  
13084 else
13085   echo "$ac_t""no" 1>&6
13086 fi
13087 done
13088
13089
13090         if test $ac_cv_header_tcpd_h != yes ; then
13091                 have_wrappers=no
13092         else
13093                 cat > conftest.$ac_ext <<EOF
13094 #line 13095 "configure"
13095 #include "confdefs.h"
13096
13097 int allow_severity = 0;
13098 int deny_severity  = 0;
13099                 
13100 int main() {
13101 hosts_access()
13102 ; return 0; }
13103 EOF
13104 if { (eval echo configure:13105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13105   rm -rf conftest*
13106   have_wrappers=yes
13107 else
13108   echo "configure: failed program was:" >&5
13109   cat conftest.$ac_ext >&5
13110   rm -rf conftest*
13111   have_wrappers=no
13112 fi
13113 rm -f conftest*
13114         fi
13115
13116         if test $have_wrappers = yes ; then
13117                 cat >> confdefs.h <<\EOF
13118 #define HAVE_TCPD 1
13119 EOF
13120
13121                 WRAP_LIBS="-lwrap"
13122
13123                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13124 echo "configure:13125: checking for main in -lnsl" >&5
13125 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13127   echo $ac_n "(cached) $ac_c" 1>&6
13128 else
13129   ac_save_LIBS="$LIBS"
13130 LIBS="-lnsl  $LIBS"
13131 cat > conftest.$ac_ext <<EOF
13132 #line 13133 "configure"
13133 #include "confdefs.h"
13134
13135 int main() {
13136 main()
13137 ; return 0; }
13138 EOF
13139 if { (eval echo configure:13140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13140   rm -rf conftest*
13141   eval "ac_cv_lib_$ac_lib_var=yes"
13142 else
13143   echo "configure: failed program was:" >&5
13144   cat conftest.$ac_ext >&5
13145   rm -rf conftest*
13146   eval "ac_cv_lib_$ac_lib_var=no"
13147 fi
13148 rm -f conftest*
13149 LIBS="$ac_save_LIBS"
13150
13151 fi
13152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13153   echo "$ac_t""yes" 1>&6
13154     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13155     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13156   cat >> confdefs.h <<EOF
13157 #define $ac_tr_lib 1
13158 EOF
13159
13160   LIBS="-lnsl $LIBS"
13161
13162 else
13163   echo "$ac_t""no" 1>&6
13164 fi
13165
13166         else
13167                 echo "configure: warning: could not find -lwrap" 1>&2
13168                 if test $ol_enable_wrappers = yes ; then
13169                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13170                 fi
13171
13172                 echo "configure: warning: disabling wrappers support" 1>&2
13173                 ol_enable_wrappers=no
13174                 WRAP_LIBS=""
13175         fi
13176 fi
13177
13178 if test $ol_enable_syslog != no ; then
13179         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13180 echo "configure:13181: checking for openlog" >&5
13181 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13182   echo $ac_n "(cached) $ac_c" 1>&6
13183 else
13184   cat > conftest.$ac_ext <<EOF
13185 #line 13186 "configure"
13186 #include "confdefs.h"
13187 /* System header to define __stub macros and hopefully few prototypes,
13188     which can conflict with char openlog(); below.  */
13189 #include <assert.h>
13190 /* Override any gcc2 internal prototype to avoid an error.  */
13191 /* We use char because int might match the return type of a gcc2
13192     builtin and then its argument prototype would still apply.  */
13193 char openlog();
13194 char (*f)();
13195
13196 int main() {
13197
13198 /* The GNU C library defines this for functions which it implements
13199     to always fail with ENOSYS.  Some functions are actually named
13200     something starting with __ and the normal name is an alias.  */
13201 #if defined (__stub_openlog) || defined (__stub___openlog)
13202 choke me
13203 #else
13204 f = openlog;
13205 #endif
13206
13207 ; return 0; }
13208 EOF
13209 if { (eval echo configure:13210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13210   rm -rf conftest*
13211   eval "ac_cv_func_openlog=yes"
13212 else
13213   echo "configure: failed program was:" >&5
13214   cat conftest.$ac_ext >&5
13215   rm -rf conftest*
13216   eval "ac_cv_func_openlog=no"
13217 fi
13218 rm -f conftest*
13219 fi
13220
13221 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13222   echo "$ac_t""yes" 1>&6
13223   :
13224 else
13225   echo "$ac_t""no" 1>&6
13226 fi
13227
13228         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13229                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13230         fi
13231         ol_enable_syslog=$ac_cv_func_openlog
13232 fi
13233
13234
13235 ol_link_sql=no
13236 if test $ol_enable_sql != no ; then
13237         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13238 echo "configure:13239: checking for SQLDriverConnect in -liodbc" >&5
13239 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13241   echo $ac_n "(cached) $ac_c" 1>&6
13242 else
13243   ac_save_LIBS="$LIBS"
13244 LIBS="-liodbc  $LIBS"
13245 cat > conftest.$ac_ext <<EOF
13246 #line 13247 "configure"
13247 #include "confdefs.h"
13248 /* Override any gcc2 internal prototype to avoid an error.  */
13249 /* We use char because int might match the return type of a gcc2
13250     builtin and then its argument prototype would still apply.  */
13251 char SQLDriverConnect();
13252
13253 int main() {
13254 SQLDriverConnect()
13255 ; return 0; }
13256 EOF
13257 if { (eval echo configure:13258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13258   rm -rf conftest*
13259   eval "ac_cv_lib_$ac_lib_var=yes"
13260 else
13261   echo "configure: failed program was:" >&5
13262   cat conftest.$ac_ext >&5
13263   rm -rf conftest*
13264   eval "ac_cv_lib_$ac_lib_var=no"
13265 fi
13266 rm -f conftest*
13267 LIBS="$ac_save_LIBS"
13268
13269 fi
13270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13271   echo "$ac_t""yes" 1>&6
13272   have_iodbc=yes
13273 else
13274   echo "$ac_t""no" 1>&6
13275 have_iodbc=no
13276 fi
13277
13278         if test $have_iodbc = yes ; then
13279                 ol_link_sql="-liodbc"
13280         else
13281                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13282 echo "configure:13283: checking for SQLDriverConnect in -lodbc" >&5
13283 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13284 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13285   echo $ac_n "(cached) $ac_c" 1>&6
13286 else
13287   ac_save_LIBS="$LIBS"
13288 LIBS="-lodbc  $LIBS"
13289 cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292 /* Override any gcc2 internal prototype to avoid an error.  */
13293 /* We use char because int might match the return type of a gcc2
13294     builtin and then its argument prototype would still apply.  */
13295 char SQLDriverConnect();
13296
13297 int main() {
13298 SQLDriverConnect()
13299 ; return 0; }
13300 EOF
13301 if { (eval echo configure:13302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13302   rm -rf conftest*
13303   eval "ac_cv_lib_$ac_lib_var=yes"
13304 else
13305   echo "configure: failed program was:" >&5
13306   cat conftest.$ac_ext >&5
13307   rm -rf conftest*
13308   eval "ac_cv_lib_$ac_lib_var=no"
13309 fi
13310 rm -f conftest*
13311 LIBS="$ac_save_LIBS"
13312
13313 fi
13314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13315   echo "$ac_t""yes" 1>&6
13316   have_odbc=yes
13317 else
13318   echo "$ac_t""no" 1>&6
13319 have_odbc=no
13320 fi
13321
13322                 if test $have_odbc = yes ; then
13323                         ol_link_sql="-lodbc"
13324                 fi
13325         fi
13326
13327         if test $ol_link_sql != no ; then
13328                 SLAPD_SQL_LIBS="$ol_link_sql"
13329
13330         elif test $ol_enable_sql != auto ; then
13331                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13332         fi
13333 fi
13334
13335 if test $ol_enable_tcl != no ; then
13336         for ac_hdr in tcl.h
13337 do
13338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13340 echo "configure:13341: checking for $ac_hdr" >&5
13341 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13342   echo $ac_n "(cached) $ac_c" 1>&6
13343 else
13344   cat > conftest.$ac_ext <<EOF
13345 #line 13346 "configure"
13346 #include "confdefs.h"
13347 #include <$ac_hdr>
13348 EOF
13349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13350 { (eval echo configure:13351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13352 if test -z "$ac_err"; then
13353   rm -rf conftest*
13354   eval "ac_cv_header_$ac_safe=yes"
13355 else
13356   echo "$ac_err" >&5
13357   echo "configure: failed program was:" >&5
13358   cat conftest.$ac_ext >&5
13359   rm -rf conftest*
13360   eval "ac_cv_header_$ac_safe=no"
13361 fi
13362 rm -f conftest*
13363 fi
13364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13365   echo "$ac_t""yes" 1>&6
13366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13367   cat >> confdefs.h <<EOF
13368 #define $ac_tr_hdr 1
13369 EOF
13370  
13371 else
13372   echo "$ac_t""no" 1>&6
13373 fi
13374 done
13375
13376
13377         if test $ac_cv_header_tcl_h != yes ; then
13378                 have_tcl=no
13379         else
13380                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13381                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13382 echo "configure:13383: checking for main in -l$lib" >&5
13383 ac_lib_var=`echo $lib'_'main | 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="-l$lib  $LIBS"
13389 cat > conftest.$ac_ext <<EOF
13390 #line 13391 "configure"
13391 #include "confdefs.h"
13392
13393 int main() {
13394 main()
13395 ; return 0; }
13396 EOF
13397 if { (eval echo configure:13398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13398   rm -rf conftest*
13399   eval "ac_cv_lib_$ac_lib_var=yes"
13400 else
13401   echo "configure: failed program was:" >&5
13402   cat conftest.$ac_ext >&5
13403   rm -rf conftest*
13404   eval "ac_cv_lib_$ac_lib_var=no"
13405 fi
13406 rm -f conftest*
13407 LIBS="$ac_save_LIBS"
13408
13409 fi
13410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13411   echo "$ac_t""yes" 1>&6
13412   have_tcl=yes
13413                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13414                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13415                            else
13416                                MOD_TCL_LIB="-l${lib}"
13417                            fi;break
13418 else
13419   echo "$ac_t""no" 1>&6
13420 have_tcl=no
13421 fi
13422
13423                 done
13424         fi
13425
13426         if test $have_tcl != yes ; then
13427                 echo "configure: warning: could not find -ltcl" 1>&2
13428                 if test $ol_enable_tcl = yes ; then
13429                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13430                 fi
13431
13432                 ol_enable_tcl=no
13433         fi
13434 fi
13435
13436 ol_link_termcap=no
13437 for ac_hdr in termcap.h ncurses.h
13438 do
13439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13441 echo "configure:13442: checking for $ac_hdr" >&5
13442 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13443   echo $ac_n "(cached) $ac_c" 1>&6
13444 else
13445   cat > conftest.$ac_ext <<EOF
13446 #line 13447 "configure"
13447 #include "confdefs.h"
13448 #include <$ac_hdr>
13449 EOF
13450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13451 { (eval echo configure:13452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13453 if test -z "$ac_err"; then
13454   rm -rf conftest*
13455   eval "ac_cv_header_$ac_safe=yes"
13456 else
13457   echo "$ac_err" >&5
13458   echo "configure: failed program was:" >&5
13459   cat conftest.$ac_ext >&5
13460   rm -rf conftest*
13461   eval "ac_cv_header_$ac_safe=no"
13462 fi
13463 rm -f conftest*
13464 fi
13465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13466   echo "$ac_t""yes" 1>&6
13467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13468   cat >> confdefs.h <<EOF
13469 #define $ac_tr_hdr 1
13470 EOF
13471  
13472 else
13473   echo "$ac_t""no" 1>&6
13474 fi
13475 done
13476
13477
13478 if test $ol_link_termcap = no ; then
13479         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13480 echo "configure:13481: checking for tputs in -ltermcap" >&5
13481 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13483   echo $ac_n "(cached) $ac_c" 1>&6
13484 else
13485   ac_save_LIBS="$LIBS"
13486 LIBS="-ltermcap  $LIBS"
13487 cat > conftest.$ac_ext <<EOF
13488 #line 13489 "configure"
13489 #include "confdefs.h"
13490 /* Override any gcc2 internal prototype to avoid an error.  */
13491 /* We use char because int might match the return type of a gcc2
13492     builtin and then its argument prototype would still apply.  */
13493 char tputs();
13494
13495 int main() {
13496 tputs()
13497 ; return 0; }
13498 EOF
13499 if { (eval echo configure:13500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13500   rm -rf conftest*
13501   eval "ac_cv_lib_$ac_lib_var=yes"
13502 else
13503   echo "configure: failed program was:" >&5
13504   cat conftest.$ac_ext >&5
13505   rm -rf conftest*
13506   eval "ac_cv_lib_$ac_lib_var=no"
13507 fi
13508 rm -f conftest*
13509 LIBS="$ac_save_LIBS"
13510
13511 fi
13512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13513   echo "$ac_t""yes" 1>&6
13514   have_termcap=yes
13515 else
13516   echo "$ac_t""no" 1>&6
13517 have_termcap=no
13518 fi
13519
13520         if test $have_termcap = yes ; then
13521                 cat >> confdefs.h <<\EOF
13522 #define HAVE_TERMCAP 1
13523 EOF
13524
13525                 ol_link_termcap=yes
13526                 TERMCAP_LIBS=-ltermcap
13527         fi
13528 fi
13529
13530 if test $ol_link_termcap = no ; then
13531         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13532 echo "configure:13533: checking for initscr in -lncurses" >&5
13533 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13535   echo $ac_n "(cached) $ac_c" 1>&6
13536 else
13537   ac_save_LIBS="$LIBS"
13538 LIBS="-lncurses  $LIBS"
13539 cat > conftest.$ac_ext <<EOF
13540 #line 13541 "configure"
13541 #include "confdefs.h"
13542 /* Override any gcc2 internal prototype to avoid an error.  */
13543 /* We use char because int might match the return type of a gcc2
13544     builtin and then its argument prototype would still apply.  */
13545 char initscr();
13546
13547 int main() {
13548 initscr()
13549 ; return 0; }
13550 EOF
13551 if { (eval echo configure:13552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13552   rm -rf conftest*
13553   eval "ac_cv_lib_$ac_lib_var=yes"
13554 else
13555   echo "configure: failed program was:" >&5
13556   cat conftest.$ac_ext >&5
13557   rm -rf conftest*
13558   eval "ac_cv_lib_$ac_lib_var=no"
13559 fi
13560 rm -f conftest*
13561 LIBS="$ac_save_LIBS"
13562
13563 fi
13564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13565   echo "$ac_t""yes" 1>&6
13566   have_ncurses=yes
13567 else
13568   echo "$ac_t""no" 1>&6
13569 have_ncurses=no
13570 fi
13571
13572         if test $have_ncurses = yes ; then
13573                 cat >> confdefs.h <<\EOF
13574 #define HAVE_NCURSES 1
13575 EOF
13576
13577                 ol_link_termcap=yes
13578                 TERMCAP_LIBS=-lncurses
13579         fi
13580 fi
13581
13582 if test $ol_link_termcap = no ; then
13583         cat >> confdefs.h <<\EOF
13584 #define NO_TERMCAP 1
13585 EOF
13586
13587         TERMCAP_LIBS=
13588 fi
13589
13590 ol_link_sasl=no
13591 ol_link_spasswd=no
13592 if test $ol_with_cyrus_sasl != no ; then
13593         for ac_hdr in sasl.h
13594 do
13595 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13596 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13597 echo "configure:13598: checking for $ac_hdr" >&5
13598 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13599   echo $ac_n "(cached) $ac_c" 1>&6
13600 else
13601   cat > conftest.$ac_ext <<EOF
13602 #line 13603 "configure"
13603 #include "confdefs.h"
13604 #include <$ac_hdr>
13605 EOF
13606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13607 { (eval echo configure:13608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13609 if test -z "$ac_err"; then
13610   rm -rf conftest*
13611   eval "ac_cv_header_$ac_safe=yes"
13612 else
13613   echo "$ac_err" >&5
13614   echo "configure: failed program was:" >&5
13615   cat conftest.$ac_ext >&5
13616   rm -rf conftest*
13617   eval "ac_cv_header_$ac_safe=no"
13618 fi
13619 rm -f conftest*
13620 fi
13621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13622   echo "$ac_t""yes" 1>&6
13623     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13624   cat >> confdefs.h <<EOF
13625 #define $ac_tr_hdr 1
13626 EOF
13627  
13628 else
13629   echo "$ac_t""no" 1>&6
13630 fi
13631 done
13632
13633
13634         if test $ac_cv_header_sasl_h = yes ; then
13635                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13636 echo "configure:13637: checking for sasl_client_init in -lsasl" >&5
13637 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13638 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13639   echo $ac_n "(cached) $ac_c" 1>&6
13640 else
13641   ac_save_LIBS="$LIBS"
13642 LIBS="-lsasl  $LIBS"
13643 cat > conftest.$ac_ext <<EOF
13644 #line 13645 "configure"
13645 #include "confdefs.h"
13646 /* Override any gcc2 internal prototype to avoid an error.  */
13647 /* We use char because int might match the return type of a gcc2
13648     builtin and then its argument prototype would still apply.  */
13649 char sasl_client_init();
13650
13651 int main() {
13652 sasl_client_init()
13653 ; return 0; }
13654 EOF
13655 if { (eval echo configure:13656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13656   rm -rf conftest*
13657   eval "ac_cv_lib_$ac_lib_var=yes"
13658 else
13659   echo "configure: failed program was:" >&5
13660   cat conftest.$ac_ext >&5
13661   rm -rf conftest*
13662   eval "ac_cv_lib_$ac_lib_var=no"
13663 fi
13664 rm -f conftest*
13665 LIBS="$ac_save_LIBS"
13666
13667 fi
13668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13669   echo "$ac_t""yes" 1>&6
13670   have_cyrus_sasl=yes
13671 else
13672   echo "$ac_t""no" 1>&6
13673 have_cyrus_sasl=no
13674 fi
13675
13676
13677                 if test $have_cyrus_sasl != no ; then
13678                         SASL_LIBS="-lsasl"
13679                         cat >> confdefs.h <<\EOF
13680 #define HAVE_CYRUS_SASL 1
13681 EOF
13682
13683                         ol_link_sasl=yes
13684                 fi
13685         fi
13686
13687         if test $ol_link_sasl = no ; then
13688                 if test $ol_with_cyrus_sasl != auto ; then
13689                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13690                 else
13691                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13692                         echo "configure: warning: SASL authentication not supported!" 1>&2
13693                         if test $ol_link_tls = no ; then
13694                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13695                         fi
13696                 fi
13697
13698         elif test $ol_enable_spasswd != no ; then
13699                 ol_link_spasswd=yes
13700         fi
13701
13702 else
13703         echo "configure: warning: SASL authentication not supported!" 1>&2
13704         if test $ol_link_tls = no ; then
13705                 echo "configure: warning: Strong authentication not supported!" 1>&2
13706         fi
13707 fi
13708
13709 if test $cross_compiling != yes ; then
13710         dev=no
13711         if test -r /dev/urandom ; then
13712                 dev="/dev/urandom";
13713         elif test -r /idev/urandom ; then
13714                 dev="/idev/urandom";
13715         elif test -r /dev/srandom ; then
13716                 dev="/dev/srandom";
13717         elif test -r /dev/random ; then
13718                 dev="/dev/random";
13719         elif test -r /idev/random ; then
13720                 dev="/idev/random";
13721         fi
13722
13723         if test $dev != no ; then
13724                 cat >> confdefs.h <<EOF
13725 #define URANDOM_DEVICE "$dev"
13726 EOF
13727
13728         fi
13729 fi
13730
13731 ol_link_fetch=no
13732 if test $ol_with_fetch != no ; then
13733         ol_LIBS=$LIBS
13734 LIBS="-lfetch -lcom_err $LIBS"
13735 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13736 echo "configure:13737: checking fetch(3) library" >&5
13737 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13738   echo $ac_n "(cached) $ac_c" 1>&6
13739 else
13740   
13741         cat > conftest.$ac_ext <<EOF
13742 #line 13743 "configure"
13743 #include "confdefs.h"
13744
13745 #include <sys/param.h>
13746 #include <stdio.h>
13747 #include <fetch.h>
13748 int main() {
13749 struct url *u = fetchParseURL("file:///"); 
13750 ; return 0; }
13751 EOF
13752 if { (eval echo configure:13753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13753   rm -rf conftest*
13754   ol_cv_lib_fetch=yes
13755 else
13756   echo "configure: failed program was:" >&5
13757   cat conftest.$ac_ext >&5
13758   rm -rf conftest*
13759   ol_cv_lib_fetch=no
13760 fi
13761 rm -f conftest*
13762 fi
13763
13764 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13765 LIBS=$ol_LIBS
13766 if test $ol_cv_lib_fetch != no ; then
13767         ol_link_fetch="-lfetch -lcom_err"
13768         cat >> confdefs.h <<\EOF
13769 #define HAVE_FETCH 1
13770 EOF
13771
13772 fi
13773
13774
13775         if test $ol_cv_lib_fetch != no ; then
13776                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13777                 ol_link_fetch=freebsd
13778
13779         elif test $ol_with_fetch != auto ; then
13780                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13781         fi 
13782 fi
13783
13784 ol_link_readline=no
13785 if test $ol_with_readline != no ; then
13786         for ac_hdr in readline/readline.h readline/history.h
13787 do
13788 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13789 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13790 echo "configure:13791: checking for $ac_hdr" >&5
13791 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13792   echo $ac_n "(cached) $ac_c" 1>&6
13793 else
13794   cat > conftest.$ac_ext <<EOF
13795 #line 13796 "configure"
13796 #include "confdefs.h"
13797 #include <$ac_hdr>
13798 EOF
13799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13800 { (eval echo configure:13801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13802 if test -z "$ac_err"; then
13803   rm -rf conftest*
13804   eval "ac_cv_header_$ac_safe=yes"
13805 else
13806   echo "$ac_err" >&5
13807   echo "configure: failed program was:" >&5
13808   cat conftest.$ac_ext >&5
13809   rm -rf conftest*
13810   eval "ac_cv_header_$ac_safe=no"
13811 fi
13812 rm -f conftest*
13813 fi
13814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13815   echo "$ac_t""yes" 1>&6
13816     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13817   cat >> confdefs.h <<EOF
13818 #define $ac_tr_hdr 1
13819 EOF
13820  
13821 else
13822   echo "$ac_t""no" 1>&6
13823 fi
13824 done
13825
13826
13827         if test $ac_cv_header_readline_readline_h = yes ; then
13828                 save_LIBS="$LIBS"
13829                 LIBS="$TERMCAP_LIBS $LIBS"
13830                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13831 echo "configure:13832: checking for readline in -lreadline" >&5
13832 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13833 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13834   echo $ac_n "(cached) $ac_c" 1>&6
13835 else
13836   ac_save_LIBS="$LIBS"
13837 LIBS="-lreadline  $LIBS"
13838 cat > conftest.$ac_ext <<EOF
13839 #line 13840 "configure"
13840 #include "confdefs.h"
13841 /* Override any gcc2 internal prototype to avoid an error.  */
13842 /* We use char because int might match the return type of a gcc2
13843     builtin and then its argument prototype would still apply.  */
13844 char readline();
13845
13846 int main() {
13847 readline()
13848 ; return 0; }
13849 EOF
13850 if { (eval echo configure:13851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13851   rm -rf conftest*
13852   eval "ac_cv_lib_$ac_lib_var=yes"
13853 else
13854   echo "configure: failed program was:" >&5
13855   cat conftest.$ac_ext >&5
13856   rm -rf conftest*
13857   eval "ac_cv_lib_$ac_lib_var=no"
13858 fi
13859 rm -f conftest*
13860 LIBS="$ac_save_LIBS"
13861
13862 fi
13863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13864   echo "$ac_t""yes" 1>&6
13865   have_readline=yes
13866 else
13867   echo "$ac_t""no" 1>&6
13868 have_readline=no
13869 fi
13870
13871                 LIBS="$save_LIBS"
13872                         
13873                 if test $have_readline = yes ; then
13874                         ol_with_readline=found
13875                         ol_link_readline=yes
13876
13877                         READLINE_LIBS="-lreadline"
13878                 fi
13879         fi
13880 fi
13881
13882 if test $ol_link_readline = yes ; then
13883         cat >> confdefs.h <<\EOF
13884 #define HAVE_READLINE 1
13885 EOF
13886
13887 fi
13888
13889
13890 if test $ol_enable_crypt != no ; then
13891         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13892 echo "configure:13893: checking for crypt" >&5
13893 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13894   echo $ac_n "(cached) $ac_c" 1>&6
13895 else
13896   cat > conftest.$ac_ext <<EOF
13897 #line 13898 "configure"
13898 #include "confdefs.h"
13899 /* System header to define __stub macros and hopefully few prototypes,
13900     which can conflict with char crypt(); below.  */
13901 #include <assert.h>
13902 /* Override any gcc2 internal prototype to avoid an error.  */
13903 /* We use char because int might match the return type of a gcc2
13904     builtin and then its argument prototype would still apply.  */
13905 char crypt();
13906 char (*f)();
13907
13908 int main() {
13909
13910 /* The GNU C library defines this for functions which it implements
13911     to always fail with ENOSYS.  Some functions are actually named
13912     something starting with __ and the normal name is an alias.  */
13913 #if defined (__stub_crypt) || defined (__stub___crypt)
13914 choke me
13915 #else
13916 f = crypt;
13917 #endif
13918
13919 ; return 0; }
13920 EOF
13921 if { (eval echo configure:13922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13922   rm -rf conftest*
13923   eval "ac_cv_func_crypt=yes"
13924 else
13925   echo "configure: failed program was:" >&5
13926   cat conftest.$ac_ext >&5
13927   rm -rf conftest*
13928   eval "ac_cv_func_crypt=no"
13929 fi
13930 rm -f conftest*
13931 fi
13932
13933 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13934   echo "$ac_t""yes" 1>&6
13935   have_crypt=yes
13936 else
13937   echo "$ac_t""no" 1>&6
13938
13939                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13940 echo "configure:13941: checking for crypt in -lcrypt" >&5
13941 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13943   echo $ac_n "(cached) $ac_c" 1>&6
13944 else
13945   ac_save_LIBS="$LIBS"
13946 LIBS="-lcrypt  $LIBS"
13947 cat > conftest.$ac_ext <<EOF
13948 #line 13949 "configure"
13949 #include "confdefs.h"
13950 /* Override any gcc2 internal prototype to avoid an error.  */
13951 /* We use char because int might match the return type of a gcc2
13952     builtin and then its argument prototype would still apply.  */
13953 char crypt();
13954
13955 int main() {
13956 crypt()
13957 ; return 0; }
13958 EOF
13959 if { (eval echo configure:13960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13960   rm -rf conftest*
13961   eval "ac_cv_lib_$ac_lib_var=yes"
13962 else
13963   echo "configure: failed program was:" >&5
13964   cat conftest.$ac_ext >&5
13965   rm -rf conftest*
13966   eval "ac_cv_lib_$ac_lib_var=no"
13967 fi
13968 rm -f conftest*
13969 LIBS="$ac_save_LIBS"
13970
13971 fi
13972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13973   echo "$ac_t""yes" 1>&6
13974   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13975                         have_crypt=yes
13976 else
13977   echo "$ac_t""no" 1>&6
13978 have_crypt=no
13979 fi
13980
13981 fi
13982
13983
13984         if test $have_crypt = yes ; then
13985                 cat >> confdefs.h <<\EOF
13986 #define HAVE_CRYPT 1
13987 EOF
13988
13989         else
13990                 echo "configure: warning: could not find crypt" 1>&2
13991                 if test $ol_enable_crypt = yes ; then
13992                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13993                 fi
13994
13995                 echo "configure: warning: disabling crypt support" 1>&2
13996                 ol_enable_crypt=no
13997         fi
13998 fi
13999
14000 if test $ol_enable_proctitle != no ; then
14001         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14002 echo "configure:14003: checking for setproctitle" >&5
14003 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14004   echo $ac_n "(cached) $ac_c" 1>&6
14005 else
14006   cat > conftest.$ac_ext <<EOF
14007 #line 14008 "configure"
14008 #include "confdefs.h"
14009 /* System header to define __stub macros and hopefully few prototypes,
14010     which can conflict with char setproctitle(); below.  */
14011 #include <assert.h>
14012 /* Override any gcc2 internal prototype to avoid an error.  */
14013 /* We use char because int might match the return type of a gcc2
14014     builtin and then its argument prototype would still apply.  */
14015 char setproctitle();
14016 char (*f)();
14017
14018 int main() {
14019
14020 /* The GNU C library defines this for functions which it implements
14021     to always fail with ENOSYS.  Some functions are actually named
14022     something starting with __ and the normal name is an alias.  */
14023 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14024 choke me
14025 #else
14026 f = setproctitle;
14027 #endif
14028
14029 ; return 0; }
14030 EOF
14031 if { (eval echo configure:14032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14032   rm -rf conftest*
14033   eval "ac_cv_func_setproctitle=yes"
14034 else
14035   echo "configure: failed program was:" >&5
14036   cat conftest.$ac_ext >&5
14037   rm -rf conftest*
14038   eval "ac_cv_func_setproctitle=no"
14039 fi
14040 rm -f conftest*
14041 fi
14042
14043 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14044   echo "$ac_t""yes" 1>&6
14045   have_setproctitle=yes
14046 else
14047   echo "$ac_t""no" 1>&6
14048
14049                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14050 echo "configure:14051: checking for setproctitle in -lutil" >&5
14051 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14053   echo $ac_n "(cached) $ac_c" 1>&6
14054 else
14055   ac_save_LIBS="$LIBS"
14056 LIBS="-lutil  $LIBS"
14057 cat > conftest.$ac_ext <<EOF
14058 #line 14059 "configure"
14059 #include "confdefs.h"
14060 /* Override any gcc2 internal prototype to avoid an error.  */
14061 /* We use char because int might match the return type of a gcc2
14062     builtin and then its argument prototype would still apply.  */
14063 char setproctitle();
14064
14065 int main() {
14066 setproctitle()
14067 ; return 0; }
14068 EOF
14069 if { (eval echo configure:14070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14070   rm -rf conftest*
14071   eval "ac_cv_lib_$ac_lib_var=yes"
14072 else
14073   echo "configure: failed program was:" >&5
14074   cat conftest.$ac_ext >&5
14075   rm -rf conftest*
14076   eval "ac_cv_lib_$ac_lib_var=no"
14077 fi
14078 rm -f conftest*
14079 LIBS="$ac_save_LIBS"
14080
14081 fi
14082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14083   echo "$ac_t""yes" 1>&6
14084   have_setproctitle=yes
14085                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14086 else
14087   echo "$ac_t""no" 1>&6
14088 have_setproctitle=no
14089                         LIBOBJS="$LIBOBJS setproctitle.o"
14090                         LIBSRCS="$LIBSRCS setproctitle.c"
14091 fi
14092
14093 fi
14094
14095
14096         if test $have_setproctitle = yes ; then
14097                 cat >> confdefs.h <<\EOF
14098 #define HAVE_SETPROCTITLE 1
14099 EOF
14100
14101         fi
14102 fi
14103
14104 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14105 echo "configure:14106: checking for ANSI C header files" >&5
14106 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14107   echo $ac_n "(cached) $ac_c" 1>&6
14108 else
14109   cat > conftest.$ac_ext <<EOF
14110 #line 14111 "configure"
14111 #include "confdefs.h"
14112 #include <stdlib.h>
14113 #include <stdarg.h>
14114 #include <string.h>
14115 #include <float.h>
14116 EOF
14117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14118 { (eval echo configure:14119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14120 if test -z "$ac_err"; then
14121   rm -rf conftest*
14122   ac_cv_header_stdc=yes
14123 else
14124   echo "$ac_err" >&5
14125   echo "configure: failed program was:" >&5
14126   cat conftest.$ac_ext >&5
14127   rm -rf conftest*
14128   ac_cv_header_stdc=no
14129 fi
14130 rm -f conftest*
14131
14132 if test $ac_cv_header_stdc = yes; then
14133   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14134 cat > conftest.$ac_ext <<EOF
14135 #line 14136 "configure"
14136 #include "confdefs.h"
14137 #include <string.h>
14138 EOF
14139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14140   egrep "memchr" >/dev/null 2>&1; then
14141   :
14142 else
14143   rm -rf conftest*
14144   ac_cv_header_stdc=no
14145 fi
14146 rm -f conftest*
14147
14148 fi
14149
14150 if test $ac_cv_header_stdc = yes; then
14151   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14152 cat > conftest.$ac_ext <<EOF
14153 #line 14154 "configure"
14154 #include "confdefs.h"
14155 #include <stdlib.h>
14156 EOF
14157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14158   egrep "free" >/dev/null 2>&1; then
14159   :
14160 else
14161   rm -rf conftest*
14162   ac_cv_header_stdc=no
14163 fi
14164 rm -f conftest*
14165
14166 fi
14167
14168 if test $ac_cv_header_stdc = yes; then
14169   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14170 if test "$cross_compiling" = yes; then
14171   :
14172 else
14173   cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 #include <ctype.h>
14177 #if ((' ' & 0x0FF) == 0x020)
14178 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14179 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14180 #else
14181 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14182  || ('j' <= (c) && (c) <= 'r') \
14183  || ('s' <= (c) && (c) <= 'z'))
14184 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14185 #endif
14186 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14187 int main () { int i; for (i = 0; i < 256; i++)
14188 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14189 exit (0); }
14190
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14193 then
14194   :
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -fr conftest*
14199   ac_cv_header_stdc=no
14200 fi
14201 rm -fr conftest*
14202 fi
14203
14204 fi
14205 fi
14206
14207 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14208 if test $ac_cv_header_stdc = yes; then
14209   cat >> confdefs.h <<\EOF
14210 #define STDC_HEADERS 1
14211 EOF
14212
14213 fi
14214
14215 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14216 echo "configure:14217: checking for mode_t" >&5
14217 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14218   echo $ac_n "(cached) $ac_c" 1>&6
14219 else
14220   cat > conftest.$ac_ext <<EOF
14221 #line 14222 "configure"
14222 #include "confdefs.h"
14223 #include <sys/types.h>
14224 #if STDC_HEADERS
14225 #include <stdlib.h>
14226 #include <stddef.h>
14227 #endif
14228
14229 EOF
14230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14231   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14232   rm -rf conftest*
14233   eval "ac_cv_type_mode_t=yes"
14234 else
14235   rm -rf conftest*
14236   eval "ac_cv_type_mode_t=no"
14237 fi
14238 rm -f conftest*
14239
14240 fi
14241 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14242   echo "$ac_t""yes" 1>&6
14243 else
14244   echo "$ac_t""no" 1>&6
14245   cat >> confdefs.h <<EOF
14246 #define mode_t int
14247 EOF
14248
14249 fi
14250
14251 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14252 echo "configure:14253: checking for off_t" >&5
14253 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14254   echo $ac_n "(cached) $ac_c" 1>&6
14255 else
14256   cat > conftest.$ac_ext <<EOF
14257 #line 14258 "configure"
14258 #include "confdefs.h"
14259 #include <sys/types.h>
14260 #if STDC_HEADERS
14261 #include <stdlib.h>
14262 #include <stddef.h>
14263 #endif
14264
14265 EOF
14266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14267   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14268   rm -rf conftest*
14269   eval "ac_cv_type_off_t=yes"
14270 else
14271   rm -rf conftest*
14272   eval "ac_cv_type_off_t=no"
14273 fi
14274 rm -f conftest*
14275
14276 fi
14277 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14278   echo "$ac_t""yes" 1>&6
14279 else
14280   echo "$ac_t""no" 1>&6
14281   cat >> confdefs.h <<EOF
14282 #define off_t long
14283 EOF
14284
14285 fi
14286
14287 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14288 echo "configure:14289: checking for pid_t" >&5
14289 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14290   echo $ac_n "(cached) $ac_c" 1>&6
14291 else
14292   cat > conftest.$ac_ext <<EOF
14293 #line 14294 "configure"
14294 #include "confdefs.h"
14295 #include <sys/types.h>
14296 #if STDC_HEADERS
14297 #include <stdlib.h>
14298 #include <stddef.h>
14299 #endif
14300
14301 EOF
14302 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14303   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14304   rm -rf conftest*
14305   eval "ac_cv_type_pid_t=yes"
14306 else
14307   rm -rf conftest*
14308   eval "ac_cv_type_pid_t=no"
14309 fi
14310 rm -f conftest*
14311
14312 fi
14313 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14314   echo "$ac_t""yes" 1>&6
14315 else
14316   echo "$ac_t""no" 1>&6
14317   cat >> confdefs.h <<EOF
14318 #define pid_t int
14319 EOF
14320
14321 fi
14322
14323 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14324 echo "configure:14325: checking for ptrdiff_t" >&5
14325 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14326   echo $ac_n "(cached) $ac_c" 1>&6
14327 else
14328   cat > conftest.$ac_ext <<EOF
14329 #line 14330 "configure"
14330 #include "confdefs.h"
14331 #include <stddef.h>
14332 int main() {
14333 ptrdiff_t p
14334 ; return 0; }
14335 EOF
14336 if { (eval echo configure:14337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14337   rm -rf conftest*
14338   am_cv_type_ptrdiff_t=yes
14339 else
14340   echo "configure: failed program was:" >&5
14341   cat conftest.$ac_ext >&5
14342   rm -rf conftest*
14343   am_cv_type_ptrdiff_t=no
14344 fi
14345 rm -f conftest*
14346 fi
14347
14348 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14349    if test $am_cv_type_ptrdiff_t = yes; then
14350      cat >> confdefs.h <<\EOF
14351 #define HAVE_PTRDIFF_T 1
14352 EOF
14353
14354    fi
14355
14356 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14357 echo "configure:14358: checking return type of signal handlers" >&5
14358 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14359   echo $ac_n "(cached) $ac_c" 1>&6
14360 else
14361   cat > conftest.$ac_ext <<EOF
14362 #line 14363 "configure"
14363 #include "confdefs.h"
14364 #include <sys/types.h>
14365 #include <signal.h>
14366 #ifdef signal
14367 #undef signal
14368 #endif
14369 #ifdef __cplusplus
14370 extern "C" void (*signal (int, void (*)(int)))(int);
14371 #else
14372 void (*signal ()) ();
14373 #endif
14374
14375 int main() {
14376 int i;
14377 ; return 0; }
14378 EOF
14379 if { (eval echo configure:14380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14380   rm -rf conftest*
14381   ac_cv_type_signal=void
14382 else
14383   echo "configure: failed program was:" >&5
14384   cat conftest.$ac_ext >&5
14385   rm -rf conftest*
14386   ac_cv_type_signal=int
14387 fi
14388 rm -f conftest*
14389 fi
14390
14391 echo "$ac_t""$ac_cv_type_signal" 1>&6
14392 cat >> confdefs.h <<EOF
14393 #define RETSIGTYPE $ac_cv_type_signal
14394 EOF
14395
14396
14397 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14398 echo "configure:14399: checking for size_t" >&5
14399 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14400   echo $ac_n "(cached) $ac_c" 1>&6
14401 else
14402   cat > conftest.$ac_ext <<EOF
14403 #line 14404 "configure"
14404 #include "confdefs.h"
14405 #include <sys/types.h>
14406 #if STDC_HEADERS
14407 #include <stdlib.h>
14408 #include <stddef.h>
14409 #endif
14410
14411 EOF
14412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14413   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14414   rm -rf conftest*
14415   eval "ac_cv_type_size_t=yes"
14416 else
14417   rm -rf conftest*
14418   eval "ac_cv_type_size_t=no"
14419 fi
14420 rm -f conftest*
14421
14422 fi
14423 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14424   echo "$ac_t""yes" 1>&6
14425 else
14426   echo "$ac_t""no" 1>&6
14427   cat >> confdefs.h <<EOF
14428 #define size_t unsigned
14429 EOF
14430
14431 fi
14432
14433
14434 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14435 echo "configure:14436: checking for ssize_t" >&5
14436 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14437   echo $ac_n "(cached) $ac_c" 1>&6
14438 else
14439   cat > conftest.$ac_ext <<EOF
14440 #line 14441 "configure"
14441 #include "confdefs.h"
14442 #include <sys/types.h>
14443 #if STDC_HEADERS
14444 #include <stdlib.h>
14445 #include <stddef.h>
14446 #endif
14447
14448 EOF
14449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14450   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14451   rm -rf conftest*
14452   eval "ac_cv_type_ssize_t=yes"
14453 else
14454   rm -rf conftest*
14455   eval "ac_cv_type_ssize_t=no"
14456 fi
14457 rm -f conftest*
14458
14459 fi
14460 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14461   echo "$ac_t""yes" 1>&6
14462 else
14463   echo "$ac_t""no" 1>&6
14464   cat >> confdefs.h <<EOF
14465 #define ssize_t signed int
14466 EOF
14467
14468 fi
14469
14470 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14471 echo "configure:14472: checking for caddr_t" >&5
14472 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14473   echo $ac_n "(cached) $ac_c" 1>&6
14474 else
14475   cat > conftest.$ac_ext <<EOF
14476 #line 14477 "configure"
14477 #include "confdefs.h"
14478 #include <sys/types.h>
14479 #if STDC_HEADERS
14480 #include <stdlib.h>
14481 #include <stddef.h>
14482 #endif
14483
14484 EOF
14485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14486   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14487   rm -rf conftest*
14488   eval "ac_cv_type_caddr_t=yes"
14489 else
14490   rm -rf conftest*
14491   eval "ac_cv_type_caddr_t=no"
14492 fi
14493 rm -f conftest*
14494
14495 fi
14496 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14497   echo "$ac_t""yes" 1>&6
14498 else
14499   echo "$ac_t""no" 1>&6
14500   cat >> confdefs.h <<EOF
14501 #define caddr_t char *
14502 EOF
14503
14504 fi
14505
14506
14507 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14508 echo "configure:14509: checking for socklen_t" >&5
14509 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14510   echo $ac_n "(cached) $ac_c" 1>&6
14511 else
14512   cat > conftest.$ac_ext <<EOF
14513 #line 14514 "configure"
14514 #include "confdefs.h"
14515
14516 #ifdef HAVE_SYS_TYPES_H
14517 #include <sys/types.h>
14518 #endif
14519 #ifdef HAVE_SYS_SOCKET_H
14520 #include <sys/socket.h>
14521 #endif
14522
14523 int main() {
14524 socklen_t len;
14525 ; return 0; }
14526 EOF
14527 if { (eval echo configure:14528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14528   rm -rf conftest*
14529   ol_cv_type_socklen_t=yes
14530 else
14531   echo "configure: failed program was:" >&5
14532   cat conftest.$ac_ext >&5
14533   rm -rf conftest*
14534   ol_cv_type_socklen_t=no
14535 fi
14536 rm -f conftest*
14537 fi
14538
14539 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14540   if test $ol_cv_type_socklen_t = no; then
14541     cat >> confdefs.h <<\EOF
14542 #define socklen_t int
14543 EOF
14544
14545   fi
14546  
14547 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14548 echo "configure:14549: checking for member st_blksize in aggregate type struct stat" >&5
14549 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14550   echo $ac_n "(cached) $ac_c" 1>&6
14551 else
14552   cat > conftest.$ac_ext <<EOF
14553 #line 14554 "configure"
14554 #include "confdefs.h"
14555 #include <sys/types.h>
14556 #include <sys/stat.h>
14557 int main() {
14558 struct stat foo; foo.st_blksize;
14559 ; return 0; }
14560 EOF
14561 if { (eval echo configure:14562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14562   rm -rf conftest*
14563   ac_cv_c_struct_member_st_blksize=yes
14564 else
14565   echo "configure: failed program was:" >&5
14566   cat conftest.$ac_ext >&5
14567   rm -rf conftest*
14568   ac_cv_c_struct_member_st_blksize=no
14569 fi
14570 rm -f conftest*
14571 fi
14572
14573 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14574 st_blksize="$ac_cv_c_struct_member_st_blksize"
14575 if test $ac_cv_c_struct_member_st_blksize = yes; then
14576   cat >> confdefs.h <<\EOF
14577 #define HAVE_ST_BLKSIZE 1
14578 EOF
14579
14580 fi
14581
14582 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14583 echo "configure:14584: checking whether time.h and sys/time.h may both be included" >&5
14584 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14585   echo $ac_n "(cached) $ac_c" 1>&6
14586 else
14587   cat > conftest.$ac_ext <<EOF
14588 #line 14589 "configure"
14589 #include "confdefs.h"
14590 #include <sys/types.h>
14591 #include <sys/time.h>
14592 #include <time.h>
14593 int main() {
14594 struct tm *tp;
14595 ; return 0; }
14596 EOF
14597 if { (eval echo configure:14598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14598   rm -rf conftest*
14599   ac_cv_header_time=yes
14600 else
14601   echo "configure: failed program was:" >&5
14602   cat conftest.$ac_ext >&5
14603   rm -rf conftest*
14604   ac_cv_header_time=no
14605 fi
14606 rm -f conftest*
14607 fi
14608
14609 echo "$ac_t""$ac_cv_header_time" 1>&6
14610 if test $ac_cv_header_time = yes; then
14611   cat >> confdefs.h <<\EOF
14612 #define TIME_WITH_SYS_TIME 1
14613 EOF
14614
14615 fi
14616
14617 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14618 echo "configure:14619: checking whether struct tm is in sys/time.h or time.h" >&5
14619 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14620   echo $ac_n "(cached) $ac_c" 1>&6
14621 else
14622   cat > conftest.$ac_ext <<EOF
14623 #line 14624 "configure"
14624 #include "confdefs.h"
14625 #include <sys/types.h>
14626 #include <time.h>
14627 int main() {
14628 struct tm *tp; tp->tm_sec;
14629 ; return 0; }
14630 EOF
14631 if { (eval echo configure:14632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14632   rm -rf conftest*
14633   ac_cv_struct_tm=time.h
14634 else
14635   echo "configure: failed program was:" >&5
14636   cat conftest.$ac_ext >&5
14637   rm -rf conftest*
14638   ac_cv_struct_tm=sys/time.h
14639 fi
14640 rm -f conftest*
14641 fi
14642
14643 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14644 if test $ac_cv_struct_tm = sys/time.h; then
14645   cat >> confdefs.h <<\EOF
14646 #define TM_IN_SYS_TIME 1
14647 EOF
14648
14649 fi
14650
14651 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14652 echo "configure:14653: checking for uid_t in sys/types.h" >&5
14653 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14654   echo $ac_n "(cached) $ac_c" 1>&6
14655 else
14656   cat > conftest.$ac_ext <<EOF
14657 #line 14658 "configure"
14658 #include "confdefs.h"
14659 #include <sys/types.h>
14660 EOF
14661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14662   egrep "uid_t" >/dev/null 2>&1; then
14663   rm -rf conftest*
14664   ac_cv_type_uid_t=yes
14665 else
14666   rm -rf conftest*
14667   ac_cv_type_uid_t=no
14668 fi
14669 rm -f conftest*
14670
14671 fi
14672
14673 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14674 if test $ac_cv_type_uid_t = no; then
14675   cat >> confdefs.h <<\EOF
14676 #define uid_t int
14677 EOF
14678
14679   cat >> confdefs.h <<\EOF
14680 #define gid_t int
14681 EOF
14682
14683 fi
14684
14685 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14686 echo "configure:14687: checking for sig_atomic_t" >&5
14687 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14688   echo $ac_n "(cached) $ac_c" 1>&6
14689 else
14690   cat > conftest.$ac_ext <<EOF
14691 #line 14692 "configure"
14692 #include "confdefs.h"
14693 #include <signal.h>
14694 int main() {
14695 sig_atomic_t atomic;
14696 ; return 0; }
14697 EOF
14698 if { (eval echo configure:14699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14699   rm -rf conftest*
14700   ol_cv_type_sig_atomic_t=yes
14701 else
14702   echo "configure: failed program was:" >&5
14703   cat conftest.$ac_ext >&5
14704   rm -rf conftest*
14705   ol_cv_type_sig_atomic_t=no
14706 fi
14707 rm -f conftest*
14708 fi
14709
14710 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14711   if test $ol_cv_type_sig_atomic_t = no; then
14712     cat >> confdefs.h <<\EOF
14713 #define sig_atomic_t int
14714 EOF
14715
14716   fi
14717  
14718
14719
14720 # test for pw_gecos in struct passwd
14721 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14722 echo "configure:14723: checking struct passwd for pw_gecos" >&5
14723 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14724   echo $ac_n "(cached) $ac_c" 1>&6
14725 else
14726   
14727         cat > conftest.$ac_ext <<EOF
14728 #line 14729 "configure"
14729 #include "confdefs.h"
14730 #include <pwd.h>
14731 int main() {
14732
14733         struct passwd pwd;
14734         pwd.pw_gecos = pwd.pw_name;
14735
14736 ; return 0; }
14737 EOF
14738 if { (eval echo configure:14739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14739   rm -rf conftest*
14740   ol_cv_struct_passwd_pw_gecos=yes
14741 else
14742   echo "configure: failed program was:" >&5
14743   cat conftest.$ac_ext >&5
14744   rm -rf conftest*
14745   ol_cv_struct_passwd_pw_gecos=no
14746 fi
14747 rm -f conftest*
14748 fi
14749
14750 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14751 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14752         cat >> confdefs.h <<\EOF
14753 #define HAVE_PW_GECOS 1
14754 EOF
14755
14756 fi
14757
14758 # test for pw_passwd in struct passwd
14759 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14760 echo "configure:14761: checking struct passwd for pw_passwd" >&5
14761 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14762   echo $ac_n "(cached) $ac_c" 1>&6
14763 else
14764   
14765         cat > conftest.$ac_ext <<EOF
14766 #line 14767 "configure"
14767 #include "confdefs.h"
14768 #include <pwd.h>
14769 int main() {
14770
14771         struct passwd pwd;
14772         pwd.pw_passwd = pwd.pw_name;
14773
14774 ; return 0; }
14775 EOF
14776 if { (eval echo configure:14777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14777   rm -rf conftest*
14778   ol_cv_struct_passwd_pw_passwd=yes
14779 else
14780   echo "configure: failed program was:" >&5
14781   cat conftest.$ac_ext >&5
14782   rm -rf conftest*
14783   ol_cv_struct_passwd_pw_passwd=no
14784 fi
14785 rm -f conftest*
14786 fi
14787
14788 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14789 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14790         cat >> confdefs.h <<\EOF
14791 #define HAVE_PW_PASSWD 1
14792 EOF
14793
14794 fi
14795
14796
14797 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14798 echo "configure:14799: checking if toupper() requires islower()" >&5
14799 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14800   echo $ac_n "(cached) $ac_c" 1>&6
14801 else
14802   
14803         if test "$cross_compiling" = yes; then
14804   ol_cv_c_upper_lower=safe
14805 else
14806   cat > conftest.$ac_ext <<EOF
14807 #line 14808 "configure"
14808 #include "confdefs.h"
14809
14810 #include <ctype.h>
14811 main()
14812 {
14813         if ('C' == toupper('C'))
14814                 exit(0);
14815         else
14816                 exit(1);
14817 }
14818 EOF
14819 if { (eval echo configure:14820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14820 then
14821   ol_cv_c_upper_lower=no
14822 else
14823   echo "configure: failed program was:" >&5
14824   cat conftest.$ac_ext >&5
14825   rm -fr conftest*
14826   ol_cv_c_upper_lower=yes
14827 fi
14828 rm -fr conftest*
14829 fi
14830
14831 fi
14832
14833 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14834 if test $ol_cv_c_upper_lower != no ; then
14835         cat >> confdefs.h <<\EOF
14836 #define C_UPPER_LOWER 1
14837 EOF
14838
14839 fi
14840
14841 echo $ac_n "checking for working const""... $ac_c" 1>&6
14842 echo "configure:14843: checking for working const" >&5
14843 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14844   echo $ac_n "(cached) $ac_c" 1>&6
14845 else
14846   cat > conftest.$ac_ext <<EOF
14847 #line 14848 "configure"
14848 #include "confdefs.h"
14849
14850 int main() {
14851
14852 /* Ultrix mips cc rejects this.  */
14853 typedef int charset[2]; const charset x;
14854 /* SunOS 4.1.1 cc rejects this.  */
14855 char const *const *ccp;
14856 char **p;
14857 /* NEC SVR4.0.2 mips cc rejects this.  */
14858 struct point {int x, y;};
14859 static struct point const zero = {0,0};
14860 /* AIX XL C 1.02.0.0 rejects this.
14861    It does not let you subtract one const X* pointer from another in an arm
14862    of an if-expression whose if-part is not a constant expression */
14863 const char *g = "string";
14864 ccp = &g + (g ? g-g : 0);
14865 /* HPUX 7.0 cc rejects these. */
14866 ++ccp;
14867 p = (char**) ccp;
14868 ccp = (char const *const *) p;
14869 { /* SCO 3.2v4 cc rejects this.  */
14870   char *t;
14871   char const *s = 0 ? (char *) 0 : (char const *) 0;
14872
14873   *t++ = 0;
14874 }
14875 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14876   int x[] = {25, 17};
14877   const int *foo = &x[0];
14878   ++foo;
14879 }
14880 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14881   typedef const int *iptr;
14882   iptr p = 0;
14883   ++p;
14884 }
14885 { /* AIX XL C 1.02.0.0 rejects this saying
14886      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14887   struct s { int j; const int *ap[3]; };
14888   struct s *b; b->j = 5;
14889 }
14890 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14891   const int foo = 10;
14892 }
14893
14894 ; return 0; }
14895 EOF
14896 if { (eval echo configure:14897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14897   rm -rf conftest*
14898   ac_cv_c_const=yes
14899 else
14900   echo "configure: failed program was:" >&5
14901   cat conftest.$ac_ext >&5
14902   rm -rf conftest*
14903   ac_cv_c_const=no
14904 fi
14905 rm -f conftest*
14906 fi
14907
14908 echo "$ac_t""$ac_cv_c_const" 1>&6
14909 if test $ac_cv_c_const = no; then
14910   cat >> confdefs.h <<\EOF
14911 #define const 
14912 EOF
14913
14914 fi
14915
14916 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14917 echo "configure:14918: checking if compiler understands volatile" >&5
14918 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14919   echo $ac_n "(cached) $ac_c" 1>&6
14920 else
14921   cat > conftest.$ac_ext <<EOF
14922 #line 14923 "configure"
14923 #include "confdefs.h"
14924 int x, y, z;
14925 int main() {
14926 volatile int a; int * volatile b = x ? &y : &z;
14927       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14928       *b = 0;
14929 ; return 0; }
14930 EOF
14931 if { (eval echo configure:14932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14932   rm -rf conftest*
14933   ol_cv_c_volatile=yes
14934 else
14935   echo "configure: failed program was:" >&5
14936   cat conftest.$ac_ext >&5
14937   rm -rf conftest*
14938   ol_cv_c_volatile=no
14939 fi
14940 rm -f conftest*
14941 fi
14942
14943 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14944   if test $ol_cv_c_volatile = yes; then
14945     : 
14946   else
14947     cat >> confdefs.h <<\EOF
14948 #define volatile 
14949 EOF
14950
14951   fi
14952  
14953
14954 if test $cross_compiling = yes ; then
14955         cat >> confdefs.h <<\EOF
14956 #define CROSS_COMPILING 1
14957 EOF
14958
14959 else
14960         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14961 echo "configure:14962: checking whether byte ordering is bigendian" >&5
14962 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14963   echo $ac_n "(cached) $ac_c" 1>&6
14964 else
14965   ac_cv_c_bigendian=unknown
14966 # See if sys/param.h defines the BYTE_ORDER macro.
14967 cat > conftest.$ac_ext <<EOF
14968 #line 14969 "configure"
14969 #include "confdefs.h"
14970 #include <sys/types.h>
14971 #include <sys/param.h>
14972 int main() {
14973
14974 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14975  bogus endian macros
14976 #endif
14977 ; return 0; }
14978 EOF
14979 if { (eval echo configure:14980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14980   rm -rf conftest*
14981   # It does; now see whether it defined to BIG_ENDIAN or not.
14982 cat > conftest.$ac_ext <<EOF
14983 #line 14984 "configure"
14984 #include "confdefs.h"
14985 #include <sys/types.h>
14986 #include <sys/param.h>
14987 int main() {
14988
14989 #if BYTE_ORDER != BIG_ENDIAN
14990  not big endian
14991 #endif
14992 ; return 0; }
14993 EOF
14994 if { (eval echo configure:14995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14995   rm -rf conftest*
14996   ac_cv_c_bigendian=yes
14997 else
14998   echo "configure: failed program was:" >&5
14999   cat conftest.$ac_ext >&5
15000   rm -rf conftest*
15001   ac_cv_c_bigendian=no
15002 fi
15003 rm -f conftest*
15004 else
15005   echo "configure: failed program was:" >&5
15006   cat conftest.$ac_ext >&5
15007 fi
15008 rm -f conftest*
15009 if test $ac_cv_c_bigendian = unknown; then
15010 if test "$cross_compiling" = yes; then
15011     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15012 else
15013   cat > conftest.$ac_ext <<EOF
15014 #line 15015 "configure"
15015 #include "confdefs.h"
15016 main () {
15017   /* Are we little or big endian?  From Harbison&Steele.  */
15018   union
15019   {
15020     long l;
15021     char c[sizeof (long)];
15022   } u;
15023   u.l = 1;
15024   exit (u.c[sizeof (long) - 1] == 1);
15025 }
15026 EOF
15027 if { (eval echo configure:15028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15028 then
15029   ac_cv_c_bigendian=no
15030 else
15031   echo "configure: failed program was:" >&5
15032   cat conftest.$ac_ext >&5
15033   rm -fr conftest*
15034   ac_cv_c_bigendian=yes
15035 fi
15036 rm -fr conftest*
15037 fi
15038
15039 fi
15040 fi
15041
15042 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15043 if test $ac_cv_c_bigendian = yes; then
15044   cat >> confdefs.h <<\EOF
15045 #define WORDS_BIGENDIAN 1
15046 EOF
15047
15048 fi
15049
15050 fi
15051
15052 echo $ac_n "checking size of short""... $ac_c" 1>&6
15053 echo "configure:15054: checking size of short" >&5 
15054 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15055   echo $ac_n "(cached) $ac_c" 1>&6
15056 else
15057   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15058   cat > conftest.$ac_ext <<EOF
15059 #line 15060 "configure"
15060 #include "confdefs.h"
15061 #include "confdefs.h" 
15062 #include <sys/types.h> 
15063  
15064
15065 int main() {
15066 switch (0) case 0: case (sizeof (short) == $ac_size):;
15067 ; return 0; }
15068 EOF
15069 if { (eval echo configure:15070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15070   rm -rf conftest*
15071   ac_cv_sizeof_short=$ac_size
15072 else
15073   echo "configure: failed program was:" >&5
15074   cat conftest.$ac_ext >&5
15075 fi
15076 rm -f conftest* 
15077   if test x$ac_cv_sizeof_short != x ; then break; fi 
15078 done 
15079
15080 fi
15081  
15082 if test x$ac_cv_sizeof_short = x ; then 
15083   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15084 fi 
15085 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15086 cat >> confdefs.h <<EOF
15087 #define SIZEOF_SHORT $ac_cv_sizeof_short
15088 EOF
15089  
15090  
15091 echo $ac_n "checking size of int""... $ac_c" 1>&6
15092 echo "configure:15093: checking size of int" >&5 
15093 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15094   echo $ac_n "(cached) $ac_c" 1>&6
15095 else
15096   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15097   cat > conftest.$ac_ext <<EOF
15098 #line 15099 "configure"
15099 #include "confdefs.h"
15100 #include "confdefs.h" 
15101 #include <sys/types.h> 
15102  
15103
15104 int main() {
15105 switch (0) case 0: case (sizeof (int) == $ac_size):;
15106 ; return 0; }
15107 EOF
15108 if { (eval echo configure:15109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15109   rm -rf conftest*
15110   ac_cv_sizeof_int=$ac_size
15111 else
15112   echo "configure: failed program was:" >&5
15113   cat conftest.$ac_ext >&5
15114 fi
15115 rm -f conftest* 
15116   if test x$ac_cv_sizeof_int != x ; then break; fi 
15117 done 
15118
15119 fi
15120  
15121 if test x$ac_cv_sizeof_int = x ; then 
15122   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15123 fi 
15124 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15125 cat >> confdefs.h <<EOF
15126 #define SIZEOF_INT $ac_cv_sizeof_int
15127 EOF
15128  
15129  
15130 echo $ac_n "checking size of long""... $ac_c" 1>&6
15131 echo "configure:15132: checking size of long" >&5 
15132 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15133   echo $ac_n "(cached) $ac_c" 1>&6
15134 else
15135   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15136   cat > conftest.$ac_ext <<EOF
15137 #line 15138 "configure"
15138 #include "confdefs.h"
15139 #include "confdefs.h" 
15140 #include <sys/types.h> 
15141  
15142
15143 int main() {
15144 switch (0) case 0: case (sizeof (long) == $ac_size):;
15145 ; return 0; }
15146 EOF
15147 if { (eval echo configure:15148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15148   rm -rf conftest*
15149   ac_cv_sizeof_long=$ac_size
15150 else
15151   echo "configure: failed program was:" >&5
15152   cat conftest.$ac_ext >&5
15153 fi
15154 rm -f conftest* 
15155   if test x$ac_cv_sizeof_long != x ; then break; fi 
15156 done 
15157
15158 fi
15159  
15160 if test x$ac_cv_sizeof_long = x ; then 
15161   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15162 fi 
15163 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15164 cat >> confdefs.h <<EOF
15165 #define SIZEOF_LONG $ac_cv_sizeof_long
15166 EOF
15167  
15168
15169
15170 if test "$ac_cv_sizeof_int" -lt 4 ; then
15171         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15172
15173         cat >> confdefs.h <<\EOF
15174 #define LBER_INT_T long
15175 EOF
15176
15177 else
15178         cat >> confdefs.h <<\EOF
15179 #define LBER_INT_T int
15180 EOF
15181
15182 fi
15183
15184 cat >> confdefs.h <<\EOF
15185 #define LBER_LEN_T long
15186 EOF
15187
15188 cat >> confdefs.h <<\EOF
15189 #define LBER_SOCKET_T int
15190 EOF
15191
15192 cat >> confdefs.h <<\EOF
15193 #define LBER_TAG_T long
15194 EOF
15195
15196
15197 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15198 echo "configure:15199: checking for 8-bit clean memcmp" >&5
15199 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15200   echo $ac_n "(cached) $ac_c" 1>&6
15201 else
15202   if test "$cross_compiling" = yes; then
15203   ac_cv_func_memcmp_clean=no
15204 else
15205   cat > conftest.$ac_ext <<EOF
15206 #line 15207 "configure"
15207 #include "confdefs.h"
15208
15209 main()
15210 {
15211   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15212   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15213 }
15214
15215 EOF
15216 if { (eval echo configure:15217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15217 then
15218   ac_cv_func_memcmp_clean=yes
15219 else
15220   echo "configure: failed program was:" >&5
15221   cat conftest.$ac_ext >&5
15222   rm -fr conftest*
15223   ac_cv_func_memcmp_clean=no
15224 fi
15225 rm -fr conftest*
15226 fi
15227
15228 fi
15229
15230 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15231 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15232
15233 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15234 echo "configure:15235: checking for strftime" >&5
15235 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15236   echo $ac_n "(cached) $ac_c" 1>&6
15237 else
15238   cat > conftest.$ac_ext <<EOF
15239 #line 15240 "configure"
15240 #include "confdefs.h"
15241 /* System header to define __stub macros and hopefully few prototypes,
15242     which can conflict with char strftime(); below.  */
15243 #include <assert.h>
15244 /* Override any gcc2 internal prototype to avoid an error.  */
15245 /* We use char because int might match the return type of a gcc2
15246     builtin and then its argument prototype would still apply.  */
15247 char strftime();
15248 char (*f)();
15249
15250 int main() {
15251
15252 /* The GNU C library defines this for functions which it implements
15253     to always fail with ENOSYS.  Some functions are actually named
15254     something starting with __ and the normal name is an alias.  */
15255 #if defined (__stub_strftime) || defined (__stub___strftime)
15256 choke me
15257 #else
15258 f = strftime;
15259 #endif
15260
15261 ; return 0; }
15262 EOF
15263 if { (eval echo configure:15264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15264   rm -rf conftest*
15265   eval "ac_cv_func_strftime=yes"
15266 else
15267   echo "configure: failed program was:" >&5
15268   cat conftest.$ac_ext >&5
15269   rm -rf conftest*
15270   eval "ac_cv_func_strftime=no"
15271 fi
15272 rm -f conftest*
15273 fi
15274
15275 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15276   echo "$ac_t""yes" 1>&6
15277   cat >> confdefs.h <<\EOF
15278 #define HAVE_STRFTIME 1
15279 EOF
15280
15281 else
15282   echo "$ac_t""no" 1>&6
15283 # strftime is in -lintl on SCO UNIX.
15284 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15285 echo "configure:15286: checking for strftime in -lintl" >&5
15286 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15288   echo $ac_n "(cached) $ac_c" 1>&6
15289 else
15290   ac_save_LIBS="$LIBS"
15291 LIBS="-lintl  $LIBS"
15292 cat > conftest.$ac_ext <<EOF
15293 #line 15294 "configure"
15294 #include "confdefs.h"
15295 /* Override any gcc2 internal prototype to avoid an error.  */
15296 /* We use char because int might match the return type of a gcc2
15297     builtin and then its argument prototype would still apply.  */
15298 char strftime();
15299
15300 int main() {
15301 strftime()
15302 ; return 0; }
15303 EOF
15304 if { (eval echo configure:15305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15305   rm -rf conftest*
15306   eval "ac_cv_lib_$ac_lib_var=yes"
15307 else
15308   echo "configure: failed program was:" >&5
15309   cat conftest.$ac_ext >&5
15310   rm -rf conftest*
15311   eval "ac_cv_lib_$ac_lib_var=no"
15312 fi
15313 rm -f conftest*
15314 LIBS="$ac_save_LIBS"
15315
15316 fi
15317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15318   echo "$ac_t""yes" 1>&6
15319   cat >> confdefs.h <<\EOF
15320 #define HAVE_STRFTIME 1
15321 EOF
15322
15323 LIBS="-lintl $LIBS"
15324 else
15325   echo "$ac_t""no" 1>&6
15326 fi
15327
15328 fi
15329
15330
15331 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15332 echo "configure:15333: checking for inet_aton()" >&5
15333 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15334   echo $ac_n "(cached) $ac_c" 1>&6
15335 else
15336   cat > conftest.$ac_ext <<EOF
15337 #line 15338 "configure"
15338 #include "confdefs.h"
15339
15340 #ifdef HAVE_SYS_TYPES_H
15341 #       include <sys/types.h>
15342 #endif
15343 #ifdef HAVE_SYS_SOCKET_H
15344 #       include <sys/socket.h>
15345 #       ifdef HAVE_SYS_SELECT_H
15346 #               include <sys/select.h>
15347 #       endif
15348 #       include <netinet/in.h>
15349 #       ifdef HAVE_ARPA_INET_H
15350 #               include <arpa/inet.h>
15351 #       endif
15352 #endif
15353
15354 int main() {
15355 struct in_addr in;
15356 int rc = inet_aton( "255.255.255.255", &in );
15357 ; return 0; }
15358 EOF
15359 if { (eval echo configure:15360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15360   rm -rf conftest*
15361   ol_cv_func_inet_aton=yes
15362 else
15363   echo "configure: failed program was:" >&5
15364   cat conftest.$ac_ext >&5
15365   rm -rf conftest*
15366   ol_cv_func_inet_aton=no
15367 fi
15368 rm -f conftest*
15369 fi
15370
15371 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15372   if test $ol_cv_func_inet_aton != no; then
15373     cat >> confdefs.h <<\EOF
15374 #define HAVE_INET_ATON 1
15375 EOF
15376
15377   fi
15378  
15379
15380 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15381 echo "configure:15382: checking for _spawnlp" >&5
15382 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15383   echo $ac_n "(cached) $ac_c" 1>&6
15384 else
15385   cat > conftest.$ac_ext <<EOF
15386 #line 15387 "configure"
15387 #include "confdefs.h"
15388 /* System header to define __stub macros and hopefully few prototypes,
15389     which can conflict with char _spawnlp(); below.  */
15390 #include <assert.h>
15391 /* Override any gcc2 internal prototype to avoid an error.  */
15392 /* We use char because int might match the return type of a gcc2
15393     builtin and then its argument prototype would still apply.  */
15394 char _spawnlp();
15395 char (*f)();
15396
15397 int main() {
15398
15399 /* The GNU C library defines this for functions which it implements
15400     to always fail with ENOSYS.  Some functions are actually named
15401     something starting with __ and the normal name is an alias.  */
15402 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15403 choke me
15404 #else
15405 f = _spawnlp;
15406 #endif
15407
15408 ; return 0; }
15409 EOF
15410 if { (eval echo configure:15411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15411   rm -rf conftest*
15412   eval "ac_cv_func__spawnlp=yes"
15413 else
15414   echo "configure: failed program was:" >&5
15415   cat conftest.$ac_ext >&5
15416   rm -rf conftest*
15417   eval "ac_cv_func__spawnlp=no"
15418 fi
15419 rm -f conftest*
15420 fi
15421
15422 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15423   echo "$ac_t""yes" 1>&6
15424   cat >> confdefs.h <<\EOF
15425 #define HAVE_SPAWNLP 1
15426 EOF
15427
15428 else
15429   echo "$ac_t""no" 1>&6
15430 fi
15431
15432
15433 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15434 echo "configure:15435: checking for _snprintf" >&5
15435 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15436   echo $ac_n "(cached) $ac_c" 1>&6
15437 else
15438   cat > conftest.$ac_ext <<EOF
15439 #line 15440 "configure"
15440 #include "confdefs.h"
15441 /* System header to define __stub macros and hopefully few prototypes,
15442     which can conflict with char _snprintf(); below.  */
15443 #include <assert.h>
15444 /* Override any gcc2 internal prototype to avoid an error.  */
15445 /* We use char because int might match the return type of a gcc2
15446     builtin and then its argument prototype would still apply.  */
15447 char _snprintf();
15448 char (*f)();
15449
15450 int main() {
15451
15452 /* The GNU C library defines this for functions which it implements
15453     to always fail with ENOSYS.  Some functions are actually named
15454     something starting with __ and the normal name is an alias.  */
15455 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15456 choke me
15457 #else
15458 f = _snprintf;
15459 #endif
15460
15461 ; return 0; }
15462 EOF
15463 if { (eval echo configure:15464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15464   rm -rf conftest*
15465   eval "ac_cv_func__snprintf=yes"
15466 else
15467   echo "configure: failed program was:" >&5
15468   cat conftest.$ac_ext >&5
15469   rm -rf conftest*
15470   eval "ac_cv_func__snprintf=no"
15471 fi
15472 rm -f conftest*
15473 fi
15474
15475 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15476   echo "$ac_t""yes" 1>&6
15477   ac_cv_func_snprintf=yes
15478         cat >> confdefs.h <<\EOF
15479 #define snprintf _snprintf
15480 EOF
15481
15482
15483 else
15484   echo "$ac_t""no" 1>&6
15485 fi
15486
15487
15488 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15489 echo "configure:15490: checking for _vsnprintf" >&5
15490 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15491   echo $ac_n "(cached) $ac_c" 1>&6
15492 else
15493   cat > conftest.$ac_ext <<EOF
15494 #line 15495 "configure"
15495 #include "confdefs.h"
15496 /* System header to define __stub macros and hopefully few prototypes,
15497     which can conflict with char _vsnprintf(); below.  */
15498 #include <assert.h>
15499 /* Override any gcc2 internal prototype to avoid an error.  */
15500 /* We use char because int might match the return type of a gcc2
15501     builtin and then its argument prototype would still apply.  */
15502 char _vsnprintf();
15503 char (*f)();
15504
15505 int main() {
15506
15507 /* The GNU C library defines this for functions which it implements
15508     to always fail with ENOSYS.  Some functions are actually named
15509     something starting with __ and the normal name is an alias.  */
15510 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15511 choke me
15512 #else
15513 f = _vsnprintf;
15514 #endif
15515
15516 ; return 0; }
15517 EOF
15518 if { (eval echo configure:15519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15519   rm -rf conftest*
15520   eval "ac_cv_func__vsnprintf=yes"
15521 else
15522   echo "configure: failed program was:" >&5
15523   cat conftest.$ac_ext >&5
15524   rm -rf conftest*
15525   eval "ac_cv_func__vsnprintf=no"
15526 fi
15527 rm -f conftest*
15528 fi
15529
15530 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15531   echo "$ac_t""yes" 1>&6
15532   ac_cv_func_vsnprintf=yes
15533         cat >> confdefs.h <<\EOF
15534 #define vsnprintf _vsnprintf
15535 EOF
15536
15537
15538 else
15539   echo "$ac_t""no" 1>&6
15540 fi
15541
15542
15543 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15544 echo "configure:15545: checking for vprintf" >&5
15545 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15546   echo $ac_n "(cached) $ac_c" 1>&6
15547 else
15548   cat > conftest.$ac_ext <<EOF
15549 #line 15550 "configure"
15550 #include "confdefs.h"
15551 /* System header to define __stub macros and hopefully few prototypes,
15552     which can conflict with char vprintf(); below.  */
15553 #include <assert.h>
15554 /* Override any gcc2 internal prototype to avoid an error.  */
15555 /* We use char because int might match the return type of a gcc2
15556     builtin and then its argument prototype would still apply.  */
15557 char vprintf();
15558 char (*f)();
15559
15560 int main() {
15561
15562 /* The GNU C library defines this for functions which it implements
15563     to always fail with ENOSYS.  Some functions are actually named
15564     something starting with __ and the normal name is an alias.  */
15565 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15566 choke me
15567 #else
15568 f = vprintf;
15569 #endif
15570
15571 ; return 0; }
15572 EOF
15573 if { (eval echo configure:15574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15574   rm -rf conftest*
15575   eval "ac_cv_func_vprintf=yes"
15576 else
15577   echo "configure: failed program was:" >&5
15578   cat conftest.$ac_ext >&5
15579   rm -rf conftest*
15580   eval "ac_cv_func_vprintf=no"
15581 fi
15582 rm -f conftest*
15583 fi
15584
15585 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15586   echo "$ac_t""yes" 1>&6
15587   cat >> confdefs.h <<\EOF
15588 #define HAVE_VPRINTF 1
15589 EOF
15590
15591 else
15592   echo "$ac_t""no" 1>&6
15593 fi
15594
15595 if test "$ac_cv_func_vprintf" != yes; then
15596 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15597 echo "configure:15598: checking for _doprnt" >&5
15598 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15599   echo $ac_n "(cached) $ac_c" 1>&6
15600 else
15601   cat > conftest.$ac_ext <<EOF
15602 #line 15603 "configure"
15603 #include "confdefs.h"
15604 /* System header to define __stub macros and hopefully few prototypes,
15605     which can conflict with char _doprnt(); below.  */
15606 #include <assert.h>
15607 /* Override any gcc2 internal prototype to avoid an error.  */
15608 /* We use char because int might match the return type of a gcc2
15609     builtin and then its argument prototype would still apply.  */
15610 char _doprnt();
15611 char (*f)();
15612
15613 int main() {
15614
15615 /* The GNU C library defines this for functions which it implements
15616     to always fail with ENOSYS.  Some functions are actually named
15617     something starting with __ and the normal name is an alias.  */
15618 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15619 choke me
15620 #else
15621 f = _doprnt;
15622 #endif
15623
15624 ; return 0; }
15625 EOF
15626 if { (eval echo configure:15627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15627   rm -rf conftest*
15628   eval "ac_cv_func__doprnt=yes"
15629 else
15630   echo "configure: failed program was:" >&5
15631   cat conftest.$ac_ext >&5
15632   rm -rf conftest*
15633   eval "ac_cv_func__doprnt=no"
15634 fi
15635 rm -f conftest*
15636 fi
15637
15638 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15639   echo "$ac_t""yes" 1>&6
15640   cat >> confdefs.h <<\EOF
15641 #define HAVE_DOPRNT 1
15642 EOF
15643
15644 else
15645   echo "$ac_t""no" 1>&6
15646 fi
15647
15648 fi
15649
15650
15651 if test $ac_cv_func_vprintf = yes ; then
15652                 for ac_func in vsnprintf vsprintf
15653 do
15654 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15655 echo "configure:15656: checking for $ac_func" >&5
15656 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15657   echo $ac_n "(cached) $ac_c" 1>&6
15658 else
15659   cat > conftest.$ac_ext <<EOF
15660 #line 15661 "configure"
15661 #include "confdefs.h"
15662 /* System header to define __stub macros and hopefully few prototypes,
15663     which can conflict with char $ac_func(); below.  */
15664 #include <assert.h>
15665 /* Override any gcc2 internal prototype to avoid an error.  */
15666 /* We use char because int might match the return type of a gcc2
15667     builtin and then its argument prototype would still apply.  */
15668 char $ac_func();
15669 char (*f)();
15670
15671 int main() {
15672
15673 /* The GNU C library defines this for functions which it implements
15674     to always fail with ENOSYS.  Some functions are actually named
15675     something starting with __ and the normal name is an alias.  */
15676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15677 choke me
15678 #else
15679 f = $ac_func;
15680 #endif
15681
15682 ; return 0; }
15683 EOF
15684 if { (eval echo configure:15685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15685   rm -rf conftest*
15686   eval "ac_cv_func_$ac_func=yes"
15687 else
15688   echo "configure: failed program was:" >&5
15689   cat conftest.$ac_ext >&5
15690   rm -rf conftest*
15691   eval "ac_cv_func_$ac_func=no"
15692 fi
15693 rm -f conftest*
15694 fi
15695
15696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15697   echo "$ac_t""yes" 1>&6
15698     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15699   cat >> confdefs.h <<EOF
15700 #define $ac_tr_func 1
15701 EOF
15702  
15703 else
15704   echo "$ac_t""no" 1>&6
15705 fi
15706 done
15707
15708 fi
15709
15710 for ac_func in \
15711         bcopy                   \
15712         closesocket             \
15713         chroot                  \
15714         endgrent                \
15715         endpwent                \
15716         flock                   \
15717         getdtablesize   \
15718         getgrgid                \
15719         gethostname             \
15720         getpass                 \
15721         getpassphrase   \
15722         getpwuid                \
15723         getpwnam                \
15724         getspnam                \
15725         gettimeofday    \
15726         initgroups              \
15727         lockf                   \
15728         memcpy                  \
15729         memmove                 \
15730         mkstemp                 \
15731         pipe                    \
15732         read                    \
15733         recv                    \
15734         recvfrom                \
15735         setpwfile               \
15736         setgid                  \
15737         setegid                 \
15738         setsid                  \
15739         setuid                  \
15740         seteuid                 \
15741         sigaction               \
15742         signal                  \
15743         sigset                  \
15744         snprintf                \
15745         strdup                  \
15746         strerror                \
15747         strpbrk                 \
15748         strrchr                 \
15749         strsep                  \
15750         strstr                  \
15751         strtol                  \
15752         strtoul                 \
15753         strspn                  \
15754         sysconf                 \
15755         waitpid                 \
15756         wait4                   \
15757         write                   \
15758         send                    \
15759         sendto                  \
15760
15761 do
15762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15763 echo "configure:15764: checking for $ac_func" >&5
15764 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15765   echo $ac_n "(cached) $ac_c" 1>&6
15766 else
15767   cat > conftest.$ac_ext <<EOF
15768 #line 15769 "configure"
15769 #include "confdefs.h"
15770 /* System header to define __stub macros and hopefully few prototypes,
15771     which can conflict with char $ac_func(); below.  */
15772 #include <assert.h>
15773 /* Override any gcc2 internal prototype to avoid an error.  */
15774 /* We use char because int might match the return type of a gcc2
15775     builtin and then its argument prototype would still apply.  */
15776 char $ac_func();
15777 char (*f)();
15778
15779 int main() {
15780
15781 /* The GNU C library defines this for functions which it implements
15782     to always fail with ENOSYS.  Some functions are actually named
15783     something starting with __ and the normal name is an alias.  */
15784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15785 choke me
15786 #else
15787 f = $ac_func;
15788 #endif
15789
15790 ; return 0; }
15791 EOF
15792 if { (eval echo configure:15793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15793   rm -rf conftest*
15794   eval "ac_cv_func_$ac_func=yes"
15795 else
15796   echo "configure: failed program was:" >&5
15797   cat conftest.$ac_ext >&5
15798   rm -rf conftest*
15799   eval "ac_cv_func_$ac_func=no"
15800 fi
15801 rm -f conftest*
15802 fi
15803
15804 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15805   echo "$ac_t""yes" 1>&6
15806     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15807   cat >> confdefs.h <<EOF
15808 #define $ac_tr_func 1
15809 EOF
15810  
15811 else
15812   echo "$ac_t""no" 1>&6
15813 fi
15814 done
15815
15816
15817 for ac_func in getopt tempnam
15818 do
15819 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15820 echo "configure:15821: checking for $ac_func" >&5
15821 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15822   echo $ac_n "(cached) $ac_c" 1>&6
15823 else
15824   cat > conftest.$ac_ext <<EOF
15825 #line 15826 "configure"
15826 #include "confdefs.h"
15827 /* System header to define __stub macros and hopefully few prototypes,
15828     which can conflict with char $ac_func(); below.  */
15829 #include <assert.h>
15830 /* Override any gcc2 internal prototype to avoid an error.  */
15831 /* We use char because int might match the return type of a gcc2
15832     builtin and then its argument prototype would still apply.  */
15833 char $ac_func();
15834 char (*f)();
15835
15836 int main() {
15837
15838 /* The GNU C library defines this for functions which it implements
15839     to always fail with ENOSYS.  Some functions are actually named
15840     something starting with __ and the normal name is an alias.  */
15841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15842 choke me
15843 #else
15844 f = $ac_func;
15845 #endif
15846
15847 ; return 0; }
15848 EOF
15849 if { (eval echo configure:15850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15850   rm -rf conftest*
15851   eval "ac_cv_func_$ac_func=yes"
15852 else
15853   echo "configure: failed program was:" >&5
15854   cat conftest.$ac_ext >&5
15855   rm -rf conftest*
15856   eval "ac_cv_func_$ac_func=no"
15857 fi
15858 rm -f conftest*
15859 fi
15860
15861 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15862   echo "$ac_t""yes" 1>&6
15863     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15864   cat >> confdefs.h <<EOF
15865 #define $ac_tr_func 1
15866 EOF
15867  
15868 else
15869   echo "$ac_t""no" 1>&6
15870 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15871 fi
15872 done
15873
15874
15875
15876 if test "$ac_cv_func_getopt" != yes; then
15877     LIBSRCS="$LIBSRCS getopt.c"
15878 fi
15879
15880 if test "$ac_cv_func_tempnam" != yes; then
15881     LIBSRCS="$LIBSRCS tempnam.c"
15882 fi
15883
15884 # Check Configuration
15885 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15886 echo "configure:15887: checking declaration of sys_errlist" >&5
15887 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15888   echo $ac_n "(cached) $ac_c" 1>&6
15889 else
15890   
15891         cat > conftest.$ac_ext <<EOF
15892 #line 15893 "configure"
15893 #include "confdefs.h"
15894
15895 #include <stdio.h>
15896 #include <sys/types.h>
15897 #include <errno.h>
15898 #ifdef WINNT
15899 #include <stdlib.h>
15900 #endif 
15901 int main() {
15902 char *c = (char *) *sys_errlist
15903 ; return 0; }
15904 EOF
15905 if { (eval echo configure:15906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15906   rm -rf conftest*
15907   ol_cv_dcl_sys_errlist=yes
15908         ol_cv_have_sys_errlist=yes
15909 else
15910   echo "configure: failed program was:" >&5
15911   cat conftest.$ac_ext >&5
15912   rm -rf conftest*
15913   ol_cv_dcl_sys_errlist=no
15914 fi
15915 rm -f conftest*
15916 fi
15917
15918 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15919 #
15920 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15921 if test $ol_cv_dcl_sys_errlist = no ; then
15922         cat >> confdefs.h <<\EOF
15923 #define DECL_SYS_ERRLIST 1
15924 EOF
15925
15926
15927         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15928 echo "configure:15929: checking existence of sys_errlist" >&5
15929 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15930   echo $ac_n "(cached) $ac_c" 1>&6
15931 else
15932   
15933                 cat > conftest.$ac_ext <<EOF
15934 #line 15935 "configure"
15935 #include "confdefs.h"
15936 #include <errno.h>
15937 int main() {
15938 char *c = (char *) *sys_errlist
15939 ; return 0; }
15940 EOF
15941 if { (eval echo configure:15942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15942   rm -rf conftest*
15943   ol_cv_have_sys_errlist=yes
15944 else
15945   echo "configure: failed program was:" >&5
15946   cat conftest.$ac_ext >&5
15947   rm -rf conftest*
15948   ol_cv_have_sys_errlist=no
15949 fi
15950 rm -f conftest*
15951 fi
15952
15953 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15954 fi
15955 if test $ol_cv_have_sys_errlist = yes ; then
15956         cat >> confdefs.h <<\EOF
15957 #define HAVE_SYS_ERRLIST 1
15958 EOF
15959
15960 fi
15961
15962
15963
15964 if test "$ol_enable_debug" != no ; then
15965         cat >> confdefs.h <<\EOF
15966 #define LDAP_DEBUG 1
15967 EOF
15968
15969 fi
15970 if test "$ol_enable_syslog" = yes ; then
15971         cat >> confdefs.h <<\EOF
15972 #define LDAP_SYSLOG 1
15973 EOF
15974
15975 fi
15976 if test "$ol_enable_cache" = no ; then
15977         cat >> confdefs.h <<\EOF
15978 #define LDAP_NOCACHE 1
15979 EOF
15980
15981 fi
15982 if test "$ol_link_kbind" != no ; then
15983         cat >> confdefs.h <<\EOF
15984 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15985 EOF
15986
15987 fi
15988 if test "$ol_enable_proctitle" != no ; then
15989         cat >> confdefs.h <<\EOF
15990 #define LDAP_PROCTITLE 1
15991 EOF
15992
15993 fi
15994 if test "$ol_enable_referrals" != no ; then
15995         cat >> confdefs.h <<\EOF
15996 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15997 EOF
15998
15999 fi
16000 if test "$ol_enable_local" != no; then
16001         cat >> confdefs.h <<\EOF
16002 #define LDAP_PF_LOCAL 1
16003 EOF
16004
16005 fi
16006 if test "$ol_link_ipv6" != no; then
16007         cat >> confdefs.h <<\EOF
16008 #define LDAP_PF_INET6 1
16009 EOF
16010
16011 fi
16012 if test "$ol_enable_cleartext" != no ; then
16013         cat >> confdefs.h <<\EOF
16014 #define SLAPD_CLEARTEXT 1
16015 EOF
16016
16017 fi
16018 if test "$ol_enable_crypt" != no ; then
16019         cat >> confdefs.h <<\EOF
16020 #define SLAPD_CRYPT 1
16021 EOF
16022
16023 fi
16024 if test "$ol_link_kpasswd" != no ; then
16025         cat >> confdefs.h <<\EOF
16026 #define SLAPD_KPASSWD 1
16027 EOF
16028
16029 fi
16030 if test "$ol_link_spasswd" != no ; then
16031         cat >> confdefs.h <<\EOF
16032 #define SLAPD_SPASSWD 1
16033 EOF
16034
16035 fi
16036 if test "$ol_enable_phonetic" != no ; then
16037         cat >> confdefs.h <<\EOF
16038 #define SLAPD_PHONETIC 1
16039 EOF
16040
16041 fi
16042 if test "$ol_enable_rlookups" != no ; then
16043         cat >> confdefs.h <<\EOF
16044 #define SLAPD_RLOOKUPS 1
16045 EOF
16046
16047 fi
16048 if test "$ol_enable_aci" != no ; then
16049         cat >> confdefs.h <<\EOF
16050 #define SLAPD_ACI_ENABLED 1
16051 EOF
16052
16053 fi
16054
16055 if test "$ol_link_modules" != no ; then
16056         cat >> confdefs.h <<\EOF
16057 #define SLAPD_MODULES 1
16058 EOF
16059
16060         BUILD_SLAPD=yes
16061         SLAPD_MODULES_LDFLAGS="-dlopen self"
16062 fi
16063
16064 if test "$ol_enable_bdb" != no ; then
16065         cat >> confdefs.h <<\EOF
16066 #define SLAPD_BDB 1
16067 EOF
16068
16069         BUILD_SLAPD=yes
16070         BUILD_BDB=yes
16071         if test "$ol_with_bdb_module" != static ; then
16072                 cat >> confdefs.h <<\EOF
16073 #define SLAPD_BDB_DYNAMIC 1
16074 EOF
16075
16076                 BUILD_BDB=mod
16077                 BUILD_BDB_DYNAMIC=shared
16078                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16079         fi
16080 fi
16081
16082 if test "$ol_link_dnssrv" != no ; then
16083         cat >> confdefs.h <<\EOF
16084 #define SLAPD_DNSSRV 1
16085 EOF
16086
16087         BUILD_SLAPD=yes
16088         BUILD_DNSSRV=yes
16089         if test "$ol_with_dnssrv_module" != static ; then
16090                 cat >> confdefs.h <<\EOF
16091 #define SLAPD_DNSSRV_DYNAMIC 1
16092 EOF
16093
16094                 BUILD_DNSSRV=mod
16095                 BUILD_DNSSRV_DYNAMIC=shared
16096                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16097         fi
16098 fi
16099
16100 if test "$ol_enable_ldap" != no ; then
16101         cat >> confdefs.h <<\EOF
16102 #define SLAPD_LDAP 1
16103 EOF
16104
16105         BUILD_SLAPD=yes
16106         BUILD_LDAP=yes
16107         if test "$ol_with_ldap_module" != static ; then
16108                 cat >> confdefs.h <<\EOF
16109 #define SLAPD_LDAP_DYNAMIC 1
16110 EOF
16111
16112                 BUILD_LDAP=mod
16113                 BUILD_LDAP_DYNAMIC=shared
16114                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16115         fi
16116 fi
16117
16118 if test "$ol_link_ldbm" != no ; then
16119         cat >> confdefs.h <<\EOF
16120 #define SLAPD_LDBM 1
16121 EOF
16122
16123         BUILD_SLAPD=yes
16124         BUILD_LDBM=yes
16125         if test "$ol_with_ldbm_module" != static ; then
16126                 cat >> confdefs.h <<\EOF
16127 #define SLAPD_LDBM_DYNAMIC 1
16128 EOF
16129
16130                 BUILD_LDBM=mod
16131                 BUILD_LDBM_DYNAMIC=shared
16132                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16133         fi
16134 fi
16135
16136 if test "$ol_enable_passwd" != no ; then
16137         cat >> confdefs.h <<\EOF
16138 #define SLAPD_PASSWD 1
16139 EOF
16140
16141         BUILD_SLAPD=yes
16142         BUILD_PASSWD=yes
16143         if test "$ol_with_passwd_module" != static ; then
16144                 cat >> confdefs.h <<\EOF
16145 #define SLAPD_PASSWD_DYNAMIC 1
16146 EOF
16147
16148                 BUILD_PASSWD=mod
16149                 BUILD_PASSWD_DYNAMIC=shared
16150                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16151         fi
16152 fi
16153
16154 if test "$ol_link_perl" != no ; then
16155         cat >> confdefs.h <<\EOF
16156 #define SLAPD_PERL 1
16157 EOF
16158
16159         BUILD_SLAPD=yes
16160         BUILD_PERL=yes
16161         if test "$ol_with_perl_module" != static ; then
16162                 cat >> confdefs.h <<\EOF
16163 #define SLAPD_PERL_DYNAMIC 1
16164 EOF
16165
16166                 BUILD_PERL=mod
16167                 BUILD_PERL_DYNAMIC=shared
16168                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16169         fi
16170 fi
16171
16172 if test "$ol_enable_shell" != no ; then
16173         cat >> confdefs.h <<\EOF
16174 #define SLAPD_SHELL 1
16175 EOF
16176
16177         BUILD_SLAPD=yes
16178         BUILD_SHELL=yes
16179         if test "$ol_with_shell_module" != static ; then
16180                 cat >> confdefs.h <<\EOF
16181 #define SLAPD_SHELL_DYNAMIC 1
16182 EOF
16183
16184                 BUILD_SHELL=mod
16185                 BUILD_SHELL_DYNAMIC=shared
16186                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16187         fi
16188 fi
16189
16190 if test "$ol_enable_tcl" != no ; then
16191         cat >> confdefs.h <<\EOF
16192 #define SLAPD_TCL 1
16193 EOF
16194
16195         BUILD_SLAPD=yes
16196         BUILD_TCL=yes
16197         if test "$ol_with_tcl_module" != static; then
16198                 cat >> confdefs.h <<\EOF
16199 #define SLAPD_TCL_DYNAMIC 1
16200 EOF
16201
16202                 BUILD_TCL=mod
16203                 BUILD_TCL_DYNAMIC=shared
16204                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16205         fi
16206 fi
16207
16208 if test "$ol_link_sql" != no ; then
16209         cat >> confdefs.h <<\EOF
16210 #define SLAPD_SQL 1
16211 EOF
16212
16213         BUILD_SLAPD=yes
16214         BUILD_SQL=yes
16215         if test "$ol_with_sql_module" != static; then
16216                 cat >> confdefs.h <<\EOF
16217 #define SLAPD_SQL_DYNAMIC 1
16218 EOF
16219
16220                 BUILD_SQL=mod
16221                 BUILD_SQL_DYNAMIC=shared
16222                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16223         fi
16224 fi
16225
16226 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16227         $BUILD_SLAPD = yes ; then
16228         BUILD_SLURPD=yes
16229 fi
16230
16231
16232 if test "$LINK_BINS_DYNAMIC" = yes; then
16233     LIB_LINKAGE=DYN
16234     LT_LIB_LINKAGE=shared
16235 else
16236     LIB_LINKAGE=STAT
16237     LT_LIB_LINKAGE=static
16238 fi
16239
16240 if test "$ac_cv_mingw32" = yes ; then
16241     PLAT=NT
16242     DYN_EXT=dll
16243 else
16244     PLAT=UNIX
16245     DYN_EXT=so
16246 fi
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256   
16257   
16258   
16259   
16260   
16261   
16262   
16263   
16264   
16265   
16266   
16267   
16268   
16269   
16270   
16271   
16272   
16273   
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309 trap '' 1 2 15
16310
16311 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16312
16313 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16314 # Let make expand exec_prefix.
16315 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16316
16317 # Any assignment to VPATH causes Sun make to only execute
16318 # the first set of double-colon rules, so remove it if not needed.
16319 # If there is a colon in the path, we need to keep it.
16320 if test "x$srcdir" = x.; then
16321   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16322 fi
16323
16324 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16325
16326 DEFS=-DHAVE_CONFIG_H
16327
16328 # Without the "./", some shells look in PATH for config.status.
16329 : ${CONFIG_STATUS=./config.status}
16330
16331 echo creating $CONFIG_STATUS
16332 rm -f $CONFIG_STATUS
16333 cat > $CONFIG_STATUS <<EOF
16334 #! /bin/sh
16335 # Generated automatically by configure.
16336 # Run this file to recreate the current configuration.
16337 # This directory was configured as follows,
16338 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16339 #
16340 # $0 $ac_configure_args
16341 #
16342 # Compiler output produced by configure, useful for debugging
16343 # configure, is in ./config.log if it exists.
16344
16345 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16346 for ac_option
16347 do
16348   case "\$ac_option" in
16349   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16350     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16351     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16352   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16353     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16354     exit 0 ;;
16355   -help | --help | --hel | --he | --h)
16356     echo "\$ac_cs_usage"; exit 0 ;;
16357   *) echo "\$ac_cs_usage"; exit 1 ;;
16358   esac
16359 done
16360
16361 ac_given_srcdir=$srcdir
16362 ac_given_INSTALL="$INSTALL"
16363
16364 trap 'rm -fr `echo "\
16365 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16366 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16367 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16368 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16369 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16370 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16371 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16372 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16373 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16374 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16375 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16376 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16377 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16378 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16379 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16380 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16381 include/Makefile:build/top.mk:include/Makefile.in \
16382 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16383 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16384 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16385 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16386 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16387 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16388 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16389 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16390 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16391 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16392 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16393 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16394 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16395 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16396 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16397 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16398 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16399 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16400 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16401 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16402 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16403 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16404 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16405 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16406 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16407 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16408 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16409 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16410  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16411 EOF
16412 cat >> $CONFIG_STATUS <<EOF
16413
16414 # Protect against being on the right side of a sed subst in config.status.
16415 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16416  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16417 $ac_vpsub
16418 $extrasub
16419 s%@SHELL@%$SHELL%g
16420 s%@CFLAGS@%$CFLAGS%g
16421 s%@CPPFLAGS@%$CPPFLAGS%g
16422 s%@CXXFLAGS@%$CXXFLAGS%g
16423 s%@FFLAGS@%$FFLAGS%g
16424 s%@DEFS@%$DEFS%g
16425 s%@LDFLAGS@%$LDFLAGS%g
16426 s%@LIBS@%$LIBS%g
16427 s%@exec_prefix@%$exec_prefix%g
16428 s%@prefix@%$prefix%g
16429 s%@program_transform_name@%$program_transform_name%g
16430 s%@bindir@%$bindir%g
16431 s%@sbindir@%$sbindir%g
16432 s%@libexecdir@%$libexecdir%g
16433 s%@datadir@%$datadir%g
16434 s%@sysconfdir@%$sysconfdir%g
16435 s%@sharedstatedir@%$sharedstatedir%g
16436 s%@localstatedir@%$localstatedir%g
16437 s%@libdir@%$libdir%g
16438 s%@includedir@%$includedir%g
16439 s%@oldincludedir@%$oldincludedir%g
16440 s%@infodir@%$infodir%g
16441 s%@mandir@%$mandir%g
16442 s%@host@%$host%g
16443 s%@host_alias@%$host_alias%g
16444 s%@host_cpu@%$host_cpu%g
16445 s%@host_vendor@%$host_vendor%g
16446 s%@host_os@%$host_os%g
16447 s%@target@%$target%g
16448 s%@target_alias@%$target_alias%g
16449 s%@target_cpu@%$target_cpu%g
16450 s%@target_vendor@%$target_vendor%g
16451 s%@target_os@%$target_os%g
16452 s%@build@%$build%g
16453 s%@build_alias@%$build_alias%g
16454 s%@build_cpu@%$build_cpu%g
16455 s%@build_vendor@%$build_vendor%g
16456 s%@build_os@%$build_os%g
16457 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16458 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16459 s%@INSTALL_DATA@%$INSTALL_DATA%g
16460 s%@PACKAGE@%$PACKAGE%g
16461 s%@VERSION@%$VERSION%g
16462 s%@ACLOCAL@%$ACLOCAL%g
16463 s%@AUTOCONF@%$AUTOCONF%g
16464 s%@AUTOMAKE@%$AUTOMAKE%g
16465 s%@AUTOHEADER@%$AUTOHEADER%g
16466 s%@MAKEINFO@%$MAKEINFO%g
16467 s%@install_sh@%$install_sh%g
16468 s%@AMTAR@%$AMTAR%g
16469 s%@AWK@%$AWK%g
16470 s%@AMTARFLAGS@%$AMTARFLAGS%g
16471 s%@SET_MAKE@%$SET_MAKE%g
16472 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16473 s%@top_builddir@%$top_builddir%g
16474 s%@ldap_subdir@%$ldap_subdir%g
16475 s%@CC@%$CC%g
16476 s%@RANLIB@%$RANLIB%g
16477 s%@LN_S@%$LN_S%g
16478 s%@DLLTOOL@%$DLLTOOL%g
16479 s%@AS@%$AS%g
16480 s%@OBJDUMP@%$OBJDUMP%g
16481 s%@LIBTOOL@%$LIBTOOL%g
16482 s%@LN_H@%$LN_H%g
16483 s%@SENDMAIL@%$SENDMAIL%g
16484 s%@EDITOR@%$EDITOR%g
16485 s%@FINGER@%$FINGER%g
16486 s%@PERLBIN@%$PERLBIN%g
16487 s%@CPP@%$CPP%g
16488 s%@EXEEXT@%$EXEEXT%g
16489 s%@OBJEXT@%$OBJEXT%g
16490 s%@OL_MKDEP@%$OL_MKDEP%g
16491 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16492 s%@LIBOBJS@%$LIBOBJS%g
16493 s%@LIBSRCS@%$LIBSRCS%g
16494 s%@PLAT@%$PLAT%g
16495 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16496 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16497 s%@DYN_EXT@%$DYN_EXT%g
16498 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16499 s%@BUILD_BDB@%$BUILD_BDB%g
16500 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16501 s%@BUILD_LDAP@%$BUILD_LDAP%g
16502 s%@BUILD_LDBM@%$BUILD_LDBM%g
16503 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16504 s%@BUILD_PERL@%$BUILD_PERL%g
16505 s%@BUILD_SHELL@%$BUILD_SHELL%g
16506 s%@BUILD_SQL@%$BUILD_SQL%g
16507 s%@BUILD_TCL@%$BUILD_TCL%g
16508 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16509 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16510 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16511 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16512 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16513 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16514 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16515 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16516 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16517 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16518 s%@LDAP_LIBS@%$LDAP_LIBS%g
16519 s%@LDIF_LIBS@%$LDIF_LIBS%g
16520 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16521 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16522 s%@LDBM_LIBS@%$LDBM_LIBS%g
16523 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16524 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16525 s%@WRAP_LIBS@%$WRAP_LIBS%g
16526 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16527 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16528 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16529 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16530 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16531 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16532 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16533 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16534 s%@KRB4_LIBS@%$KRB4_LIBS%g
16535 s%@KRB5_LIBS@%$KRB5_LIBS%g
16536 s%@READLINE_LIBS@%$READLINE_LIBS%g
16537 s%@SASL_LIBS@%$SASL_LIBS%g
16538 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16539 s%@TLS_LIBS@%$TLS_LIBS%g
16540 s%@MODULES_LIBS@%$MODULES_LIBS%g
16541 s%@AUTH_LIBS@%$AUTH_LIBS%g
16542 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16543 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16544 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16545
16546 CEOF
16547 EOF
16548
16549 cat >> $CONFIG_STATUS <<\EOF
16550
16551 # Split the substitutions into bite-sized pieces for seds with
16552 # small command number limits, like on Digital OSF/1 and HP-UX.
16553 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16554 ac_file=1 # Number of current file.
16555 ac_beg=1 # First line for current file.
16556 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16557 ac_more_lines=:
16558 ac_sed_cmds=""
16559 while $ac_more_lines; do
16560   if test $ac_beg -gt 1; then
16561     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16562   else
16563     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16564   fi
16565   if test ! -s conftest.s$ac_file; then
16566     ac_more_lines=false
16567     rm -f conftest.s$ac_file
16568   else
16569     if test -z "$ac_sed_cmds"; then
16570       ac_sed_cmds="sed -f conftest.s$ac_file"
16571     else
16572       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16573     fi
16574     ac_file=`expr $ac_file + 1`
16575     ac_beg=$ac_end
16576     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16577   fi
16578 done
16579 if test -z "$ac_sed_cmds"; then
16580   ac_sed_cmds=cat
16581 fi
16582 EOF
16583
16584 cat >> $CONFIG_STATUS <<EOF
16585
16586 CONFIG_FILES=\${CONFIG_FILES-"\
16587 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16588 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16589 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16590 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16591 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16592 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16593 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16594 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16595 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16596 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16597 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16598 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16599 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16600 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16601 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16602 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16603 include/Makefile:build/top.mk:include/Makefile.in \
16604 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16605 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16606 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16607 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16608 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16609 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16610 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16611 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16612 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16613 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16614 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16615 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16616 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16617 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16618 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16619 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16620 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16621 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16622 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16623 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16624 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16625 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16626 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16627 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16628 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16629 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16630 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16631 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16632 "}
16633 EOF
16634 cat >> $CONFIG_STATUS <<\EOF
16635 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16636   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16637   case "$ac_file" in
16638   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16639        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16640   *) ac_file_in="${ac_file}.in" ;;
16641   esac
16642
16643   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16644
16645   # Remove last slash and all that follows it.  Not all systems have dirname.
16646   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16647   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16648     # The file is in a subdirectory.
16649     test ! -d "$ac_dir" && mkdir "$ac_dir"
16650     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16651     # A "../" for each directory in $ac_dir_suffix.
16652     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16653   else
16654     ac_dir_suffix= ac_dots=
16655   fi
16656
16657   case "$ac_given_srcdir" in
16658   .)  srcdir=.
16659       if test -z "$ac_dots"; then top_srcdir=.
16660       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16661   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16662   *) # Relative path.
16663     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16664     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16665   esac
16666
16667   case "$ac_given_INSTALL" in
16668   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16669   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16670   esac
16671
16672   echo creating "$ac_file"
16673   rm -f "$ac_file"
16674   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16675   case "$ac_file" in
16676   *[Mm]akefile*) ac_comsub="1i\\
16677 # $configure_input" ;;
16678   *) ac_comsub= ;;
16679   esac
16680
16681   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16682   sed -e "$ac_comsub
16683 s%@configure_input@%$configure_input%g
16684 s%@srcdir@%$srcdir%g
16685 s%@top_srcdir@%$top_srcdir%g
16686 s%@INSTALL@%$INSTALL%g
16687 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16688 fi; done
16689 rm -f conftest.s*
16690
16691 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16692 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16693 #
16694 # ac_d sets the value in "#define NAME VALUE" lines.
16695 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16696 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16697 ac_dC='\3'
16698 ac_dD='%g'
16699 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16700 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16701 ac_uB='\([      ]\)%\1#\2define\3'
16702 ac_uC=' '
16703 ac_uD='\4%g'
16704 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16705 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16706 ac_eB='$%\1#\2define\3'
16707 ac_eC=' '
16708 ac_eD='%g'
16709
16710 if test "${CONFIG_HEADERS+set}" != set; then
16711 EOF
16712 cat >> $CONFIG_STATUS <<EOF
16713   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16714 EOF
16715 cat >> $CONFIG_STATUS <<\EOF
16716 fi
16717 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16718   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16719   case "$ac_file" in
16720   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16721        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16722   *) ac_file_in="${ac_file}.in" ;;
16723   esac
16724
16725   echo creating $ac_file
16726
16727   rm -f conftest.frag conftest.in conftest.out
16728   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16729   cat $ac_file_inputs > conftest.in
16730
16731 EOF
16732
16733 # Transform confdefs.h into a sed script conftest.vals that substitutes
16734 # the proper values into config.h.in to produce config.h.  And first:
16735 # Protect against being on the right side of a sed subst in config.status.
16736 # Protect against being in an unquoted here document in config.status.
16737 rm -f conftest.vals
16738 cat > conftest.hdr <<\EOF
16739 s/[\\&%]/\\&/g
16740 s%[\\$`]%\\&%g
16741 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16742 s%ac_d%ac_u%gp
16743 s%ac_u%ac_e%gp
16744 EOF
16745 sed -n -f conftest.hdr confdefs.h > conftest.vals
16746 rm -f conftest.hdr
16747
16748 # This sed command replaces #undef with comments.  This is necessary, for
16749 # example, in the case of _POSIX_SOURCE, which is predefined and required
16750 # on some systems where configure will not decide to define it.
16751 cat >> conftest.vals <<\EOF
16752 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16753 EOF
16754
16755 # Break up conftest.vals because some shells have a limit on
16756 # the size of here documents, and old seds have small limits too.
16757
16758 rm -f conftest.tail
16759 while :
16760 do
16761   ac_lines=`grep -c . conftest.vals`
16762   # grep -c gives empty output for an empty file on some AIX systems.
16763   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16764   # Write a limited-size here document to conftest.frag.
16765   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16766   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16767   echo 'CEOF
16768   sed -f conftest.frag conftest.in > conftest.out
16769   rm -f conftest.in
16770   mv conftest.out conftest.in
16771 ' >> $CONFIG_STATUS
16772   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16773   rm -f conftest.vals
16774   mv conftest.tail conftest.vals
16775 done
16776 rm -f conftest.vals
16777
16778 cat >> $CONFIG_STATUS <<\EOF
16779   rm -f conftest.frag conftest.h
16780   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16781   cat conftest.in >> conftest.h
16782   rm -f conftest.in
16783   if cmp -s $ac_file conftest.h 2>/dev/null; then
16784     echo "$ac_file is unchanged"
16785     rm -f conftest.h
16786   else
16787     # Remove last slash and all that follows it.  Not all systems have dirname.
16788       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16789       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16790       # The file is in a subdirectory.
16791       test ! -d "$ac_dir" && mkdir "$ac_dir"
16792     fi
16793     rm -f $ac_file
16794     mv conftest.h $ac_file
16795   fi
16796 fi; done
16797
16798 EOF
16799 cat >> $CONFIG_STATUS <<EOF
16800
16801 EOF
16802 cat >> $CONFIG_STATUS <<\EOF
16803
16804 date > stamp-h
16805 echo Please \"make depend\" to build dependencies
16806
16807 exit 0
16808 EOF
16809 chmod +x $CONFIG_STATUS
16810 rm -fr confdefs* $ac_clean_files
16811 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16812