]> git.sur5r.net Git - openldap/blob - configure
Fix UTF-8 bugs (ITS#860)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.223.2.19 2000/10/04 15:21:29 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-multimaster  enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-rlookups     enable reverse lookups (auto)"
81 ac_help="$ac_help
82     --enable-aci          enable per-object ACIs (no)"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support (no)"
85 ac_help="$ac_help
86     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
87 ac_help="$ac_help
88     --enable-dnssrv       enable dnssrv backend (no)"
89 ac_help="$ac_help
90     --with-dnssrv-module  module type (static)"
91 ac_help="$ac_help
92     --enable-ldap         enable ldap backend (no)"
93 ac_help="$ac_help
94     --with-ldap-module    module type (static)"
95 ac_help="$ac_help
96     --enable-ldbm         enable ldbm backend (yes)"
97 ac_help="$ac_help
98     --with-ldbm-api       with LDBM API (auto)"
99 ac_help="$ac_help
100     --with-ldbm-module    module type (static)"
101 ac_help="$ac_help
102     --with-ldbm-type      use LDBM type (auto)"
103 ac_help="$ac_help
104     --enable-passwd       enable passwd backend (no)"
105 ac_help="$ac_help
106     --with-passwd-module  module type (static)"
107 ac_help="$ac_help
108     --enable-shell        enable shell backend (no)"
109 ac_help="$ac_help
110     --with-shell-module   module type (static)"
111 ac_help="$ac_help
112     --enable-sql          enable sql backend (no)"
113 ac_help="$ac_help
114     --with-sql-module     module type (static)"
115 ac_help="$ac_help
116 SLURPD (Replication Daemon) Options:"
117 ac_help="$ac_help
118   --enable-slurpd         enable building slurpd (auto)"
119 ac_help="$ac_help
120 Library Generation & Linking Options"
121 ac_help="$ac_help
122   --enable-static[=PKGS]  build static libraries [default=yes]"
123 ac_help="$ac_help
124   --enable-shared[=PKGS]  build shared libraries [default=yes]"
125 ac_help="$ac_help
126   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
127 ac_help="$ac_help
128   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
129 ac_help="$ac_help
130   --disable-libtool-lock  avoid locking (might break parallel builds)"
131
132 # Initialize some variables set by options.
133 # The variables have the same names as the options, with
134 # dashes changed to underlines.
135 build=NONE
136 cache_file=./config.cache
137 exec_prefix=NONE
138 host=NONE
139 no_create=
140 nonopt=NONE
141 no_recursion=
142 prefix=NONE
143 program_prefix=NONE
144 program_suffix=NONE
145 program_transform_name=s,x,x,
146 silent=
147 site=
148 srcdir=
149 target=NONE
150 verbose=
151 x_includes=NONE
152 x_libraries=NONE
153 bindir='${exec_prefix}/bin'
154 sbindir='${exec_prefix}/sbin'
155 libexecdir='${exec_prefix}/libexec'
156 datadir='${prefix}/share'
157 sysconfdir='${prefix}/etc'
158 sharedstatedir='${prefix}/com'
159 localstatedir='${prefix}/var'
160 libdir='${exec_prefix}/lib'
161 includedir='${prefix}/include'
162 oldincludedir='/usr/include'
163 infodir='${prefix}/info'
164 mandir='${prefix}/man'
165
166 # Initialize some other variables.
167 subdirs=
168 MFLAGS= MAKEFLAGS=
169 SHELL=${CONFIG_SHELL-/bin/sh}
170 # Maximum number of lines to put in a shell here document.
171 ac_max_here_lines=12
172
173 ac_prev=
174 for ac_option
175 do
176
177   # If the previous option needs an argument, assign it.
178   if test -n "$ac_prev"; then
179     eval "$ac_prev=\$ac_option"
180     ac_prev=
181     continue
182   fi
183
184   case "$ac_option" in
185   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
186   *) ac_optarg= ;;
187   esac
188
189   # Accept the important Cygnus configure options, so we can diagnose typos.
190
191   case "$ac_option" in
192
193   -bindir | --bindir | --bindi | --bind | --bin | --bi)
194     ac_prev=bindir ;;
195   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
196     bindir="$ac_optarg" ;;
197
198   -build | --build | --buil | --bui | --bu)
199     ac_prev=build ;;
200   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
201     build="$ac_optarg" ;;
202
203   -cache-file | --cache-file | --cache-fil | --cache-fi \
204   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
205     ac_prev=cache_file ;;
206   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
207   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
208     cache_file="$ac_optarg" ;;
209
210   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
211     ac_prev=datadir ;;
212   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
213   | --da=*)
214     datadir="$ac_optarg" ;;
215
216   -disable-* | --disable-*)
217     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
218     # Reject names that are not valid shell variable names.
219     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
220       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
221     fi
222     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
223     eval "enable_${ac_feature}=no" ;;
224
225   -enable-* | --enable-*)
226     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
227     # Reject names that are not valid shell variable names.
228     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
229       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
230     fi
231     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
232     case "$ac_option" in
233       *=*) ;;
234       *) ac_optarg=yes ;;
235     esac
236     eval "enable_${ac_feature}='$ac_optarg'" ;;
237
238   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
239   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
240   | --exec | --exe | --ex)
241     ac_prev=exec_prefix ;;
242   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
243   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
244   | --exec=* | --exe=* | --ex=*)
245     exec_prefix="$ac_optarg" ;;
246
247   -gas | --gas | --ga | --g)
248     # Obsolete; use --with-gas.
249     with_gas=yes ;;
250
251   -help | --help | --hel | --he)
252     # Omit some internal or obsolete options to make the list less imposing.
253     # This message is too long to be a string in the A/UX 3.1 sh.
254     cat << EOF
255 Usage: configure [options] [host]
256 Options: [defaults in brackets after descriptions]
257 Configuration:
258   --cache-file=FILE       cache test results in FILE
259   --help                  print this message
260   --no-create             do not create output files
261   --quiet, --silent       do not print \`checking...' messages
262   --version               print the version of autoconf that created configure
263 Directory and file names:
264   --prefix=PREFIX         install architecture-independent files in PREFIX
265                           [$ac_default_prefix]
266   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
267                           [same as prefix]
268   --bindir=DIR            user executables in DIR [EPREFIX/bin]
269   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
270   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
271   --datadir=DIR           read-only architecture-independent data in DIR
272                           [PREFIX/share]
273   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
274   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
275                           [PREFIX/com]
276   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
277   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
278   --includedir=DIR        C header files in DIR [PREFIX/include]
279   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
280   --infodir=DIR           info documentation in DIR [PREFIX/info]
281   --mandir=DIR            man documentation in DIR [PREFIX/man]
282   --srcdir=DIR            find the sources in DIR [configure dir or ..]
283   --program-prefix=PREFIX prepend PREFIX to installed program names
284   --program-suffix=SUFFIX append SUFFIX to installed program names
285   --program-transform-name=PROGRAM
286                           run sed PROGRAM on installed program names
287 EOF
288     cat << EOF
289 Host type:
290   --build=BUILD           configure for building on BUILD [BUILD=HOST]
291   --host=HOST             configure for HOST [guessed]
292   --target=TARGET         configure for TARGET [TARGET=HOST]
293 Features and packages:
294   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
295   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
296   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
297   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
298   --x-includes=DIR        X include files are in DIR
299   --x-libraries=DIR       X library files are in DIR
300 EOF
301     if test -n "$ac_help"; then
302       echo "--enable and --with options recognized:$ac_help"
303     fi
304     exit 0 ;;
305
306   -host | --host | --hos | --ho)
307     ac_prev=host ;;
308   -host=* | --host=* | --hos=* | --ho=*)
309     host="$ac_optarg" ;;
310
311   -includedir | --includedir | --includedi | --included | --include \
312   | --includ | --inclu | --incl | --inc)
313     ac_prev=includedir ;;
314   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
315   | --includ=* | --inclu=* | --incl=* | --inc=*)
316     includedir="$ac_optarg" ;;
317
318   -infodir | --infodir | --infodi | --infod | --info | --inf)
319     ac_prev=infodir ;;
320   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
321     infodir="$ac_optarg" ;;
322
323   -libdir | --libdir | --libdi | --libd)
324     ac_prev=libdir ;;
325   -libdir=* | --libdir=* | --libdi=* | --libd=*)
326     libdir="$ac_optarg" ;;
327
328   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
329   | --libexe | --libex | --libe)
330     ac_prev=libexecdir ;;
331   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
332   | --libexe=* | --libex=* | --libe=*)
333     libexecdir="$ac_optarg" ;;
334
335   -localstatedir | --localstatedir | --localstatedi | --localstated \
336   | --localstate | --localstat | --localsta | --localst \
337   | --locals | --local | --loca | --loc | --lo)
338     ac_prev=localstatedir ;;
339   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
340   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
341   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
342     localstatedir="$ac_optarg" ;;
343
344   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
345     ac_prev=mandir ;;
346   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
347     mandir="$ac_optarg" ;;
348
349   -nfp | --nfp | --nf)
350     # Obsolete; use --without-fp.
351     with_fp=no ;;
352
353   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
354   | --no-cr | --no-c)
355     no_create=yes ;;
356
357   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
358   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
359     no_recursion=yes ;;
360
361   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
362   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
363   | --oldin | --oldi | --old | --ol | --o)
364     ac_prev=oldincludedir ;;
365   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
366   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
367   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
368     oldincludedir="$ac_optarg" ;;
369
370   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
371     ac_prev=prefix ;;
372   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
373     prefix="$ac_optarg" ;;
374
375   -program-prefix | --program-prefix | --program-prefi | --program-pref \
376   | --program-pre | --program-pr | --program-p)
377     ac_prev=program_prefix ;;
378   -program-prefix=* | --program-prefix=* | --program-prefi=* \
379   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
380     program_prefix="$ac_optarg" ;;
381
382   -program-suffix | --program-suffix | --program-suffi | --program-suff \
383   | --program-suf | --program-su | --program-s)
384     ac_prev=program_suffix ;;
385   -program-suffix=* | --program-suffix=* | --program-suffi=* \
386   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
387     program_suffix="$ac_optarg" ;;
388
389   -program-transform-name | --program-transform-name \
390   | --program-transform-nam | --program-transform-na \
391   | --program-transform-n | --program-transform- \
392   | --program-transform | --program-transfor \
393   | --program-transfo | --program-transf \
394   | --program-trans | --program-tran \
395   | --progr-tra | --program-tr | --program-t)
396     ac_prev=program_transform_name ;;
397   -program-transform-name=* | --program-transform-name=* \
398   | --program-transform-nam=* | --program-transform-na=* \
399   | --program-transform-n=* | --program-transform-=* \
400   | --program-transform=* | --program-transfor=* \
401   | --program-transfo=* | --program-transf=* \
402   | --program-trans=* | --program-tran=* \
403   | --progr-tra=* | --program-tr=* | --program-t=*)
404     program_transform_name="$ac_optarg" ;;
405
406   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
407   | -silent | --silent | --silen | --sile | --sil)
408     silent=yes ;;
409
410   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
411     ac_prev=sbindir ;;
412   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
413   | --sbi=* | --sb=*)
414     sbindir="$ac_optarg" ;;
415
416   -sharedstatedir | --sharedstatedir | --sharedstatedi \
417   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
418   | --sharedst | --shareds | --shared | --share | --shar \
419   | --sha | --sh)
420     ac_prev=sharedstatedir ;;
421   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
422   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
423   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
424   | --sha=* | --sh=*)
425     sharedstatedir="$ac_optarg" ;;
426
427   -site | --site | --sit)
428     ac_prev=site ;;
429   -site=* | --site=* | --sit=*)
430     site="$ac_optarg" ;;
431
432   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
433     ac_prev=srcdir ;;
434   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
435     srcdir="$ac_optarg" ;;
436
437   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
438   | --syscon | --sysco | --sysc | --sys | --sy)
439     ac_prev=sysconfdir ;;
440   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
441   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
442     sysconfdir="$ac_optarg" ;;
443
444   -target | --target | --targe | --targ | --tar | --ta | --t)
445     ac_prev=target ;;
446   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
447     target="$ac_optarg" ;;
448
449   -v | -verbose | --verbose | --verbos | --verbo | --verb)
450     verbose=yes ;;
451
452   -version | --version | --versio | --versi | --vers)
453     echo "configure generated by autoconf version 2.13.1"
454     exit 0 ;;
455
456   -with-* | --with-*)
457     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
458     # Reject names that are not valid shell variable names.
459     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
460       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
461     fi
462     ac_package=`echo $ac_package| sed 's/-/_/g'`
463     case "$ac_option" in
464       *=*) ;;
465       *) ac_optarg=yes ;;
466     esac
467     eval "with_${ac_package}='$ac_optarg'" ;;
468
469   -without-* | --without-*)
470     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
471     # Reject names that are not valid shell variable names.
472     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
473       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
474     fi
475     ac_package=`echo $ac_package| sed 's/-/_/g'`
476     eval "with_${ac_package}=no" ;;
477
478   --x)
479     # Obsolete; use --with-x.
480     with_x=yes ;;
481
482   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
483   | --x-incl | --x-inc | --x-in | --x-i)
484     ac_prev=x_includes ;;
485   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
486   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
487     x_includes="$ac_optarg" ;;
488
489   -x-libraries | --x-libraries | --x-librarie | --x-librari \
490   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
491     ac_prev=x_libraries ;;
492   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
493   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
494     x_libraries="$ac_optarg" ;;
495
496   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
497     ;;
498
499   *)
500     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
501       echo "configure: warning: $ac_option: invalid host type" 1>&2
502     fi
503     if test "x$nonopt" != xNONE; then
504       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
505     fi
506     nonopt="$ac_option"
507     ;;
508
509   esac
510 done
511
512 if test -n "$ac_prev"; then
513   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
514 fi
515
516 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
517
518 # File descriptor usage:
519 # 0 standard input
520 # 1 file creation
521 # 2 errors and warnings
522 # 3 some systems may open it to /dev/tty
523 # 4 used on the Kubota Titan
524 # 6 checking for... messages and results
525 # 5 compiler messages saved in config.log
526 if test "$silent" = yes; then
527   exec 6>/dev/null
528 else
529   exec 6>&1
530 fi
531 exec 5>./config.log
532
533 echo "\
534 This file contains any messages produced by compilers while
535 running configure, to aid debugging if configure makes a mistake.
536 " 1>&5
537
538 # Strip out --no-create and --no-recursion so they do not pile up.
539 # Also quote any args containing shell metacharacters.
540 ac_configure_args=
541 for ac_arg
542 do
543   case "$ac_arg" in
544   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
545   | --no-cr | --no-c) ;;
546   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
547   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
548   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
549   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
550   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
551   esac
552 done
553
554 # NLS nuisances.
555 # Only set these to C if already set.  These must not be set unconditionally
556 # because not all systems understand e.g. LANG=C (notably SCO).
557 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
558 # Non-C LC_CTYPE values break the ctype check.
559 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
560 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
561 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
562 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
563
564 # confdefs.h avoids OS command line length limits that DEFS can exceed.
565 rm -rf conftest* confdefs.h
566 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
567 echo > confdefs.h
568
569 # A filename unique to this package, relative to the directory that
570 # configure is in, which we can look for to find out if srcdir is correct.
571 ac_unique_file=build/version
572
573 # Find the source files, if location was not specified.
574 if test -z "$srcdir"; then
575   ac_srcdir_defaulted=yes
576   # Try the directory containing this script, then its parent.
577   ac_prog=$0
578   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
579   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
580   srcdir=$ac_confdir
581   if test ! -r $srcdir/$ac_unique_file; then
582     srcdir=..
583   fi
584 else
585   ac_srcdir_defaulted=no
586 fi
587 if test ! -r $srcdir/$ac_unique_file; then
588   if test "$ac_srcdir_defaulted" = yes; then
589     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
590   else
591     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
592   fi
593 fi
594 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
595
596 # Prefer explicitly selected file to automatically selected ones.
597 if test -z "$CONFIG_SITE"; then
598   if test "x$prefix" != xNONE; then
599     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
600   else
601     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
602   fi
603 fi
604 for ac_site_file in $CONFIG_SITE; do
605   if test -r "$ac_site_file"; then
606     echo "loading site script $ac_site_file"
607     . "$ac_site_file"
608   fi
609 done
610
611
612 ac_ext=c
613 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
614 ac_cpp='$CPP $CPPFLAGS'
615 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
616 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
617 cross_compiling=$ac_cv_prog_cc_cross
618
619 ac_exeext=
620 ac_objext=o
621 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
622   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
623   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
624     ac_n= ac_c='
625 ' ac_t='        '
626   else
627     ac_n=-n ac_c= ac_t=
628   fi
629 else
630   ac_n= ac_c='\c' ac_t=
631 fi
632
633
634 # set unset (borrowed from autoconf 2.14a)
635 if (unset FOO) >/dev/null 2>&1; then
636   ol_unset=unset
637 else
638   ol_unset=false
639 fi
640 # unset CDPATH
641 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
642
643 ac_aux_dir=
644 for ac_dir in build $srcdir/build; do
645   if test -f $ac_dir/install-sh; then
646     ac_aux_dir=$ac_dir
647     ac_install_sh="$ac_aux_dir/install-sh -c"
648     break
649   elif test -f $ac_dir/install.sh; then
650     ac_aux_dir=$ac_dir
651     ac_install_sh="$ac_aux_dir/install.sh -c"
652     break
653   elif test -f $ac_dir/shtool; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/shtool install -c"
656     break
657   fi
658 done
659 if test -z "$ac_aux_dir"; then
660   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
661 fi
662 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
663 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
664 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
665
666 OL_VERSION=`cat $ac_aux_dir/version`
667 if test -z "$OL_VERSION"; then
668         { echo "configure: error: could not determine version" 1>&2; exit 1; }
669 fi
670
671 echo "Configuring OpenLDAP $OL_VERSION ..."
672
673
674 echo $ac_n "checking host system type""... $ac_c" 1>&6
675 echo "configure:676: checking host system type" >&5
676 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
677
678 # Make sure we can run config.sub.
679   if $ac_config_sub sun4 >/dev/null 2>&1; then :
680     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
681   fi
682
683   ac_cv_host_alias=$host
684   case "$ac_cv_host_alias" in
685   NONE)
686     case $nonopt in
687     NONE)
688       if ac_cv_host_alias=`$ac_config_guess`; then :
689       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
690       fi ;;
691     *) ac_cv_host_alias=$nonopt ;;
692     esac ;;
693   esac
694
695   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
696   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
697   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
698   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
699 else
700   echo $ac_n "(cached) $ac_c" 1>&6
701 fi
702
703 echo "$ac_t""$ac_cv_host" 1>&6
704
705 host=$ac_cv_host
706 host_alias=$ac_cv_host_alias
707 host_cpu=$ac_cv_host_cpu
708 host_vendor=$ac_cv_host_vendor
709 host_os=$ac_cv_host_os
710
711
712
713
714
715 echo $ac_n "checking target system type""... $ac_c" 1>&6
716 echo "configure:717: checking target system type" >&5
717 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
718
719 # Make sure we can run config.sub.
720   if $ac_config_sub sun4 >/dev/null 2>&1; then :
721     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
722   fi
723
724   ac_cv_target_alias=$target
725   case "$ac_cv_target_alias" in
726   NONE)
727     case $nonopt in
728     NONE)
729       ac_cv_target_alias=$host_alias ;;
730
731     *) ac_cv_target_alias=$nonopt ;;
732     esac ;;
733   esac
734
735   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
736   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
737   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
738   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
739 else
740   echo $ac_n "(cached) $ac_c" 1>&6
741 fi
742
743 echo "$ac_t""$ac_cv_target" 1>&6
744
745 target=$ac_cv_target
746 target_alias=$ac_cv_target_alias
747 target_cpu=$ac_cv_target_cpu
748 target_vendor=$ac_cv_target_vendor
749 target_os=$ac_cv_target_os
750
751
752
753
754
755 echo $ac_n "checking build system type""... $ac_c" 1>&6
756 echo "configure:757: checking build system type" >&5
757 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
758
759 # Make sure we can run config.sub.
760   if $ac_config_sub sun4 >/dev/null 2>&1; then :
761     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
762   fi
763
764   ac_cv_build_alias=$build
765   case "$ac_cv_build_alias" in
766   NONE)
767     case $nonopt in
768     NONE)
769       ac_cv_build_alias=$host_alias ;;
770
771     *) ac_cv_build_alias=$nonopt ;;
772     esac ;;
773   esac
774
775   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
776   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
777   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
778   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
779 else
780   echo $ac_n "(cached) $ac_c" 1>&6
781 fi
782
783 echo "$ac_t""$ac_cv_build" 1>&6
784
785 build=$ac_cv_build
786 build_alias=$ac_cv_build_alias
787 build_cpu=$ac_cv_build_cpu
788 build_vendor=$ac_cv_build_vendor
789 build_os=$ac_cv_build_os
790
791
792
793
794
795 # Do some error checking and defaulting for the host and target type.
796 # The inputs are:
797 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
798 #
799 # The rules are:
800 # 1. You are not allowed to specify --host, --target, and nonopt at the
801 #    same time.
802 # 2. Host defaults to nonopt.
803 # 3. If nonopt is not specified, then host defaults to the current host,
804 #    as determined by config.guess.
805 # 4. Target and build default to nonopt.
806 # 5. If nonopt is not specified, then target and build default to host.
807
808 # The aliases save the names the user supplied, while $host etc.
809 # will get canonicalized.
810 case $host---$target---$nonopt in
811 NONE---*---* | *---NONE---* | *---*---NONE) ;;
812 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
813 esac
814
815 test "$host_alias" != "$target_alias" &&
816   test "$program_prefix$program_suffix$program_transform_name" = \
817     NONENONEs,x,x, &&
818   program_prefix=${target_alias}-
819
820
821 # Find a good install program.  We prefer a C program (faster),
822 # so one script is as good as another.  But avoid the broken or
823 # incompatible versions:
824 # SysV /etc/install, /usr/sbin/install
825 # SunOS /usr/etc/install
826 # IRIX /sbin/install
827 # AIX /bin/install
828 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
829 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
830 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
831 # ./install, which can be erroneously created by make from ./install.sh.
832 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
833 echo "configure:834: checking for a BSD compatible install" >&5
834 if test -z "$INSTALL"; then
835 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
836   echo $ac_n "(cached) $ac_c" 1>&6
837 else
838     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
839   for ac_dir in $PATH; do
840     # Account for people who put trailing slashes in PATH elements.
841     case "$ac_dir/" in
842     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
843     *)
844       # OSF1 and SCO ODT 3.0 have their own names for install.
845       # Don't use installbsd from OSF since it installs stuff as root
846       # by default.
847       for ac_prog in ginstall scoinst install; do
848         if test -f $ac_dir/$ac_prog; then
849           if test $ac_prog = install &&
850             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
851             # AIX install.  It has an incompatible calling convention.
852             :
853           elif test $ac_prog = install &&
854             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
855             # program-specific install script used by HP pwplus--don't use.
856             :
857           else
858             ac_cv_path_install="$ac_dir/$ac_prog -c"
859             break 2
860           fi
861         fi
862       done
863       ;;
864     esac
865   done
866   IFS="$ac_save_IFS"
867
868 fi
869   if test "${ac_cv_path_install+set}" = set; then
870     INSTALL="$ac_cv_path_install"
871   else
872     # As a last resort, use the slow shell script.  We don't cache a
873     # path for INSTALL within a source directory, because that will
874     # break other packages using the cache if that directory is
875     # removed, or if the path is relative.
876     INSTALL="$ac_install_sh"
877   fi
878 fi
879 echo "$ac_t""$INSTALL" 1>&6
880
881 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
882 # It thinks the first close brace ends the variable substitution.
883 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
884
885 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
886
887 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
888
889 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
890 echo "configure:891: checking whether build environment is sane" >&5
891 # Just in case
892 sleep 1
893 echo timestamp > conftestfile
894 # Do `set' in a subshell so we don't clobber the current shell's
895 # arguments.  Must try -L first in case configure is actually a
896 # symlink; some systems play weird games with the mod time of symlinks
897 # (eg FreeBSD returns the mod time of the symlink's containing
898 # directory).
899 if (
900    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
901    if test "$*" = "X"; then
902       # -L didn't work.
903       set X `ls -t $srcdir/configure conftestfile`
904    fi
905    if test "$*" != "X $srcdir/configure conftestfile" \
906       && test "$*" != "X conftestfile $srcdir/configure"; then
907
908       # If neither matched, then we have a broken ls.  This can happen
909       # if, for instance, CONFIG_SHELL is bash and it inherits a
910       # broken ls alias from the environment.  This has actually
911       # happened.  Such a system could not be considered "sane".
912       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
913 alias in your environment" 1>&2; exit 1; }
914    fi
915
916    test "$2" = conftestfile
917    )
918 then
919    # Ok.
920    :
921 else
922    { echo "configure: error: newly created file is older than distributed files!
923 Check your system clock" 1>&2; exit 1; }
924 fi
925 rm -f conftest*
926 echo "$ac_t""yes" 1>&6
927 if test "$program_transform_name" = s,x,x,; then
928   program_transform_name=
929 else
930   # Double any \ or $.  echo might interpret backslashes.
931   cat <<\EOF_SED > conftestsed
932 s,\\,\\\\,g; s,\$,$$,g
933 EOF_SED
934   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
935   rm -f conftestsed
936 fi
937 test "$program_prefix" != NONE &&
938   program_transform_name="s,^,${program_prefix},;$program_transform_name"
939 # Use a double $ so make ignores it.
940 test "$program_suffix" != NONE &&
941   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
942
943 # sed with no file args requires a program.
944 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
945
946 for ac_prog in mawk gawk nawk awk
947 do
948 # Extract the first word of "$ac_prog", so it can be a program name with args.
949 set dummy $ac_prog; ac_word=$2
950 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
951 echo "configure:952: checking for $ac_word" >&5
952 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
953   echo $ac_n "(cached) $ac_c" 1>&6
954 else
955   if test -n "$AWK"; then
956   ac_cv_prog_AWK="$AWK" # Let the user override the test.
957 else
958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
959   ac_dummy="$PATH"
960   for ac_dir in $ac_dummy; do
961     test -z "$ac_dir" && ac_dir=.
962     if test -f $ac_dir/$ac_word; then
963       ac_cv_prog_AWK="$ac_prog"
964       break
965     fi
966   done
967   IFS="$ac_save_ifs"
968 fi
969 fi
970 AWK="$ac_cv_prog_AWK"
971 if test -n "$AWK"; then
972   echo "$ac_t""$AWK" 1>&6
973 else
974   echo "$ac_t""no" 1>&6
975 fi
976
977 test -n "$AWK" && break
978 done
979
980 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
981 echo "configure:982: checking whether ${MAKE-make} sets \${MAKE}" >&5
982 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
983 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
984   echo $ac_n "(cached) $ac_c" 1>&6
985 else
986   cat > conftestmake <<\EOF
987 all:
988         @echo 'ac_maketemp="${MAKE}"'
989 EOF
990 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
991 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
992 if test -n "$ac_maketemp"; then
993   eval ac_cv_prog_make_${ac_make}_set=yes
994 else
995   eval ac_cv_prog_make_${ac_make}_set=no
996 fi
997 rm -f conftestmake
998 fi
999 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1000   echo "$ac_t""yes" 1>&6
1001   SET_MAKE=
1002 else
1003   echo "$ac_t""no" 1>&6
1004   SET_MAKE="MAKE=${MAKE-make}"
1005 fi
1006
1007
1008
1009 PACKAGE=OpenLDAP
1010
1011 VERSION=$OL_VERSION
1012
1013 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1014   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1015 fi
1016
1017
1018
1019 missing_dir=`cd $ac_aux_dir && pwd`
1020 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1021 echo "configure:1022: checking for working aclocal" >&5
1022 # Run test in a subshell; some versions of sh will print an error if
1023 # an executable is not found, even if stderr is redirected.
1024 # Redirect stdin to placate older versions of autoconf.  Sigh.
1025 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1026    ACLOCAL=aclocal
1027    echo "$ac_t""found" 1>&6
1028 else
1029    ACLOCAL="$missing_dir/missing aclocal"
1030    echo "$ac_t""missing" 1>&6
1031 fi
1032
1033 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1034 echo "configure:1035: checking for working autoconf" >&5
1035 # Run test in a subshell; some versions of sh will print an error if
1036 # an executable is not found, even if stderr is redirected.
1037 # Redirect stdin to placate older versions of autoconf.  Sigh.
1038 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1039    AUTOCONF=autoconf
1040    echo "$ac_t""found" 1>&6
1041 else
1042    AUTOCONF="$missing_dir/missing autoconf"
1043    echo "$ac_t""missing" 1>&6
1044 fi
1045
1046 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1047 echo "configure:1048: checking for working automake" >&5
1048 # Run test in a subshell; some versions of sh will print an error if
1049 # an executable is not found, even if stderr is redirected.
1050 # Redirect stdin to placate older versions of autoconf.  Sigh.
1051 if (automake --version) < /dev/null > /dev/null 2>&1; then
1052    AUTOMAKE=automake
1053    echo "$ac_t""found" 1>&6
1054 else
1055    AUTOMAKE="$missing_dir/missing automake"
1056    echo "$ac_t""missing" 1>&6
1057 fi
1058
1059 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1060 echo "configure:1061: checking for working autoheader" >&5
1061 # Run test in a subshell; some versions of sh will print an error if
1062 # an executable is not found, even if stderr is redirected.
1063 # Redirect stdin to placate older versions of autoconf.  Sigh.
1064 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1065    AUTOHEADER=autoheader
1066    echo "$ac_t""found" 1>&6
1067 else
1068    AUTOHEADER="$missing_dir/missing autoheader"
1069    echo "$ac_t""missing" 1>&6
1070 fi
1071
1072 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1073 echo "configure:1074: checking for working makeinfo" >&5
1074 # Run test in a subshell; some versions of sh will print an error if
1075 # an executable is not found, even if stderr is redirected.
1076 # Redirect stdin to placate older versions of autoconf.  Sigh.
1077 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1078    MAKEINFO=makeinfo
1079    echo "$ac_t""found" 1>&6
1080 else
1081    MAKEINFO="$missing_dir/missing makeinfo"
1082    echo "$ac_t""missing" 1>&6
1083 fi
1084
1085 install_sh="$missing_dir/install-sh"
1086 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1087
1088 for ac_prog in gnutar gtar tar
1089 do
1090 # Extract the first word of "$ac_prog", so it can be a program name with args.
1091 set dummy $ac_prog; ac_word=$2
1092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1093 echo "configure:1094: checking for $ac_word" >&5
1094 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1095   echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097   if test -n "$AMTAR"; then
1098   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1099 else
1100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1101   ac_dummy="$PATH"
1102   for ac_dir in $ac_dummy; do
1103     test -z "$ac_dir" && ac_dir=.
1104     if test -f $ac_dir/$ac_word; then
1105       ac_cv_prog_AMTAR="$ac_prog"
1106       break
1107     fi
1108   done
1109   IFS="$ac_save_ifs"
1110 fi
1111 fi
1112 AMTAR="$ac_cv_prog_AMTAR"
1113 if test -n "$AMTAR"; then
1114   echo "$ac_t""$AMTAR" 1>&6
1115 else
1116   echo "$ac_t""no" 1>&6
1117 fi
1118
1119 test -n "$AMTAR" && break
1120 done
1121
1122
1123 AMTARFLAGS=
1124 if test -n "$AMTAR"; then
1125   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1126         AMTARFLAGS=o
1127   fi
1128 fi
1129
1130
1131
1132 cat >> confdefs.h <<EOF
1133 #define OPENLDAP_PACKAGE "$PACKAGE"
1134 EOF
1135
1136 cat >> confdefs.h <<EOF
1137 #define OPENLDAP_VERSION "$VERSION"
1138 EOF
1139
1140
1141
1142
1143 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1144 echo "configure:1145: checking configure arguments" >&5
1145
1146
1147 top_builddir=`pwd`
1148
1149 ldap_subdir="/openldap"
1150
1151 # Check whether --with-subdir or --without-subdir was given.
1152 if test "${with_subdir+set}" = set; then
1153   withval="$with_subdir"
1154   case "$withval" in
1155         no) ldap_subdir=""
1156                 ;;
1157         yes)
1158                 ;;
1159         /*|\\*)
1160                 ldap_subdir="$withval"
1161                 ;;
1162         *)
1163                 ldap_subdir="/$withval"
1164                 ;;
1165 esac
1166
1167 fi
1168
1169
1170 # OpenLDAP --enable-debug
1171         # Check whether --enable-debug or --disable-debug was given.
1172 if test "${enable_debug+set}" = set; then
1173   enableval="$enable_debug"
1174   
1175         ol_arg=invalid
1176         for ol_val in auto yes no ; do
1177                 if test "$enableval" = "$ol_val" ; then
1178                         ol_arg="$ol_val"
1179                 fi
1180         done
1181         if test "$ol_arg" = "invalid" ; then
1182                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1183         fi
1184         ol_enable_debug="$ol_arg"
1185
1186 else
1187         ol_enable_debug="yes"
1188 fi
1189 # end --enable-debug
1190 # OpenLDAP --enable-syslog
1191         # Check whether --enable-syslog or --disable-syslog was given.
1192 if test "${enable_syslog+set}" = set; then
1193   enableval="$enable_syslog"
1194   
1195         ol_arg=invalid
1196         for ol_val in auto yes no ; do
1197                 if test "$enableval" = "$ol_val" ; then
1198                         ol_arg="$ol_val"
1199                 fi
1200         done
1201         if test "$ol_arg" = "invalid" ; then
1202                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1203         fi
1204         ol_enable_syslog="$ol_arg"
1205
1206 else
1207         ol_enable_syslog="auto"
1208 fi
1209 # end --enable-syslog
1210 # OpenLDAP --enable-proctitle
1211         # Check whether --enable-proctitle or --disable-proctitle was given.
1212 if test "${enable_proctitle+set}" = set; then
1213   enableval="$enable_proctitle"
1214   
1215         ol_arg=invalid
1216         for ol_val in auto yes no ; do
1217                 if test "$enableval" = "$ol_val" ; then
1218                         ol_arg="$ol_val"
1219                 fi
1220         done
1221         if test "$ol_arg" = "invalid" ; then
1222                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1223         fi
1224         ol_enable_proctitle="$ol_arg"
1225
1226 else
1227         ol_enable_proctitle="yes"
1228 fi
1229 # end --enable-proctitle
1230 # OpenLDAP --enable-cache
1231         # Check whether --enable-cache or --disable-cache was given.
1232 if test "${enable_cache+set}" = set; then
1233   enableval="$enable_cache"
1234   
1235         ol_arg=invalid
1236         for ol_val in auto yes no ; do
1237                 if test "$enableval" = "$ol_val" ; then
1238                         ol_arg="$ol_val"
1239                 fi
1240         done
1241         if test "$ol_arg" = "invalid" ; then
1242                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1243         fi
1244         ol_enable_cache="$ol_arg"
1245
1246 else
1247         ol_enable_cache="yes"
1248 fi
1249 # end --enable-cache
1250 # OpenLDAP --enable-referrals
1251         # Check whether --enable-referrals or --disable-referrals was given.
1252 if test "${enable_referrals+set}" = set; then
1253   enableval="$enable_referrals"
1254   
1255         ol_arg=invalid
1256         for ol_val in auto yes no ; do
1257                 if test "$enableval" = "$ol_val" ; then
1258                         ol_arg="$ol_val"
1259                 fi
1260         done
1261         if test "$ol_arg" = "invalid" ; then
1262                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1263         fi
1264         ol_enable_referrals="$ol_arg"
1265
1266 else
1267         ol_enable_referrals="yes"
1268 fi
1269 # end --enable-referrals
1270 # OpenLDAP --enable-kbind
1271         # Check whether --enable-kbind or --disable-kbind was given.
1272 if test "${enable_kbind+set}" = set; then
1273   enableval="$enable_kbind"
1274   
1275         ol_arg=invalid
1276         for ol_val in auto yes no ; do
1277                 if test "$enableval" = "$ol_val" ; then
1278                         ol_arg="$ol_val"
1279                 fi
1280         done
1281         if test "$ol_arg" = "invalid" ; then
1282                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1283         fi
1284         ol_enable_kbind="$ol_arg"
1285
1286 else
1287         ol_enable_kbind="no"
1288 fi
1289 # end --enable-kbind
1290 # OpenLDAP --enable-ipv6
1291         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1292 if test "${enable_ipv6+set}" = set; then
1293   enableval="$enable_ipv6"
1294   
1295         ol_arg=invalid
1296         for ol_val in auto yes no ; do
1297                 if test "$enableval" = "$ol_val" ; then
1298                         ol_arg="$ol_val"
1299                 fi
1300         done
1301         if test "$ol_arg" = "invalid" ; then
1302                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1303         fi
1304         ol_enable_ipv6="$ol_arg"
1305
1306 else
1307         ol_enable_ipv6="auto"
1308 fi
1309 # end --enable-ipv6
1310 # OpenLDAP --enable-local
1311         # Check whether --enable-local or --disable-local was given.
1312 if test "${enable_local+set}" = set; then
1313   enableval="$enable_local"
1314   
1315         ol_arg=invalid
1316         for ol_val in auto yes no ; do
1317                 if test "$enableval" = "$ol_val" ; then
1318                         ol_arg="$ol_val"
1319                 fi
1320         done
1321         if test "$ol_arg" = "invalid" ; then
1322                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1323         fi
1324         ol_enable_local="$ol_arg"
1325
1326 else
1327         ol_enable_local="auto"
1328 fi
1329 # end --enable-local
1330 # OpenLDAP --enable-x_compile
1331         # Check whether --enable-x_compile or --disable-x_compile was given.
1332 if test "${enable_x_compile+set}" = set; then
1333   enableval="$enable_x_compile"
1334   
1335         ol_arg=invalid
1336         for ol_val in yes no ; do
1337                 if test "$enableval" = "$ol_val" ; then
1338                         ol_arg="$ol_val"
1339                 fi
1340         done
1341         if test "$ol_arg" = "invalid" ; then
1342                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1343         fi
1344         ol_enable_x_compile="$ol_arg"
1345
1346 else
1347         ol_enable_x_compile="no"
1348 fi
1349 # end --enable-x_compile
1350
1351
1352 # OpenLDAP --with-cyrus_sasl
1353         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1354 if test "${with_cyrus_sasl+set}" = set; then
1355   withval="$with_cyrus_sasl"
1356   
1357         ol_arg=invalid
1358         for ol_val in auto yes no  ; do
1359                 if test "$withval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1365         fi
1366         ol_with_cyrus_sasl="$ol_arg"
1367
1368 else
1369         ol_with_cyrus_sasl="auto"
1370 fi
1371 # end --with-cyrus_sasl
1372
1373 # OpenLDAP --with-fetch
1374         # Check whether --with-fetch or --without-fetch was given.
1375 if test "${with_fetch+set}" = set; then
1376   withval="$with_fetch"
1377   
1378         ol_arg=invalid
1379         for ol_val in auto yes no  ; do
1380                 if test "$withval" = "$ol_val" ; then
1381                         ol_arg="$ol_val"
1382                 fi
1383         done
1384         if test "$ol_arg" = "invalid" ; then
1385                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1386         fi
1387         ol_with_fetch="$ol_arg"
1388
1389 else
1390         ol_with_fetch="auto"
1391 fi
1392 # end --with-fetch
1393
1394 # OpenLDAP --with-kerberos
1395         # Check whether --with-kerberos or --without-kerberos was given.
1396 if test "${with_kerberos+set}" = set; then
1397   withval="$with_kerberos"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1401                 if test "$withval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1407         fi
1408         ol_with_kerberos="$ol_arg"
1409
1410 else
1411         ol_with_kerberos="auto"
1412 fi
1413 # end --with-kerberos
1414
1415 # OpenLDAP --with-readline
1416         # Check whether --with-readline or --without-readline was given.
1417 if test "${with_readline+set}" = set; then
1418   withval="$with_readline"
1419   
1420         ol_arg=invalid
1421         for ol_val in auto yes no  ; do
1422                 if test "$withval" = "$ol_val" ; then
1423                         ol_arg="$ol_val"
1424                 fi
1425         done
1426         if test "$ol_arg" = "invalid" ; then
1427                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1428         fi
1429         ol_with_readline="$ol_arg"
1430
1431 else
1432         ol_with_readline="auto"
1433 fi
1434 # end --with-readline
1435
1436 # OpenLDAP --with-threads
1437         # Check whether --with-threads or --without-threads was given.
1438 if test "${with_threads+set}" = set; then
1439   withval="$with_threads"
1440   
1441         ol_arg=invalid
1442         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1443                 if test "$withval" = "$ol_val" ; then
1444                         ol_arg="$ol_val"
1445                 fi
1446         done
1447         if test "$ol_arg" = "invalid" ; then
1448                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1449         fi
1450         ol_with_threads="$ol_arg"
1451
1452 else
1453         ol_with_threads="auto"
1454 fi
1455 # end --with-threads
1456
1457 # OpenLDAP --with-tls
1458         # Check whether --with-tls or --without-tls was given.
1459 if test "${with_tls+set}" = set; then
1460   withval="$with_tls"
1461   
1462         ol_arg=invalid
1463         for ol_val in auto ssleay openssl yes no  ; do
1464                 if test "$withval" = "$ol_val" ; then
1465                         ol_arg="$ol_val"
1466                 fi
1467         done
1468         if test "$ol_arg" = "invalid" ; then
1469                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1470         fi
1471         ol_with_tls="$ol_arg"
1472
1473 else
1474         ol_with_tls="auto"
1475 fi
1476 # end --with-tls
1477
1478 # OpenLDAP --with-yielding_select
1479         # Check whether --with-yielding_select or --without-yielding_select was given.
1480 if test "${with_yielding_select+set}" = set; then
1481   withval="$with_yielding_select"
1482   
1483         ol_arg=invalid
1484         for ol_val in auto yes no manual  ; do
1485                 if test "$withval" = "$ol_val" ; then
1486                         ol_arg="$ol_val"
1487                 fi
1488         done
1489         if test "$ol_arg" = "invalid" ; then
1490                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1491         fi
1492         ol_with_yielding_select="$ol_arg"
1493
1494 else
1495         ol_with_yielding_select="auto"
1496 fi
1497 # end --with-yielding_select
1498
1499
1500
1501 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1502 if test "${with_xxslapdoptions+set}" = set; then
1503   withval="$with_xxslapdoptions"
1504   :
1505 fi
1506
1507 # OpenLDAP --enable-slapd
1508         # Check whether --enable-slapd or --disable-slapd was given.
1509 if test "${enable_slapd+set}" = set; then
1510   enableval="$enable_slapd"
1511   
1512         ol_arg=invalid
1513         for ol_val in auto yes no ; do
1514                 if test "$enableval" = "$ol_val" ; then
1515                         ol_arg="$ol_val"
1516                 fi
1517         done
1518         if test "$ol_arg" = "invalid" ; then
1519                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1520         fi
1521         ol_enable_slapd="$ol_arg"
1522
1523 else
1524         ol_enable_slapd="yes"
1525 fi
1526 # end --enable-slapd
1527 # OpenLDAP --enable-cleartext
1528         # Check whether --enable-cleartext or --disable-cleartext was given.
1529 if test "${enable_cleartext+set}" = set; then
1530   enableval="$enable_cleartext"
1531   
1532         ol_arg=invalid
1533         for ol_val in auto yes no ; do
1534                 if test "$enableval" = "$ol_val" ; then
1535                         ol_arg="$ol_val"
1536                 fi
1537         done
1538         if test "$ol_arg" = "invalid" ; then
1539                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1540         fi
1541         ol_enable_cleartext="$ol_arg"
1542
1543 else
1544         ol_enable_cleartext="yes"
1545 fi
1546 # end --enable-cleartext
1547 # OpenLDAP --enable-crypt
1548         # Check whether --enable-crypt or --disable-crypt was given.
1549 if test "${enable_crypt+set}" = set; then
1550   enableval="$enable_crypt"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no ; do
1554                 if test "$enableval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1560         fi
1561         ol_enable_crypt="$ol_arg"
1562
1563 else
1564         ol_enable_crypt="auto"
1565 fi
1566 # end --enable-crypt
1567 # OpenLDAP --enable-kpasswd
1568         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1569 if test "${enable_kpasswd+set}" = set; then
1570   enableval="$enable_kpasswd"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto yes no ; do
1574                 if test "$enableval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1580         fi
1581         ol_enable_kpasswd="$ol_arg"
1582
1583 else
1584         ol_enable_kpasswd="no"
1585 fi
1586 # end --enable-kpasswd
1587 # OpenLDAP --enable-spasswd
1588         # Check whether --enable-spasswd or --disable-spasswd was given.
1589 if test "${enable_spasswd+set}" = set; then
1590   enableval="$enable_spasswd"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no ; do
1594                 if test "$enableval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1600         fi
1601         ol_enable_spasswd="$ol_arg"
1602
1603 else
1604         ol_enable_spasswd="no"
1605 fi
1606 # end --enable-spasswd
1607 # OpenLDAP --enable-modules
1608         # Check whether --enable-modules or --disable-modules was given.
1609 if test "${enable_modules+set}" = set; then
1610   enableval="$enable_modules"
1611   
1612         ol_arg=invalid
1613         for ol_val in auto yes no ; do
1614                 if test "$enableval" = "$ol_val" ; then
1615                         ol_arg="$ol_val"
1616                 fi
1617         done
1618         if test "$ol_arg" = "invalid" ; then
1619                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1620         fi
1621         ol_enable_modules="$ol_arg"
1622
1623 else
1624         ol_enable_modules="no"
1625 fi
1626 # end --enable-modules
1627 # OpenLDAP --enable-multimaster
1628         # Check whether --enable-multimaster or --disable-multimaster was given.
1629 if test "${enable_multimaster+set}" = set; then
1630   enableval="$enable_multimaster"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no ; do
1634                 if test "$enableval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1640         fi
1641         ol_enable_multimaster="$ol_arg"
1642
1643 else
1644         ol_enable_multimaster="no"
1645 fi
1646 # end --enable-multimaster
1647 # OpenLDAP --enable-phonetic
1648         # Check whether --enable-phonetic or --disable-phonetic was given.
1649 if test "${enable_phonetic+set}" = set; then
1650   enableval="$enable_phonetic"
1651   
1652         ol_arg=invalid
1653         for ol_val in auto yes no ; do
1654                 if test "$enableval" = "$ol_val" ; then
1655                         ol_arg="$ol_val"
1656                 fi
1657         done
1658         if test "$ol_arg" = "invalid" ; then
1659                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1660         fi
1661         ol_enable_phonetic="$ol_arg"
1662
1663 else
1664         ol_enable_phonetic="no"
1665 fi
1666 # end --enable-phonetic
1667 # OpenLDAP --enable-rlookups
1668         # Check whether --enable-rlookups or --disable-rlookups was given.
1669 if test "${enable_rlookups+set}" = set; then
1670   enableval="$enable_rlookups"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1680         fi
1681         ol_enable_rlookups="$ol_arg"
1682
1683 else
1684         ol_enable_rlookups="auto"
1685 fi
1686 # end --enable-rlookups
1687 # OpenLDAP --enable-aci
1688         # Check whether --enable-aci or --disable-aci was given.
1689 if test "${enable_aci+set}" = set; then
1690   enableval="$enable_aci"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1700         fi
1701         ol_enable_aci="$ol_arg"
1702
1703 else
1704         ol_enable_aci="no"
1705 fi
1706 # end --enable-aci
1707 # OpenLDAP --enable-wrappers
1708         # Check whether --enable-wrappers or --disable-wrappers was given.
1709 if test "${enable_wrappers+set}" = set; then
1710   enableval="$enable_wrappers"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1720         fi
1721         ol_enable_wrappers="$ol_arg"
1722
1723 else
1724         ol_enable_wrappers="no"
1725 fi
1726 # end --enable-wrappers
1727 # OpenLDAP --enable-dynamic
1728         # Check whether --enable-dynamic or --disable-dynamic was given.
1729 if test "${enable_dynamic+set}" = set; then
1730   enableval="$enable_dynamic"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1740         fi
1741         ol_enable_dynamic="$ol_arg"
1742
1743 else
1744         ol_enable_dynamic="no"
1745 fi
1746 # end --enable-dynamic
1747
1748 # OpenLDAP --enable-dnssrv
1749         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1750 if test "${enable_dnssrv+set}" = set; then
1751   enableval="$enable_dnssrv"
1752   
1753         ol_arg=invalid
1754         for ol_val in auto yes no ; do
1755                 if test "$enableval" = "$ol_val" ; then
1756                         ol_arg="$ol_val"
1757                 fi
1758         done
1759         if test "$ol_arg" = "invalid" ; then
1760                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1761         fi
1762         ol_enable_dnssrv="$ol_arg"
1763
1764 else
1765         ol_enable_dnssrv="no"
1766 fi
1767 # end --enable-dnssrv
1768 # OpenLDAP --with-dnssrv_module
1769         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1770 if test "${with_dnssrv_module+set}" = set; then
1771   withval="$with_dnssrv_module"
1772   
1773         ol_arg=invalid
1774         for ol_val in static dynamic ; do
1775                 if test "$withval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1781         fi
1782         ol_with_dnssrv_module="$ol_arg"
1783
1784 else
1785         ol_with_dnssrv_module="static"
1786 fi
1787 # end --with-dnssrv_module
1788
1789 # OpenLDAP --enable-ldap
1790         # Check whether --enable-ldap or --disable-ldap was given.
1791 if test "${enable_ldap+set}" = set; then
1792   enableval="$enable_ldap"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1802         fi
1803         ol_enable_ldap="$ol_arg"
1804
1805 else
1806         ol_enable_ldap="no"
1807 fi
1808 # end --enable-ldap
1809 # OpenLDAP --with-ldap_module
1810         # Check whether --with-ldap_module or --without-ldap_module was given.
1811 if test "${with_ldap_module+set}" = set; then
1812   withval="$with_ldap_module"
1813   
1814         ol_arg=invalid
1815         for ol_val in static dynamic ; do
1816                 if test "$withval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1822         fi
1823         ol_with_ldap_module="$ol_arg"
1824
1825 else
1826         ol_with_ldap_module="static"
1827 fi
1828 # end --with-ldap_module
1829
1830 # OpenLDAP --enable-ldbm
1831         # Check whether --enable-ldbm or --disable-ldbm was given.
1832 if test "${enable_ldbm+set}" = set; then
1833   enableval="$enable_ldbm"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1843         fi
1844         ol_enable_ldbm="$ol_arg"
1845
1846 else
1847         ol_enable_ldbm="yes"
1848 fi
1849 # end --enable-ldbm
1850 # OpenLDAP --with-ldbm_api
1851         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1852 if test "${with_ldbm_api+set}" = set; then
1853   withval="$with_ldbm_api"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1857                 if test "$withval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1863         fi
1864         ol_with_ldbm_api="$ol_arg"
1865
1866 else
1867         ol_with_ldbm_api="auto"
1868 fi
1869 # end --with-ldbm_api
1870
1871 # OpenLDAP --with-ldbm_module
1872         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1873 if test "${with_ldbm_module+set}" = set; then
1874   withval="$with_ldbm_module"
1875   
1876         ol_arg=invalid
1877         for ol_val in static dynamic ; do
1878                 if test "$withval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1884         fi
1885         ol_with_ldbm_module="$ol_arg"
1886
1887 else
1888         ol_with_ldbm_module="static"
1889 fi
1890 # end --with-ldbm_module
1891
1892 # OpenLDAP --with-ldbm_type
1893         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1894 if test "${with_ldbm_type+set}" = set; then
1895   withval="$with_ldbm_type"
1896   
1897         ol_arg=invalid
1898         for ol_val in auto btree hash ; do
1899                 if test "$withval" = "$ol_val" ; then
1900                         ol_arg="$ol_val"
1901                 fi
1902         done
1903         if test "$ol_arg" = "invalid" ; then
1904                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1905         fi
1906         ol_with_ldbm_type="$ol_arg"
1907
1908 else
1909         ol_with_ldbm_type="auto"
1910 fi
1911 # end --with-ldbm_type
1912
1913 # OpenLDAP --enable-passwd
1914         # Check whether --enable-passwd or --disable-passwd was given.
1915 if test "${enable_passwd+set}" = set; then
1916   enableval="$enable_passwd"
1917   
1918         ol_arg=invalid
1919         for ol_val in auto yes no ; do
1920                 if test "$enableval" = "$ol_val" ; then
1921                         ol_arg="$ol_val"
1922                 fi
1923         done
1924         if test "$ol_arg" = "invalid" ; then
1925                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1926         fi
1927         ol_enable_passwd="$ol_arg"
1928
1929 else
1930         ol_enable_passwd="no"
1931 fi
1932 # end --enable-passwd
1933 # OpenLDAP --with-passwd_module
1934         # Check whether --with-passwd_module or --without-passwd_module was given.
1935 if test "${with_passwd_module+set}" = set; then
1936   withval="$with_passwd_module"
1937   
1938         ol_arg=invalid
1939         for ol_val in static dynamic ; do
1940                 if test "$withval" = "$ol_val" ; then
1941                         ol_arg="$ol_val"
1942                 fi
1943         done
1944         if test "$ol_arg" = "invalid" ; then
1945                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1946         fi
1947         ol_with_passwd_module="$ol_arg"
1948
1949 else
1950         ol_with_passwd_module="static"
1951 fi
1952 # end --with-passwd_module
1953
1954 # OpenLDAP --enable-shell
1955         # Check whether --enable-shell or --disable-shell was given.
1956 if test "${enable_shell+set}" = set; then
1957   enableval="$enable_shell"
1958   
1959         ol_arg=invalid
1960         for ol_val in auto yes no ; do
1961                 if test "$enableval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1967         fi
1968         ol_enable_shell="$ol_arg"
1969
1970 else
1971         ol_enable_shell="no"
1972 fi
1973 # end --enable-shell
1974 # OpenLDAP --with-shell_module
1975         # Check whether --with-shell_module or --without-shell_module was given.
1976 if test "${with_shell_module+set}" = set; then
1977   withval="$with_shell_module"
1978   
1979         ol_arg=invalid
1980         for ol_val in static dynamic ; do
1981                 if test "$withval" = "$ol_val" ; then
1982                         ol_arg="$ol_val"
1983                 fi
1984         done
1985         if test "$ol_arg" = "invalid" ; then
1986                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1987         fi
1988         ol_with_shell_module="$ol_arg"
1989
1990 else
1991         ol_with_shell_module="static"
1992 fi
1993 # end --with-shell_module
1994
1995 # OpenLDAP --enable-sql
1996         # Check whether --enable-sql or --disable-sql was given.
1997 if test "${enable_sql+set}" = set; then
1998   enableval="$enable_sql"
1999   
2000         ol_arg=invalid
2001         for ol_val in auto yes no ; do
2002                 if test "$enableval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2008         fi
2009         ol_enable_sql="$ol_arg"
2010
2011 else
2012         ol_enable_sql="no"
2013 fi
2014 # end --enable-sql
2015 # OpenLDAP --with-sql_module
2016         # Check whether --with-sql_module or --without-sql_module was given.
2017 if test "${with_sql_module+set}" = set; then
2018   withval="$with_sql_module"
2019   
2020         ol_arg=invalid
2021         for ol_val in static dynamic ; do
2022                 if test "$withval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2028         fi
2029         ol_with_sql_module="$ol_arg"
2030
2031 else
2032         ol_with_sql_module="static"
2033 fi
2034 # end --with-sql_module
2035
2036
2037 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2038 if test "${with_xxslurpdoptions+set}" = set; then
2039   withval="$with_xxslurpdoptions"
2040   :
2041 fi
2042
2043 # OpenLDAP --enable-slurpd
2044         # Check whether --enable-slurpd or --disable-slurpd was given.
2045 if test "${enable_slurpd+set}" = set; then
2046   enableval="$enable_slurpd"
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-slurpd" 1>&2; exit 1; }
2056         fi
2057         ol_enable_slurpd="$ol_arg"
2058
2059 else
2060         ol_enable_slurpd="auto"
2061 fi
2062 # end --enable-slurpd
2063
2064 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2065 if test "${with_xxliboptions+set}" = set; then
2066   withval="$with_xxliboptions"
2067   :
2068 fi
2069
2070 # Check whether --enable-static or --disable-static was given.
2071 if test "${enable_static+set}" = set; then
2072   enableval="$enable_static"
2073   p=${PACKAGE-default}
2074 case "$enableval" in
2075 yes) enable_static=yes ;;
2076 no) enable_static=no ;;
2077 *)
2078   enable_static=no
2079   # Look at the argument we got.  We use all the common list separators.
2080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2081   for pkg in $enableval; do
2082     if test "X$pkg" = "X$p"; then
2083       enable_static=yes
2084     fi
2085   done
2086   IFS="$ac_save_ifs"
2087   ;;
2088 esac
2089 else
2090   enable_static=yes
2091 fi
2092
2093 # Check whether --enable-shared or --disable-shared was given.
2094 if test "${enable_shared+set}" = set; then
2095   enableval="$enable_shared"
2096   p=${PACKAGE-default}
2097 case "$enableval" in
2098 yes) enable_shared=yes ;;
2099 no) enable_shared=no ;;
2100 *)
2101   enable_shared=no
2102   # Look at the argument we got.  We use all the common list separators.
2103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2104   for pkg in $enableval; do
2105     if test "X$pkg" = "X$p"; then
2106       enable_shared=yes
2107     fi
2108   done
2109   IFS="$ac_save_ifs"
2110   ;;
2111 esac
2112 else
2113   enable_shared=yes
2114 fi
2115
2116
2117
2118 # validate options
2119 if test $ol_enable_slapd = no ; then
2120                 if test $ol_enable_dnssrv = yes ; then
2121                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2122         fi
2123         if test $ol_enable_ldap = yes ; then
2124                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2125         fi
2126         if test $ol_enable_ldbm = yes ; then
2127                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2128         fi
2129         if test $ol_enable_passwd = yes ; then
2130                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2131         fi
2132         if test $ol_enable_shell = yes ; then
2133                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2134         fi
2135         if test $ol_enable_sql = yes ; then
2136                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2137         fi
2138         if test $ol_enable_modules = yes ; then
2139                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2140         fi
2141         if test $ol_enable_multimaster = yes ; then
2142                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2143         fi
2144         if test $ol_enable_wrappers = yes ; then
2145                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2146         fi
2147         if test $ol_enable_phonetic = yes ; then
2148                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2149         fi
2150         if test $ol_enable_rlookups = yes ; then
2151                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2152         fi
2153         if test $ol_enable_aci = yes ; then
2154                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2155         fi
2156         if test $ol_with_ldbm_api != auto ; then
2157                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2158         fi
2159         if test $ol_with_ldbm_type != auto ; then
2160                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2161         fi
2162         if test $ol_with_dnssrv_module != static ; then
2163                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2164         fi
2165         if test $ol_with_ldap_module != static ; then
2166                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2167         fi
2168         if test $ol_with_ldbm_module != static ; then
2169                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2170         fi
2171         if test $ol_with_passwd_module != static ; then
2172                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2173         fi
2174         if test $ol_with_shell_module != static ; then
2175                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2176         fi
2177         if test $ol_with_sql_module != static ; then
2178                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2179         fi
2180         if test $ol_enable_slurpd = yes ; then
2181                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2182         fi
2183
2184         # force settings to no
2185         ol_enable_dnssrv=no
2186         ol_enable_ldap=no
2187         ol_enable_ldbm=no
2188         ol_enable_passwd=no
2189         ol_enable_shell=no
2190         ol_enable_sql=no
2191
2192         ol_enable_modules=no
2193         ol_enable_multimaster=no
2194         ol_enable_phonetic=no
2195         ol_enable_rlookups=no
2196         ol_enable_aci=no
2197         ol_enable_wrappers=no
2198         ol_enable_dynamic=no
2199
2200         ol_with_ldbm_api=no
2201         ol_with_ldbm_type=no
2202
2203         ol_with_dnssrv_module=static
2204         ol_with_ldap_module=static
2205         ol_with_ldbm_module=static
2206         ol_with_passwd_module=static
2207         ol_with_shell_module=static
2208         ol_with_sql_module=static
2209
2210         ol_enable_slurpd=no
2211
2212 elif test $ol_enable_ldbm = no ; then
2213         
2214         if test $ol_with_ldbm_api != auto ; then
2215                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2216         fi
2217
2218         if test $ol_with_ldbm_type != auto ; then
2219                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2220         fi
2221
2222         if test $ol_with_ldbm_module != static ; then
2223                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2224         fi
2225
2226         if test $ol_enable_modules != yes -a \
2227                 $ol_enable_dnssrv = no -a \
2228                 $ol_enable_ldap = no -a \
2229                 $ol_enable_passwd = no -a \
2230                 $ol_enable_shell = no -a \
2231                 $ol_enable_sql = no ; then
2232                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2233         fi
2234
2235         ol_with_ldbm_api=no
2236         ol_with_ldbm_type=no
2237         ol_with_ldbm_module=static
2238
2239 else
2240                 if test $ol_with_ldbm_api = gdbm -a \
2241                 $ol_with_ldbm_type = btree ; then
2242                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2243         fi
2244         if test $ol_with_ldbm_api = mdbm -a \
2245                 $ol_with_ldbm_type = btree ; then
2246                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2247         fi
2248         if test $ol_with_ldbm_api = ndbm -a \
2249                 $ol_with_ldbm_type = btree ; then
2250                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2251         fi
2252 fi
2253
2254 if test $ol_enable_slurpd = yes ; then
2255                 if test $ol_with_threads = no ; then
2256                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2257         fi
2258 fi
2259
2260 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2261         if test $ol_with_kerberos = no ; then
2262                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2263         fi
2264         ol_with_kerberos=yes
2265 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2266         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2267                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2268         fi
2269         ol_with_kerberos=no
2270 fi
2271
2272 if test $ol_enable_spasswd = yes ; then
2273         if test $ol_with_cyrus_sasl = no ; then
2274                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2275         fi
2276         ol_with_cyrus_sasl=yes
2277 fi
2278
2279 echo "$ac_t""done" 1>&6
2280
2281 LDAP_LIBS=
2282 LDIF_LIBS=
2283 LDBM_LIBS=
2284 LTHREAD_LIBS=
2285 LUTIL_LIBS=
2286
2287 SLAPD_LIBS=
2288 SLURPD_LIBS=
2289
2290 BUILD_SLAPD=no
2291 BUILD_SLURPD=no
2292
2293 BUILD_THREAD=no
2294
2295 BUILD_DNSSRV=no
2296 BUILD_LDAP=no
2297 BUILD_LDBM=no
2298 BUILD_PASSWD=no
2299 BUILD_SHELL=no
2300 BUILD_SQL=no
2301
2302 BUILD_DNSSRV_DYNAMIC=static
2303 BUILD_LDAP_DYNAMIC=static
2304 BUILD_LDBM_DYNAMIC=static
2305 BUILD_PASSWD_DYNAMIC=static
2306 BUILD_SHELL_DYNAMIC=static
2307 BUILD_SQL_DYNAMIC=static
2308
2309 SLAPD_MODULES_LDFLAGS=
2310 SLAPD_MODULES_CPPFLAGS=
2311 SLAPD_MODULES_LIST=
2312
2313 SLAPD_SQL_LDFLAGS=
2314 SLAPD_SQL_LIBS=
2315 SLAPD_SQL_INCLUDES=
2316
2317 KRB4_LIBS=
2318 KRB5_LIBS=
2319 READLINE_LIBS=
2320 SASL_LIBS=
2321 TERMCAP_LIBS=
2322 TLS_LIBS=
2323 MODULES_LIBS=
2324 AUTH_LIBS=
2325
2326
2327
2328 cat >> confdefs.h <<\EOF
2329 #define HAVE_MKVERSION 1
2330 EOF
2331
2332
2333
2334
2335 ol_aix_threads=no
2336 case "$target" in
2337 *-*-aix*)       if test -z "$CC" ; then
2338                 case "$ol_with_threads" in
2339                 auto | yes |  posix) ol_aix_threads=yes ;;
2340                 esac
2341         fi
2342 ;;
2343 esac
2344
2345 if test $ol_aix_threads = yes ; then
2346         if test -z "${CC}" ; then
2347                 for ac_prog in cc_r xlc_r cc
2348 do
2349 # Extract the first word of "$ac_prog", so it can be a program name with args.
2350 set dummy $ac_prog; ac_word=$2
2351 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2352 echo "configure:2353: checking for $ac_word" >&5
2353 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2354   echo $ac_n "(cached) $ac_c" 1>&6
2355 else
2356   if test -n "$CC"; then
2357   ac_cv_prog_CC="$CC" # Let the user override the test.
2358 else
2359   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2360   ac_dummy="$PATH"
2361   for ac_dir in $ac_dummy; do
2362     test -z "$ac_dir" && ac_dir=.
2363     if test -f $ac_dir/$ac_word; then
2364       ac_cv_prog_CC="$ac_prog"
2365       break
2366     fi
2367   done
2368   IFS="$ac_save_ifs"
2369 fi
2370 fi
2371 CC="$ac_cv_prog_CC"
2372 if test -n "$CC"; then
2373   echo "$ac_t""$CC" 1>&6
2374 else
2375   echo "$ac_t""no" 1>&6
2376 fi
2377
2378 test -n "$CC" && break
2379 done
2380
2381
2382                 if test "$CC" = cc ; then
2383                                                 if test $ol_with_threads != auto ; then
2384                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2385                         else
2386                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2387                         fi
2388                         ol_with_threads=no
2389                 fi
2390         fi
2391
2392         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2393                 ol_with_threads=posix
2394                 ol_cv_pthread_create=yes
2395         fi
2396 fi
2397
2398 if test -z "${CC}"; then
2399         for ac_prog in cc
2400 do
2401 # Extract the first word of "$ac_prog", so it can be a program name with args.
2402 set dummy $ac_prog; ac_word=$2
2403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2404 echo "configure:2405: checking for $ac_word" >&5
2405 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2406   echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408   if test -n "$CC"; then
2409   ac_cv_prog_CC="$CC" # Let the user override the test.
2410 else
2411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2412   ac_dummy="$PATH"
2413   for ac_dir in $ac_dummy; do
2414     test -z "$ac_dir" && ac_dir=.
2415     if test -f $ac_dir/$ac_word; then
2416       ac_cv_prog_CC="$ac_prog"
2417       break
2418     fi
2419   done
2420   IFS="$ac_save_ifs"
2421 fi
2422 fi
2423 CC="$ac_cv_prog_CC"
2424 if test -n "$CC"; then
2425   echo "$ac_t""$CC" 1>&6
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429
2430 test -n "$CC" && break
2431 done
2432
2433 fi
2434
2435
2436
2437
2438 # Check whether --enable-fast-install or --disable-fast-install was given.
2439 if test "${enable_fast_install+set}" = set; then
2440   enableval="$enable_fast_install"
2441   p=${PACKAGE-default}
2442 case "$enableval" in
2443 yes) enable_fast_install=yes ;;
2444 no) enable_fast_install=no ;;
2445 *)
2446   enable_fast_install=no
2447   # Look at the argument we got.  We use all the common list separators.
2448   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2449   for pkg in $enableval; do
2450     if test "X$pkg" = "X$p"; then
2451       enable_fast_install=yes
2452     fi
2453   done
2454   IFS="$ac_save_ifs"
2455   ;;
2456 esac
2457 else
2458   enable_fast_install=yes
2459 fi
2460
2461 # Extract the first word of "ranlib", so it can be a program name with args.
2462 set dummy ranlib; ac_word=$2
2463 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2464 echo "configure:2465: checking for $ac_word" >&5
2465 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2466   echo $ac_n "(cached) $ac_c" 1>&6
2467 else
2468   if test -n "$RANLIB"; then
2469   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2470 else
2471   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2472   ac_dummy="$PATH"
2473   for ac_dir in $ac_dummy; do
2474     test -z "$ac_dir" && ac_dir=.
2475     if test -f $ac_dir/$ac_word; then
2476       ac_cv_prog_RANLIB="ranlib"
2477       break
2478     fi
2479   done
2480   IFS="$ac_save_ifs"
2481   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2482 fi
2483 fi
2484 RANLIB="$ac_cv_prog_RANLIB"
2485 if test -n "$RANLIB"; then
2486   echo "$ac_t""$RANLIB" 1>&6
2487 else
2488   echo "$ac_t""no" 1>&6
2489 fi
2490
2491 # Extract the first word of "gcc", so it can be a program name with args.
2492 set dummy gcc; ac_word=$2
2493 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2494 echo "configure:2495: checking for $ac_word" >&5
2495 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2496   echo $ac_n "(cached) $ac_c" 1>&6
2497 else
2498   if test -n "$CC"; then
2499   ac_cv_prog_CC="$CC" # Let the user override the test.
2500 else
2501   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2502   ac_dummy="$PATH"
2503   for ac_dir in $ac_dummy; do
2504     test -z "$ac_dir" && ac_dir=.
2505     if test -f $ac_dir/$ac_word; then
2506       ac_cv_prog_CC="gcc"
2507       break
2508     fi
2509   done
2510   IFS="$ac_save_ifs"
2511 fi
2512 fi
2513 CC="$ac_cv_prog_CC"
2514 if test -n "$CC"; then
2515   echo "$ac_t""$CC" 1>&6
2516 else
2517   echo "$ac_t""no" 1>&6
2518 fi
2519
2520 if test -z "$CC"; then
2521   # Extract the first word of "cc", so it can be a program name with args.
2522 set dummy cc; ac_word=$2
2523 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2524 echo "configure:2525: checking for $ac_word" >&5
2525 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2526   echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528   if test -n "$CC"; then
2529   ac_cv_prog_CC="$CC" # Let the user override the test.
2530 else
2531   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2532   ac_prog_rejected=no
2533   ac_dummy="$PATH"
2534   for ac_dir in $ac_dummy; do
2535     test -z "$ac_dir" && ac_dir=.
2536     if test -f $ac_dir/$ac_word; then
2537       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2538         ac_prog_rejected=yes
2539         continue
2540       fi
2541       ac_cv_prog_CC="cc"
2542       break
2543     fi
2544   done
2545   IFS="$ac_save_ifs"
2546 if test $ac_prog_rejected = yes; then
2547   # We found a bogon in the path, so make sure we never use it.
2548   set dummy $ac_cv_prog_CC
2549   shift
2550   if test $# -gt 0; then
2551     # We chose a different compiler from the bogus one.
2552     # However, it has the same basename, so the bogon will be chosen
2553     # first if we set CC to just the basename; use the full file name.
2554     shift
2555     set dummy "$ac_dir/$ac_word" "$@"
2556     shift
2557     ac_cv_prog_CC="$@"
2558   fi
2559 fi
2560 fi
2561 fi
2562 CC="$ac_cv_prog_CC"
2563 if test -n "$CC"; then
2564   echo "$ac_t""$CC" 1>&6
2565 else
2566   echo "$ac_t""no" 1>&6
2567 fi
2568
2569   if test -z "$CC"; then
2570     case "`uname -s`" in
2571     *win32* | *WIN32* | *CYGWIN*)
2572       # Extract the first word of "cl", so it can be a program name with args.
2573 set dummy cl; ac_word=$2
2574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2575 echo "configure:2576: checking for $ac_word" >&5
2576 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2577   echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579   if test -n "$CC"; then
2580   ac_cv_prog_CC="$CC" # Let the user override the test.
2581 else
2582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2583   ac_dummy="$PATH"
2584   for ac_dir in $ac_dummy; do
2585     test -z "$ac_dir" && ac_dir=.
2586     if test -f $ac_dir/$ac_word; then
2587       ac_cv_prog_CC="cl"
2588       break
2589     fi
2590   done
2591   IFS="$ac_save_ifs"
2592 fi
2593 fi
2594 CC="$ac_cv_prog_CC"
2595 if test -n "$CC"; then
2596   echo "$ac_t""$CC" 1>&6
2597 else
2598   echo "$ac_t""no" 1>&6
2599 fi
2600  ;;
2601     esac
2602   fi
2603   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2604 fi
2605
2606 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2607 echo "configure:2608: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2608
2609 ac_ext=c
2610 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2611 ac_cpp='$CPP $CPPFLAGS'
2612 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2613 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2614 cross_compiling=$ac_cv_prog_cc_cross
2615
2616 cat > conftest.$ac_ext << EOF
2617
2618 #line 2619 "configure"
2619 #include "confdefs.h"
2620
2621 main(){return(0);}
2622 EOF
2623 if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2624   ac_cv_prog_cc_works=yes
2625   # If we can't run a trivial program, we are probably using a cross compiler.
2626   if (./conftest; exit) 2>/dev/null; then
2627     ac_cv_prog_cc_cross=no
2628   else
2629     ac_cv_prog_cc_cross=yes
2630   fi
2631 else
2632   echo "configure: failed program was:" >&5
2633   cat conftest.$ac_ext >&5
2634   ac_cv_prog_cc_works=no
2635 fi
2636 rm -fr conftest*
2637 ac_ext=c
2638 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2639 ac_cpp='$CPP $CPPFLAGS'
2640 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2641 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2642 cross_compiling=$ac_cv_prog_cc_cross
2643
2644 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2645 if test $ac_cv_prog_cc_works = no; then
2646   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2647 fi
2648 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2649 echo "configure:2650: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2650 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2651 cross_compiling=$ac_cv_prog_cc_cross
2652
2653 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2654 echo "configure:2655: checking whether we are using GNU C" >&5
2655 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2656   echo $ac_n "(cached) $ac_c" 1>&6
2657 else
2658   cat > conftest.c <<EOF
2659 #ifdef __GNUC__
2660   yes;
2661 #endif
2662 EOF
2663 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2664   ac_cv_prog_gcc=yes
2665 else
2666   ac_cv_prog_gcc=no
2667 fi
2668 fi
2669
2670 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2671
2672 if test $ac_cv_prog_gcc = yes; then
2673   GCC=yes
2674 else
2675   GCC=
2676 fi
2677
2678 ac_test_CFLAGS="${CFLAGS+set}"
2679 ac_save_CFLAGS="$CFLAGS"
2680 CFLAGS=
2681 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2682 echo "configure:2683: checking whether ${CC-cc} accepts -g" >&5
2683 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2684   echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686   echo 'void f(){}' > conftest.c
2687 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2688   ac_cv_prog_cc_g=yes
2689 else
2690   ac_cv_prog_cc_g=no
2691 fi
2692 rm -f conftest*
2693
2694 fi
2695
2696 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2697 if test "$ac_test_CFLAGS" = set; then
2698   CFLAGS="$ac_save_CFLAGS"
2699 elif test $ac_cv_prog_cc_g = yes; then
2700   if test "$GCC" = yes; then
2701     CFLAGS="-g -O2"
2702   else
2703     CFLAGS="-g"
2704   fi
2705 else
2706   if test "$GCC" = yes; then
2707     CFLAGS="-O2"
2708   else
2709     CFLAGS=
2710   fi
2711 fi
2712
2713 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2714 if test "${with_gnu_ld+set}" = set; then
2715   withval="$with_gnu_ld"
2716   test "$withval" = no || with_gnu_ld=yes
2717 else
2718   with_gnu_ld=no
2719 fi
2720
2721 ac_prog=ld
2722 if test "$ac_cv_prog_gcc" = yes; then
2723   # Check if gcc -print-prog-name=ld gives a path.
2724   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2725 echo "configure:2726: checking for ld used by GCC" >&5
2726   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2727   case "$ac_prog" in
2728     # Accept absolute paths.
2729     [\\/]* | [A-Za-z]:[\\/]*)
2730       re_direlt='/[^/][^/]*/\.\./'
2731       # Canonicalize the path of ld
2732       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2733       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2734         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2735       done
2736       test -z "$LD" && LD="$ac_prog"
2737       ;;
2738   "")
2739     # If it fails, then pretend we aren't using GCC.
2740     ac_prog=ld
2741     ;;
2742   *)
2743     # If it is relative, then search for the first ld in PATH.
2744     with_gnu_ld=unknown
2745     ;;
2746   esac
2747 elif test "$with_gnu_ld" = yes; then
2748   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2749 echo "configure:2750: checking for GNU ld" >&5
2750 else
2751   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2752 echo "configure:2753: checking for non-GNU ld" >&5
2753 fi
2754 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2755   echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757   if test -z "$LD"; then
2758   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2759   for ac_dir in $PATH; do
2760     test -z "$ac_dir" && ac_dir=.
2761     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2762       ac_cv_path_LD="$ac_dir/$ac_prog"
2763       # Check to see if the program is GNU ld.  I'd rather use --version,
2764       # but apparently some GNU ld's only accept -v.
2765       # Break only if it was the GNU/non-GNU ld that we prefer.
2766       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2767         test "$with_gnu_ld" != no && break
2768       else
2769         test "$with_gnu_ld" != yes && break
2770       fi
2771     fi
2772   done
2773   IFS="$ac_save_ifs"
2774 else
2775   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2776 fi
2777 fi
2778
2779 LD="$ac_cv_path_LD"
2780 if test -n "$LD"; then
2781   echo "$ac_t""$LD" 1>&6
2782 else
2783   echo "$ac_t""no" 1>&6
2784 fi
2785 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2786 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2787 echo "configure:2788: checking if the linker ($LD) is GNU ld" >&5
2788 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2789   echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2792 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2793   ac_cv_prog_gnu_ld=yes
2794 else
2795   ac_cv_prog_gnu_ld=no
2796 fi
2797 fi
2798
2799 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2800
2801
2802 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2803 echo "configure:2804: checking for BSD-compatible nm" >&5
2804 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2805   echo $ac_n "(cached) $ac_c" 1>&6
2806 else
2807   if test -n "$NM"; then
2808   # Let the user override the test.
2809   ac_cv_path_NM="$NM"
2810 else
2811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2812   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2813     test -z "$ac_dir" && ac_dir=.
2814     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2815       # Check to see if the nm accepts a BSD-compat flag.
2816       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2817       #   nm: unknown option "B" ignored
2818       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2819         ac_cv_path_NM="$ac_dir/nm -B"
2820         break
2821       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2822         ac_cv_path_NM="$ac_dir/nm -p"
2823         break
2824       else
2825         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2826         continue # so that we can try to find one that supports BSD flags
2827       fi
2828     fi
2829   done
2830   IFS="$ac_save_ifs"
2831   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2832 fi
2833 fi
2834
2835 NM="$ac_cv_path_NM"
2836 echo "$ac_t""$NM" 1>&6
2837
2838 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2839 echo "configure:2840: checking whether ln -s works" >&5
2840 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2841   echo $ac_n "(cached) $ac_c" 1>&6
2842 else
2843   rm -f conftestdata
2844 if ln -s X conftestdata 2>/dev/null
2845 then
2846   rm -f conftestdata
2847   ac_cv_prog_LN_S="ln -s"
2848 else
2849   ac_cv_prog_LN_S=ln
2850 fi
2851 fi
2852 LN_S="$ac_cv_prog_LN_S"
2853 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2854   echo "$ac_t""yes" 1>&6
2855 else
2856   echo "$ac_t""no" 1>&6
2857 fi
2858
2859 if test $host != $build; then
2860   ac_tool_prefix=${host_alias}-
2861 else
2862   ac_tool_prefix=
2863 fi
2864
2865
2866 case "$target" in
2867 NONE) lt_target="$host" ;;
2868 *) lt_target="$target" ;;
2869 esac
2870
2871 # Check for any special flags to pass to ltconfig.
2872 libtool_flags="--cache-file=$cache_file"
2873 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2874 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2875 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2876 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2877 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2878 libtool_flags="$libtool_flags --enable-dlopen"
2879 libtool_flags="$libtool_flags --enable-win32-dll"
2880 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2881 if test "${enable_libtool_lock+set}" = set; then
2882   enableval="$enable_libtool_lock"
2883   :
2884 fi
2885
2886 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2887 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2888
2889 # Some flags need to be propagated to the compiler or linker for good
2890 # libtool support.
2891 case "$lt_target" in
2892 *-*-irix6*)
2893   # Find out which ABI we are using.
2894   echo '#line 2895 "configure"' > conftest.$ac_ext
2895   if { (eval echo configure:2896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2896     case "`/usr/bin/file conftest.o`" in
2897     *32-bit*)
2898       LD="${LD-ld} -32"
2899       ;;
2900     *N32*)
2901       LD="${LD-ld} -n32"
2902       ;;
2903     *64-bit*)
2904       LD="${LD-ld} -64"
2905       ;;
2906     esac
2907   fi
2908   rm -rf conftest*
2909   ;;
2910
2911 *-*-sco3.2v5*)
2912   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2913   SAVE_CFLAGS="$CFLAGS"
2914   CFLAGS="$CFLAGS -belf"
2915   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2916 echo "configure:2917: checking whether the C compiler needs -belf" >&5
2917 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   cat > conftest.$ac_ext <<EOF
2921 #line 2922 "configure"
2922 #include "confdefs.h"
2923
2924 int main() {
2925
2926 ; return 0; }
2927 EOF
2928 if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2929   rm -rf conftest*
2930   lt_cv_cc_needs_belf=yes
2931 else
2932   echo "configure: failed program was:" >&5
2933   cat conftest.$ac_ext >&5
2934   rm -rf conftest*
2935   lt_cv_cc_needs_belf=no
2936 fi
2937 rm -f conftest*
2938 fi
2939
2940 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2941   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2942     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2943     CFLAGS="$SAVE_CFLAGS"
2944   fi
2945   ;;
2946
2947 *-*-cygwin* | *-*-mingw*)
2948   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2949 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2950 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2951 echo "configure:2952: checking for $ac_word" >&5
2952 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   if test -n "$DLLTOOL"; then
2956   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2957 else
2958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2959   ac_dummy="$PATH"
2960   for ac_dir in $ac_dummy; do
2961     test -z "$ac_dir" && ac_dir=.
2962     if test -f $ac_dir/$ac_word; then
2963       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2964       break
2965     fi
2966   done
2967   IFS="$ac_save_ifs"
2968 fi
2969 fi
2970 DLLTOOL="$ac_cv_prog_DLLTOOL"
2971 if test -n "$DLLTOOL"; then
2972   echo "$ac_t""$DLLTOOL" 1>&6
2973 else
2974   echo "$ac_t""no" 1>&6
2975 fi
2976
2977
2978 if test -z "$ac_cv_prog_DLLTOOL"; then
2979 if test -n "$ac_tool_prefix"; then
2980   # Extract the first word of "dlltool", so it can be a program name with args.
2981 set dummy dlltool; ac_word=$2
2982 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2983 echo "configure:2984: checking for $ac_word" >&5
2984 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   if test -n "$DLLTOOL"; then
2988   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2989 else
2990   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2991   ac_dummy="$PATH"
2992   for ac_dir in $ac_dummy; do
2993     test -z "$ac_dir" && ac_dir=.
2994     if test -f $ac_dir/$ac_word; then
2995       ac_cv_prog_DLLTOOL="dlltool"
2996       break
2997     fi
2998   done
2999   IFS="$ac_save_ifs"
3000   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3001 fi
3002 fi
3003 DLLTOOL="$ac_cv_prog_DLLTOOL"
3004 if test -n "$DLLTOOL"; then
3005   echo "$ac_t""$DLLTOOL" 1>&6
3006 else
3007   echo "$ac_t""no" 1>&6
3008 fi
3009
3010 else
3011   DLLTOOL="false"
3012 fi
3013 fi
3014
3015   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3016 set dummy ${ac_tool_prefix}as; ac_word=$2
3017 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3018 echo "configure:3019: checking for $ac_word" >&5
3019 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3020   echo $ac_n "(cached) $ac_c" 1>&6
3021 else
3022   if test -n "$AS"; then
3023   ac_cv_prog_AS="$AS" # Let the user override the test.
3024 else
3025   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3026   ac_dummy="$PATH"
3027   for ac_dir in $ac_dummy; do
3028     test -z "$ac_dir" && ac_dir=.
3029     if test -f $ac_dir/$ac_word; then
3030       ac_cv_prog_AS="${ac_tool_prefix}as"
3031       break
3032     fi
3033   done
3034   IFS="$ac_save_ifs"
3035 fi
3036 fi
3037 AS="$ac_cv_prog_AS"
3038 if test -n "$AS"; then
3039   echo "$ac_t""$AS" 1>&6
3040 else
3041   echo "$ac_t""no" 1>&6
3042 fi
3043
3044
3045 if test -z "$ac_cv_prog_AS"; then
3046 if test -n "$ac_tool_prefix"; then
3047   # Extract the first word of "as", so it can be a program name with args.
3048 set dummy as; ac_word=$2
3049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3050 echo "configure:3051: checking for $ac_word" >&5
3051 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   if test -n "$AS"; then
3055   ac_cv_prog_AS="$AS" # Let the user override the test.
3056 else
3057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3058   ac_dummy="$PATH"
3059   for ac_dir in $ac_dummy; do
3060     test -z "$ac_dir" && ac_dir=.
3061     if test -f $ac_dir/$ac_word; then
3062       ac_cv_prog_AS="as"
3063       break
3064     fi
3065   done
3066   IFS="$ac_save_ifs"
3067   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3068 fi
3069 fi
3070 AS="$ac_cv_prog_AS"
3071 if test -n "$AS"; then
3072   echo "$ac_t""$AS" 1>&6
3073 else
3074   echo "$ac_t""no" 1>&6
3075 fi
3076
3077 else
3078   AS="false"
3079 fi
3080 fi
3081
3082   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3083 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3085 echo "configure:3086: checking for $ac_word" >&5
3086 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3087   echo $ac_n "(cached) $ac_c" 1>&6
3088 else
3089   if test -n "$OBJDUMP"; then
3090   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3091 else
3092   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3093   ac_dummy="$PATH"
3094   for ac_dir in $ac_dummy; do
3095     test -z "$ac_dir" && ac_dir=.
3096     if test -f $ac_dir/$ac_word; then
3097       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3098       break
3099     fi
3100   done
3101   IFS="$ac_save_ifs"
3102 fi
3103 fi
3104 OBJDUMP="$ac_cv_prog_OBJDUMP"
3105 if test -n "$OBJDUMP"; then
3106   echo "$ac_t""$OBJDUMP" 1>&6
3107 else
3108   echo "$ac_t""no" 1>&6
3109 fi
3110
3111
3112 if test -z "$ac_cv_prog_OBJDUMP"; then
3113 if test -n "$ac_tool_prefix"; then
3114   # Extract the first word of "objdump", so it can be a program name with args.
3115 set dummy objdump; ac_word=$2
3116 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3117 echo "configure:3118: checking for $ac_word" >&5
3118 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3119   echo $ac_n "(cached) $ac_c" 1>&6
3120 else
3121   if test -n "$OBJDUMP"; then
3122   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3123 else
3124   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3125   ac_dummy="$PATH"
3126   for ac_dir in $ac_dummy; do
3127     test -z "$ac_dir" && ac_dir=.
3128     if test -f $ac_dir/$ac_word; then
3129       ac_cv_prog_OBJDUMP="objdump"
3130       break
3131     fi
3132   done
3133   IFS="$ac_save_ifs"
3134   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3135 fi
3136 fi
3137 OBJDUMP="$ac_cv_prog_OBJDUMP"
3138 if test -n "$OBJDUMP"; then
3139   echo "$ac_t""$OBJDUMP" 1>&6
3140 else
3141   echo "$ac_t""no" 1>&6
3142 fi
3143
3144 else
3145   OBJDUMP="false"
3146 fi
3147 fi
3148
3149   ;;
3150
3151 esac
3152
3153
3154 # Save cache, so that ltconfig can load it
3155
3156
3157 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3158 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3159 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3160 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3161 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3162 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3163 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3164 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3165
3166 # Reload cache, that may have been modified by ltconfig
3167
3168
3169 # This can be used to rebuild libtool when needed
3170 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3171
3172 # Always use our own libtool.
3173 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3174
3175 # Redirect the config.log output again, so that the ltconfig log is not
3176 # clobbered by the next message.
3177 exec 5>>./config.log
3178
3179
3180 for ac_prog in mawk gawk nawk awk
3181 do
3182 # Extract the first word of "$ac_prog", so it can be a program name with args.
3183 set dummy $ac_prog; ac_word=$2
3184 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3185 echo "configure:3186: checking for $ac_word" >&5
3186 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   if test -n "$AWK"; then
3190   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3191 else
3192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3193   ac_dummy="$PATH"
3194   for ac_dir in $ac_dummy; do
3195     test -z "$ac_dir" && ac_dir=.
3196     if test -f $ac_dir/$ac_word; then
3197       ac_cv_prog_AWK="$ac_prog"
3198       break
3199     fi
3200   done
3201   IFS="$ac_save_ifs"
3202 fi
3203 fi
3204 AWK="$ac_cv_prog_AWK"
3205 if test -n "$AWK"; then
3206   echo "$ac_t""$AWK" 1>&6
3207 else
3208   echo "$ac_t""no" 1>&6
3209 fi
3210
3211 test -n "$AWK" && break
3212 done
3213
3214 # test for ln hardlink support
3215 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3216 echo "configure:3217: checking whether ln works" >&5
3217 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   rm -f conftest.src conftest.dst
3221 echo "conftest" > conftest.src
3222 if ln conftest.src conftest.dst 2>/dev/null
3223 then
3224   ol_cv_prog_LN_H="ln"
3225 else
3226   ol_cv_prog_LN_H="cp"
3227 fi
3228 rm -f conftest.src conftest.dst
3229
3230 fi
3231 LN_H="$ol_cv_prog_LN_H"
3232 if test "$ol_cv_prog_LN_H" = "ln"; then
3233         echo "$ac_t""yes" 1>&6
3234 else
3235         echo "$ac_t""no" 1>&6
3236 fi
3237
3238 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3239 echo "configure:3240: checking whether ln -s works" >&5
3240 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   rm -f conftestdata
3244 if ln -s X conftestdata 2>/dev/null
3245 then
3246   rm -f conftestdata
3247   ac_cv_prog_LN_S="ln -s"
3248 else
3249   ac_cv_prog_LN_S=ln
3250 fi
3251 fi
3252 LN_S="$ac_cv_prog_LN_S"
3253 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3254   echo "$ac_t""yes" 1>&6
3255 else
3256   echo "$ac_t""no" 1>&6
3257 fi
3258
3259
3260 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3261         LN_S="$LN_H"
3262 fi
3263
3264 # Extract the first word of "sendmail", so it can be a program name with args.
3265 set dummy sendmail; ac_word=$2
3266 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3267 echo "configure:3268: checking for $ac_word" >&5
3268 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3269   echo $ac_n "(cached) $ac_c" 1>&6
3270 else
3271   case "$SENDMAIL" in
3272   /*)
3273   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3274   ;;
3275   ?:/*)
3276   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3277   ;;
3278   *)
3279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3280   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3281   for ac_dir in $ac_dummy; do 
3282     test -z "$ac_dir" && ac_dir=.
3283     if test -f $ac_dir/$ac_word; then
3284       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3285       break
3286     fi
3287   done
3288   IFS="$ac_save_ifs"
3289   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3290   ;;
3291 esac
3292 fi
3293 SENDMAIL="$ac_cv_path_SENDMAIL"
3294 if test -n "$SENDMAIL"; then
3295   echo "$ac_t""$SENDMAIL" 1>&6
3296 else
3297   echo "$ac_t""no" 1>&6
3298 fi
3299
3300 # Extract the first word of "vi", so it can be a program name with args.
3301 set dummy vi; ac_word=$2
3302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3303 echo "configure:3304: checking for $ac_word" >&5
3304 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3305   echo $ac_n "(cached) $ac_c" 1>&6
3306 else
3307   case "$EDITOR" in
3308   /*)
3309   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3310   ;;
3311   ?:/*)
3312   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3313   ;;
3314   *)
3315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3316   ac_dummy="$PATH:/usr/ucb"
3317   for ac_dir in $ac_dummy; do 
3318     test -z "$ac_dir" && ac_dir=.
3319     if test -f $ac_dir/$ac_word; then
3320       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3321       break
3322     fi
3323   done
3324   IFS="$ac_save_ifs"
3325   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3326   ;;
3327 esac
3328 fi
3329 EDITOR="$ac_cv_path_EDITOR"
3330 if test -n "$EDITOR"; then
3331   echo "$ac_t""$EDITOR" 1>&6
3332 else
3333   echo "$ac_t""no" 1>&6
3334 fi
3335
3336 # Extract the first word of "finger", so it can be a program name with args.
3337 set dummy finger; ac_word=$2
3338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_word" >&5
3340 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3341   echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343   case "$FINGER" in
3344   /*)
3345   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3346   ;;
3347   ?:/*)
3348   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3349   ;;
3350   *)
3351   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3352   ac_dummy="$PATH:/usr/ucb"
3353   for ac_dir in $ac_dummy; do 
3354     test -z "$ac_dir" && ac_dir=.
3355     if test -f $ac_dir/$ac_word; then
3356       ac_cv_path_FINGER="$ac_dir/$ac_word"
3357       break
3358     fi
3359   done
3360   IFS="$ac_save_ifs"
3361   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3362   ;;
3363 esac
3364 fi
3365 FINGER="$ac_cv_path_FINGER"
3366 if test -n "$FINGER"; then
3367   echo "$ac_t""$FINGER" 1>&6
3368 else
3369   echo "$ac_t""no" 1>&6
3370 fi
3371
3372
3373 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3374 echo "configure:3375: checking how to run the C preprocessor" >&5
3375 # On Suns, sometimes $CPP names a directory.
3376 if test -n "$CPP" && test -d "$CPP"; then
3377   CPP=
3378 fi
3379 if test -z "$CPP"; then
3380 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3381   echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383     # This must be in double quotes, not single quotes, because CPP may get
3384   # substituted into the Makefile and "${CC-cc}" will confuse make.
3385   CPP="${CC-cc} -E"
3386   # On the NeXT, cc -E runs the code through the compiler's parser,
3387   # not just through cpp.
3388   cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 #include <assert.h>
3392 Syntax Error
3393 EOF
3394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3395 { (eval echo configure:3396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3397 if test -z "$ac_err"; then
3398   :
3399 else
3400   echo "$ac_err" >&5
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   CPP="${CC-cc} -E -traditional-cpp"
3405   cat > conftest.$ac_ext <<EOF
3406 #line 3407 "configure"
3407 #include "confdefs.h"
3408 #include <assert.h>
3409 Syntax Error
3410 EOF
3411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3412 { (eval echo configure:3413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3414 if test -z "$ac_err"; then
3415   :
3416 else
3417   echo "$ac_err" >&5
3418   echo "configure: failed program was:" >&5
3419   cat conftest.$ac_ext >&5
3420   rm -rf conftest*
3421   CPP="${CC-cc} -nologo -E"
3422   cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 #include <assert.h>
3426 Syntax Error
3427 EOF
3428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3429 { (eval echo configure:3430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3431 if test -z "$ac_err"; then
3432   :
3433 else
3434   echo "$ac_err" >&5
3435   echo "configure: failed program was:" >&5
3436   cat conftest.$ac_ext >&5
3437   rm -rf conftest*
3438   CPP=/lib/cpp
3439 fi
3440 rm -f conftest*
3441 fi
3442 rm -f conftest*
3443 fi
3444 rm -f conftest*
3445   ac_cv_prog_CPP="$CPP"
3446 fi
3447   CPP="$ac_cv_prog_CPP"
3448 else
3449   ac_cv_prog_CPP="$CPP"
3450 fi
3451 echo "$ac_t""$CPP" 1>&6
3452
3453
3454 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3455         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3456
3457 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3458         echo "configure: warning: programs compiled here do run here..." 1>&2
3459         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3460
3461 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3462         echo "configure: warning: programs compiled here do not run here..." 1>&2
3463         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3464 fi
3465
3466 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3467 echo "configure:3468: checking for AIX" >&5
3468 cat > conftest.$ac_ext <<EOF
3469 #line 3470 "configure"
3470 #include "confdefs.h"
3471 #ifdef _AIX
3472   yes
3473 #endif
3474
3475 EOF
3476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3477   egrep "yes" >/dev/null 2>&1; then
3478   rm -rf conftest*
3479   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3480 #define _ALL_SOURCE 1
3481 EOF
3482
3483 else
3484   rm -rf conftest*
3485   echo "$ac_t""no" 1>&6
3486 fi
3487 rm -f conftest*
3488
3489
3490 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3491 echo "configure:3492: checking for POSIXized ISC" >&5
3492 if test -d /etc/conf/kconfig.d &&
3493   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3494 then
3495   echo "$ac_t""yes" 1>&6
3496   ISC=yes # If later tests want to check for ISC.
3497   cat >> confdefs.h <<\EOF
3498 #define _POSIX_SOURCE 1
3499 EOF
3500
3501   if test "$GCC" = yes; then
3502     CC="$CC -posix"
3503   else
3504     CC="$CC -Xp"
3505   fi
3506 else
3507   echo "$ac_t""no" 1>&6
3508   ISC=
3509 fi
3510
3511 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3512 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3513 echo "configure:3514: checking for minix/config.h" >&5
3514 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 #include <minix/config.h>
3521 EOF
3522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3523 { (eval echo configure:3524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3525 if test -z "$ac_err"; then
3526   rm -rf conftest*
3527   eval "ac_cv_header_$ac_safe=yes"
3528 else
3529   echo "$ac_err" >&5
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   eval "ac_cv_header_$ac_safe=no"
3534 fi
3535 rm -f conftest*
3536 fi
3537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3538   echo "$ac_t""yes" 1>&6
3539   MINIX=yes
3540 else
3541   echo "$ac_t""no" 1>&6
3542 MINIX=
3543 fi
3544
3545 if test "$MINIX" = yes; then
3546   cat >> confdefs.h <<\EOF
3547 #define _POSIX_SOURCE 1
3548 EOF
3549
3550   cat >> confdefs.h <<\EOF
3551 #define _POSIX_1_SOURCE 2
3552 EOF
3553
3554   cat >> confdefs.h <<\EOF
3555 #define _MINIX 1
3556 EOF
3557
3558 fi
3559
3560
3561 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3562 echo "configure:3563: checking for Cygwin environment" >&5
3563 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   cat > conftest.$ac_ext <<EOF
3567 #line 3568 "configure"
3568 #include "confdefs.h"
3569
3570 int main() {
3571
3572 #ifndef __CYGWIN__
3573 #define __CYGWIN__ __CYGWIN32__
3574 #endif
3575 return __CYGWIN__;
3576 ; return 0; }
3577 EOF
3578 if { (eval echo configure:3579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3579   rm -rf conftest*
3580   ac_cv_cygwin=yes
3581 else
3582   echo "configure: failed program was:" >&5
3583   cat conftest.$ac_ext >&5
3584   rm -rf conftest*
3585   ac_cv_cygwin=no
3586 fi
3587 rm -f conftest*
3588 fi
3589
3590 echo "$ac_t""$ac_cv_cygwin" 1>&6
3591 CYGWIN=
3592 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3593 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3594 echo "configure:3595: checking for mingw32 environment" >&5
3595 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601
3602 int main() {
3603 return __MINGW32__;
3604 ; return 0; }
3605 EOF
3606 if { (eval echo configure:3607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3607   rm -rf conftest*
3608   ac_cv_mingw32=yes
3609 else
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -rf conftest*
3613   ac_cv_mingw32=no
3614 fi
3615 rm -f conftest*
3616 fi
3617
3618 echo "$ac_t""$ac_cv_mingw32" 1>&6
3619 MINGW32=
3620 test "$ac_cv_mingw32" = yes && MINGW32=yes
3621 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3622 echo "configure:3623: checking for EMX OS/2 environment" >&5
3623 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626   cat > conftest.$ac_ext <<EOF
3627 #line 3628 "configure"
3628 #include "confdefs.h"
3629
3630 int main() {
3631 return __EMX__;
3632 ; return 0; }
3633 EOF
3634 if { (eval echo configure:3635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3635   rm -rf conftest*
3636   ac_cv_emxos2=yes
3637 else
3638   echo "configure: failed program was:" >&5
3639   cat conftest.$ac_ext >&5
3640   rm -rf conftest*
3641   ac_cv_emxos2=no
3642 fi
3643 rm -f conftest*
3644 fi
3645
3646 echo "$ac_t""$ac_cv_emxos2" 1>&6
3647 EMXOS2=
3648 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3649
3650
3651
3652 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3653 echo "configure:3654: checking for executable suffix" >&5
3654 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3658   ac_cv_exeext=.exe
3659 else
3660   rm -f conftest*
3661   echo 'int main () { return 0; }' > conftest.$ac_ext
3662   ac_cv_exeext=
3663   if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3664     for file in conftest.*; do
3665       case $file in
3666       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3667       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3668       esac
3669     done
3670   else
3671     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3672   fi
3673   rm -f conftest*
3674   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3675 fi
3676 fi
3677
3678 EXEEXT=""
3679 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3680 echo "$ac_t""${ac_cv_exeext}" 1>&6
3681 ac_exeext=$EXEEXT
3682
3683 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3684 echo "configure:3685: checking for object suffix" >&5
3685 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3686   echo $ac_n "(cached) $ac_c" 1>&6
3687 else
3688   rm -f conftest*
3689 echo 'int i = 1;' > conftest.$ac_ext
3690 if { (eval echo configure:3691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3691   for ac_file in conftest.*; do
3692     case $ac_file in
3693     *.c) ;;
3694     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3695     esac
3696   done
3697 else
3698   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3699 fi
3700 rm -f conftest*
3701 fi
3702
3703 echo "$ac_t""$ac_cv_objext" 1>&6
3704 OBJEXT=$ac_cv_objext
3705 ac_objext=$ac_cv_objext
3706
3707
3708 cat >> confdefs.h <<EOF
3709 #define EXEEXT "${EXEEXT}"
3710 EOF
3711
3712
3713 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3714 echo "configure:3715: checking for be_app in -lbe" >&5
3715 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3716 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3717   echo $ac_n "(cached) $ac_c" 1>&6
3718 else
3719   ac_save_LIBS="$LIBS"
3720 LIBS="-lbe -lroot -lnet $LIBS"
3721 cat > conftest.$ac_ext <<EOF
3722 #line 3723 "configure"
3723 #include "confdefs.h"
3724 /* Override any gcc2 internal prototype to avoid an error.  */
3725 /* We use char because int might match the return type of a gcc2
3726     builtin and then its argument prototype would still apply.  */
3727 char be_app();
3728
3729 int main() {
3730 be_app()
3731 ; return 0; }
3732 EOF
3733 if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3734   rm -rf conftest*
3735   eval "ac_cv_lib_$ac_lib_var=yes"
3736 else
3737   echo "configure: failed program was:" >&5
3738   cat conftest.$ac_ext >&5
3739   rm -rf conftest*
3740   eval "ac_cv_lib_$ac_lib_var=no"
3741 fi
3742 rm -f conftest*
3743 LIBS="$ac_save_LIBS"
3744
3745 fi
3746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3747   echo "$ac_t""yes" 1>&6
3748   LIBS="$LIBS -lbe -lroot -lnet"
3749 else
3750   echo "$ac_t""no" 1>&6
3751 :
3752 fi
3753
3754
3755
3756
3757
3758 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3759 echo "configure:3760: checking for ${CC-cc} option to accept ANSI C" >&5
3760 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3761   echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763   am_cv_prog_cc_stdc=no
3764 ac_save_CC="$CC"
3765 # Don't try gcc -ansi; that turns off useful extensions and
3766 # breaks some systems' header files.
3767 # AIX                   -qlanglvl=ansi
3768 # Ultrix and OSF/1      -std1
3769 # HP-UX 10.20 and later -Ae
3770 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3771 # SVR4                  -Xc -D__EXTENSIONS__
3772 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3773 do
3774   CC="$ac_save_CC $ac_arg"
3775   cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778 #include <stdarg.h>
3779 #include <stdio.h>
3780 #include <sys/types.h>
3781 #include <sys/stat.h>
3782 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3783 struct buf { int x; };
3784 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3785 static char *e (p, i)
3786      char **p;
3787      int i;
3788 {
3789   return p[i];
3790 }
3791 static char *f (char * (*g) (char **, int), char **p, ...)
3792 {
3793   char *s;
3794   va_list v;
3795   va_start (v,p);
3796   s = g (p, va_arg (v,int));
3797   va_end (v);
3798   return s;
3799 }
3800 int test (int i, double x);
3801 struct s1 {int (*f) (int a);};
3802 struct s2 {int (*f) (double a);};
3803 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3804 int argc;
3805 char **argv;
3806
3807 int main() {
3808
3809 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3810
3811 ; return 0; }
3812 EOF
3813 if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3814   rm -rf conftest*
3815   am_cv_prog_cc_stdc="$ac_arg"; break
3816 else
3817   echo "configure: failed program was:" >&5
3818   cat conftest.$ac_ext >&5
3819 fi
3820 rm -f conftest*
3821 done
3822 CC="$ac_save_CC"
3823
3824 fi
3825
3826 if test -z "$am_cv_prog_cc_stdc"; then
3827   echo "$ac_t""none needed" 1>&6
3828 else
3829   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3830 fi
3831 case "x$am_cv_prog_cc_stdc" in
3832   x|xno) ;;
3833   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3834 esac
3835
3836 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3837         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3838 fi
3839
3840 # test for make depend flag
3841 OL_MKDEP=
3842 OL_MKDEP_FLAGS=
3843 if test -z "${MKDEP}"; then
3844         OL_MKDEP="${CC-cc}"
3845         if test -z "${MKDEP_FLAGS}"; then
3846                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3847 echo "configure:3848: checking for ${OL_MKDEP} depend flag" >&5
3848 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3849   echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851   
3852                         ol_cv_mkdep=no
3853                         for flag in "-M" "-xM"; do
3854                                 cat > conftest.c <<EOF
3855  noCode;
3856 EOF
3857                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3858                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3859                                 then
3860                                         if test ! -f conftest."${ac_object}" ; then
3861                                                 ol_cv_mkdep=$flag
3862                                                 OL_MKDEP_FLAGS="$flag"
3863                                                 break
3864                                         fi
3865                                 fi
3866                         done
3867                         rm -f conftest*
3868                 
3869 fi
3870
3871 echo "$ac_t""$ol_cv_mkdep" 1>&6
3872         else
3873                 cc_cv_mkdep=yes
3874                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3875         fi
3876 else
3877         cc_cv_mkdep=yes
3878         OL_MKDEP="${MKDEP}"
3879         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3880 fi
3881
3882
3883
3884 if test "${ol_cv_mkdep}" = no ; then
3885         # this will soon become an error
3886         echo "configure: warning: do not know how to generate dependencies" 1>&2
3887 fi
3888
3889 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3890 echo "configure:3891: checking for afopen in -ls" >&5
3891 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3892 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3893   echo $ac_n "(cached) $ac_c" 1>&6
3894 else
3895   ac_save_LIBS="$LIBS"
3896 LIBS="-ls  $LIBS"
3897 cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900 /* Override any gcc2 internal prototype to avoid an error.  */
3901 /* We use char because int might match the return type of a gcc2
3902     builtin and then its argument prototype would still apply.  */
3903 char afopen();
3904
3905 int main() {
3906 afopen()
3907 ; return 0; }
3908 EOF
3909 if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3910   rm -rf conftest*
3911   eval "ac_cv_lib_$ac_lib_var=yes"
3912 else
3913   echo "configure: failed program was:" >&5
3914   cat conftest.$ac_ext >&5
3915   rm -rf conftest*
3916   eval "ac_cv_lib_$ac_lib_var=no"
3917 fi
3918 rm -f conftest*
3919 LIBS="$ac_save_LIBS"
3920
3921 fi
3922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3923   echo "$ac_t""yes" 1>&6
3924   
3925         AUTH_LIBS=-ls
3926         cat >> confdefs.h <<\EOF
3927 #define HAVE_AIX_SECURITY 1
3928 EOF
3929
3930
3931 else
3932   echo "$ac_t""no" 1>&6
3933 fi
3934
3935
3936
3937 ol_link_modules=no
3938 if test $ol_enable_modules != no ; then
3939         for ac_hdr in ltdl.h
3940 do
3941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3943 echo "configure:3944: checking for $ac_hdr" >&5
3944 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3945   echo $ac_n "(cached) $ac_c" 1>&6
3946 else
3947   cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950 #include <$ac_hdr>
3951 EOF
3952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3953 { (eval echo configure:3954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3955 if test -z "$ac_err"; then
3956   rm -rf conftest*
3957   eval "ac_cv_header_$ac_safe=yes"
3958 else
3959   echo "$ac_err" >&5
3960   echo "configure: failed program was:" >&5
3961   cat conftest.$ac_ext >&5
3962   rm -rf conftest*
3963   eval "ac_cv_header_$ac_safe=no"
3964 fi
3965 rm -f conftest*
3966 fi
3967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3968   echo "$ac_t""yes" 1>&6
3969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3970   cat >> confdefs.h <<EOF
3971 #define $ac_tr_hdr 1
3972 EOF
3973  
3974 else
3975   echo "$ac_t""no" 1>&6
3976 fi
3977 done
3978
3979
3980         if test $ac_cv_header_ltdl_h = no ; then
3981                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3982         fi
3983
3984         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3985 echo "configure:3986: checking for lt_dlinit in -lltdl" >&5
3986 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3988   echo $ac_n "(cached) $ac_c" 1>&6
3989 else
3990   ac_save_LIBS="$LIBS"
3991 LIBS="-lltdl  $LIBS"
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 /* Override any gcc2 internal prototype to avoid an error.  */
3996 /* We use char because int might match the return type of a gcc2
3997     builtin and then its argument prototype would still apply.  */
3998 char lt_dlinit();
3999
4000 int main() {
4001 lt_dlinit()
4002 ; return 0; }
4003 EOF
4004 if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4005   rm -rf conftest*
4006   eval "ac_cv_lib_$ac_lib_var=yes"
4007 else
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   eval "ac_cv_lib_$ac_lib_var=no"
4012 fi
4013 rm -f conftest*
4014 LIBS="$ac_save_LIBS"
4015
4016 fi
4017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4018   echo "$ac_t""yes" 1>&6
4019   
4020             MODULES_LIBS=-lltdl
4021             cat >> confdefs.h <<\EOF
4022 #define HAVE_LIBLTDL 1
4023 EOF
4024
4025         
4026 else
4027   echo "$ac_t""no" 1>&6
4028 fi
4029
4030
4031         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4032                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4033         fi
4034         ol_link_modules=yes
4035 else
4036         ol_with_dnssrv_module=static
4037         ol_with_ldap_module=static
4038         ol_with_ldbm_module=static
4039         ol_with_passwd_module=static
4040         ol_with_shell_module=static
4041         ol_with_sql_module=static
4042 fi
4043
4044 # test for EBCDIC
4045 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4046 echo "configure:4047: checking for EBCDIC" >&5
4047 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4048   echo $ac_n "(cached) $ac_c" 1>&6
4049 else
4050   
4051         cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054
4055 #if !('M' == 0xd4)
4056 #include <__ASCII__/generate_error.h>
4057 #endif
4058
4059 EOF
4060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4061 { (eval echo configure:4062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4063 if test -z "$ac_err"; then
4064   rm -rf conftest*
4065   ol_cv_cpp_ebcdic=yes
4066 else
4067   echo "$ac_err" >&5
4068   echo "configure: failed program was:" >&5
4069   cat conftest.$ac_ext >&5
4070   rm -rf conftest*
4071   ol_cv_cpp_ebcdic=no
4072 fi
4073 rm -f conftest*
4074 fi
4075
4076 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4077 if test $ol_cv_cpp_ebcdic = yes ; then
4078         cat >> confdefs.h <<\EOF
4079 #define HAVE_EBCDIC 1
4080 EOF
4081
4082 fi
4083
4084 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4085 echo "configure:4086: checking for ANSI C header files" >&5
4086 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   cat > conftest.$ac_ext <<EOF
4090 #line 4091 "configure"
4091 #include "confdefs.h"
4092 #include <stdlib.h>
4093 #include <stdarg.h>
4094 #include <string.h>
4095 #include <float.h>
4096 EOF
4097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4098 { (eval echo configure:4099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4100 if test -z "$ac_err"; then
4101   rm -rf conftest*
4102   ol_cv_header_stdc=yes
4103 else
4104   echo "$ac_err" >&5
4105   echo "configure: failed program was:" >&5
4106   cat conftest.$ac_ext >&5
4107   rm -rf conftest*
4108   ol_cv_header_stdc=no
4109 fi
4110 rm -f conftest*
4111
4112 if test $ol_cv_header_stdc = yes; then
4113   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #include <string.h>
4118 EOF
4119 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4120   egrep "memchr" >/dev/null 2>&1; then
4121   :
4122 else
4123   rm -rf conftest*
4124   ol_cv_header_stdc=no
4125 fi
4126 rm -f conftest*
4127
4128 fi
4129
4130 if test $ol_cv_header_stdc = yes; then
4131   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4132 cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 #include <stdlib.h>
4136 EOF
4137 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4138   egrep "free" >/dev/null 2>&1; then
4139   :
4140 else
4141   rm -rf conftest*
4142   ol_cv_header_stdc=no
4143 fi
4144 rm -f conftest*
4145
4146 fi
4147
4148 if test $ol_cv_header_stdc = yes; then
4149   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4150 if test "$cross_compiling" = yes; then
4151   :
4152 else
4153   cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 #include <ctype.h>
4157 #ifndef HAVE_EBCDIC
4158 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4159 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4160 #else
4161 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4162                 || ('j' <= (c) && (c) <= 'r') \
4163                 || ('s' <= (c) && (c) <= 'z'))
4164 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4165 #endif
4166 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4167 int main () { int i; for (i = 0; i < 256; i++)
4168 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4169 exit (0); }
4170
4171 EOF
4172 if { (eval echo configure:4173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4173 then
4174   :
4175 else
4176   echo "configure: failed program was:" >&5
4177   cat conftest.$ac_ext >&5
4178   rm -fr conftest*
4179   ol_cv_header_stdc=no
4180 fi
4181 rm -fr conftest*
4182 fi
4183
4184 fi
4185 fi
4186
4187 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4188 if test $ol_cv_header_stdc = yes; then
4189   cat >> confdefs.h <<\EOF
4190 #define STDC_HEADERS 1
4191 EOF
4192
4193 fi
4194 ac_cv_header_stdc=disable
4195
4196
4197 if test $ol_cv_header_stdc != yes; then
4198         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4199 fi
4200
4201 ac_header_dirent=no
4202 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4203 do
4204 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4205 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4206 echo "configure:4207: checking for $ac_hdr that defines DIR" >&5
4207 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4208   echo $ac_n "(cached) $ac_c" 1>&6
4209 else
4210   cat > conftest.$ac_ext <<EOF
4211 #line 4212 "configure"
4212 #include "confdefs.h"
4213 #include <sys/types.h>
4214 #include <$ac_hdr>
4215 int main() {
4216 DIR *dirp = 0;
4217 ; return 0; }
4218 EOF
4219 if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4220   rm -rf conftest*
4221   eval "ac_cv_header_dirent_$ac_safe=yes"
4222 else
4223   echo "configure: failed program was:" >&5
4224   cat conftest.$ac_ext >&5
4225   rm -rf conftest*
4226   eval "ac_cv_header_dirent_$ac_safe=no"
4227 fi
4228 rm -f conftest*
4229 fi
4230 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4231   echo "$ac_t""yes" 1>&6
4232     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4233   cat >> confdefs.h <<EOF
4234 #define $ac_tr_hdr 1
4235 EOF
4236  ac_header_dirent=$ac_hdr; break
4237 else
4238   echo "$ac_t""no" 1>&6
4239 fi
4240 done
4241 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4242 if test $ac_header_dirent = dirent.h; then
4243 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4244 echo "configure:4245: checking for opendir in -ldir" >&5
4245 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4246 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4247   echo $ac_n "(cached) $ac_c" 1>&6
4248 else
4249   ac_save_LIBS="$LIBS"
4250 LIBS="-ldir  $LIBS"
4251 cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 /* Override any gcc2 internal prototype to avoid an error.  */
4255 /* We use char because int might match the return type of a gcc2
4256     builtin and then its argument prototype would still apply.  */
4257 char opendir();
4258
4259 int main() {
4260 opendir()
4261 ; return 0; }
4262 EOF
4263 if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4264   rm -rf conftest*
4265   eval "ac_cv_lib_$ac_lib_var=yes"
4266 else
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   eval "ac_cv_lib_$ac_lib_var=no"
4271 fi
4272 rm -f conftest*
4273 LIBS="$ac_save_LIBS"
4274
4275 fi
4276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4277   echo "$ac_t""yes" 1>&6
4278   LIBS="$LIBS -ldir"
4279 else
4280   echo "$ac_t""no" 1>&6
4281 fi
4282
4283 else
4284 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4285 echo "configure:4286: checking for opendir in -lx" >&5
4286 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4288   echo $ac_n "(cached) $ac_c" 1>&6
4289 else
4290   ac_save_LIBS="$LIBS"
4291 LIBS="-lx  $LIBS"
4292 cat > conftest.$ac_ext <<EOF
4293 #line 4294 "configure"
4294 #include "confdefs.h"
4295 /* Override any gcc2 internal prototype to avoid an error.  */
4296 /* We use char because int might match the return type of a gcc2
4297     builtin and then its argument prototype would still apply.  */
4298 char opendir();
4299
4300 int main() {
4301 opendir()
4302 ; return 0; }
4303 EOF
4304 if { (eval echo configure:4305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4305   rm -rf conftest*
4306   eval "ac_cv_lib_$ac_lib_var=yes"
4307 else
4308   echo "configure: failed program was:" >&5
4309   cat conftest.$ac_ext >&5
4310   rm -rf conftest*
4311   eval "ac_cv_lib_$ac_lib_var=no"
4312 fi
4313 rm -f conftest*
4314 LIBS="$ac_save_LIBS"
4315
4316 fi
4317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4318   echo "$ac_t""yes" 1>&6
4319   LIBS="$LIBS -lx"
4320 else
4321   echo "$ac_t""no" 1>&6
4322 fi
4323
4324 fi
4325
4326 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4327 echo "configure:4328: checking for sys/wait.h that is POSIX.1 compatible" >&5
4328 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4329   echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331   cat > conftest.$ac_ext <<EOF
4332 #line 4333 "configure"
4333 #include "confdefs.h"
4334 #include <sys/types.h>
4335 #include <sys/wait.h>
4336 #ifndef WEXITSTATUS
4337 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4338 #endif
4339 #ifndef WIFEXITED
4340 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4341 #endif
4342 int main() {
4343 int s;
4344 wait (&s);
4345 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4346 ; return 0; }
4347 EOF
4348 if { (eval echo configure:4349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4349   rm -rf conftest*
4350   ac_cv_header_sys_wait_h=yes
4351 else
4352   echo "configure: failed program was:" >&5
4353   cat conftest.$ac_ext >&5
4354   rm -rf conftest*
4355   ac_cv_header_sys_wait_h=no
4356 fi
4357 rm -f conftest*
4358 fi
4359
4360 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4361 if test $ac_cv_header_sys_wait_h = yes; then
4362   cat >> confdefs.h <<\EOF
4363 #define HAVE_SYS_WAIT_H 1
4364 EOF
4365
4366 fi
4367
4368 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4369 echo "configure:4370: checking POSIX termios" >&5
4370 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4371   echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373   cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 #include <sys/types.h>
4377 #include <unistd.h>
4378 #include <termios.h>
4379 int main() {
4380 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4381    tcgetattr(0, 0);
4382 ; return 0; }
4383 EOF
4384 if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4385   rm -rf conftest*
4386   am_cv_sys_posix_termios=yes
4387 else
4388   echo "configure: failed program was:" >&5
4389   cat conftest.$ac_ext >&5
4390   rm -rf conftest*
4391   am_cv_sys_posix_termios=no
4392 fi
4393 rm -f conftest*
4394 fi
4395
4396 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4397
4398
4399  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4400 echo "configure:4401: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4401 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4405
4406   gwinsz_in_termios_h=no
4407   if test $am_cv_sys_posix_termios = yes; then
4408     cat > conftest.$ac_ext <<EOF
4409 #line 4410 "configure"
4410 #include "confdefs.h"
4411 #include <sys/types.h>
4412 #     include <termios.h>
4413 #     ifdef TIOCGWINSZ
4414         yes
4415 #     endif
4416     
4417 EOF
4418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4419   egrep "yes" >/dev/null 2>&1; then
4420   rm -rf conftest*
4421   gwinsz_in_termios_h=yes
4422 fi
4423 rm -f conftest*
4424
4425   fi
4426
4427   if test $gwinsz_in_termios_h = no; then
4428     cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 #include <sys/types.h>
4432 #     include <sys/ioctl.h>
4433 #     ifdef TIOCGWINSZ
4434         yes
4435 #     endif
4436     
4437 EOF
4438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4439   egrep "yes" >/dev/null 2>&1; then
4440   rm -rf conftest*
4441   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4442 fi
4443 rm -f conftest*
4444
4445   fi
4446   
4447 fi
4448
4449 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4450   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4451     cat >> confdefs.h <<\EOF
4452 #define GWINSZ_IN_SYS_IOCTL 1
4453 EOF
4454
4455   fi
4456
4457 if test $am_cv_sys_posix_termios = yes ; then
4458         cat >> confdefs.h <<\EOF
4459 #define HAVE_POSIX_TERMIOS 1
4460 EOF
4461
4462 fi
4463
4464 for ac_hdr in \
4465         arpa/inet.h             \
4466         arpa/nameser.h  \
4467         assert.h                \
4468         conio.h                 \
4469         crypt.h                 \
4470         direct.h                \
4471         errno.h                 \
4472         fcntl.h                 \
4473         filio.h                 \
4474         getopt.h                \
4475         grp.h                   \
4476         io.h                    \
4477         libutil.h               \
4478         limits.h                \
4479         locale.h                \
4480         netinet/tcp.h   \
4481         malloc.h                \
4482         memory.h                \
4483         psap.h                  \
4484         pwd.h                   \
4485         process.h               \
4486         resolv.h                \
4487         sgtty.h                 \
4488         shadow.h                \
4489         stddef.h                \
4490         string.h                \
4491         strings.h               \
4492         sysexits.h              \
4493         sys/file.h              \
4494         sys/filio.h             \
4495         sys/errno.h             \
4496         sys/ioctl.h             \
4497         sys/param.h             \
4498         sys/resource.h  \
4499         sys/select.h    \
4500         sys/socket.h    \
4501         sys/syslog.h    \
4502         sys/time.h              \
4503         sys/types.h             \
4504         syslog.h                \
4505         termios.h               \
4506         unistd.h                \
4507         winsock.h               \
4508
4509 do
4510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4512 echo "configure:4513: checking for $ac_hdr" >&5
4513 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <$ac_hdr>
4520 EOF
4521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4522 { (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4524 if test -z "$ac_err"; then
4525   rm -rf conftest*
4526   eval "ac_cv_header_$ac_safe=yes"
4527 else
4528   echo "$ac_err" >&5
4529   echo "configure: failed program was:" >&5
4530   cat conftest.$ac_ext >&5
4531   rm -rf conftest*
4532   eval "ac_cv_header_$ac_safe=no"
4533 fi
4534 rm -f conftest*
4535 fi
4536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4537   echo "$ac_t""yes" 1>&6
4538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4539   cat >> confdefs.h <<EOF
4540 #define $ac_tr_hdr 1
4541 EOF
4542  
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546 done
4547
4548
4549
4550
4551 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4552 echo "configure:4553: checking for sigset in -lV3" >&5
4553 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4555   echo $ac_n "(cached) $ac_c" 1>&6
4556 else
4557   ac_save_LIBS="$LIBS"
4558 LIBS="-lV3  $LIBS"
4559 cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 /* Override any gcc2 internal prototype to avoid an error.  */
4563 /* We use char because int might match the return type of a gcc2
4564     builtin and then its argument prototype would still apply.  */
4565 char sigset();
4566
4567 int main() {
4568 sigset()
4569 ; return 0; }
4570 EOF
4571 if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4572   rm -rf conftest*
4573   eval "ac_cv_lib_$ac_lib_var=yes"
4574 else
4575   echo "configure: failed program was:" >&5
4576   cat conftest.$ac_ext >&5
4577   rm -rf conftest*
4578   eval "ac_cv_lib_$ac_lib_var=no"
4579 fi
4580 rm -f conftest*
4581 LIBS="$ac_save_LIBS"
4582
4583 fi
4584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4585   echo "$ac_t""yes" 1>&6
4586     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4587     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4588   cat >> confdefs.h <<EOF
4589 #define $ac_tr_lib 1
4590 EOF
4591
4592   LIBS="-lV3 $LIBS"
4593
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597
4598
4599 if test $ac_cv_header_winsock_h = yes; then
4600         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4601 echo "configure:4602: checking for winsock" >&5
4602 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <winsock.h>
4609 int main() {
4610
4611                         socket(0,0,0);
4612                         select(0,NULL,NULL,NULL,NULL);
4613                         closesocket(0);
4614                         gethostname(NULL,0);
4615         
4616 ; return 0; }
4617 EOF
4618 if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4619   rm -rf conftest*
4620   ol_cv_winsock=yes
4621 else
4622   echo "configure: failed program was:" >&5
4623   cat conftest.$ac_ext >&5
4624   rm -rf conftest*
4625   ol_cv_winsock=no
4626 fi
4627 rm -f conftest*]
4628 fi
4629
4630 echo "$ac_t""$ol_cv_winsock" 1>&6
4631
4632         if test $ol_cv_winsock = yes ; then
4633                 cat >> confdefs.h <<\EOF
4634 #define HAVE_WINSOCK 1
4635 EOF
4636
4637                 ac_cv_func_socket=yes
4638                 ac_cv_func_select=yes
4639                 ac_cv_func_closesocket=yes
4640                 ac_cv_func_gethostname=yes
4641         fi
4642 fi
4643
4644
4645 echo $ac_n "checking for socket""... $ac_c" 1>&6
4646 echo "configure:4647: checking for socket" >&5
4647 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4648   echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650   cat > conftest.$ac_ext <<EOF
4651 #line 4652 "configure"
4652 #include "confdefs.h"
4653 /* System header to define __stub macros and hopefully few prototypes,
4654     which can conflict with char socket(); below.  */
4655 #include <assert.h>
4656 /* Override any gcc2 internal prototype to avoid an error.  */
4657 /* We use char because int might match the return type of a gcc2
4658     builtin and then its argument prototype would still apply.  */
4659 char socket();
4660 char (*f)();
4661
4662 int main() {
4663
4664 /* The GNU C library defines this for functions which it implements
4665     to always fail with ENOSYS.  Some functions are actually named
4666     something starting with __ and the normal name is an alias.  */
4667 #if defined (__stub_socket) || defined (__stub___socket)
4668 choke me
4669 #else
4670 f = socket;
4671 #endif
4672
4673 ; return 0; }
4674 EOF
4675 if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4676   rm -rf conftest*
4677   eval "ac_cv_func_socket=yes"
4678 else
4679   echo "configure: failed program was:" >&5
4680   cat conftest.$ac_ext >&5
4681   rm -rf conftest*
4682   eval "ac_cv_func_socket=no"
4683 fi
4684 rm -f conftest*
4685 fi
4686
4687 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4688   echo "$ac_t""yes" 1>&6
4689   :
4690 else
4691   echo "$ac_t""no" 1>&6
4692         
4693         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4694 echo "configure:4695: checking for main in -lsocket" >&5
4695 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4697   echo $ac_n "(cached) $ac_c" 1>&6
4698 else
4699   ac_save_LIBS="$LIBS"
4700 LIBS="-lsocket  $LIBS"
4701 cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704
4705 int main() {
4706 main()
4707 ; return 0; }
4708 EOF
4709 if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4710   rm -rf conftest*
4711   eval "ac_cv_lib_$ac_lib_var=yes"
4712 else
4713   echo "configure: failed program was:" >&5
4714   cat conftest.$ac_ext >&5
4715   rm -rf conftest*
4716   eval "ac_cv_lib_$ac_lib_var=no"
4717 fi
4718 rm -f conftest*
4719 LIBS="$ac_save_LIBS"
4720
4721 fi
4722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4723   echo "$ac_t""yes" 1>&6
4724     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4725     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4726   cat >> confdefs.h <<EOF
4727 #define $ac_tr_lib 1
4728 EOF
4729
4730   LIBS="-lsocket $LIBS"
4731
4732 else
4733   echo "$ac_t""no" 1>&6
4734 fi
4735
4736         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4737 echo "configure:4738: checking for main in -lnet" >&5
4738 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4740   echo $ac_n "(cached) $ac_c" 1>&6
4741 else
4742   ac_save_LIBS="$LIBS"
4743 LIBS="-lnet  $LIBS"
4744 cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747
4748 int main() {
4749 main()
4750 ; return 0; }
4751 EOF
4752 if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4753   rm -rf conftest*
4754   eval "ac_cv_lib_$ac_lib_var=yes"
4755 else
4756   echo "configure: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   rm -rf conftest*
4759   eval "ac_cv_lib_$ac_lib_var=no"
4760 fi
4761 rm -f conftest*
4762 LIBS="$ac_save_LIBS"
4763
4764 fi
4765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4766   echo "$ac_t""yes" 1>&6
4767     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4768     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4769   cat >> confdefs.h <<EOF
4770 #define $ac_tr_lib 1
4771 EOF
4772
4773   LIBS="-lnet $LIBS"
4774
4775 else
4776   echo "$ac_t""no" 1>&6
4777 fi
4778
4779         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4780 echo "configure:4781: checking for main in -lnsl_s" >&5
4781 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   ac_save_LIBS="$LIBS"
4786 LIBS="-lnsl_s  $LIBS"
4787 cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790
4791 int main() {
4792 main()
4793 ; return 0; }
4794 EOF
4795 if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4796   rm -rf conftest*
4797   eval "ac_cv_lib_$ac_lib_var=yes"
4798 else
4799   echo "configure: failed program was:" >&5
4800   cat conftest.$ac_ext >&5
4801   rm -rf conftest*
4802   eval "ac_cv_lib_$ac_lib_var=no"
4803 fi
4804 rm -f conftest*
4805 LIBS="$ac_save_LIBS"
4806
4807 fi
4808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4809   echo "$ac_t""yes" 1>&6
4810     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4811     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4812   cat >> confdefs.h <<EOF
4813 #define $ac_tr_lib 1
4814 EOF
4815
4816   LIBS="-lnsl_s $LIBS"
4817
4818 else
4819   echo "$ac_t""no" 1>&6
4820 fi
4821
4822         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4823 echo "configure:4824: checking for main in -lnsl" >&5
4824 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4826   echo $ac_n "(cached) $ac_c" 1>&6
4827 else
4828   ac_save_LIBS="$LIBS"
4829 LIBS="-lnsl  $LIBS"
4830 cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833
4834 int main() {
4835 main()
4836 ; return 0; }
4837 EOF
4838 if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4839   rm -rf conftest*
4840   eval "ac_cv_lib_$ac_lib_var=yes"
4841 else
4842   echo "configure: failed program was:" >&5
4843   cat conftest.$ac_ext >&5
4844   rm -rf conftest*
4845   eval "ac_cv_lib_$ac_lib_var=no"
4846 fi
4847 rm -f conftest*
4848 LIBS="$ac_save_LIBS"
4849
4850 fi
4851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4852   echo "$ac_t""yes" 1>&6
4853     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4854     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4855   cat >> confdefs.h <<EOF
4856 #define $ac_tr_lib 1
4857 EOF
4858
4859   LIBS="-lnsl $LIBS"
4860
4861 else
4862   echo "$ac_t""no" 1>&6
4863 fi
4864
4865         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4866 echo "configure:4867: checking for socket in -linet" >&5
4867 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4869   echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871   ac_save_LIBS="$LIBS"
4872 LIBS="-linet  $LIBS"
4873 cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 /* Override any gcc2 internal prototype to avoid an error.  */
4877 /* We use char because int might match the return type of a gcc2
4878     builtin and then its argument prototype would still apply.  */
4879 char socket();
4880
4881 int main() {
4882 socket()
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   eval "ac_cv_lib_$ac_lib_var=yes"
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891   rm -rf conftest*
4892   eval "ac_cv_lib_$ac_lib_var=no"
4893 fi
4894 rm -f conftest*
4895 LIBS="$ac_save_LIBS"
4896
4897 fi
4898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4899   echo "$ac_t""yes" 1>&6
4900     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4901     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4902   cat >> confdefs.h <<EOF
4903 #define $ac_tr_lib 1
4904 EOF
4905
4906   LIBS="-linet $LIBS"
4907
4908 else
4909   echo "$ac_t""no" 1>&6
4910 fi
4911
4912         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4913 echo "configure:4914: checking for main in -lgen" >&5
4914 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4916   echo $ac_n "(cached) $ac_c" 1>&6
4917 else
4918   ac_save_LIBS="$LIBS"
4919 LIBS="-lgen  $LIBS"
4920 cat > conftest.$ac_ext <<EOF
4921 #line 4922 "configure"
4922 #include "confdefs.h"
4923
4924 int main() {
4925 main()
4926 ; return 0; }
4927 EOF
4928 if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4929   rm -rf conftest*
4930   eval "ac_cv_lib_$ac_lib_var=yes"
4931 else
4932   echo "configure: failed program was:" >&5
4933   cat conftest.$ac_ext >&5
4934   rm -rf conftest*
4935   eval "ac_cv_lib_$ac_lib_var=no"
4936 fi
4937 rm -f conftest*
4938 LIBS="$ac_save_LIBS"
4939
4940 fi
4941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4942   echo "$ac_t""yes" 1>&6
4943     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4944     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4945   cat >> confdefs.h <<EOF
4946 #define $ac_tr_lib 1
4947 EOF
4948
4949   LIBS="-lgen $LIBS"
4950
4951 else
4952   echo "$ac_t""no" 1>&6
4953 fi
4954
4955
4956 fi
4957
4958
4959 echo $ac_n "checking for select""... $ac_c" 1>&6
4960 echo "configure:4961: checking for select" >&5
4961 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4962   echo $ac_n "(cached) $ac_c" 1>&6
4963 else
4964   cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967 /* System header to define __stub macros and hopefully few prototypes,
4968     which can conflict with char select(); below.  */
4969 #include <assert.h>
4970 /* Override any gcc2 internal prototype to avoid an error.  */
4971 /* We use char because int might match the return type of a gcc2
4972     builtin and then its argument prototype would still apply.  */
4973 char select();
4974 char (*f)();
4975
4976 int main() {
4977
4978 /* The GNU C library defines this for functions which it implements
4979     to always fail with ENOSYS.  Some functions are actually named
4980     something starting with __ and the normal name is an alias.  */
4981 #if defined (__stub_select) || defined (__stub___select)
4982 choke me
4983 #else
4984 f = select;
4985 #endif
4986
4987 ; return 0; }
4988 EOF
4989 if { (eval echo configure:4990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4990   rm -rf conftest*
4991   eval "ac_cv_func_select=yes"
4992 else
4993   echo "configure: failed program was:" >&5
4994   cat conftest.$ac_ext >&5
4995   rm -rf conftest*
4996   eval "ac_cv_func_select=no"
4997 fi
4998 rm -f conftest*
4999 fi
5000
5001 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5002   echo "$ac_t""yes" 1>&6
5003   :
5004 else
5005   echo "$ac_t""no" 1>&6
5006 { echo "configure: error: select() required." 1>&2; exit 1; }
5007 fi
5008
5009
5010 if test "${ac_cv_header_winsock_h}" != yes; then
5011                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5012 echo "configure:5013: checking types of arguments for select()" >&5
5013  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5014   echo $ac_n "(cached) $ac_c" 1>&6
5015 else
5016    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5017   echo $ac_n "(cached) $ac_c" 1>&6
5018 else
5019     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5023      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5024       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5025        cat > conftest.$ac_ext <<EOF
5026 #line 5027 "configure"
5027 #include "confdefs.h"
5028 #ifdef HAVE_SYS_TYPES_H
5029 #include <sys/types.h>
5030 #endif
5031 #ifdef HAVE_SYS_TIME_H
5032 #include <sys/time.h>
5033 #endif
5034 #ifdef HAVE_SYS_SELECT_H
5035 #include <sys/select.h>
5036 #endif
5037 #ifdef HAVE_SYS_SOCKET_H
5038 #include <sys/socket.h>
5039 #endif
5040 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);
5041 int main() {
5042
5043 ; return 0; }
5044 EOF
5045 if { (eval echo configure:5046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5046   rm -rf conftest*
5047           ac_not_found=no ; break 3
5048 else
5049   echo "configure: failed program was:" >&5
5050   cat conftest.$ac_ext >&5
5051   rm -rf conftest*
5052   ac_not_found=yes
5053 fi
5054 rm -f conftest*
5055       done
5056      done
5057     done
5058    
5059 fi
5060   
5061 fi
5062  
5063 fi
5064  if test "$ac_not_found" = yes; then
5065   ac_cv_func_select_arg1=int 
5066   ac_cv_func_select_arg234='int *' 
5067   ac_cv_func_select_arg5='struct timeval *'
5068  fi
5069  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5070  cat >> confdefs.h <<EOF
5071 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5072 EOF
5073
5074  cat >> confdefs.h <<EOF
5075 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5076 EOF
5077
5078  cat >> confdefs.h <<EOF
5079 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5080 EOF
5081
5082
5083 fi
5084
5085
5086 for ac_hdr in regex.h 
5087 do
5088 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5089 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5090 echo "configure:5091: checking for $ac_hdr" >&5
5091 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5092   echo $ac_n "(cached) $ac_c" 1>&6
5093 else
5094   cat > conftest.$ac_ext <<EOF
5095 #line 5096 "configure"
5096 #include "confdefs.h"
5097 #include <$ac_hdr>
5098 EOF
5099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5100 { (eval echo configure:5101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5102 if test -z "$ac_err"; then
5103   rm -rf conftest*
5104   eval "ac_cv_header_$ac_safe=yes"
5105 else
5106   echo "$ac_err" >&5
5107   echo "configure: failed program was:" >&5
5108   cat conftest.$ac_ext >&5
5109   rm -rf conftest*
5110   eval "ac_cv_header_$ac_safe=no"
5111 fi
5112 rm -f conftest*
5113 fi
5114 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5115   echo "$ac_t""yes" 1>&6
5116     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5117   cat >> confdefs.h <<EOF
5118 #define $ac_tr_hdr 1
5119 EOF
5120  
5121 else
5122   echo "$ac_t""no" 1>&6
5123 fi
5124 done
5125
5126 if test "$ac_cv_header_regex_h" != yes ; then
5127         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5128 fi
5129 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5130 echo "configure:5131: checking for regfree" >&5
5131 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5132   echo $ac_n "(cached) $ac_c" 1>&6
5133 else
5134   cat > conftest.$ac_ext <<EOF
5135 #line 5136 "configure"
5136 #include "confdefs.h"
5137 /* System header to define __stub macros and hopefully few prototypes,
5138     which can conflict with char regfree(); below.  */
5139 #include <assert.h>
5140 /* Override any gcc2 internal prototype to avoid an error.  */
5141 /* We use char because int might match the return type of a gcc2
5142     builtin and then its argument prototype would still apply.  */
5143 char regfree();
5144 char (*f)();
5145
5146 int main() {
5147
5148 /* The GNU C library defines this for functions which it implements
5149     to always fail with ENOSYS.  Some functions are actually named
5150     something starting with __ and the normal name is an alias.  */
5151 #if defined (__stub_regfree) || defined (__stub___regfree)
5152 choke me
5153 #else
5154 f = regfree;
5155 #endif
5156
5157 ; return 0; }
5158 EOF
5159 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5160   rm -rf conftest*
5161   eval "ac_cv_func_regfree=yes"
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166   eval "ac_cv_func_regfree=no"
5167 fi
5168 rm -f conftest*
5169 fi
5170
5171 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5172   echo "$ac_t""yes" 1>&6
5173   :
5174 else
5175   echo "$ac_t""no" 1>&6
5176 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5177 fi
5178
5179
5180
5181 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5182 echo "configure:5183: checking for compatible POSIX regex" >&5
5183 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5184   echo $ac_n "(cached) $ac_c" 1>&6
5185 else
5186   
5187         if test "$cross_compiling" = yes; then
5188   ol_cv_c_posix_regex=cross
5189 else
5190   cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193
5194 #include <sys/types.h>
5195 #include <regex.h>
5196 static char *pattern, *string;
5197 main()
5198 {
5199         int rc;
5200         regex_t re;
5201
5202         pattern = "^A";
5203
5204         if(regcomp(&re, pattern, 0)) {
5205                 return -1;
5206         }
5207         
5208         string = "ALL MATCH";
5209         
5210         rc = regexec(&re, string, 0, (void*)0, 0);
5211
5212         regfree(&re);
5213
5214         return rc;
5215 }
5216 EOF
5217 if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5218 then
5219   ol_cv_c_posix_regex=yes
5220 else
5221   echo "configure: failed program was:" >&5
5222   cat conftest.$ac_ext >&5
5223   rm -fr conftest*
5224   ol_cv_c_posix_regex=no
5225 fi
5226 rm -fr conftest*
5227 fi
5228
5229 fi
5230
5231 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5232
5233 if test "$ol_cv_c_posix_regex" = no ; then
5234         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5235 fi
5236
5237 ol_link_dnssrv=no
5238 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5239 echo "configure:5240: checking for res_query" >&5
5240 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5241   echo $ac_n "(cached) $ac_c" 1>&6
5242 else
5243   cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246 /* System header to define __stub macros and hopefully few prototypes,
5247     which can conflict with char res_query(); below.  */
5248 #include <assert.h>
5249 /* Override any gcc2 internal prototype to avoid an error.  */
5250 /* We use char because int might match the return type of a gcc2
5251     builtin and then its argument prototype would still apply.  */
5252 char res_query();
5253 char (*f)();
5254
5255 int main() {
5256
5257 /* The GNU C library defines this for functions which it implements
5258     to always fail with ENOSYS.  Some functions are actually named
5259     something starting with __ and the normal name is an alias.  */
5260 #if defined (__stub_res_query) || defined (__stub___res_query)
5261 choke me
5262 #else
5263 f = res_query;
5264 #endif
5265
5266 ; return 0; }
5267 EOF
5268 if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5269   rm -rf conftest*
5270   eval "ac_cv_func_res_query=yes"
5271 else
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274   rm -rf conftest*
5275   eval "ac_cv_func_res_query=no"
5276 fi
5277 rm -f conftest*
5278 fi
5279
5280 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5281   echo "$ac_t""yes" 1>&6
5282   :
5283 else
5284   echo "$ac_t""no" 1>&6
5285 fi
5286
5287 if test $ac_cv_func_res_query = no ; then 
5288         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5289 echo "configure:5290: checking for res_query in -lbind" >&5
5290 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5291 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5292   echo $ac_n "(cached) $ac_c" 1>&6
5293 else
5294   ac_save_LIBS="$LIBS"
5295 LIBS="-lbind  $LIBS"
5296 cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299 /* Override any gcc2 internal prototype to avoid an error.  */
5300 /* We use char because int might match the return type of a gcc2
5301     builtin and then its argument prototype would still apply.  */
5302 char res_query();
5303
5304 int main() {
5305 res_query()
5306 ; return 0; }
5307 EOF
5308 if { (eval echo configure:5309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5309   rm -rf conftest*
5310   eval "ac_cv_lib_$ac_lib_var=yes"
5311 else
5312   echo "configure: failed program was:" >&5
5313   cat conftest.$ac_ext >&5
5314   rm -rf conftest*
5315   eval "ac_cv_lib_$ac_lib_var=no"
5316 fi
5317 rm -f conftest*
5318 LIBS="$ac_save_LIBS"
5319
5320 fi
5321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5322   echo "$ac_t""yes" 1>&6
5323     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5324     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5325   cat >> confdefs.h <<EOF
5326 #define $ac_tr_lib 1
5327 EOF
5328
5329   LIBS="-lbind $LIBS"
5330
5331 else
5332   echo "$ac_t""no" 1>&6
5333 fi
5334
5335         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5336 fi
5337
5338 if test $ac_cv_func_res_query = no ; then 
5339         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5340 echo "configure:5341: checking for __res_query in -lbind" >&5
5341 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5342 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   ac_save_LIBS="$LIBS"
5346 LIBS="-lbind  $LIBS"
5347 cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350 /* Override any gcc2 internal prototype to avoid an error.  */
5351 /* We use char because int might match the return type of a gcc2
5352     builtin and then its argument prototype would still apply.  */
5353 char __res_query();
5354
5355 int main() {
5356 __res_query()
5357 ; return 0; }
5358 EOF
5359 if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5360   rm -rf conftest*
5361   eval "ac_cv_lib_$ac_lib_var=yes"
5362 else
5363   echo "configure: failed program was:" >&5
5364   cat conftest.$ac_ext >&5
5365   rm -rf conftest*
5366   eval "ac_cv_lib_$ac_lib_var=no"
5367 fi
5368 rm -f conftest*
5369 LIBS="$ac_save_LIBS"
5370
5371 fi
5372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5373   echo "$ac_t""yes" 1>&6
5374     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5375     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5376   cat >> confdefs.h <<EOF
5377 #define $ac_tr_lib 1
5378 EOF
5379
5380   LIBS="-lbind $LIBS"
5381
5382 else
5383   echo "$ac_t""no" 1>&6
5384 fi
5385
5386         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5387 fi
5388
5389 if test $ac_cv_func_res_query = no ; then 
5390         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5391 echo "configure:5392: checking for res_query in -lresolv" >&5
5392 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5393 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5394   echo $ac_n "(cached) $ac_c" 1>&6
5395 else
5396   ac_save_LIBS="$LIBS"
5397 LIBS="-lresolv  $LIBS"
5398 cat > conftest.$ac_ext <<EOF
5399 #line 5400 "configure"
5400 #include "confdefs.h"
5401 /* Override any gcc2 internal prototype to avoid an error.  */
5402 /* We use char because int might match the return type of a gcc2
5403     builtin and then its argument prototype would still apply.  */
5404 char res_query();
5405
5406 int main() {
5407 res_query()
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_lib_$ac_lib_var=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_lib_$ac_lib_var=no"
5418 fi
5419 rm -f conftest*
5420 LIBS="$ac_save_LIBS"
5421
5422 fi
5423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5424   echo "$ac_t""yes" 1>&6
5425     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5426     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5427   cat >> confdefs.h <<EOF
5428 #define $ac_tr_lib 1
5429 EOF
5430
5431   LIBS="-lresolv $LIBS"
5432
5433 else
5434   echo "$ac_t""no" 1>&6
5435 fi
5436
5437         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5438 fi
5439
5440 if test "$ac_cv_func_res_query" = yes ; then
5441         cat >> confdefs.h <<\EOF
5442 #define HAVE_RES_QUERY 1
5443 EOF
5444
5445
5446         if test $ol_enable_dnssrv != no ; then
5447                 ol_link_dnssrv=yes
5448         fi
5449 fi
5450
5451 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5452         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5453 fi
5454
5455 for ac_func in getaddrinfo 
5456 do
5457 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5458 echo "configure:5459: checking for $ac_func" >&5
5459 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5460   echo $ac_n "(cached) $ac_c" 1>&6
5461 else
5462   cat > conftest.$ac_ext <<EOF
5463 #line 5464 "configure"
5464 #include "confdefs.h"
5465 /* System header to define __stub macros and hopefully few prototypes,
5466     which can conflict with char $ac_func(); below.  */
5467 #include <assert.h>
5468 /* Override any gcc2 internal prototype to avoid an error.  */
5469 /* We use char because int might match the return type of a gcc2
5470     builtin and then its argument prototype would still apply.  */
5471 char $ac_func();
5472 char (*f)();
5473
5474 int main() {
5475
5476 /* The GNU C library defines this for functions which it implements
5477     to always fail with ENOSYS.  Some functions are actually named
5478     something starting with __ and the normal name is an alias.  */
5479 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5480 choke me
5481 #else
5482 f = $ac_func;
5483 #endif
5484
5485 ; return 0; }
5486 EOF
5487 if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5488   rm -rf conftest*
5489   eval "ac_cv_func_$ac_func=yes"
5490 else
5491   echo "configure: failed program was:" >&5
5492   cat conftest.$ac_ext >&5
5493   rm -rf conftest*
5494   eval "ac_cv_func_$ac_func=no"
5495 fi
5496 rm -f conftest*
5497 fi
5498
5499 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5500   echo "$ac_t""yes" 1>&6
5501     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5502   cat >> confdefs.h <<EOF
5503 #define $ac_tr_func 1
5504 EOF
5505  
5506 else
5507   echo "$ac_t""no" 1>&6
5508 fi
5509 done
5510
5511
5512 ol_link_ipv6=no
5513 if test $ac_cv_func_getaddrinfo = no ; then
5514         if test $ol_enable_ipv6 = yes ; then
5515                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5516         fi
5517 else
5518         for ac_func in gai_strerror 
5519 do
5520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5521 echo "configure:5522: checking for $ac_func" >&5
5522 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5523   echo $ac_n "(cached) $ac_c" 1>&6
5524 else
5525   cat > conftest.$ac_ext <<EOF
5526 #line 5527 "configure"
5527 #include "confdefs.h"
5528 /* System header to define __stub macros and hopefully few prototypes,
5529     which can conflict with char $ac_func(); below.  */
5530 #include <assert.h>
5531 /* Override any gcc2 internal prototype to avoid an error.  */
5532 /* We use char because int might match the return type of a gcc2
5533     builtin and then its argument prototype would still apply.  */
5534 char $ac_func();
5535 char (*f)();
5536
5537 int main() {
5538
5539 /* The GNU C library defines this for functions which it implements
5540     to always fail with ENOSYS.  Some functions are actually named
5541     something starting with __ and the normal name is an alias.  */
5542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5543 choke me
5544 #else
5545 f = $ac_func;
5546 #endif
5547
5548 ; return 0; }
5549 EOF
5550 if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5551   rm -rf conftest*
5552   eval "ac_cv_func_$ac_func=yes"
5553 else
5554   echo "configure: failed program was:" >&5
5555   cat conftest.$ac_ext >&5
5556   rm -rf conftest*
5557   eval "ac_cv_func_$ac_func=no"
5558 fi
5559 rm -f conftest*
5560 fi
5561
5562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5563   echo "$ac_t""yes" 1>&6
5564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5565   cat >> confdefs.h <<EOF
5566 #define $ac_tr_func 1
5567 EOF
5568  
5569 else
5570   echo "$ac_t""no" 1>&6
5571 fi
5572 done
5573
5574
5575         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5576 echo "configure:5577: checking INET6_ADDRSTRLEN" >&5
5577 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5578   echo $ac_n "(cached) $ac_c" 1>&6
5579 else
5580   
5581                 cat > conftest.$ac_ext <<EOF
5582 #line 5583 "configure"
5583 #include "confdefs.h"
5584
5585 #                       include <netinet/in.h>
5586 #                       ifdef INET6_ADDRSTRLEN
5587                                 __has_inet6_addrstrlen__;
5588 #                       endif
5589                 
5590 EOF
5591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5592   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5593   rm -rf conftest*
5594   ol_cv_inet6_addrstrlen=yes
5595 else
5596   rm -rf conftest*
5597   ol_cv_inet6_addrstrlen=no
5598 fi
5599 rm -f conftest*
5600
5601 fi
5602
5603 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5604
5605         if test $ol_cv_inet6_addrstrlen = yes ; then
5606                 ol_link_ipv6=yes
5607         elif test $ol_enable_ipv6 = yes ; then
5608                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5609         fi
5610 fi
5611
5612 if test $ol_enable_local != no ; then
5613         for ac_hdr in sys/un.h 
5614 do
5615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5617 echo "configure:5618: checking for $ac_hdr" >&5
5618 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5619   echo $ac_n "(cached) $ac_c" 1>&6
5620 else
5621   cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 #include <$ac_hdr>
5625 EOF
5626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5627 { (eval echo configure:5628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5629 if test -z "$ac_err"; then
5630   rm -rf conftest*
5631   eval "ac_cv_header_$ac_safe=yes"
5632 else
5633   echo "$ac_err" >&5
5634   echo "configure: failed program was:" >&5
5635   cat conftest.$ac_ext >&5
5636   rm -rf conftest*
5637   eval "ac_cv_header_$ac_safe=no"
5638 fi
5639 rm -f conftest*
5640 fi
5641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5642   echo "$ac_t""yes" 1>&6
5643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5644   cat >> confdefs.h <<EOF
5645 #define $ac_tr_hdr 1
5646 EOF
5647  
5648 else
5649   echo "$ac_t""no" 1>&6
5650 fi
5651 done
5652
5653
5654         if test $ol_enable_local = auto ; then
5655                 ol_enable_local=$ac_cv_header_sys_un_h
5656         elif test $ac_cv_header_sys_un_h = no ; then
5657                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5658         fi
5659 fi
5660
5661 ol_link_kbind=no
5662 ol_link_kpasswd=no
5663 ol_link_krb5=no
5664 ol_link_krb4=no
5665
5666 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5667         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5668         -o $ol_with_kerberos = k425 ; then
5669
5670         for ac_hdr in krb5.h
5671 do
5672 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5673 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5674 echo "configure:5675: checking for $ac_hdr" >&5
5675 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5676   echo $ac_n "(cached) $ac_c" 1>&6
5677 else
5678   cat > conftest.$ac_ext <<EOF
5679 #line 5680 "configure"
5680 #include "confdefs.h"
5681 #include <$ac_hdr>
5682 EOF
5683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5684 { (eval echo configure:5685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5686 if test -z "$ac_err"; then
5687   rm -rf conftest*
5688   eval "ac_cv_header_$ac_safe=yes"
5689 else
5690   echo "$ac_err" >&5
5691   echo "configure: failed program was:" >&5
5692   cat conftest.$ac_ext >&5
5693   rm -rf conftest*
5694   eval "ac_cv_header_$ac_safe=no"
5695 fi
5696 rm -f conftest*
5697 fi
5698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5699   echo "$ac_t""yes" 1>&6
5700     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5701   cat >> confdefs.h <<EOF
5702 #define $ac_tr_hdr 1
5703 EOF
5704  
5705 else
5706   echo "$ac_t""no" 1>&6
5707 fi
5708 done
5709
5710
5711         if test $ac_cv_header_krb5_h = yes ; then
5712                                 for ac_hdr in heim_err.h
5713 do
5714 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5715 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5716 echo "configure:5717: checking for $ac_hdr" >&5
5717 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5718   echo $ac_n "(cached) $ac_c" 1>&6
5719 else
5720   cat > conftest.$ac_ext <<EOF
5721 #line 5722 "configure"
5722 #include "confdefs.h"
5723 #include <$ac_hdr>
5724 EOF
5725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5726 { (eval echo configure:5727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5728 if test -z "$ac_err"; then
5729   rm -rf conftest*
5730   eval "ac_cv_header_$ac_safe=yes"
5731 else
5732   echo "$ac_err" >&5
5733   echo "configure: failed program was:" >&5
5734   cat conftest.$ac_ext >&5
5735   rm -rf conftest*
5736   eval "ac_cv_header_$ac_safe=no"
5737 fi
5738 rm -f conftest*
5739 fi
5740 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5741   echo "$ac_t""yes" 1>&6
5742     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5743   cat >> confdefs.h <<EOF
5744 #define $ac_tr_hdr 1
5745 EOF
5746  
5747 else
5748   echo "$ac_t""no" 1>&6
5749 fi
5750 done
5751
5752                 if test $ac_cv_header_heim_err_h = yes ; then
5753                         krb5_impl=heimdal
5754                 else
5755                         krb5_impl=mit
5756                 fi
5757
5758                 if test $krb5_impl = mit; then
5759                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5760 echo "configure:5761: checking for main in -lkrb5" >&5
5761 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5763   echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765   ac_save_LIBS="$LIBS"
5766 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5767 cat > conftest.$ac_ext <<EOF
5768 #line 5769 "configure"
5769 #include "confdefs.h"
5770
5771 int main() {
5772 main()
5773 ; return 0; }
5774 EOF
5775 if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5776   rm -rf conftest*
5777   eval "ac_cv_lib_$ac_lib_var=yes"
5778 else
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -rf conftest*
5782   eval "ac_cv_lib_$ac_lib_var=no"
5783 fi
5784 rm -f conftest*
5785 LIBS="$ac_save_LIBS"
5786
5787 fi
5788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5789   echo "$ac_t""yes" 1>&6
5790   have_krb5=yes
5791                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5792 else
5793   echo "$ac_t""no" 1>&6
5794 have_krb5=no
5795 fi
5796
5797
5798                 elif test $krb5_impl = heimdal; then
5799                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5800 echo "configure:5801: checking for main in -lkrb5" >&5
5801 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5802 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5803   echo $ac_n "(cached) $ac_c" 1>&6
5804 else
5805   ac_save_LIBS="$LIBS"
5806 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5807 cat > conftest.$ac_ext <<EOF
5808 #line 5809 "configure"
5809 #include "confdefs.h"
5810
5811 int main() {
5812 main()
5813 ; return 0; }
5814 EOF
5815 if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5816   rm -rf conftest*
5817   eval "ac_cv_lib_$ac_lib_var=yes"
5818 else
5819   echo "configure: failed program was:" >&5
5820   cat conftest.$ac_ext >&5
5821   rm -rf conftest*
5822   eval "ac_cv_lib_$ac_lib_var=no"
5823 fi
5824 rm -f conftest*
5825 LIBS="$ac_save_LIBS"
5826
5827 fi
5828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5829   echo "$ac_t""yes" 1>&6
5830   have_krb5=yes
5831                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5832 else
5833   echo "$ac_t""no" 1>&6
5834 have_krb5=no
5835 fi
5836
5837
5838                         cat >> confdefs.h <<\EOF
5839 #define HAVE_HEIMDAL_KERBEROS 1
5840 EOF
5841
5842                 else
5843                         have_krb5=no
5844                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5845                 fi
5846
5847                 if test $have_krb5 = yes ; then
5848                         ol_link_krb5=yes
5849
5850                         cat >> confdefs.h <<\EOF
5851 #define HAVE_KRB5 1
5852 EOF
5853
5854
5855                         if test $ol_enable_kpasswd != no ; then
5856                                 ol_link_kpasswd=yes;
5857                         fi
5858
5859                         if test $ol_with_kerberos = k5only ; then
5860                                 ol_with_kerberos=found
5861                         fi
5862
5863                 elif test $ol_with_kerberos != auto ; then
5864                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5865                 fi
5866
5867         fi
5868 fi
5869
5870 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
5871         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5872
5873         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5874 do
5875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5877 echo "configure:5878: checking for $ac_hdr" >&5
5878 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5879   echo $ac_n "(cached) $ac_c" 1>&6
5880 else
5881   cat > conftest.$ac_ext <<EOF
5882 #line 5883 "configure"
5883 #include "confdefs.h"
5884 #include <$ac_hdr>
5885 EOF
5886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5887 { (eval echo configure:5888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5889 if test -z "$ac_err"; then
5890   rm -rf conftest*
5891   eval "ac_cv_header_$ac_safe=yes"
5892 else
5893   echo "$ac_err" >&5
5894   echo "configure: failed program was:" >&5
5895   cat conftest.$ac_ext >&5
5896   rm -rf conftest*
5897   eval "ac_cv_header_$ac_safe=no"
5898 fi
5899 rm -f conftest*
5900 fi
5901 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5902   echo "$ac_t""yes" 1>&6
5903     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5904   cat >> confdefs.h <<EOF
5905 #define $ac_tr_hdr 1
5906 EOF
5907  
5908 else
5909   echo "$ac_t""no" 1>&6
5910 fi
5911 done
5912
5913
5914         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5915                 if test $krb5_impl = mit; then
5916                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5917 echo "configure:5918: checking for main in -lkrb4" >&5
5918 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5920   echo $ac_n "(cached) $ac_c" 1>&6
5921 else
5922   ac_save_LIBS="$LIBS"
5923 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5924 cat > conftest.$ac_ext <<EOF
5925 #line 5926 "configure"
5926 #include "confdefs.h"
5927
5928 int main() {
5929 main()
5930 ; return 0; }
5931 EOF
5932 if { (eval echo configure:5933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5933   rm -rf conftest*
5934   eval "ac_cv_lib_$ac_lib_var=yes"
5935 else
5936   echo "configure: failed program was:" >&5
5937   cat conftest.$ac_ext >&5
5938   rm -rf conftest*
5939   eval "ac_cv_lib_$ac_lib_var=no"
5940 fi
5941 rm -f conftest*
5942 LIBS="$ac_save_LIBS"
5943
5944 fi
5945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5946   echo "$ac_t""yes" 1>&6
5947   have_k425=yes
5948                                 KRB4_LIBS="-lkrb4 -ldes425"
5949 else
5950   echo "$ac_t""no" 1>&6
5951 have_k425=no
5952 fi
5953
5954
5955                 elif test $krb5_impl = heimdal; then
5956                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5957 echo "configure:5958: checking for main in -lkrb4" >&5
5958 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5960   echo $ac_n "(cached) $ac_c" 1>&6
5961 else
5962   ac_save_LIBS="$LIBS"
5963 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5964 cat > conftest.$ac_ext <<EOF
5965 #line 5966 "configure"
5966 #include "confdefs.h"
5967
5968 int main() {
5969 main()
5970 ; return 0; }
5971 EOF
5972 if { (eval echo configure:5973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5973   rm -rf conftest*
5974   eval "ac_cv_lib_$ac_lib_var=yes"
5975 else
5976   echo "configure: failed program was:" >&5
5977   cat conftest.$ac_ext >&5
5978   rm -rf conftest*
5979   eval "ac_cv_lib_$ac_lib_var=no"
5980 fi
5981 rm -f conftest*
5982 LIBS="$ac_save_LIBS"
5983
5984 fi
5985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5986   echo "$ac_t""yes" 1>&6
5987   have_k425=yes
5988                                 KRB4_LIBS="-lkrb4"
5989 else
5990   echo "$ac_t""no" 1>&6
5991 have_k425=no
5992 fi
5993
5994
5995                 else
5996                         have_425=no
5997                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5998                 fi
5999
6000                 if test $have_k425 = yes ; then
6001                         ol_with_kerberos=found
6002                         ol_link_krb4=yes
6003
6004                         cat >> confdefs.h <<\EOF
6005 #define HAVE_KRB425 1
6006 EOF
6007
6008                         cat >> confdefs.h <<\EOF
6009 #define HAVE_KRB4 1
6010 EOF
6011
6012
6013                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6014 echo "configure:6015: checking for des_debug in Kerberos libraries" >&5
6015 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6016   echo $ac_n "(cached) $ac_c" 1>&6
6017 else
6018   
6019                                                                 save_LIBS="$LIBS"
6020                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6021                                 cat > conftest.$ac_ext <<EOF
6022 #line 6023 "configure"
6023 #include "confdefs.h"
6024
6025 #include <kerberosIV/krb.h>
6026 #include <kerberosIV/des.h>
6027 extern int des_debug;
6028
6029 int main() {
6030
6031 des_debug = 1;
6032
6033 ; return 0; }
6034 EOF
6035 if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6036   rm -rf conftest*
6037   ol_cv_var_des_debug=yes
6038 else
6039   echo "configure: failed program was:" >&5
6040   cat conftest.$ac_ext >&5
6041   rm -rf conftest*
6042   ol_cv_var_des_debug=no
6043 fi
6044 rm -f conftest*
6045                                                                 LIBS="$save_LIBS"
6046                         
6047 fi
6048
6049 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6050
6051                         if test $ol_cv_var_des_debug = yes ; then
6052                                 cat >> confdefs.h <<\EOF
6053 #define HAVE_DES_DEBUG 1
6054 EOF
6055
6056                         fi
6057
6058                         LIBS="$save_LIBS"
6059                 fi
6060         fi
6061 fi
6062
6063 if test $ol_link_krb5 = yes ; then
6064         ol_with_kerberos=found
6065 fi
6066
6067 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6068         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6069
6070         for ac_hdr in krb.h des.h krb-archaeology.h 
6071 do
6072 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6073 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6074 echo "configure:6075: checking for $ac_hdr" >&5
6075 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6076   echo $ac_n "(cached) $ac_c" 1>&6
6077 else
6078   cat > conftest.$ac_ext <<EOF
6079 #line 6080 "configure"
6080 #include "confdefs.h"
6081 #include <$ac_hdr>
6082 EOF
6083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6084 { (eval echo configure:6085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6086 if test -z "$ac_err"; then
6087   rm -rf conftest*
6088   eval "ac_cv_header_$ac_safe=yes"
6089 else
6090   echo "$ac_err" >&5
6091   echo "configure: failed program was:" >&5
6092   cat conftest.$ac_ext >&5
6093   rm -rf conftest*
6094   eval "ac_cv_header_$ac_safe=no"
6095 fi
6096 rm -f conftest*
6097 fi
6098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6099   echo "$ac_t""yes" 1>&6
6100     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6101   cat >> confdefs.h <<EOF
6102 #define $ac_tr_hdr 1
6103 EOF
6104  
6105 else
6106   echo "$ac_t""no" 1>&6
6107 fi
6108 done
6109
6110
6111         if test $ac_cv_header_krb_h = yes ; then
6112                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6113 echo "configure:6114: checking for main in -lkrb" >&5
6114 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6115 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6116   echo $ac_n "(cached) $ac_c" 1>&6
6117 else
6118   ac_save_LIBS="$LIBS"
6119 LIBS="-lkrb -ldes $LIBS"
6120 cat > conftest.$ac_ext <<EOF
6121 #line 6122 "configure"
6122 #include "confdefs.h"
6123
6124 int main() {
6125 main()
6126 ; return 0; }
6127 EOF
6128 if { (eval echo configure:6129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6129   rm -rf conftest*
6130   eval "ac_cv_lib_$ac_lib_var=yes"
6131 else
6132   echo "configure: failed program was:" >&5
6133   cat conftest.$ac_ext >&5
6134   rm -rf conftest*
6135   eval "ac_cv_lib_$ac_lib_var=no"
6136 fi
6137 rm -f conftest*
6138 LIBS="$ac_save_LIBS"
6139
6140 fi
6141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6142   echo "$ac_t""yes" 1>&6
6143   have_k4=yes
6144 else
6145   echo "$ac_t""no" 1>&6
6146 have_k4=no
6147 fi
6148
6149
6150                 if test $have_k4 = yes ; then
6151                         ol_with_kerberos=found
6152                         ol_link_krb4=yes
6153
6154                         cat >> confdefs.h <<\EOF
6155 #define HAVE_KRB4 1
6156 EOF
6157
6158
6159                         KRB4_LIBS="-lkrb -ldes"
6160
6161                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6162                                 cat >> confdefs.h <<\EOF
6163 #define HAVE_KTH_KERBEROS 1
6164 EOF
6165
6166                         fi
6167                 fi
6168         fi
6169 fi
6170
6171 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6172         ol_link_kpasswd=yes
6173 fi
6174
6175 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6176         ol_link_kbind=yes
6177
6178 elif test $ol_enable_kbind = yes ; then
6179         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6180 fi
6181
6182 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6183         cat >> confdefs.h <<\EOF
6184 #define HAVE_KERBEROS 1
6185 EOF
6186
6187
6188 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6189         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6190 fi
6191
6192 ol_link_tls=no
6193 if test $ol_with_tls != no ; then
6194         for ac_hdr in openssl/ssl.h ssl.h
6195 do
6196 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6197 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6198 echo "configure:6199: checking for $ac_hdr" >&5
6199 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6200   echo $ac_n "(cached) $ac_c" 1>&6
6201 else
6202   cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6205 #include <$ac_hdr>
6206 EOF
6207 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6208 { (eval echo configure:6209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6209 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6210 if test -z "$ac_err"; then
6211   rm -rf conftest*
6212   eval "ac_cv_header_$ac_safe=yes"
6213 else
6214   echo "$ac_err" >&5
6215   echo "configure: failed program was:" >&5
6216   cat conftest.$ac_ext >&5
6217   rm -rf conftest*
6218   eval "ac_cv_header_$ac_safe=no"
6219 fi
6220 rm -f conftest*
6221 fi
6222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6223   echo "$ac_t""yes" 1>&6
6224     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6225   cat >> confdefs.h <<EOF
6226 #define $ac_tr_hdr 1
6227 EOF
6228  
6229 else
6230   echo "$ac_t""no" 1>&6
6231 fi
6232 done
6233
6234         
6235         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6236                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6237 echo "configure:6238: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6238 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6239 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6240   echo $ac_n "(cached) $ac_c" 1>&6
6241 else
6242   ac_save_LIBS="$LIBS"
6243 LIBS="-lssl -lcrypto $LIBS"
6244 cat > conftest.$ac_ext <<EOF
6245 #line 6246 "configure"
6246 #include "confdefs.h"
6247 /* Override any gcc2 internal prototype to avoid an error.  */
6248 /* We use char because int might match the return type of a gcc2
6249     builtin and then its argument prototype would still apply.  */
6250 char SSLeay_add_ssl_algorithms();
6251
6252 int main() {
6253 SSLeay_add_ssl_algorithms()
6254 ; return 0; }
6255 EOF
6256 if { (eval echo configure:6257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6257   rm -rf conftest*
6258   eval "ac_cv_lib_$ac_lib_var=yes"
6259 else
6260   echo "configure: failed program was:" >&5
6261   cat conftest.$ac_ext >&5
6262   rm -rf conftest*
6263   eval "ac_cv_lib_$ac_lib_var=no"
6264 fi
6265 rm -f conftest*
6266 LIBS="$ac_save_LIBS"
6267
6268 fi
6269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6270   echo "$ac_t""yes" 1>&6
6271   have_ssleay=yes
6272                         need_rsaref=no
6273 else
6274   echo "$ac_t""no" 1>&6
6275 have_ssleay=no
6276 fi
6277
6278                         
6279                 if test $have_ssleay = no ; then
6280                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6281 echo "configure:6282: checking for SSL_library_init in -lssl" >&5
6282 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6284   echo $ac_n "(cached) $ac_c" 1>&6
6285 else
6286   ac_save_LIBS="$LIBS"
6287 LIBS="-lssl -lcrypto $LIBS"
6288 cat > conftest.$ac_ext <<EOF
6289 #line 6290 "configure"
6290 #include "confdefs.h"
6291 /* Override any gcc2 internal prototype to avoid an error.  */
6292 /* We use char because int might match the return type of a gcc2
6293     builtin and then its argument prototype would still apply.  */
6294 char SSL_library_init();
6295
6296 int main() {
6297 SSL_library_init()
6298 ; return 0; }
6299 EOF
6300 if { (eval echo configure:6301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6301   rm -rf conftest*
6302   eval "ac_cv_lib_$ac_lib_var=yes"
6303 else
6304   echo "configure: failed program was:" >&5
6305   cat conftest.$ac_ext >&5
6306   rm -rf conftest*
6307   eval "ac_cv_lib_$ac_lib_var=no"
6308 fi
6309 rm -f conftest*
6310 LIBS="$ac_save_LIBS"
6311
6312 fi
6313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6314   echo "$ac_t""yes" 1>&6
6315   have_ssleay=yes
6316                                 need_rsaref=no
6317 else
6318   echo "$ac_t""no" 1>&6
6319 have_ssleay=no
6320 fi
6321
6322                 fi
6323
6324                 if test $have_ssleay = no ; then
6325                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6326 echo "configure:6327: checking for ssl3_accept in -lssl" >&5
6327 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6329   echo $ac_n "(cached) $ac_c" 1>&6
6330 else
6331   ac_save_LIBS="$LIBS"
6332 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6333 cat > conftest.$ac_ext <<EOF
6334 #line 6335 "configure"
6335 #include "confdefs.h"
6336 /* Override any gcc2 internal prototype to avoid an error.  */
6337 /* We use char because int might match the return type of a gcc2
6338     builtin and then its argument prototype would still apply.  */
6339 char ssl3_accept();
6340
6341 int main() {
6342 ssl3_accept()
6343 ; return 0; }
6344 EOF
6345 if { (eval echo configure:6346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6346   rm -rf conftest*
6347   eval "ac_cv_lib_$ac_lib_var=yes"
6348 else
6349   echo "configure: failed program was:" >&5
6350   cat conftest.$ac_ext >&5
6351   rm -rf conftest*
6352   eval "ac_cv_lib_$ac_lib_var=no"
6353 fi
6354 rm -f conftest*
6355 LIBS="$ac_save_LIBS"
6356
6357 fi
6358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6359   echo "$ac_t""yes" 1>&6
6360   have_ssleay=yes
6361                                 need_rsaref=yes
6362 else
6363   echo "$ac_t""no" 1>&6
6364 have_ssleay=no
6365 fi
6366
6367                 fi
6368
6369                 if test $have_ssleay = yes ; then
6370                         ol_with_tls=found
6371                         ol_link_tls=yes
6372
6373                         cat >> confdefs.h <<\EOF
6374 #define HAVE_SSLEAY 1
6375 EOF
6376
6377
6378                         if test $need_rsaref = yes; then
6379                                 cat >> confdefs.h <<\EOF
6380 #define HAVE_RSAREF 1
6381 EOF
6382
6383
6384                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6385                         else
6386                                 TLS_LIBS="-lssl -lcrypto"
6387                         fi
6388                 fi
6389         fi
6390
6391 else
6392         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6393 fi
6394
6395 if test $ol_link_tls = yes ; then
6396         cat >> confdefs.h <<\EOF
6397 #define HAVE_TLS 1
6398 EOF
6399
6400
6401 elif test $ol_with_tls = auto ; then
6402         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6403         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6404
6405 elif test $ol_with_tls != no ; then
6406         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6407 fi
6408
6409 for ac_func in \
6410         ctime_r                 \
6411         gethostbyname_r gethostbyaddr_r \
6412
6413 do
6414 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6415 echo "configure:6416: checking for $ac_func" >&5
6416 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6417   echo $ac_n "(cached) $ac_c" 1>&6
6418 else
6419   cat > conftest.$ac_ext <<EOF
6420 #line 6421 "configure"
6421 #include "confdefs.h"
6422 /* System header to define __stub macros and hopefully few prototypes,
6423     which can conflict with char $ac_func(); below.  */
6424 #include <assert.h>
6425 /* Override any gcc2 internal prototype to avoid an error.  */
6426 /* We use char because int might match the return type of a gcc2
6427     builtin and then its argument prototype would still apply.  */
6428 char $ac_func();
6429 char (*f)();
6430
6431 int main() {
6432
6433 /* The GNU C library defines this for functions which it implements
6434     to always fail with ENOSYS.  Some functions are actually named
6435     something starting with __ and the normal name is an alias.  */
6436 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6437 choke me
6438 #else
6439 f = $ac_func;
6440 #endif
6441
6442 ; return 0; }
6443 EOF
6444 if { (eval echo configure:6445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6445   rm -rf conftest*
6446   eval "ac_cv_func_$ac_func=yes"
6447 else
6448   echo "configure: failed program was:" >&5
6449   cat conftest.$ac_ext >&5
6450   rm -rf conftest*
6451   eval "ac_cv_func_$ac_func=no"
6452 fi
6453 rm -f conftest*
6454 fi
6455
6456 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6457   echo "$ac_t""yes" 1>&6
6458     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6459   cat >> confdefs.h <<EOF
6460 #define $ac_tr_func 1
6461 EOF
6462  
6463 else
6464   echo "$ac_t""no" 1>&6
6465 fi
6466 done
6467
6468
6469 if test "$ac_cv_func_ctime_r" = no ; then
6470         ol_cv_func_ctime_r_nargs=0
6471 else
6472         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6473 echo "configure:6474: checking number of arguments of ctime_r" >&5
6474 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6475   echo $ac_n "(cached) $ac_c" 1>&6
6476 else
6477   cat > conftest.$ac_ext <<EOF
6478 #line 6479 "configure"
6479 #include "confdefs.h"
6480 #include <time.h>
6481 int main() {
6482 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6483 ; return 0; }
6484 EOF
6485 if { (eval echo configure:6486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6486   rm -rf conftest*
6487   ol_cv_func_ctime_r_nargs3=yes
6488 else
6489   echo "configure: failed program was:" >&5
6490   cat conftest.$ac_ext >&5
6491   rm -rf conftest*
6492   ol_cv_func_ctime_r_nargs3=no
6493 fi
6494 rm -f conftest*
6495
6496         cat > conftest.$ac_ext <<EOF
6497 #line 6498 "configure"
6498 #include "confdefs.h"
6499 #include <time.h>
6500 int main() {
6501 time_t ti; char *buffer; ctime_r(&ti,buffer);
6502 ; return 0; }
6503 EOF
6504 if { (eval echo configure:6505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6505   rm -rf conftest*
6506   ol_cv_func_ctime_r_nargs2=yes
6507 else
6508   echo "configure: failed program was:" >&5
6509   cat conftest.$ac_ext >&5
6510   rm -rf conftest*
6511   ol_cv_func_ctime_r_nargs2=no
6512 fi
6513 rm -f conftest*
6514
6515         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6516                 $ol_cv_func_ctime_r_nargs2 = no ; then
6517
6518                 ol_cv_func_ctime_r_nargs=3
6519
6520         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6521                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6522
6523                 ol_cv_func_ctime_r_nargs=2
6524
6525         else
6526                 ol_cv_func_ctime_r_nargs=0
6527         fi
6528   
6529 fi
6530
6531 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6532
6533   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6534         cat >> confdefs.h <<EOF
6535 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6536 EOF
6537
6538   fi
6539
6540 fi
6541
6542 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6543         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6544 echo "configure:6545: checking number of arguments of gethostbyname_r" >&5
6545 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6546   echo $ac_n "(cached) $ac_c" 1>&6
6547 else
6548   cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 #include <sys/types.h>
6552 #include <sys/socket.h>
6553 #include <netinet/in.h>
6554 #include <netdb.h>
6555 #define BUFSIZE (sizeof(struct hostent)+10)
6556 int main() {
6557 struct hostent hent; char buffer[BUFSIZE];
6558                 int bufsize=BUFSIZE;int h_errno;
6559                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6560                         buffer, bufsize, &h_errno);
6561 ; return 0; }
6562 EOF
6563 if { (eval echo configure:6564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6564   rm -rf conftest*
6565   ol_cv_func_gethostbyname_r_nargs5=yes
6566 else
6567   echo "configure: failed program was:" >&5
6568   cat conftest.$ac_ext >&5
6569   rm -rf conftest*
6570   ol_cv_func_gethostbyname_r_nargs5=no
6571 fi
6572 rm -f conftest*
6573
6574         cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577 #include <sys/types.h>
6578 #include <sys/socket.h>
6579 #include <netinet/in.h>
6580 #include <netdb.h>
6581 #define BUFSIZE (sizeof(struct hostent)+10)
6582 int main() {
6583 struct hostent hent;struct hostent *rhent;
6584                 char buffer[BUFSIZE];
6585                 int bufsize=BUFSIZE;int h_errno;
6586                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6587                         &rhent, &h_errno);
6588 ; return 0; }
6589 EOF
6590 if { (eval echo configure:6591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6591   rm -rf conftest*
6592   ol_cv_func_gethostbyname_r_nargs6=yes
6593 else
6594   echo "configure: failed program was:" >&5
6595   cat conftest.$ac_ext >&5
6596   rm -rf conftest*
6597   ol_cv_func_gethostbyname_r_nargs6=no
6598 fi
6599 rm -f conftest*
6600
6601         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6602                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6603
6604                 ol_cv_func_gethostbyname_r_nargs=5
6605
6606         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6607                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6608
6609                 ol_cv_func_gethostbyname_r_nargs=6
6610
6611         else
6612                 ol_cv_func_gethostbyname_r_nargs=0
6613         fi
6614   
6615 fi
6616
6617 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6618   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6619         cat >> confdefs.h <<EOF
6620 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6621 EOF
6622
6623   fi
6624
6625 else
6626         ol_cv_func_gethostbyname_r_nargs=0
6627 fi
6628  
6629 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6630         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6631 echo "configure:6632: checking number of arguments of gethostbyaddr_r" >&5
6632 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   cat > conftest.$ac_ext <<EOF
6636 #line 6637 "configure"
6637 #include "confdefs.h"
6638 #include <sys/types.h>
6639 #include <sys/socket.h>
6640 #include <netinet/in.h>
6641 #include <netdb.h>
6642 #define BUFSIZE (sizeof(struct hostent)+10)
6643 int main() {
6644 struct hostent hent; char buffer[BUFSIZE]; 
6645             struct in_addr add;
6646             size_t alen=sizeof(struct in_addr);
6647             int bufsize=BUFSIZE;int h_errno;
6648                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6649                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6650 ; return 0; }
6651 EOF
6652 if { (eval echo configure:6653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6653   rm -rf conftest*
6654   ol_cv_func_gethostbyaddr_r_nargs7=yes
6655 else
6656   echo "configure: failed program was:" >&5
6657   cat conftest.$ac_ext >&5
6658   rm -rf conftest*
6659   ol_cv_func_gethostbyaddr_r_nargs7=no
6660 fi
6661 rm -f conftest*
6662
6663         cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 #include <sys/types.h>
6667 #include <sys/socket.h>
6668 #include <netinet/in.h>
6669 #include <netdb.h>
6670 #define BUFSIZE (sizeof(struct hostent)+10)
6671 int main() {
6672 struct hostent hent;
6673                 struct hostent *rhent; char buffer[BUFSIZE]; 
6674                 struct in_addr add;
6675                 size_t alen=sizeof(struct in_addr);
6676                 int bufsize=BUFSIZE;int h_errno;
6677                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6678                         alen, AF_INET, &hent, buffer, bufsize, 
6679                         &rhent, &h_errno);
6680 ; return 0; }
6681 EOF
6682 if { (eval echo configure:6683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6683   rm -rf conftest*
6684   ol_cv_func_gethostbyaddr_r_nargs8=yes
6685 else
6686   echo "configure: failed program was:" >&5
6687   cat conftest.$ac_ext >&5
6688   rm -rf conftest*
6689   ol_cv_func_gethostbyaddr_r_nargs8=no
6690 fi
6691 rm -f conftest*
6692
6693         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6694                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6695
6696                 ol_cv_func_gethostbyaddr_r_nargs=7
6697
6698         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6699                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6700
6701                 ol_cv_func_gethostbyaddr_r_nargs=8
6702
6703         else
6704                 ol_cv_func_gethostbyaddr_r_nargs=0
6705         fi
6706   
6707 fi
6708
6709 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6710   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6711     cat >> confdefs.h <<EOF
6712 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6713 EOF
6714
6715   fi
6716
6717 else
6718         ol_cv_func_gethostbyaddr_r_nargs=0
6719 fi
6720
6721 if test "$ac_cv_func_ctime_r" = yes \
6722         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6723         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6724         -a "$ac_cv_func_gethostbyname_r" = yes \
6725         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6726         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6727         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6728         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6729         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6730         ; then
6731  
6732         cat >> confdefs.h <<\EOF
6733 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6734 EOF
6735
6736 fi
6737
6738 ol_link_threads=no
6739
6740 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6741         -o $ol_with_threads = nt ; then
6742
6743         
6744         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6745 echo "configure:6746: checking for NT Threads" >&5
6746 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6747   echo $ac_n "(cached) $ac_c" 1>&6
6748 else
6749   
6750                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6751 echo "configure:6752: checking for _beginthread" >&5
6752 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6753   echo $ac_n "(cached) $ac_c" 1>&6
6754 else
6755   cat > conftest.$ac_ext <<EOF
6756 #line 6757 "configure"
6757 #include "confdefs.h"
6758 /* System header to define __stub macros and hopefully few prototypes,
6759     which can conflict with char _beginthread(); below.  */
6760 #include <assert.h>
6761 /* Override any gcc2 internal prototype to avoid an error.  */
6762 /* We use char because int might match the return type of a gcc2
6763     builtin and then its argument prototype would still apply.  */
6764 char _beginthread();
6765 char (*f)();
6766
6767 int main() {
6768
6769 /* The GNU C library defines this for functions which it implements
6770     to always fail with ENOSYS.  Some functions are actually named
6771     something starting with __ and the normal name is an alias.  */
6772 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6773 choke me
6774 #else
6775 f = _beginthread;
6776 #endif
6777
6778 ; return 0; }
6779 EOF
6780 if { (eval echo configure:6781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6781   rm -rf conftest*
6782   eval "ac_cv_func__beginthread=yes"
6783 else
6784   echo "configure: failed program was:" >&5
6785   cat conftest.$ac_ext >&5
6786   rm -rf conftest*
6787   eval "ac_cv_func__beginthread=no"
6788 fi
6789 rm -f conftest*
6790 fi
6791
6792 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6793   echo "$ac_t""yes" 1>&6
6794   ol_cv_nt_threads=yes
6795 else
6796   echo "$ac_t""no" 1>&6
6797 ol_cv_nt_threads=no
6798 fi
6799
6800         
6801 fi
6802
6803 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6804
6805         if test $ol_cv_nt_threads = yes ; then
6806                 cat >> confdefs.h <<\EOF
6807 #define HAVE_NT_THREADS 1
6808 EOF
6809
6810         fi
6811
6812
6813         if test "$ol_cv_nt_threads" = yes ; then
6814         ol_link_threads=nt
6815         ol_with_threads=found
6816         ol_with_yielding_select=yes
6817
6818                 cat >> confdefs.h <<\EOF
6819 #define HAVE_NT_SERVICE_MANAGER 1
6820 EOF
6821
6822                 cat >> confdefs.h <<\EOF
6823 #define HAVE_NT_EVENT_LOG 1
6824 EOF
6825
6826         fi
6827
6828         if test $ol_with_threads = nt ; then
6829                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6830         fi
6831 fi
6832
6833 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6834         -o $ol_with_threads = posix ; then
6835
6836         for ac_hdr in pthread.h
6837 do
6838 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6839 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6840 echo "configure:6841: checking for $ac_hdr" >&5
6841 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6842   echo $ac_n "(cached) $ac_c" 1>&6
6843 else
6844   cat > conftest.$ac_ext <<EOF
6845 #line 6846 "configure"
6846 #include "confdefs.h"
6847 #include <$ac_hdr>
6848 EOF
6849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6850 { (eval echo configure:6851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6852 if test -z "$ac_err"; then
6853   rm -rf conftest*
6854   eval "ac_cv_header_$ac_safe=yes"
6855 else
6856   echo "$ac_err" >&5
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -rf conftest*
6860   eval "ac_cv_header_$ac_safe=no"
6861 fi
6862 rm -f conftest*
6863 fi
6864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6865   echo "$ac_t""yes" 1>&6
6866     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6867   cat >> confdefs.h <<EOF
6868 #define $ac_tr_hdr 1
6869 EOF
6870  
6871 else
6872   echo "$ac_t""no" 1>&6
6873 fi
6874 done
6875
6876
6877         if test $ac_cv_header_pthread_h = yes ; then
6878                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6879 echo "configure:6880: checking POSIX thread version" >&5
6880 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   
6884         cat > conftest.$ac_ext <<EOF
6885 #line 6886 "configure"
6886 #include "confdefs.h"
6887
6888 #               include <pthread.h>
6889                 /* this check could be improved */
6890 #               ifdef PTHREAD_ONCE_INIT
6891                         pthread_version_final;
6892 #               endif
6893         
6894 EOF
6895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6896   egrep "pthread_version_final" >/dev/null 2>&1; then
6897   rm -rf conftest*
6898   ol_pthread_final=yes
6899 else
6900   rm -rf conftest*
6901   ol_pthread_final=no
6902 fi
6903 rm -f conftest*
6904
6905
6906         cat > conftest.$ac_ext <<EOF
6907 #line 6908 "configure"
6908 #include "confdefs.h"
6909
6910 #               include <pthread.h>
6911                 /* this check could be improved */
6912 #               ifdef pthread_once_init
6913                         pthread_version_draft4;
6914 #               endif
6915         
6916 EOF
6917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6918   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6919   rm -rf conftest*
6920   ol_pthread_draft4=yes
6921 else
6922   rm -rf conftest*
6923   ol_pthread_draft4=no
6924 fi
6925 rm -f conftest*
6926
6927
6928         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6929                 ol_cv_pthread_version=final
6930         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6931                 ol_cv_pthread_version=draft4
6932         else
6933                 ol_cv_pthread_version=unknown
6934         fi
6935
6936 fi
6937
6938 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6939
6940
6941                 if test $ol_cv_pthread_version = final ; then
6942                         cat >> confdefs.h <<\EOF
6943 #define HAVE_PTHREADS_FINAL 1
6944 EOF
6945
6946                 elif test $ol_cv_pthread_version = draft4 ; then
6947                         cat >> confdefs.h <<\EOF
6948 #define HAVE_PTHREADS_D4 1
6949 EOF
6950
6951                 else
6952                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6953                 fi
6954
6955                 # consider threads found
6956                 ol_with_threads=found
6957
6958                 
6959         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6960 echo "configure:6961: checking for LinuxThreads pthread.h" >&5
6961 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6962   echo $ac_n "(cached) $ac_c" 1>&6
6963 else
6964   cat > conftest.$ac_ext <<EOF
6965 #line 6966 "configure"
6966 #include "confdefs.h"
6967 #include <pthread.h>
6968 EOF
6969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6970   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6971   rm -rf conftest*
6972   ol_cv_header_linux_threads=yes
6973 else
6974   rm -rf conftest*
6975   ol_cv_header_linux_threads=no
6976 fi
6977 rm -f conftest*
6978
6979                 
6980 fi
6981
6982 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6983         if test $ol_cv_header_linux_threads = yes; then
6984                 cat >> confdefs.h <<\EOF
6985 #define HAVE_LINUX_THREADS 1
6986 EOF
6987
6988         fi
6989
6990                 
6991         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6992 echo "configure:6993: checking for GNU Pth pthread.h" >&5
6993 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6994   echo $ac_n "(cached) $ac_c" 1>&6
6995 else
6996   cat > conftest.$ac_ext <<EOF
6997 #line 6998 "configure"
6998 #include "confdefs.h"
6999 #include <pthread.h>
7000 #ifdef _POSIX_THREAD_IS_GNU_PTH
7001         __gnu_pth__;
7002 #endif
7003
7004 EOF
7005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7006   egrep "__gnu_pth__" >/dev/null 2>&1; then
7007   rm -rf conftest*
7008   ol_cv_header_gnu_pth_pthread_h=yes
7009 else
7010   rm -rf conftest*
7011   ol_cv_header_gnu_pth_pthread_h=no
7012 fi
7013 rm -f conftest*
7014
7015                 
7016 fi
7017
7018 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7019
7020
7021                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7022                         for ac_hdr in sched.h
7023 do
7024 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7025 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7026 echo "configure:7027: checking for $ac_hdr" >&5
7027 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030   cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 #include <$ac_hdr>
7034 EOF
7035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7036 { (eval echo configure:7037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7038 if test -z "$ac_err"; then
7039   rm -rf conftest*
7040   eval "ac_cv_header_$ac_safe=yes"
7041 else
7042   echo "$ac_err" >&5
7043   echo "configure: failed program was:" >&5
7044   cat conftest.$ac_ext >&5
7045   rm -rf conftest*
7046   eval "ac_cv_header_$ac_safe=no"
7047 fi
7048 rm -f conftest*
7049 fi
7050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7051   echo "$ac_t""yes" 1>&6
7052     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7053   cat >> confdefs.h <<EOF
7054 #define $ac_tr_hdr 1
7055 EOF
7056  
7057 else
7058   echo "$ac_t""no" 1>&6
7059 fi
7060 done
7061
7062                 fi
7063
7064                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7065                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7066 echo "configure:7067: checking for pthread_create in default libraries" >&5
7067 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7068   echo $ac_n "(cached) $ac_c" 1>&6
7069 else
7070   
7071                 if test "$cross_compiling" = yes; then
7072   cat > conftest.$ac_ext <<EOF
7073 #line 7074 "configure"
7074 #include "confdefs.h"
7075 /* pthread test headers */
7076 #include <pthread.h>
7077 #ifndef NULL
7078 #define NULL (void*)0
7079 #endif
7080
7081 static void *task(p)
7082         void *p;
7083 {
7084         return (void *) (p == NULL);
7085 }
7086
7087 int main() {
7088
7089         /* pthread test function */
7090         pthread_t t;
7091         int status;
7092 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7093         /* This system (e.g. AIX) defaults detached; must override */
7094         pthread_attr_t attr;
7095
7096         status = pthread_attr_init(&attr);
7097         if( status ) exit( status );
7098
7099         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7100         if( status ) exit( status );
7101
7102 #define ATTR    &attr
7103 #else
7104 #if HAVE_PTHREADS_D4
7105 #define ATTR    pthread_attr_default
7106 #else
7107 #define ATTR    NULL
7108 #endif
7109 #endif
7110         /* make sure pthread_create() isn't just a stub */
7111         status = pthread_create(&t, ATTR, task, NULL);
7112         if( status ) exit( status );
7113
7114         /* make sure pthread_detach() isn't just a stub */
7115 #if HAVE_PTHREADS_D4
7116         status = pthread_detach( &t );
7117 #else
7118         status = pthread_detach( t );
7119 #endif
7120
7121 #ifdef HAVE_LINUX_THREADS
7122         pthread_kill_other_threads_np();
7123 #endif
7124
7125         exit( status );
7126
7127 ; return 0; }
7128 EOF
7129 if { (eval echo configure:7130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7130   rm -rf conftest*
7131   ol_cv_pthread_create=yes
7132 else
7133   echo "configure: failed program was:" >&5
7134   cat conftest.$ac_ext >&5
7135   rm -rf conftest*
7136   ol_cv_pthread_create=no
7137 fi
7138 rm -f conftest*
7139 else
7140   cat > conftest.$ac_ext <<EOF
7141 #line 7142 "configure"
7142 #include "confdefs.h"
7143 /* pthread test headers */
7144 #include <pthread.h>
7145 #ifndef NULL
7146 #define NULL (void*)0
7147 #endif
7148
7149 static void *task(p)
7150         void *p;
7151 {
7152         return (void *) (p == NULL);
7153 }
7154
7155
7156 int main(argc, argv)
7157         int argc;
7158         char **argv;
7159 {
7160
7161         /* pthread test function */
7162         pthread_t t;
7163         int status;
7164 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7165         /* This system (e.g. AIX) defaults detached; must override */
7166         pthread_attr_t attr;
7167
7168         status = pthread_attr_init(&attr);
7169         if( status ) exit( status );
7170
7171         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7172         if( status ) exit( status );
7173
7174 #define ATTR    &attr
7175 #else
7176 #if HAVE_PTHREADS_D4
7177 #define ATTR    pthread_attr_default
7178 #else
7179 #define ATTR    NULL
7180 #endif
7181 #endif
7182         /* make sure pthread_create() isn't just a stub */
7183         status = pthread_create(&t, ATTR, task, NULL);
7184         if( status ) exit( status );
7185
7186         /* make sure pthread_detach() isn't just a stub */
7187 #if HAVE_PTHREADS_D4
7188         status = pthread_detach( &t );
7189 #else
7190         status = pthread_detach( t );
7191 #endif
7192
7193 #ifdef HAVE_LINUX_THREADS
7194         pthread_kill_other_threads_np();
7195 #endif
7196
7197         exit( status );
7198
7199 }
7200
7201 EOF
7202 if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7203 then
7204   ol_cv_pthread_create=yes
7205 else
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208   rm -fr conftest*
7209   ol_cv_pthread_create=no
7210 fi
7211 rm -fr conftest*
7212 fi
7213
7214 fi
7215
7216 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7217
7218                 if test $ol_cv_pthread_create != no ; then
7219                         ol_link_threads=posix
7220                         ol_link_pthreads=""
7221                 fi
7222                 
7223                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7224 if test "$ol_link_threads" = no ; then
7225         # try -kthread
7226         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7227 echo "configure:7228: checking for pthread link with -kthread" >&5
7228 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7229   echo $ac_n "(cached) $ac_c" 1>&6
7230 else
7231   
7232                 # save the flags
7233                 ol_LIBS="$LIBS"
7234                 LIBS="-kthread $LIBS"
7235
7236                 if test "$cross_compiling" = yes; then
7237   cat > conftest.$ac_ext <<EOF
7238 #line 7239 "configure"
7239 #include "confdefs.h"
7240 /* pthread test headers */
7241 #include <pthread.h>
7242 #ifndef NULL
7243 #define NULL (void*)0
7244 #endif
7245
7246 static void *task(p)
7247         void *p;
7248 {
7249         return (void *) (p == NULL);
7250 }
7251
7252 int main() {
7253
7254         /* pthread test function */
7255         pthread_t t;
7256         int status;
7257 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7258         /* This system (e.g. AIX) defaults detached; must override */
7259         pthread_attr_t attr;
7260
7261         status = pthread_attr_init(&attr);
7262         if( status ) exit( status );
7263
7264         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7265         if( status ) exit( status );
7266
7267 #define ATTR    &attr
7268 #else
7269 #if HAVE_PTHREADS_D4
7270 #define ATTR    pthread_attr_default
7271 #else
7272 #define ATTR    NULL
7273 #endif
7274 #endif
7275         /* make sure pthread_create() isn't just a stub */
7276         status = pthread_create(&t, ATTR, task, NULL);
7277         if( status ) exit( status );
7278
7279         /* make sure pthread_detach() isn't just a stub */
7280 #if HAVE_PTHREADS_D4
7281         status = pthread_detach( &t );
7282 #else
7283         status = pthread_detach( t );
7284 #endif
7285
7286 #ifdef HAVE_LINUX_THREADS
7287         pthread_kill_other_threads_np();
7288 #endif
7289
7290         exit( status );
7291
7292 ; return 0; }
7293 EOF
7294 if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7295   rm -rf conftest*
7296   ol_cv_pthread_kthread=yes
7297 else
7298   echo "configure: failed program was:" >&5
7299   cat conftest.$ac_ext >&5
7300   rm -rf conftest*
7301   ol_cv_pthread_kthread=no
7302 fi
7303 rm -f conftest*
7304 else
7305   cat > conftest.$ac_ext <<EOF
7306 #line 7307 "configure"
7307 #include "confdefs.h"
7308 /* pthread test headers */
7309 #include <pthread.h>
7310 #ifndef NULL
7311 #define NULL (void*)0
7312 #endif
7313
7314 static void *task(p)
7315         void *p;
7316 {
7317         return (void *) (p == NULL);
7318 }
7319
7320
7321 int main(argc, argv)
7322         int argc;
7323         char **argv;
7324 {
7325
7326         /* pthread test function */
7327         pthread_t t;
7328         int status;
7329 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7330         /* This system (e.g. AIX) defaults detached; must override */
7331         pthread_attr_t attr;
7332
7333         status = pthread_attr_init(&attr);
7334         if( status ) exit( status );
7335
7336         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7337         if( status ) exit( status );
7338
7339 #define ATTR    &attr
7340 #else
7341 #if HAVE_PTHREADS_D4
7342 #define ATTR    pthread_attr_default
7343 #else
7344 #define ATTR    NULL
7345 #endif
7346 #endif
7347         /* make sure pthread_create() isn't just a stub */
7348         status = pthread_create(&t, ATTR, task, NULL);
7349         if( status ) exit( status );
7350
7351         /* make sure pthread_detach() isn't just a stub */
7352 #if HAVE_PTHREADS_D4
7353         status = pthread_detach( &t );
7354 #else
7355         status = pthread_detach( t );
7356 #endif
7357
7358 #ifdef HAVE_LINUX_THREADS
7359         pthread_kill_other_threads_np();
7360 #endif
7361
7362         exit( status );
7363
7364 }
7365
7366 EOF
7367 if { (eval echo configure:7368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7368 then
7369   ol_cv_pthread_kthread=yes
7370 else
7371   echo "configure: failed program was:" >&5
7372   cat conftest.$ac_ext >&5
7373   rm -fr conftest*
7374   ol_cv_pthread_kthread=no
7375 fi
7376 rm -fr conftest*
7377 fi
7378
7379
7380                 # restore the LIBS
7381                 LIBS="$ol_LIBS"
7382         
7383 fi
7384
7385 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7386
7387         if test $ol_cv_pthread_kthread = yes ; then
7388                 ol_link_pthreads="-kthread"
7389                 ol_link_threads=posix
7390         fi
7391 fi
7392
7393                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7394 if test "$ol_link_threads" = no ; then
7395         # try -pthread
7396         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7397 echo "configure:7398: checking for pthread link with -pthread" >&5
7398 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7399   echo $ac_n "(cached) $ac_c" 1>&6
7400 else
7401   
7402                 # save the flags
7403                 ol_LIBS="$LIBS"
7404                 LIBS="-pthread $LIBS"
7405
7406                 if test "$cross_compiling" = yes; then
7407   cat > conftest.$ac_ext <<EOF
7408 #line 7409 "configure"
7409 #include "confdefs.h"
7410 /* pthread test headers */
7411 #include <pthread.h>
7412 #ifndef NULL
7413 #define NULL (void*)0
7414 #endif
7415
7416 static void *task(p)
7417         void *p;
7418 {
7419         return (void *) (p == NULL);
7420 }
7421
7422 int main() {
7423
7424         /* pthread test function */
7425         pthread_t t;
7426         int status;
7427 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7428         /* This system (e.g. AIX) defaults detached; must override */
7429         pthread_attr_t attr;
7430
7431         status = pthread_attr_init(&attr);
7432         if( status ) exit( status );
7433
7434         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7435         if( status ) exit( status );
7436
7437 #define ATTR    &attr
7438 #else
7439 #if HAVE_PTHREADS_D4
7440 #define ATTR    pthread_attr_default
7441 #else
7442 #define ATTR    NULL
7443 #endif
7444 #endif
7445         /* make sure pthread_create() isn't just a stub */
7446         status = pthread_create(&t, ATTR, task, NULL);
7447         if( status ) exit( status );
7448
7449         /* make sure pthread_detach() isn't just a stub */
7450 #if HAVE_PTHREADS_D4
7451         status = pthread_detach( &t );
7452 #else
7453         status = pthread_detach( t );
7454 #endif
7455
7456 #ifdef HAVE_LINUX_THREADS
7457         pthread_kill_other_threads_np();
7458 #endif
7459
7460         exit( status );
7461
7462 ; return 0; }
7463 EOF
7464 if { (eval echo configure:7465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7465   rm -rf conftest*
7466   ol_cv_pthread_pthread=yes
7467 else
7468   echo "configure: failed program was:" >&5
7469   cat conftest.$ac_ext >&5
7470   rm -rf conftest*
7471   ol_cv_pthread_pthread=no
7472 fi
7473 rm -f conftest*
7474 else
7475   cat > conftest.$ac_ext <<EOF
7476 #line 7477 "configure"
7477 #include "confdefs.h"
7478 /* pthread test headers */
7479 #include <pthread.h>
7480 #ifndef NULL
7481 #define NULL (void*)0
7482 #endif
7483
7484 static void *task(p)
7485         void *p;
7486 {
7487         return (void *) (p == NULL);
7488 }
7489
7490
7491 int main(argc, argv)
7492         int argc;
7493         char **argv;
7494 {
7495
7496         /* pthread test function */
7497         pthread_t t;
7498         int status;
7499 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7500         /* This system (e.g. AIX) defaults detached; must override */
7501         pthread_attr_t attr;
7502
7503         status = pthread_attr_init(&attr);
7504         if( status ) exit( status );
7505
7506         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7507         if( status ) exit( status );
7508
7509 #define ATTR    &attr
7510 #else
7511 #if HAVE_PTHREADS_D4
7512 #define ATTR    pthread_attr_default
7513 #else
7514 #define ATTR    NULL
7515 #endif
7516 #endif
7517         /* make sure pthread_create() isn't just a stub */
7518         status = pthread_create(&t, ATTR, task, NULL);
7519         if( status ) exit( status );
7520
7521         /* make sure pthread_detach() isn't just a stub */
7522 #if HAVE_PTHREADS_D4
7523         status = pthread_detach( &t );
7524 #else
7525         status = pthread_detach( t );
7526 #endif
7527
7528 #ifdef HAVE_LINUX_THREADS
7529         pthread_kill_other_threads_np();
7530 #endif
7531
7532         exit( status );
7533
7534 }
7535
7536 EOF
7537 if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7538 then
7539   ol_cv_pthread_pthread=yes
7540 else
7541   echo "configure: failed program was:" >&5
7542   cat conftest.$ac_ext >&5
7543   rm -fr conftest*
7544   ol_cv_pthread_pthread=no
7545 fi
7546 rm -fr conftest*
7547 fi
7548
7549
7550                 # restore the LIBS
7551                 LIBS="$ol_LIBS"
7552         
7553 fi
7554
7555 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7556
7557         if test $ol_cv_pthread_pthread = yes ; then
7558                 ol_link_pthreads="-pthread"
7559                 ol_link_threads=posix
7560         fi
7561 fi
7562
7563                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7564 if test "$ol_link_threads" = no ; then
7565         # try -pthreads
7566         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7567 echo "configure:7568: checking for pthread link with -pthreads" >&5
7568 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7569   echo $ac_n "(cached) $ac_c" 1>&6
7570 else
7571   
7572                 # save the flags
7573                 ol_LIBS="$LIBS"
7574                 LIBS="-pthreads $LIBS"
7575
7576                 if test "$cross_compiling" = yes; then
7577   cat > conftest.$ac_ext <<EOF
7578 #line 7579 "configure"
7579 #include "confdefs.h"
7580 /* pthread test headers */
7581 #include <pthread.h>
7582 #ifndef NULL
7583 #define NULL (void*)0
7584 #endif
7585
7586 static void *task(p)
7587         void *p;
7588 {
7589         return (void *) (p == NULL);
7590 }
7591
7592 int main() {
7593
7594         /* pthread test function */
7595         pthread_t t;
7596         int status;
7597 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7598         /* This system (e.g. AIX) defaults detached; must override */
7599         pthread_attr_t attr;
7600
7601         status = pthread_attr_init(&attr);
7602         if( status ) exit( status );
7603
7604         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7605         if( status ) exit( status );
7606
7607 #define ATTR    &attr
7608 #else
7609 #if HAVE_PTHREADS_D4
7610 #define ATTR    pthread_attr_default
7611 #else
7612 #define ATTR    NULL
7613 #endif
7614 #endif
7615         /* make sure pthread_create() isn't just a stub */
7616         status = pthread_create(&t, ATTR, task, NULL);
7617         if( status ) exit( status );
7618
7619         /* make sure pthread_detach() isn't just a stub */
7620 #if HAVE_PTHREADS_D4
7621         status = pthread_detach( &t );
7622 #else
7623         status = pthread_detach( t );
7624 #endif
7625
7626 #ifdef HAVE_LINUX_THREADS
7627         pthread_kill_other_threads_np();
7628 #endif
7629
7630         exit( status );
7631
7632 ; return 0; }
7633 EOF
7634 if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7635   rm -rf conftest*
7636   ol_cv_pthread_pthreads=yes
7637 else
7638   echo "configure: failed program was:" >&5
7639   cat conftest.$ac_ext >&5
7640   rm -rf conftest*
7641   ol_cv_pthread_pthreads=no
7642 fi
7643 rm -f conftest*
7644 else
7645   cat > conftest.$ac_ext <<EOF
7646 #line 7647 "configure"
7647 #include "confdefs.h"
7648 /* pthread test headers */
7649 #include <pthread.h>
7650 #ifndef NULL
7651 #define NULL (void*)0
7652 #endif
7653
7654 static void *task(p)
7655         void *p;
7656 {
7657         return (void *) (p == NULL);
7658 }
7659
7660
7661 int main(argc, argv)
7662         int argc;
7663         char **argv;
7664 {
7665
7666         /* pthread test function */
7667         pthread_t t;
7668         int status;
7669 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7670         /* This system (e.g. AIX) defaults detached; must override */
7671         pthread_attr_t attr;
7672
7673         status = pthread_attr_init(&attr);
7674         if( status ) exit( status );
7675
7676         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7677         if( status ) exit( status );
7678
7679 #define ATTR    &attr
7680 #else
7681 #if HAVE_PTHREADS_D4
7682 #define ATTR    pthread_attr_default
7683 #else
7684 #define ATTR    NULL
7685 #endif
7686 #endif
7687         /* make sure pthread_create() isn't just a stub */
7688         status = pthread_create(&t, ATTR, task, NULL);
7689         if( status ) exit( status );
7690
7691         /* make sure pthread_detach() isn't just a stub */
7692 #if HAVE_PTHREADS_D4
7693         status = pthread_detach( &t );
7694 #else
7695         status = pthread_detach( t );
7696 #endif
7697
7698 #ifdef HAVE_LINUX_THREADS
7699         pthread_kill_other_threads_np();
7700 #endif
7701
7702         exit( status );
7703
7704 }
7705
7706 EOF
7707 if { (eval echo configure:7708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7708 then
7709   ol_cv_pthread_pthreads=yes
7710 else
7711   echo "configure: failed program was:" >&5
7712   cat conftest.$ac_ext >&5
7713   rm -fr conftest*
7714   ol_cv_pthread_pthreads=no
7715 fi
7716 rm -fr conftest*
7717 fi
7718
7719
7720                 # restore the LIBS
7721                 LIBS="$ol_LIBS"
7722         
7723 fi
7724
7725 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7726
7727         if test $ol_cv_pthread_pthreads = yes ; then
7728                 ol_link_pthreads="-pthreads"
7729                 ol_link_threads=posix
7730         fi
7731 fi
7732
7733                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7734 if test "$ol_link_threads" = no ; then
7735         # try -mthreads
7736         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7737 echo "configure:7738: checking for pthread link with -mthreads" >&5
7738 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7739   echo $ac_n "(cached) $ac_c" 1>&6
7740 else
7741   
7742                 # save the flags
7743                 ol_LIBS="$LIBS"
7744                 LIBS="-mthreads $LIBS"
7745
7746                 if test "$cross_compiling" = yes; then
7747   cat > conftest.$ac_ext <<EOF
7748 #line 7749 "configure"
7749 #include "confdefs.h"
7750 /* pthread test headers */
7751 #include <pthread.h>
7752 #ifndef NULL
7753 #define NULL (void*)0
7754 #endif
7755
7756 static void *task(p)
7757         void *p;
7758 {
7759         return (void *) (p == NULL);
7760 }
7761
7762 int main() {
7763
7764         /* pthread test function */
7765         pthread_t t;
7766         int status;
7767 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7768         /* This system (e.g. AIX) defaults detached; must override */
7769         pthread_attr_t attr;
7770
7771         status = pthread_attr_init(&attr);
7772         if( status ) exit( status );
7773
7774         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7775         if( status ) exit( status );
7776
7777 #define ATTR    &attr
7778 #else
7779 #if HAVE_PTHREADS_D4
7780 #define ATTR    pthread_attr_default
7781 #else
7782 #define ATTR    NULL
7783 #endif
7784 #endif
7785         /* make sure pthread_create() isn't just a stub */
7786         status = pthread_create(&t, ATTR, task, NULL);
7787         if( status ) exit( status );
7788
7789         /* make sure pthread_detach() isn't just a stub */
7790 #if HAVE_PTHREADS_D4
7791         status = pthread_detach( &t );
7792 #else
7793         status = pthread_detach( t );
7794 #endif
7795
7796 #ifdef HAVE_LINUX_THREADS
7797         pthread_kill_other_threads_np();
7798 #endif
7799
7800         exit( status );
7801
7802 ; return 0; }
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7805   rm -rf conftest*
7806   ol_cv_pthread_mthreads=yes
7807 else
7808   echo "configure: failed program was:" >&5
7809   cat conftest.$ac_ext >&5
7810   rm -rf conftest*
7811   ol_cv_pthread_mthreads=no
7812 fi
7813 rm -f conftest*
7814 else
7815   cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 /* pthread test headers */
7819 #include <pthread.h>
7820 #ifndef NULL
7821 #define NULL (void*)0
7822 #endif
7823
7824 static void *task(p)
7825         void *p;
7826 {
7827         return (void *) (p == NULL);
7828 }
7829
7830
7831 int main(argc, argv)
7832         int argc;
7833         char **argv;
7834 {
7835
7836         /* pthread test function */
7837         pthread_t t;
7838         int status;
7839 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7840         /* This system (e.g. AIX) defaults detached; must override */
7841         pthread_attr_t attr;
7842
7843         status = pthread_attr_init(&attr);
7844         if( status ) exit( status );
7845
7846         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7847         if( status ) exit( status );
7848
7849 #define ATTR    &attr
7850 #else
7851 #if HAVE_PTHREADS_D4
7852 #define ATTR    pthread_attr_default
7853 #else
7854 #define ATTR    NULL
7855 #endif
7856 #endif
7857         /* make sure pthread_create() isn't just a stub */
7858         status = pthread_create(&t, ATTR, task, NULL);
7859         if( status ) exit( status );
7860
7861         /* make sure pthread_detach() isn't just a stub */
7862 #if HAVE_PTHREADS_D4
7863         status = pthread_detach( &t );
7864 #else
7865         status = pthread_detach( t );
7866 #endif
7867
7868 #ifdef HAVE_LINUX_THREADS
7869         pthread_kill_other_threads_np();
7870 #endif
7871
7872         exit( status );
7873
7874 }
7875
7876 EOF
7877 if { (eval echo configure:7878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7878 then
7879   ol_cv_pthread_mthreads=yes
7880 else
7881   echo "configure: failed program was:" >&5
7882   cat conftest.$ac_ext >&5
7883   rm -fr conftest*
7884   ol_cv_pthread_mthreads=no
7885 fi
7886 rm -fr conftest*
7887 fi
7888
7889
7890                 # restore the LIBS
7891                 LIBS="$ol_LIBS"
7892         
7893 fi
7894
7895 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7896
7897         if test $ol_cv_pthread_mthreads = yes ; then
7898                 ol_link_pthreads="-mthreads"
7899                 ol_link_threads=posix
7900         fi
7901 fi
7902
7903                 # Pthread try link: -thread (ol_cv_pthread_thread)
7904 if test "$ol_link_threads" = no ; then
7905         # try -thread
7906         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7907 echo "configure:7908: checking for pthread link with -thread" >&5
7908 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7909   echo $ac_n "(cached) $ac_c" 1>&6
7910 else
7911   
7912                 # save the flags
7913                 ol_LIBS="$LIBS"
7914                 LIBS="-thread $LIBS"
7915
7916                 if test "$cross_compiling" = yes; then
7917   cat > conftest.$ac_ext <<EOF
7918 #line 7919 "configure"
7919 #include "confdefs.h"
7920 /* pthread test headers */
7921 #include <pthread.h>
7922 #ifndef NULL
7923 #define NULL (void*)0
7924 #endif
7925
7926 static void *task(p)
7927         void *p;
7928 {
7929         return (void *) (p == NULL);
7930 }
7931
7932 int main() {
7933
7934         /* pthread test function */
7935         pthread_t t;
7936         int status;
7937 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7938         /* This system (e.g. AIX) defaults detached; must override */
7939         pthread_attr_t attr;
7940
7941         status = pthread_attr_init(&attr);
7942         if( status ) exit( status );
7943
7944         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7945         if( status ) exit( status );
7946
7947 #define ATTR    &attr
7948 #else
7949 #if HAVE_PTHREADS_D4
7950 #define ATTR    pthread_attr_default
7951 #else
7952 #define ATTR    NULL
7953 #endif
7954 #endif
7955         /* make sure pthread_create() isn't just a stub */
7956         status = pthread_create(&t, ATTR, task, NULL);
7957         if( status ) exit( status );
7958
7959         /* make sure pthread_detach() isn't just a stub */
7960 #if HAVE_PTHREADS_D4
7961         status = pthread_detach( &t );
7962 #else
7963         status = pthread_detach( t );
7964 #endif
7965
7966 #ifdef HAVE_LINUX_THREADS
7967         pthread_kill_other_threads_np();
7968 #endif
7969
7970         exit( status );
7971
7972 ; return 0; }
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7975   rm -rf conftest*
7976   ol_cv_pthread_thread=yes
7977 else
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -rf conftest*
7981   ol_cv_pthread_thread=no
7982 fi
7983 rm -f conftest*
7984 else
7985   cat > conftest.$ac_ext <<EOF
7986 #line 7987 "configure"
7987 #include "confdefs.h"
7988 /* pthread test headers */
7989 #include <pthread.h>
7990 #ifndef NULL
7991 #define NULL (void*)0
7992 #endif
7993
7994 static void *task(p)
7995         void *p;
7996 {
7997         return (void *) (p == NULL);
7998 }
7999
8000
8001 int main(argc, argv)
8002         int argc;
8003         char **argv;
8004 {
8005
8006         /* pthread test function */
8007         pthread_t t;
8008         int status;
8009 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8010         /* This system (e.g. AIX) defaults detached; must override */
8011         pthread_attr_t attr;
8012
8013         status = pthread_attr_init(&attr);
8014         if( status ) exit( status );
8015
8016         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8017         if( status ) exit( status );
8018
8019 #define ATTR    &attr
8020 #else
8021 #if HAVE_PTHREADS_D4
8022 #define ATTR    pthread_attr_default
8023 #else
8024 #define ATTR    NULL
8025 #endif
8026 #endif
8027         /* make sure pthread_create() isn't just a stub */
8028         status = pthread_create(&t, ATTR, task, NULL);
8029         if( status ) exit( status );
8030
8031         /* make sure pthread_detach() isn't just a stub */
8032 #if HAVE_PTHREADS_D4
8033         status = pthread_detach( &t );
8034 #else
8035         status = pthread_detach( t );
8036 #endif
8037
8038 #ifdef HAVE_LINUX_THREADS
8039         pthread_kill_other_threads_np();
8040 #endif
8041
8042         exit( status );
8043
8044 }
8045
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8048 then
8049   ol_cv_pthread_thread=yes
8050 else
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -fr conftest*
8054   ol_cv_pthread_thread=no
8055 fi
8056 rm -fr conftest*
8057 fi
8058
8059
8060                 # restore the LIBS
8061                 LIBS="$ol_LIBS"
8062         
8063 fi
8064
8065 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8066
8067         if test $ol_cv_pthread_thread = yes ; then
8068                 ol_link_pthreads="-thread"
8069                 ol_link_threads=posix
8070         fi
8071 fi
8072
8073
8074                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8075 if test "$ol_link_threads" = no ; then
8076         # try -lpthread -lmach -lexc -lc_r
8077         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8078 echo "configure:8079: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8079 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8080   echo $ac_n "(cached) $ac_c" 1>&6
8081 else
8082   
8083                 # save the flags
8084                 ol_LIBS="$LIBS"
8085                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8086
8087                 if test "$cross_compiling" = yes; then
8088   cat > conftest.$ac_ext <<EOF
8089 #line 8090 "configure"
8090 #include "confdefs.h"
8091 /* pthread test headers */
8092 #include <pthread.h>
8093 #ifndef NULL
8094 #define NULL (void*)0
8095 #endif
8096
8097 static void *task(p)
8098         void *p;
8099 {
8100         return (void *) (p == NULL);
8101 }
8102
8103 int main() {
8104
8105         /* pthread test function */
8106         pthread_t t;
8107         int status;
8108 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8109         /* This system (e.g. AIX) defaults detached; must override */
8110         pthread_attr_t attr;
8111
8112         status = pthread_attr_init(&attr);
8113         if( status ) exit( status );
8114
8115         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8116         if( status ) exit( status );
8117
8118 #define ATTR    &attr
8119 #else
8120 #if HAVE_PTHREADS_D4
8121 #define ATTR    pthread_attr_default
8122 #else
8123 #define ATTR    NULL
8124 #endif
8125 #endif
8126         /* make sure pthread_create() isn't just a stub */
8127         status = pthread_create(&t, ATTR, task, NULL);
8128         if( status ) exit( status );
8129
8130         /* make sure pthread_detach() isn't just a stub */
8131 #if HAVE_PTHREADS_D4
8132         status = pthread_detach( &t );
8133 #else
8134         status = pthread_detach( t );
8135 #endif
8136
8137 #ifdef HAVE_LINUX_THREADS
8138         pthread_kill_other_threads_np();
8139 #endif
8140
8141         exit( status );
8142
8143 ; return 0; }
8144 EOF
8145 if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8146   rm -rf conftest*
8147   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8148 else
8149   echo "configure: failed program was:" >&5
8150   cat conftest.$ac_ext >&5
8151   rm -rf conftest*
8152   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8153 fi
8154 rm -f conftest*
8155 else
8156   cat > conftest.$ac_ext <<EOF
8157 #line 8158 "configure"
8158 #include "confdefs.h"
8159 /* pthread test headers */
8160 #include <pthread.h>
8161 #ifndef NULL
8162 #define NULL (void*)0
8163 #endif
8164
8165 static void *task(p)
8166         void *p;
8167 {
8168         return (void *) (p == NULL);
8169 }
8170
8171
8172 int main(argc, argv)
8173         int argc;
8174         char **argv;
8175 {
8176
8177         /* pthread test function */
8178         pthread_t t;
8179         int status;
8180 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8181         /* This system (e.g. AIX) defaults detached; must override */
8182         pthread_attr_t attr;
8183
8184         status = pthread_attr_init(&attr);
8185         if( status ) exit( status );
8186
8187         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8188         if( status ) exit( status );
8189
8190 #define ATTR    &attr
8191 #else
8192 #if HAVE_PTHREADS_D4
8193 #define ATTR    pthread_attr_default
8194 #else
8195 #define ATTR    NULL
8196 #endif
8197 #endif
8198         /* make sure pthread_create() isn't just a stub */
8199         status = pthread_create(&t, ATTR, task, NULL);
8200         if( status ) exit( status );
8201
8202         /* make sure pthread_detach() isn't just a stub */
8203 #if HAVE_PTHREADS_D4
8204         status = pthread_detach( &t );
8205 #else
8206         status = pthread_detach( t );
8207 #endif
8208
8209 #ifdef HAVE_LINUX_THREADS
8210         pthread_kill_other_threads_np();
8211 #endif
8212
8213         exit( status );
8214
8215 }
8216
8217 EOF
8218 if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8219 then
8220   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8221 else
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224   rm -fr conftest*
8225   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8226 fi
8227 rm -fr conftest*
8228 fi
8229
8230
8231                 # restore the LIBS
8232                 LIBS="$ol_LIBS"
8233         
8234 fi
8235
8236 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8237
8238         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8239                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8240                 ol_link_threads=posix
8241         fi
8242 fi
8243
8244                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8245 if test "$ol_link_threads" = no ; then
8246         # try -lpthread -lmach -lexc
8247         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8248 echo "configure:8249: checking for pthread link with -lpthread -lmach -lexc" >&5
8249 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8250   echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252   
8253                 # save the flags
8254                 ol_LIBS="$LIBS"
8255                 LIBS="-lpthread -lmach -lexc $LIBS"
8256
8257                 if test "$cross_compiling" = yes; then
8258   cat > conftest.$ac_ext <<EOF
8259 #line 8260 "configure"
8260 #include "confdefs.h"
8261 /* pthread test headers */
8262 #include <pthread.h>
8263 #ifndef NULL
8264 #define NULL (void*)0
8265 #endif
8266
8267 static void *task(p)
8268         void *p;
8269 {
8270         return (void *) (p == NULL);
8271 }
8272
8273 int main() {
8274
8275         /* pthread test function */
8276         pthread_t t;
8277         int status;
8278 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8279         /* This system (e.g. AIX) defaults detached; must override */
8280         pthread_attr_t attr;
8281
8282         status = pthread_attr_init(&attr);
8283         if( status ) exit( status );
8284
8285         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8286         if( status ) exit( status );
8287
8288 #define ATTR    &attr
8289 #else
8290 #if HAVE_PTHREADS_D4
8291 #define ATTR    pthread_attr_default
8292 #else
8293 #define ATTR    NULL
8294 #endif
8295 #endif
8296         /* make sure pthread_create() isn't just a stub */
8297         status = pthread_create(&t, ATTR, task, NULL);
8298         if( status ) exit( status );
8299
8300         /* make sure pthread_detach() isn't just a stub */
8301 #if HAVE_PTHREADS_D4
8302         status = pthread_detach( &t );
8303 #else
8304         status = pthread_detach( t );
8305 #endif
8306
8307 #ifdef HAVE_LINUX_THREADS
8308         pthread_kill_other_threads_np();
8309 #endif
8310
8311         exit( status );
8312
8313 ; return 0; }
8314 EOF
8315 if { (eval echo configure:8316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8316   rm -rf conftest*
8317   ol_cv_pthread_lpthread_lmach_lexc=yes
8318 else
8319   echo "configure: failed program was:" >&5
8320   cat conftest.$ac_ext >&5
8321   rm -rf conftest*
8322   ol_cv_pthread_lpthread_lmach_lexc=no
8323 fi
8324 rm -f conftest*
8325 else
8326   cat > conftest.$ac_ext <<EOF
8327 #line 8328 "configure"
8328 #include "confdefs.h"
8329 /* pthread test headers */
8330 #include <pthread.h>
8331 #ifndef NULL
8332 #define NULL (void*)0
8333 #endif
8334
8335 static void *task(p)
8336         void *p;
8337 {
8338         return (void *) (p == NULL);
8339 }
8340
8341
8342 int main(argc, argv)
8343         int argc;
8344         char **argv;
8345 {
8346
8347         /* pthread test function */
8348         pthread_t t;
8349         int status;
8350 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8351         /* This system (e.g. AIX) defaults detached; must override */
8352         pthread_attr_t attr;
8353
8354         status = pthread_attr_init(&attr);
8355         if( status ) exit( status );
8356
8357         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8358         if( status ) exit( status );
8359
8360 #define ATTR    &attr
8361 #else
8362 #if HAVE_PTHREADS_D4
8363 #define ATTR    pthread_attr_default
8364 #else
8365 #define ATTR    NULL
8366 #endif
8367 #endif
8368         /* make sure pthread_create() isn't just a stub */
8369         status = pthread_create(&t, ATTR, task, NULL);
8370         if( status ) exit( status );
8371
8372         /* make sure pthread_detach() isn't just a stub */
8373 #if HAVE_PTHREADS_D4
8374         status = pthread_detach( &t );
8375 #else
8376         status = pthread_detach( t );
8377 #endif
8378
8379 #ifdef HAVE_LINUX_THREADS
8380         pthread_kill_other_threads_np();
8381 #endif
8382
8383         exit( status );
8384
8385 }
8386
8387 EOF
8388 if { (eval echo configure:8389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8389 then
8390   ol_cv_pthread_lpthread_lmach_lexc=yes
8391 else
8392   echo "configure: failed program was:" >&5
8393   cat conftest.$ac_ext >&5
8394   rm -fr conftest*
8395   ol_cv_pthread_lpthread_lmach_lexc=no
8396 fi
8397 rm -fr conftest*
8398 fi
8399
8400
8401                 # restore the LIBS
8402                 LIBS="$ol_LIBS"
8403         
8404 fi
8405
8406 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8407
8408         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8409                 ol_link_pthreads="-lpthread -lmach -lexc"
8410                 ol_link_threads=posix
8411         fi
8412 fi
8413
8414
8415                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8416 if test "$ol_link_threads" = no ; then
8417         # try -lpthread -Wl,-woff,85
8418         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8419 echo "configure:8420: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8420 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   
8424                 # save the flags
8425                 ol_LIBS="$LIBS"
8426                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8427
8428                 if test "$cross_compiling" = yes; then
8429   cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 /* pthread test headers */
8433 #include <pthread.h>
8434 #ifndef NULL
8435 #define NULL (void*)0
8436 #endif
8437
8438 static void *task(p)
8439         void *p;
8440 {
8441         return (void *) (p == NULL);
8442 }
8443
8444 int main() {
8445
8446         /* pthread test function */
8447         pthread_t t;
8448         int status;
8449 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8450         /* This system (e.g. AIX) defaults detached; must override */
8451         pthread_attr_t attr;
8452
8453         status = pthread_attr_init(&attr);
8454         if( status ) exit( status );
8455
8456         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8457         if( status ) exit( status );
8458
8459 #define ATTR    &attr
8460 #else
8461 #if HAVE_PTHREADS_D4
8462 #define ATTR    pthread_attr_default
8463 #else
8464 #define ATTR    NULL
8465 #endif
8466 #endif
8467         /* make sure pthread_create() isn't just a stub */
8468         status = pthread_create(&t, ATTR, task, NULL);
8469         if( status ) exit( status );
8470
8471         /* make sure pthread_detach() isn't just a stub */
8472 #if HAVE_PTHREADS_D4
8473         status = pthread_detach( &t );
8474 #else
8475         status = pthread_detach( t );
8476 #endif
8477
8478 #ifdef HAVE_LINUX_THREADS
8479         pthread_kill_other_threads_np();
8480 #endif
8481
8482         exit( status );
8483
8484 ; return 0; }
8485 EOF
8486 if { (eval echo configure:8487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8487   rm -rf conftest*
8488   ol_cv_pthread_lib_lpthread_woff=yes
8489 else
8490   echo "configure: failed program was:" >&5
8491   cat conftest.$ac_ext >&5
8492   rm -rf conftest*
8493   ol_cv_pthread_lib_lpthread_woff=no
8494 fi
8495 rm -f conftest*
8496 else
8497   cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* pthread test headers */
8501 #include <pthread.h>
8502 #ifndef NULL
8503 #define NULL (void*)0
8504 #endif
8505
8506 static void *task(p)
8507         void *p;
8508 {
8509         return (void *) (p == NULL);
8510 }
8511
8512
8513 int main(argc, argv)
8514         int argc;
8515         char **argv;
8516 {
8517
8518         /* pthread test function */
8519         pthread_t t;
8520         int status;
8521 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8522         /* This system (e.g. AIX) defaults detached; must override */
8523         pthread_attr_t attr;
8524
8525         status = pthread_attr_init(&attr);
8526         if( status ) exit( status );
8527
8528         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8529         if( status ) exit( status );
8530
8531 #define ATTR    &attr
8532 #else
8533 #if HAVE_PTHREADS_D4
8534 #define ATTR    pthread_attr_default
8535 #else
8536 #define ATTR    NULL
8537 #endif
8538 #endif
8539         /* make sure pthread_create() isn't just a stub */
8540         status = pthread_create(&t, ATTR, task, NULL);
8541         if( status ) exit( status );
8542
8543         /* make sure pthread_detach() isn't just a stub */
8544 #if HAVE_PTHREADS_D4
8545         status = pthread_detach( &t );
8546 #else
8547         status = pthread_detach( t );
8548 #endif
8549
8550 #ifdef HAVE_LINUX_THREADS
8551         pthread_kill_other_threads_np();
8552 #endif
8553
8554         exit( status );
8555
8556 }
8557
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8560 then
8561   ol_cv_pthread_lib_lpthread_woff=yes
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -fr conftest*
8566   ol_cv_pthread_lib_lpthread_woff=no
8567 fi
8568 rm -fr conftest*
8569 fi
8570
8571
8572                 # restore the LIBS
8573                 LIBS="$ol_LIBS"
8574         
8575 fi
8576
8577 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8578
8579         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8580                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8581                 ol_link_threads=posix
8582         fi
8583 fi
8584
8585
8586                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8587 if test "$ol_link_threads" = no ; then
8588         # try -lpthread
8589         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8590 echo "configure:8591: checking for pthread link with -lpthread" >&5
8591 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8592   echo $ac_n "(cached) $ac_c" 1>&6
8593 else
8594   
8595                 # save the flags
8596                 ol_LIBS="$LIBS"
8597                 LIBS="-lpthread $LIBS"
8598
8599                 if test "$cross_compiling" = yes; then
8600   cat > conftest.$ac_ext <<EOF
8601 #line 8602 "configure"
8602 #include "confdefs.h"
8603 /* pthread test headers */
8604 #include <pthread.h>
8605 #ifndef NULL
8606 #define NULL (void*)0
8607 #endif
8608
8609 static void *task(p)
8610         void *p;
8611 {
8612         return (void *) (p == NULL);
8613 }
8614
8615 int main() {
8616
8617         /* pthread test function */
8618         pthread_t t;
8619         int status;
8620 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8621         /* This system (e.g. AIX) defaults detached; must override */
8622         pthread_attr_t attr;
8623
8624         status = pthread_attr_init(&attr);
8625         if( status ) exit( status );
8626
8627         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8628         if( status ) exit( status );
8629
8630 #define ATTR    &attr
8631 #else
8632 #if HAVE_PTHREADS_D4
8633 #define ATTR    pthread_attr_default
8634 #else
8635 #define ATTR    NULL
8636 #endif
8637 #endif
8638         /* make sure pthread_create() isn't just a stub */
8639         status = pthread_create(&t, ATTR, task, NULL);
8640         if( status ) exit( status );
8641
8642         /* make sure pthread_detach() isn't just a stub */
8643 #if HAVE_PTHREADS_D4
8644         status = pthread_detach( &t );
8645 #else
8646         status = pthread_detach( t );
8647 #endif
8648
8649 #ifdef HAVE_LINUX_THREADS
8650         pthread_kill_other_threads_np();
8651 #endif
8652
8653         exit( status );
8654
8655 ; return 0; }
8656 EOF
8657 if { (eval echo configure:8658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8658   rm -rf conftest*
8659   ol_cv_pthread_lpthread=yes
8660 else
8661   echo "configure: failed program was:" >&5
8662   cat conftest.$ac_ext >&5
8663   rm -rf conftest*
8664   ol_cv_pthread_lpthread=no
8665 fi
8666 rm -f conftest*
8667 else
8668   cat > conftest.$ac_ext <<EOF
8669 #line 8670 "configure"
8670 #include "confdefs.h"
8671 /* pthread test headers */
8672 #include <pthread.h>
8673 #ifndef NULL
8674 #define NULL (void*)0
8675 #endif
8676
8677 static void *task(p)
8678         void *p;
8679 {
8680         return (void *) (p == NULL);
8681 }
8682
8683
8684 int main(argc, argv)
8685         int argc;
8686         char **argv;
8687 {
8688
8689         /* pthread test function */
8690         pthread_t t;
8691         int status;
8692 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8693         /* This system (e.g. AIX) defaults detached; must override */
8694         pthread_attr_t attr;
8695
8696         status = pthread_attr_init(&attr);
8697         if( status ) exit( status );
8698
8699         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8700         if( status ) exit( status );
8701
8702 #define ATTR    &attr
8703 #else
8704 #if HAVE_PTHREADS_D4
8705 #define ATTR    pthread_attr_default
8706 #else
8707 #define ATTR    NULL
8708 #endif
8709 #endif
8710         /* make sure pthread_create() isn't just a stub */
8711         status = pthread_create(&t, ATTR, task, NULL);
8712         if( status ) exit( status );
8713
8714         /* make sure pthread_detach() isn't just a stub */
8715 #if HAVE_PTHREADS_D4
8716         status = pthread_detach( &t );
8717 #else
8718         status = pthread_detach( t );
8719 #endif
8720
8721 #ifdef HAVE_LINUX_THREADS
8722         pthread_kill_other_threads_np();
8723 #endif
8724
8725         exit( status );
8726
8727 }
8728
8729 EOF
8730 if { (eval echo configure:8731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8731 then
8732   ol_cv_pthread_lpthread=yes
8733 else
8734   echo "configure: failed program was:" >&5
8735   cat conftest.$ac_ext >&5
8736   rm -fr conftest*
8737   ol_cv_pthread_lpthread=no
8738 fi
8739 rm -fr conftest*
8740 fi
8741
8742
8743                 # restore the LIBS
8744                 LIBS="$ol_LIBS"
8745         
8746 fi
8747
8748 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8749
8750         if test $ol_cv_pthread_lpthread = yes ; then
8751                 ol_link_pthreads="-lpthread"
8752                 ol_link_threads=posix
8753         fi
8754 fi
8755
8756                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8757 if test "$ol_link_threads" = no ; then
8758         # try -lc_r
8759         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8760 echo "configure:8761: checking for pthread link with -lc_r" >&5
8761 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8762   echo $ac_n "(cached) $ac_c" 1>&6
8763 else
8764   
8765                 # save the flags
8766                 ol_LIBS="$LIBS"
8767                 LIBS="-lc_r $LIBS"
8768
8769                 if test "$cross_compiling" = yes; then
8770   cat > conftest.$ac_ext <<EOF
8771 #line 8772 "configure"
8772 #include "confdefs.h"
8773 /* pthread test headers */
8774 #include <pthread.h>
8775 #ifndef NULL
8776 #define NULL (void*)0
8777 #endif
8778
8779 static void *task(p)
8780         void *p;
8781 {
8782         return (void *) (p == NULL);
8783 }
8784
8785 int main() {
8786
8787         /* pthread test function */
8788         pthread_t t;
8789         int status;
8790 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8791         /* This system (e.g. AIX) defaults detached; must override */
8792         pthread_attr_t attr;
8793
8794         status = pthread_attr_init(&attr);
8795         if( status ) exit( status );
8796
8797         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8798         if( status ) exit( status );
8799
8800 #define ATTR    &attr
8801 #else
8802 #if HAVE_PTHREADS_D4
8803 #define ATTR    pthread_attr_default
8804 #else
8805 #define ATTR    NULL
8806 #endif
8807 #endif
8808         /* make sure pthread_create() isn't just a stub */
8809         status = pthread_create(&t, ATTR, task, NULL);
8810         if( status ) exit( status );
8811
8812         /* make sure pthread_detach() isn't just a stub */
8813 #if HAVE_PTHREADS_D4
8814         status = pthread_detach( &t );
8815 #else
8816         status = pthread_detach( t );
8817 #endif
8818
8819 #ifdef HAVE_LINUX_THREADS
8820         pthread_kill_other_threads_np();
8821 #endif
8822
8823         exit( status );
8824
8825 ; return 0; }
8826 EOF
8827 if { (eval echo configure:8828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8828   rm -rf conftest*
8829   ol_cv_pthread_lc_r=yes
8830 else
8831   echo "configure: failed program was:" >&5
8832   cat conftest.$ac_ext >&5
8833   rm -rf conftest*
8834   ol_cv_pthread_lc_r=no
8835 fi
8836 rm -f conftest*
8837 else
8838   cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 /* pthread test headers */
8842 #include <pthread.h>
8843 #ifndef NULL
8844 #define NULL (void*)0
8845 #endif
8846
8847 static void *task(p)
8848         void *p;
8849 {
8850         return (void *) (p == NULL);
8851 }
8852
8853
8854 int main(argc, argv)
8855         int argc;
8856         char **argv;
8857 {
8858
8859         /* pthread test function */
8860         pthread_t t;
8861         int status;
8862 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8863         /* This system (e.g. AIX) defaults detached; must override */
8864         pthread_attr_t attr;
8865
8866         status = pthread_attr_init(&attr);
8867         if( status ) exit( status );
8868
8869         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8870         if( status ) exit( status );
8871
8872 #define ATTR    &attr
8873 #else
8874 #if HAVE_PTHREADS_D4
8875 #define ATTR    pthread_attr_default
8876 #else
8877 #define ATTR    NULL
8878 #endif
8879 #endif
8880         /* make sure pthread_create() isn't just a stub */
8881         status = pthread_create(&t, ATTR, task, NULL);
8882         if( status ) exit( status );
8883
8884         /* make sure pthread_detach() isn't just a stub */
8885 #if HAVE_PTHREADS_D4
8886         status = pthread_detach( &t );
8887 #else
8888         status = pthread_detach( t );
8889 #endif
8890
8891 #ifdef HAVE_LINUX_THREADS
8892         pthread_kill_other_threads_np();
8893 #endif
8894
8895         exit( status );
8896
8897 }
8898
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8901 then
8902   ol_cv_pthread_lc_r=yes
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -fr conftest*
8907   ol_cv_pthread_lc_r=no
8908 fi
8909 rm -fr conftest*
8910 fi
8911
8912
8913                 # restore the LIBS
8914                 LIBS="$ol_LIBS"
8915         
8916 fi
8917
8918 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8919
8920         if test $ol_cv_pthread_lc_r = yes ; then
8921                 ol_link_pthreads="-lc_r"
8922                 ol_link_threads=posix
8923         fi
8924 fi
8925
8926
8927                 # Pthread try link: -threads (ol_cv_pthread_threads)
8928 if test "$ol_link_threads" = no ; then
8929         # try -threads
8930         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8931 echo "configure:8932: checking for pthread link with -threads" >&5
8932 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8933   echo $ac_n "(cached) $ac_c" 1>&6
8934 else
8935   
8936                 # save the flags
8937                 ol_LIBS="$LIBS"
8938                 LIBS="-threads $LIBS"
8939
8940                 if test "$cross_compiling" = yes; then
8941   cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944 /* pthread test headers */
8945 #include <pthread.h>
8946 #ifndef NULL
8947 #define NULL (void*)0
8948 #endif
8949
8950 static void *task(p)
8951         void *p;
8952 {
8953         return (void *) (p == NULL);
8954 }
8955
8956 int main() {
8957
8958         /* pthread test function */
8959         pthread_t t;
8960         int status;
8961 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8962         /* This system (e.g. AIX) defaults detached; must override */
8963         pthread_attr_t attr;
8964
8965         status = pthread_attr_init(&attr);
8966         if( status ) exit( status );
8967
8968         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8969         if( status ) exit( status );
8970
8971 #define ATTR    &attr
8972 #else
8973 #if HAVE_PTHREADS_D4
8974 #define ATTR    pthread_attr_default
8975 #else
8976 #define ATTR    NULL
8977 #endif
8978 #endif
8979         /* make sure pthread_create() isn't just a stub */
8980         status = pthread_create(&t, ATTR, task, NULL);
8981         if( status ) exit( status );
8982
8983         /* make sure pthread_detach() isn't just a stub */
8984 #if HAVE_PTHREADS_D4
8985         status = pthread_detach( &t );
8986 #else
8987         status = pthread_detach( t );
8988 #endif
8989
8990 #ifdef HAVE_LINUX_THREADS
8991         pthread_kill_other_threads_np();
8992 #endif
8993
8994         exit( status );
8995
8996 ; return 0; }
8997 EOF
8998 if { (eval echo configure:8999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8999   rm -rf conftest*
9000   ol_cv_pthread_threads=yes
9001 else
9002   echo "configure: failed program was:" >&5
9003   cat conftest.$ac_ext >&5
9004   rm -rf conftest*
9005   ol_cv_pthread_threads=no
9006 fi
9007 rm -f conftest*
9008 else
9009   cat > conftest.$ac_ext <<EOF
9010 #line 9011 "configure"
9011 #include "confdefs.h"
9012 /* pthread test headers */
9013 #include <pthread.h>
9014 #ifndef NULL
9015 #define NULL (void*)0
9016 #endif
9017
9018 static void *task(p)
9019         void *p;
9020 {
9021         return (void *) (p == NULL);
9022 }
9023
9024
9025 int main(argc, argv)
9026         int argc;
9027         char **argv;
9028 {
9029
9030         /* pthread test function */
9031         pthread_t t;
9032         int status;
9033 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9034         /* This system (e.g. AIX) defaults detached; must override */
9035         pthread_attr_t attr;
9036
9037         status = pthread_attr_init(&attr);
9038         if( status ) exit( status );
9039
9040         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9041         if( status ) exit( status );
9042
9043 #define ATTR    &attr
9044 #else
9045 #if HAVE_PTHREADS_D4
9046 #define ATTR    pthread_attr_default
9047 #else
9048 #define ATTR    NULL
9049 #endif
9050 #endif
9051         /* make sure pthread_create() isn't just a stub */
9052         status = pthread_create(&t, ATTR, task, NULL);
9053         if( status ) exit( status );
9054
9055         /* make sure pthread_detach() isn't just a stub */
9056 #if HAVE_PTHREADS_D4
9057         status = pthread_detach( &t );
9058 #else
9059         status = pthread_detach( t );
9060 #endif
9061
9062 #ifdef HAVE_LINUX_THREADS
9063         pthread_kill_other_threads_np();
9064 #endif
9065
9066         exit( status );
9067
9068 }
9069
9070 EOF
9071 if { (eval echo configure:9072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9072 then
9073   ol_cv_pthread_threads=yes
9074 else
9075   echo "configure: failed program was:" >&5
9076   cat conftest.$ac_ext >&5
9077   rm -fr conftest*
9078   ol_cv_pthread_threads=no
9079 fi
9080 rm -fr conftest*
9081 fi
9082
9083
9084                 # restore the LIBS
9085                 LIBS="$ol_LIBS"
9086         
9087 fi
9088
9089 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9090
9091         if test $ol_cv_pthread_threads = yes ; then
9092                 ol_link_pthreads="-threads"
9093                 ol_link_threads=posix
9094         fi
9095 fi
9096
9097
9098                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9099 if test "$ol_link_threads" = no ; then
9100         # try -lpthreads -lmach -lexc -lc_r
9101         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9102 echo "configure:9103: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9103 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9104   echo $ac_n "(cached) $ac_c" 1>&6
9105 else
9106   
9107                 # save the flags
9108                 ol_LIBS="$LIBS"
9109                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9110
9111                 if test "$cross_compiling" = yes; then
9112   cat > conftest.$ac_ext <<EOF
9113 #line 9114 "configure"
9114 #include "confdefs.h"
9115 /* pthread test headers */
9116 #include <pthread.h>
9117 #ifndef NULL
9118 #define NULL (void*)0
9119 #endif
9120
9121 static void *task(p)
9122         void *p;
9123 {
9124         return (void *) (p == NULL);
9125 }
9126
9127 int main() {
9128
9129         /* pthread test function */
9130         pthread_t t;
9131         int status;
9132 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9133         /* This system (e.g. AIX) defaults detached; must override */
9134         pthread_attr_t attr;
9135
9136         status = pthread_attr_init(&attr);
9137         if( status ) exit( status );
9138
9139         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9140         if( status ) exit( status );
9141
9142 #define ATTR    &attr
9143 #else
9144 #if HAVE_PTHREADS_D4
9145 #define ATTR    pthread_attr_default
9146 #else
9147 #define ATTR    NULL
9148 #endif
9149 #endif
9150         /* make sure pthread_create() isn't just a stub */
9151         status = pthread_create(&t, ATTR, task, NULL);
9152         if( status ) exit( status );
9153
9154         /* make sure pthread_detach() isn't just a stub */
9155 #if HAVE_PTHREADS_D4
9156         status = pthread_detach( &t );
9157 #else
9158         status = pthread_detach( t );
9159 #endif
9160
9161 #ifdef HAVE_LINUX_THREADS
9162         pthread_kill_other_threads_np();
9163 #endif
9164
9165         exit( status );
9166
9167 ; return 0; }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9170   rm -rf conftest*
9171   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9177 fi
9178 rm -f conftest*
9179 else
9180   cat > conftest.$ac_ext <<EOF
9181 #line 9182 "configure"
9182 #include "confdefs.h"
9183 /* pthread test headers */
9184 #include <pthread.h>
9185 #ifndef NULL
9186 #define NULL (void*)0
9187 #endif
9188
9189 static void *task(p)
9190         void *p;
9191 {
9192         return (void *) (p == NULL);
9193 }
9194
9195
9196 int main(argc, argv)
9197         int argc;
9198         char **argv;
9199 {
9200
9201         /* pthread test function */
9202         pthread_t t;
9203         int status;
9204 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9205         /* This system (e.g. AIX) defaults detached; must override */
9206         pthread_attr_t attr;
9207
9208         status = pthread_attr_init(&attr);
9209         if( status ) exit( status );
9210
9211         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9212         if( status ) exit( status );
9213
9214 #define ATTR    &attr
9215 #else
9216 #if HAVE_PTHREADS_D4
9217 #define ATTR    pthread_attr_default
9218 #else
9219 #define ATTR    NULL
9220 #endif
9221 #endif
9222         /* make sure pthread_create() isn't just a stub */
9223         status = pthread_create(&t, ATTR, task, NULL);
9224         if( status ) exit( status );
9225
9226         /* make sure pthread_detach() isn't just a stub */
9227 #if HAVE_PTHREADS_D4
9228         status = pthread_detach( &t );
9229 #else
9230         status = pthread_detach( t );
9231 #endif
9232
9233 #ifdef HAVE_LINUX_THREADS
9234         pthread_kill_other_threads_np();
9235 #endif
9236
9237         exit( status );
9238
9239 }
9240
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9243 then
9244   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -fr conftest*
9249   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9250 fi
9251 rm -fr conftest*
9252 fi
9253
9254
9255                 # restore the LIBS
9256                 LIBS="$ol_LIBS"
9257         
9258 fi
9259
9260 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9261
9262         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9263                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9264                 ol_link_threads=posix
9265         fi
9266 fi
9267
9268                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9269 if test "$ol_link_threads" = no ; then
9270         # try -lpthreads -lmach -lexc
9271         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9272 echo "configure:9273: checking for pthread link with -lpthreads -lmach -lexc" >&5
9273 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9274   echo $ac_n "(cached) $ac_c" 1>&6
9275 else
9276   
9277                 # save the flags
9278                 ol_LIBS="$LIBS"
9279                 LIBS="-lpthreads -lmach -lexc $LIBS"
9280
9281                 if test "$cross_compiling" = yes; then
9282   cat > conftest.$ac_ext <<EOF
9283 #line 9284 "configure"
9284 #include "confdefs.h"
9285 /* pthread test headers */
9286 #include <pthread.h>
9287 #ifndef NULL
9288 #define NULL (void*)0
9289 #endif
9290
9291 static void *task(p)
9292         void *p;
9293 {
9294         return (void *) (p == NULL);
9295 }
9296
9297 int main() {
9298
9299         /* pthread test function */
9300         pthread_t t;
9301         int status;
9302 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9303         /* This system (e.g. AIX) defaults detached; must override */
9304         pthread_attr_t attr;
9305
9306         status = pthread_attr_init(&attr);
9307         if( status ) exit( status );
9308
9309         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9310         if( status ) exit( status );
9311
9312 #define ATTR    &attr
9313 #else
9314 #if HAVE_PTHREADS_D4
9315 #define ATTR    pthread_attr_default
9316 #else
9317 #define ATTR    NULL
9318 #endif
9319 #endif
9320         /* make sure pthread_create() isn't just a stub */
9321         status = pthread_create(&t, ATTR, task, NULL);
9322         if( status ) exit( status );
9323
9324         /* make sure pthread_detach() isn't just a stub */
9325 #if HAVE_PTHREADS_D4
9326         status = pthread_detach( &t );
9327 #else
9328         status = pthread_detach( t );
9329 #endif
9330
9331 #ifdef HAVE_LINUX_THREADS
9332         pthread_kill_other_threads_np();
9333 #endif
9334
9335         exit( status );
9336
9337 ; return 0; }
9338 EOF
9339 if { (eval echo configure:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9340   rm -rf conftest*
9341   ol_cv_pthread_lpthreads_lmach_lexc=yes
9342 else
9343   echo "configure: failed program was:" >&5
9344   cat conftest.$ac_ext >&5
9345   rm -rf conftest*
9346   ol_cv_pthread_lpthreads_lmach_lexc=no
9347 fi
9348 rm -f conftest*
9349 else
9350   cat > conftest.$ac_ext <<EOF
9351 #line 9352 "configure"
9352 #include "confdefs.h"
9353 /* pthread test headers */
9354 #include <pthread.h>
9355 #ifndef NULL
9356 #define NULL (void*)0
9357 #endif
9358
9359 static void *task(p)
9360         void *p;
9361 {
9362         return (void *) (p == NULL);
9363 }
9364
9365
9366 int main(argc, argv)
9367         int argc;
9368         char **argv;
9369 {
9370
9371         /* pthread test function */
9372         pthread_t t;
9373         int status;
9374 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9375         /* This system (e.g. AIX) defaults detached; must override */
9376         pthread_attr_t attr;
9377
9378         status = pthread_attr_init(&attr);
9379         if( status ) exit( status );
9380
9381         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9382         if( status ) exit( status );
9383
9384 #define ATTR    &attr
9385 #else
9386 #if HAVE_PTHREADS_D4
9387 #define ATTR    pthread_attr_default
9388 #else
9389 #define ATTR    NULL
9390 #endif
9391 #endif
9392         /* make sure pthread_create() isn't just a stub */
9393         status = pthread_create(&t, ATTR, task, NULL);
9394         if( status ) exit( status );
9395
9396         /* make sure pthread_detach() isn't just a stub */
9397 #if HAVE_PTHREADS_D4
9398         status = pthread_detach( &t );
9399 #else
9400         status = pthread_detach( t );
9401 #endif
9402
9403 #ifdef HAVE_LINUX_THREADS
9404         pthread_kill_other_threads_np();
9405 #endif
9406
9407         exit( status );
9408
9409 }
9410
9411 EOF
9412 if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9413 then
9414   ol_cv_pthread_lpthreads_lmach_lexc=yes
9415 else
9416   echo "configure: failed program was:" >&5
9417   cat conftest.$ac_ext >&5
9418   rm -fr conftest*
9419   ol_cv_pthread_lpthreads_lmach_lexc=no
9420 fi
9421 rm -fr conftest*
9422 fi
9423
9424
9425                 # restore the LIBS
9426                 LIBS="$ol_LIBS"
9427         
9428 fi
9429
9430 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9431
9432         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9433                 ol_link_pthreads="-lpthreads -lmach -lexc"
9434                 ol_link_threads=posix
9435         fi
9436 fi
9437
9438                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9439 if test "$ol_link_threads" = no ; then
9440         # try -lpthreads -lexc
9441         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9442 echo "configure:9443: checking for pthread link with -lpthreads -lexc" >&5
9443 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9444   echo $ac_n "(cached) $ac_c" 1>&6
9445 else
9446   
9447                 # save the flags
9448                 ol_LIBS="$LIBS"
9449                 LIBS="-lpthreads -lexc $LIBS"
9450
9451                 if test "$cross_compiling" = yes; then
9452   cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455 /* pthread test headers */
9456 #include <pthread.h>
9457 #ifndef NULL
9458 #define NULL (void*)0
9459 #endif
9460
9461 static void *task(p)
9462         void *p;
9463 {
9464         return (void *) (p == NULL);
9465 }
9466
9467 int main() {
9468
9469         /* pthread test function */
9470         pthread_t t;
9471         int status;
9472 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9473         /* This system (e.g. AIX) defaults detached; must override */
9474         pthread_attr_t attr;
9475
9476         status = pthread_attr_init(&attr);
9477         if( status ) exit( status );
9478
9479         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9480         if( status ) exit( status );
9481
9482 #define ATTR    &attr
9483 #else
9484 #if HAVE_PTHREADS_D4
9485 #define ATTR    pthread_attr_default
9486 #else
9487 #define ATTR    NULL
9488 #endif
9489 #endif
9490         /* make sure pthread_create() isn't just a stub */
9491         status = pthread_create(&t, ATTR, task, NULL);
9492         if( status ) exit( status );
9493
9494         /* make sure pthread_detach() isn't just a stub */
9495 #if HAVE_PTHREADS_D4
9496         status = pthread_detach( &t );
9497 #else
9498         status = pthread_detach( t );
9499 #endif
9500
9501 #ifdef HAVE_LINUX_THREADS
9502         pthread_kill_other_threads_np();
9503 #endif
9504
9505         exit( status );
9506
9507 ; return 0; }
9508 EOF
9509 if { (eval echo configure:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9510   rm -rf conftest*
9511   ol_cv_pthread_lpthreads_lexc=yes
9512 else
9513   echo "configure: failed program was:" >&5
9514   cat conftest.$ac_ext >&5
9515   rm -rf conftest*
9516   ol_cv_pthread_lpthreads_lexc=no
9517 fi
9518 rm -f conftest*
9519 else
9520   cat > conftest.$ac_ext <<EOF
9521 #line 9522 "configure"
9522 #include "confdefs.h"
9523 /* pthread test headers */
9524 #include <pthread.h>
9525 #ifndef NULL
9526 #define NULL (void*)0
9527 #endif
9528
9529 static void *task(p)
9530         void *p;
9531 {
9532         return (void *) (p == NULL);
9533 }
9534
9535
9536 int main(argc, argv)
9537         int argc;
9538         char **argv;
9539 {
9540
9541         /* pthread test function */
9542         pthread_t t;
9543         int status;
9544 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9545         /* This system (e.g. AIX) defaults detached; must override */
9546         pthread_attr_t attr;
9547
9548         status = pthread_attr_init(&attr);
9549         if( status ) exit( status );
9550
9551         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9552         if( status ) exit( status );
9553
9554 #define ATTR    &attr
9555 #else
9556 #if HAVE_PTHREADS_D4
9557 #define ATTR    pthread_attr_default
9558 #else
9559 #define ATTR    NULL
9560 #endif
9561 #endif
9562         /* make sure pthread_create() isn't just a stub */
9563         status = pthread_create(&t, ATTR, task, NULL);
9564         if( status ) exit( status );
9565
9566         /* make sure pthread_detach() isn't just a stub */
9567 #if HAVE_PTHREADS_D4
9568         status = pthread_detach( &t );
9569 #else
9570         status = pthread_detach( t );
9571 #endif
9572
9573 #ifdef HAVE_LINUX_THREADS
9574         pthread_kill_other_threads_np();
9575 #endif
9576
9577         exit( status );
9578
9579 }
9580
9581 EOF
9582 if { (eval echo configure:9583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9583 then
9584   ol_cv_pthread_lpthreads_lexc=yes
9585 else
9586   echo "configure: failed program was:" >&5
9587   cat conftest.$ac_ext >&5
9588   rm -fr conftest*
9589   ol_cv_pthread_lpthreads_lexc=no
9590 fi
9591 rm -fr conftest*
9592 fi
9593
9594
9595                 # restore the LIBS
9596                 LIBS="$ol_LIBS"
9597         
9598 fi
9599
9600 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9601
9602         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9603                 ol_link_pthreads="-lpthreads -lexc"
9604                 ol_link_threads=posix
9605         fi
9606 fi
9607
9608
9609                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9610 if test "$ol_link_threads" = no ; then
9611         # try -lpthreads
9612         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9613 echo "configure:9614: checking for pthread link with -lpthreads" >&5
9614 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   
9618                 # save the flags
9619                 ol_LIBS="$LIBS"
9620                 LIBS="-lpthreads $LIBS"
9621
9622                 if test "$cross_compiling" = yes; then
9623   cat > conftest.$ac_ext <<EOF
9624 #line 9625 "configure"
9625 #include "confdefs.h"
9626 /* pthread test headers */
9627 #include <pthread.h>
9628 #ifndef NULL
9629 #define NULL (void*)0
9630 #endif
9631
9632 static void *task(p)
9633         void *p;
9634 {
9635         return (void *) (p == NULL);
9636 }
9637
9638 int main() {
9639
9640         /* pthread test function */
9641         pthread_t t;
9642         int status;
9643 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9644         /* This system (e.g. AIX) defaults detached; must override */
9645         pthread_attr_t attr;
9646
9647         status = pthread_attr_init(&attr);
9648         if( status ) exit( status );
9649
9650         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9651         if( status ) exit( status );
9652
9653 #define ATTR    &attr
9654 #else
9655 #if HAVE_PTHREADS_D4
9656 #define ATTR    pthread_attr_default
9657 #else
9658 #define ATTR    NULL
9659 #endif
9660 #endif
9661         /* make sure pthread_create() isn't just a stub */
9662         status = pthread_create(&t, ATTR, task, NULL);
9663         if( status ) exit( status );
9664
9665         /* make sure pthread_detach() isn't just a stub */
9666 #if HAVE_PTHREADS_D4
9667         status = pthread_detach( &t );
9668 #else
9669         status = pthread_detach( t );
9670 #endif
9671
9672 #ifdef HAVE_LINUX_THREADS
9673         pthread_kill_other_threads_np();
9674 #endif
9675
9676         exit( status );
9677
9678 ; return 0; }
9679 EOF
9680 if { (eval echo configure:9681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9681   rm -rf conftest*
9682   ol_cv_pthread_lib_lpthreads=yes
9683 else
9684   echo "configure: failed program was:" >&5
9685   cat conftest.$ac_ext >&5
9686   rm -rf conftest*
9687   ol_cv_pthread_lib_lpthreads=no
9688 fi
9689 rm -f conftest*
9690 else
9691   cat > conftest.$ac_ext <<EOF
9692 #line 9693 "configure"
9693 #include "confdefs.h"
9694 /* pthread test headers */
9695 #include <pthread.h>
9696 #ifndef NULL
9697 #define NULL (void*)0
9698 #endif
9699
9700 static void *task(p)
9701         void *p;
9702 {
9703         return (void *) (p == NULL);
9704 }
9705
9706
9707 int main(argc, argv)
9708         int argc;
9709         char **argv;
9710 {
9711
9712         /* pthread test function */
9713         pthread_t t;
9714         int status;
9715 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9716         /* This system (e.g. AIX) defaults detached; must override */
9717         pthread_attr_t attr;
9718
9719         status = pthread_attr_init(&attr);
9720         if( status ) exit( status );
9721
9722         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9723         if( status ) exit( status );
9724
9725 #define ATTR    &attr
9726 #else
9727 #if HAVE_PTHREADS_D4
9728 #define ATTR    pthread_attr_default
9729 #else
9730 #define ATTR    NULL
9731 #endif
9732 #endif
9733         /* make sure pthread_create() isn't just a stub */
9734         status = pthread_create(&t, ATTR, task, NULL);
9735         if( status ) exit( status );
9736
9737         /* make sure pthread_detach() isn't just a stub */
9738 #if HAVE_PTHREADS_D4
9739         status = pthread_detach( &t );
9740 #else
9741         status = pthread_detach( t );
9742 #endif
9743
9744 #ifdef HAVE_LINUX_THREADS
9745         pthread_kill_other_threads_np();
9746 #endif
9747
9748         exit( status );
9749
9750 }
9751
9752 EOF
9753 if { (eval echo configure:9754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9754 then
9755   ol_cv_pthread_lib_lpthreads=yes
9756 else
9757   echo "configure: failed program was:" >&5
9758   cat conftest.$ac_ext >&5
9759   rm -fr conftest*
9760   ol_cv_pthread_lib_lpthreads=no
9761 fi
9762 rm -fr conftest*
9763 fi
9764
9765
9766                 # restore the LIBS
9767                 LIBS="$ol_LIBS"
9768         
9769 fi
9770
9771 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9772
9773         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9774                 ol_link_pthreads="-lpthreads"
9775                 ol_link_threads=posix
9776         fi
9777 fi
9778
9779
9780                 if test $ol_link_threads != no ; then
9781                         cat >> confdefs.h <<\EOF
9782 #define HAVE_PTHREADS 1
9783 EOF
9784
9785
9786                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9787
9788                                                 save_CPPFLAGS="$CPPFLAGS"
9789                         save_LIBS="$LIBS"
9790                         LIBS="$LTHREAD_LIBS $LIBS"
9791
9792                                                                                                 for ac_func in sched_yield pthread_yield
9793 do
9794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9795 echo "configure:9796: checking for $ac_func" >&5
9796 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9797   echo $ac_n "(cached) $ac_c" 1>&6
9798 else
9799   cat > conftest.$ac_ext <<EOF
9800 #line 9801 "configure"
9801 #include "confdefs.h"
9802 /* System header to define __stub macros and hopefully few prototypes,
9803     which can conflict with char $ac_func(); below.  */
9804 #include <assert.h>
9805 /* Override any gcc2 internal prototype to avoid an error.  */
9806 /* We use char because int might match the return type of a gcc2
9807     builtin and then its argument prototype would still apply.  */
9808 char $ac_func();
9809 char (*f)();
9810
9811 int main() {
9812
9813 /* The GNU C library defines this for functions which it implements
9814     to always fail with ENOSYS.  Some functions are actually named
9815     something starting with __ and the normal name is an alias.  */
9816 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9817 choke me
9818 #else
9819 f = $ac_func;
9820 #endif
9821
9822 ; return 0; }
9823 EOF
9824 if { (eval echo configure:9825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9825   rm -rf conftest*
9826   eval "ac_cv_func_$ac_func=yes"
9827 else
9828   echo "configure: failed program was:" >&5
9829   cat conftest.$ac_ext >&5
9830   rm -rf conftest*
9831   eval "ac_cv_func_$ac_func=no"
9832 fi
9833 rm -f conftest*
9834 fi
9835
9836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9837   echo "$ac_t""yes" 1>&6
9838     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9839   cat >> confdefs.h <<EOF
9840 #define $ac_tr_func 1
9841 EOF
9842  
9843 else
9844   echo "$ac_t""no" 1>&6
9845 fi
9846 done
9847
9848
9849                         if test $ac_cv_func_sched_yield = no -a \
9850                                 $ac_cv_func_pthread_yield = no ; then
9851                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9852 echo "configure:9853: checking for sched_yield in -lrt" >&5
9853 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9854 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9855   echo $ac_n "(cached) $ac_c" 1>&6
9856 else
9857   ac_save_LIBS="$LIBS"
9858 LIBS="-lrt  $LIBS"
9859 cat > conftest.$ac_ext <<EOF
9860 #line 9861 "configure"
9861 #include "confdefs.h"
9862 /* Override any gcc2 internal prototype to avoid an error.  */
9863 /* We use char because int might match the return type of a gcc2
9864     builtin and then its argument prototype would still apply.  */
9865 char sched_yield();
9866
9867 int main() {
9868 sched_yield()
9869 ; return 0; }
9870 EOF
9871 if { (eval echo configure:9872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9872   rm -rf conftest*
9873   eval "ac_cv_lib_$ac_lib_var=yes"
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -rf conftest*
9878   eval "ac_cv_lib_$ac_lib_var=no"
9879 fi
9880 rm -f conftest*
9881 LIBS="$ac_save_LIBS"
9882
9883 fi
9884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9885   echo "$ac_t""yes" 1>&6
9886   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9887                                         cat >> confdefs.h <<\EOF
9888 #define HAVE_SCHED_YIELD 1
9889 EOF
9890
9891                                         ac_cv_func_sched_yield=yes
9892 else
9893   echo "$ac_t""no" 1>&6
9894 ac_cv_func_sched_yield=no
9895 fi
9896
9897                         fi
9898                         if test $ac_cv_func_sched_yield = no -a \
9899                                 $ac_cv_func_pthread_yield = no ; then
9900                                                                                                 for ac_func in thr_yield
9901 do
9902 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9903 echo "configure:9904: checking for $ac_func" >&5
9904 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9905   echo $ac_n "(cached) $ac_c" 1>&6
9906 else
9907   cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 /* System header to define __stub macros and hopefully few prototypes,
9911     which can conflict with char $ac_func(); below.  */
9912 #include <assert.h>
9913 /* Override any gcc2 internal prototype to avoid an error.  */
9914 /* We use char because int might match the return type of a gcc2
9915     builtin and then its argument prototype would still apply.  */
9916 char $ac_func();
9917 char (*f)();
9918
9919 int main() {
9920
9921 /* The GNU C library defines this for functions which it implements
9922     to always fail with ENOSYS.  Some functions are actually named
9923     something starting with __ and the normal name is an alias.  */
9924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9925 choke me
9926 #else
9927 f = $ac_func;
9928 #endif
9929
9930 ; return 0; }
9931 EOF
9932 if { (eval echo configure:9933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9933   rm -rf conftest*
9934   eval "ac_cv_func_$ac_func=yes"
9935 else
9936   echo "configure: failed program was:" >&5
9937   cat conftest.$ac_ext >&5
9938   rm -rf conftest*
9939   eval "ac_cv_func_$ac_func=no"
9940 fi
9941 rm -f conftest*
9942 fi
9943
9944 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9945   echo "$ac_t""yes" 1>&6
9946     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9947   cat >> confdefs.h <<EOF
9948 #define $ac_tr_func 1
9949 EOF
9950  
9951 else
9952   echo "$ac_t""no" 1>&6
9953 fi
9954 done
9955
9956                         fi
9957                         if test $ac_cv_func_sched_yield = no -a \
9958                                 $ac_cv_func_pthread_yield = no -a \
9959                                 "$ac_cv_func_thr_yield" = no ; then
9960                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9961                         fi
9962
9963                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9964 do
9965 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9966 echo "configure:9967: checking for $ac_func" >&5
9967 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9968   echo $ac_n "(cached) $ac_c" 1>&6
9969 else
9970   cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973 /* System header to define __stub macros and hopefully few prototypes,
9974     which can conflict with char $ac_func(); below.  */
9975 #include <assert.h>
9976 /* Override any gcc2 internal prototype to avoid an error.  */
9977 /* We use char because int might match the return type of a gcc2
9978     builtin and then its argument prototype would still apply.  */
9979 char $ac_func();
9980 char (*f)();
9981
9982 int main() {
9983
9984 /* The GNU C library defines this for functions which it implements
9985     to always fail with ENOSYS.  Some functions are actually named
9986     something starting with __ and the normal name is an alias.  */
9987 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9988 choke me
9989 #else
9990 f = $ac_func;
9991 #endif
9992
9993 ; return 0; }
9994 EOF
9995 if { (eval echo configure:9996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9996   rm -rf conftest*
9997   eval "ac_cv_func_$ac_func=yes"
9998 else
9999   echo "configure: failed program was:" >&5
10000   cat conftest.$ac_ext >&5
10001   rm -rf conftest*
10002   eval "ac_cv_func_$ac_func=no"
10003 fi
10004 rm -f conftest*
10005 fi
10006
10007 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10008   echo "$ac_t""yes" 1>&6
10009     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10010   cat >> confdefs.h <<EOF
10011 #define $ac_tr_func 1
10012 EOF
10013  
10014 else
10015   echo "$ac_t""no" 1>&6
10016 fi
10017 done
10018
10019
10020                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10021 echo "configure:10022: checking for pthread_detach with <pthread.h>" >&5
10022 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10023   echo $ac_n "(cached) $ac_c" 1>&6
10024 else
10025   
10026                                                                 cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029
10030 #include <pthread.h>
10031 #ifndef NULL
10032 #define NULL (void*)0
10033 #endif
10034
10035 int main() {
10036 pthread_detach(NULL);
10037 ; return 0; }
10038 EOF
10039 if { (eval echo configure:10040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10040   rm -rf conftest*
10041   ol_cv_func_pthread_detach=yes
10042 else
10043   echo "configure: failed program was:" >&5
10044   cat conftest.$ac_ext >&5
10045   rm -rf conftest*
10046   ol_cv_func_pthread_detach=no
10047 fi
10048 rm -f conftest*
10049                         
10050 fi
10051
10052 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10053
10054                         if test $ol_cv_func_pthread_detach = no ; then
10055                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10056                         fi
10057
10058                         cat >> confdefs.h <<\EOF
10059 #define HAVE_PTHREAD_DETACH 1
10060 EOF
10061
10062
10063                                                 for ac_func in \
10064                                 pthread_setconcurrency \
10065                                 pthread_getconcurrency \
10066                                 thr_setconcurrency \
10067                                 thr_getconcurrency \
10068                         
10069 do
10070 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10071 echo "configure:10072: checking for $ac_func" >&5
10072 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10073   echo $ac_n "(cached) $ac_c" 1>&6
10074 else
10075   cat > conftest.$ac_ext <<EOF
10076 #line 10077 "configure"
10077 #include "confdefs.h"
10078 /* System header to define __stub macros and hopefully few prototypes,
10079     which can conflict with char $ac_func(); below.  */
10080 #include <assert.h>
10081 /* Override any gcc2 internal prototype to avoid an error.  */
10082 /* We use char because int might match the return type of a gcc2
10083     builtin and then its argument prototype would still apply.  */
10084 char $ac_func();
10085 char (*f)();
10086
10087 int main() {
10088
10089 /* The GNU C library defines this for functions which it implements
10090     to always fail with ENOSYS.  Some functions are actually named
10091     something starting with __ and the normal name is an alias.  */
10092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10093 choke me
10094 #else
10095 f = $ac_func;
10096 #endif
10097
10098 ; return 0; }
10099 EOF
10100 if { (eval echo configure:10101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10101   rm -rf conftest*
10102   eval "ac_cv_func_$ac_func=yes"
10103 else
10104   echo "configure: failed program was:" >&5
10105   cat conftest.$ac_ext >&5
10106   rm -rf conftest*
10107   eval "ac_cv_func_$ac_func=no"
10108 fi
10109 rm -f conftest*
10110 fi
10111
10112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10113   echo "$ac_t""yes" 1>&6
10114     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10115   cat >> confdefs.h <<EOF
10116 #define $ac_tr_func 1
10117 EOF
10118  
10119 else
10120   echo "$ac_t""no" 1>&6
10121 fi
10122 done
10123
10124
10125                         
10126         for ac_func in pthread_kill_other_threads_np
10127 do
10128 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10129 echo "configure:10130: checking for $ac_func" >&5
10130 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10131   echo $ac_n "(cached) $ac_c" 1>&6
10132 else
10133   cat > conftest.$ac_ext <<EOF
10134 #line 10135 "configure"
10135 #include "confdefs.h"
10136 /* System header to define __stub macros and hopefully few prototypes,
10137     which can conflict with char $ac_func(); below.  */
10138 #include <assert.h>
10139 /* Override any gcc2 internal prototype to avoid an error.  */
10140 /* We use char because int might match the return type of a gcc2
10141     builtin and then its argument prototype would still apply.  */
10142 char $ac_func();
10143 char (*f)();
10144
10145 int main() {
10146
10147 /* The GNU C library defines this for functions which it implements
10148     to always fail with ENOSYS.  Some functions are actually named
10149     something starting with __ and the normal name is an alias.  */
10150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10151 choke me
10152 #else
10153 f = $ac_func;
10154 #endif
10155
10156 ; return 0; }
10157 EOF
10158 if { (eval echo configure:10159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10159   rm -rf conftest*
10160   eval "ac_cv_func_$ac_func=yes"
10161 else
10162   echo "configure: failed program was:" >&5
10163   cat conftest.$ac_ext >&5
10164   rm -rf conftest*
10165   eval "ac_cv_func_$ac_func=no"
10166 fi
10167 rm -f conftest*
10168 fi
10169
10170 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10171   echo "$ac_t""yes" 1>&6
10172     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10173   cat >> confdefs.h <<EOF
10174 #define $ac_tr_func 1
10175 EOF
10176  
10177 else
10178   echo "$ac_t""no" 1>&6
10179 fi
10180 done
10181
10182         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10183 echo "configure:10184: checking for LinuxThreads implementation" >&5
10184 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10185   echo $ac_n "(cached) $ac_c" 1>&6
10186 else
10187   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10188 fi
10189
10190 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10191
10192                         
10193         
10194         
10195         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10196 echo "configure:10197: checking for LinuxThreads consistency" >&5
10197 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   
10201                 if test $ol_cv_header_linux_threads = yes -a \
10202                         $ol_cv_sys_linux_threads = yes; then
10203                         ol_cv_linux_threads=yes
10204                 elif test $ol_cv_header_linux_threads = no -a \
10205                         $ol_cv_sys_linux_threads = no; then
10206                         ol_cv_linux_threads=no
10207                 else
10208                         ol_cv_linux_threads=error
10209                 fi
10210         
10211 fi
10212
10213 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10214
10215
10216                         if test $ol_cv_linux_threads = error; then
10217                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10218                         fi
10219
10220                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10221 echo "configure:10222: checking if pthread_create() works" >&5
10222 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10223   echo $ac_n "(cached) $ac_c" 1>&6
10224 else
10225   
10226                         if test "$cross_compiling" = yes; then
10227                                 ol_cv_pthread_create_works=yes
10228 else
10229   cat > conftest.$ac_ext <<EOF
10230 #line 10231 "configure"
10231 #include "confdefs.h"
10232 /* pthread test headers */
10233 #include <pthread.h>
10234 #ifndef NULL
10235 #define NULL (void*)0
10236 #endif
10237
10238 static void *task(p)
10239         void *p;
10240 {
10241         return (void *) (p == NULL);
10242 }
10243
10244
10245 int main(argc, argv)
10246         int argc;
10247         char **argv;
10248 {
10249
10250         /* pthread test function */
10251         pthread_t t;
10252         int status;
10253 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10254         /* This system (e.g. AIX) defaults detached; must override */
10255         pthread_attr_t attr;
10256
10257         status = pthread_attr_init(&attr);
10258         if( status ) exit( status );
10259
10260         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10261         if( status ) exit( status );
10262
10263 #define ATTR    &attr
10264 #else
10265 #if HAVE_PTHREADS_D4
10266 #define ATTR    pthread_attr_default
10267 #else
10268 #define ATTR    NULL
10269 #endif
10270 #endif
10271         /* make sure pthread_create() isn't just a stub */
10272         status = pthread_create(&t, ATTR, task, NULL);
10273         if( status ) exit( status );
10274
10275         /* make sure pthread_detach() isn't just a stub */
10276 #if HAVE_PTHREADS_D4
10277         status = pthread_detach( &t );
10278 #else
10279         status = pthread_detach( t );
10280 #endif
10281
10282 #ifdef HAVE_LINUX_THREADS
10283         pthread_kill_other_threads_np();
10284 #endif
10285
10286         exit( status );
10287
10288 }
10289
10290 EOF
10291 if { (eval echo configure:10292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10292 then
10293   ol_cv_pthread_create_works=yes
10294 else
10295   echo "configure: failed program was:" >&5
10296   cat conftest.$ac_ext >&5
10297   rm -fr conftest*
10298   ol_cv_pthread_create_works=no
10299 fi
10300 rm -fr conftest*
10301 fi
10302
10303 fi
10304
10305 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10306
10307                         if test $ol_cv_pthread_create_works = no ; then
10308                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10309                         fi
10310
10311                                                 if test $ol_with_yielding_select = auto ; then
10312                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10313 echo "configure:10314: checking if select yields when using pthreads" >&5
10314 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10315   echo $ac_n "(cached) $ac_c" 1>&6
10316 else
10317   
10318                                 if test "$cross_compiling" = yes; then
10319   ol_cv_pthread_select_yields=cross
10320 else
10321   cat > conftest.$ac_ext <<EOF
10322 #line 10323 "configure"
10323 #include "confdefs.h"
10324
10325 #include <sys/types.h>
10326 #include <sys/time.h>
10327 #include <unistd.h>
10328 #include <pthread.h>
10329 #ifndef NULL
10330 #define NULL (void*) 0
10331 #endif
10332
10333 static int fildes[2];
10334
10335 static void *task(p)
10336         void *p;
10337 {
10338         int i;
10339         struct timeval tv;
10340
10341         fd_set rfds;
10342
10343         tv.tv_sec=10;
10344         tv.tv_usec=0;
10345
10346         FD_ZERO(&rfds);
10347         FD_SET(fildes[0], &rfds);
10348
10349         /* we're not interested in any fds */
10350         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10351
10352         if(i < 0) {
10353                 perror("select");
10354                 exit(10);
10355         }
10356
10357         exit(0); /* if we exit here, the select blocked the whole process */
10358 }
10359
10360 int main(argc, argv)
10361         int argc;
10362         char **argv;
10363 {
10364         pthread_t t;
10365
10366         /* create a pipe to select */
10367         if(pipe(&fildes[0])) {
10368                 perror("select");
10369                 exit(1);
10370         }
10371
10372 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10373         (void) pthread_setconcurrency(2);
10374 #else
10375 #ifdef HAVE_THR_SETCONCURRENCY
10376         /* Set Solaris LWP concurrency to 2 */
10377         thr_setconcurrency(2);
10378 #endif
10379 #endif
10380
10381 #if HAVE_PTHREADS_D4
10382         pthread_create(&t, pthread_attr_default, task, NULL);
10383 #else
10384         pthread_create(&t, NULL, task, NULL);
10385 #endif
10386
10387 #if HAVE_SCHED_YIELD
10388         sched_yield();  /* make sure task runs first */
10389 #else
10390 #ifdef HAVE_PTHREAD_YIELD
10391         pthread_yield();        /* make sure task runs first */
10392 #endif
10393 #endif
10394
10395         exit(2);
10396 }
10397 EOF
10398 if { (eval echo configure:10399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10399 then
10400   ol_cv_pthread_select_yields=no
10401 else
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -fr conftest*
10405   ol_cv_pthread_select_yields=yes
10406 fi
10407 rm -fr conftest*
10408 fi
10409
10410 fi
10411
10412 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10413
10414                                 if test $ol_cv_pthread_select_yields = cross ; then
10415                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10416                                 fi
10417
10418                                 if test $ol_cv_pthread_select_yields = yes ; then
10419                                         ol_with_yielding_select=yes
10420                                 fi
10421                         fi
10422
10423                                                 CPPFLAGS="$save_CPPFLAGS"
10424                         LIBS="$save_LIBS"
10425                 else
10426                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10427                 fi
10428         fi
10429
10430         if test $ol_with_threads = posix ; then
10431                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10432         fi
10433 fi
10434
10435 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10436         -o $ol_with_threads = mach ; then
10437
10438                 for ac_hdr in mach/cthreads.h
10439 do
10440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10442 echo "configure:10443: checking for $ac_hdr" >&5
10443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10444   echo $ac_n "(cached) $ac_c" 1>&6
10445 else
10446   cat > conftest.$ac_ext <<EOF
10447 #line 10448 "configure"
10448 #include "confdefs.h"
10449 #include <$ac_hdr>
10450 EOF
10451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10452 { (eval echo configure:10453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10454 if test -z "$ac_err"; then
10455   rm -rf conftest*
10456   eval "ac_cv_header_$ac_safe=yes"
10457 else
10458   echo "$ac_err" >&5
10459   echo "configure: failed program was:" >&5
10460   cat conftest.$ac_ext >&5
10461   rm -rf conftest*
10462   eval "ac_cv_header_$ac_safe=no"
10463 fi
10464 rm -f conftest*
10465 fi
10466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10467   echo "$ac_t""yes" 1>&6
10468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10469   cat >> confdefs.h <<EOF
10470 #define $ac_tr_hdr 1
10471 EOF
10472  
10473 else
10474   echo "$ac_t""no" 1>&6
10475 fi
10476 done
10477
10478         if test $ac_cv_header_mach_cthreads_h = yes ; then
10479                 ol_with_threads=found
10480
10481                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10482 echo "configure:10483: checking for cthread_fork" >&5
10483 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10484   echo $ac_n "(cached) $ac_c" 1>&6
10485 else
10486   cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489 /* System header to define __stub macros and hopefully few prototypes,
10490     which can conflict with char cthread_fork(); below.  */
10491 #include <assert.h>
10492 /* Override any gcc2 internal prototype to avoid an error.  */
10493 /* We use char because int might match the return type of a gcc2
10494     builtin and then its argument prototype would still apply.  */
10495 char cthread_fork();
10496 char (*f)();
10497
10498 int main() {
10499
10500 /* The GNU C library defines this for functions which it implements
10501     to always fail with ENOSYS.  Some functions are actually named
10502     something starting with __ and the normal name is an alias.  */
10503 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10504 choke me
10505 #else
10506 f = cthread_fork;
10507 #endif
10508
10509 ; return 0; }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10512   rm -rf conftest*
10513   eval "ac_cv_func_cthread_fork=yes"
10514 else
10515   echo "configure: failed program was:" >&5
10516   cat conftest.$ac_ext >&5
10517   rm -rf conftest*
10518   eval "ac_cv_func_cthread_fork=no"
10519 fi
10520 rm -f conftest*
10521 fi
10522
10523 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10524   echo "$ac_t""yes" 1>&6
10525   ol_link_threads=yes
10526 else
10527   echo "$ac_t""no" 1>&6
10528 fi
10529
10530
10531                 if test $ol_link_threads = no ; then
10532                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10533 echo "configure:10534: checking for cthread_fork with -all_load" >&5
10534 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10535   echo $ac_n "(cached) $ac_c" 1>&6
10536 else
10537   
10538                                                                 save_LIBS="$LIBS"
10539                                 LIBS="-all_load $LIBS"
10540                                 cat > conftest.$ac_ext <<EOF
10541 #line 10542 "configure"
10542 #include "confdefs.h"
10543 #include <mach/cthreads.h>
10544 int main() {
10545
10546                                         cthread_fork((void *)0, (void *)0);
10547                                         
10548 ; return 0; }
10549 EOF
10550 if { (eval echo configure:10551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10551   rm -rf conftest*
10552   ol_cv_cthread_all_load=yes
10553 else
10554   echo "configure: failed program was:" >&5
10555   cat conftest.$ac_ext >&5
10556   rm -rf conftest*
10557   ol_cv_cthread_all_load=no
10558 fi
10559 rm -f conftest*
10560                                                                 LIBS="$save_LIBS"
10561                         
10562 fi
10563
10564 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10565
10566                         if test $ol_cv_cthread_all_load = yes ; then
10567                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10568                                 ol_link_threads=mach
10569                         fi
10570                 fi
10571
10572                 if test $ol_link_threads != no ; then
10573                         : check for cthread specific functionality here
10574                         cat >> confdefs.h <<\EOF
10575 #define HAVE_MACH_CTHREADS 1
10576 EOF
10577
10578                 else
10579                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10580                 fi
10581         fi
10582
10583         if test $ol_with_threads = mach ; then
10584                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10585         fi
10586 fi
10587
10588 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10589         -o $ol_with_threads = pth ; then
10590
10591         for ac_hdr in pth.h
10592 do
10593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10595 echo "configure:10596: checking for $ac_hdr" >&5
10596 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10597   echo $ac_n "(cached) $ac_c" 1>&6
10598 else
10599   cat > conftest.$ac_ext <<EOF
10600 #line 10601 "configure"
10601 #include "confdefs.h"
10602 #include <$ac_hdr>
10603 EOF
10604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10605 { (eval echo configure:10606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10607 if test -z "$ac_err"; then
10608   rm -rf conftest*
10609   eval "ac_cv_header_$ac_safe=yes"
10610 else
10611   echo "$ac_err" >&5
10612   echo "configure: failed program was:" >&5
10613   cat conftest.$ac_ext >&5
10614   rm -rf conftest*
10615   eval "ac_cv_header_$ac_safe=no"
10616 fi
10617 rm -f conftest*
10618 fi
10619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10620   echo "$ac_t""yes" 1>&6
10621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10622   cat >> confdefs.h <<EOF
10623 #define $ac_tr_hdr 1
10624 EOF
10625  
10626 else
10627   echo "$ac_t""no" 1>&6
10628 fi
10629 done
10630
10631
10632         if test $ac_cv_header_pth_h = yes ; then
10633                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10634 echo "configure:10635: checking for pth_version in -lpth" >&5
10635 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10636 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10637   echo $ac_n "(cached) $ac_c" 1>&6
10638 else
10639   ac_save_LIBS="$LIBS"
10640 LIBS="-lpth  $LIBS"
10641 cat > conftest.$ac_ext <<EOF
10642 #line 10643 "configure"
10643 #include "confdefs.h"
10644 /* Override any gcc2 internal prototype to avoid an error.  */
10645 /* We use char because int might match the return type of a gcc2
10646     builtin and then its argument prototype would still apply.  */
10647 char pth_version();
10648
10649 int main() {
10650 pth_version()
10651 ; return 0; }
10652 EOF
10653 if { (eval echo configure:10654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10654   rm -rf conftest*
10655   eval "ac_cv_lib_$ac_lib_var=yes"
10656 else
10657   echo "configure: failed program was:" >&5
10658   cat conftest.$ac_ext >&5
10659   rm -rf conftest*
10660   eval "ac_cv_lib_$ac_lib_var=no"
10661 fi
10662 rm -f conftest*
10663 LIBS="$ac_save_LIBS"
10664
10665 fi
10666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10667   echo "$ac_t""yes" 1>&6
10668   have_pth=yes
10669 else
10670   echo "$ac_t""no" 1>&6
10671 have_pth=no
10672 fi
10673
10674
10675                 if test $have_pth = yes ; then
10676                         cat >> confdefs.h <<\EOF
10677 #define HAVE_GNU_PTH 1
10678 EOF
10679
10680                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10681                         ol_link_threads=pth
10682
10683                         if test $ol_with_yielding_select = auto ; then
10684                                 ol_with_yielding_select=yes
10685                         fi
10686                 fi
10687         fi
10688 fi
10689
10690 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10691         -o $ol_with_threads = lwp ; then
10692
10693                 for ac_hdr in thread.h synch.h
10694 do
10695 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10696 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10697 echo "configure:10698: checking for $ac_hdr" >&5
10698 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10699   echo $ac_n "(cached) $ac_c" 1>&6
10700 else
10701   cat > conftest.$ac_ext <<EOF
10702 #line 10703 "configure"
10703 #include "confdefs.h"
10704 #include <$ac_hdr>
10705 EOF
10706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10707 { (eval echo configure:10708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10709 if test -z "$ac_err"; then
10710   rm -rf conftest*
10711   eval "ac_cv_header_$ac_safe=yes"
10712 else
10713   echo "$ac_err" >&5
10714   echo "configure: failed program was:" >&5
10715   cat conftest.$ac_ext >&5
10716   rm -rf conftest*
10717   eval "ac_cv_header_$ac_safe=no"
10718 fi
10719 rm -f conftest*
10720 fi
10721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10722   echo "$ac_t""yes" 1>&6
10723     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10724   cat >> confdefs.h <<EOF
10725 #define $ac_tr_hdr 1
10726 EOF
10727  
10728 else
10729   echo "$ac_t""no" 1>&6
10730 fi
10731 done
10732
10733         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10734                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10735 echo "configure:10736: checking for thr_create in -lthread" >&5
10736 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   ac_save_LIBS="$LIBS"
10741 LIBS="-lthread  $LIBS"
10742 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745 /* Override any gcc2 internal prototype to avoid an error.  */
10746 /* We use char because int might match the return type of a gcc2
10747     builtin and then its argument prototype would still apply.  */
10748 char thr_create();
10749
10750 int main() {
10751 thr_create()
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10755   rm -rf conftest*
10756   eval "ac_cv_lib_$ac_lib_var=yes"
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=no"
10762 fi
10763 rm -f conftest*
10764 LIBS="$ac_save_LIBS"
10765
10766 fi
10767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10768   echo "$ac_t""yes" 1>&6
10769   have_thr=yes
10770 else
10771   echo "$ac_t""no" 1>&6
10772 have_thr=no
10773 fi
10774
10775
10776                 if test $have_thr = yes ; then
10777                         cat >> confdefs.h <<\EOF
10778 #define HAVE_THR 1
10779 EOF
10780
10781                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10782                         ol_link_threads=thr
10783
10784                         if test $ol_with_yielding_select = auto ; then
10785                                 ol_with_yielding_select=yes
10786                         fi
10787
10788                                                 for ac_func in \
10789                                 thr_setconcurrency \
10790                                 thr_getconcurrency \
10791                         
10792 do
10793 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10794 echo "configure:10795: checking for $ac_func" >&5
10795 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   cat > conftest.$ac_ext <<EOF
10799 #line 10800 "configure"
10800 #include "confdefs.h"
10801 /* System header to define __stub macros and hopefully few prototypes,
10802     which can conflict with char $ac_func(); below.  */
10803 #include <assert.h>
10804 /* Override any gcc2 internal prototype to avoid an error.  */
10805 /* We use char because int might match the return type of a gcc2
10806     builtin and then its argument prototype would still apply.  */
10807 char $ac_func();
10808 char (*f)();
10809
10810 int main() {
10811
10812 /* The GNU C library defines this for functions which it implements
10813     to always fail with ENOSYS.  Some functions are actually named
10814     something starting with __ and the normal name is an alias.  */
10815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10816 choke me
10817 #else
10818 f = $ac_func;
10819 #endif
10820
10821 ; return 0; }
10822 EOF
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10824   rm -rf conftest*
10825   eval "ac_cv_func_$ac_func=yes"
10826 else
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -rf conftest*
10830   eval "ac_cv_func_$ac_func=no"
10831 fi
10832 rm -f conftest*
10833 fi
10834
10835 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10836   echo "$ac_t""yes" 1>&6
10837     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10838   cat >> confdefs.h <<EOF
10839 #define $ac_tr_func 1
10840 EOF
10841  
10842 else
10843   echo "$ac_t""no" 1>&6
10844 fi
10845 done
10846
10847                 fi
10848         fi
10849
10850                 for ac_hdr in lwp/lwp.h
10851 do
10852 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10853 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10854 echo "configure:10855: checking for $ac_hdr" >&5
10855 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10856   echo $ac_n "(cached) $ac_c" 1>&6
10857 else
10858   cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861 #include <$ac_hdr>
10862 EOF
10863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10864 { (eval echo configure:10865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10865 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10866 if test -z "$ac_err"; then
10867   rm -rf conftest*
10868   eval "ac_cv_header_$ac_safe=yes"
10869 else
10870   echo "$ac_err" >&5
10871   echo "configure: failed program was:" >&5
10872   cat conftest.$ac_ext >&5
10873   rm -rf conftest*
10874   eval "ac_cv_header_$ac_safe=no"
10875 fi
10876 rm -f conftest*
10877 fi
10878 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10879   echo "$ac_t""yes" 1>&6
10880     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10881   cat >> confdefs.h <<EOF
10882 #define $ac_tr_hdr 1
10883 EOF
10884  
10885 else
10886   echo "$ac_t""no" 1>&6
10887 fi
10888 done
10889
10890         if test $ac_cv_header_lwp_lwp_h = yes ; then
10891                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10892 echo "configure:10893: checking for lwp_create in -llwp" >&5
10893 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10894 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10895   echo $ac_n "(cached) $ac_c" 1>&6
10896 else
10897   ac_save_LIBS="$LIBS"
10898 LIBS="-llwp  $LIBS"
10899 cat > conftest.$ac_ext <<EOF
10900 #line 10901 "configure"
10901 #include "confdefs.h"
10902 /* Override any gcc2 internal prototype to avoid an error.  */
10903 /* We use char because int might match the return type of a gcc2
10904     builtin and then its argument prototype would still apply.  */
10905 char lwp_create();
10906
10907 int main() {
10908 lwp_create()
10909 ; return 0; }
10910 EOF
10911 if { (eval echo configure:10912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10912   rm -rf conftest*
10913   eval "ac_cv_lib_$ac_lib_var=yes"
10914 else
10915   echo "configure: failed program was:" >&5
10916   cat conftest.$ac_ext >&5
10917   rm -rf conftest*
10918   eval "ac_cv_lib_$ac_lib_var=no"
10919 fi
10920 rm -f conftest*
10921 LIBS="$ac_save_LIBS"
10922
10923 fi
10924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10925   echo "$ac_t""yes" 1>&6
10926   have_lwp=yes
10927 else
10928   echo "$ac_t""no" 1>&6
10929 have_lwp=no
10930 fi
10931
10932
10933                 if test $have_lwp = yes ; then
10934                         cat >> confdefs.h <<\EOF
10935 #define HAVE_LWP 1
10936 EOF
10937
10938                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10939                         ol_link_threads=lwp
10940
10941                         if test $ol_with_yielding_select = auto ; then
10942                                 ol_with_yielding_select=no
10943                         fi
10944                 fi
10945         fi
10946 fi
10947
10948 if test $ol_with_yielding_select = yes ; then
10949         cat >> confdefs.h <<\EOF
10950 #define HAVE_YIELDING_SELECT 1
10951 EOF
10952
10953 fi
10954
10955 if test $ol_with_threads = manual ; then
10956                 ol_link_threads=yes
10957
10958         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10959
10960         for ac_hdr in pthread.h sched.h
10961 do
10962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10964 echo "configure:10965: checking for $ac_hdr" >&5
10965 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10966   echo $ac_n "(cached) $ac_c" 1>&6
10967 else
10968   cat > conftest.$ac_ext <<EOF
10969 #line 10970 "configure"
10970 #include "confdefs.h"
10971 #include <$ac_hdr>
10972 EOF
10973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10974 { (eval echo configure:10975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10976 if test -z "$ac_err"; then
10977   rm -rf conftest*
10978   eval "ac_cv_header_$ac_safe=yes"
10979 else
10980   echo "$ac_err" >&5
10981   echo "configure: failed program was:" >&5
10982   cat conftest.$ac_ext >&5
10983   rm -rf conftest*
10984   eval "ac_cv_header_$ac_safe=no"
10985 fi
10986 rm -f conftest*
10987 fi
10988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10989   echo "$ac_t""yes" 1>&6
10990     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10991   cat >> confdefs.h <<EOF
10992 #define $ac_tr_hdr 1
10993 EOF
10994  
10995 else
10996   echo "$ac_t""no" 1>&6
10997 fi
10998 done
10999
11000         for ac_func in sched_yield pthread_yield
11001 do
11002 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11003 echo "configure:11004: checking for $ac_func" >&5
11004 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11005   echo $ac_n "(cached) $ac_c" 1>&6
11006 else
11007   cat > conftest.$ac_ext <<EOF
11008 #line 11009 "configure"
11009 #include "confdefs.h"
11010 /* System header to define __stub macros and hopefully few prototypes,
11011     which can conflict with char $ac_func(); below.  */
11012 #include <assert.h>
11013 /* Override any gcc2 internal prototype to avoid an error.  */
11014 /* We use char because int might match the return type of a gcc2
11015     builtin and then its argument prototype would still apply.  */
11016 char $ac_func();
11017 char (*f)();
11018
11019 int main() {
11020
11021 /* The GNU C library defines this for functions which it implements
11022     to always fail with ENOSYS.  Some functions are actually named
11023     something starting with __ and the normal name is an alias.  */
11024 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11025 choke me
11026 #else
11027 f = $ac_func;
11028 #endif
11029
11030 ; return 0; }
11031 EOF
11032 if { (eval echo configure:11033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11033   rm -rf conftest*
11034   eval "ac_cv_func_$ac_func=yes"
11035 else
11036   echo "configure: failed program was:" >&5
11037   cat conftest.$ac_ext >&5
11038   rm -rf conftest*
11039   eval "ac_cv_func_$ac_func=no"
11040 fi
11041 rm -f conftest*
11042 fi
11043
11044 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11045   echo "$ac_t""yes" 1>&6
11046     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11047   cat >> confdefs.h <<EOF
11048 #define $ac_tr_func 1
11049 EOF
11050  
11051 else
11052   echo "$ac_t""no" 1>&6
11053 fi
11054 done
11055
11056         
11057         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11058 echo "configure:11059: checking for LinuxThreads pthread.h" >&5
11059 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11060   echo $ac_n "(cached) $ac_c" 1>&6
11061 else
11062   cat > conftest.$ac_ext <<EOF
11063 #line 11064 "configure"
11064 #include "confdefs.h"
11065 #include <pthread.h>
11066 EOF
11067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11068   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11069   rm -rf conftest*
11070   ol_cv_header_linux_threads=yes
11071 else
11072   rm -rf conftest*
11073   ol_cv_header_linux_threads=no
11074 fi
11075 rm -f conftest*
11076
11077                 
11078 fi
11079
11080 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11081         if test $ol_cv_header_linux_threads = yes; then
11082                 cat >> confdefs.h <<\EOF
11083 #define HAVE_LINUX_THREADS 1
11084 EOF
11085
11086         fi
11087
11088
11089         for ac_hdr in mach/cthreads.h
11090 do
11091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11093 echo "configure:11094: checking for $ac_hdr" >&5
11094 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11095   echo $ac_n "(cached) $ac_c" 1>&6
11096 else
11097   cat > conftest.$ac_ext <<EOF
11098 #line 11099 "configure"
11099 #include "confdefs.h"
11100 #include <$ac_hdr>
11101 EOF
11102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11103 { (eval echo configure:11104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11105 if test -z "$ac_err"; then
11106   rm -rf conftest*
11107   eval "ac_cv_header_$ac_safe=yes"
11108 else
11109   echo "$ac_err" >&5
11110   echo "configure: failed program was:" >&5
11111   cat conftest.$ac_ext >&5
11112   rm -rf conftest*
11113   eval "ac_cv_header_$ac_safe=no"
11114 fi
11115 rm -f conftest*
11116 fi
11117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11118   echo "$ac_t""yes" 1>&6
11119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11120   cat >> confdefs.h <<EOF
11121 #define $ac_tr_hdr 1
11122 EOF
11123  
11124 else
11125   echo "$ac_t""no" 1>&6
11126 fi
11127 done
11128
11129         for ac_hdr in lwp/lwp.h
11130 do
11131 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11132 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11133 echo "configure:11134: checking for $ac_hdr" >&5
11134 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11135   echo $ac_n "(cached) $ac_c" 1>&6
11136 else
11137   cat > conftest.$ac_ext <<EOF
11138 #line 11139 "configure"
11139 #include "confdefs.h"
11140 #include <$ac_hdr>
11141 EOF
11142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11143 { (eval echo configure:11144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11145 if test -z "$ac_err"; then
11146   rm -rf conftest*
11147   eval "ac_cv_header_$ac_safe=yes"
11148 else
11149   echo "$ac_err" >&5
11150   echo "configure: failed program was:" >&5
11151   cat conftest.$ac_ext >&5
11152   rm -rf conftest*
11153   eval "ac_cv_header_$ac_safe=no"
11154 fi
11155 rm -f conftest*
11156 fi
11157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11158   echo "$ac_t""yes" 1>&6
11159     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11160   cat >> confdefs.h <<EOF
11161 #define $ac_tr_hdr 1
11162 EOF
11163  
11164 else
11165   echo "$ac_t""no" 1>&6
11166 fi
11167 done
11168
11169         for ac_hdr in thread.h synch.h
11170 do
11171 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11172 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11173 echo "configure:11174: checking for $ac_hdr" >&5
11174 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11175   echo $ac_n "(cached) $ac_c" 1>&6
11176 else
11177   cat > conftest.$ac_ext <<EOF
11178 #line 11179 "configure"
11179 #include "confdefs.h"
11180 #include <$ac_hdr>
11181 EOF
11182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11183 { (eval echo configure:11184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11185 if test -z "$ac_err"; then
11186   rm -rf conftest*
11187   eval "ac_cv_header_$ac_safe=yes"
11188 else
11189   echo "$ac_err" >&5
11190   echo "configure: failed program was:" >&5
11191   cat conftest.$ac_ext >&5
11192   rm -rf conftest*
11193   eval "ac_cv_header_$ac_safe=no"
11194 fi
11195 rm -f conftest*
11196 fi
11197 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11198   echo "$ac_t""yes" 1>&6
11199     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11200   cat >> confdefs.h <<EOF
11201 #define $ac_tr_hdr 1
11202 EOF
11203  
11204 else
11205   echo "$ac_t""no" 1>&6
11206 fi
11207 done
11208
11209 fi
11210
11211 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11212                         cat >> confdefs.h <<\EOF
11213 #define REENTRANT 1
11214 EOF
11215
11216         cat >> confdefs.h <<\EOF
11217 #define _REENTRANT 1
11218 EOF
11219
11220         cat >> confdefs.h <<\EOF
11221 #define THREAD_SAFE 1
11222 EOF
11223
11224         cat >> confdefs.h <<\EOF
11225 #define _THREAD_SAFE 1
11226 EOF
11227
11228         cat >> confdefs.h <<\EOF
11229 #define THREADSAFE 1
11230 EOF
11231
11232         cat >> confdefs.h <<\EOF
11233 #define _THREADSAFE 1
11234 EOF
11235
11236         cat >> confdefs.h <<\EOF
11237 #define _SGI_MP_SOURCE 1
11238 EOF
11239
11240
11241                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11242 echo "configure:11243: checking for thread specific errno" >&5
11243 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11244   echo $ac_n "(cached) $ac_c" 1>&6
11245 else
11246   
11247                 cat > conftest.$ac_ext <<EOF
11248 #line 11249 "configure"
11249 #include "confdefs.h"
11250 #include <errno.h>
11251 int main() {
11252 errno = 0;
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11256   rm -rf conftest*
11257   ol_cv_errno_thread_specific=yes
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   ol_cv_errno_thread_specific=no
11263 fi
11264 rm -f conftest*
11265         
11266 fi
11267
11268 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11269
11270                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11271 echo "configure:11272: checking for thread specific h_errno" >&5
11272 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11273   echo $ac_n "(cached) $ac_c" 1>&6
11274 else
11275   
11276                 cat > conftest.$ac_ext <<EOF
11277 #line 11278 "configure"
11278 #include "confdefs.h"
11279 #include <netdb.h>
11280 int main() {
11281 h_errno = 0;
11282 ; return 0; }
11283 EOF
11284 if { (eval echo configure:11285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11285   rm -rf conftest*
11286   ol_cv_h_errno_thread_specific=yes
11287 else
11288   echo "configure: failed program was:" >&5
11289   cat conftest.$ac_ext >&5
11290   rm -rf conftest*
11291   ol_cv_h_errno_thread_specific=no
11292 fi
11293 rm -f conftest*
11294         
11295 fi
11296
11297 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11298
11299         if test $ol_cv_errno_thread_specific != yes \
11300                 -o $ol_cv_h_errno_thread_specific != yes ; then
11301                 LIBS="$LTHREAD_LIBS $LIBS"
11302                 LTHREAD_LIBS=""
11303         fi
11304
11305 fi  
11306
11307 if test $ol_link_threads = no ; then
11308         if test $ol_with_threads = yes ; then
11309                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11310         fi
11311
11312         if test $ol_with_threads = auto ; then
11313                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11314                 ol_with_threads=no
11315         fi
11316
11317         cat >> confdefs.h <<\EOF
11318 #define NO_THREADS 1
11319 EOF
11320
11321         LTHREAD_LIBS=""
11322 fi
11323
11324 if test $ol_link_threads != no ; then
11325         cat >> confdefs.h <<\EOF
11326 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11327 EOF
11328
11329 fi
11330
11331 ol_link_ldbm=no 
11332
11333 if test $ol_with_ldbm_api = auto \
11334         -o $ol_with_ldbm_api = berkeley \
11335         -o $ol_with_ldbm_api = bcompat ; then
11336
11337         if test $ol_with_ldbm_api = bcompat; then \
11338                 ol_cv_berkeley_db=no
11339 for ac_hdr in db_185.h db.h
11340 do
11341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11343 echo "configure:11344: checking for $ac_hdr" >&5
11344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11345   echo $ac_n "(cached) $ac_c" 1>&6
11346 else
11347   cat > conftest.$ac_ext <<EOF
11348 #line 11349 "configure"
11349 #include "confdefs.h"
11350 #include <$ac_hdr>
11351 EOF
11352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11353 { (eval echo configure:11354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11355 if test -z "$ac_err"; then
11356   rm -rf conftest*
11357   eval "ac_cv_header_$ac_safe=yes"
11358 else
11359   echo "$ac_err" >&5
11360   echo "configure: failed program was:" >&5
11361   cat conftest.$ac_ext >&5
11362   rm -rf conftest*
11363   eval "ac_cv_header_$ac_safe=no"
11364 fi
11365 rm -f conftest*
11366 fi
11367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11368   echo "$ac_t""yes" 1>&6
11369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11370   cat >> confdefs.h <<EOF
11371 #define $ac_tr_hdr 1
11372 EOF
11373  
11374 else
11375   echo "$ac_t""no" 1>&6
11376 fi
11377 done
11378
11379 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11380         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11381 echo "configure:11382: checking if Berkeley DB header compatibility" >&5
11382 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11383   echo $ac_n "(cached) $ac_c" 1>&6
11384 else
11385   
11386                 cat > conftest.$ac_ext <<EOF
11387 #line 11388 "configure"
11388 #include "confdefs.h"
11389
11390 #if HAVE_DB_185_H
11391 #       include <db_185.h>
11392 #else
11393 #       include <db.h>
11394 #endif
11395
11396  /* this check could be improved */
11397 #ifndef DB_VERSION_MAJOR
11398 #       define DB_VERSION_MAJOR 1
11399 #endif
11400
11401 #if DB_VERSION_MAJOR == 1 
11402         __db_version_1
11403 #endif
11404
11405 EOF
11406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11407   egrep "__db_version_1" >/dev/null 2>&1; then
11408   rm -rf conftest*
11409   ol_cv_header_db1=yes
11410 else
11411   rm -rf conftest*
11412   ol_cv_header_db1=no
11413 fi
11414 rm -f conftest*
11415
11416 fi
11417
11418 echo "$ac_t""$ol_cv_header_db1" 1>&6
11419
11420         if test ol_cv_header_db1=yes ; then
11421                 ol_cv_lib_db=no
11422 if test $ol_cv_lib_db = no ; then
11423         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11424 echo "configure:11425: checking for Berkeley DB link (default)" >&5
11425 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11426   echo $ac_n "(cached) $ac_c" 1>&6
11427 else
11428   
11429         ol_DB_LIB=
11430         ol_LIBS=$LIBS
11431         LIBS="$ol_DB_LIB $LIBS"
11432
11433         cat > conftest.$ac_ext <<EOF
11434 #line 11435 "configure"
11435 #include "confdefs.h"
11436
11437 #ifdef HAVE_DB_185_H
11438 # include <db_185.h>
11439 #else
11440 # include <db.h>
11441 #endif
11442
11443 #ifndef DB_VERSION_MAJOR
11444 # define DB_VERSION_MAJOR 1
11445 #endif
11446
11447 #ifndef NULL
11448 #define NULL ((void*)0)
11449 #endif
11450
11451 int main() {
11452
11453 #if DB_VERSION_MAJOR > 2
11454         db_env_create( NULL, 0 );
11455 #elif DB_VERSION_MAJOR > 1
11456         db_appexit( NULL );
11457 #else
11458         (void) dbopen( NULL, 0, 0, 0, NULL);
11459 #endif
11460
11461 ; return 0; }
11462 EOF
11463 if { (eval echo configure:11464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11464   rm -rf conftest*
11465   ol_cv_db_none=yes
11466 else
11467   echo "configure: failed program was:" >&5
11468   cat conftest.$ac_ext >&5
11469   rm -rf conftest*
11470   ol_cv_db_none=no
11471 fi
11472 rm -f conftest*
11473
11474         LIBS="$ol_LIBS"
11475
11476 fi
11477
11478 echo "$ac_t""$ol_cv_db_none" 1>&6
11479
11480         if test $ol_cv_db_none = yes ; then
11481                 ol_cv_lib_db=yes
11482         fi
11483 fi
11484
11485 if test $ol_cv_lib_db = no ; then
11486         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11487 echo "configure:11488: checking for Berkeley DB link (-ldb)" >&5
11488 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11489   echo $ac_n "(cached) $ac_c" 1>&6
11490 else
11491   
11492         ol_DB_LIB=-ldb
11493         ol_LIBS=$LIBS
11494         LIBS="$ol_DB_LIB $LIBS"
11495
11496         cat > conftest.$ac_ext <<EOF
11497 #line 11498 "configure"
11498 #include "confdefs.h"
11499
11500 #ifdef HAVE_DB_185_H
11501 # include <db_185.h>
11502 #else
11503 # include <db.h>
11504 #endif
11505
11506 #ifndef DB_VERSION_MAJOR
11507 # define DB_VERSION_MAJOR 1
11508 #endif
11509
11510 #ifndef NULL
11511 #define NULL ((void*)0)
11512 #endif
11513
11514 int main() {
11515
11516 #if DB_VERSION_MAJOR > 2
11517         db_env_create( NULL, 0 );
11518 #elif DB_VERSION_MAJOR > 1
11519         db_appexit( NULL );
11520 #else
11521         (void) dbopen( NULL, 0, 0, 0, NULL);
11522 #endif
11523
11524 ; return 0; }
11525 EOF
11526 if { (eval echo configure:11527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11527   rm -rf conftest*
11528   ol_cv_db_db=yes
11529 else
11530   echo "configure: failed program was:" >&5
11531   cat conftest.$ac_ext >&5
11532   rm -rf conftest*
11533   ol_cv_db_db=no
11534 fi
11535 rm -f conftest*
11536
11537         LIBS="$ol_LIBS"
11538
11539 fi
11540
11541 echo "$ac_t""$ol_cv_db_db" 1>&6
11542
11543         if test $ol_cv_db_db = yes ; then
11544                 ol_cv_lib_db=-ldb
11545         fi
11546 fi
11547
11548 if test $ol_cv_lib_db = no ; then
11549         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11550 echo "configure:11551: checking for Berkeley DB link (-ldb3)" >&5
11551 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11552   echo $ac_n "(cached) $ac_c" 1>&6
11553 else
11554   
11555         ol_DB_LIB=-ldb3
11556         ol_LIBS=$LIBS
11557         LIBS="$ol_DB_LIB $LIBS"
11558
11559         cat > conftest.$ac_ext <<EOF
11560 #line 11561 "configure"
11561 #include "confdefs.h"
11562
11563 #ifdef HAVE_DB_185_H
11564 # include <db_185.h>
11565 #else
11566 # include <db.h>
11567 #endif
11568
11569 #ifndef DB_VERSION_MAJOR
11570 # define DB_VERSION_MAJOR 1
11571 #endif
11572
11573 #ifndef NULL
11574 #define NULL ((void*)0)
11575 #endif
11576
11577 int main() {
11578
11579 #if DB_VERSION_MAJOR > 2
11580         db_env_create( NULL, 0 );
11581 #elif DB_VERSION_MAJOR > 1
11582         db_appexit( NULL );
11583 #else
11584         (void) dbopen( NULL, 0, 0, 0, NULL);
11585 #endif
11586
11587 ; return 0; }
11588 EOF
11589 if { (eval echo configure:11590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11590   rm -rf conftest*
11591   ol_cv_db_db3=yes
11592 else
11593   echo "configure: failed program was:" >&5
11594   cat conftest.$ac_ext >&5
11595   rm -rf conftest*
11596   ol_cv_db_db3=no
11597 fi
11598 rm -f conftest*
11599
11600         LIBS="$ol_LIBS"
11601
11602 fi
11603
11604 echo "$ac_t""$ol_cv_db_db3" 1>&6
11605
11606         if test $ol_cv_db_db3 = yes ; then
11607                 ol_cv_lib_db=-ldb3
11608         fi
11609 fi
11610
11611 if test $ol_cv_lib_db = no ; then
11612         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11613 echo "configure:11614: checking for Berkeley DB link (-ldb2)" >&5
11614 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11615   echo $ac_n "(cached) $ac_c" 1>&6
11616 else
11617   
11618         ol_DB_LIB=-ldb2
11619         ol_LIBS=$LIBS
11620         LIBS="$ol_DB_LIB $LIBS"
11621
11622         cat > conftest.$ac_ext <<EOF
11623 #line 11624 "configure"
11624 #include "confdefs.h"
11625
11626 #ifdef HAVE_DB_185_H
11627 # include <db_185.h>
11628 #else
11629 # include <db.h>
11630 #endif
11631
11632 #ifndef DB_VERSION_MAJOR
11633 # define DB_VERSION_MAJOR 1
11634 #endif
11635
11636 #ifndef NULL
11637 #define NULL ((void*)0)
11638 #endif
11639
11640 int main() {
11641
11642 #if DB_VERSION_MAJOR > 2
11643         db_env_create( NULL, 0 );
11644 #elif DB_VERSION_MAJOR > 1
11645         db_appexit( NULL );
11646 #else
11647         (void) dbopen( NULL, 0, 0, 0, NULL);
11648 #endif
11649
11650 ; return 0; }
11651 EOF
11652 if { (eval echo configure:11653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11653   rm -rf conftest*
11654   ol_cv_db_db2=yes
11655 else
11656   echo "configure: failed program was:" >&5
11657   cat conftest.$ac_ext >&5
11658   rm -rf conftest*
11659   ol_cv_db_db2=no
11660 fi
11661 rm -f conftest*
11662
11663         LIBS="$ol_LIBS"
11664
11665 fi
11666
11667 echo "$ac_t""$ol_cv_db_db2" 1>&6
11668
11669         if test $ol_cv_db_db2 = yes ; then
11670                 ol_cv_lib_db=-ldb2
11671         fi
11672 fi
11673
11674 if test $ol_cv_lib_db = no ; then
11675         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11676 echo "configure:11677: checking for Berkeley DB link (-ldb1)" >&5
11677 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11678   echo $ac_n "(cached) $ac_c" 1>&6
11679 else
11680   
11681         ol_DB_LIB=-ldb1
11682         ol_LIBS=$LIBS
11683         LIBS="$ol_DB_LIB $LIBS"
11684
11685         cat > conftest.$ac_ext <<EOF
11686 #line 11687 "configure"
11687 #include "confdefs.h"
11688
11689 #ifdef HAVE_DB_185_H
11690 # include <db_185.h>
11691 #else
11692 # include <db.h>
11693 #endif
11694
11695 #ifndef DB_VERSION_MAJOR
11696 # define DB_VERSION_MAJOR 1
11697 #endif
11698
11699 #ifndef NULL
11700 #define NULL ((void*)0)
11701 #endif
11702
11703 int main() {
11704
11705 #if DB_VERSION_MAJOR > 2
11706         db_env_create( NULL, 0 );
11707 #elif DB_VERSION_MAJOR > 1
11708         db_appexit( NULL );
11709 #else
11710         (void) dbopen( NULL, 0, 0, 0, NULL);
11711 #endif
11712
11713 ; return 0; }
11714 EOF
11715 if { (eval echo configure:11716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11716   rm -rf conftest*
11717   ol_cv_db_db1=yes
11718 else
11719   echo "configure: failed program was:" >&5
11720   cat conftest.$ac_ext >&5
11721   rm -rf conftest*
11722   ol_cv_db_db1=no
11723 fi
11724 rm -f conftest*
11725
11726         LIBS="$ol_LIBS"
11727
11728 fi
11729
11730 echo "$ac_t""$ol_cv_db_db1" 1>&6
11731
11732         if test $ol_cv_db_db1 = yes ; then
11733                 ol_cv_lib_db=-ldb1
11734         fi
11735 fi
11736
11737
11738                 if test "$ol_cv_lib_db" != no ; then
11739                         ol_cv_berkeley_db=yes
11740                 fi
11741         fi
11742 fi
11743
11744         else
11745                 ol_cv_berkeley_db=no
11746 for ac_hdr in db.h
11747 do
11748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11750 echo "configure:11751: checking for $ac_hdr" >&5
11751 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11752   echo $ac_n "(cached) $ac_c" 1>&6
11753 else
11754   cat > conftest.$ac_ext <<EOF
11755 #line 11756 "configure"
11756 #include "confdefs.h"
11757 #include <$ac_hdr>
11758 EOF
11759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11760 { (eval echo configure:11761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11762 if test -z "$ac_err"; then
11763   rm -rf conftest*
11764   eval "ac_cv_header_$ac_safe=yes"
11765 else
11766   echo "$ac_err" >&5
11767   echo "configure: failed program was:" >&5
11768   cat conftest.$ac_ext >&5
11769   rm -rf conftest*
11770   eval "ac_cv_header_$ac_safe=no"
11771 fi
11772 rm -f conftest*
11773 fi
11774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11775   echo "$ac_t""yes" 1>&6
11776     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11777   cat >> confdefs.h <<EOF
11778 #define $ac_tr_hdr 1
11779 EOF
11780  
11781 else
11782   echo "$ac_t""no" 1>&6
11783 fi
11784 done
11785
11786 if test $ac_cv_header_db_h = yes; then
11787         ol_cv_lib_db=no
11788 if test $ol_cv_lib_db = no ; then
11789         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11790 echo "configure:11791: checking for Berkeley DB link (default)" >&5
11791 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11792   echo $ac_n "(cached) $ac_c" 1>&6
11793 else
11794   
11795         ol_DB_LIB=
11796         ol_LIBS=$LIBS
11797         LIBS="$ol_DB_LIB $LIBS"
11798
11799         cat > conftest.$ac_ext <<EOF
11800 #line 11801 "configure"
11801 #include "confdefs.h"
11802
11803 #ifdef HAVE_DB_185_H
11804 # include <db_185.h>
11805 #else
11806 # include <db.h>
11807 #endif
11808
11809 #ifndef DB_VERSION_MAJOR
11810 # define DB_VERSION_MAJOR 1
11811 #endif
11812
11813 #ifndef NULL
11814 #define NULL ((void*)0)
11815 #endif
11816
11817 int main() {
11818
11819 #if DB_VERSION_MAJOR > 2
11820         db_env_create( NULL, 0 );
11821 #elif DB_VERSION_MAJOR > 1
11822         db_appexit( NULL );
11823 #else
11824         (void) dbopen( NULL, 0, 0, 0, NULL);
11825 #endif
11826
11827 ; return 0; }
11828 EOF
11829 if { (eval echo configure:11830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11830   rm -rf conftest*
11831   ol_cv_db_none=yes
11832 else
11833   echo "configure: failed program was:" >&5
11834   cat conftest.$ac_ext >&5
11835   rm -rf conftest*
11836   ol_cv_db_none=no
11837 fi
11838 rm -f conftest*
11839
11840         LIBS="$ol_LIBS"
11841
11842 fi
11843
11844 echo "$ac_t""$ol_cv_db_none" 1>&6
11845
11846         if test $ol_cv_db_none = yes ; then
11847                 ol_cv_lib_db=yes
11848         fi
11849 fi
11850
11851 if test $ol_cv_lib_db = no ; then
11852         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11853 echo "configure:11854: checking for Berkeley DB link (-ldb)" >&5
11854 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11855   echo $ac_n "(cached) $ac_c" 1>&6
11856 else
11857   
11858         ol_DB_LIB=-ldb
11859         ol_LIBS=$LIBS
11860         LIBS="$ol_DB_LIB $LIBS"
11861
11862         cat > conftest.$ac_ext <<EOF
11863 #line 11864 "configure"
11864 #include "confdefs.h"
11865
11866 #ifdef HAVE_DB_185_H
11867 # include <db_185.h>
11868 #else
11869 # include <db.h>
11870 #endif
11871
11872 #ifndef DB_VERSION_MAJOR
11873 # define DB_VERSION_MAJOR 1
11874 #endif
11875
11876 #ifndef NULL
11877 #define NULL ((void*)0)
11878 #endif
11879
11880 int main() {
11881
11882 #if DB_VERSION_MAJOR > 2
11883         db_env_create( NULL, 0 );
11884 #elif DB_VERSION_MAJOR > 1
11885         db_appexit( NULL );
11886 #else
11887         (void) dbopen( NULL, 0, 0, 0, NULL);
11888 #endif
11889
11890 ; return 0; }
11891 EOF
11892 if { (eval echo configure:11893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11893   rm -rf conftest*
11894   ol_cv_db_db=yes
11895 else
11896   echo "configure: failed program was:" >&5
11897   cat conftest.$ac_ext >&5
11898   rm -rf conftest*
11899   ol_cv_db_db=no
11900 fi
11901 rm -f conftest*
11902
11903         LIBS="$ol_LIBS"
11904
11905 fi
11906
11907 echo "$ac_t""$ol_cv_db_db" 1>&6
11908
11909         if test $ol_cv_db_db = yes ; then
11910                 ol_cv_lib_db=-ldb
11911         fi
11912 fi
11913
11914 if test $ol_cv_lib_db = no ; then
11915         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11916 echo "configure:11917: checking for Berkeley DB link (-ldb3)" >&5
11917 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11918   echo $ac_n "(cached) $ac_c" 1>&6
11919 else
11920   
11921         ol_DB_LIB=-ldb3
11922         ol_LIBS=$LIBS
11923         LIBS="$ol_DB_LIB $LIBS"
11924
11925         cat > conftest.$ac_ext <<EOF
11926 #line 11927 "configure"
11927 #include "confdefs.h"
11928
11929 #ifdef HAVE_DB_185_H
11930 # include <db_185.h>
11931 #else
11932 # include <db.h>
11933 #endif
11934
11935 #ifndef DB_VERSION_MAJOR
11936 # define DB_VERSION_MAJOR 1
11937 #endif
11938
11939 #ifndef NULL
11940 #define NULL ((void*)0)
11941 #endif
11942
11943 int main() {
11944
11945 #if DB_VERSION_MAJOR > 2
11946         db_env_create( NULL, 0 );
11947 #elif DB_VERSION_MAJOR > 1
11948         db_appexit( NULL );
11949 #else
11950         (void) dbopen( NULL, 0, 0, 0, NULL);
11951 #endif
11952
11953 ; return 0; }
11954 EOF
11955 if { (eval echo configure:11956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11956   rm -rf conftest*
11957   ol_cv_db_db3=yes
11958 else
11959   echo "configure: failed program was:" >&5
11960   cat conftest.$ac_ext >&5
11961   rm -rf conftest*
11962   ol_cv_db_db3=no
11963 fi
11964 rm -f conftest*
11965
11966         LIBS="$ol_LIBS"
11967
11968 fi
11969
11970 echo "$ac_t""$ol_cv_db_db3" 1>&6
11971
11972         if test $ol_cv_db_db3 = yes ; then
11973                 ol_cv_lib_db=-ldb3
11974         fi
11975 fi
11976
11977 if test $ol_cv_lib_db = no ; then
11978         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11979 echo "configure:11980: checking for Berkeley DB link (-ldb2)" >&5
11980 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11981   echo $ac_n "(cached) $ac_c" 1>&6
11982 else
11983   
11984         ol_DB_LIB=-ldb2
11985         ol_LIBS=$LIBS
11986         LIBS="$ol_DB_LIB $LIBS"
11987
11988         cat > conftest.$ac_ext <<EOF
11989 #line 11990 "configure"
11990 #include "confdefs.h"
11991
11992 #ifdef HAVE_DB_185_H
11993 # include <db_185.h>
11994 #else
11995 # include <db.h>
11996 #endif
11997
11998 #ifndef DB_VERSION_MAJOR
11999 # define DB_VERSION_MAJOR 1
12000 #endif
12001
12002 #ifndef NULL
12003 #define NULL ((void*)0)
12004 #endif
12005
12006 int main() {
12007
12008 #if DB_VERSION_MAJOR > 2
12009         db_env_create( NULL, 0 );
12010 #elif DB_VERSION_MAJOR > 1
12011         db_appexit( NULL );
12012 #else
12013         (void) dbopen( NULL, 0, 0, 0, NULL);
12014 #endif
12015
12016 ; return 0; }
12017 EOF
12018 if { (eval echo configure:12019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12019   rm -rf conftest*
12020   ol_cv_db_db2=yes
12021 else
12022   echo "configure: failed program was:" >&5
12023   cat conftest.$ac_ext >&5
12024   rm -rf conftest*
12025   ol_cv_db_db2=no
12026 fi
12027 rm -f conftest*
12028
12029         LIBS="$ol_LIBS"
12030
12031 fi
12032
12033 echo "$ac_t""$ol_cv_db_db2" 1>&6
12034
12035         if test $ol_cv_db_db2 = yes ; then
12036                 ol_cv_lib_db=-ldb2
12037         fi
12038 fi
12039
12040 if test $ol_cv_lib_db = no ; then
12041         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12042 echo "configure:12043: checking for Berkeley DB link (-ldb1)" >&5
12043 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12044   echo $ac_n "(cached) $ac_c" 1>&6
12045 else
12046   
12047         ol_DB_LIB=-ldb1
12048         ol_LIBS=$LIBS
12049         LIBS="$ol_DB_LIB $LIBS"
12050
12051         cat > conftest.$ac_ext <<EOF
12052 #line 12053 "configure"
12053 #include "confdefs.h"
12054
12055 #ifdef HAVE_DB_185_H
12056 # include <db_185.h>
12057 #else
12058 # include <db.h>
12059 #endif
12060
12061 #ifndef DB_VERSION_MAJOR
12062 # define DB_VERSION_MAJOR 1
12063 #endif
12064
12065 #ifndef NULL
12066 #define NULL ((void*)0)
12067 #endif
12068
12069 int main() {
12070
12071 #if DB_VERSION_MAJOR > 2
12072         db_env_create( NULL, 0 );
12073 #elif DB_VERSION_MAJOR > 1
12074         db_appexit( NULL );
12075 #else
12076         (void) dbopen( NULL, 0, 0, 0, NULL);
12077 #endif
12078
12079 ; return 0; }
12080 EOF
12081 if { (eval echo configure:12082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12082   rm -rf conftest*
12083   ol_cv_db_db1=yes
12084 else
12085   echo "configure: failed program was:" >&5
12086   cat conftest.$ac_ext >&5
12087   rm -rf conftest*
12088   ol_cv_db_db1=no
12089 fi
12090 rm -f conftest*
12091
12092         LIBS="$ol_LIBS"
12093
12094 fi
12095
12096 echo "$ac_t""$ol_cv_db_db1" 1>&6
12097
12098         if test $ol_cv_db_db1 = yes ; then
12099                 ol_cv_lib_db=-ldb1
12100         fi
12101 fi
12102
12103
12104         if test "$ol_cv_lib_db" != no ; then
12105                 ol_cv_berkeley_db=yes
12106                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12107 echo "configure:12108: checking for Berkeley DB thread support" >&5
12108 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12109   echo $ac_n "(cached) $ac_c" 1>&6
12110 else
12111   
12112         ol_LIBS="$LIBS"
12113         if test $ol_cv_lib_db != yes ; then
12114                 LIBS="$ol_cv_lib_db"
12115         fi
12116
12117         if test "$cross_compiling" = yes; then
12118   ol_cv_berkeley_db_thread=cross
12119 else
12120   cat > conftest.$ac_ext <<EOF
12121 #line 12122 "configure"
12122 #include "confdefs.h"
12123
12124 #ifdef HAVE_DB_185_H
12125         choke me;
12126 #else
12127 #include <db.h>
12128 #endif
12129 #ifndef NULL
12130 #define NULL ((void *)0)
12131 #endif
12132 main()
12133 {
12134         int rc;
12135         u_int32_t flags = DB_CREATE | DB_THREAD;
12136
12137 #if DB_VERSION_MAJOR > 2
12138         DB_ENV *env = NULL;
12139
12140         rc = db_env_create( &env, 0 );
12141
12142         if( rc == 0 ) {
12143 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12144                 rc = env->open( env, NULL, flags, 0 );
12145 #else
12146                 rc = env->open( env, NULL, NULL, flags, 0 );
12147 #endif
12148         }
12149
12150 #else
12151         DB_ENV env;
12152         memset( &env, '\0', sizeof(env) );
12153
12154         rc = db_appinit( NULL, NULL, &env, flags );
12155
12156         if( rc == 0 ) {
12157                 db_appexit( &env );
12158         }
12159 #endif
12160 #if DB_VERSION_MAJOR > 2
12161 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12162         env->remove( env, NULL, DB_FORCE);
12163 #else
12164         env->remove( env, NULL, NULL, DB_FORCE);
12165 #endif
12166 #endif
12167
12168         return rc;
12169 }
12170 EOF
12171 if { (eval echo configure:12172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12172 then
12173   ol_cv_berkeley_db_thread=yes
12174 else
12175   echo "configure: failed program was:" >&5
12176   cat conftest.$ac_ext >&5
12177   rm -fr conftest*
12178   ol_cv_berkeley_db_thread=no
12179 fi
12180 rm -fr conftest*
12181 fi
12182
12183
12184         LIBS="$ol_LIBS"
12185
12186         if test $ol_cv_berkeley_db_thread != no ; then
12187                 cat >> confdefs.h <<\EOF
12188 #define HAVE_BERKELEY_DB_THREAD 1
12189 EOF
12190
12191         fi
12192
12193 fi
12194
12195 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12196         fi
12197 fi
12198
12199         fi
12200
12201         if test $ol_cv_berkeley_db != no ; then
12202                 cat >> confdefs.h <<\EOF
12203 #define HAVE_BERKELEY_DB 1
12204 EOF
12205
12206
12207                 ol_link_ldbm=berkeley
12208                 ol_with_ldbm_api=db
12209
12210                 if test $ol_with_ldbm_type = hash ; then
12211                         cat >> confdefs.h <<\EOF
12212 #define LDBM_USE_DBHASH 1
12213 EOF
12214
12215                 else
12216                         cat >> confdefs.h <<\EOF
12217 #define LDBM_USE_DBBTREE 1
12218 EOF
12219
12220                 fi
12221
12222                                                 if test $ol_cv_lib_db != yes ; then
12223                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12224                 fi
12225         fi
12226 fi
12227
12228 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12229         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12230         ol_with_ldbm_api=none
12231 fi
12232
12233 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12234         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12235 echo "configure:12236: checking for MDBM library" >&5
12236 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12237   echo $ac_n "(cached) $ac_c" 1>&6
12238 else
12239         ol_LIBS="$LIBS"
12240         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12241 echo "configure:12242: checking for mdbm_set_chain" >&5
12242 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12243   echo $ac_n "(cached) $ac_c" 1>&6
12244 else
12245   cat > conftest.$ac_ext <<EOF
12246 #line 12247 "configure"
12247 #include "confdefs.h"
12248 /* System header to define __stub macros and hopefully few prototypes,
12249     which can conflict with char mdbm_set_chain(); below.  */
12250 #include <assert.h>
12251 /* Override any gcc2 internal prototype to avoid an error.  */
12252 /* We use char because int might match the return type of a gcc2
12253     builtin and then its argument prototype would still apply.  */
12254 char mdbm_set_chain();
12255 char (*f)();
12256
12257 int main() {
12258
12259 /* The GNU C library defines this for functions which it implements
12260     to always fail with ENOSYS.  Some functions are actually named
12261     something starting with __ and the normal name is an alias.  */
12262 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12263 choke me
12264 #else
12265 f = mdbm_set_chain;
12266 #endif
12267
12268 ; return 0; }
12269 EOF
12270 if { (eval echo configure:12271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12271   rm -rf conftest*
12272   eval "ac_cv_func_mdbm_set_chain=yes"
12273 else
12274   echo "configure: failed program was:" >&5
12275   cat conftest.$ac_ext >&5
12276   rm -rf conftest*
12277   eval "ac_cv_func_mdbm_set_chain=no"
12278 fi
12279 rm -f conftest*
12280 fi
12281
12282 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12283   echo "$ac_t""yes" 1>&6
12284   ol_cv_lib_mdbm=yes
12285 else
12286   echo "$ac_t""no" 1>&6
12287
12288                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12289 echo "configure:12290: checking for mdbm_set_chain in -lmdbm" >&5
12290 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12291 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12292   echo $ac_n "(cached) $ac_c" 1>&6
12293 else
12294   ac_save_LIBS="$LIBS"
12295 LIBS="-lmdbm  $LIBS"
12296 cat > conftest.$ac_ext <<EOF
12297 #line 12298 "configure"
12298 #include "confdefs.h"
12299 /* Override any gcc2 internal prototype to avoid an error.  */
12300 /* We use char because int might match the return type of a gcc2
12301     builtin and then its argument prototype would still apply.  */
12302 char mdbm_set_chain();
12303
12304 int main() {
12305 mdbm_set_chain()
12306 ; return 0; }
12307 EOF
12308 if { (eval echo configure:12309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12309   rm -rf conftest*
12310   eval "ac_cv_lib_$ac_lib_var=yes"
12311 else
12312   echo "configure: failed program was:" >&5
12313   cat conftest.$ac_ext >&5
12314   rm -rf conftest*
12315   eval "ac_cv_lib_$ac_lib_var=no"
12316 fi
12317 rm -f conftest*
12318 LIBS="$ac_save_LIBS"
12319
12320 fi
12321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12322   echo "$ac_t""yes" 1>&6
12323   ol_cv_lib_mdbm=-lmdbm
12324 else
12325   echo "$ac_t""no" 1>&6
12326 ol_cv_lib_mdbm=no
12327 fi
12328
12329         
12330 fi
12331
12332         LIBS="$ol_LIBS"
12333
12334 fi
12335
12336 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12337
12338
12339  for ac_hdr in mdbm.h
12340 do
12341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12343 echo "configure:12344: checking for $ac_hdr" >&5
12344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12345   echo $ac_n "(cached) $ac_c" 1>&6
12346 else
12347   cat > conftest.$ac_ext <<EOF
12348 #line 12349 "configure"
12349 #include "confdefs.h"
12350 #include <$ac_hdr>
12351 EOF
12352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12353 { (eval echo configure:12354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12355 if test -z "$ac_err"; then
12356   rm -rf conftest*
12357   eval "ac_cv_header_$ac_safe=yes"
12358 else
12359   echo "$ac_err" >&5
12360   echo "configure: failed program was:" >&5
12361   cat conftest.$ac_ext >&5
12362   rm -rf conftest*
12363   eval "ac_cv_header_$ac_safe=no"
12364 fi
12365 rm -f conftest*
12366 fi
12367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12368   echo "$ac_t""yes" 1>&6
12369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12370   cat >> confdefs.h <<EOF
12371 #define $ac_tr_hdr 1
12372 EOF
12373  
12374 else
12375   echo "$ac_t""no" 1>&6
12376 fi
12377 done
12378
12379  echo $ac_n "checking for db""... $ac_c" 1>&6
12380 echo "configure:12381: checking for db" >&5
12381 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12382   echo $ac_n "(cached) $ac_c" 1>&6
12383 else
12384   
12385         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12386                 ol_cv_mdbm=no
12387         else
12388                 ol_cv_mdbm=yes
12389         fi
12390
12391 fi
12392
12393 echo "$ac_t""$ol_cv_mdbm" 1>&6
12394  if test $ol_cv_mdbm = yes ; then
12395         cat >> confdefs.h <<\EOF
12396 #define HAVE_MDBM 1
12397 EOF
12398
12399  fi
12400
12401
12402         if test $ol_cv_mdbm = yes ; then
12403                 ol_link_ldbm=mdbm
12404                 ol_with_ldbm_api=mdbm
12405                 if test $ol_cv_lib_mdbm != yes ; then
12406                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12407                 fi
12408         fi
12409 fi
12410
12411 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12412         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12413 echo "configure:12414: checking for GDBM library" >&5
12414 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12415   echo $ac_n "(cached) $ac_c" 1>&6
12416 else
12417         ol_LIBS="$LIBS"
12418         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12419 echo "configure:12420: checking for gdbm_open" >&5
12420 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12421   echo $ac_n "(cached) $ac_c" 1>&6
12422 else
12423   cat > conftest.$ac_ext <<EOF
12424 #line 12425 "configure"
12425 #include "confdefs.h"
12426 /* System header to define __stub macros and hopefully few prototypes,
12427     which can conflict with char gdbm_open(); below.  */
12428 #include <assert.h>
12429 /* Override any gcc2 internal prototype to avoid an error.  */
12430 /* We use char because int might match the return type of a gcc2
12431     builtin and then its argument prototype would still apply.  */
12432 char gdbm_open();
12433 char (*f)();
12434
12435 int main() {
12436
12437 /* The GNU C library defines this for functions which it implements
12438     to always fail with ENOSYS.  Some functions are actually named
12439     something starting with __ and the normal name is an alias.  */
12440 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12441 choke me
12442 #else
12443 f = gdbm_open;
12444 #endif
12445
12446 ; return 0; }
12447 EOF
12448 if { (eval echo configure:12449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12449   rm -rf conftest*
12450   eval "ac_cv_func_gdbm_open=yes"
12451 else
12452   echo "configure: failed program was:" >&5
12453   cat conftest.$ac_ext >&5
12454   rm -rf conftest*
12455   eval "ac_cv_func_gdbm_open=no"
12456 fi
12457 rm -f conftest*
12458 fi
12459
12460 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12461   echo "$ac_t""yes" 1>&6
12462   ol_cv_lib_gdbm=yes
12463 else
12464   echo "$ac_t""no" 1>&6
12465
12466                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12467 echo "configure:12468: checking for gdbm_open in -lgdbm" >&5
12468 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12469 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12470   echo $ac_n "(cached) $ac_c" 1>&6
12471 else
12472   ac_save_LIBS="$LIBS"
12473 LIBS="-lgdbm  $LIBS"
12474 cat > conftest.$ac_ext <<EOF
12475 #line 12476 "configure"
12476 #include "confdefs.h"
12477 /* Override any gcc2 internal prototype to avoid an error.  */
12478 /* We use char because int might match the return type of a gcc2
12479     builtin and then its argument prototype would still apply.  */
12480 char gdbm_open();
12481
12482 int main() {
12483 gdbm_open()
12484 ; return 0; }
12485 EOF
12486 if { (eval echo configure:12487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12487   rm -rf conftest*
12488   eval "ac_cv_lib_$ac_lib_var=yes"
12489 else
12490   echo "configure: failed program was:" >&5
12491   cat conftest.$ac_ext >&5
12492   rm -rf conftest*
12493   eval "ac_cv_lib_$ac_lib_var=no"
12494 fi
12495 rm -f conftest*
12496 LIBS="$ac_save_LIBS"
12497
12498 fi
12499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12500   echo "$ac_t""yes" 1>&6
12501   ol_cv_lib_gdbm=-lgdbm
12502 else
12503   echo "$ac_t""no" 1>&6
12504 ol_cv_lib_gdbm=no
12505 fi
12506
12507         
12508 fi
12509
12510         LIBS="$ol_LIBS"
12511
12512 fi
12513
12514 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12515
12516
12517  for ac_hdr in gdbm.h
12518 do
12519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12521 echo "configure:12522: checking for $ac_hdr" >&5
12522 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12523   echo $ac_n "(cached) $ac_c" 1>&6
12524 else
12525   cat > conftest.$ac_ext <<EOF
12526 #line 12527 "configure"
12527 #include "confdefs.h"
12528 #include <$ac_hdr>
12529 EOF
12530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12531 { (eval echo configure:12532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12533 if test -z "$ac_err"; then
12534   rm -rf conftest*
12535   eval "ac_cv_header_$ac_safe=yes"
12536 else
12537   echo "$ac_err" >&5
12538   echo "configure: failed program was:" >&5
12539   cat conftest.$ac_ext >&5
12540   rm -rf conftest*
12541   eval "ac_cv_header_$ac_safe=no"
12542 fi
12543 rm -f conftest*
12544 fi
12545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12546   echo "$ac_t""yes" 1>&6
12547     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12548   cat >> confdefs.h <<EOF
12549 #define $ac_tr_hdr 1
12550 EOF
12551  
12552 else
12553   echo "$ac_t""no" 1>&6
12554 fi
12555 done
12556
12557  echo $ac_n "checking for db""... $ac_c" 1>&6
12558 echo "configure:12559: checking for db" >&5
12559 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12560   echo $ac_n "(cached) $ac_c" 1>&6
12561 else
12562   
12563         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12564                 ol_cv_gdbm=no
12565         else
12566                 ol_cv_gdbm=yes
12567         fi
12568
12569 fi
12570
12571 echo "$ac_t""$ol_cv_gdbm" 1>&6
12572  if test $ol_cv_gdbm = yes ; then
12573         cat >> confdefs.h <<\EOF
12574 #define HAVE_GDBM 1
12575 EOF
12576
12577  fi
12578
12579
12580         if test $ol_cv_gdbm = yes ; then
12581                 ol_link_ldbm=gdbm
12582                 ol_with_ldbm_api=gdbm
12583
12584                 if test $ol_cv_lib_gdbm != yes ; then
12585                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12586                 fi
12587         fi
12588 fi
12589
12590 if test $ol_with_ldbm_api = ndbm ; then
12591         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12592 echo "configure:12593: checking for NDBM library" >&5
12593 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12594   echo $ac_n "(cached) $ac_c" 1>&6
12595 else
12596         ol_LIBS="$LIBS"
12597         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12598 echo "configure:12599: checking for dbm_open" >&5
12599 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12600   echo $ac_n "(cached) $ac_c" 1>&6
12601 else
12602   cat > conftest.$ac_ext <<EOF
12603 #line 12604 "configure"
12604 #include "confdefs.h"
12605 /* System header to define __stub macros and hopefully few prototypes,
12606     which can conflict with char dbm_open(); below.  */
12607 #include <assert.h>
12608 /* Override any gcc2 internal prototype to avoid an error.  */
12609 /* We use char because int might match the return type of a gcc2
12610     builtin and then its argument prototype would still apply.  */
12611 char dbm_open();
12612 char (*f)();
12613
12614 int main() {
12615
12616 /* The GNU C library defines this for functions which it implements
12617     to always fail with ENOSYS.  Some functions are actually named
12618     something starting with __ and the normal name is an alias.  */
12619 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12620 choke me
12621 #else
12622 f = dbm_open;
12623 #endif
12624
12625 ; return 0; }
12626 EOF
12627 if { (eval echo configure:12628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12628   rm -rf conftest*
12629   eval "ac_cv_func_dbm_open=yes"
12630 else
12631   echo "configure: failed program was:" >&5
12632   cat conftest.$ac_ext >&5
12633   rm -rf conftest*
12634   eval "ac_cv_func_dbm_open=no"
12635 fi
12636 rm -f conftest*
12637 fi
12638
12639 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12640   echo "$ac_t""yes" 1>&6
12641   ol_cv_lib_ndbm=yes
12642 else
12643   echo "$ac_t""no" 1>&6
12644
12645                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12646 echo "configure:12647: checking for dbm_open in -lndbm" >&5
12647 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12649   echo $ac_n "(cached) $ac_c" 1>&6
12650 else
12651   ac_save_LIBS="$LIBS"
12652 LIBS="-lndbm  $LIBS"
12653 cat > conftest.$ac_ext <<EOF
12654 #line 12655 "configure"
12655 #include "confdefs.h"
12656 /* Override any gcc2 internal prototype to avoid an error.  */
12657 /* We use char because int might match the return type of a gcc2
12658     builtin and then its argument prototype would still apply.  */
12659 char dbm_open();
12660
12661 int main() {
12662 dbm_open()
12663 ; return 0; }
12664 EOF
12665 if { (eval echo configure:12666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12666   rm -rf conftest*
12667   eval "ac_cv_lib_$ac_lib_var=yes"
12668 else
12669   echo "configure: failed program was:" >&5
12670   cat conftest.$ac_ext >&5
12671   rm -rf conftest*
12672   eval "ac_cv_lib_$ac_lib_var=no"
12673 fi
12674 rm -f conftest*
12675 LIBS="$ac_save_LIBS"
12676
12677 fi
12678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12679   echo "$ac_t""yes" 1>&6
12680   ol_cv_lib_ndbm=-lndbm
12681 else
12682   echo "$ac_t""no" 1>&6
12683
12684                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12685 echo "configure:12686: checking for dbm_open in -ldbm" >&5
12686 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12687 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12688   echo $ac_n "(cached) $ac_c" 1>&6
12689 else
12690   ac_save_LIBS="$LIBS"
12691 LIBS="-ldbm  $LIBS"
12692 cat > conftest.$ac_ext <<EOF
12693 #line 12694 "configure"
12694 #include "confdefs.h"
12695 /* Override any gcc2 internal prototype to avoid an error.  */
12696 /* We use char because int might match the return type of a gcc2
12697     builtin and then its argument prototype would still apply.  */
12698 char dbm_open();
12699
12700 int main() {
12701 dbm_open()
12702 ; return 0; }
12703 EOF
12704 if { (eval echo configure:12705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12705   rm -rf conftest*
12706   eval "ac_cv_lib_$ac_lib_var=yes"
12707 else
12708   echo "configure: failed program was:" >&5
12709   cat conftest.$ac_ext >&5
12710   rm -rf conftest*
12711   eval "ac_cv_lib_$ac_lib_var=no"
12712 fi
12713 rm -f conftest*
12714 LIBS="$ac_save_LIBS"
12715
12716 fi
12717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12718   echo "$ac_t""yes" 1>&6
12719   ol_cv_lib_ndbm=-ldbm
12720 else
12721   echo "$ac_t""no" 1>&6
12722 ol_cv_lib_ndbm=no
12723 fi
12724                 
12725 fi
12726
12727         
12728 fi
12729
12730         LIBS="$ol_LIBS"
12731
12732 fi
12733
12734 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12735
12736
12737  for ac_hdr in ndbm.h
12738 do
12739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12741 echo "configure:12742: checking for $ac_hdr" >&5
12742 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12743   echo $ac_n "(cached) $ac_c" 1>&6
12744 else
12745   cat > conftest.$ac_ext <<EOF
12746 #line 12747 "configure"
12747 #include "confdefs.h"
12748 #include <$ac_hdr>
12749 EOF
12750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12751 { (eval echo configure:12752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12753 if test -z "$ac_err"; then
12754   rm -rf conftest*
12755   eval "ac_cv_header_$ac_safe=yes"
12756 else
12757   echo "$ac_err" >&5
12758   echo "configure: failed program was:" >&5
12759   cat conftest.$ac_ext >&5
12760   rm -rf conftest*
12761   eval "ac_cv_header_$ac_safe=no"
12762 fi
12763 rm -f conftest*
12764 fi
12765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12766   echo "$ac_t""yes" 1>&6
12767     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12768   cat >> confdefs.h <<EOF
12769 #define $ac_tr_hdr 1
12770 EOF
12771  
12772 else
12773   echo "$ac_t""no" 1>&6
12774 fi
12775 done
12776
12777  echo $ac_n "checking for db""... $ac_c" 1>&6
12778 echo "configure:12779: checking for db" >&5
12779 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12780   echo $ac_n "(cached) $ac_c" 1>&6
12781 else
12782   
12783         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12784                 ol_cv_ndbm=no
12785         else
12786                 ol_cv_ndbm=yes
12787         fi
12788
12789 fi
12790
12791 echo "$ac_t""$ol_cv_ndbm" 1>&6
12792  if test $ol_cv_ndbm = yes ; then
12793         cat >> confdefs.h <<\EOF
12794 #define HAVE_NDBM 1
12795 EOF
12796
12797  fi
12798
12799
12800         if test $ol_cv_ndbm = yes ; then
12801                 ol_link_ldbm=ndbm
12802                 ol_with_ldbm_api=ndbm
12803
12804                 if test $ol_cv_lib_ndbm != yes ; then
12805                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12806                 fi
12807         fi
12808 fi
12809
12810 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12811         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12812         if test $ol_enable_ldbm = yes ; then
12813                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12814         fi
12815
12816         echo "configure: warning: disabling LDBM" 1>&2
12817         ol_enable_ldbm=no
12818 fi
12819
12820 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12821         LINK_BINS_DYNAMIC="yes"
12822 else
12823         LINK_BINS_DYNAMIC="no"
12824 fi
12825
12826 if test $ol_enable_wrappers != no ; then
12827         for ac_hdr in tcpd.h
12828 do
12829 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12830 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12831 echo "configure:12832: checking for $ac_hdr" >&5
12832 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12833   echo $ac_n "(cached) $ac_c" 1>&6
12834 else
12835   cat > conftest.$ac_ext <<EOF
12836 #line 12837 "configure"
12837 #include "confdefs.h"
12838 #include <$ac_hdr>
12839 EOF
12840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12841 { (eval echo configure:12842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12843 if test -z "$ac_err"; then
12844   rm -rf conftest*
12845   eval "ac_cv_header_$ac_safe=yes"
12846 else
12847   echo "$ac_err" >&5
12848   echo "configure: failed program was:" >&5
12849   cat conftest.$ac_ext >&5
12850   rm -rf conftest*
12851   eval "ac_cv_header_$ac_safe=no"
12852 fi
12853 rm -f conftest*
12854 fi
12855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12856   echo "$ac_t""yes" 1>&6
12857     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12858   cat >> confdefs.h <<EOF
12859 #define $ac_tr_hdr 1
12860 EOF
12861  
12862 else
12863   echo "$ac_t""no" 1>&6
12864 fi
12865 done
12866
12867
12868         if test $ac_cv_header_tcpd_h != yes ; then
12869                 have_wrappers=no
12870         else
12871                 cat > conftest.$ac_ext <<EOF
12872 #line 12873 "configure"
12873 #include "confdefs.h"
12874
12875 int allow_severity = 0;
12876 int deny_severity  = 0;
12877                 
12878 int main() {
12879 hosts_access()
12880 ; return 0; }
12881 EOF
12882 if { (eval echo configure:12883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12883   rm -rf conftest*
12884   have_wrappers=yes
12885 else
12886   echo "configure: failed program was:" >&5
12887   cat conftest.$ac_ext >&5
12888   rm -rf conftest*
12889   have_wrappers=no
12890 fi
12891 rm -f conftest*
12892         fi
12893
12894         if test $have_wrappers = yes ; then
12895                 cat >> confdefs.h <<\EOF
12896 #define HAVE_TCPD 1
12897 EOF
12898
12899                 WRAP_LIBS="-lwrap"
12900
12901                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12902 echo "configure:12903: checking for main in -lnsl" >&5
12903 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12905   echo $ac_n "(cached) $ac_c" 1>&6
12906 else
12907   ac_save_LIBS="$LIBS"
12908 LIBS="-lnsl  $LIBS"
12909 cat > conftest.$ac_ext <<EOF
12910 #line 12911 "configure"
12911 #include "confdefs.h"
12912
12913 int main() {
12914 main()
12915 ; return 0; }
12916 EOF
12917 if { (eval echo configure:12918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12918   rm -rf conftest*
12919   eval "ac_cv_lib_$ac_lib_var=yes"
12920 else
12921   echo "configure: failed program was:" >&5
12922   cat conftest.$ac_ext >&5
12923   rm -rf conftest*
12924   eval "ac_cv_lib_$ac_lib_var=no"
12925 fi
12926 rm -f conftest*
12927 LIBS="$ac_save_LIBS"
12928
12929 fi
12930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12931   echo "$ac_t""yes" 1>&6
12932     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12933     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12934   cat >> confdefs.h <<EOF
12935 #define $ac_tr_lib 1
12936 EOF
12937
12938   LIBS="-lnsl $LIBS"
12939
12940 else
12941   echo "$ac_t""no" 1>&6
12942 fi
12943
12944         else
12945                 echo "configure: warning: could not find -lwrap" 1>&2
12946                 if test $ol_enable_wrappers = yes ; then
12947                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12948                 fi
12949
12950                 echo "configure: warning: disabling wrappers support" 1>&2
12951                 ol_enable_wrappers=no
12952                 WRAP_LIBS=""
12953         fi
12954 fi
12955
12956 if test $ol_enable_syslog != no ; then
12957         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12958 echo "configure:12959: checking for openlog" >&5
12959 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12960   echo $ac_n "(cached) $ac_c" 1>&6
12961 else
12962   cat > conftest.$ac_ext <<EOF
12963 #line 12964 "configure"
12964 #include "confdefs.h"
12965 /* System header to define __stub macros and hopefully few prototypes,
12966     which can conflict with char openlog(); below.  */
12967 #include <assert.h>
12968 /* Override any gcc2 internal prototype to avoid an error.  */
12969 /* We use char because int might match the return type of a gcc2
12970     builtin and then its argument prototype would still apply.  */
12971 char openlog();
12972 char (*f)();
12973
12974 int main() {
12975
12976 /* The GNU C library defines this for functions which it implements
12977     to always fail with ENOSYS.  Some functions are actually named
12978     something starting with __ and the normal name is an alias.  */
12979 #if defined (__stub_openlog) || defined (__stub___openlog)
12980 choke me
12981 #else
12982 f = openlog;
12983 #endif
12984
12985 ; return 0; }
12986 EOF
12987 if { (eval echo configure:12988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12988   rm -rf conftest*
12989   eval "ac_cv_func_openlog=yes"
12990 else
12991   echo "configure: failed program was:" >&5
12992   cat conftest.$ac_ext >&5
12993   rm -rf conftest*
12994   eval "ac_cv_func_openlog=no"
12995 fi
12996 rm -f conftest*
12997 fi
12998
12999 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13000   echo "$ac_t""yes" 1>&6
13001   :
13002 else
13003   echo "$ac_t""no" 1>&6
13004 fi
13005
13006         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13007                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13008         fi
13009         ol_enable_syslog=$ac_cv_func_openlog
13010 fi
13011
13012 ol_link_sql=no
13013 if test $ol_enable_sql != no ; then
13014         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13015 echo "configure:13016: checking for SQLDriverConnect in -liodbc" >&5
13016 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13018   echo $ac_n "(cached) $ac_c" 1>&6
13019 else
13020   ac_save_LIBS="$LIBS"
13021 LIBS="-liodbc  $LIBS"
13022 cat > conftest.$ac_ext <<EOF
13023 #line 13024 "configure"
13024 #include "confdefs.h"
13025 /* Override any gcc2 internal prototype to avoid an error.  */
13026 /* We use char because int might match the return type of a gcc2
13027     builtin and then its argument prototype would still apply.  */
13028 char SQLDriverConnect();
13029
13030 int main() {
13031 SQLDriverConnect()
13032 ; return 0; }
13033 EOF
13034 if { (eval echo configure:13035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13035   rm -rf conftest*
13036   eval "ac_cv_lib_$ac_lib_var=yes"
13037 else
13038   echo "configure: failed program was:" >&5
13039   cat conftest.$ac_ext >&5
13040   rm -rf conftest*
13041   eval "ac_cv_lib_$ac_lib_var=no"
13042 fi
13043 rm -f conftest*
13044 LIBS="$ac_save_LIBS"
13045
13046 fi
13047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13048   echo "$ac_t""yes" 1>&6
13049   have_iodbc=yes
13050 else
13051   echo "$ac_t""no" 1>&6
13052 have_iodbc=no
13053 fi
13054
13055         if test $have_iodbc = yes ; then
13056                 ol_link_sql="-liodbc"
13057         else
13058                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13059 echo "configure:13060: checking for SQLDriverConnect in -lodbc" >&5
13060 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13062   echo $ac_n "(cached) $ac_c" 1>&6
13063 else
13064   ac_save_LIBS="$LIBS"
13065 LIBS="-lodbc  $LIBS"
13066 cat > conftest.$ac_ext <<EOF
13067 #line 13068 "configure"
13068 #include "confdefs.h"
13069 /* Override any gcc2 internal prototype to avoid an error.  */
13070 /* We use char because int might match the return type of a gcc2
13071     builtin and then its argument prototype would still apply.  */
13072 char SQLDriverConnect();
13073
13074 int main() {
13075 SQLDriverConnect()
13076 ; return 0; }
13077 EOF
13078 if { (eval echo configure:13079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13079   rm -rf conftest*
13080   eval "ac_cv_lib_$ac_lib_var=yes"
13081 else
13082   echo "configure: failed program was:" >&5
13083   cat conftest.$ac_ext >&5
13084   rm -rf conftest*
13085   eval "ac_cv_lib_$ac_lib_var=no"
13086 fi
13087 rm -f conftest*
13088 LIBS="$ac_save_LIBS"
13089
13090 fi
13091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13092   echo "$ac_t""yes" 1>&6
13093   have_odbc=yes
13094 else
13095   echo "$ac_t""no" 1>&6
13096 have_odbc=no
13097 fi
13098
13099                 if test $have_odbc = yes ; then
13100                         ol_link_sql="-lodbc"
13101                 fi
13102         fi
13103
13104         if test $ol_link_sql != no ; then
13105                 SLAPD_SQL_LIBS="$ol_link_sql"
13106
13107         elif test $ol_enable_sql != auto ; then
13108                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13109         fi
13110 fi
13111
13112 ol_link_termcap=no
13113 for ac_hdr in termcap.h ncurses.h
13114 do
13115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13117 echo "configure:13118: checking for $ac_hdr" >&5
13118 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13119   echo $ac_n "(cached) $ac_c" 1>&6
13120 else
13121   cat > conftest.$ac_ext <<EOF
13122 #line 13123 "configure"
13123 #include "confdefs.h"
13124 #include <$ac_hdr>
13125 EOF
13126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13127 { (eval echo configure:13128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13129 if test -z "$ac_err"; then
13130   rm -rf conftest*
13131   eval "ac_cv_header_$ac_safe=yes"
13132 else
13133   echo "$ac_err" >&5
13134   echo "configure: failed program was:" >&5
13135   cat conftest.$ac_ext >&5
13136   rm -rf conftest*
13137   eval "ac_cv_header_$ac_safe=no"
13138 fi
13139 rm -f conftest*
13140 fi
13141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13142   echo "$ac_t""yes" 1>&6
13143     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13144   cat >> confdefs.h <<EOF
13145 #define $ac_tr_hdr 1
13146 EOF
13147  
13148 else
13149   echo "$ac_t""no" 1>&6
13150 fi
13151 done
13152
13153
13154 if test $ol_link_termcap = no ; then
13155         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13156 echo "configure:13157: checking for tputs in -ltermcap" >&5
13157 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13159   echo $ac_n "(cached) $ac_c" 1>&6
13160 else
13161   ac_save_LIBS="$LIBS"
13162 LIBS="-ltermcap  $LIBS"
13163 cat > conftest.$ac_ext <<EOF
13164 #line 13165 "configure"
13165 #include "confdefs.h"
13166 /* Override any gcc2 internal prototype to avoid an error.  */
13167 /* We use char because int might match the return type of a gcc2
13168     builtin and then its argument prototype would still apply.  */
13169 char tputs();
13170
13171 int main() {
13172 tputs()
13173 ; return 0; }
13174 EOF
13175 if { (eval echo configure:13176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13176   rm -rf conftest*
13177   eval "ac_cv_lib_$ac_lib_var=yes"
13178 else
13179   echo "configure: failed program was:" >&5
13180   cat conftest.$ac_ext >&5
13181   rm -rf conftest*
13182   eval "ac_cv_lib_$ac_lib_var=no"
13183 fi
13184 rm -f conftest*
13185 LIBS="$ac_save_LIBS"
13186
13187 fi
13188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13189   echo "$ac_t""yes" 1>&6
13190   have_termcap=yes
13191 else
13192   echo "$ac_t""no" 1>&6
13193 have_termcap=no
13194 fi
13195
13196         if test $have_termcap = yes ; then
13197                 cat >> confdefs.h <<\EOF
13198 #define HAVE_TERMCAP 1
13199 EOF
13200
13201                 ol_link_termcap=yes
13202                 TERMCAP_LIBS=-ltermcap
13203         fi
13204 fi
13205
13206 if test $ol_link_termcap = no ; then
13207         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13208 echo "configure:13209: checking for initscr in -lncurses" >&5
13209 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13210 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13211   echo $ac_n "(cached) $ac_c" 1>&6
13212 else
13213   ac_save_LIBS="$LIBS"
13214 LIBS="-lncurses  $LIBS"
13215 cat > conftest.$ac_ext <<EOF
13216 #line 13217 "configure"
13217 #include "confdefs.h"
13218 /* Override any gcc2 internal prototype to avoid an error.  */
13219 /* We use char because int might match the return type of a gcc2
13220     builtin and then its argument prototype would still apply.  */
13221 char initscr();
13222
13223 int main() {
13224 initscr()
13225 ; return 0; }
13226 EOF
13227 if { (eval echo configure:13228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13228   rm -rf conftest*
13229   eval "ac_cv_lib_$ac_lib_var=yes"
13230 else
13231   echo "configure: failed program was:" >&5
13232   cat conftest.$ac_ext >&5
13233   rm -rf conftest*
13234   eval "ac_cv_lib_$ac_lib_var=no"
13235 fi
13236 rm -f conftest*
13237 LIBS="$ac_save_LIBS"
13238
13239 fi
13240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13241   echo "$ac_t""yes" 1>&6
13242   have_ncurses=yes
13243 else
13244   echo "$ac_t""no" 1>&6
13245 have_ncurses=no
13246 fi
13247
13248         if test $have_ncurses = yes ; then
13249                 cat >> confdefs.h <<\EOF
13250 #define HAVE_NCURSES 1
13251 EOF
13252
13253                 ol_link_termcap=yes
13254                 TERMCAP_LIBS=-lncurses
13255         fi
13256 fi
13257
13258 if test $ol_link_termcap = no ; then
13259         cat >> confdefs.h <<\EOF
13260 #define NO_TERMCAP 1
13261 EOF
13262
13263         TERMCAP_LIBS=
13264 fi
13265
13266 ol_link_sasl=no
13267 ol_link_spasswd=no
13268 if test $ol_with_cyrus_sasl != no ; then
13269         for ac_hdr in sasl.h
13270 do
13271 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13272 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13273 echo "configure:13274: checking for $ac_hdr" >&5
13274 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13275   echo $ac_n "(cached) $ac_c" 1>&6
13276 else
13277   cat > conftest.$ac_ext <<EOF
13278 #line 13279 "configure"
13279 #include "confdefs.h"
13280 #include <$ac_hdr>
13281 EOF
13282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13283 { (eval echo configure:13284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13285 if test -z "$ac_err"; then
13286   rm -rf conftest*
13287   eval "ac_cv_header_$ac_safe=yes"
13288 else
13289   echo "$ac_err" >&5
13290   echo "configure: failed program was:" >&5
13291   cat conftest.$ac_ext >&5
13292   rm -rf conftest*
13293   eval "ac_cv_header_$ac_safe=no"
13294 fi
13295 rm -f conftest*
13296 fi
13297 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13298   echo "$ac_t""yes" 1>&6
13299     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13300   cat >> confdefs.h <<EOF
13301 #define $ac_tr_hdr 1
13302 EOF
13303  
13304 else
13305   echo "$ac_t""no" 1>&6
13306 fi
13307 done
13308
13309
13310         if test $ac_cv_header_sasl_h = yes ; then
13311                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13312 echo "configure:13313: checking for sasl_client_init in -lsasl" >&5
13313 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13315   echo $ac_n "(cached) $ac_c" 1>&6
13316 else
13317   ac_save_LIBS="$LIBS"
13318 LIBS="-lsasl  $LIBS"
13319 cat > conftest.$ac_ext <<EOF
13320 #line 13321 "configure"
13321 #include "confdefs.h"
13322 /* Override any gcc2 internal prototype to avoid an error.  */
13323 /* We use char because int might match the return type of a gcc2
13324     builtin and then its argument prototype would still apply.  */
13325 char sasl_client_init();
13326
13327 int main() {
13328 sasl_client_init()
13329 ; return 0; }
13330 EOF
13331 if { (eval echo configure:13332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13332   rm -rf conftest*
13333   eval "ac_cv_lib_$ac_lib_var=yes"
13334 else
13335   echo "configure: failed program was:" >&5
13336   cat conftest.$ac_ext >&5
13337   rm -rf conftest*
13338   eval "ac_cv_lib_$ac_lib_var=no"
13339 fi
13340 rm -f conftest*
13341 LIBS="$ac_save_LIBS"
13342
13343 fi
13344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13345   echo "$ac_t""yes" 1>&6
13346   have_cyrus_sasl=yes
13347 else
13348   echo "$ac_t""no" 1>&6
13349 have_cyrus_sasl=no
13350 fi
13351
13352
13353                 if test $have_cyrus_sasl != no ; then
13354                         SASL_LIBS="-lsasl"
13355                         cat >> confdefs.h <<\EOF
13356 #define HAVE_CYRUS_SASL 1
13357 EOF
13358
13359                         ol_link_sasl=yes
13360                 fi
13361         fi
13362
13363         if test $ol_link_sasl = no ; then
13364                 if test $ol_with_cyrus_sasl != auto ; then
13365                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13366                 else
13367                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13368                         echo "configure: warning: SASL authentication not supported!" 1>&2
13369                         if test $ol_link_tls = no ; then
13370                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13371                         fi
13372                 fi
13373
13374         elif test $ol_enable_spasswd != no ; then
13375                 ol_link_spasswd=yes
13376         fi
13377
13378 else
13379         echo "configure: warning: SASL authentication not supported!" 1>&2
13380         if test $ol_link_tls = no ; then
13381                 echo "configure: warning: Strong authentication not supported!" 1>&2
13382         fi
13383 fi
13384
13385 if test $cross_compiling != yes ; then
13386         dev=no
13387         if test -r /dev/urandom ; then
13388                 dev="/dev/urandom";
13389         elif test -r /idev/urandom ; then
13390                 dev="/idev/urandom";
13391         elif test -r /dev/srandom ; then
13392                 dev="/dev/srandom";
13393         elif test -r /dev/random ; then
13394                 dev="/dev/random";
13395         elif test -r /idev/random ; then
13396                 dev="/idev/random";
13397         fi
13398
13399         if test $dev != no ; then
13400                 cat >> confdefs.h <<EOF
13401 #define URANDOM_DEVICE "$dev"
13402 EOF
13403
13404         fi
13405 fi
13406
13407 ol_link_fetch=no
13408 if test $ol_with_fetch != no ; then
13409         ol_LIBS=$LIBS
13410 LIBS="-lfetch -lcom_err $LIBS"
13411 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13412 echo "configure:13413: checking fetch(3) library" >&5
13413 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13414   echo $ac_n "(cached) $ac_c" 1>&6
13415 else
13416   
13417         cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420
13421 #include <sys/param.h>
13422 #include <stdio.h>
13423 #include <fetch.h>
13424 int main() {
13425 struct url *u = fetchParseURL("file:///"); 
13426 ; return 0; }
13427 EOF
13428 if { (eval echo configure:13429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13429   rm -rf conftest*
13430   ol_cv_lib_fetch=yes
13431 else
13432   echo "configure: failed program was:" >&5
13433   cat conftest.$ac_ext >&5
13434   rm -rf conftest*
13435   ol_cv_lib_fetch=no
13436 fi
13437 rm -f conftest*
13438 fi
13439
13440 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13441 LIBS=$ol_LIBS
13442 if test $ol_cv_lib_fetch != no ; then
13443         ol_link_fetch="-lfetch -lcom_err"
13444         cat >> confdefs.h <<\EOF
13445 #define HAVE_FETCH 1
13446 EOF
13447
13448 fi
13449
13450
13451         if test $ol_cv_lib_fetch != no ; then
13452                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13453                 ol_link_fetch=freebsd
13454
13455         elif test $ol_with_fetch != auto ; then
13456                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13457         fi 
13458 fi
13459
13460 ol_link_readline=no
13461 if test $ol_with_readline != no ; then
13462         for ac_hdr in readline/readline.h readline/history.h
13463 do
13464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13466 echo "configure:13467: checking for $ac_hdr" >&5
13467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13468   echo $ac_n "(cached) $ac_c" 1>&6
13469 else
13470   cat > conftest.$ac_ext <<EOF
13471 #line 13472 "configure"
13472 #include "confdefs.h"
13473 #include <$ac_hdr>
13474 EOF
13475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13476 { (eval echo configure:13477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13478 if test -z "$ac_err"; then
13479   rm -rf conftest*
13480   eval "ac_cv_header_$ac_safe=yes"
13481 else
13482   echo "$ac_err" >&5
13483   echo "configure: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485   rm -rf conftest*
13486   eval "ac_cv_header_$ac_safe=no"
13487 fi
13488 rm -f conftest*
13489 fi
13490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13491   echo "$ac_t""yes" 1>&6
13492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13493   cat >> confdefs.h <<EOF
13494 #define $ac_tr_hdr 1
13495 EOF
13496  
13497 else
13498   echo "$ac_t""no" 1>&6
13499 fi
13500 done
13501
13502
13503         if test $ac_cv_header_readline_readline_h = yes ; then
13504                 save_LIBS="$LIBS"
13505                 LIBS="$TERMCAP_LIBS $LIBS"
13506                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13507 echo "configure:13508: checking for readline in -lreadline" >&5
13508 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13509 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13510   echo $ac_n "(cached) $ac_c" 1>&6
13511 else
13512   ac_save_LIBS="$LIBS"
13513 LIBS="-lreadline  $LIBS"
13514 cat > conftest.$ac_ext <<EOF
13515 #line 13516 "configure"
13516 #include "confdefs.h"
13517 /* Override any gcc2 internal prototype to avoid an error.  */
13518 /* We use char because int might match the return type of a gcc2
13519     builtin and then its argument prototype would still apply.  */
13520 char readline();
13521
13522 int main() {
13523 readline()
13524 ; return 0; }
13525 EOF
13526 if { (eval echo configure:13527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13527   rm -rf conftest*
13528   eval "ac_cv_lib_$ac_lib_var=yes"
13529 else
13530   echo "configure: failed program was:" >&5
13531   cat conftest.$ac_ext >&5
13532   rm -rf conftest*
13533   eval "ac_cv_lib_$ac_lib_var=no"
13534 fi
13535 rm -f conftest*
13536 LIBS="$ac_save_LIBS"
13537
13538 fi
13539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13540   echo "$ac_t""yes" 1>&6
13541   have_readline=yes
13542 else
13543   echo "$ac_t""no" 1>&6
13544 have_readline=no
13545 fi
13546
13547                 LIBS="$save_LIBS"
13548                         
13549                 if test $have_readline = yes ; then
13550                         ol_with_readline=found
13551                         ol_link_readline=yes
13552
13553                         READLINE_LIBS="-lreadline"
13554                 fi
13555         fi
13556 fi
13557
13558 if test $ol_link_readline = yes ; then
13559         cat >> confdefs.h <<\EOF
13560 #define HAVE_READLINE 1
13561 EOF
13562
13563 fi
13564
13565
13566 if test $ol_enable_crypt != no ; then
13567         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13568 echo "configure:13569: checking for crypt" >&5
13569 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13570   echo $ac_n "(cached) $ac_c" 1>&6
13571 else
13572   cat > conftest.$ac_ext <<EOF
13573 #line 13574 "configure"
13574 #include "confdefs.h"
13575 /* System header to define __stub macros and hopefully few prototypes,
13576     which can conflict with char crypt(); below.  */
13577 #include <assert.h>
13578 /* Override any gcc2 internal prototype to avoid an error.  */
13579 /* We use char because int might match the return type of a gcc2
13580     builtin and then its argument prototype would still apply.  */
13581 char crypt();
13582 char (*f)();
13583
13584 int main() {
13585
13586 /* The GNU C library defines this for functions which it implements
13587     to always fail with ENOSYS.  Some functions are actually named
13588     something starting with __ and the normal name is an alias.  */
13589 #if defined (__stub_crypt) || defined (__stub___crypt)
13590 choke me
13591 #else
13592 f = crypt;
13593 #endif
13594
13595 ; return 0; }
13596 EOF
13597 if { (eval echo configure:13598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13598   rm -rf conftest*
13599   eval "ac_cv_func_crypt=yes"
13600 else
13601   echo "configure: failed program was:" >&5
13602   cat conftest.$ac_ext >&5
13603   rm -rf conftest*
13604   eval "ac_cv_func_crypt=no"
13605 fi
13606 rm -f conftest*
13607 fi
13608
13609 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13610   echo "$ac_t""yes" 1>&6
13611   have_crypt=yes
13612 else
13613   echo "$ac_t""no" 1>&6
13614
13615                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13616 echo "configure:13617: checking for crypt in -lcrypt" >&5
13617 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13618 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13619   echo $ac_n "(cached) $ac_c" 1>&6
13620 else
13621   ac_save_LIBS="$LIBS"
13622 LIBS="-lcrypt  $LIBS"
13623 cat > conftest.$ac_ext <<EOF
13624 #line 13625 "configure"
13625 #include "confdefs.h"
13626 /* Override any gcc2 internal prototype to avoid an error.  */
13627 /* We use char because int might match the return type of a gcc2
13628     builtin and then its argument prototype would still apply.  */
13629 char crypt();
13630
13631 int main() {
13632 crypt()
13633 ; return 0; }
13634 EOF
13635 if { (eval echo configure:13636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13636   rm -rf conftest*
13637   eval "ac_cv_lib_$ac_lib_var=yes"
13638 else
13639   echo "configure: failed program was:" >&5
13640   cat conftest.$ac_ext >&5
13641   rm -rf conftest*
13642   eval "ac_cv_lib_$ac_lib_var=no"
13643 fi
13644 rm -f conftest*
13645 LIBS="$ac_save_LIBS"
13646
13647 fi
13648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13649   echo "$ac_t""yes" 1>&6
13650   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13651                         have_crypt=yes
13652 else
13653   echo "$ac_t""no" 1>&6
13654 have_crypt=no
13655 fi
13656
13657 fi
13658
13659
13660         if test $have_crypt = yes ; then
13661                 cat >> confdefs.h <<\EOF
13662 #define HAVE_CRYPT 1
13663 EOF
13664
13665         else
13666                 echo "configure: warning: could not find crypt" 1>&2
13667                 if test $ol_enable_crypt = yes ; then
13668                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13669                 fi
13670
13671                 echo "configure: warning: disabling crypt support" 1>&2
13672                 ol_enable_crypt=no
13673         fi
13674 fi
13675
13676 if test $ol_enable_proctitle != no ; then
13677         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13678 echo "configure:13679: checking for setproctitle" >&5
13679 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13680   echo $ac_n "(cached) $ac_c" 1>&6
13681 else
13682   cat > conftest.$ac_ext <<EOF
13683 #line 13684 "configure"
13684 #include "confdefs.h"
13685 /* System header to define __stub macros and hopefully few prototypes,
13686     which can conflict with char setproctitle(); below.  */
13687 #include <assert.h>
13688 /* Override any gcc2 internal prototype to avoid an error.  */
13689 /* We use char because int might match the return type of a gcc2
13690     builtin and then its argument prototype would still apply.  */
13691 char setproctitle();
13692 char (*f)();
13693
13694 int main() {
13695
13696 /* The GNU C library defines this for functions which it implements
13697     to always fail with ENOSYS.  Some functions are actually named
13698     something starting with __ and the normal name is an alias.  */
13699 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13700 choke me
13701 #else
13702 f = setproctitle;
13703 #endif
13704
13705 ; return 0; }
13706 EOF
13707 if { (eval echo configure:13708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13708   rm -rf conftest*
13709   eval "ac_cv_func_setproctitle=yes"
13710 else
13711   echo "configure: failed program was:" >&5
13712   cat conftest.$ac_ext >&5
13713   rm -rf conftest*
13714   eval "ac_cv_func_setproctitle=no"
13715 fi
13716 rm -f conftest*
13717 fi
13718
13719 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13720   echo "$ac_t""yes" 1>&6
13721   have_setproctitle=yes
13722 else
13723   echo "$ac_t""no" 1>&6
13724
13725                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13726 echo "configure:13727: checking for setproctitle in -lutil" >&5
13727 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13729   echo $ac_n "(cached) $ac_c" 1>&6
13730 else
13731   ac_save_LIBS="$LIBS"
13732 LIBS="-lutil  $LIBS"
13733 cat > conftest.$ac_ext <<EOF
13734 #line 13735 "configure"
13735 #include "confdefs.h"
13736 /* Override any gcc2 internal prototype to avoid an error.  */
13737 /* We use char because int might match the return type of a gcc2
13738     builtin and then its argument prototype would still apply.  */
13739 char setproctitle();
13740
13741 int main() {
13742 setproctitle()
13743 ; return 0; }
13744 EOF
13745 if { (eval echo configure:13746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13746   rm -rf conftest*
13747   eval "ac_cv_lib_$ac_lib_var=yes"
13748 else
13749   echo "configure: failed program was:" >&5
13750   cat conftest.$ac_ext >&5
13751   rm -rf conftest*
13752   eval "ac_cv_lib_$ac_lib_var=no"
13753 fi
13754 rm -f conftest*
13755 LIBS="$ac_save_LIBS"
13756
13757 fi
13758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13759   echo "$ac_t""yes" 1>&6
13760   have_setproctitle=yes
13761                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13762 else
13763   echo "$ac_t""no" 1>&6
13764 have_setproctitle=no
13765                         LIBOBJS="$LIBOBJS setproctitle.o"
13766                         LIBSRCS="$LIBSRCS setproctitle.c"
13767 fi
13768
13769 fi
13770
13771
13772         if test $have_setproctitle = yes ; then
13773                 cat >> confdefs.h <<\EOF
13774 #define HAVE_SETPROCTITLE 1
13775 EOF
13776
13777         fi
13778 fi
13779
13780 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13781 echo "configure:13782: checking for ANSI C header files" >&5
13782 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13783   echo $ac_n "(cached) $ac_c" 1>&6
13784 else
13785   cat > conftest.$ac_ext <<EOF
13786 #line 13787 "configure"
13787 #include "confdefs.h"
13788 #include <stdlib.h>
13789 #include <stdarg.h>
13790 #include <string.h>
13791 #include <float.h>
13792 EOF
13793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13794 { (eval echo configure:13795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13796 if test -z "$ac_err"; then
13797   rm -rf conftest*
13798   ac_cv_header_stdc=yes
13799 else
13800   echo "$ac_err" >&5
13801   echo "configure: failed program was:" >&5
13802   cat conftest.$ac_ext >&5
13803   rm -rf conftest*
13804   ac_cv_header_stdc=no
13805 fi
13806 rm -f conftest*
13807
13808 if test $ac_cv_header_stdc = yes; then
13809   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13810 cat > conftest.$ac_ext <<EOF
13811 #line 13812 "configure"
13812 #include "confdefs.h"
13813 #include <string.h>
13814 EOF
13815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13816   egrep "memchr" >/dev/null 2>&1; then
13817   :
13818 else
13819   rm -rf conftest*
13820   ac_cv_header_stdc=no
13821 fi
13822 rm -f conftest*
13823
13824 fi
13825
13826 if test $ac_cv_header_stdc = yes; then
13827   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13828 cat > conftest.$ac_ext <<EOF
13829 #line 13830 "configure"
13830 #include "confdefs.h"
13831 #include <stdlib.h>
13832 EOF
13833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13834   egrep "free" >/dev/null 2>&1; then
13835   :
13836 else
13837   rm -rf conftest*
13838   ac_cv_header_stdc=no
13839 fi
13840 rm -f conftest*
13841
13842 fi
13843
13844 if test $ac_cv_header_stdc = yes; then
13845   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13846 if test "$cross_compiling" = yes; then
13847   :
13848 else
13849   cat > conftest.$ac_ext <<EOF
13850 #line 13851 "configure"
13851 #include "confdefs.h"
13852 #include <ctype.h>
13853 #if ((' ' & 0x0FF) == 0x020)
13854 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13855 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13856 #else
13857 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13858  || ('j' <= (c) && (c) <= 'r') \
13859  || ('s' <= (c) && (c) <= 'z'))
13860 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13861 #endif
13862 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13863 int main () { int i; for (i = 0; i < 256; i++)
13864 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13865 exit (0); }
13866
13867 EOF
13868 if { (eval echo configure:13869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13869 then
13870   :
13871 else
13872   echo "configure: failed program was:" >&5
13873   cat conftest.$ac_ext >&5
13874   rm -fr conftest*
13875   ac_cv_header_stdc=no
13876 fi
13877 rm -fr conftest*
13878 fi
13879
13880 fi
13881 fi
13882
13883 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13884 if test $ac_cv_header_stdc = yes; then
13885   cat >> confdefs.h <<\EOF
13886 #define STDC_HEADERS 1
13887 EOF
13888
13889 fi
13890
13891 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13892 echo "configure:13893: checking for mode_t" >&5
13893 if eval "test \"\${ac_cv_type_mode_t+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 #include <sys/types.h>
13900 #if STDC_HEADERS
13901 #include <stdlib.h>
13902 #include <stddef.h>
13903 #endif
13904
13905 EOF
13906 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13907   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13908   rm -rf conftest*
13909   eval "ac_cv_type_mode_t=yes"
13910 else
13911   rm -rf conftest*
13912   eval "ac_cv_type_mode_t=no"
13913 fi
13914 rm -f conftest*
13915
13916 fi
13917 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13918   echo "$ac_t""yes" 1>&6
13919 else
13920   echo "$ac_t""no" 1>&6
13921   cat >> confdefs.h <<EOF
13922 #define mode_t int
13923 EOF
13924
13925 fi
13926
13927 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13928 echo "configure:13929: checking for off_t" >&5
13929 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13930   echo $ac_n "(cached) $ac_c" 1>&6
13931 else
13932   cat > conftest.$ac_ext <<EOF
13933 #line 13934 "configure"
13934 #include "confdefs.h"
13935 #include <sys/types.h>
13936 #if STDC_HEADERS
13937 #include <stdlib.h>
13938 #include <stddef.h>
13939 #endif
13940
13941 EOF
13942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13943   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13944   rm -rf conftest*
13945   eval "ac_cv_type_off_t=yes"
13946 else
13947   rm -rf conftest*
13948   eval "ac_cv_type_off_t=no"
13949 fi
13950 rm -f conftest*
13951
13952 fi
13953 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13954   echo "$ac_t""yes" 1>&6
13955 else
13956   echo "$ac_t""no" 1>&6
13957   cat >> confdefs.h <<EOF
13958 #define off_t long
13959 EOF
13960
13961 fi
13962
13963 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13964 echo "configure:13965: checking for pid_t" >&5
13965 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13966   echo $ac_n "(cached) $ac_c" 1>&6
13967 else
13968   cat > conftest.$ac_ext <<EOF
13969 #line 13970 "configure"
13970 #include "confdefs.h"
13971 #include <sys/types.h>
13972 #if STDC_HEADERS
13973 #include <stdlib.h>
13974 #include <stddef.h>
13975 #endif
13976
13977 EOF
13978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13979   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13980   rm -rf conftest*
13981   eval "ac_cv_type_pid_t=yes"
13982 else
13983   rm -rf conftest*
13984   eval "ac_cv_type_pid_t=no"
13985 fi
13986 rm -f conftest*
13987
13988 fi
13989 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13990   echo "$ac_t""yes" 1>&6
13991 else
13992   echo "$ac_t""no" 1>&6
13993   cat >> confdefs.h <<EOF
13994 #define pid_t int
13995 EOF
13996
13997 fi
13998
13999 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14000 echo "configure:14001: checking for ptrdiff_t" >&5
14001 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14002   echo $ac_n "(cached) $ac_c" 1>&6
14003 else
14004   cat > conftest.$ac_ext <<EOF
14005 #line 14006 "configure"
14006 #include "confdefs.h"
14007 #include <stddef.h>
14008 int main() {
14009 ptrdiff_t p
14010 ; return 0; }
14011 EOF
14012 if { (eval echo configure:14013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14013   rm -rf conftest*
14014   am_cv_type_ptrdiff_t=yes
14015 else
14016   echo "configure: failed program was:" >&5
14017   cat conftest.$ac_ext >&5
14018   rm -rf conftest*
14019   am_cv_type_ptrdiff_t=no
14020 fi
14021 rm -f conftest*
14022 fi
14023
14024 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14025    if test $am_cv_type_ptrdiff_t = yes; then
14026      cat >> confdefs.h <<\EOF
14027 #define HAVE_PTRDIFF_T 1
14028 EOF
14029
14030    fi
14031
14032 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14033 echo "configure:14034: checking return type of signal handlers" >&5
14034 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14035   echo $ac_n "(cached) $ac_c" 1>&6
14036 else
14037   cat > conftest.$ac_ext <<EOF
14038 #line 14039 "configure"
14039 #include "confdefs.h"
14040 #include <sys/types.h>
14041 #include <signal.h>
14042 #ifdef signal
14043 #undef signal
14044 #endif
14045 #ifdef __cplusplus
14046 extern "C" void (*signal (int, void (*)(int)))(int);
14047 #else
14048 void (*signal ()) ();
14049 #endif
14050
14051 int main() {
14052 int i;
14053 ; return 0; }
14054 EOF
14055 if { (eval echo configure:14056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14056   rm -rf conftest*
14057   ac_cv_type_signal=void
14058 else
14059   echo "configure: failed program was:" >&5
14060   cat conftest.$ac_ext >&5
14061   rm -rf conftest*
14062   ac_cv_type_signal=int
14063 fi
14064 rm -f conftest*
14065 fi
14066
14067 echo "$ac_t""$ac_cv_type_signal" 1>&6
14068 cat >> confdefs.h <<EOF
14069 #define RETSIGTYPE $ac_cv_type_signal
14070 EOF
14071
14072
14073 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14074 echo "configure:14075: checking for size_t" >&5
14075 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14076   echo $ac_n "(cached) $ac_c" 1>&6
14077 else
14078   cat > conftest.$ac_ext <<EOF
14079 #line 14080 "configure"
14080 #include "confdefs.h"
14081 #include <sys/types.h>
14082 #if STDC_HEADERS
14083 #include <stdlib.h>
14084 #include <stddef.h>
14085 #endif
14086
14087 EOF
14088 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14089   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14090   rm -rf conftest*
14091   eval "ac_cv_type_size_t=yes"
14092 else
14093   rm -rf conftest*
14094   eval "ac_cv_type_size_t=no"
14095 fi
14096 rm -f conftest*
14097
14098 fi
14099 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14100   echo "$ac_t""yes" 1>&6
14101 else
14102   echo "$ac_t""no" 1>&6
14103   cat >> confdefs.h <<EOF
14104 #define size_t unsigned
14105 EOF
14106
14107 fi
14108
14109
14110 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14111 echo "configure:14112: checking for ssize_t" >&5
14112 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14113   echo $ac_n "(cached) $ac_c" 1>&6
14114 else
14115   cat > conftest.$ac_ext <<EOF
14116 #line 14117 "configure"
14117 #include "confdefs.h"
14118 #include <sys/types.h>
14119 #if STDC_HEADERS
14120 #include <stdlib.h>
14121 #include <stddef.h>
14122 #endif
14123
14124 EOF
14125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14126   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14127   rm -rf conftest*
14128   eval "ac_cv_type_ssize_t=yes"
14129 else
14130   rm -rf conftest*
14131   eval "ac_cv_type_ssize_t=no"
14132 fi
14133 rm -f conftest*
14134
14135 fi
14136 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14137   echo "$ac_t""yes" 1>&6
14138 else
14139   echo "$ac_t""no" 1>&6
14140   cat >> confdefs.h <<EOF
14141 #define ssize_t signed int
14142 EOF
14143
14144 fi
14145
14146 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14147 echo "configure:14148: checking for caddr_t" >&5
14148 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14149   echo $ac_n "(cached) $ac_c" 1>&6
14150 else
14151   cat > conftest.$ac_ext <<EOF
14152 #line 14153 "configure"
14153 #include "confdefs.h"
14154 #include <sys/types.h>
14155 #if STDC_HEADERS
14156 #include <stdlib.h>
14157 #include <stddef.h>
14158 #endif
14159
14160 EOF
14161 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14162   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14163   rm -rf conftest*
14164   eval "ac_cv_type_caddr_t=yes"
14165 else
14166   rm -rf conftest*
14167   eval "ac_cv_type_caddr_t=no"
14168 fi
14169 rm -f conftest*
14170
14171 fi
14172 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14173   echo "$ac_t""yes" 1>&6
14174 else
14175   echo "$ac_t""no" 1>&6
14176   cat >> confdefs.h <<EOF
14177 #define caddr_t char *
14178 EOF
14179
14180 fi
14181
14182
14183 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14184 echo "configure:14185: checking for socklen_t" >&5
14185 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14186   echo $ac_n "(cached) $ac_c" 1>&6
14187 else
14188   cat > conftest.$ac_ext <<EOF
14189 #line 14190 "configure"
14190 #include "confdefs.h"
14191
14192 #ifdef HAVE_SYS_TYPES_H
14193 #include <sys/types.h>
14194 #endif
14195 #ifdef HAVE_SYS_SOCKET_H
14196 #include <sys/socket.h>
14197 #endif
14198
14199 int main() {
14200 socklen_t len;
14201 ; return 0; }
14202 EOF
14203 if { (eval echo configure:14204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14204   rm -rf conftest*
14205   ol_cv_type_socklen_t=yes
14206 else
14207   echo "configure: failed program was:" >&5
14208   cat conftest.$ac_ext >&5
14209   rm -rf conftest*
14210   ol_cv_type_socklen_t=no
14211 fi
14212 rm -f conftest*
14213 fi
14214
14215 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14216   if test $ol_cv_type_socklen_t = no; then
14217     cat >> confdefs.h <<\EOF
14218 #define socklen_t int
14219 EOF
14220
14221   fi
14222  
14223 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14224 echo "configure:14225: checking for member st_blksize in aggregate type struct stat" >&5
14225 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14226   echo $ac_n "(cached) $ac_c" 1>&6
14227 else
14228   cat > conftest.$ac_ext <<EOF
14229 #line 14230 "configure"
14230 #include "confdefs.h"
14231 #include <sys/types.h>
14232 #include <sys/stat.h>
14233 int main() {
14234 struct stat foo; foo.st_blksize;
14235 ; return 0; }
14236 EOF
14237 if { (eval echo configure:14238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14238   rm -rf conftest*
14239   ac_cv_c_struct_member_st_blksize=yes
14240 else
14241   echo "configure: failed program was:" >&5
14242   cat conftest.$ac_ext >&5
14243   rm -rf conftest*
14244   ac_cv_c_struct_member_st_blksize=no
14245 fi
14246 rm -f conftest*
14247 fi
14248
14249 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14250 st_blksize="$ac_cv_c_struct_member_st_blksize"
14251 if test $ac_cv_c_struct_member_st_blksize = yes; then
14252   cat >> confdefs.h <<\EOF
14253 #define HAVE_ST_BLKSIZE 1
14254 EOF
14255
14256 fi
14257
14258 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14259 echo "configure:14260: checking whether time.h and sys/time.h may both be included" >&5
14260 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14261   echo $ac_n "(cached) $ac_c" 1>&6
14262 else
14263   cat > conftest.$ac_ext <<EOF
14264 #line 14265 "configure"
14265 #include "confdefs.h"
14266 #include <sys/types.h>
14267 #include <sys/time.h>
14268 #include <time.h>
14269 int main() {
14270 struct tm *tp;
14271 ; return 0; }
14272 EOF
14273 if { (eval echo configure:14274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14274   rm -rf conftest*
14275   ac_cv_header_time=yes
14276 else
14277   echo "configure: failed program was:" >&5
14278   cat conftest.$ac_ext >&5
14279   rm -rf conftest*
14280   ac_cv_header_time=no
14281 fi
14282 rm -f conftest*
14283 fi
14284
14285 echo "$ac_t""$ac_cv_header_time" 1>&6
14286 if test $ac_cv_header_time = yes; then
14287   cat >> confdefs.h <<\EOF
14288 #define TIME_WITH_SYS_TIME 1
14289 EOF
14290
14291 fi
14292
14293 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14294 echo "configure:14295: checking whether struct tm is in sys/time.h or time.h" >&5
14295 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14296   echo $ac_n "(cached) $ac_c" 1>&6
14297 else
14298   cat > conftest.$ac_ext <<EOF
14299 #line 14300 "configure"
14300 #include "confdefs.h"
14301 #include <sys/types.h>
14302 #include <time.h>
14303 int main() {
14304 struct tm *tp; tp->tm_sec;
14305 ; return 0; }
14306 EOF
14307 if { (eval echo configure:14308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14308   rm -rf conftest*
14309   ac_cv_struct_tm=time.h
14310 else
14311   echo "configure: failed program was:" >&5
14312   cat conftest.$ac_ext >&5
14313   rm -rf conftest*
14314   ac_cv_struct_tm=sys/time.h
14315 fi
14316 rm -f conftest*
14317 fi
14318
14319 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14320 if test $ac_cv_struct_tm = sys/time.h; then
14321   cat >> confdefs.h <<\EOF
14322 #define TM_IN_SYS_TIME 1
14323 EOF
14324
14325 fi
14326
14327 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14328 echo "configure:14329: checking for uid_t in sys/types.h" >&5
14329 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14330   echo $ac_n "(cached) $ac_c" 1>&6
14331 else
14332   cat > conftest.$ac_ext <<EOF
14333 #line 14334 "configure"
14334 #include "confdefs.h"
14335 #include <sys/types.h>
14336 EOF
14337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14338   egrep "uid_t" >/dev/null 2>&1; then
14339   rm -rf conftest*
14340   ac_cv_type_uid_t=yes
14341 else
14342   rm -rf conftest*
14343   ac_cv_type_uid_t=no
14344 fi
14345 rm -f conftest*
14346
14347 fi
14348
14349 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14350 if test $ac_cv_type_uid_t = no; then
14351   cat >> confdefs.h <<\EOF
14352 #define uid_t int
14353 EOF
14354
14355   cat >> confdefs.h <<\EOF
14356 #define gid_t int
14357 EOF
14358
14359 fi
14360
14361 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14362 echo "configure:14363: checking for sig_atomic_t" >&5
14363 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14364   echo $ac_n "(cached) $ac_c" 1>&6
14365 else
14366   cat > conftest.$ac_ext <<EOF
14367 #line 14368 "configure"
14368 #include "confdefs.h"
14369 #include <signal.h>
14370 int main() {
14371 sig_atomic_t atomic;
14372 ; return 0; }
14373 EOF
14374 if { (eval echo configure:14375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14375   rm -rf conftest*
14376   ol_cv_type_sig_atomic_t=yes
14377 else
14378   echo "configure: failed program was:" >&5
14379   cat conftest.$ac_ext >&5
14380   rm -rf conftest*
14381   ol_cv_type_sig_atomic_t=no
14382 fi
14383 rm -f conftest*
14384 fi
14385
14386 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14387   if test $ol_cv_type_sig_atomic_t = no; then
14388     cat >> confdefs.h <<\EOF
14389 #define sig_atomic_t int
14390 EOF
14391
14392   fi
14393  
14394
14395
14396 # test for pw_gecos in struct passwd
14397 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14398 echo "configure:14399: checking struct passwd for pw_gecos" >&5
14399 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14400   echo $ac_n "(cached) $ac_c" 1>&6
14401 else
14402   
14403         cat > conftest.$ac_ext <<EOF
14404 #line 14405 "configure"
14405 #include "confdefs.h"
14406 #include <pwd.h>
14407 int main() {
14408
14409         struct passwd pwd;
14410         pwd.pw_gecos = pwd.pw_name;
14411
14412 ; return 0; }
14413 EOF
14414 if { (eval echo configure:14415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14415   rm -rf conftest*
14416   ol_cv_struct_passwd_pw_gecos=yes
14417 else
14418   echo "configure: failed program was:" >&5
14419   cat conftest.$ac_ext >&5
14420   rm -rf conftest*
14421   ol_cv_struct_passwd_pw_gecos=no
14422 fi
14423 rm -f conftest*
14424 fi
14425
14426 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14427 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14428         cat >> confdefs.h <<\EOF
14429 #define HAVE_PW_GECOS 1
14430 EOF
14431
14432 fi
14433
14434 # test for pw_passwd in struct passwd
14435 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14436 echo "configure:14437: checking struct passwd for pw_passwd" >&5
14437 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14438   echo $ac_n "(cached) $ac_c" 1>&6
14439 else
14440   
14441         cat > conftest.$ac_ext <<EOF
14442 #line 14443 "configure"
14443 #include "confdefs.h"
14444 #include <pwd.h>
14445 int main() {
14446
14447         struct passwd pwd;
14448         pwd.pw_passwd = pwd.pw_name;
14449
14450 ; return 0; }
14451 EOF
14452 if { (eval echo configure:14453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14453   rm -rf conftest*
14454   ol_cv_struct_passwd_pw_passwd=yes
14455 else
14456   echo "configure: failed program was:" >&5
14457   cat conftest.$ac_ext >&5
14458   rm -rf conftest*
14459   ol_cv_struct_passwd_pw_passwd=no
14460 fi
14461 rm -f conftest*
14462 fi
14463
14464 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14465 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14466         cat >> confdefs.h <<\EOF
14467 #define HAVE_PW_PASSWD 1
14468 EOF
14469
14470 fi
14471
14472
14473 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14474 echo "configure:14475: checking if toupper() requires islower()" >&5
14475 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14476   echo $ac_n "(cached) $ac_c" 1>&6
14477 else
14478   
14479         if test "$cross_compiling" = yes; then
14480   ol_cv_c_upper_lower=safe
14481 else
14482   cat > conftest.$ac_ext <<EOF
14483 #line 14484 "configure"
14484 #include "confdefs.h"
14485
14486 #include <ctype.h>
14487 main()
14488 {
14489         if ('C' == toupper('C'))
14490                 exit(0);
14491         else
14492                 exit(1);
14493 }
14494 EOF
14495 if { (eval echo configure:14496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14496 then
14497   ol_cv_c_upper_lower=no
14498 else
14499   echo "configure: failed program was:" >&5
14500   cat conftest.$ac_ext >&5
14501   rm -fr conftest*
14502   ol_cv_c_upper_lower=yes
14503 fi
14504 rm -fr conftest*
14505 fi
14506
14507 fi
14508
14509 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14510 if test $ol_cv_c_upper_lower != no ; then
14511         cat >> confdefs.h <<\EOF
14512 #define C_UPPER_LOWER 1
14513 EOF
14514
14515 fi
14516
14517 echo $ac_n "checking for working const""... $ac_c" 1>&6
14518 echo "configure:14519: checking for working const" >&5
14519 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14520   echo $ac_n "(cached) $ac_c" 1>&6
14521 else
14522   cat > conftest.$ac_ext <<EOF
14523 #line 14524 "configure"
14524 #include "confdefs.h"
14525
14526 int main() {
14527
14528 /* Ultrix mips cc rejects this.  */
14529 typedef int charset[2]; const charset x;
14530 /* SunOS 4.1.1 cc rejects this.  */
14531 char const *const *ccp;
14532 char **p;
14533 /* NEC SVR4.0.2 mips cc rejects this.  */
14534 struct point {int x, y;};
14535 static struct point const zero = {0,0};
14536 /* AIX XL C 1.02.0.0 rejects this.
14537    It does not let you subtract one const X* pointer from another in an arm
14538    of an if-expression whose if-part is not a constant expression */
14539 const char *g = "string";
14540 ccp = &g + (g ? g-g : 0);
14541 /* HPUX 7.0 cc rejects these. */
14542 ++ccp;
14543 p = (char**) ccp;
14544 ccp = (char const *const *) p;
14545 { /* SCO 3.2v4 cc rejects this.  */
14546   char *t;
14547   char const *s = 0 ? (char *) 0 : (char const *) 0;
14548
14549   *t++ = 0;
14550 }
14551 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14552   int x[] = {25, 17};
14553   const int *foo = &x[0];
14554   ++foo;
14555 }
14556 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14557   typedef const int *iptr;
14558   iptr p = 0;
14559   ++p;
14560 }
14561 { /* AIX XL C 1.02.0.0 rejects this saying
14562      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14563   struct s { int j; const int *ap[3]; };
14564   struct s *b; b->j = 5;
14565 }
14566 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14567   const int foo = 10;
14568 }
14569
14570 ; return 0; }
14571 EOF
14572 if { (eval echo configure:14573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14573   rm -rf conftest*
14574   ac_cv_c_const=yes
14575 else
14576   echo "configure: failed program was:" >&5
14577   cat conftest.$ac_ext >&5
14578   rm -rf conftest*
14579   ac_cv_c_const=no
14580 fi
14581 rm -f conftest*
14582 fi
14583
14584 echo "$ac_t""$ac_cv_c_const" 1>&6
14585 if test $ac_cv_c_const = no; then
14586   cat >> confdefs.h <<\EOF
14587 #define const 
14588 EOF
14589
14590 fi
14591
14592 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14593 echo "configure:14594: checking if compiler understands volatile" >&5
14594 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14595   echo $ac_n "(cached) $ac_c" 1>&6
14596 else
14597   cat > conftest.$ac_ext <<EOF
14598 #line 14599 "configure"
14599 #include "confdefs.h"
14600 int x, y, z;
14601 int main() {
14602 volatile int a; int * volatile b = x ? &y : &z;
14603       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14604       *b = 0;
14605 ; return 0; }
14606 EOF
14607 if { (eval echo configure:14608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14608   rm -rf conftest*
14609   ol_cv_c_volatile=yes
14610 else
14611   echo "configure: failed program was:" >&5
14612   cat conftest.$ac_ext >&5
14613   rm -rf conftest*
14614   ol_cv_c_volatile=no
14615 fi
14616 rm -f conftest*
14617 fi
14618
14619 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14620   if test $ol_cv_c_volatile = yes; then
14621     : 
14622   else
14623     cat >> confdefs.h <<\EOF
14624 #define volatile 
14625 EOF
14626
14627   fi
14628  
14629
14630 if test $cross_compiling = yes ; then
14631         cat >> confdefs.h <<\EOF
14632 #define CROSS_COMPILING 1
14633 EOF
14634
14635 else
14636         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14637 echo "configure:14638: checking whether byte ordering is bigendian" >&5
14638 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14639   echo $ac_n "(cached) $ac_c" 1>&6
14640 else
14641   ac_cv_c_bigendian=unknown
14642 # See if sys/param.h defines the BYTE_ORDER macro.
14643 cat > conftest.$ac_ext <<EOF
14644 #line 14645 "configure"
14645 #include "confdefs.h"
14646 #include <sys/types.h>
14647 #include <sys/param.h>
14648 int main() {
14649
14650 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14651  bogus endian macros
14652 #endif
14653 ; return 0; }
14654 EOF
14655 if { (eval echo configure:14656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14656   rm -rf conftest*
14657   # It does; now see whether it defined to BIG_ENDIAN or not.
14658 cat > conftest.$ac_ext <<EOF
14659 #line 14660 "configure"
14660 #include "confdefs.h"
14661 #include <sys/types.h>
14662 #include <sys/param.h>
14663 int main() {
14664
14665 #if BYTE_ORDER != BIG_ENDIAN
14666  not big endian
14667 #endif
14668 ; return 0; }
14669 EOF
14670 if { (eval echo configure:14671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14671   rm -rf conftest*
14672   ac_cv_c_bigendian=yes
14673 else
14674   echo "configure: failed program was:" >&5
14675   cat conftest.$ac_ext >&5
14676   rm -rf conftest*
14677   ac_cv_c_bigendian=no
14678 fi
14679 rm -f conftest*
14680 else
14681   echo "configure: failed program was:" >&5
14682   cat conftest.$ac_ext >&5
14683 fi
14684 rm -f conftest*
14685 if test $ac_cv_c_bigendian = unknown; then
14686 if test "$cross_compiling" = yes; then
14687     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14688 else
14689   cat > conftest.$ac_ext <<EOF
14690 #line 14691 "configure"
14691 #include "confdefs.h"
14692 main () {
14693   /* Are we little or big endian?  From Harbison&Steele.  */
14694   union
14695   {
14696     long l;
14697     char c[sizeof (long)];
14698   } u;
14699   u.l = 1;
14700   exit (u.c[sizeof (long) - 1] == 1);
14701 }
14702 EOF
14703 if { (eval echo configure:14704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14704 then
14705   ac_cv_c_bigendian=no
14706 else
14707   echo "configure: failed program was:" >&5
14708   cat conftest.$ac_ext >&5
14709   rm -fr conftest*
14710   ac_cv_c_bigendian=yes
14711 fi
14712 rm -fr conftest*
14713 fi
14714
14715 fi
14716 fi
14717
14718 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14719 if test $ac_cv_c_bigendian = yes; then
14720   cat >> confdefs.h <<\EOF
14721 #define WORDS_BIGENDIAN 1
14722 EOF
14723
14724 fi
14725
14726 fi
14727
14728 echo $ac_n "checking size of short""... $ac_c" 1>&6
14729 echo "configure:14730: checking size of short" >&5 
14730 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14731   echo $ac_n "(cached) $ac_c" 1>&6
14732 else
14733   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14734   cat > conftest.$ac_ext <<EOF
14735 #line 14736 "configure"
14736 #include "confdefs.h"
14737 #include "confdefs.h" 
14738 #include <sys/types.h> 
14739  
14740
14741 int main() {
14742 switch (0) case 0: case (sizeof (short) == $ac_size):;
14743 ; return 0; }
14744 EOF
14745 if { (eval echo configure:14746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14746   rm -rf conftest*
14747   ac_cv_sizeof_short=$ac_size
14748 else
14749   echo "configure: failed program was:" >&5
14750   cat conftest.$ac_ext >&5
14751 fi
14752 rm -f conftest* 
14753   if test x$ac_cv_sizeof_short != x ; then break; fi 
14754 done 
14755
14756 fi
14757  
14758 if test x$ac_cv_sizeof_short = x ; then 
14759   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14760 fi 
14761 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14762 cat >> confdefs.h <<EOF
14763 #define SIZEOF_SHORT $ac_cv_sizeof_short
14764 EOF
14765  
14766  
14767 echo $ac_n "checking size of int""... $ac_c" 1>&6
14768 echo "configure:14769: checking size of int" >&5 
14769 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14770   echo $ac_n "(cached) $ac_c" 1>&6
14771 else
14772   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14773   cat > conftest.$ac_ext <<EOF
14774 #line 14775 "configure"
14775 #include "confdefs.h"
14776 #include "confdefs.h" 
14777 #include <sys/types.h> 
14778  
14779
14780 int main() {
14781 switch (0) case 0: case (sizeof (int) == $ac_size):;
14782 ; return 0; }
14783 EOF
14784 if { (eval echo configure:14785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14785   rm -rf conftest*
14786   ac_cv_sizeof_int=$ac_size
14787 else
14788   echo "configure: failed program was:" >&5
14789   cat conftest.$ac_ext >&5
14790 fi
14791 rm -f conftest* 
14792   if test x$ac_cv_sizeof_int != x ; then break; fi 
14793 done 
14794
14795 fi
14796  
14797 if test x$ac_cv_sizeof_int = x ; then 
14798   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14799 fi 
14800 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14801 cat >> confdefs.h <<EOF
14802 #define SIZEOF_INT $ac_cv_sizeof_int
14803 EOF
14804  
14805  
14806 echo $ac_n "checking size of long""... $ac_c" 1>&6
14807 echo "configure:14808: checking size of long" >&5 
14808 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14809   echo $ac_n "(cached) $ac_c" 1>&6
14810 else
14811   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14812   cat > conftest.$ac_ext <<EOF
14813 #line 14814 "configure"
14814 #include "confdefs.h"
14815 #include "confdefs.h" 
14816 #include <sys/types.h> 
14817  
14818
14819 int main() {
14820 switch (0) case 0: case (sizeof (long) == $ac_size):;
14821 ; return 0; }
14822 EOF
14823 if { (eval echo configure:14824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14824   rm -rf conftest*
14825   ac_cv_sizeof_long=$ac_size
14826 else
14827   echo "configure: failed program was:" >&5
14828   cat conftest.$ac_ext >&5
14829 fi
14830 rm -f conftest* 
14831   if test x$ac_cv_sizeof_long != x ; then break; fi 
14832 done 
14833
14834 fi
14835  
14836 if test x$ac_cv_sizeof_long = x ; then 
14837   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14838 fi 
14839 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14840 cat >> confdefs.h <<EOF
14841 #define SIZEOF_LONG $ac_cv_sizeof_long
14842 EOF
14843  
14844
14845
14846 if test "$ac_cv_sizeof_int" -lt 4 ; then
14847         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14848
14849         cat >> confdefs.h <<\EOF
14850 #define LBER_INT_T long
14851 EOF
14852
14853 else
14854         cat >> confdefs.h <<\EOF
14855 #define LBER_INT_T int
14856 EOF
14857
14858 fi
14859
14860 cat >> confdefs.h <<\EOF
14861 #define LBER_LEN_T long
14862 EOF
14863
14864 cat >> confdefs.h <<\EOF
14865 #define LBER_SOCKET_T int
14866 EOF
14867
14868 cat >> confdefs.h <<\EOF
14869 #define LBER_TAG_T long
14870 EOF
14871
14872
14873 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14874 echo "configure:14875: checking for 8-bit clean memcmp" >&5
14875 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14876   echo $ac_n "(cached) $ac_c" 1>&6
14877 else
14878   if test "$cross_compiling" = yes; then
14879   ac_cv_func_memcmp_clean=no
14880 else
14881   cat > conftest.$ac_ext <<EOF
14882 #line 14883 "configure"
14883 #include "confdefs.h"
14884
14885 main()
14886 {
14887   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14888   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14889 }
14890
14891 EOF
14892 if { (eval echo configure:14893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14893 then
14894   ac_cv_func_memcmp_clean=yes
14895 else
14896   echo "configure: failed program was:" >&5
14897   cat conftest.$ac_ext >&5
14898   rm -fr conftest*
14899   ac_cv_func_memcmp_clean=no
14900 fi
14901 rm -fr conftest*
14902 fi
14903
14904 fi
14905
14906 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14907 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14908
14909 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14910 echo "configure:14911: checking for strftime" >&5
14911 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14912   echo $ac_n "(cached) $ac_c" 1>&6
14913 else
14914   cat > conftest.$ac_ext <<EOF
14915 #line 14916 "configure"
14916 #include "confdefs.h"
14917 /* System header to define __stub macros and hopefully few prototypes,
14918     which can conflict with char strftime(); below.  */
14919 #include <assert.h>
14920 /* Override any gcc2 internal prototype to avoid an error.  */
14921 /* We use char because int might match the return type of a gcc2
14922     builtin and then its argument prototype would still apply.  */
14923 char strftime();
14924 char (*f)();
14925
14926 int main() {
14927
14928 /* The GNU C library defines this for functions which it implements
14929     to always fail with ENOSYS.  Some functions are actually named
14930     something starting with __ and the normal name is an alias.  */
14931 #if defined (__stub_strftime) || defined (__stub___strftime)
14932 choke me
14933 #else
14934 f = strftime;
14935 #endif
14936
14937 ; return 0; }
14938 EOF
14939 if { (eval echo configure:14940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14940   rm -rf conftest*
14941   eval "ac_cv_func_strftime=yes"
14942 else
14943   echo "configure: failed program was:" >&5
14944   cat conftest.$ac_ext >&5
14945   rm -rf conftest*
14946   eval "ac_cv_func_strftime=no"
14947 fi
14948 rm -f conftest*
14949 fi
14950
14951 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14952   echo "$ac_t""yes" 1>&6
14953   cat >> confdefs.h <<\EOF
14954 #define HAVE_STRFTIME 1
14955 EOF
14956
14957 else
14958   echo "$ac_t""no" 1>&6
14959 # strftime is in -lintl on SCO UNIX.
14960 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14961 echo "configure:14962: checking for strftime in -lintl" >&5
14962 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14964   echo $ac_n "(cached) $ac_c" 1>&6
14965 else
14966   ac_save_LIBS="$LIBS"
14967 LIBS="-lintl  $LIBS"
14968 cat > conftest.$ac_ext <<EOF
14969 #line 14970 "configure"
14970 #include "confdefs.h"
14971 /* Override any gcc2 internal prototype to avoid an error.  */
14972 /* We use char because int might match the return type of a gcc2
14973     builtin and then its argument prototype would still apply.  */
14974 char strftime();
14975
14976 int main() {
14977 strftime()
14978 ; return 0; }
14979 EOF
14980 if { (eval echo configure:14981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14981   rm -rf conftest*
14982   eval "ac_cv_lib_$ac_lib_var=yes"
14983 else
14984   echo "configure: failed program was:" >&5
14985   cat conftest.$ac_ext >&5
14986   rm -rf conftest*
14987   eval "ac_cv_lib_$ac_lib_var=no"
14988 fi
14989 rm -f conftest*
14990 LIBS="$ac_save_LIBS"
14991
14992 fi
14993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14994   echo "$ac_t""yes" 1>&6
14995   cat >> confdefs.h <<\EOF
14996 #define HAVE_STRFTIME 1
14997 EOF
14998
14999 LIBS="-lintl $LIBS"
15000 else
15001   echo "$ac_t""no" 1>&6
15002 fi
15003
15004 fi
15005
15006
15007 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15008 echo "configure:15009: checking for inet_aton()" >&5
15009 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15010   echo $ac_n "(cached) $ac_c" 1>&6
15011 else
15012   cat > conftest.$ac_ext <<EOF
15013 #line 15014 "configure"
15014 #include "confdefs.h"
15015
15016 #ifdef HAVE_SYS_TYPES_H
15017 #       include <sys/types.h>
15018 #endif
15019 #ifdef HAVE_SYS_SOCKET_H
15020 #       include <sys/socket.h>
15021 #       ifdef HAVE_SYS_SELECT_H
15022 #               include <sys/select.h>
15023 #       endif
15024 #       include <netinet/in.h>
15025 #       ifdef HAVE_ARPA_INET_H
15026 #               include <arpa/inet.h>
15027 #       endif
15028 #endif
15029
15030 int main() {
15031 struct in_addr in;
15032 int rc = inet_aton( "255.255.255.255", &in );
15033 ; return 0; }
15034 EOF
15035 if { (eval echo configure:15036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15036   rm -rf conftest*
15037   ol_cv_func_inet_aton=yes
15038 else
15039   echo "configure: failed program was:" >&5
15040   cat conftest.$ac_ext >&5
15041   rm -rf conftest*
15042   ol_cv_func_inet_aton=no
15043 fi
15044 rm -f conftest*
15045 fi
15046
15047 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15048   if test $ol_cv_func_inet_aton != no; then
15049     cat >> confdefs.h <<\EOF
15050 #define HAVE_INET_ATON 1
15051 EOF
15052
15053   fi
15054  
15055
15056 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15057 echo "configure:15058: checking for _spawnlp" >&5
15058 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15059   echo $ac_n "(cached) $ac_c" 1>&6
15060 else
15061   cat > conftest.$ac_ext <<EOF
15062 #line 15063 "configure"
15063 #include "confdefs.h"
15064 /* System header to define __stub macros and hopefully few prototypes,
15065     which can conflict with char _spawnlp(); below.  */
15066 #include <assert.h>
15067 /* Override any gcc2 internal prototype to avoid an error.  */
15068 /* We use char because int might match the return type of a gcc2
15069     builtin and then its argument prototype would still apply.  */
15070 char _spawnlp();
15071 char (*f)();
15072
15073 int main() {
15074
15075 /* The GNU C library defines this for functions which it implements
15076     to always fail with ENOSYS.  Some functions are actually named
15077     something starting with __ and the normal name is an alias.  */
15078 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15079 choke me
15080 #else
15081 f = _spawnlp;
15082 #endif
15083
15084 ; return 0; }
15085 EOF
15086 if { (eval echo configure:15087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15087   rm -rf conftest*
15088   eval "ac_cv_func__spawnlp=yes"
15089 else
15090   echo "configure: failed program was:" >&5
15091   cat conftest.$ac_ext >&5
15092   rm -rf conftest*
15093   eval "ac_cv_func__spawnlp=no"
15094 fi
15095 rm -f conftest*
15096 fi
15097
15098 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15099   echo "$ac_t""yes" 1>&6
15100   cat >> confdefs.h <<\EOF
15101 #define HAVE_SPAWNLP 1
15102 EOF
15103
15104 else
15105   echo "$ac_t""no" 1>&6
15106 fi
15107
15108
15109 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15110 echo "configure:15111: checking for _snprintf" >&5
15111 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15112   echo $ac_n "(cached) $ac_c" 1>&6
15113 else
15114   cat > conftest.$ac_ext <<EOF
15115 #line 15116 "configure"
15116 #include "confdefs.h"
15117 /* System header to define __stub macros and hopefully few prototypes,
15118     which can conflict with char _snprintf(); below.  */
15119 #include <assert.h>
15120 /* Override any gcc2 internal prototype to avoid an error.  */
15121 /* We use char because int might match the return type of a gcc2
15122     builtin and then its argument prototype would still apply.  */
15123 char _snprintf();
15124 char (*f)();
15125
15126 int main() {
15127
15128 /* The GNU C library defines this for functions which it implements
15129     to always fail with ENOSYS.  Some functions are actually named
15130     something starting with __ and the normal name is an alias.  */
15131 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15132 choke me
15133 #else
15134 f = _snprintf;
15135 #endif
15136
15137 ; return 0; }
15138 EOF
15139 if { (eval echo configure:15140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15140   rm -rf conftest*
15141   eval "ac_cv_func__snprintf=yes"
15142 else
15143   echo "configure: failed program was:" >&5
15144   cat conftest.$ac_ext >&5
15145   rm -rf conftest*
15146   eval "ac_cv_func__snprintf=no"
15147 fi
15148 rm -f conftest*
15149 fi
15150
15151 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15152   echo "$ac_t""yes" 1>&6
15153   ac_cv_func_snprintf=yes
15154         cat >> confdefs.h <<\EOF
15155 #define snprintf _snprintf
15156 EOF
15157
15158
15159 else
15160   echo "$ac_t""no" 1>&6
15161 fi
15162
15163
15164 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15165 echo "configure:15166: checking for _vsnprintf" >&5
15166 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15167   echo $ac_n "(cached) $ac_c" 1>&6
15168 else
15169   cat > conftest.$ac_ext <<EOF
15170 #line 15171 "configure"
15171 #include "confdefs.h"
15172 /* System header to define __stub macros and hopefully few prototypes,
15173     which can conflict with char _vsnprintf(); below.  */
15174 #include <assert.h>
15175 /* Override any gcc2 internal prototype to avoid an error.  */
15176 /* We use char because int might match the return type of a gcc2
15177     builtin and then its argument prototype would still apply.  */
15178 char _vsnprintf();
15179 char (*f)();
15180
15181 int main() {
15182
15183 /* The GNU C library defines this for functions which it implements
15184     to always fail with ENOSYS.  Some functions are actually named
15185     something starting with __ and the normal name is an alias.  */
15186 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15187 choke me
15188 #else
15189 f = _vsnprintf;
15190 #endif
15191
15192 ; return 0; }
15193 EOF
15194 if { (eval echo configure:15195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15195   rm -rf conftest*
15196   eval "ac_cv_func__vsnprintf=yes"
15197 else
15198   echo "configure: failed program was:" >&5
15199   cat conftest.$ac_ext >&5
15200   rm -rf conftest*
15201   eval "ac_cv_func__vsnprintf=no"
15202 fi
15203 rm -f conftest*
15204 fi
15205
15206 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15207   echo "$ac_t""yes" 1>&6
15208   ac_cv_func_vsnprintf=yes
15209         cat >> confdefs.h <<\EOF
15210 #define vsnprintf _vsnprintf
15211 EOF
15212
15213
15214 else
15215   echo "$ac_t""no" 1>&6
15216 fi
15217
15218
15219 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15220 echo "configure:15221: checking for vprintf" >&5
15221 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15222   echo $ac_n "(cached) $ac_c" 1>&6
15223 else
15224   cat > conftest.$ac_ext <<EOF
15225 #line 15226 "configure"
15226 #include "confdefs.h"
15227 /* System header to define __stub macros and hopefully few prototypes,
15228     which can conflict with char vprintf(); below.  */
15229 #include <assert.h>
15230 /* Override any gcc2 internal prototype to avoid an error.  */
15231 /* We use char because int might match the return type of a gcc2
15232     builtin and then its argument prototype would still apply.  */
15233 char vprintf();
15234 char (*f)();
15235
15236 int main() {
15237
15238 /* The GNU C library defines this for functions which it implements
15239     to always fail with ENOSYS.  Some functions are actually named
15240     something starting with __ and the normal name is an alias.  */
15241 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15242 choke me
15243 #else
15244 f = vprintf;
15245 #endif
15246
15247 ; return 0; }
15248 EOF
15249 if { (eval echo configure:15250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15250   rm -rf conftest*
15251   eval "ac_cv_func_vprintf=yes"
15252 else
15253   echo "configure: failed program was:" >&5
15254   cat conftest.$ac_ext >&5
15255   rm -rf conftest*
15256   eval "ac_cv_func_vprintf=no"
15257 fi
15258 rm -f conftest*
15259 fi
15260
15261 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15262   echo "$ac_t""yes" 1>&6
15263   cat >> confdefs.h <<\EOF
15264 #define HAVE_VPRINTF 1
15265 EOF
15266
15267 else
15268   echo "$ac_t""no" 1>&6
15269 fi
15270
15271 if test "$ac_cv_func_vprintf" != yes; then
15272 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15273 echo "configure:15274: checking for _doprnt" >&5
15274 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15275   echo $ac_n "(cached) $ac_c" 1>&6
15276 else
15277   cat > conftest.$ac_ext <<EOF
15278 #line 15279 "configure"
15279 #include "confdefs.h"
15280 /* System header to define __stub macros and hopefully few prototypes,
15281     which can conflict with char _doprnt(); below.  */
15282 #include <assert.h>
15283 /* Override any gcc2 internal prototype to avoid an error.  */
15284 /* We use char because int might match the return type of a gcc2
15285     builtin and then its argument prototype would still apply.  */
15286 char _doprnt();
15287 char (*f)();
15288
15289 int main() {
15290
15291 /* The GNU C library defines this for functions which it implements
15292     to always fail with ENOSYS.  Some functions are actually named
15293     something starting with __ and the normal name is an alias.  */
15294 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15295 choke me
15296 #else
15297 f = _doprnt;
15298 #endif
15299
15300 ; return 0; }
15301 EOF
15302 if { (eval echo configure:15303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15303   rm -rf conftest*
15304   eval "ac_cv_func__doprnt=yes"
15305 else
15306   echo "configure: failed program was:" >&5
15307   cat conftest.$ac_ext >&5
15308   rm -rf conftest*
15309   eval "ac_cv_func__doprnt=no"
15310 fi
15311 rm -f conftest*
15312 fi
15313
15314 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15315   echo "$ac_t""yes" 1>&6
15316   cat >> confdefs.h <<\EOF
15317 #define HAVE_DOPRNT 1
15318 EOF
15319
15320 else
15321   echo "$ac_t""no" 1>&6
15322 fi
15323
15324 fi
15325
15326
15327 if test $ac_cv_func_vprintf = yes ; then
15328                 for ac_func in vsnprintf vsprintf
15329 do
15330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15331 echo "configure:15332: checking for $ac_func" >&5
15332 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15333   echo $ac_n "(cached) $ac_c" 1>&6
15334 else
15335   cat > conftest.$ac_ext <<EOF
15336 #line 15337 "configure"
15337 #include "confdefs.h"
15338 /* System header to define __stub macros and hopefully few prototypes,
15339     which can conflict with char $ac_func(); below.  */
15340 #include <assert.h>
15341 /* Override any gcc2 internal prototype to avoid an error.  */
15342 /* We use char because int might match the return type of a gcc2
15343     builtin and then its argument prototype would still apply.  */
15344 char $ac_func();
15345 char (*f)();
15346
15347 int main() {
15348
15349 /* The GNU C library defines this for functions which it implements
15350     to always fail with ENOSYS.  Some functions are actually named
15351     something starting with __ and the normal name is an alias.  */
15352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15353 choke me
15354 #else
15355 f = $ac_func;
15356 #endif
15357
15358 ; return 0; }
15359 EOF
15360 if { (eval echo configure:15361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15361   rm -rf conftest*
15362   eval "ac_cv_func_$ac_func=yes"
15363 else
15364   echo "configure: failed program was:" >&5
15365   cat conftest.$ac_ext >&5
15366   rm -rf conftest*
15367   eval "ac_cv_func_$ac_func=no"
15368 fi
15369 rm -f conftest*
15370 fi
15371
15372 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15373   echo "$ac_t""yes" 1>&6
15374     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15375   cat >> confdefs.h <<EOF
15376 #define $ac_tr_func 1
15377 EOF
15378  
15379 else
15380   echo "$ac_t""no" 1>&6
15381 fi
15382 done
15383
15384 fi
15385
15386 for ac_func in \
15387         bcopy                   \
15388         closesocket             \
15389         chroot                  \
15390         endgrent                \
15391         endpwent                \
15392         flock                   \
15393         getdtablesize   \
15394         getgrgid                \
15395         gethostname             \
15396         getpass                 \
15397         getpassphrase   \
15398         getpwuid                \
15399         getpwnam                \
15400         getspnam                \
15401         gettimeofday    \
15402         initgroups              \
15403         lockf                   \
15404         memcpy                  \
15405         memmove                 \
15406         mkstemp                 \
15407         pipe                    \
15408         read                    \
15409         recv                    \
15410         recvfrom                \
15411         setpwfile               \
15412         setgid                  \
15413         setegid                 \
15414         setsid                  \
15415         setuid                  \
15416         seteuid                 \
15417         sigaction               \
15418         signal                  \
15419         sigset                  \
15420         snprintf                \
15421         strdup                  \
15422         strerror                \
15423         strpbrk                 \
15424         strrchr                 \
15425         strsep                  \
15426         strstr                  \
15427         strtol                  \
15428         strtoul                 \
15429         strspn                  \
15430         sysconf                 \
15431         waitpid                 \
15432         wait4                   \
15433         write                   \
15434         send                    \
15435         sendto                  \
15436
15437 do
15438 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15439 echo "configure:15440: checking for $ac_func" >&5
15440 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15441   echo $ac_n "(cached) $ac_c" 1>&6
15442 else
15443   cat > conftest.$ac_ext <<EOF
15444 #line 15445 "configure"
15445 #include "confdefs.h"
15446 /* System header to define __stub macros and hopefully few prototypes,
15447     which can conflict with char $ac_func(); below.  */
15448 #include <assert.h>
15449 /* Override any gcc2 internal prototype to avoid an error.  */
15450 /* We use char because int might match the return type of a gcc2
15451     builtin and then its argument prototype would still apply.  */
15452 char $ac_func();
15453 char (*f)();
15454
15455 int main() {
15456
15457 /* The GNU C library defines this for functions which it implements
15458     to always fail with ENOSYS.  Some functions are actually named
15459     something starting with __ and the normal name is an alias.  */
15460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15461 choke me
15462 #else
15463 f = $ac_func;
15464 #endif
15465
15466 ; return 0; }
15467 EOF
15468 if { (eval echo configure:15469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15469   rm -rf conftest*
15470   eval "ac_cv_func_$ac_func=yes"
15471 else
15472   echo "configure: failed program was:" >&5
15473   cat conftest.$ac_ext >&5
15474   rm -rf conftest*
15475   eval "ac_cv_func_$ac_func=no"
15476 fi
15477 rm -f conftest*
15478 fi
15479
15480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15481   echo "$ac_t""yes" 1>&6
15482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15483   cat >> confdefs.h <<EOF
15484 #define $ac_tr_func 1
15485 EOF
15486  
15487 else
15488   echo "$ac_t""no" 1>&6
15489 fi
15490 done
15491
15492
15493 for ac_func in getopt tempnam
15494 do
15495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15496 echo "configure:15497: checking for $ac_func" >&5
15497 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15498   echo $ac_n "(cached) $ac_c" 1>&6
15499 else
15500   cat > conftest.$ac_ext <<EOF
15501 #line 15502 "configure"
15502 #include "confdefs.h"
15503 /* System header to define __stub macros and hopefully few prototypes,
15504     which can conflict with char $ac_func(); below.  */
15505 #include <assert.h>
15506 /* Override any gcc2 internal prototype to avoid an error.  */
15507 /* We use char because int might match the return type of a gcc2
15508     builtin and then its argument prototype would still apply.  */
15509 char $ac_func();
15510 char (*f)();
15511
15512 int main() {
15513
15514 /* The GNU C library defines this for functions which it implements
15515     to always fail with ENOSYS.  Some functions are actually named
15516     something starting with __ and the normal name is an alias.  */
15517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15518 choke me
15519 #else
15520 f = $ac_func;
15521 #endif
15522
15523 ; return 0; }
15524 EOF
15525 if { (eval echo configure:15526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15526   rm -rf conftest*
15527   eval "ac_cv_func_$ac_func=yes"
15528 else
15529   echo "configure: failed program was:" >&5
15530   cat conftest.$ac_ext >&5
15531   rm -rf conftest*
15532   eval "ac_cv_func_$ac_func=no"
15533 fi
15534 rm -f conftest*
15535 fi
15536
15537 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15538   echo "$ac_t""yes" 1>&6
15539     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15540   cat >> confdefs.h <<EOF
15541 #define $ac_tr_func 1
15542 EOF
15543  
15544 else
15545   echo "$ac_t""no" 1>&6
15546 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15547 fi
15548 done
15549
15550
15551
15552 if test "$ac_cv_func_getopt" != yes; then
15553     LIBSRCS="$LIBSRCS getopt.c"
15554 fi
15555
15556 if test "$ac_cv_func_tempnam" != yes; then
15557     LIBSRCS="$LIBSRCS tempnam.c"
15558 fi
15559
15560 # Check Configuration
15561 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15562 echo "configure:15563: checking declaration of sys_errlist" >&5
15563 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15564   echo $ac_n "(cached) $ac_c" 1>&6
15565 else
15566   
15567         cat > conftest.$ac_ext <<EOF
15568 #line 15569 "configure"
15569 #include "confdefs.h"
15570
15571 #include <stdio.h>
15572 #include <sys/types.h>
15573 #include <errno.h>
15574 #ifdef WINNT
15575 #include <stdlib.h>
15576 #endif 
15577 int main() {
15578 char *c = (char *) *sys_errlist
15579 ; return 0; }
15580 EOF
15581 if { (eval echo configure:15582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15582   rm -rf conftest*
15583   ol_cv_dcl_sys_errlist=yes
15584         ol_cv_have_sys_errlist=yes
15585 else
15586   echo "configure: failed program was:" >&5
15587   cat conftest.$ac_ext >&5
15588   rm -rf conftest*
15589   ol_cv_dcl_sys_errlist=no
15590 fi
15591 rm -f conftest*
15592 fi
15593
15594 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15595 #
15596 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15597 if test $ol_cv_dcl_sys_errlist = no ; then
15598         cat >> confdefs.h <<\EOF
15599 #define DECL_SYS_ERRLIST 1
15600 EOF
15601
15602
15603         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15604 echo "configure:15605: checking existence of sys_errlist" >&5
15605 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15606   echo $ac_n "(cached) $ac_c" 1>&6
15607 else
15608   
15609                 cat > conftest.$ac_ext <<EOF
15610 #line 15611 "configure"
15611 #include "confdefs.h"
15612 #include <errno.h>
15613 int main() {
15614 char *c = (char *) *sys_errlist
15615 ; return 0; }
15616 EOF
15617 if { (eval echo configure:15618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15618   rm -rf conftest*
15619   ol_cv_have_sys_errlist=yes
15620 else
15621   echo "configure: failed program was:" >&5
15622   cat conftest.$ac_ext >&5
15623   rm -rf conftest*
15624   ol_cv_have_sys_errlist=no
15625 fi
15626 rm -f conftest*
15627 fi
15628
15629 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15630 fi
15631 if test $ol_cv_have_sys_errlist = yes ; then
15632         cat >> confdefs.h <<\EOF
15633 #define HAVE_SYS_ERRLIST 1
15634 EOF
15635
15636 fi
15637
15638
15639
15640 if test "$ol_enable_debug" != no ; then
15641         cat >> confdefs.h <<\EOF
15642 #define LDAP_DEBUG 1
15643 EOF
15644
15645 fi
15646 if test "$ol_enable_syslog" = yes ; then
15647         cat >> confdefs.h <<\EOF
15648 #define LDAP_SYSLOG 1
15649 EOF
15650
15651 fi
15652 if test "$ol_enable_libui" = yes ; then
15653         cat >> confdefs.h <<\EOF
15654 #define LDAP_LIBUI 1
15655 EOF
15656
15657 fi
15658 if test "$ol_enable_cache" = no ; then
15659         cat >> confdefs.h <<\EOF
15660 #define LDAP_NOCACHE 1
15661 EOF
15662
15663 fi
15664 if test "$ol_link_kbind" != no ; then
15665         cat >> confdefs.h <<\EOF
15666 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15667 EOF
15668
15669 fi
15670 if test "$ol_enable_proctitle" != no ; then
15671         cat >> confdefs.h <<\EOF
15672 #define LDAP_PROCTITLE 1
15673 EOF
15674
15675 fi
15676 if test "$ol_enable_referrals" != no ; then
15677         cat >> confdefs.h <<\EOF
15678 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15679 EOF
15680
15681 fi
15682 if test "$ol_enable_local" != no; then
15683         cat >> confdefs.h <<\EOF
15684 #define LDAP_PF_LOCAL 1
15685 EOF
15686
15687 fi
15688 if test "$ol_link_ipv6" != no; then
15689         cat >> confdefs.h <<\EOF
15690 #define LDAP_PF_INET6 1
15691 EOF
15692
15693 fi
15694 if test "$ol_enable_cleartext" != no ; then
15695         cat >> confdefs.h <<\EOF
15696 #define SLAPD_CLEARTEXT 1
15697 EOF
15698
15699 fi
15700 if test "$ol_enable_crypt" != no ; then
15701         cat >> confdefs.h <<\EOF
15702 #define SLAPD_CRYPT 1
15703 EOF
15704
15705 fi
15706 if test "$ol_link_kpasswd" != no ; then
15707         cat >> confdefs.h <<\EOF
15708 #define SLAPD_KPASSWD 1
15709 EOF
15710
15711 fi
15712 if test "$ol_link_spasswd" != no ; then
15713         cat >> confdefs.h <<\EOF
15714 #define SLAPD_SPASSWD 1
15715 EOF
15716
15717 fi
15718 if test "$ol_enable_multimaster" != no ; then
15719         cat >> confdefs.h <<\EOF
15720 #define SLAPD_MULTIMASTER 1
15721 EOF
15722
15723 fi
15724 if test "$ol_enable_phonetic" != no ; then
15725         cat >> confdefs.h <<\EOF
15726 #define SLAPD_PHONETIC 1
15727 EOF
15728
15729 fi
15730 if test "$ol_enable_rlookups" != no ; then
15731         cat >> confdefs.h <<\EOF
15732 #define SLAPD_RLOOKUPS 1
15733 EOF
15734
15735 fi
15736 if test "$ol_enable_aci" != no ; then
15737         cat >> confdefs.h <<\EOF
15738 #define SLAPD_ACI_ENABLED 1
15739 EOF
15740
15741 fi
15742
15743 if test "$ol_link_modules" != no ; then
15744         cat >> confdefs.h <<\EOF
15745 #define SLAPD_MODULES 1
15746 EOF
15747
15748         BUILD_SLAPD=yes
15749         SLAPD_MODULES_LDFLAGS="-dlopen self"
15750 fi
15751
15752 if test "$ol_link_dnssrv" != no ; then
15753         cat >> confdefs.h <<\EOF
15754 #define SLAPD_DNSSRV 1
15755 EOF
15756
15757         BUILD_SLAPD=yes
15758         BUILD_DNSSRV=yes
15759         if test "$ol_with_dnssrv_module" != static ; then
15760                 cat >> confdefs.h <<\EOF
15761 #define SLAPD_DNSSRV_DYNAMIC 1
15762 EOF
15763
15764                 BUILD_DNSSRV=mod
15765                 BUILD_DNSSRV_DYNAMIC=shared
15766                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15767         fi
15768 fi
15769
15770 if test "$ol_enable_ldap" != no ; then
15771         cat >> confdefs.h <<\EOF
15772 #define SLAPD_LDAP 1
15773 EOF
15774
15775         BUILD_SLAPD=yes
15776         BUILD_LDAP=yes
15777         if test "$ol_with_ldap_module" != static ; then
15778                 cat >> confdefs.h <<\EOF
15779 #define SLAPD_LDAP_DYNAMIC 1
15780 EOF
15781
15782                 BUILD_LDAP=mod
15783                 BUILD_LDAP_DYNAMIC=shared
15784                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15785         fi
15786 fi
15787
15788 if test "$ol_link_ldbm" != no ; then
15789         cat >> confdefs.h <<\EOF
15790 #define SLAPD_LDBM 1
15791 EOF
15792
15793         BUILD_SLAPD=yes
15794         BUILD_LDBM=yes
15795         if test "$ol_with_ldbm_module" != static ; then
15796                 cat >> confdefs.h <<\EOF
15797 #define SLAPD_LDBM_DYNAMIC 1
15798 EOF
15799
15800                 BUILD_LDBM=mod
15801                 BUILD_LDBM_DYNAMIC=shared
15802                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15803         fi
15804 fi
15805
15806 if test "$ol_enable_passwd" != no ; then
15807         cat >> confdefs.h <<\EOF
15808 #define SLAPD_PASSWD 1
15809 EOF
15810
15811         BUILD_SLAPD=yes
15812         BUILD_PASSWD=yes
15813         if test "$ol_with_passwd_module" != static ; then
15814                 cat >> confdefs.h <<\EOF
15815 #define SLAPD_PASSWD_DYNAMIC 1
15816 EOF
15817
15818                 BUILD_PASSWD=mod
15819                 BUILD_PASSWD_DYNAMIC=shared
15820                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15821         fi
15822 fi
15823
15824 if test "$ol_enable_shell" != no ; then
15825         cat >> confdefs.h <<\EOF
15826 #define SLAPD_SHELL 1
15827 EOF
15828
15829         BUILD_SLAPD=yes
15830         BUILD_SHELL=yes
15831         if test "$ol_with_shell_module" != static ; then
15832                 cat >> confdefs.h <<\EOF
15833 #define SLAPD_SHELL_DYNAMIC 1
15834 EOF
15835
15836                 BUILD_SHELL=mod
15837                 BUILD_SHELL_DYNAMIC=shared
15838                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15839         fi
15840 fi
15841
15842 if test "$ol_enable_sql" != no ; then
15843         cat >> confdefs.h <<\EOF
15844 #define SLAPD_SQL 1
15845 EOF
15846
15847         BUILD_SLAPD=yes
15848         BUILD_SQL=yes
15849         if test "$ol_with_sql_module" != static; then
15850                 cat >> confdefs.h <<\EOF
15851 #define SLAPD_SQL_DYNAMIC 1
15852 EOF
15853
15854                 BUILD_SQL=mod
15855                 BUILD_SQL_DYNAMIC=shared
15856                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15857         fi
15858 fi
15859
15860 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15861         $BUILD_SLAPD = yes ; then
15862         BUILD_SLURPD=yes
15863 fi
15864
15865
15866 if test "$LINK_BINS_DYNAMIC" = yes; then
15867     LIB_LINKAGE=DYN
15868     LT_LIB_LINKAGE=shared
15869 else
15870     LIB_LINKAGE=STAT
15871     LT_LIB_LINKAGE=static
15872 fi
15873
15874 if test "$ac_cv_mingw32" = yes ; then
15875     PLAT=NT
15876     DYN_EXT=dll
15877 else
15878     PLAT=UNIX
15879     DYN_EXT=so
15880 fi
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890   
15891   
15892   
15893   
15894   
15895   
15896   
15897   
15898   
15899   
15900   
15901   
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932 trap '' 1 2 15
15933
15934 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15935
15936 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15937 # Let make expand exec_prefix.
15938 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15939
15940 # Any assignment to VPATH causes Sun make to only execute
15941 # the first set of double-colon rules, so remove it if not needed.
15942 # If there is a colon in the path, we need to keep it.
15943 if test "x$srcdir" = x.; then
15944   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15945 fi
15946
15947 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15948
15949 DEFS=-DHAVE_CONFIG_H
15950
15951 # Without the "./", some shells look in PATH for config.status.
15952 : ${CONFIG_STATUS=./config.status}
15953
15954 echo creating $CONFIG_STATUS
15955 rm -f $CONFIG_STATUS
15956 cat > $CONFIG_STATUS <<EOF
15957 #! /bin/sh
15958 # Generated automatically by configure.
15959 # Run this file to recreate the current configuration.
15960 # This directory was configured as follows,
15961 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15962 #
15963 # $0 $ac_configure_args
15964 #
15965 # Compiler output produced by configure, useful for debugging
15966 # configure, is in ./config.log if it exists.
15967
15968 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15969 for ac_option
15970 do
15971   case "\$ac_option" in
15972   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15973     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15974     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15975   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15976     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15977     exit 0 ;;
15978   -help | --help | --hel | --he | --h)
15979     echo "\$ac_cs_usage"; exit 0 ;;
15980   *) echo "\$ac_cs_usage"; exit 1 ;;
15981   esac
15982 done
15983
15984 ac_given_srcdir=$srcdir
15985 ac_given_INSTALL="$INSTALL"
15986
15987 trap 'rm -fr `echo "\
15988 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15989 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15990 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15991 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15992 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15993 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15994 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15995 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15996 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15997 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15998 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15999 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16000 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16001 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16002 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16003 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16004 include/Makefile:build/top.mk:include/Makefile.in \
16005 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16006 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16007 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16008 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16009 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16010 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16011 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16012 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16013 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16014 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16015 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16016 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16017 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16018 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16019 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16020 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16021 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16022 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16023 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16024 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16025 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16026 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16027 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16028 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16029  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16030 EOF
16031 cat >> $CONFIG_STATUS <<EOF
16032
16033 # Protect against being on the right side of a sed subst in config.status.
16034 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16035  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16036 $ac_vpsub
16037 $extrasub
16038 s%@SHELL@%$SHELL%g
16039 s%@CFLAGS@%$CFLAGS%g
16040 s%@CPPFLAGS@%$CPPFLAGS%g
16041 s%@CXXFLAGS@%$CXXFLAGS%g
16042 s%@FFLAGS@%$FFLAGS%g
16043 s%@DEFS@%$DEFS%g
16044 s%@LDFLAGS@%$LDFLAGS%g
16045 s%@LIBS@%$LIBS%g
16046 s%@exec_prefix@%$exec_prefix%g
16047 s%@prefix@%$prefix%g
16048 s%@program_transform_name@%$program_transform_name%g
16049 s%@bindir@%$bindir%g
16050 s%@sbindir@%$sbindir%g
16051 s%@libexecdir@%$libexecdir%g
16052 s%@datadir@%$datadir%g
16053 s%@sysconfdir@%$sysconfdir%g
16054 s%@sharedstatedir@%$sharedstatedir%g
16055 s%@localstatedir@%$localstatedir%g
16056 s%@libdir@%$libdir%g
16057 s%@includedir@%$includedir%g
16058 s%@oldincludedir@%$oldincludedir%g
16059 s%@infodir@%$infodir%g
16060 s%@mandir@%$mandir%g
16061 s%@host@%$host%g
16062 s%@host_alias@%$host_alias%g
16063 s%@host_cpu@%$host_cpu%g
16064 s%@host_vendor@%$host_vendor%g
16065 s%@host_os@%$host_os%g
16066 s%@target@%$target%g
16067 s%@target_alias@%$target_alias%g
16068 s%@target_cpu@%$target_cpu%g
16069 s%@target_vendor@%$target_vendor%g
16070 s%@target_os@%$target_os%g
16071 s%@build@%$build%g
16072 s%@build_alias@%$build_alias%g
16073 s%@build_cpu@%$build_cpu%g
16074 s%@build_vendor@%$build_vendor%g
16075 s%@build_os@%$build_os%g
16076 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16077 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16078 s%@INSTALL_DATA@%$INSTALL_DATA%g
16079 s%@PACKAGE@%$PACKAGE%g
16080 s%@VERSION@%$VERSION%g
16081 s%@ACLOCAL@%$ACLOCAL%g
16082 s%@AUTOCONF@%$AUTOCONF%g
16083 s%@AUTOMAKE@%$AUTOMAKE%g
16084 s%@AUTOHEADER@%$AUTOHEADER%g
16085 s%@MAKEINFO@%$MAKEINFO%g
16086 s%@install_sh@%$install_sh%g
16087 s%@AMTAR@%$AMTAR%g
16088 s%@AWK@%$AWK%g
16089 s%@AMTARFLAGS@%$AMTARFLAGS%g
16090 s%@SET_MAKE@%$SET_MAKE%g
16091 s%@top_builddir@%$top_builddir%g
16092 s%@ldap_subdir@%$ldap_subdir%g
16093 s%@CC@%$CC%g
16094 s%@RANLIB@%$RANLIB%g
16095 s%@LN_S@%$LN_S%g
16096 s%@DLLTOOL@%$DLLTOOL%g
16097 s%@AS@%$AS%g
16098 s%@OBJDUMP@%$OBJDUMP%g
16099 s%@LIBTOOL@%$LIBTOOL%g
16100 s%@LN_H@%$LN_H%g
16101 s%@SENDMAIL@%$SENDMAIL%g
16102 s%@EDITOR@%$EDITOR%g
16103 s%@FINGER@%$FINGER%g
16104 s%@CPP@%$CPP%g
16105 s%@EXEEXT@%$EXEEXT%g
16106 s%@OBJEXT@%$OBJEXT%g
16107 s%@OL_MKDEP@%$OL_MKDEP%g
16108 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16109 s%@LIBOBJS@%$LIBOBJS%g
16110 s%@LIBSRCS@%$LIBSRCS%g
16111 s%@PLAT@%$PLAT%g
16112 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16113 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16114 s%@DYN_EXT@%$DYN_EXT%g
16115 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16116 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16117 s%@BUILD_LDAP@%$BUILD_LDAP%g
16118 s%@BUILD_LDBM@%$BUILD_LDBM%g
16119 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16120 s%@BUILD_SHELL@%$BUILD_SHELL%g
16121 s%@BUILD_SQL@%$BUILD_SQL%g
16122 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16123 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16124 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16125 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16126 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16127 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16128 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16129 s%@LDAP_LIBS@%$LDAP_LIBS%g
16130 s%@LDIF_LIBS@%$LDIF_LIBS%g
16131 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16132 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16133 s%@LDBM_LIBS@%$LDBM_LIBS%g
16134 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16135 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16136 s%@WRAP_LIBS@%$WRAP_LIBS%g
16137 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16138 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16139 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16140 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16141 s%@KRB4_LIBS@%$KRB4_LIBS%g
16142 s%@KRB5_LIBS@%$KRB5_LIBS%g
16143 s%@READLINE_LIBS@%$READLINE_LIBS%g
16144 s%@SASL_LIBS@%$SASL_LIBS%g
16145 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16146 s%@TLS_LIBS@%$TLS_LIBS%g
16147 s%@MODULES_LIBS@%$MODULES_LIBS%g
16148 s%@AUTH_LIBS@%$AUTH_LIBS%g
16149 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16150 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16151 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16152
16153 CEOF
16154 EOF
16155
16156 cat >> $CONFIG_STATUS <<\EOF
16157
16158 # Split the substitutions into bite-sized pieces for seds with
16159 # small command number limits, like on Digital OSF/1 and HP-UX.
16160 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16161 ac_file=1 # Number of current file.
16162 ac_beg=1 # First line for current file.
16163 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16164 ac_more_lines=:
16165 ac_sed_cmds=""
16166 while $ac_more_lines; do
16167   if test $ac_beg -gt 1; then
16168     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16169   else
16170     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16171   fi
16172   if test ! -s conftest.s$ac_file; then
16173     ac_more_lines=false
16174     rm -f conftest.s$ac_file
16175   else
16176     if test -z "$ac_sed_cmds"; then
16177       ac_sed_cmds="sed -f conftest.s$ac_file"
16178     else
16179       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16180     fi
16181     ac_file=`expr $ac_file + 1`
16182     ac_beg=$ac_end
16183     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16184   fi
16185 done
16186 if test -z "$ac_sed_cmds"; then
16187   ac_sed_cmds=cat
16188 fi
16189 EOF
16190
16191 cat >> $CONFIG_STATUS <<EOF
16192
16193 CONFIG_FILES=\${CONFIG_FILES-"\
16194 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16195 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16196 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16197 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16198 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16199 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16200 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16201 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16202 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16203 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16204 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16205 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16206 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16207 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16208 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16209 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16210 include/Makefile:build/top.mk:include/Makefile.in \
16211 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16212 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16213 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16214 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16215 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16216 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16217 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16218 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16219 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16220 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16221 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16222 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16223 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16224 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16225 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16226 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16227 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16228 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16229 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16230 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16231 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16232 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16233 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16234 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16235 "}
16236 EOF
16237 cat >> $CONFIG_STATUS <<\EOF
16238 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16239   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16240   case "$ac_file" in
16241   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16242        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16243   *) ac_file_in="${ac_file}.in" ;;
16244   esac
16245
16246   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16247
16248   # Remove last slash and all that follows it.  Not all systems have dirname.
16249   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16250   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16251     # The file is in a subdirectory.
16252     test ! -d "$ac_dir" && mkdir "$ac_dir"
16253     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16254     # A "../" for each directory in $ac_dir_suffix.
16255     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16256   else
16257     ac_dir_suffix= ac_dots=
16258   fi
16259
16260   case "$ac_given_srcdir" in
16261   .)  srcdir=.
16262       if test -z "$ac_dots"; then top_srcdir=.
16263       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16264   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16265   *) # Relative path.
16266     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16267     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16268   esac
16269
16270   case "$ac_given_INSTALL" in
16271   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16272   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16273   esac
16274
16275   echo creating "$ac_file"
16276   rm -f "$ac_file"
16277   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16278   case "$ac_file" in
16279   *[Mm]akefile*) ac_comsub="1i\\
16280 # $configure_input" ;;
16281   *) ac_comsub= ;;
16282   esac
16283
16284   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16285   sed -e "$ac_comsub
16286 s%@configure_input@%$configure_input%g
16287 s%@srcdir@%$srcdir%g
16288 s%@top_srcdir@%$top_srcdir%g
16289 s%@INSTALL@%$INSTALL%g
16290 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16291 fi; done
16292 rm -f conftest.s*
16293
16294 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16295 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16296 #
16297 # ac_d sets the value in "#define NAME VALUE" lines.
16298 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16299 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16300 ac_dC='\3'
16301 ac_dD='%g'
16302 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16303 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16304 ac_uB='\([      ]\)%\1#\2define\3'
16305 ac_uC=' '
16306 ac_uD='\4%g'
16307 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16308 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16309 ac_eB='$%\1#\2define\3'
16310 ac_eC=' '
16311 ac_eD='%g'
16312
16313 if test "${CONFIG_HEADERS+set}" != set; then
16314 EOF
16315 cat >> $CONFIG_STATUS <<EOF
16316   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16317 EOF
16318 cat >> $CONFIG_STATUS <<\EOF
16319 fi
16320 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16321   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16322   case "$ac_file" in
16323   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16324        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16325   *) ac_file_in="${ac_file}.in" ;;
16326   esac
16327
16328   echo creating $ac_file
16329
16330   rm -f conftest.frag conftest.in conftest.out
16331   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16332   cat $ac_file_inputs > conftest.in
16333
16334 EOF
16335
16336 # Transform confdefs.h into a sed script conftest.vals that substitutes
16337 # the proper values into config.h.in to produce config.h.  And first:
16338 # Protect against being on the right side of a sed subst in config.status.
16339 # Protect against being in an unquoted here document in config.status.
16340 rm -f conftest.vals
16341 cat > conftest.hdr <<\EOF
16342 s/[\\&%]/\\&/g
16343 s%[\\$`]%\\&%g
16344 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16345 s%ac_d%ac_u%gp
16346 s%ac_u%ac_e%gp
16347 EOF
16348 sed -n -f conftest.hdr confdefs.h > conftest.vals
16349 rm -f conftest.hdr
16350
16351 # This sed command replaces #undef with comments.  This is necessary, for
16352 # example, in the case of _POSIX_SOURCE, which is predefined and required
16353 # on some systems where configure will not decide to define it.
16354 cat >> conftest.vals <<\EOF
16355 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16356 EOF
16357
16358 # Break up conftest.vals because some shells have a limit on
16359 # the size of here documents, and old seds have small limits too.
16360
16361 rm -f conftest.tail
16362 while :
16363 do
16364   ac_lines=`grep -c . conftest.vals`
16365   # grep -c gives empty output for an empty file on some AIX systems.
16366   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16367   # Write a limited-size here document to conftest.frag.
16368   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16369   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16370   echo 'CEOF
16371   sed -f conftest.frag conftest.in > conftest.out
16372   rm -f conftest.in
16373   mv conftest.out conftest.in
16374 ' >> $CONFIG_STATUS
16375   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16376   rm -f conftest.vals
16377   mv conftest.tail conftest.vals
16378 done
16379 rm -f conftest.vals
16380
16381 cat >> $CONFIG_STATUS <<\EOF
16382   rm -f conftest.frag conftest.h
16383   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16384   cat conftest.in >> conftest.h
16385   rm -f conftest.in
16386   if cmp -s $ac_file conftest.h 2>/dev/null; then
16387     echo "$ac_file is unchanged"
16388     rm -f conftest.h
16389   else
16390     # Remove last slash and all that follows it.  Not all systems have dirname.
16391       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16392       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16393       # The file is in a subdirectory.
16394       test ! -d "$ac_dir" && mkdir "$ac_dir"
16395     fi
16396     rm -f $ac_file
16397     mv conftest.h $ac_file
16398   fi
16399 fi; done
16400
16401 EOF
16402 cat >> $CONFIG_STATUS <<EOF
16403
16404 EOF
16405 cat >> $CONFIG_STATUS <<\EOF
16406
16407 date > stamp-h
16408 echo Please \"make depend\" to build dependencies
16409
16410 exit 0
16411 EOF
16412 chmod +x $CONFIG_STATUS
16413 rm -fr confdefs* $ac_clean_files
16414 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16415