]> git.sur5r.net Git - openldap/blob - configure
Last minute LDIF empty value bug fix
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP 
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         { echo "configure: error: modules not supported in this version of OpenLDAP" 1>&2; exit 1; }
3940
3941         for ac_hdr in ltdl.h
3942 do
3943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3945 echo "configure:3946: checking for $ac_hdr" >&5
3946 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952 #include <$ac_hdr>
3953 EOF
3954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3955 { (eval echo configure:3956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3957 if test -z "$ac_err"; then
3958   rm -rf conftest*
3959   eval "ac_cv_header_$ac_safe=yes"
3960 else
3961   echo "$ac_err" >&5
3962   echo "configure: failed program was:" >&5
3963   cat conftest.$ac_ext >&5
3964   rm -rf conftest*
3965   eval "ac_cv_header_$ac_safe=no"
3966 fi
3967 rm -f conftest*
3968 fi
3969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3970   echo "$ac_t""yes" 1>&6
3971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3972   cat >> confdefs.h <<EOF
3973 #define $ac_tr_hdr 1
3974 EOF
3975  
3976 else
3977   echo "$ac_t""no" 1>&6
3978 fi
3979 done
3980
3981
3982         if test $ac_cv_header_ltdl_h = no ; then
3983                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3984         fi
3985
3986         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3987 echo "configure:3988: checking for lt_dlinit in -lltdl" >&5
3988 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3990   echo $ac_n "(cached) $ac_c" 1>&6
3991 else
3992   ac_save_LIBS="$LIBS"
3993 LIBS="-lltdl  $LIBS"
3994 cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997 /* Override any gcc2 internal prototype to avoid an error.  */
3998 /* We use char because int might match the return type of a gcc2
3999     builtin and then its argument prototype would still apply.  */
4000 char lt_dlinit();
4001
4002 int main() {
4003 lt_dlinit()
4004 ; return 0; }
4005 EOF
4006 if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4007   rm -rf conftest*
4008   eval "ac_cv_lib_$ac_lib_var=yes"
4009 else
4010   echo "configure: failed program was:" >&5
4011   cat conftest.$ac_ext >&5
4012   rm -rf conftest*
4013   eval "ac_cv_lib_$ac_lib_var=no"
4014 fi
4015 rm -f conftest*
4016 LIBS="$ac_save_LIBS"
4017
4018 fi
4019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4020   echo "$ac_t""yes" 1>&6
4021   
4022             MODULES_LIBS=-lltdl
4023             cat >> confdefs.h <<\EOF
4024 #define HAVE_LIBLTDL 1
4025 EOF
4026
4027         
4028 else
4029   echo "$ac_t""no" 1>&6
4030 fi
4031
4032
4033         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4034                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4035         fi
4036         ol_link_modules=yes
4037 else
4038         ol_with_dnssrv_module=static
4039         ol_with_ldap_module=static
4040         ol_with_ldbm_module=static
4041         ol_with_passwd_module=static
4042         ol_with_shell_module=static
4043         ol_with_sql_module=static
4044 fi
4045
4046 # test for EBCDIC
4047 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4048 echo "configure:4049: checking for EBCDIC" >&5
4049 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4050   echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052   
4053         cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056
4057 #if !('M' == 0xd4)
4058 #include <__ASCII__/generate_error.h>
4059 #endif
4060
4061 EOF
4062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4063 { (eval echo configure:4064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4065 if test -z "$ac_err"; then
4066   rm -rf conftest*
4067   ol_cv_cpp_ebcdic=yes
4068 else
4069   echo "$ac_err" >&5
4070   echo "configure: failed program was:" >&5
4071   cat conftest.$ac_ext >&5
4072   rm -rf conftest*
4073   ol_cv_cpp_ebcdic=no
4074 fi
4075 rm -f conftest*
4076 fi
4077
4078 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4079 if test $ol_cv_cpp_ebcdic = yes ; then
4080         cat >> confdefs.h <<\EOF
4081 #define HAVE_EBCDIC 1
4082 EOF
4083
4084 fi
4085
4086 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4087 echo "configure:4088: checking for ANSI C header files" >&5
4088 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4089   echo $ac_n "(cached) $ac_c" 1>&6
4090 else
4091   cat > conftest.$ac_ext <<EOF
4092 #line 4093 "configure"
4093 #include "confdefs.h"
4094 #include <stdlib.h>
4095 #include <stdarg.h>
4096 #include <string.h>
4097 #include <float.h>
4098 EOF
4099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4100 { (eval echo configure:4101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4102 if test -z "$ac_err"; then
4103   rm -rf conftest*
4104   ol_cv_header_stdc=yes
4105 else
4106   echo "$ac_err" >&5
4107   echo "configure: failed program was:" >&5
4108   cat conftest.$ac_ext >&5
4109   rm -rf conftest*
4110   ol_cv_header_stdc=no
4111 fi
4112 rm -f conftest*
4113
4114 if test $ol_cv_header_stdc = yes; then
4115   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4116 cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 #include <string.h>
4120 EOF
4121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4122   egrep "memchr" >/dev/null 2>&1; then
4123   :
4124 else
4125   rm -rf conftest*
4126   ol_cv_header_stdc=no
4127 fi
4128 rm -f conftest*
4129
4130 fi
4131
4132 if test $ol_cv_header_stdc = yes; then
4133   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4134 cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 #include <stdlib.h>
4138 EOF
4139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4140   egrep "free" >/dev/null 2>&1; then
4141   :
4142 else
4143   rm -rf conftest*
4144   ol_cv_header_stdc=no
4145 fi
4146 rm -f conftest*
4147
4148 fi
4149
4150 if test $ol_cv_header_stdc = yes; then
4151   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4152 if test "$cross_compiling" = yes; then
4153   :
4154 else
4155   cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <ctype.h>
4159 #ifndef HAVE_EBCDIC
4160 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4161 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4162 #else
4163 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4164                 || ('j' <= (c) && (c) <= 'r') \
4165                 || ('s' <= (c) && (c) <= 'z'))
4166 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4167 #endif
4168 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4169 int main () { int i; for (i = 0; i < 256; i++)
4170 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4171 exit (0); }
4172
4173 EOF
4174 if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4175 then
4176   :
4177 else
4178   echo "configure: failed program was:" >&5
4179   cat conftest.$ac_ext >&5
4180   rm -fr conftest*
4181   ol_cv_header_stdc=no
4182 fi
4183 rm -fr conftest*
4184 fi
4185
4186 fi
4187 fi
4188
4189 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4190 if test $ol_cv_header_stdc = yes; then
4191   cat >> confdefs.h <<\EOF
4192 #define STDC_HEADERS 1
4193 EOF
4194
4195 fi
4196 ac_cv_header_stdc=disable
4197
4198
4199 if test $ol_cv_header_stdc != yes; then
4200         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4201 fi
4202
4203 ac_header_dirent=no
4204 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4205 do
4206 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4207 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4208 echo "configure:4209: checking for $ac_hdr that defines DIR" >&5
4209 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4210   echo $ac_n "(cached) $ac_c" 1>&6
4211 else
4212   cat > conftest.$ac_ext <<EOF
4213 #line 4214 "configure"
4214 #include "confdefs.h"
4215 #include <sys/types.h>
4216 #include <$ac_hdr>
4217 int main() {
4218 DIR *dirp = 0;
4219 ; return 0; }
4220 EOF
4221 if { (eval echo configure:4222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4222   rm -rf conftest*
4223   eval "ac_cv_header_dirent_$ac_safe=yes"
4224 else
4225   echo "configure: failed program was:" >&5
4226   cat conftest.$ac_ext >&5
4227   rm -rf conftest*
4228   eval "ac_cv_header_dirent_$ac_safe=no"
4229 fi
4230 rm -f conftest*
4231 fi
4232 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4233   echo "$ac_t""yes" 1>&6
4234     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4235   cat >> confdefs.h <<EOF
4236 #define $ac_tr_hdr 1
4237 EOF
4238  ac_header_dirent=$ac_hdr; break
4239 else
4240   echo "$ac_t""no" 1>&6
4241 fi
4242 done
4243 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4244 if test $ac_header_dirent = dirent.h; then
4245 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4246 echo "configure:4247: checking for opendir in -ldir" >&5
4247 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4248 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4249   echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251   ac_save_LIBS="$LIBS"
4252 LIBS="-ldir  $LIBS"
4253 cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 /* Override any gcc2 internal prototype to avoid an error.  */
4257 /* We use char because int might match the return type of a gcc2
4258     builtin and then its argument prototype would still apply.  */
4259 char opendir();
4260
4261 int main() {
4262 opendir()
4263 ; return 0; }
4264 EOF
4265 if { (eval echo configure:4266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4266   rm -rf conftest*
4267   eval "ac_cv_lib_$ac_lib_var=yes"
4268 else
4269   echo "configure: failed program was:" >&5
4270   cat conftest.$ac_ext >&5
4271   rm -rf conftest*
4272   eval "ac_cv_lib_$ac_lib_var=no"
4273 fi
4274 rm -f conftest*
4275 LIBS="$ac_save_LIBS"
4276
4277 fi
4278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4279   echo "$ac_t""yes" 1>&6
4280   LIBS="$LIBS -ldir"
4281 else
4282   echo "$ac_t""no" 1>&6
4283 fi
4284
4285 else
4286 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4287 echo "configure:4288: checking for opendir in -lx" >&5
4288 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4289 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4290   echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292   ac_save_LIBS="$LIBS"
4293 LIBS="-lx  $LIBS"
4294 cat > conftest.$ac_ext <<EOF
4295 #line 4296 "configure"
4296 #include "confdefs.h"
4297 /* Override any gcc2 internal prototype to avoid an error.  */
4298 /* We use char because int might match the return type of a gcc2
4299     builtin and then its argument prototype would still apply.  */
4300 char opendir();
4301
4302 int main() {
4303 opendir()
4304 ; return 0; }
4305 EOF
4306 if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4307   rm -rf conftest*
4308   eval "ac_cv_lib_$ac_lib_var=yes"
4309 else
4310   echo "configure: failed program was:" >&5
4311   cat conftest.$ac_ext >&5
4312   rm -rf conftest*
4313   eval "ac_cv_lib_$ac_lib_var=no"
4314 fi
4315 rm -f conftest*
4316 LIBS="$ac_save_LIBS"
4317
4318 fi
4319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4320   echo "$ac_t""yes" 1>&6
4321   LIBS="$LIBS -lx"
4322 else
4323   echo "$ac_t""no" 1>&6
4324 fi
4325
4326 fi
4327
4328 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4329 echo "configure:4330: checking for sys/wait.h that is POSIX.1 compatible" >&5
4330 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4331   echo $ac_n "(cached) $ac_c" 1>&6
4332 else
4333   cat > conftest.$ac_ext <<EOF
4334 #line 4335 "configure"
4335 #include "confdefs.h"
4336 #include <sys/types.h>
4337 #include <sys/wait.h>
4338 #ifndef WEXITSTATUS
4339 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4340 #endif
4341 #ifndef WIFEXITED
4342 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4343 #endif
4344 int main() {
4345 int s;
4346 wait (&s);
4347 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4348 ; return 0; }
4349 EOF
4350 if { (eval echo configure:4351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4351   rm -rf conftest*
4352   ac_cv_header_sys_wait_h=yes
4353 else
4354   echo "configure: failed program was:" >&5
4355   cat conftest.$ac_ext >&5
4356   rm -rf conftest*
4357   ac_cv_header_sys_wait_h=no
4358 fi
4359 rm -f conftest*
4360 fi
4361
4362 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4363 if test $ac_cv_header_sys_wait_h = yes; then
4364   cat >> confdefs.h <<\EOF
4365 #define HAVE_SYS_WAIT_H 1
4366 EOF
4367
4368 fi
4369
4370 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4371 echo "configure:4372: checking POSIX termios" >&5
4372 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4373   echo $ac_n "(cached) $ac_c" 1>&6
4374 else
4375   cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378 #include <sys/types.h>
4379 #include <unistd.h>
4380 #include <termios.h>
4381 int main() {
4382 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4383    tcgetattr(0, 0);
4384 ; return 0; }
4385 EOF
4386 if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4387   rm -rf conftest*
4388   am_cv_sys_posix_termios=yes
4389 else
4390   echo "configure: failed program was:" >&5
4391   cat conftest.$ac_ext >&5
4392   rm -rf conftest*
4393   am_cv_sys_posix_termios=no
4394 fi
4395 rm -f conftest*
4396 fi
4397
4398 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4399
4400
4401  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4402 echo "configure:4403: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4403 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4404   echo $ac_n "(cached) $ac_c" 1>&6
4405 else
4406   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4407
4408   gwinsz_in_termios_h=no
4409   if test $am_cv_sys_posix_termios = yes; then
4410     cat > conftest.$ac_ext <<EOF
4411 #line 4412 "configure"
4412 #include "confdefs.h"
4413 #include <sys/types.h>
4414 #     include <termios.h>
4415 #     ifdef TIOCGWINSZ
4416         yes
4417 #     endif
4418     
4419 EOF
4420 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4421   egrep "yes" >/dev/null 2>&1; then
4422   rm -rf conftest*
4423   gwinsz_in_termios_h=yes
4424 fi
4425 rm -f conftest*
4426
4427   fi
4428
4429   if test $gwinsz_in_termios_h = no; then
4430     cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433 #include <sys/types.h>
4434 #     include <sys/ioctl.h>
4435 #     ifdef TIOCGWINSZ
4436         yes
4437 #     endif
4438     
4439 EOF
4440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4441   egrep "yes" >/dev/null 2>&1; then
4442   rm -rf conftest*
4443   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4444 fi
4445 rm -f conftest*
4446
4447   fi
4448   
4449 fi
4450
4451 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4452   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4453     cat >> confdefs.h <<\EOF
4454 #define GWINSZ_IN_SYS_IOCTL 1
4455 EOF
4456
4457   fi
4458
4459 if test $am_cv_sys_posix_termios = yes ; then
4460         cat >> confdefs.h <<\EOF
4461 #define HAVE_POSIX_TERMIOS 1
4462 EOF
4463
4464 fi
4465
4466 for ac_hdr in \
4467         arpa/inet.h             \
4468         arpa/nameser.h  \
4469         assert.h                \
4470         conio.h                 \
4471         crypt.h                 \
4472         direct.h                \
4473         errno.h                 \
4474         fcntl.h                 \
4475         filio.h                 \
4476         getopt.h                \
4477         grp.h                   \
4478         io.h                    \
4479         libutil.h               \
4480         limits.h                \
4481         locale.h                \
4482         netinet/tcp.h   \
4483         malloc.h                \
4484         memory.h                \
4485         psap.h                  \
4486         pwd.h                   \
4487         process.h               \
4488         resolv.h                \
4489         sgtty.h                 \
4490         shadow.h                \
4491         stddef.h                \
4492         string.h                \
4493         strings.h               \
4494         sysexits.h              \
4495         sys/file.h              \
4496         sys/filio.h             \
4497         sys/errno.h             \
4498         sys/ioctl.h             \
4499         sys/param.h             \
4500         sys/resource.h  \
4501         sys/select.h    \
4502         sys/socket.h    \
4503         sys/syslog.h    \
4504         sys/time.h              \
4505         sys/types.h             \
4506         syslog.h                \
4507         termios.h               \
4508         unistd.h                \
4509         winsock.h               \
4510
4511 do
4512 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4513 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4514 echo "configure:4515: checking for $ac_hdr" >&5
4515 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4516   echo $ac_n "(cached) $ac_c" 1>&6
4517 else
4518   cat > conftest.$ac_ext <<EOF
4519 #line 4520 "configure"
4520 #include "confdefs.h"
4521 #include <$ac_hdr>
4522 EOF
4523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4524 { (eval echo configure:4525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4526 if test -z "$ac_err"; then
4527   rm -rf conftest*
4528   eval "ac_cv_header_$ac_safe=yes"
4529 else
4530   echo "$ac_err" >&5
4531   echo "configure: failed program was:" >&5
4532   cat conftest.$ac_ext >&5
4533   rm -rf conftest*
4534   eval "ac_cv_header_$ac_safe=no"
4535 fi
4536 rm -f conftest*
4537 fi
4538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4539   echo "$ac_t""yes" 1>&6
4540     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4541   cat >> confdefs.h <<EOF
4542 #define $ac_tr_hdr 1
4543 EOF
4544  
4545 else
4546   echo "$ac_t""no" 1>&6
4547 fi
4548 done
4549
4550
4551
4552
4553 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4554 echo "configure:4555: checking for sigset in -lV3" >&5
4555 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4557   echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559   ac_save_LIBS="$LIBS"
4560 LIBS="-lV3  $LIBS"
4561 cat > conftest.$ac_ext <<EOF
4562 #line 4563 "configure"
4563 #include "confdefs.h"
4564 /* Override any gcc2 internal prototype to avoid an error.  */
4565 /* We use char because int might match the return type of a gcc2
4566     builtin and then its argument prototype would still apply.  */
4567 char sigset();
4568
4569 int main() {
4570 sigset()
4571 ; return 0; }
4572 EOF
4573 if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4574   rm -rf conftest*
4575   eval "ac_cv_lib_$ac_lib_var=yes"
4576 else
4577   echo "configure: failed program was:" >&5
4578   cat conftest.$ac_ext >&5
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=no"
4581 fi
4582 rm -f conftest*
4583 LIBS="$ac_save_LIBS"
4584
4585 fi
4586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4587   echo "$ac_t""yes" 1>&6
4588     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4589     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4590   cat >> confdefs.h <<EOF
4591 #define $ac_tr_lib 1
4592 EOF
4593
4594   LIBS="-lV3 $LIBS"
4595
4596 else
4597   echo "$ac_t""no" 1>&6
4598 fi
4599
4600
4601 if test $ac_cv_header_winsock_h = yes; then
4602         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4603 echo "configure:4604: checking for winsock" >&5
4604 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607   cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 #include <winsock.h>
4611 int main() {
4612
4613                         socket(0,0,0);
4614                         select(0,NULL,NULL,NULL,NULL);
4615                         closesocket(0);
4616                         gethostname(NULL,0);
4617         
4618 ; return 0; }
4619 EOF
4620 if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4621   rm -rf conftest*
4622   ol_cv_winsock=yes
4623 else
4624   echo "configure: failed program was:" >&5
4625   cat conftest.$ac_ext >&5
4626   rm -rf conftest*
4627   ol_cv_winsock=no
4628 fi
4629 rm -f conftest*]
4630 fi
4631
4632 echo "$ac_t""$ol_cv_winsock" 1>&6
4633
4634         if test $ol_cv_winsock = yes ; then
4635                 cat >> confdefs.h <<\EOF
4636 #define HAVE_WINSOCK 1
4637 EOF
4638
4639                 ac_cv_func_socket=yes
4640                 ac_cv_func_select=yes
4641                 ac_cv_func_closesocket=yes
4642                 ac_cv_func_gethostname=yes
4643         fi
4644 fi
4645
4646
4647 echo $ac_n "checking for socket""... $ac_c" 1>&6
4648 echo "configure:4649: checking for socket" >&5
4649 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4650   echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652   cat > conftest.$ac_ext <<EOF
4653 #line 4654 "configure"
4654 #include "confdefs.h"
4655 /* System header to define __stub macros and hopefully few prototypes,
4656     which can conflict with char socket(); below.  */
4657 #include <assert.h>
4658 /* Override any gcc2 internal prototype to avoid an error.  */
4659 /* We use char because int might match the return type of a gcc2
4660     builtin and then its argument prototype would still apply.  */
4661 char socket();
4662 char (*f)();
4663
4664 int main() {
4665
4666 /* The GNU C library defines this for functions which it implements
4667     to always fail with ENOSYS.  Some functions are actually named
4668     something starting with __ and the normal name is an alias.  */
4669 #if defined (__stub_socket) || defined (__stub___socket)
4670 choke me
4671 #else
4672 f = socket;
4673 #endif
4674
4675 ; return 0; }
4676 EOF
4677 if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4678   rm -rf conftest*
4679   eval "ac_cv_func_socket=yes"
4680 else
4681   echo "configure: failed program was:" >&5
4682   cat conftest.$ac_ext >&5
4683   rm -rf conftest*
4684   eval "ac_cv_func_socket=no"
4685 fi
4686 rm -f conftest*
4687 fi
4688
4689 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4690   echo "$ac_t""yes" 1>&6
4691   :
4692 else
4693   echo "$ac_t""no" 1>&6
4694         
4695         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4696 echo "configure:4697: checking for main in -lsocket" >&5
4697 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4698 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4699   echo $ac_n "(cached) $ac_c" 1>&6
4700 else
4701   ac_save_LIBS="$LIBS"
4702 LIBS="-lsocket  $LIBS"
4703 cat > conftest.$ac_ext <<EOF
4704 #line 4705 "configure"
4705 #include "confdefs.h"
4706
4707 int main() {
4708 main()
4709 ; return 0; }
4710 EOF
4711 if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4712   rm -rf conftest*
4713   eval "ac_cv_lib_$ac_lib_var=yes"
4714 else
4715   echo "configure: failed program was:" >&5
4716   cat conftest.$ac_ext >&5
4717   rm -rf conftest*
4718   eval "ac_cv_lib_$ac_lib_var=no"
4719 fi
4720 rm -f conftest*
4721 LIBS="$ac_save_LIBS"
4722
4723 fi
4724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4725   echo "$ac_t""yes" 1>&6
4726     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4727     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4728   cat >> confdefs.h <<EOF
4729 #define $ac_tr_lib 1
4730 EOF
4731
4732   LIBS="-lsocket $LIBS"
4733
4734 else
4735   echo "$ac_t""no" 1>&6
4736 fi
4737
4738         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4739 echo "configure:4740: checking for main in -lnet" >&5
4740 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4741 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4742   echo $ac_n "(cached) $ac_c" 1>&6
4743 else
4744   ac_save_LIBS="$LIBS"
4745 LIBS="-lnet  $LIBS"
4746 cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4749
4750 int main() {
4751 main()
4752 ; return 0; }
4753 EOF
4754 if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4755   rm -rf conftest*
4756   eval "ac_cv_lib_$ac_lib_var=yes"
4757 else
4758   echo "configure: failed program was:" >&5
4759   cat conftest.$ac_ext >&5
4760   rm -rf conftest*
4761   eval "ac_cv_lib_$ac_lib_var=no"
4762 fi
4763 rm -f conftest*
4764 LIBS="$ac_save_LIBS"
4765
4766 fi
4767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4768   echo "$ac_t""yes" 1>&6
4769     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4770     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4771   cat >> confdefs.h <<EOF
4772 #define $ac_tr_lib 1
4773 EOF
4774
4775   LIBS="-lnet $LIBS"
4776
4777 else
4778   echo "$ac_t""no" 1>&6
4779 fi
4780
4781         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4782 echo "configure:4783: checking for main in -lnsl_s" >&5
4783 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4784 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   ac_save_LIBS="$LIBS"
4788 LIBS="-lnsl_s  $LIBS"
4789 cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4792
4793 int main() {
4794 main()
4795 ; return 0; }
4796 EOF
4797 if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4798   rm -rf conftest*
4799   eval "ac_cv_lib_$ac_lib_var=yes"
4800 else
4801   echo "configure: failed program was:" >&5
4802   cat conftest.$ac_ext >&5
4803   rm -rf conftest*
4804   eval "ac_cv_lib_$ac_lib_var=no"
4805 fi
4806 rm -f conftest*
4807 LIBS="$ac_save_LIBS"
4808
4809 fi
4810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4813     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4814   cat >> confdefs.h <<EOF
4815 #define $ac_tr_lib 1
4816 EOF
4817
4818   LIBS="-lnsl_s $LIBS"
4819
4820 else
4821   echo "$ac_t""no" 1>&6
4822 fi
4823
4824         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4825 echo "configure:4826: checking for main in -lnsl" >&5
4826 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4827 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4828   echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830   ac_save_LIBS="$LIBS"
4831 LIBS="-lnsl  $LIBS"
4832 cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835
4836 int main() {
4837 main()
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   eval "ac_cv_lib_$ac_lib_var=yes"
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   eval "ac_cv_lib_$ac_lib_var=no"
4848 fi
4849 rm -f conftest*
4850 LIBS="$ac_save_LIBS"
4851
4852 fi
4853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4854   echo "$ac_t""yes" 1>&6
4855     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4856     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4857   cat >> confdefs.h <<EOF
4858 #define $ac_tr_lib 1
4859 EOF
4860
4861   LIBS="-lnsl $LIBS"
4862
4863 else
4864   echo "$ac_t""no" 1>&6
4865 fi
4866
4867         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4868 echo "configure:4869: checking for socket in -linet" >&5
4869 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4870 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   ac_save_LIBS="$LIBS"
4874 LIBS="-linet  $LIBS"
4875 cat > conftest.$ac_ext <<EOF
4876 #line 4877 "configure"
4877 #include "confdefs.h"
4878 /* Override any gcc2 internal prototype to avoid an error.  */
4879 /* We use char because int might match the return type of a gcc2
4880     builtin and then its argument prototype would still apply.  */
4881 char socket();
4882
4883 int main() {
4884 socket()
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888   rm -rf conftest*
4889   eval "ac_cv_lib_$ac_lib_var=yes"
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   eval "ac_cv_lib_$ac_lib_var=no"
4895 fi
4896 rm -f conftest*
4897 LIBS="$ac_save_LIBS"
4898
4899 fi
4900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4901   echo "$ac_t""yes" 1>&6
4902     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4903     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4904   cat >> confdefs.h <<EOF
4905 #define $ac_tr_lib 1
4906 EOF
4907
4908   LIBS="-linet $LIBS"
4909
4910 else
4911   echo "$ac_t""no" 1>&6
4912 fi
4913
4914         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4915 echo "configure:4916: checking for main in -lgen" >&5
4916 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4917 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4918   echo $ac_n "(cached) $ac_c" 1>&6
4919 else
4920   ac_save_LIBS="$LIBS"
4921 LIBS="-lgen  $LIBS"
4922 cat > conftest.$ac_ext <<EOF
4923 #line 4924 "configure"
4924 #include "confdefs.h"
4925
4926 int main() {
4927 main()
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=yes"
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   eval "ac_cv_lib_$ac_lib_var=no"
4938 fi
4939 rm -f conftest*
4940 LIBS="$ac_save_LIBS"
4941
4942 fi
4943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4944   echo "$ac_t""yes" 1>&6
4945     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4946     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4947   cat >> confdefs.h <<EOF
4948 #define $ac_tr_lib 1
4949 EOF
4950
4951   LIBS="-lgen $LIBS"
4952
4953 else
4954   echo "$ac_t""no" 1>&6
4955 fi
4956
4957
4958 fi
4959
4960
4961 echo $ac_n "checking for select""... $ac_c" 1>&6
4962 echo "configure:4963: checking for select" >&5
4963 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4964   echo $ac_n "(cached) $ac_c" 1>&6
4965 else
4966   cat > conftest.$ac_ext <<EOF
4967 #line 4968 "configure"
4968 #include "confdefs.h"
4969 /* System header to define __stub macros and hopefully few prototypes,
4970     which can conflict with char select(); below.  */
4971 #include <assert.h>
4972 /* Override any gcc2 internal prototype to avoid an error.  */
4973 /* We use char because int might match the return type of a gcc2
4974     builtin and then its argument prototype would still apply.  */
4975 char select();
4976 char (*f)();
4977
4978 int main() {
4979
4980 /* The GNU C library defines this for functions which it implements
4981     to always fail with ENOSYS.  Some functions are actually named
4982     something starting with __ and the normal name is an alias.  */
4983 #if defined (__stub_select) || defined (__stub___select)
4984 choke me
4985 #else
4986 f = select;
4987 #endif
4988
4989 ; return 0; }
4990 EOF
4991 if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4992   rm -rf conftest*
4993   eval "ac_cv_func_select=yes"
4994 else
4995   echo "configure: failed program was:" >&5
4996   cat conftest.$ac_ext >&5
4997   rm -rf conftest*
4998   eval "ac_cv_func_select=no"
4999 fi
5000 rm -f conftest*
5001 fi
5002
5003 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5004   echo "$ac_t""yes" 1>&6
5005   :
5006 else
5007   echo "$ac_t""no" 1>&6
5008 { echo "configure: error: select() required." 1>&2; exit 1; }
5009 fi
5010
5011
5012 if test "${ac_cv_header_winsock_h}" != yes; then
5013                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5014 echo "configure:5015: checking types of arguments for select()" >&5
5015  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5016   echo $ac_n "(cached) $ac_c" 1>&6
5017 else
5018    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5019   echo $ac_n "(cached) $ac_c" 1>&6
5020 else
5021     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5022   echo $ac_n "(cached) $ac_c" 1>&6
5023 else
5024      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5025      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5026       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5027        cat > conftest.$ac_ext <<EOF
5028 #line 5029 "configure"
5029 #include "confdefs.h"
5030 #ifdef HAVE_SYS_TYPES_H
5031 #include <sys/types.h>
5032 #endif
5033 #ifdef HAVE_SYS_TIME_H
5034 #include <sys/time.h>
5035 #endif
5036 #ifdef HAVE_SYS_SELECT_H
5037 #include <sys/select.h>
5038 #endif
5039 #ifdef HAVE_SYS_SOCKET_H
5040 #include <sys/socket.h>
5041 #endif
5042 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);
5043 int main() {
5044
5045 ; return 0; }
5046 EOF
5047 if { (eval echo configure:5048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5048   rm -rf conftest*
5049           ac_not_found=no ; break 3
5050 else
5051   echo "configure: failed program was:" >&5
5052   cat conftest.$ac_ext >&5
5053   rm -rf conftest*
5054   ac_not_found=yes
5055 fi
5056 rm -f conftest*
5057       done
5058      done
5059     done
5060    
5061 fi
5062   
5063 fi
5064  
5065 fi
5066  if test "$ac_not_found" = yes; then
5067   ac_cv_func_select_arg1=int 
5068   ac_cv_func_select_arg234='int *' 
5069   ac_cv_func_select_arg5='struct timeval *'
5070  fi
5071  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5072  cat >> confdefs.h <<EOF
5073 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5074 EOF
5075
5076  cat >> confdefs.h <<EOF
5077 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5078 EOF
5079
5080  cat >> confdefs.h <<EOF
5081 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5082 EOF
5083
5084
5085 fi
5086
5087
5088 for ac_hdr in regex.h 
5089 do
5090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5092 echo "configure:5093: checking for $ac_hdr" >&5
5093 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099 #include <$ac_hdr>
5100 EOF
5101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5102 { (eval echo configure:5103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5104 if test -z "$ac_err"; then
5105   rm -rf conftest*
5106   eval "ac_cv_header_$ac_safe=yes"
5107 else
5108   echo "$ac_err" >&5
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111   rm -rf conftest*
5112   eval "ac_cv_header_$ac_safe=no"
5113 fi
5114 rm -f conftest*
5115 fi
5116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5117   echo "$ac_t""yes" 1>&6
5118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5119   cat >> confdefs.h <<EOF
5120 #define $ac_tr_hdr 1
5121 EOF
5122  
5123 else
5124   echo "$ac_t""no" 1>&6
5125 fi
5126 done
5127
5128 if test "$ac_cv_header_regex_h" != yes ; then
5129         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5130 fi
5131 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5132 echo "configure:5133: checking for regfree" >&5
5133 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5134   echo $ac_n "(cached) $ac_c" 1>&6
5135 else
5136   cat > conftest.$ac_ext <<EOF
5137 #line 5138 "configure"
5138 #include "confdefs.h"
5139 /* System header to define __stub macros and hopefully few prototypes,
5140     which can conflict with char regfree(); below.  */
5141 #include <assert.h>
5142 /* Override any gcc2 internal prototype to avoid an error.  */
5143 /* We use char because int might match the return type of a gcc2
5144     builtin and then its argument prototype would still apply.  */
5145 char regfree();
5146 char (*f)();
5147
5148 int main() {
5149
5150 /* The GNU C library defines this for functions which it implements
5151     to always fail with ENOSYS.  Some functions are actually named
5152     something starting with __ and the normal name is an alias.  */
5153 #if defined (__stub_regfree) || defined (__stub___regfree)
5154 choke me
5155 #else
5156 f = regfree;
5157 #endif
5158
5159 ; return 0; }
5160 EOF
5161 if { (eval echo configure:5162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5162   rm -rf conftest*
5163   eval "ac_cv_func_regfree=yes"
5164 else
5165   echo "configure: failed program was:" >&5
5166   cat conftest.$ac_ext >&5
5167   rm -rf conftest*
5168   eval "ac_cv_func_regfree=no"
5169 fi
5170 rm -f conftest*
5171 fi
5172
5173 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5174   echo "$ac_t""yes" 1>&6
5175   :
5176 else
5177   echo "$ac_t""no" 1>&6
5178 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5179 fi
5180
5181
5182
5183 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5184 echo "configure:5185: checking for compatible POSIX regex" >&5
5185 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5186   echo $ac_n "(cached) $ac_c" 1>&6
5187 else
5188   
5189         if test "$cross_compiling" = yes; then
5190   ol_cv_c_posix_regex=cross
5191 else
5192   cat > conftest.$ac_ext <<EOF
5193 #line 5194 "configure"
5194 #include "confdefs.h"
5195
5196 #include <sys/types.h>
5197 #include <regex.h>
5198 static char *pattern, *string;
5199 main()
5200 {
5201         int rc;
5202         regex_t re;
5203
5204         pattern = "^A";
5205
5206         if(regcomp(&re, pattern, 0)) {
5207                 return -1;
5208         }
5209         
5210         string = "ALL MATCH";
5211         
5212         rc = regexec(&re, string, 0, (void*)0, 0);
5213
5214         regfree(&re);
5215
5216         return rc;
5217 }
5218 EOF
5219 if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5220 then
5221   ol_cv_c_posix_regex=yes
5222 else
5223   echo "configure: failed program was:" >&5
5224   cat conftest.$ac_ext >&5
5225   rm -fr conftest*
5226   ol_cv_c_posix_regex=no
5227 fi
5228 rm -fr conftest*
5229 fi
5230
5231 fi
5232
5233 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5234
5235 if test "$ol_cv_c_posix_regex" = no ; then
5236         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5237 fi
5238
5239 ol_link_dnssrv=no
5240 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5241 echo "configure:5242: checking for res_query" >&5
5242 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5243   echo $ac_n "(cached) $ac_c" 1>&6
5244 else
5245   cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248 /* System header to define __stub macros and hopefully few prototypes,
5249     which can conflict with char res_query(); below.  */
5250 #include <assert.h>
5251 /* Override any gcc2 internal prototype to avoid an error.  */
5252 /* We use char because int might match the return type of a gcc2
5253     builtin and then its argument prototype would still apply.  */
5254 char res_query();
5255 char (*f)();
5256
5257 int main() {
5258
5259 /* The GNU C library defines this for functions which it implements
5260     to always fail with ENOSYS.  Some functions are actually named
5261     something starting with __ and the normal name is an alias.  */
5262 #if defined (__stub_res_query) || defined (__stub___res_query)
5263 choke me
5264 #else
5265 f = res_query;
5266 #endif
5267
5268 ; return 0; }
5269 EOF
5270 if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5271   rm -rf conftest*
5272   eval "ac_cv_func_res_query=yes"
5273 else
5274   echo "configure: failed program was:" >&5
5275   cat conftest.$ac_ext >&5
5276   rm -rf conftest*
5277   eval "ac_cv_func_res_query=no"
5278 fi
5279 rm -f conftest*
5280 fi
5281
5282 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5283   echo "$ac_t""yes" 1>&6
5284   :
5285 else
5286   echo "$ac_t""no" 1>&6
5287 fi
5288
5289 if test $ac_cv_func_res_query = no ; then 
5290         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5291 echo "configure:5292: checking for res_query in -lbind" >&5
5292 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5293 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296   ac_save_LIBS="$LIBS"
5297 LIBS="-lbind  $LIBS"
5298 cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 /* Override any gcc2 internal prototype to avoid an error.  */
5302 /* We use char because int might match the return type of a gcc2
5303     builtin and then its argument prototype would still apply.  */
5304 char res_query();
5305
5306 int main() {
5307 res_query()
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   eval "ac_cv_lib_$ac_lib_var=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_lib_$ac_lib_var=no"
5318 fi
5319 rm -f conftest*
5320 LIBS="$ac_save_LIBS"
5321
5322 fi
5323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5324   echo "$ac_t""yes" 1>&6
5325     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5326     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5327   cat >> confdefs.h <<EOF
5328 #define $ac_tr_lib 1
5329 EOF
5330
5331   LIBS="-lbind $LIBS"
5332
5333 else
5334   echo "$ac_t""no" 1>&6
5335 fi
5336
5337         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5338 fi
5339
5340 if test $ac_cv_func_res_query = no ; then 
5341         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5342 echo "configure:5343: checking for __res_query in -lbind" >&5
5343 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5344 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5345   echo $ac_n "(cached) $ac_c" 1>&6
5346 else
5347   ac_save_LIBS="$LIBS"
5348 LIBS="-lbind  $LIBS"
5349 cat > conftest.$ac_ext <<EOF
5350 #line 5351 "configure"
5351 #include "confdefs.h"
5352 /* Override any gcc2 internal prototype to avoid an error.  */
5353 /* We use char because int might match the return type of a gcc2
5354     builtin and then its argument prototype would still apply.  */
5355 char __res_query();
5356
5357 int main() {
5358 __res_query()
5359 ; return 0; }
5360 EOF
5361 if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5362   rm -rf conftest*
5363   eval "ac_cv_lib_$ac_lib_var=yes"
5364 else
5365   echo "configure: failed program was:" >&5
5366   cat conftest.$ac_ext >&5
5367   rm -rf conftest*
5368   eval "ac_cv_lib_$ac_lib_var=no"
5369 fi
5370 rm -f conftest*
5371 LIBS="$ac_save_LIBS"
5372
5373 fi
5374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5375   echo "$ac_t""yes" 1>&6
5376     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5377     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5378   cat >> confdefs.h <<EOF
5379 #define $ac_tr_lib 1
5380 EOF
5381
5382   LIBS="-lbind $LIBS"
5383
5384 else
5385   echo "$ac_t""no" 1>&6
5386 fi
5387
5388         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5389 fi
5390
5391 if test $ac_cv_func_res_query = no ; then 
5392         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5393 echo "configure:5394: checking for res_query in -lresolv" >&5
5394 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5395 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5396   echo $ac_n "(cached) $ac_c" 1>&6
5397 else
5398   ac_save_LIBS="$LIBS"
5399 LIBS="-lresolv  $LIBS"
5400 cat > conftest.$ac_ext <<EOF
5401 #line 5402 "configure"
5402 #include "confdefs.h"
5403 /* Override any gcc2 internal prototype to avoid an error.  */
5404 /* We use char because int might match the return type of a gcc2
5405     builtin and then its argument prototype would still apply.  */
5406 char res_query();
5407
5408 int main() {
5409 res_query()
5410 ; return 0; }
5411 EOF
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413   rm -rf conftest*
5414   eval "ac_cv_lib_$ac_lib_var=yes"
5415 else
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418   rm -rf conftest*
5419   eval "ac_cv_lib_$ac_lib_var=no"
5420 fi
5421 rm -f conftest*
5422 LIBS="$ac_save_LIBS"
5423
5424 fi
5425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5426   echo "$ac_t""yes" 1>&6
5427     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5428     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5429   cat >> confdefs.h <<EOF
5430 #define $ac_tr_lib 1
5431 EOF
5432
5433   LIBS="-lresolv $LIBS"
5434
5435 else
5436   echo "$ac_t""no" 1>&6
5437 fi
5438
5439         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5440 fi
5441
5442 if test "$ac_cv_func_res_query" = yes ; then
5443         cat >> confdefs.h <<\EOF
5444 #define HAVE_RES_QUERY 1
5445 EOF
5446
5447
5448         if test $ol_enable_dnssrv != no ; then
5449                 ol_link_dnssrv=yes
5450         fi
5451 fi
5452
5453 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5454         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5455 fi
5456
5457 for ac_func in getaddrinfo 
5458 do
5459 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5460 echo "configure:5461: checking for $ac_func" >&5
5461 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5462   echo $ac_n "(cached) $ac_c" 1>&6
5463 else
5464   cat > conftest.$ac_ext <<EOF
5465 #line 5466 "configure"
5466 #include "confdefs.h"
5467 /* System header to define __stub macros and hopefully few prototypes,
5468     which can conflict with char $ac_func(); below.  */
5469 #include <assert.h>
5470 /* Override any gcc2 internal prototype to avoid an error.  */
5471 /* We use char because int might match the return type of a gcc2
5472     builtin and then its argument prototype would still apply.  */
5473 char $ac_func();
5474 char (*f)();
5475
5476 int main() {
5477
5478 /* The GNU C library defines this for functions which it implements
5479     to always fail with ENOSYS.  Some functions are actually named
5480     something starting with __ and the normal name is an alias.  */
5481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5482 choke me
5483 #else
5484 f = $ac_func;
5485 #endif
5486
5487 ; return 0; }
5488 EOF
5489 if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5490   rm -rf conftest*
5491   eval "ac_cv_func_$ac_func=yes"
5492 else
5493   echo "configure: failed program was:" >&5
5494   cat conftest.$ac_ext >&5
5495   rm -rf conftest*
5496   eval "ac_cv_func_$ac_func=no"
5497 fi
5498 rm -f conftest*
5499 fi
5500
5501 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5502   echo "$ac_t""yes" 1>&6
5503     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5504   cat >> confdefs.h <<EOF
5505 #define $ac_tr_func 1
5506 EOF
5507  
5508 else
5509   echo "$ac_t""no" 1>&6
5510 fi
5511 done
5512
5513
5514 ol_link_ipv6=no
5515 if test $ac_cv_func_getaddrinfo = no ; then
5516         if test $ol_enable_ipv6 = yes ; then
5517                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5518         fi
5519 else
5520         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5521 echo "configure:5522: checking INET6_ADDRSTRLEN" >&5
5522 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5523   echo $ac_n "(cached) $ac_c" 1>&6
5524 else
5525   
5526                 cat > conftest.$ac_ext <<EOF
5527 #line 5528 "configure"
5528 #include "confdefs.h"
5529
5530 #                       include <netinet/in.h>
5531 #                       ifdef INET6_ADDRSTRLEN
5532                                 __has_inet6_addrstrlen__;
5533 #                       endif
5534                 
5535 EOF
5536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5537   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5538   rm -rf conftest*
5539   ol_cv_inet6_addrstrlen=yes
5540 else
5541   rm -rf conftest*
5542   ol_cv_inet6_addrstrlen=no
5543 fi
5544 rm -f conftest*
5545
5546 fi
5547
5548 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5549
5550         if test $ol_cv_inet6_addrstrlen = yes ; then
5551                 ol_link_ipv6=yes
5552         elif test $ol_enable_ipv6 = yes ; then
5553                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5554         fi
5555 fi
5556
5557 if test $ol_enable_local != no ; then
5558         for ac_hdr in sys/un.h 
5559 do
5560 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5561 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5562 echo "configure:5563: checking for $ac_hdr" >&5
5563 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5564   echo $ac_n "(cached) $ac_c" 1>&6
5565 else
5566   cat > conftest.$ac_ext <<EOF
5567 #line 5568 "configure"
5568 #include "confdefs.h"
5569 #include <$ac_hdr>
5570 EOF
5571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5572 { (eval echo configure:5573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5574 if test -z "$ac_err"; then
5575   rm -rf conftest*
5576   eval "ac_cv_header_$ac_safe=yes"
5577 else
5578   echo "$ac_err" >&5
5579   echo "configure: failed program was:" >&5
5580   cat conftest.$ac_ext >&5
5581   rm -rf conftest*
5582   eval "ac_cv_header_$ac_safe=no"
5583 fi
5584 rm -f conftest*
5585 fi
5586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5587   echo "$ac_t""yes" 1>&6
5588     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5589   cat >> confdefs.h <<EOF
5590 #define $ac_tr_hdr 1
5591 EOF
5592  
5593 else
5594   echo "$ac_t""no" 1>&6
5595 fi
5596 done
5597
5598
5599         if test $ol_enable_local = auto ; then
5600                 ol_enable_local=$ac_cv_header_sys_un_h
5601         elif test $ac_cv_header_sys_un_h = no ; then
5602                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5603         fi
5604 fi
5605
5606 ol_link_kbind=no
5607 ol_link_kpasswd=no
5608 ol_link_krb5=no
5609 ol_link_krb4=no
5610
5611 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5612         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5613         -o $ol_with_kerberos = k425 ; then
5614
5615         for ac_hdr in krb5.h
5616 do
5617 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5618 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5619 echo "configure:5620: checking for $ac_hdr" >&5
5620 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5621   echo $ac_n "(cached) $ac_c" 1>&6
5622 else
5623   cat > conftest.$ac_ext <<EOF
5624 #line 5625 "configure"
5625 #include "confdefs.h"
5626 #include <$ac_hdr>
5627 EOF
5628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5629 { (eval echo configure:5630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5631 if test -z "$ac_err"; then
5632   rm -rf conftest*
5633   eval "ac_cv_header_$ac_safe=yes"
5634 else
5635   echo "$ac_err" >&5
5636   echo "configure: failed program was:" >&5
5637   cat conftest.$ac_ext >&5
5638   rm -rf conftest*
5639   eval "ac_cv_header_$ac_safe=no"
5640 fi
5641 rm -f conftest*
5642 fi
5643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5644   echo "$ac_t""yes" 1>&6
5645     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5646   cat >> confdefs.h <<EOF
5647 #define $ac_tr_hdr 1
5648 EOF
5649  
5650 else
5651   echo "$ac_t""no" 1>&6
5652 fi
5653 done
5654
5655
5656         if test $ac_cv_header_krb5_h = yes ; then
5657                                 for ac_hdr in heim_err.h
5658 do
5659 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5660 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5661 echo "configure:5662: checking for $ac_hdr" >&5
5662 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5663   echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665   cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668 #include <$ac_hdr>
5669 EOF
5670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5671 { (eval echo configure:5672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5673 if test -z "$ac_err"; then
5674   rm -rf conftest*
5675   eval "ac_cv_header_$ac_safe=yes"
5676 else
5677   echo "$ac_err" >&5
5678   echo "configure: failed program was:" >&5
5679   cat conftest.$ac_ext >&5
5680   rm -rf conftest*
5681   eval "ac_cv_header_$ac_safe=no"
5682 fi
5683 rm -f conftest*
5684 fi
5685 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5686   echo "$ac_t""yes" 1>&6
5687     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5688   cat >> confdefs.h <<EOF
5689 #define $ac_tr_hdr 1
5690 EOF
5691  
5692 else
5693   echo "$ac_t""no" 1>&6
5694 fi
5695 done
5696
5697                 if test $ac_cv_header_heim_err_h = yes ; then
5698                         krb5_impl=heimdal
5699                 else
5700                         krb5_impl=mit
5701                 fi
5702
5703                 if test $krb5_impl = mit; then
5704                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5705 echo "configure:5706: checking for main in -lkrb5" >&5
5706 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5708   echo $ac_n "(cached) $ac_c" 1>&6
5709 else
5710   ac_save_LIBS="$LIBS"
5711 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5712 cat > conftest.$ac_ext <<EOF
5713 #line 5714 "configure"
5714 #include "confdefs.h"
5715
5716 int main() {
5717 main()
5718 ; return 0; }
5719 EOF
5720 if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5721   rm -rf conftest*
5722   eval "ac_cv_lib_$ac_lib_var=yes"
5723 else
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   eval "ac_cv_lib_$ac_lib_var=no"
5728 fi
5729 rm -f conftest*
5730 LIBS="$ac_save_LIBS"
5731
5732 fi
5733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5734   echo "$ac_t""yes" 1>&6
5735   have_krb5=yes
5736                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5737 else
5738   echo "$ac_t""no" 1>&6
5739 have_krb5=no
5740 fi
5741
5742
5743                 elif test $krb5_impl = heimdal; then
5744                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5745 echo "configure:5746: checking for main in -lkrb5" >&5
5746 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5747 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5748   echo $ac_n "(cached) $ac_c" 1>&6
5749 else
5750   ac_save_LIBS="$LIBS"
5751 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5752 cat > conftest.$ac_ext <<EOF
5753 #line 5754 "configure"
5754 #include "confdefs.h"
5755
5756 int main() {
5757 main()
5758 ; return 0; }
5759 EOF
5760 if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5761   rm -rf conftest*
5762   eval "ac_cv_lib_$ac_lib_var=yes"
5763 else
5764   echo "configure: failed program was:" >&5
5765   cat conftest.$ac_ext >&5
5766   rm -rf conftest*
5767   eval "ac_cv_lib_$ac_lib_var=no"
5768 fi
5769 rm -f conftest*
5770 LIBS="$ac_save_LIBS"
5771
5772 fi
5773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5774   echo "$ac_t""yes" 1>&6
5775   have_krb5=yes
5776                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5777 else
5778   echo "$ac_t""no" 1>&6
5779 have_krb5=no
5780 fi
5781
5782
5783                         cat >> confdefs.h <<\EOF
5784 #define HAVE_HEIMDAL_KERBEROS 1
5785 EOF
5786
5787                 else
5788                         have_krb5=no
5789                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5790                 fi
5791
5792                 if test $have_krb5 = yes ; then
5793                         ol_link_krb5=yes
5794
5795                         cat >> confdefs.h <<\EOF
5796 #define HAVE_KRB5 1
5797 EOF
5798
5799
5800                         if test $ol_enable_kpasswd != no ; then
5801                                 ol_link_kpasswd=yes;
5802                         fi
5803
5804                         if test $ol_with_kerberos = k5only ; then
5805                                 ol_with_kerberos=found
5806                         fi
5807
5808                 elif test $ol_with_kerberos != auto ; then
5809                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5810                 fi
5811
5812         fi
5813 fi
5814
5815 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
5816         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5817
5818         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5819 do
5820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5822 echo "configure:5823: checking for $ac_hdr" >&5
5823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5824   echo $ac_n "(cached) $ac_c" 1>&6
5825 else
5826   cat > conftest.$ac_ext <<EOF
5827 #line 5828 "configure"
5828 #include "confdefs.h"
5829 #include <$ac_hdr>
5830 EOF
5831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5832 { (eval echo configure:5833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5834 if test -z "$ac_err"; then
5835   rm -rf conftest*
5836   eval "ac_cv_header_$ac_safe=yes"
5837 else
5838   echo "$ac_err" >&5
5839   echo "configure: failed program was:" >&5
5840   cat conftest.$ac_ext >&5
5841   rm -rf conftest*
5842   eval "ac_cv_header_$ac_safe=no"
5843 fi
5844 rm -f conftest*
5845 fi
5846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5847   echo "$ac_t""yes" 1>&6
5848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5849   cat >> confdefs.h <<EOF
5850 #define $ac_tr_hdr 1
5851 EOF
5852  
5853 else
5854   echo "$ac_t""no" 1>&6
5855 fi
5856 done
5857
5858
5859         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5860                 if test $krb5_impl = mit; then
5861                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5862 echo "configure:5863: checking for main in -lkrb4" >&5
5863 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5865   echo $ac_n "(cached) $ac_c" 1>&6
5866 else
5867   ac_save_LIBS="$LIBS"
5868 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5869 cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872
5873 int main() {
5874 main()
5875 ; return 0; }
5876 EOF
5877 if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5878   rm -rf conftest*
5879   eval "ac_cv_lib_$ac_lib_var=yes"
5880 else
5881   echo "configure: failed program was:" >&5
5882   cat conftest.$ac_ext >&5
5883   rm -rf conftest*
5884   eval "ac_cv_lib_$ac_lib_var=no"
5885 fi
5886 rm -f conftest*
5887 LIBS="$ac_save_LIBS"
5888
5889 fi
5890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5891   echo "$ac_t""yes" 1>&6
5892   have_k425=yes
5893                                 KRB4_LIBS="-lkrb4 -ldes425"
5894 else
5895   echo "$ac_t""no" 1>&6
5896 have_k425=no
5897 fi
5898
5899
5900                 elif test $krb5_impl = heimdal; then
5901                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5902 echo "configure:5903: checking for main in -lkrb4" >&5
5903 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5905   echo $ac_n "(cached) $ac_c" 1>&6
5906 else
5907   ac_save_LIBS="$LIBS"
5908 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5909 cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912
5913 int main() {
5914 main()
5915 ; return 0; }
5916 EOF
5917 if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5918   rm -rf conftest*
5919   eval "ac_cv_lib_$ac_lib_var=yes"
5920 else
5921   echo "configure: failed program was:" >&5
5922   cat conftest.$ac_ext >&5
5923   rm -rf conftest*
5924   eval "ac_cv_lib_$ac_lib_var=no"
5925 fi
5926 rm -f conftest*
5927 LIBS="$ac_save_LIBS"
5928
5929 fi
5930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5931   echo "$ac_t""yes" 1>&6
5932   have_k425=yes
5933                                 KRB4_LIBS="-lkrb4"
5934 else
5935   echo "$ac_t""no" 1>&6
5936 have_k425=no
5937 fi
5938
5939
5940                 else
5941                         have_425=no
5942                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5943                 fi
5944
5945                 if test $have_k425 = yes ; then
5946                         ol_with_kerberos=found
5947                         ol_link_krb4=yes
5948
5949                         cat >> confdefs.h <<\EOF
5950 #define HAVE_KRB425 1
5951 EOF
5952
5953                         cat >> confdefs.h <<\EOF
5954 #define HAVE_KRB4 1
5955 EOF
5956
5957
5958                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5959 echo "configure:5960: checking for des_debug in Kerberos libraries" >&5
5960 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5961   echo $ac_n "(cached) $ac_c" 1>&6
5962 else
5963   
5964                                                                 save_LIBS="$LIBS"
5965                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
5966                                 cat > conftest.$ac_ext <<EOF
5967 #line 5968 "configure"
5968 #include "confdefs.h"
5969
5970 #include <kerberosIV/krb.h>
5971 #include <kerberosIV/des.h>
5972 extern int des_debug;
5973
5974 int main() {
5975
5976 des_debug = 1;
5977
5978 ; return 0; }
5979 EOF
5980 if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5981   rm -rf conftest*
5982   ol_cv_var_des_debug=yes
5983 else
5984   echo "configure: failed program was:" >&5
5985   cat conftest.$ac_ext >&5
5986   rm -rf conftest*
5987   ol_cv_var_des_debug=no
5988 fi
5989 rm -f conftest*
5990                                                                 LIBS="$save_LIBS"
5991                         
5992 fi
5993
5994 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5995
5996                         if test $ol_cv_var_des_debug = yes ; then
5997                                 cat >> confdefs.h <<\EOF
5998 #define HAVE_DES_DEBUG 1
5999 EOF
6000
6001                         fi
6002
6003                         LIBS="$save_LIBS"
6004                 fi
6005         fi
6006 fi
6007
6008 if test $ol_link_krb5 = yes ; then
6009         ol_with_kerberos=found
6010 fi
6011
6012 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6013         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6014
6015         for ac_hdr in krb.h des.h krb-archaeology.h 
6016 do
6017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6019 echo "configure:6020: checking for $ac_hdr" >&5
6020 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6021   echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023   cat > conftest.$ac_ext <<EOF
6024 #line 6025 "configure"
6025 #include "confdefs.h"
6026 #include <$ac_hdr>
6027 EOF
6028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6029 { (eval echo configure:6030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6031 if test -z "$ac_err"; then
6032   rm -rf conftest*
6033   eval "ac_cv_header_$ac_safe=yes"
6034 else
6035   echo "$ac_err" >&5
6036   echo "configure: failed program was:" >&5
6037   cat conftest.$ac_ext >&5
6038   rm -rf conftest*
6039   eval "ac_cv_header_$ac_safe=no"
6040 fi
6041 rm -f conftest*
6042 fi
6043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6044   echo "$ac_t""yes" 1>&6
6045     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6046   cat >> confdefs.h <<EOF
6047 #define $ac_tr_hdr 1
6048 EOF
6049  
6050 else
6051   echo "$ac_t""no" 1>&6
6052 fi
6053 done
6054
6055
6056         if test $ac_cv_header_krb_h = yes ; then
6057                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6058 echo "configure:6059: checking for main in -lkrb" >&5
6059 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6061   echo $ac_n "(cached) $ac_c" 1>&6
6062 else
6063   ac_save_LIBS="$LIBS"
6064 LIBS="-lkrb -ldes $LIBS"
6065 cat > conftest.$ac_ext <<EOF
6066 #line 6067 "configure"
6067 #include "confdefs.h"
6068
6069 int main() {
6070 main()
6071 ; return 0; }
6072 EOF
6073 if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6074   rm -rf conftest*
6075   eval "ac_cv_lib_$ac_lib_var=yes"
6076 else
6077   echo "configure: failed program was:" >&5
6078   cat conftest.$ac_ext >&5
6079   rm -rf conftest*
6080   eval "ac_cv_lib_$ac_lib_var=no"
6081 fi
6082 rm -f conftest*
6083 LIBS="$ac_save_LIBS"
6084
6085 fi
6086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6087   echo "$ac_t""yes" 1>&6
6088   have_k4=yes
6089 else
6090   echo "$ac_t""no" 1>&6
6091 have_k4=no
6092 fi
6093
6094
6095                 if test $have_k4 = yes ; then
6096                         ol_with_kerberos=found
6097                         ol_link_krb4=yes
6098
6099                         cat >> confdefs.h <<\EOF
6100 #define HAVE_KRB4 1
6101 EOF
6102
6103
6104                         KRB4_LIBS="-lkrb -ldes"
6105
6106                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6107                                 cat >> confdefs.h <<\EOF
6108 #define HAVE_KTH_KERBEROS 1
6109 EOF
6110
6111                         fi
6112                 fi
6113         fi
6114 fi
6115
6116 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6117         ol_link_kpasswd=yes
6118 fi
6119
6120 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6121         ol_link_kbind=yes
6122
6123 elif test $ol_enable_kbind = yes ; then
6124         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6125 fi
6126
6127 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6128         cat >> confdefs.h <<\EOF
6129 #define HAVE_KERBEROS 1
6130 EOF
6131
6132
6133 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6134         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6135 fi
6136
6137 ol_link_tls=no
6138 if test $ol_with_tls != no ; then
6139         for ac_hdr in openssl/ssl.h ssl.h
6140 do
6141 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6142 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6143 echo "configure:6144: checking for $ac_hdr" >&5
6144 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6145   echo $ac_n "(cached) $ac_c" 1>&6
6146 else
6147   cat > conftest.$ac_ext <<EOF
6148 #line 6149 "configure"
6149 #include "confdefs.h"
6150 #include <$ac_hdr>
6151 EOF
6152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6153 { (eval echo configure:6154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6155 if test -z "$ac_err"; then
6156   rm -rf conftest*
6157   eval "ac_cv_header_$ac_safe=yes"
6158 else
6159   echo "$ac_err" >&5
6160   echo "configure: failed program was:" >&5
6161   cat conftest.$ac_ext >&5
6162   rm -rf conftest*
6163   eval "ac_cv_header_$ac_safe=no"
6164 fi
6165 rm -f conftest*
6166 fi
6167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6168   echo "$ac_t""yes" 1>&6
6169     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6170   cat >> confdefs.h <<EOF
6171 #define $ac_tr_hdr 1
6172 EOF
6173  
6174 else
6175   echo "$ac_t""no" 1>&6
6176 fi
6177 done
6178
6179         
6180         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6181                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6182 echo "configure:6183: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6183 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6184 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6185   echo $ac_n "(cached) $ac_c" 1>&6
6186 else
6187   ac_save_LIBS="$LIBS"
6188 LIBS="-lssl -lcrypto $LIBS"
6189 cat > conftest.$ac_ext <<EOF
6190 #line 6191 "configure"
6191 #include "confdefs.h"
6192 /* Override any gcc2 internal prototype to avoid an error.  */
6193 /* We use char because int might match the return type of a gcc2
6194     builtin and then its argument prototype would still apply.  */
6195 char SSLeay_add_ssl_algorithms();
6196
6197 int main() {
6198 SSLeay_add_ssl_algorithms()
6199 ; return 0; }
6200 EOF
6201 if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6202   rm -rf conftest*
6203   eval "ac_cv_lib_$ac_lib_var=yes"
6204 else
6205   echo "configure: failed program was:" >&5
6206   cat conftest.$ac_ext >&5
6207   rm -rf conftest*
6208   eval "ac_cv_lib_$ac_lib_var=no"
6209 fi
6210 rm -f conftest*
6211 LIBS="$ac_save_LIBS"
6212
6213 fi
6214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6215   echo "$ac_t""yes" 1>&6
6216   have_ssleay=yes
6217                         need_rsaref=no
6218 else
6219   echo "$ac_t""no" 1>&6
6220 have_ssleay=no
6221 fi
6222
6223                         
6224                 if test $have_ssleay = no ; then
6225                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6226 echo "configure:6227: checking for SSL_library_init in -lssl" >&5
6227 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6228 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6229   echo $ac_n "(cached) $ac_c" 1>&6
6230 else
6231   ac_save_LIBS="$LIBS"
6232 LIBS="-lssl -lcrypto $LIBS"
6233 cat > conftest.$ac_ext <<EOF
6234 #line 6235 "configure"
6235 #include "confdefs.h"
6236 /* Override any gcc2 internal prototype to avoid an error.  */
6237 /* We use char because int might match the return type of a gcc2
6238     builtin and then its argument prototype would still apply.  */
6239 char SSL_library_init();
6240
6241 int main() {
6242 SSL_library_init()
6243 ; return 0; }
6244 EOF
6245 if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6246   rm -rf conftest*
6247   eval "ac_cv_lib_$ac_lib_var=yes"
6248 else
6249   echo "configure: failed program was:" >&5
6250   cat conftest.$ac_ext >&5
6251   rm -rf conftest*
6252   eval "ac_cv_lib_$ac_lib_var=no"
6253 fi
6254 rm -f conftest*
6255 LIBS="$ac_save_LIBS"
6256
6257 fi
6258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6259   echo "$ac_t""yes" 1>&6
6260   have_ssleay=yes
6261                                 need_rsaref=no
6262 else
6263   echo "$ac_t""no" 1>&6
6264 have_ssleay=no
6265 fi
6266
6267                 fi
6268
6269                 if test $have_ssleay = no ; then
6270                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6271 echo "configure:6272: checking for ssl3_accept in -lssl" >&5
6272 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6273 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6274   echo $ac_n "(cached) $ac_c" 1>&6
6275 else
6276   ac_save_LIBS="$LIBS"
6277 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6278 cat > conftest.$ac_ext <<EOF
6279 #line 6280 "configure"
6280 #include "confdefs.h"
6281 /* Override any gcc2 internal prototype to avoid an error.  */
6282 /* We use char because int might match the return type of a gcc2
6283     builtin and then its argument prototype would still apply.  */
6284 char ssl3_accept();
6285
6286 int main() {
6287 ssl3_accept()
6288 ; return 0; }
6289 EOF
6290 if { (eval echo configure:6291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6291   rm -rf conftest*
6292   eval "ac_cv_lib_$ac_lib_var=yes"
6293 else
6294   echo "configure: failed program was:" >&5
6295   cat conftest.$ac_ext >&5
6296   rm -rf conftest*
6297   eval "ac_cv_lib_$ac_lib_var=no"
6298 fi
6299 rm -f conftest*
6300 LIBS="$ac_save_LIBS"
6301
6302 fi
6303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6304   echo "$ac_t""yes" 1>&6
6305   have_ssleay=yes
6306                                 need_rsaref=yes
6307 else
6308   echo "$ac_t""no" 1>&6
6309 have_ssleay=no
6310 fi
6311
6312                 fi
6313
6314                 if test $have_ssleay = yes ; then
6315                         ol_with_tls=found
6316                         ol_link_tls=yes
6317
6318                         cat >> confdefs.h <<\EOF
6319 #define HAVE_SSLEAY 1
6320 EOF
6321
6322
6323                         if test $need_rsaref = yes; then
6324                                 cat >> confdefs.h <<\EOF
6325 #define HAVE_RSAREF 1
6326 EOF
6327
6328
6329                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6330                         else
6331                                 TLS_LIBS="-lssl -lcrypto"
6332                         fi
6333                 fi
6334         fi
6335
6336 else
6337         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6338 fi
6339
6340 if test $ol_link_tls = yes ; then
6341         cat >> confdefs.h <<\EOF
6342 #define HAVE_TLS 1
6343 EOF
6344
6345
6346 elif test $ol_with_tls = auto ; then
6347         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6348         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6349
6350 elif test $ol_with_tls != no ; then
6351         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6352 fi
6353
6354 for ac_func in \
6355         ctime_r                 \
6356         gethostbyname_r gethostbyaddr_r \
6357
6358 do
6359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6360 echo "configure:6361: checking for $ac_func" >&5
6361 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6362   echo $ac_n "(cached) $ac_c" 1>&6
6363 else
6364   cat > conftest.$ac_ext <<EOF
6365 #line 6366 "configure"
6366 #include "confdefs.h"
6367 /* System header to define __stub macros and hopefully few prototypes,
6368     which can conflict with char $ac_func(); below.  */
6369 #include <assert.h>
6370 /* Override any gcc2 internal prototype to avoid an error.  */
6371 /* We use char because int might match the return type of a gcc2
6372     builtin and then its argument prototype would still apply.  */
6373 char $ac_func();
6374 char (*f)();
6375
6376 int main() {
6377
6378 /* The GNU C library defines this for functions which it implements
6379     to always fail with ENOSYS.  Some functions are actually named
6380     something starting with __ and the normal name is an alias.  */
6381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6382 choke me
6383 #else
6384 f = $ac_func;
6385 #endif
6386
6387 ; return 0; }
6388 EOF
6389 if { (eval echo configure:6390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6390   rm -rf conftest*
6391   eval "ac_cv_func_$ac_func=yes"
6392 else
6393   echo "configure: failed program was:" >&5
6394   cat conftest.$ac_ext >&5
6395   rm -rf conftest*
6396   eval "ac_cv_func_$ac_func=no"
6397 fi
6398 rm -f conftest*
6399 fi
6400
6401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6402   echo "$ac_t""yes" 1>&6
6403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6404   cat >> confdefs.h <<EOF
6405 #define $ac_tr_func 1
6406 EOF
6407  
6408 else
6409   echo "$ac_t""no" 1>&6
6410 fi
6411 done
6412
6413
6414 if test "$ac_cv_func_ctime_r" = no ; then
6415         ol_cv_func_ctime_r_nargs=0
6416 else
6417         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6418 echo "configure:6419: checking number of arguments of ctime_r" >&5
6419 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6420   echo $ac_n "(cached) $ac_c" 1>&6
6421 else
6422   cat > conftest.$ac_ext <<EOF
6423 #line 6424 "configure"
6424 #include "confdefs.h"
6425 #include <time.h>
6426 int main() {
6427 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6428 ; return 0; }
6429 EOF
6430 if { (eval echo configure:6431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6431   rm -rf conftest*
6432   ol_cv_func_ctime_r_nargs3=yes
6433 else
6434   echo "configure: failed program was:" >&5
6435   cat conftest.$ac_ext >&5
6436   rm -rf conftest*
6437   ol_cv_func_ctime_r_nargs3=no
6438 fi
6439 rm -f conftest*
6440
6441         cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6444 #include <time.h>
6445 int main() {
6446 time_t ti; char *buffer; ctime_r(&ti,buffer);
6447 ; return 0; }
6448 EOF
6449 if { (eval echo configure:6450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6450   rm -rf conftest*
6451   ol_cv_func_ctime_r_nargs2=yes
6452 else
6453   echo "configure: failed program was:" >&5
6454   cat conftest.$ac_ext >&5
6455   rm -rf conftest*
6456   ol_cv_func_ctime_r_nargs2=no
6457 fi
6458 rm -f conftest*
6459
6460         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6461                 $ol_cv_func_ctime_r_nargs2 = no ; then
6462
6463                 ol_cv_func_ctime_r_nargs=3
6464
6465         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6466                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6467
6468                 ol_cv_func_ctime_r_nargs=2
6469
6470         else
6471                 ol_cv_func_ctime_r_nargs=0
6472         fi
6473   
6474 fi
6475
6476 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6477
6478   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6479         cat >> confdefs.h <<EOF
6480 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6481 EOF
6482
6483   fi
6484
6485 fi
6486
6487 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6488         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6489 echo "configure:6490: checking number of arguments of gethostbyname_r" >&5
6490 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6491   echo $ac_n "(cached) $ac_c" 1>&6
6492 else
6493   cat > conftest.$ac_ext <<EOF
6494 #line 6495 "configure"
6495 #include "confdefs.h"
6496 #include <sys/types.h>
6497 #include <sys/socket.h>
6498 #include <netinet/in.h>
6499 #include <netdb.h>
6500 #define BUFSIZE (sizeof(struct hostent)+10)
6501 int main() {
6502 struct hostent hent; char buffer[BUFSIZE];
6503                 int bufsize=BUFSIZE;int h_errno;
6504                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6505                         buffer, bufsize, &h_errno);
6506 ; return 0; }
6507 EOF
6508 if { (eval echo configure:6509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6509   rm -rf conftest*
6510   ol_cv_func_gethostbyname_r_nargs5=yes
6511 else
6512   echo "configure: failed program was:" >&5
6513   cat conftest.$ac_ext >&5
6514   rm -rf conftest*
6515   ol_cv_func_gethostbyname_r_nargs5=no
6516 fi
6517 rm -f conftest*
6518
6519         cat > conftest.$ac_ext <<EOF
6520 #line 6521 "configure"
6521 #include "confdefs.h"
6522 #include <sys/types.h>
6523 #include <sys/socket.h>
6524 #include <netinet/in.h>
6525 #include <netdb.h>
6526 #define BUFSIZE (sizeof(struct hostent)+10)
6527 int main() {
6528 struct hostent hent;struct hostent *rhent;
6529                 char buffer[BUFSIZE];
6530                 int bufsize=BUFSIZE;int h_errno;
6531                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6532                         &rhent, &h_errno);
6533 ; return 0; }
6534 EOF
6535 if { (eval echo configure:6536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6536   rm -rf conftest*
6537   ol_cv_func_gethostbyname_r_nargs6=yes
6538 else
6539   echo "configure: failed program was:" >&5
6540   cat conftest.$ac_ext >&5
6541   rm -rf conftest*
6542   ol_cv_func_gethostbyname_r_nargs6=no
6543 fi
6544 rm -f conftest*
6545
6546         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6547                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6548
6549                 ol_cv_func_gethostbyname_r_nargs=5
6550
6551         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6552                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6553
6554                 ol_cv_func_gethostbyname_r_nargs=6
6555
6556         else
6557                 ol_cv_func_gethostbyname_r_nargs=0
6558         fi
6559   
6560 fi
6561
6562 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6563   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6564         cat >> confdefs.h <<EOF
6565 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6566 EOF
6567
6568   fi
6569
6570 else
6571         ol_cv_func_gethostbyname_r_nargs=0
6572 fi
6573  
6574 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6575         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6576 echo "configure:6577: checking number of arguments of gethostbyaddr_r" >&5
6577 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6578   echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580   cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 #include <sys/types.h>
6584 #include <sys/socket.h>
6585 #include <netinet/in.h>
6586 #include <netdb.h>
6587 #define BUFSIZE (sizeof(struct hostent)+10)
6588 int main() {
6589 struct hostent hent; char buffer[BUFSIZE]; 
6590             struct in_addr add;
6591             size_t alen=sizeof(struct in_addr);
6592             int bufsize=BUFSIZE;int h_errno;
6593                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6594                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6598   rm -rf conftest*
6599   ol_cv_func_gethostbyaddr_r_nargs7=yes
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   ol_cv_func_gethostbyaddr_r_nargs7=no
6605 fi
6606 rm -f conftest*
6607
6608         cat > conftest.$ac_ext <<EOF
6609 #line 6610 "configure"
6610 #include "confdefs.h"
6611 #include <sys/types.h>
6612 #include <sys/socket.h>
6613 #include <netinet/in.h>
6614 #include <netdb.h>
6615 #define BUFSIZE (sizeof(struct hostent)+10)
6616 int main() {
6617 struct hostent hent;
6618                 struct hostent *rhent; char buffer[BUFSIZE]; 
6619                 struct in_addr add;
6620                 size_t alen=sizeof(struct in_addr);
6621                 int bufsize=BUFSIZE;int h_errno;
6622                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6623                         alen, AF_INET, &hent, buffer, bufsize, 
6624                         &rhent, &h_errno);
6625 ; return 0; }
6626 EOF
6627 if { (eval echo configure:6628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6628   rm -rf conftest*
6629   ol_cv_func_gethostbyaddr_r_nargs8=yes
6630 else
6631   echo "configure: failed program was:" >&5
6632   cat conftest.$ac_ext >&5
6633   rm -rf conftest*
6634   ol_cv_func_gethostbyaddr_r_nargs8=no
6635 fi
6636 rm -f conftest*
6637
6638         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6639                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6640
6641                 ol_cv_func_gethostbyaddr_r_nargs=7
6642
6643         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6644                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6645
6646                 ol_cv_func_gethostbyaddr_r_nargs=8
6647
6648         else
6649                 ol_cv_func_gethostbyaddr_r_nargs=0
6650         fi
6651   
6652 fi
6653
6654 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6655   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6656     cat >> confdefs.h <<EOF
6657 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6658 EOF
6659
6660   fi
6661
6662 else
6663         ol_cv_func_gethostbyaddr_r_nargs=0
6664 fi
6665
6666 if test "$ac_cv_func_ctime_r" = yes \
6667         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6668         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6669         -a "$ac_cv_func_gethostbyname_r" = yes \
6670         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6671         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6672         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6673         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6674         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6675         ; then
6676  
6677         cat >> confdefs.h <<\EOF
6678 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6679 EOF
6680
6681 fi
6682
6683 ol_link_threads=no
6684
6685 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6686         -o $ol_with_threads = nt ; then
6687
6688         
6689         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6690 echo "configure:6691: checking for NT Threads" >&5
6691 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6692   echo $ac_n "(cached) $ac_c" 1>&6
6693 else
6694   
6695                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6696 echo "configure:6697: checking for _beginthread" >&5
6697 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6698   echo $ac_n "(cached) $ac_c" 1>&6
6699 else
6700   cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703 /* System header to define __stub macros and hopefully few prototypes,
6704     which can conflict with char _beginthread(); below.  */
6705 #include <assert.h>
6706 /* Override any gcc2 internal prototype to avoid an error.  */
6707 /* We use char because int might match the return type of a gcc2
6708     builtin and then its argument prototype would still apply.  */
6709 char _beginthread();
6710 char (*f)();
6711
6712 int main() {
6713
6714 /* The GNU C library defines this for functions which it implements
6715     to always fail with ENOSYS.  Some functions are actually named
6716     something starting with __ and the normal name is an alias.  */
6717 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6718 choke me
6719 #else
6720 f = _beginthread;
6721 #endif
6722
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6726   rm -rf conftest*
6727   eval "ac_cv_func__beginthread=yes"
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   eval "ac_cv_func__beginthread=no"
6733 fi
6734 rm -f conftest*
6735 fi
6736
6737 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6738   echo "$ac_t""yes" 1>&6
6739   ol_cv_nt_threads=yes
6740 else
6741   echo "$ac_t""no" 1>&6
6742 ol_cv_nt_threads=no
6743 fi
6744
6745         
6746 fi
6747
6748 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6749
6750         if test $ol_cv_nt_threads = yes ; then
6751                 cat >> confdefs.h <<\EOF
6752 #define HAVE_NT_THREADS 1
6753 EOF
6754
6755         fi
6756
6757
6758         if test "$ol_cv_nt_threads" = yes ; then
6759         ol_link_threads=nt
6760         ol_with_threads=found
6761         ol_with_yielding_select=yes
6762
6763                 cat >> confdefs.h <<\EOF
6764 #define HAVE_NT_SERVICE_MANAGER 1
6765 EOF
6766
6767                 cat >> confdefs.h <<\EOF
6768 #define HAVE_NT_EVENT_LOG 1
6769 EOF
6770
6771         fi
6772
6773         if test $ol_with_threads = nt ; then
6774                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6775         fi
6776 fi
6777
6778 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6779         -o $ol_with_threads = posix ; then
6780
6781         for ac_hdr in pthread.h
6782 do
6783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6785 echo "configure:6786: checking for $ac_hdr" >&5
6786 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6787   echo $ac_n "(cached) $ac_c" 1>&6
6788 else
6789   cat > conftest.$ac_ext <<EOF
6790 #line 6791 "configure"
6791 #include "confdefs.h"
6792 #include <$ac_hdr>
6793 EOF
6794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6795 { (eval echo configure:6796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6797 if test -z "$ac_err"; then
6798   rm -rf conftest*
6799   eval "ac_cv_header_$ac_safe=yes"
6800 else
6801   echo "$ac_err" >&5
6802   echo "configure: failed program was:" >&5
6803   cat conftest.$ac_ext >&5
6804   rm -rf conftest*
6805   eval "ac_cv_header_$ac_safe=no"
6806 fi
6807 rm -f conftest*
6808 fi
6809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6810   echo "$ac_t""yes" 1>&6
6811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6812   cat >> confdefs.h <<EOF
6813 #define $ac_tr_hdr 1
6814 EOF
6815  
6816 else
6817   echo "$ac_t""no" 1>&6
6818 fi
6819 done
6820
6821
6822         if test $ac_cv_header_pthread_h = yes ; then
6823                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6824 echo "configure:6825: checking POSIX thread version" >&5
6825 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   
6829         cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832
6833 #               include <pthread.h>
6834                 /* this check could be improved */
6835 #               ifdef PTHREAD_ONCE_INIT
6836                         pthread_version_final;
6837 #               endif
6838         
6839 EOF
6840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6841   egrep "pthread_version_final" >/dev/null 2>&1; then
6842   rm -rf conftest*
6843   ol_pthread_final=yes
6844 else
6845   rm -rf conftest*
6846   ol_pthread_final=no
6847 fi
6848 rm -f conftest*
6849
6850
6851         cat > conftest.$ac_ext <<EOF
6852 #line 6853 "configure"
6853 #include "confdefs.h"
6854
6855 #               include <pthread.h>
6856                 /* this check could be improved */
6857 #               ifdef pthread_once_init
6858                         pthread_version_draft4;
6859 #               endif
6860         
6861 EOF
6862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6863   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6864   rm -rf conftest*
6865   ol_pthread_draft4=yes
6866 else
6867   rm -rf conftest*
6868   ol_pthread_draft4=no
6869 fi
6870 rm -f conftest*
6871
6872
6873         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6874                 ol_cv_pthread_version=final
6875         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6876                 ol_cv_pthread_version=draft4
6877         else
6878                 ol_cv_pthread_version=unknown
6879         fi
6880
6881 fi
6882
6883 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6884
6885
6886                 if test $ol_cv_pthread_version = final ; then
6887                         cat >> confdefs.h <<\EOF
6888 #define HAVE_PTHREADS_FINAL 1
6889 EOF
6890
6891                 elif test $ol_cv_pthread_version = draft4 ; then
6892                         cat >> confdefs.h <<\EOF
6893 #define HAVE_PTHREADS_D4 1
6894 EOF
6895
6896                 else
6897                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6898                 fi
6899
6900                 # consider threads found
6901                 ol_with_threads=found
6902
6903                 
6904         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6905 echo "configure:6906: checking for LinuxThreads pthread.h" >&5
6906 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6907   echo $ac_n "(cached) $ac_c" 1>&6
6908 else
6909   cat > conftest.$ac_ext <<EOF
6910 #line 6911 "configure"
6911 #include "confdefs.h"
6912 #include <pthread.h>
6913 EOF
6914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6915   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6916   rm -rf conftest*
6917   ol_cv_header_linux_threads=yes
6918 else
6919   rm -rf conftest*
6920   ol_cv_header_linux_threads=no
6921 fi
6922 rm -f conftest*
6923
6924                 
6925 fi
6926
6927 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6928         if test $ol_cv_header_linux_threads = yes; then
6929                 cat >> confdefs.h <<\EOF
6930 #define HAVE_LINUX_THREADS 1
6931 EOF
6932
6933         fi
6934
6935                 
6936         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6937 echo "configure:6938: checking for GNU Pth pthread.h" >&5
6938 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6939   echo $ac_n "(cached) $ac_c" 1>&6
6940 else
6941   cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 #include <pthread.h>
6945 #ifdef _POSIX_THREAD_IS_GNU_PTH
6946         __gnu_pth__;
6947 #endif
6948
6949 EOF
6950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6951   egrep "__gnu_pth__" >/dev/null 2>&1; then
6952   rm -rf conftest*
6953   ol_cv_header_gnu_pth_pthread_h=yes
6954 else
6955   rm -rf conftest*
6956   ol_cv_header_gnu_pth_pthread_h=no
6957 fi
6958 rm -f conftest*
6959
6960                 
6961 fi
6962
6963 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6964
6965
6966                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6967                         for ac_hdr in sched.h
6968 do
6969 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6970 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6971 echo "configure:6972: checking for $ac_hdr" >&5
6972 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6973   echo $ac_n "(cached) $ac_c" 1>&6
6974 else
6975   cat > conftest.$ac_ext <<EOF
6976 #line 6977 "configure"
6977 #include "confdefs.h"
6978 #include <$ac_hdr>
6979 EOF
6980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6981 { (eval echo configure:6982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6983 if test -z "$ac_err"; then
6984   rm -rf conftest*
6985   eval "ac_cv_header_$ac_safe=yes"
6986 else
6987   echo "$ac_err" >&5
6988   echo "configure: failed program was:" >&5
6989   cat conftest.$ac_ext >&5
6990   rm -rf conftest*
6991   eval "ac_cv_header_$ac_safe=no"
6992 fi
6993 rm -f conftest*
6994 fi
6995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6996   echo "$ac_t""yes" 1>&6
6997     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6998   cat >> confdefs.h <<EOF
6999 #define $ac_tr_hdr 1
7000 EOF
7001  
7002 else
7003   echo "$ac_t""no" 1>&6
7004 fi
7005 done
7006
7007                 fi
7008
7009                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7010                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7011 echo "configure:7012: checking for pthread_create in default libraries" >&5
7012 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7013   echo $ac_n "(cached) $ac_c" 1>&6
7014 else
7015   
7016                 if test "$cross_compiling" = yes; then
7017   cat > conftest.$ac_ext <<EOF
7018 #line 7019 "configure"
7019 #include "confdefs.h"
7020 /* pthread test headers */
7021 #include <pthread.h>
7022 #ifndef NULL
7023 #define NULL (void*)0
7024 #endif
7025
7026 static void *task(p)
7027         void *p;
7028 {
7029         return (void *) (p == NULL);
7030 }
7031
7032 int main() {
7033
7034         /* pthread test function */
7035         pthread_t t;
7036         int status;
7037 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7038         /* This system (e.g. AIX) defaults detached; must override */
7039         pthread_attr_t attr;
7040
7041         status = pthread_attr_init(&attr);
7042         if( status ) exit( status );
7043
7044         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7045         if( status ) exit( status );
7046
7047 #define ATTR    &attr
7048 #else
7049 #if HAVE_PTHREADS_D4
7050 #define ATTR    pthread_attr_default
7051 #else
7052 #define ATTR    NULL
7053 #endif
7054 #endif
7055         /* make sure pthread_create() isn't just a stub */
7056         status = pthread_create(&t, ATTR, task, NULL);
7057         if( status ) exit( status );
7058
7059         /* make sure pthread_detach() isn't just a stub */
7060 #if HAVE_PTHREADS_D4
7061         status = pthread_detach( &t );
7062 #else
7063         status = pthread_detach( t );
7064 #endif
7065
7066 #ifdef HAVE_LINUX_THREADS
7067         pthread_kill_other_threads_np();
7068 #endif
7069
7070         exit( status );
7071
7072 ; return 0; }
7073 EOF
7074 if { (eval echo configure:7075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7075   rm -rf conftest*
7076   ol_cv_pthread_create=yes
7077 else
7078   echo "configure: failed program was:" >&5
7079   cat conftest.$ac_ext >&5
7080   rm -rf conftest*
7081   ol_cv_pthread_create=no
7082 fi
7083 rm -f conftest*
7084 else
7085   cat > conftest.$ac_ext <<EOF
7086 #line 7087 "configure"
7087 #include "confdefs.h"
7088 /* pthread test headers */
7089 #include <pthread.h>
7090 #ifndef NULL
7091 #define NULL (void*)0
7092 #endif
7093
7094 static void *task(p)
7095         void *p;
7096 {
7097         return (void *) (p == NULL);
7098 }
7099
7100
7101 int main(argc, argv)
7102         int argc;
7103         char **argv;
7104 {
7105
7106         /* pthread test function */
7107         pthread_t t;
7108         int status;
7109 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7110         /* This system (e.g. AIX) defaults detached; must override */
7111         pthread_attr_t attr;
7112
7113         status = pthread_attr_init(&attr);
7114         if( status ) exit( status );
7115
7116         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7117         if( status ) exit( status );
7118
7119 #define ATTR    &attr
7120 #else
7121 #if HAVE_PTHREADS_D4
7122 #define ATTR    pthread_attr_default
7123 #else
7124 #define ATTR    NULL
7125 #endif
7126 #endif
7127         /* make sure pthread_create() isn't just a stub */
7128         status = pthread_create(&t, ATTR, task, NULL);
7129         if( status ) exit( status );
7130
7131         /* make sure pthread_detach() isn't just a stub */
7132 #if HAVE_PTHREADS_D4
7133         status = pthread_detach( &t );
7134 #else
7135         status = pthread_detach( t );
7136 #endif
7137
7138 #ifdef HAVE_LINUX_THREADS
7139         pthread_kill_other_threads_np();
7140 #endif
7141
7142         exit( status );
7143
7144 }
7145
7146 EOF
7147 if { (eval echo configure:7148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7148 then
7149   ol_cv_pthread_create=yes
7150 else
7151   echo "configure: failed program was:" >&5
7152   cat conftest.$ac_ext >&5
7153   rm -fr conftest*
7154   ol_cv_pthread_create=no
7155 fi
7156 rm -fr conftest*
7157 fi
7158
7159 fi
7160
7161 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7162
7163                 if test $ol_cv_pthread_create != no ; then
7164                         ol_link_threads=posix
7165                         ol_link_pthreads=""
7166                 fi
7167                 
7168                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7169 if test "$ol_link_threads" = no ; then
7170         # try -kthread
7171         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7172 echo "configure:7173: checking for pthread link with -kthread" >&5
7173 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7174   echo $ac_n "(cached) $ac_c" 1>&6
7175 else
7176   
7177                 # save the flags
7178                 ol_LIBS="$LIBS"
7179                 LIBS="-kthread $LIBS"
7180
7181                 if test "$cross_compiling" = yes; then
7182   cat > conftest.$ac_ext <<EOF
7183 #line 7184 "configure"
7184 #include "confdefs.h"
7185 /* pthread test headers */
7186 #include <pthread.h>
7187 #ifndef NULL
7188 #define NULL (void*)0
7189 #endif
7190
7191 static void *task(p)
7192         void *p;
7193 {
7194         return (void *) (p == NULL);
7195 }
7196
7197 int main() {
7198
7199         /* pthread test function */
7200         pthread_t t;
7201         int status;
7202 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7203         /* This system (e.g. AIX) defaults detached; must override */
7204         pthread_attr_t attr;
7205
7206         status = pthread_attr_init(&attr);
7207         if( status ) exit( status );
7208
7209         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7210         if( status ) exit( status );
7211
7212 #define ATTR    &attr
7213 #else
7214 #if HAVE_PTHREADS_D4
7215 #define ATTR    pthread_attr_default
7216 #else
7217 #define ATTR    NULL
7218 #endif
7219 #endif
7220         /* make sure pthread_create() isn't just a stub */
7221         status = pthread_create(&t, ATTR, task, NULL);
7222         if( status ) exit( status );
7223
7224         /* make sure pthread_detach() isn't just a stub */
7225 #if HAVE_PTHREADS_D4
7226         status = pthread_detach( &t );
7227 #else
7228         status = pthread_detach( t );
7229 #endif
7230
7231 #ifdef HAVE_LINUX_THREADS
7232         pthread_kill_other_threads_np();
7233 #endif
7234
7235         exit( status );
7236
7237 ; return 0; }
7238 EOF
7239 if { (eval echo configure:7240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7240   rm -rf conftest*
7241   ol_cv_pthread_kthread=yes
7242 else
7243   echo "configure: failed program was:" >&5
7244   cat conftest.$ac_ext >&5
7245   rm -rf conftest*
7246   ol_cv_pthread_kthread=no
7247 fi
7248 rm -f conftest*
7249 else
7250   cat > conftest.$ac_ext <<EOF
7251 #line 7252 "configure"
7252 #include "confdefs.h"
7253 /* pthread test headers */
7254 #include <pthread.h>
7255 #ifndef NULL
7256 #define NULL (void*)0
7257 #endif
7258
7259 static void *task(p)
7260         void *p;
7261 {
7262         return (void *) (p == NULL);
7263 }
7264
7265
7266 int main(argc, argv)
7267         int argc;
7268         char **argv;
7269 {
7270
7271         /* pthread test function */
7272         pthread_t t;
7273         int status;
7274 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7275         /* This system (e.g. AIX) defaults detached; must override */
7276         pthread_attr_t attr;
7277
7278         status = pthread_attr_init(&attr);
7279         if( status ) exit( status );
7280
7281         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7282         if( status ) exit( status );
7283
7284 #define ATTR    &attr
7285 #else
7286 #if HAVE_PTHREADS_D4
7287 #define ATTR    pthread_attr_default
7288 #else
7289 #define ATTR    NULL
7290 #endif
7291 #endif
7292         /* make sure pthread_create() isn't just a stub */
7293         status = pthread_create(&t, ATTR, task, NULL);
7294         if( status ) exit( status );
7295
7296         /* make sure pthread_detach() isn't just a stub */
7297 #if HAVE_PTHREADS_D4
7298         status = pthread_detach( &t );
7299 #else
7300         status = pthread_detach( t );
7301 #endif
7302
7303 #ifdef HAVE_LINUX_THREADS
7304         pthread_kill_other_threads_np();
7305 #endif
7306
7307         exit( status );
7308
7309 }
7310
7311 EOF
7312 if { (eval echo configure:7313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7313 then
7314   ol_cv_pthread_kthread=yes
7315 else
7316   echo "configure: failed program was:" >&5
7317   cat conftest.$ac_ext >&5
7318   rm -fr conftest*
7319   ol_cv_pthread_kthread=no
7320 fi
7321 rm -fr conftest*
7322 fi
7323
7324
7325                 # restore the LIBS
7326                 LIBS="$ol_LIBS"
7327         
7328 fi
7329
7330 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7331
7332         if test $ol_cv_pthread_kthread = yes ; then
7333                 ol_link_pthreads="-kthread"
7334                 ol_link_threads=posix
7335         fi
7336 fi
7337
7338                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7339 if test "$ol_link_threads" = no ; then
7340         # try -pthread
7341         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7342 echo "configure:7343: checking for pthread link with -pthread" >&5
7343 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7344   echo $ac_n "(cached) $ac_c" 1>&6
7345 else
7346   
7347                 # save the flags
7348                 ol_LIBS="$LIBS"
7349                 LIBS="-pthread $LIBS"
7350
7351                 if test "$cross_compiling" = yes; then
7352   cat > conftest.$ac_ext <<EOF
7353 #line 7354 "configure"
7354 #include "confdefs.h"
7355 /* pthread test headers */
7356 #include <pthread.h>
7357 #ifndef NULL
7358 #define NULL (void*)0
7359 #endif
7360
7361 static void *task(p)
7362         void *p;
7363 {
7364         return (void *) (p == NULL);
7365 }
7366
7367 int main() {
7368
7369         /* pthread test function */
7370         pthread_t t;
7371         int status;
7372 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7373         /* This system (e.g. AIX) defaults detached; must override */
7374         pthread_attr_t attr;
7375
7376         status = pthread_attr_init(&attr);
7377         if( status ) exit( status );
7378
7379         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7380         if( status ) exit( status );
7381
7382 #define ATTR    &attr
7383 #else
7384 #if HAVE_PTHREADS_D4
7385 #define ATTR    pthread_attr_default
7386 #else
7387 #define ATTR    NULL
7388 #endif
7389 #endif
7390         /* make sure pthread_create() isn't just a stub */
7391         status = pthread_create(&t, ATTR, task, NULL);
7392         if( status ) exit( status );
7393
7394         /* make sure pthread_detach() isn't just a stub */
7395 #if HAVE_PTHREADS_D4
7396         status = pthread_detach( &t );
7397 #else
7398         status = pthread_detach( t );
7399 #endif
7400
7401 #ifdef HAVE_LINUX_THREADS
7402         pthread_kill_other_threads_np();
7403 #endif
7404
7405         exit( status );
7406
7407 ; return 0; }
7408 EOF
7409 if { (eval echo configure:7410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7410   rm -rf conftest*
7411   ol_cv_pthread_pthread=yes
7412 else
7413   echo "configure: failed program was:" >&5
7414   cat conftest.$ac_ext >&5
7415   rm -rf conftest*
7416   ol_cv_pthread_pthread=no
7417 fi
7418 rm -f conftest*
7419 else
7420   cat > conftest.$ac_ext <<EOF
7421 #line 7422 "configure"
7422 #include "confdefs.h"
7423 /* pthread test headers */
7424 #include <pthread.h>
7425 #ifndef NULL
7426 #define NULL (void*)0
7427 #endif
7428
7429 static void *task(p)
7430         void *p;
7431 {
7432         return (void *) (p == NULL);
7433 }
7434
7435
7436 int main(argc, argv)
7437         int argc;
7438         char **argv;
7439 {
7440
7441         /* pthread test function */
7442         pthread_t t;
7443         int status;
7444 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7445         /* This system (e.g. AIX) defaults detached; must override */
7446         pthread_attr_t attr;
7447
7448         status = pthread_attr_init(&attr);
7449         if( status ) exit( status );
7450
7451         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7452         if( status ) exit( status );
7453
7454 #define ATTR    &attr
7455 #else
7456 #if HAVE_PTHREADS_D4
7457 #define ATTR    pthread_attr_default
7458 #else
7459 #define ATTR    NULL
7460 #endif
7461 #endif
7462         /* make sure pthread_create() isn't just a stub */
7463         status = pthread_create(&t, ATTR, task, NULL);
7464         if( status ) exit( status );
7465
7466         /* make sure pthread_detach() isn't just a stub */
7467 #if HAVE_PTHREADS_D4
7468         status = pthread_detach( &t );
7469 #else
7470         status = pthread_detach( t );
7471 #endif
7472
7473 #ifdef HAVE_LINUX_THREADS
7474         pthread_kill_other_threads_np();
7475 #endif
7476
7477         exit( status );
7478
7479 }
7480
7481 EOF
7482 if { (eval echo configure:7483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7483 then
7484   ol_cv_pthread_pthread=yes
7485 else
7486   echo "configure: failed program was:" >&5
7487   cat conftest.$ac_ext >&5
7488   rm -fr conftest*
7489   ol_cv_pthread_pthread=no
7490 fi
7491 rm -fr conftest*
7492 fi
7493
7494
7495                 # restore the LIBS
7496                 LIBS="$ol_LIBS"
7497         
7498 fi
7499
7500 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7501
7502         if test $ol_cv_pthread_pthread = yes ; then
7503                 ol_link_pthreads="-pthread"
7504                 ol_link_threads=posix
7505         fi
7506 fi
7507
7508                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7509 if test "$ol_link_threads" = no ; then
7510         # try -pthreads
7511         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7512 echo "configure:7513: checking for pthread link with -pthreads" >&5
7513 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7514   echo $ac_n "(cached) $ac_c" 1>&6
7515 else
7516   
7517                 # save the flags
7518                 ol_LIBS="$LIBS"
7519                 LIBS="-pthreads $LIBS"
7520
7521                 if test "$cross_compiling" = yes; then
7522   cat > conftest.$ac_ext <<EOF
7523 #line 7524 "configure"
7524 #include "confdefs.h"
7525 /* pthread test headers */
7526 #include <pthread.h>
7527 #ifndef NULL
7528 #define NULL (void*)0
7529 #endif
7530
7531 static void *task(p)
7532         void *p;
7533 {
7534         return (void *) (p == NULL);
7535 }
7536
7537 int main() {
7538
7539         /* pthread test function */
7540         pthread_t t;
7541         int status;
7542 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7543         /* This system (e.g. AIX) defaults detached; must override */
7544         pthread_attr_t attr;
7545
7546         status = pthread_attr_init(&attr);
7547         if( status ) exit( status );
7548
7549         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7550         if( status ) exit( status );
7551
7552 #define ATTR    &attr
7553 #else
7554 #if HAVE_PTHREADS_D4
7555 #define ATTR    pthread_attr_default
7556 #else
7557 #define ATTR    NULL
7558 #endif
7559 #endif
7560         /* make sure pthread_create() isn't just a stub */
7561         status = pthread_create(&t, ATTR, task, NULL);
7562         if( status ) exit( status );
7563
7564         /* make sure pthread_detach() isn't just a stub */
7565 #if HAVE_PTHREADS_D4
7566         status = pthread_detach( &t );
7567 #else
7568         status = pthread_detach( t );
7569 #endif
7570
7571 #ifdef HAVE_LINUX_THREADS
7572         pthread_kill_other_threads_np();
7573 #endif
7574
7575         exit( status );
7576
7577 ; return 0; }
7578 EOF
7579 if { (eval echo configure:7580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7580   rm -rf conftest*
7581   ol_cv_pthread_pthreads=yes
7582 else
7583   echo "configure: failed program was:" >&5
7584   cat conftest.$ac_ext >&5
7585   rm -rf conftest*
7586   ol_cv_pthread_pthreads=no
7587 fi
7588 rm -f conftest*
7589 else
7590   cat > conftest.$ac_ext <<EOF
7591 #line 7592 "configure"
7592 #include "confdefs.h"
7593 /* pthread test headers */
7594 #include <pthread.h>
7595 #ifndef NULL
7596 #define NULL (void*)0
7597 #endif
7598
7599 static void *task(p)
7600         void *p;
7601 {
7602         return (void *) (p == NULL);
7603 }
7604
7605
7606 int main(argc, argv)
7607         int argc;
7608         char **argv;
7609 {
7610
7611         /* pthread test function */
7612         pthread_t t;
7613         int status;
7614 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7615         /* This system (e.g. AIX) defaults detached; must override */
7616         pthread_attr_t attr;
7617
7618         status = pthread_attr_init(&attr);
7619         if( status ) exit( status );
7620
7621         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7622         if( status ) exit( status );
7623
7624 #define ATTR    &attr
7625 #else
7626 #if HAVE_PTHREADS_D4
7627 #define ATTR    pthread_attr_default
7628 #else
7629 #define ATTR    NULL
7630 #endif
7631 #endif
7632         /* make sure pthread_create() isn't just a stub */
7633         status = pthread_create(&t, ATTR, task, NULL);
7634         if( status ) exit( status );
7635
7636         /* make sure pthread_detach() isn't just a stub */
7637 #if HAVE_PTHREADS_D4
7638         status = pthread_detach( &t );
7639 #else
7640         status = pthread_detach( t );
7641 #endif
7642
7643 #ifdef HAVE_LINUX_THREADS
7644         pthread_kill_other_threads_np();
7645 #endif
7646
7647         exit( status );
7648
7649 }
7650
7651 EOF
7652 if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7653 then
7654   ol_cv_pthread_pthreads=yes
7655 else
7656   echo "configure: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   rm -fr conftest*
7659   ol_cv_pthread_pthreads=no
7660 fi
7661 rm -fr conftest*
7662 fi
7663
7664
7665                 # restore the LIBS
7666                 LIBS="$ol_LIBS"
7667         
7668 fi
7669
7670 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7671
7672         if test $ol_cv_pthread_pthreads = yes ; then
7673                 ol_link_pthreads="-pthreads"
7674                 ol_link_threads=posix
7675         fi
7676 fi
7677
7678                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7679 if test "$ol_link_threads" = no ; then
7680         # try -mthreads
7681         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7682 echo "configure:7683: checking for pthread link with -mthreads" >&5
7683 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7684   echo $ac_n "(cached) $ac_c" 1>&6
7685 else
7686   
7687                 # save the flags
7688                 ol_LIBS="$LIBS"
7689                 LIBS="-mthreads $LIBS"
7690
7691                 if test "$cross_compiling" = yes; then
7692   cat > conftest.$ac_ext <<EOF
7693 #line 7694 "configure"
7694 #include "confdefs.h"
7695 /* pthread test headers */
7696 #include <pthread.h>
7697 #ifndef NULL
7698 #define NULL (void*)0
7699 #endif
7700
7701 static void *task(p)
7702         void *p;
7703 {
7704         return (void *) (p == NULL);
7705 }
7706
7707 int main() {
7708
7709         /* pthread test function */
7710         pthread_t t;
7711         int status;
7712 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7713         /* This system (e.g. AIX) defaults detached; must override */
7714         pthread_attr_t attr;
7715
7716         status = pthread_attr_init(&attr);
7717         if( status ) exit( status );
7718
7719         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7720         if( status ) exit( status );
7721
7722 #define ATTR    &attr
7723 #else
7724 #if HAVE_PTHREADS_D4
7725 #define ATTR    pthread_attr_default
7726 #else
7727 #define ATTR    NULL
7728 #endif
7729 #endif
7730         /* make sure pthread_create() isn't just a stub */
7731         status = pthread_create(&t, ATTR, task, NULL);
7732         if( status ) exit( status );
7733
7734         /* make sure pthread_detach() isn't just a stub */
7735 #if HAVE_PTHREADS_D4
7736         status = pthread_detach( &t );
7737 #else
7738         status = pthread_detach( t );
7739 #endif
7740
7741 #ifdef HAVE_LINUX_THREADS
7742         pthread_kill_other_threads_np();
7743 #endif
7744
7745         exit( status );
7746
7747 ; return 0; }
7748 EOF
7749 if { (eval echo configure:7750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7750   rm -rf conftest*
7751   ol_cv_pthread_mthreads=yes
7752 else
7753   echo "configure: failed program was:" >&5
7754   cat conftest.$ac_ext >&5
7755   rm -rf conftest*
7756   ol_cv_pthread_mthreads=no
7757 fi
7758 rm -f conftest*
7759 else
7760   cat > conftest.$ac_ext <<EOF
7761 #line 7762 "configure"
7762 #include "confdefs.h"
7763 /* pthread test headers */
7764 #include <pthread.h>
7765 #ifndef NULL
7766 #define NULL (void*)0
7767 #endif
7768
7769 static void *task(p)
7770         void *p;
7771 {
7772         return (void *) (p == NULL);
7773 }
7774
7775
7776 int main(argc, argv)
7777         int argc;
7778         char **argv;
7779 {
7780
7781         /* pthread test function */
7782         pthread_t t;
7783         int status;
7784 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7785         /* This system (e.g. AIX) defaults detached; must override */
7786         pthread_attr_t attr;
7787
7788         status = pthread_attr_init(&attr);
7789         if( status ) exit( status );
7790
7791         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7792         if( status ) exit( status );
7793
7794 #define ATTR    &attr
7795 #else
7796 #if HAVE_PTHREADS_D4
7797 #define ATTR    pthread_attr_default
7798 #else
7799 #define ATTR    NULL
7800 #endif
7801 #endif
7802         /* make sure pthread_create() isn't just a stub */
7803         status = pthread_create(&t, ATTR, task, NULL);
7804         if( status ) exit( status );
7805
7806         /* make sure pthread_detach() isn't just a stub */
7807 #if HAVE_PTHREADS_D4
7808         status = pthread_detach( &t );
7809 #else
7810         status = pthread_detach( t );
7811 #endif
7812
7813 #ifdef HAVE_LINUX_THREADS
7814         pthread_kill_other_threads_np();
7815 #endif
7816
7817         exit( status );
7818
7819 }
7820
7821 EOF
7822 if { (eval echo configure:7823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7823 then
7824   ol_cv_pthread_mthreads=yes
7825 else
7826   echo "configure: failed program was:" >&5
7827   cat conftest.$ac_ext >&5
7828   rm -fr conftest*
7829   ol_cv_pthread_mthreads=no
7830 fi
7831 rm -fr conftest*
7832 fi
7833
7834
7835                 # restore the LIBS
7836                 LIBS="$ol_LIBS"
7837         
7838 fi
7839
7840 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7841
7842         if test $ol_cv_pthread_mthreads = yes ; then
7843                 ol_link_pthreads="-mthreads"
7844                 ol_link_threads=posix
7845         fi
7846 fi
7847
7848                 # Pthread try link: -thread (ol_cv_pthread_thread)
7849 if test "$ol_link_threads" = no ; then
7850         # try -thread
7851         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7852 echo "configure:7853: checking for pthread link with -thread" >&5
7853 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7854   echo $ac_n "(cached) $ac_c" 1>&6
7855 else
7856   
7857                 # save the flags
7858                 ol_LIBS="$LIBS"
7859                 LIBS="-thread $LIBS"
7860
7861                 if test "$cross_compiling" = yes; then
7862   cat > conftest.$ac_ext <<EOF
7863 #line 7864 "configure"
7864 #include "confdefs.h"
7865 /* pthread test headers */
7866 #include <pthread.h>
7867 #ifndef NULL
7868 #define NULL (void*)0
7869 #endif
7870
7871 static void *task(p)
7872         void *p;
7873 {
7874         return (void *) (p == NULL);
7875 }
7876
7877 int main() {
7878
7879         /* pthread test function */
7880         pthread_t t;
7881         int status;
7882 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7883         /* This system (e.g. AIX) defaults detached; must override */
7884         pthread_attr_t attr;
7885
7886         status = pthread_attr_init(&attr);
7887         if( status ) exit( status );
7888
7889         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7890         if( status ) exit( status );
7891
7892 #define ATTR    &attr
7893 #else
7894 #if HAVE_PTHREADS_D4
7895 #define ATTR    pthread_attr_default
7896 #else
7897 #define ATTR    NULL
7898 #endif
7899 #endif
7900         /* make sure pthread_create() isn't just a stub */
7901         status = pthread_create(&t, ATTR, task, NULL);
7902         if( status ) exit( status );
7903
7904         /* make sure pthread_detach() isn't just a stub */
7905 #if HAVE_PTHREADS_D4
7906         status = pthread_detach( &t );
7907 #else
7908         status = pthread_detach( t );
7909 #endif
7910
7911 #ifdef HAVE_LINUX_THREADS
7912         pthread_kill_other_threads_np();
7913 #endif
7914
7915         exit( status );
7916
7917 ; return 0; }
7918 EOF
7919 if { (eval echo configure:7920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7920   rm -rf conftest*
7921   ol_cv_pthread_thread=yes
7922 else
7923   echo "configure: failed program was:" >&5
7924   cat conftest.$ac_ext >&5
7925   rm -rf conftest*
7926   ol_cv_pthread_thread=no
7927 fi
7928 rm -f conftest*
7929 else
7930   cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933 /* pthread test headers */
7934 #include <pthread.h>
7935 #ifndef NULL
7936 #define NULL (void*)0
7937 #endif
7938
7939 static void *task(p)
7940         void *p;
7941 {
7942         return (void *) (p == NULL);
7943 }
7944
7945
7946 int main(argc, argv)
7947         int argc;
7948         char **argv;
7949 {
7950
7951         /* pthread test function */
7952         pthread_t t;
7953         int status;
7954 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7955         /* This system (e.g. AIX) defaults detached; must override */
7956         pthread_attr_t attr;
7957
7958         status = pthread_attr_init(&attr);
7959         if( status ) exit( status );
7960
7961         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7962         if( status ) exit( status );
7963
7964 #define ATTR    &attr
7965 #else
7966 #if HAVE_PTHREADS_D4
7967 #define ATTR    pthread_attr_default
7968 #else
7969 #define ATTR    NULL
7970 #endif
7971 #endif
7972         /* make sure pthread_create() isn't just a stub */
7973         status = pthread_create(&t, ATTR, task, NULL);
7974         if( status ) exit( status );
7975
7976         /* make sure pthread_detach() isn't just a stub */
7977 #if HAVE_PTHREADS_D4
7978         status = pthread_detach( &t );
7979 #else
7980         status = pthread_detach( t );
7981 #endif
7982
7983 #ifdef HAVE_LINUX_THREADS
7984         pthread_kill_other_threads_np();
7985 #endif
7986
7987         exit( status );
7988
7989 }
7990
7991 EOF
7992 if { (eval echo configure:7993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7993 then
7994   ol_cv_pthread_thread=yes
7995 else
7996   echo "configure: failed program was:" >&5
7997   cat conftest.$ac_ext >&5
7998   rm -fr conftest*
7999   ol_cv_pthread_thread=no
8000 fi
8001 rm -fr conftest*
8002 fi
8003
8004
8005                 # restore the LIBS
8006                 LIBS="$ol_LIBS"
8007         
8008 fi
8009
8010 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8011
8012         if test $ol_cv_pthread_thread = yes ; then
8013                 ol_link_pthreads="-thread"
8014                 ol_link_threads=posix
8015         fi
8016 fi
8017
8018
8019                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8020 if test "$ol_link_threads" = no ; then
8021         # try -lpthread -lmach -lexc -lc_r
8022         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8023 echo "configure:8024: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8024 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8025   echo $ac_n "(cached) $ac_c" 1>&6
8026 else
8027   
8028                 # save the flags
8029                 ol_LIBS="$LIBS"
8030                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8031
8032                 if test "$cross_compiling" = yes; then
8033   cat > conftest.$ac_ext <<EOF
8034 #line 8035 "configure"
8035 #include "confdefs.h"
8036 /* pthread test headers */
8037 #include <pthread.h>
8038 #ifndef NULL
8039 #define NULL (void*)0
8040 #endif
8041
8042 static void *task(p)
8043         void *p;
8044 {
8045         return (void *) (p == NULL);
8046 }
8047
8048 int main() {
8049
8050         /* pthread test function */
8051         pthread_t t;
8052         int status;
8053 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8054         /* This system (e.g. AIX) defaults detached; must override */
8055         pthread_attr_t attr;
8056
8057         status = pthread_attr_init(&attr);
8058         if( status ) exit( status );
8059
8060         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8061         if( status ) exit( status );
8062
8063 #define ATTR    &attr
8064 #else
8065 #if HAVE_PTHREADS_D4
8066 #define ATTR    pthread_attr_default
8067 #else
8068 #define ATTR    NULL
8069 #endif
8070 #endif
8071         /* make sure pthread_create() isn't just a stub */
8072         status = pthread_create(&t, ATTR, task, NULL);
8073         if( status ) exit( status );
8074
8075         /* make sure pthread_detach() isn't just a stub */
8076 #if HAVE_PTHREADS_D4
8077         status = pthread_detach( &t );
8078 #else
8079         status = pthread_detach( t );
8080 #endif
8081
8082 #ifdef HAVE_LINUX_THREADS
8083         pthread_kill_other_threads_np();
8084 #endif
8085
8086         exit( status );
8087
8088 ; return 0; }
8089 EOF
8090 if { (eval echo configure:8091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8091   rm -rf conftest*
8092   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8093 else
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -rf conftest*
8097   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8098 fi
8099 rm -f conftest*
8100 else
8101   cat > conftest.$ac_ext <<EOF
8102 #line 8103 "configure"
8103 #include "confdefs.h"
8104 /* pthread test headers */
8105 #include <pthread.h>
8106 #ifndef NULL
8107 #define NULL (void*)0
8108 #endif
8109
8110 static void *task(p)
8111         void *p;
8112 {
8113         return (void *) (p == NULL);
8114 }
8115
8116
8117 int main(argc, argv)
8118         int argc;
8119         char **argv;
8120 {
8121
8122         /* pthread test function */
8123         pthread_t t;
8124         int status;
8125 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8126         /* This system (e.g. AIX) defaults detached; must override */
8127         pthread_attr_t attr;
8128
8129         status = pthread_attr_init(&attr);
8130         if( status ) exit( status );
8131
8132         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8133         if( status ) exit( status );
8134
8135 #define ATTR    &attr
8136 #else
8137 #if HAVE_PTHREADS_D4
8138 #define ATTR    pthread_attr_default
8139 #else
8140 #define ATTR    NULL
8141 #endif
8142 #endif
8143         /* make sure pthread_create() isn't just a stub */
8144         status = pthread_create(&t, ATTR, task, NULL);
8145         if( status ) exit( status );
8146
8147         /* make sure pthread_detach() isn't just a stub */
8148 #if HAVE_PTHREADS_D4
8149         status = pthread_detach( &t );
8150 #else
8151         status = pthread_detach( t );
8152 #endif
8153
8154 #ifdef HAVE_LINUX_THREADS
8155         pthread_kill_other_threads_np();
8156 #endif
8157
8158         exit( status );
8159
8160 }
8161
8162 EOF
8163 if { (eval echo configure:8164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8164 then
8165   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8166 else
8167   echo "configure: failed program was:" >&5
8168   cat conftest.$ac_ext >&5
8169   rm -fr conftest*
8170   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8171 fi
8172 rm -fr conftest*
8173 fi
8174
8175
8176                 # restore the LIBS
8177                 LIBS="$ol_LIBS"
8178         
8179 fi
8180
8181 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8182
8183         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8184                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8185                 ol_link_threads=posix
8186         fi
8187 fi
8188
8189                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8190 if test "$ol_link_threads" = no ; then
8191         # try -lpthread -lmach -lexc
8192         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8193 echo "configure:8194: checking for pthread link with -lpthread -lmach -lexc" >&5
8194 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8195   echo $ac_n "(cached) $ac_c" 1>&6
8196 else
8197   
8198                 # save the flags
8199                 ol_LIBS="$LIBS"
8200                 LIBS="-lpthread -lmach -lexc $LIBS"
8201
8202                 if test "$cross_compiling" = yes; then
8203   cat > conftest.$ac_ext <<EOF
8204 #line 8205 "configure"
8205 #include "confdefs.h"
8206 /* pthread test headers */
8207 #include <pthread.h>
8208 #ifndef NULL
8209 #define NULL (void*)0
8210 #endif
8211
8212 static void *task(p)
8213         void *p;
8214 {
8215         return (void *) (p == NULL);
8216 }
8217
8218 int main() {
8219
8220         /* pthread test function */
8221         pthread_t t;
8222         int status;
8223 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8224         /* This system (e.g. AIX) defaults detached; must override */
8225         pthread_attr_t attr;
8226
8227         status = pthread_attr_init(&attr);
8228         if( status ) exit( status );
8229
8230         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8231         if( status ) exit( status );
8232
8233 #define ATTR    &attr
8234 #else
8235 #if HAVE_PTHREADS_D4
8236 #define ATTR    pthread_attr_default
8237 #else
8238 #define ATTR    NULL
8239 #endif
8240 #endif
8241         /* make sure pthread_create() isn't just a stub */
8242         status = pthread_create(&t, ATTR, task, NULL);
8243         if( status ) exit( status );
8244
8245         /* make sure pthread_detach() isn't just a stub */
8246 #if HAVE_PTHREADS_D4
8247         status = pthread_detach( &t );
8248 #else
8249         status = pthread_detach( t );
8250 #endif
8251
8252 #ifdef HAVE_LINUX_THREADS
8253         pthread_kill_other_threads_np();
8254 #endif
8255
8256         exit( status );
8257
8258 ; return 0; }
8259 EOF
8260 if { (eval echo configure:8261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8261   rm -rf conftest*
8262   ol_cv_pthread_lpthread_lmach_lexc=yes
8263 else
8264   echo "configure: failed program was:" >&5
8265   cat conftest.$ac_ext >&5
8266   rm -rf conftest*
8267   ol_cv_pthread_lpthread_lmach_lexc=no
8268 fi
8269 rm -f conftest*
8270 else
8271   cat > conftest.$ac_ext <<EOF
8272 #line 8273 "configure"
8273 #include "confdefs.h"
8274 /* pthread test headers */
8275 #include <pthread.h>
8276 #ifndef NULL
8277 #define NULL (void*)0
8278 #endif
8279
8280 static void *task(p)
8281         void *p;
8282 {
8283         return (void *) (p == NULL);
8284 }
8285
8286
8287 int main(argc, argv)
8288         int argc;
8289         char **argv;
8290 {
8291
8292         /* pthread test function */
8293         pthread_t t;
8294         int status;
8295 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8296         /* This system (e.g. AIX) defaults detached; must override */
8297         pthread_attr_t attr;
8298
8299         status = pthread_attr_init(&attr);
8300         if( status ) exit( status );
8301
8302         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8303         if( status ) exit( status );
8304
8305 #define ATTR    &attr
8306 #else
8307 #if HAVE_PTHREADS_D4
8308 #define ATTR    pthread_attr_default
8309 #else
8310 #define ATTR    NULL
8311 #endif
8312 #endif
8313         /* make sure pthread_create() isn't just a stub */
8314         status = pthread_create(&t, ATTR, task, NULL);
8315         if( status ) exit( status );
8316
8317         /* make sure pthread_detach() isn't just a stub */
8318 #if HAVE_PTHREADS_D4
8319         status = pthread_detach( &t );
8320 #else
8321         status = pthread_detach( t );
8322 #endif
8323
8324 #ifdef HAVE_LINUX_THREADS
8325         pthread_kill_other_threads_np();
8326 #endif
8327
8328         exit( status );
8329
8330 }
8331
8332 EOF
8333 if { (eval echo configure:8334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8334 then
8335   ol_cv_pthread_lpthread_lmach_lexc=yes
8336 else
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -fr conftest*
8340   ol_cv_pthread_lpthread_lmach_lexc=no
8341 fi
8342 rm -fr conftest*
8343 fi
8344
8345
8346                 # restore the LIBS
8347                 LIBS="$ol_LIBS"
8348         
8349 fi
8350
8351 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8352
8353         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8354                 ol_link_pthreads="-lpthread -lmach -lexc"
8355                 ol_link_threads=posix
8356         fi
8357 fi
8358
8359
8360                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8361 if test "$ol_link_threads" = no ; then
8362         # try -lpthread -Wl,-woff,85
8363         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8364 echo "configure:8365: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8365 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8366   echo $ac_n "(cached) $ac_c" 1>&6
8367 else
8368   
8369                 # save the flags
8370                 ol_LIBS="$LIBS"
8371                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8372
8373                 if test "$cross_compiling" = yes; then
8374   cat > conftest.$ac_ext <<EOF
8375 #line 8376 "configure"
8376 #include "confdefs.h"
8377 /* pthread test headers */
8378 #include <pthread.h>
8379 #ifndef NULL
8380 #define NULL (void*)0
8381 #endif
8382
8383 static void *task(p)
8384         void *p;
8385 {
8386         return (void *) (p == NULL);
8387 }
8388
8389 int main() {
8390
8391         /* pthread test function */
8392         pthread_t t;
8393         int status;
8394 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8395         /* This system (e.g. AIX) defaults detached; must override */
8396         pthread_attr_t attr;
8397
8398         status = pthread_attr_init(&attr);
8399         if( status ) exit( status );
8400
8401         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8402         if( status ) exit( status );
8403
8404 #define ATTR    &attr
8405 #else
8406 #if HAVE_PTHREADS_D4
8407 #define ATTR    pthread_attr_default
8408 #else
8409 #define ATTR    NULL
8410 #endif
8411 #endif
8412         /* make sure pthread_create() isn't just a stub */
8413         status = pthread_create(&t, ATTR, task, NULL);
8414         if( status ) exit( status );
8415
8416         /* make sure pthread_detach() isn't just a stub */
8417 #if HAVE_PTHREADS_D4
8418         status = pthread_detach( &t );
8419 #else
8420         status = pthread_detach( t );
8421 #endif
8422
8423 #ifdef HAVE_LINUX_THREADS
8424         pthread_kill_other_threads_np();
8425 #endif
8426
8427         exit( status );
8428
8429 ; return 0; }
8430 EOF
8431 if { (eval echo configure:8432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8432   rm -rf conftest*
8433   ol_cv_pthread_lib_lpthread_woff=yes
8434 else
8435   echo "configure: failed program was:" >&5
8436   cat conftest.$ac_ext >&5
8437   rm -rf conftest*
8438   ol_cv_pthread_lib_lpthread_woff=no
8439 fi
8440 rm -f conftest*
8441 else
8442   cat > conftest.$ac_ext <<EOF
8443 #line 8444 "configure"
8444 #include "confdefs.h"
8445 /* pthread test headers */
8446 #include <pthread.h>
8447 #ifndef NULL
8448 #define NULL (void*)0
8449 #endif
8450
8451 static void *task(p)
8452         void *p;
8453 {
8454         return (void *) (p == NULL);
8455 }
8456
8457
8458 int main(argc, argv)
8459         int argc;
8460         char **argv;
8461 {
8462
8463         /* pthread test function */
8464         pthread_t t;
8465         int status;
8466 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8467         /* This system (e.g. AIX) defaults detached; must override */
8468         pthread_attr_t attr;
8469
8470         status = pthread_attr_init(&attr);
8471         if( status ) exit( status );
8472
8473         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8474         if( status ) exit( status );
8475
8476 #define ATTR    &attr
8477 #else
8478 #if HAVE_PTHREADS_D4
8479 #define ATTR    pthread_attr_default
8480 #else
8481 #define ATTR    NULL
8482 #endif
8483 #endif
8484         /* make sure pthread_create() isn't just a stub */
8485         status = pthread_create(&t, ATTR, task, NULL);
8486         if( status ) exit( status );
8487
8488         /* make sure pthread_detach() isn't just a stub */
8489 #if HAVE_PTHREADS_D4
8490         status = pthread_detach( &t );
8491 #else
8492         status = pthread_detach( t );
8493 #endif
8494
8495 #ifdef HAVE_LINUX_THREADS
8496         pthread_kill_other_threads_np();
8497 #endif
8498
8499         exit( status );
8500
8501 }
8502
8503 EOF
8504 if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8505 then
8506   ol_cv_pthread_lib_lpthread_woff=yes
8507 else
8508   echo "configure: failed program was:" >&5
8509   cat conftest.$ac_ext >&5
8510   rm -fr conftest*
8511   ol_cv_pthread_lib_lpthread_woff=no
8512 fi
8513 rm -fr conftest*
8514 fi
8515
8516
8517                 # restore the LIBS
8518                 LIBS="$ol_LIBS"
8519         
8520 fi
8521
8522 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8523
8524         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8525                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8526                 ol_link_threads=posix
8527         fi
8528 fi
8529
8530
8531                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8532 if test "$ol_link_threads" = no ; then
8533         # try -lpthread
8534         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8535 echo "configure:8536: checking for pthread link with -lpthread" >&5
8536 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8537   echo $ac_n "(cached) $ac_c" 1>&6
8538 else
8539   
8540                 # save the flags
8541                 ol_LIBS="$LIBS"
8542                 LIBS="-lpthread $LIBS"
8543
8544                 if test "$cross_compiling" = yes; then
8545   cat > conftest.$ac_ext <<EOF
8546 #line 8547 "configure"
8547 #include "confdefs.h"
8548 /* pthread test headers */
8549 #include <pthread.h>
8550 #ifndef NULL
8551 #define NULL (void*)0
8552 #endif
8553
8554 static void *task(p)
8555         void *p;
8556 {
8557         return (void *) (p == NULL);
8558 }
8559
8560 int main() {
8561
8562         /* pthread test function */
8563         pthread_t t;
8564         int status;
8565 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8566         /* This system (e.g. AIX) defaults detached; must override */
8567         pthread_attr_t attr;
8568
8569         status = pthread_attr_init(&attr);
8570         if( status ) exit( status );
8571
8572         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8573         if( status ) exit( status );
8574
8575 #define ATTR    &attr
8576 #else
8577 #if HAVE_PTHREADS_D4
8578 #define ATTR    pthread_attr_default
8579 #else
8580 #define ATTR    NULL
8581 #endif
8582 #endif
8583         /* make sure pthread_create() isn't just a stub */
8584         status = pthread_create(&t, ATTR, task, NULL);
8585         if( status ) exit( status );
8586
8587         /* make sure pthread_detach() isn't just a stub */
8588 #if HAVE_PTHREADS_D4
8589         status = pthread_detach( &t );
8590 #else
8591         status = pthread_detach( t );
8592 #endif
8593
8594 #ifdef HAVE_LINUX_THREADS
8595         pthread_kill_other_threads_np();
8596 #endif
8597
8598         exit( status );
8599
8600 ; return 0; }
8601 EOF
8602 if { (eval echo configure:8603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8603   rm -rf conftest*
8604   ol_cv_pthread_lpthread=yes
8605 else
8606   echo "configure: failed program was:" >&5
8607   cat conftest.$ac_ext >&5
8608   rm -rf conftest*
8609   ol_cv_pthread_lpthread=no
8610 fi
8611 rm -f conftest*
8612 else
8613   cat > conftest.$ac_ext <<EOF
8614 #line 8615 "configure"
8615 #include "confdefs.h"
8616 /* pthread test headers */
8617 #include <pthread.h>
8618 #ifndef NULL
8619 #define NULL (void*)0
8620 #endif
8621
8622 static void *task(p)
8623         void *p;
8624 {
8625         return (void *) (p == NULL);
8626 }
8627
8628
8629 int main(argc, argv)
8630         int argc;
8631         char **argv;
8632 {
8633
8634         /* pthread test function */
8635         pthread_t t;
8636         int status;
8637 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8638         /* This system (e.g. AIX) defaults detached; must override */
8639         pthread_attr_t attr;
8640
8641         status = pthread_attr_init(&attr);
8642         if( status ) exit( status );
8643
8644         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8645         if( status ) exit( status );
8646
8647 #define ATTR    &attr
8648 #else
8649 #if HAVE_PTHREADS_D4
8650 #define ATTR    pthread_attr_default
8651 #else
8652 #define ATTR    NULL
8653 #endif
8654 #endif
8655         /* make sure pthread_create() isn't just a stub */
8656         status = pthread_create(&t, ATTR, task, NULL);
8657         if( status ) exit( status );
8658
8659         /* make sure pthread_detach() isn't just a stub */
8660 #if HAVE_PTHREADS_D4
8661         status = pthread_detach( &t );
8662 #else
8663         status = pthread_detach( t );
8664 #endif
8665
8666 #ifdef HAVE_LINUX_THREADS
8667         pthread_kill_other_threads_np();
8668 #endif
8669
8670         exit( status );
8671
8672 }
8673
8674 EOF
8675 if { (eval echo configure:8676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8676 then
8677   ol_cv_pthread_lpthread=yes
8678 else
8679   echo "configure: failed program was:" >&5
8680   cat conftest.$ac_ext >&5
8681   rm -fr conftest*
8682   ol_cv_pthread_lpthread=no
8683 fi
8684 rm -fr conftest*
8685 fi
8686
8687
8688                 # restore the LIBS
8689                 LIBS="$ol_LIBS"
8690         
8691 fi
8692
8693 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8694
8695         if test $ol_cv_pthread_lpthread = yes ; then
8696                 ol_link_pthreads="-lpthread"
8697                 ol_link_threads=posix
8698         fi
8699 fi
8700
8701                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8702 if test "$ol_link_threads" = no ; then
8703         # try -lc_r
8704         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8705 echo "configure:8706: checking for pthread link with -lc_r" >&5
8706 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8707   echo $ac_n "(cached) $ac_c" 1>&6
8708 else
8709   
8710                 # save the flags
8711                 ol_LIBS="$LIBS"
8712                 LIBS="-lc_r $LIBS"
8713
8714                 if test "$cross_compiling" = yes; then
8715   cat > conftest.$ac_ext <<EOF
8716 #line 8717 "configure"
8717 #include "confdefs.h"
8718 /* pthread test headers */
8719 #include <pthread.h>
8720 #ifndef NULL
8721 #define NULL (void*)0
8722 #endif
8723
8724 static void *task(p)
8725         void *p;
8726 {
8727         return (void *) (p == NULL);
8728 }
8729
8730 int main() {
8731
8732         /* pthread test function */
8733         pthread_t t;
8734         int status;
8735 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8736         /* This system (e.g. AIX) defaults detached; must override */
8737         pthread_attr_t attr;
8738
8739         status = pthread_attr_init(&attr);
8740         if( status ) exit( status );
8741
8742         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8743         if( status ) exit( status );
8744
8745 #define ATTR    &attr
8746 #else
8747 #if HAVE_PTHREADS_D4
8748 #define ATTR    pthread_attr_default
8749 #else
8750 #define ATTR    NULL
8751 #endif
8752 #endif
8753         /* make sure pthread_create() isn't just a stub */
8754         status = pthread_create(&t, ATTR, task, NULL);
8755         if( status ) exit( status );
8756
8757         /* make sure pthread_detach() isn't just a stub */
8758 #if HAVE_PTHREADS_D4
8759         status = pthread_detach( &t );
8760 #else
8761         status = pthread_detach( t );
8762 #endif
8763
8764 #ifdef HAVE_LINUX_THREADS
8765         pthread_kill_other_threads_np();
8766 #endif
8767
8768         exit( status );
8769
8770 ; return 0; }
8771 EOF
8772 if { (eval echo configure:8773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8773   rm -rf conftest*
8774   ol_cv_pthread_lc_r=yes
8775 else
8776   echo "configure: failed program was:" >&5
8777   cat conftest.$ac_ext >&5
8778   rm -rf conftest*
8779   ol_cv_pthread_lc_r=no
8780 fi
8781 rm -f conftest*
8782 else
8783   cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786 /* pthread test headers */
8787 #include <pthread.h>
8788 #ifndef NULL
8789 #define NULL (void*)0
8790 #endif
8791
8792 static void *task(p)
8793         void *p;
8794 {
8795         return (void *) (p == NULL);
8796 }
8797
8798
8799 int main(argc, argv)
8800         int argc;
8801         char **argv;
8802 {
8803
8804         /* pthread test function */
8805         pthread_t t;
8806         int status;
8807 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8808         /* This system (e.g. AIX) defaults detached; must override */
8809         pthread_attr_t attr;
8810
8811         status = pthread_attr_init(&attr);
8812         if( status ) exit( status );
8813
8814         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8815         if( status ) exit( status );
8816
8817 #define ATTR    &attr
8818 #else
8819 #if HAVE_PTHREADS_D4
8820 #define ATTR    pthread_attr_default
8821 #else
8822 #define ATTR    NULL
8823 #endif
8824 #endif
8825         /* make sure pthread_create() isn't just a stub */
8826         status = pthread_create(&t, ATTR, task, NULL);
8827         if( status ) exit( status );
8828
8829         /* make sure pthread_detach() isn't just a stub */
8830 #if HAVE_PTHREADS_D4
8831         status = pthread_detach( &t );
8832 #else
8833         status = pthread_detach( t );
8834 #endif
8835
8836 #ifdef HAVE_LINUX_THREADS
8837         pthread_kill_other_threads_np();
8838 #endif
8839
8840         exit( status );
8841
8842 }
8843
8844 EOF
8845 if { (eval echo configure:8846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8846 then
8847   ol_cv_pthread_lc_r=yes
8848 else
8849   echo "configure: failed program was:" >&5
8850   cat conftest.$ac_ext >&5
8851   rm -fr conftest*
8852   ol_cv_pthread_lc_r=no
8853 fi
8854 rm -fr conftest*
8855 fi
8856
8857
8858                 # restore the LIBS
8859                 LIBS="$ol_LIBS"
8860         
8861 fi
8862
8863 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8864
8865         if test $ol_cv_pthread_lc_r = yes ; then
8866                 ol_link_pthreads="-lc_r"
8867                 ol_link_threads=posix
8868         fi
8869 fi
8870
8871
8872                 # Pthread try link: -threads (ol_cv_pthread_threads)
8873 if test "$ol_link_threads" = no ; then
8874         # try -threads
8875         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8876 echo "configure:8877: checking for pthread link with -threads" >&5
8877 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8878   echo $ac_n "(cached) $ac_c" 1>&6
8879 else
8880   
8881                 # save the flags
8882                 ol_LIBS="$LIBS"
8883                 LIBS="-threads $LIBS"
8884
8885                 if test "$cross_compiling" = yes; then
8886   cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 /* pthread test headers */
8890 #include <pthread.h>
8891 #ifndef NULL
8892 #define NULL (void*)0
8893 #endif
8894
8895 static void *task(p)
8896         void *p;
8897 {
8898         return (void *) (p == NULL);
8899 }
8900
8901 int main() {
8902
8903         /* pthread test function */
8904         pthread_t t;
8905         int status;
8906 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8907         /* This system (e.g. AIX) defaults detached; must override */
8908         pthread_attr_t attr;
8909
8910         status = pthread_attr_init(&attr);
8911         if( status ) exit( status );
8912
8913         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8914         if( status ) exit( status );
8915
8916 #define ATTR    &attr
8917 #else
8918 #if HAVE_PTHREADS_D4
8919 #define ATTR    pthread_attr_default
8920 #else
8921 #define ATTR    NULL
8922 #endif
8923 #endif
8924         /* make sure pthread_create() isn't just a stub */
8925         status = pthread_create(&t, ATTR, task, NULL);
8926         if( status ) exit( status );
8927
8928         /* make sure pthread_detach() isn't just a stub */
8929 #if HAVE_PTHREADS_D4
8930         status = pthread_detach( &t );
8931 #else
8932         status = pthread_detach( t );
8933 #endif
8934
8935 #ifdef HAVE_LINUX_THREADS
8936         pthread_kill_other_threads_np();
8937 #endif
8938
8939         exit( status );
8940
8941 ; return 0; }
8942 EOF
8943 if { (eval echo configure:8944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8944   rm -rf conftest*
8945   ol_cv_pthread_threads=yes
8946 else
8947   echo "configure: failed program was:" >&5
8948   cat conftest.$ac_ext >&5
8949   rm -rf conftest*
8950   ol_cv_pthread_threads=no
8951 fi
8952 rm -f conftest*
8953 else
8954   cat > conftest.$ac_ext <<EOF
8955 #line 8956 "configure"
8956 #include "confdefs.h"
8957 /* pthread test headers */
8958 #include <pthread.h>
8959 #ifndef NULL
8960 #define NULL (void*)0
8961 #endif
8962
8963 static void *task(p)
8964         void *p;
8965 {
8966         return (void *) (p == NULL);
8967 }
8968
8969
8970 int main(argc, argv)
8971         int argc;
8972         char **argv;
8973 {
8974
8975         /* pthread test function */
8976         pthread_t t;
8977         int status;
8978 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8979         /* This system (e.g. AIX) defaults detached; must override */
8980         pthread_attr_t attr;
8981
8982         status = pthread_attr_init(&attr);
8983         if( status ) exit( status );
8984
8985         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8986         if( status ) exit( status );
8987
8988 #define ATTR    &attr
8989 #else
8990 #if HAVE_PTHREADS_D4
8991 #define ATTR    pthread_attr_default
8992 #else
8993 #define ATTR    NULL
8994 #endif
8995 #endif
8996         /* make sure pthread_create() isn't just a stub */
8997         status = pthread_create(&t, ATTR, task, NULL);
8998         if( status ) exit( status );
8999
9000         /* make sure pthread_detach() isn't just a stub */
9001 #if HAVE_PTHREADS_D4
9002         status = pthread_detach( &t );
9003 #else
9004         status = pthread_detach( t );
9005 #endif
9006
9007 #ifdef HAVE_LINUX_THREADS
9008         pthread_kill_other_threads_np();
9009 #endif
9010
9011         exit( status );
9012
9013 }
9014
9015 EOF
9016 if { (eval echo configure:9017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9017 then
9018   ol_cv_pthread_threads=yes
9019 else
9020   echo "configure: failed program was:" >&5
9021   cat conftest.$ac_ext >&5
9022   rm -fr conftest*
9023   ol_cv_pthread_threads=no
9024 fi
9025 rm -fr conftest*
9026 fi
9027
9028
9029                 # restore the LIBS
9030                 LIBS="$ol_LIBS"
9031         
9032 fi
9033
9034 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9035
9036         if test $ol_cv_pthread_threads = yes ; then
9037                 ol_link_pthreads="-threads"
9038                 ol_link_threads=posix
9039         fi
9040 fi
9041
9042
9043                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9044 if test "$ol_link_threads" = no ; then
9045         # try -lpthreads -lmach -lexc -lc_r
9046         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9047 echo "configure:9048: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9048 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9049   echo $ac_n "(cached) $ac_c" 1>&6
9050 else
9051   
9052                 # save the flags
9053                 ol_LIBS="$LIBS"
9054                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9055
9056                 if test "$cross_compiling" = yes; then
9057   cat > conftest.$ac_ext <<EOF
9058 #line 9059 "configure"
9059 #include "confdefs.h"
9060 /* pthread test headers */
9061 #include <pthread.h>
9062 #ifndef NULL
9063 #define NULL (void*)0
9064 #endif
9065
9066 static void *task(p)
9067         void *p;
9068 {
9069         return (void *) (p == NULL);
9070 }
9071
9072 int main() {
9073
9074         /* pthread test function */
9075         pthread_t t;
9076         int status;
9077 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9078         /* This system (e.g. AIX) defaults detached; must override */
9079         pthread_attr_t attr;
9080
9081         status = pthread_attr_init(&attr);
9082         if( status ) exit( status );
9083
9084         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9085         if( status ) exit( status );
9086
9087 #define ATTR    &attr
9088 #else
9089 #if HAVE_PTHREADS_D4
9090 #define ATTR    pthread_attr_default
9091 #else
9092 #define ATTR    NULL
9093 #endif
9094 #endif
9095         /* make sure pthread_create() isn't just a stub */
9096         status = pthread_create(&t, ATTR, task, NULL);
9097         if( status ) exit( status );
9098
9099         /* make sure pthread_detach() isn't just a stub */
9100 #if HAVE_PTHREADS_D4
9101         status = pthread_detach( &t );
9102 #else
9103         status = pthread_detach( t );
9104 #endif
9105
9106 #ifdef HAVE_LINUX_THREADS
9107         pthread_kill_other_threads_np();
9108 #endif
9109
9110         exit( status );
9111
9112 ; return 0; }
9113 EOF
9114 if { (eval echo configure:9115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9115   rm -rf conftest*
9116   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9117 else
9118   echo "configure: failed program was:" >&5
9119   cat conftest.$ac_ext >&5
9120   rm -rf conftest*
9121   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9122 fi
9123 rm -f conftest*
9124 else
9125   cat > conftest.$ac_ext <<EOF
9126 #line 9127 "configure"
9127 #include "confdefs.h"
9128 /* pthread test headers */
9129 #include <pthread.h>
9130 #ifndef NULL
9131 #define NULL (void*)0
9132 #endif
9133
9134 static void *task(p)
9135         void *p;
9136 {
9137         return (void *) (p == NULL);
9138 }
9139
9140
9141 int main(argc, argv)
9142         int argc;
9143         char **argv;
9144 {
9145
9146         /* pthread test function */
9147         pthread_t t;
9148         int status;
9149 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9150         /* This system (e.g. AIX) defaults detached; must override */
9151         pthread_attr_t attr;
9152
9153         status = pthread_attr_init(&attr);
9154         if( status ) exit( status );
9155
9156         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9157         if( status ) exit( status );
9158
9159 #define ATTR    &attr
9160 #else
9161 #if HAVE_PTHREADS_D4
9162 #define ATTR    pthread_attr_default
9163 #else
9164 #define ATTR    NULL
9165 #endif
9166 #endif
9167         /* make sure pthread_create() isn't just a stub */
9168         status = pthread_create(&t, ATTR, task, NULL);
9169         if( status ) exit( status );
9170
9171         /* make sure pthread_detach() isn't just a stub */
9172 #if HAVE_PTHREADS_D4
9173         status = pthread_detach( &t );
9174 #else
9175         status = pthread_detach( t );
9176 #endif
9177
9178 #ifdef HAVE_LINUX_THREADS
9179         pthread_kill_other_threads_np();
9180 #endif
9181
9182         exit( status );
9183
9184 }
9185
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9188 then
9189   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -fr conftest*
9194   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9195 fi
9196 rm -fr conftest*
9197 fi
9198
9199
9200                 # restore the LIBS
9201                 LIBS="$ol_LIBS"
9202         
9203 fi
9204
9205 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9206
9207         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9208                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9209                 ol_link_threads=posix
9210         fi
9211 fi
9212
9213                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9214 if test "$ol_link_threads" = no ; then
9215         # try -lpthreads -lmach -lexc
9216         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9217 echo "configure:9218: checking for pthread link with -lpthreads -lmach -lexc" >&5
9218 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9219   echo $ac_n "(cached) $ac_c" 1>&6
9220 else
9221   
9222                 # save the flags
9223                 ol_LIBS="$LIBS"
9224                 LIBS="-lpthreads -lmach -lexc $LIBS"
9225
9226                 if test "$cross_compiling" = yes; then
9227   cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230 /* pthread test headers */
9231 #include <pthread.h>
9232 #ifndef NULL
9233 #define NULL (void*)0
9234 #endif
9235
9236 static void *task(p)
9237         void *p;
9238 {
9239         return (void *) (p == NULL);
9240 }
9241
9242 int main() {
9243
9244         /* pthread test function */
9245         pthread_t t;
9246         int status;
9247 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9248         /* This system (e.g. AIX) defaults detached; must override */
9249         pthread_attr_t attr;
9250
9251         status = pthread_attr_init(&attr);
9252         if( status ) exit( status );
9253
9254         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9255         if( status ) exit( status );
9256
9257 #define ATTR    &attr
9258 #else
9259 #if HAVE_PTHREADS_D4
9260 #define ATTR    pthread_attr_default
9261 #else
9262 #define ATTR    NULL
9263 #endif
9264 #endif
9265         /* make sure pthread_create() isn't just a stub */
9266         status = pthread_create(&t, ATTR, task, NULL);
9267         if( status ) exit( status );
9268
9269         /* make sure pthread_detach() isn't just a stub */
9270 #if HAVE_PTHREADS_D4
9271         status = pthread_detach( &t );
9272 #else
9273         status = pthread_detach( t );
9274 #endif
9275
9276 #ifdef HAVE_LINUX_THREADS
9277         pthread_kill_other_threads_np();
9278 #endif
9279
9280         exit( status );
9281
9282 ; return 0; }
9283 EOF
9284 if { (eval echo configure:9285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9285   rm -rf conftest*
9286   ol_cv_pthread_lpthreads_lmach_lexc=yes
9287 else
9288   echo "configure: failed program was:" >&5
9289   cat conftest.$ac_ext >&5
9290   rm -rf conftest*
9291   ol_cv_pthread_lpthreads_lmach_lexc=no
9292 fi
9293 rm -f conftest*
9294 else
9295   cat > conftest.$ac_ext <<EOF
9296 #line 9297 "configure"
9297 #include "confdefs.h"
9298 /* pthread test headers */
9299 #include <pthread.h>
9300 #ifndef NULL
9301 #define NULL (void*)0
9302 #endif
9303
9304 static void *task(p)
9305         void *p;
9306 {
9307         return (void *) (p == NULL);
9308 }
9309
9310
9311 int main(argc, argv)
9312         int argc;
9313         char **argv;
9314 {
9315
9316         /* pthread test function */
9317         pthread_t t;
9318         int status;
9319 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9320         /* This system (e.g. AIX) defaults detached; must override */
9321         pthread_attr_t attr;
9322
9323         status = pthread_attr_init(&attr);
9324         if( status ) exit( status );
9325
9326         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9327         if( status ) exit( status );
9328
9329 #define ATTR    &attr
9330 #else
9331 #if HAVE_PTHREADS_D4
9332 #define ATTR    pthread_attr_default
9333 #else
9334 #define ATTR    NULL
9335 #endif
9336 #endif
9337         /* make sure pthread_create() isn't just a stub */
9338         status = pthread_create(&t, ATTR, task, NULL);
9339         if( status ) exit( status );
9340
9341         /* make sure pthread_detach() isn't just a stub */
9342 #if HAVE_PTHREADS_D4
9343         status = pthread_detach( &t );
9344 #else
9345         status = pthread_detach( t );
9346 #endif
9347
9348 #ifdef HAVE_LINUX_THREADS
9349         pthread_kill_other_threads_np();
9350 #endif
9351
9352         exit( status );
9353
9354 }
9355
9356 EOF
9357 if { (eval echo configure:9358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9358 then
9359   ol_cv_pthread_lpthreads_lmach_lexc=yes
9360 else
9361   echo "configure: failed program was:" >&5
9362   cat conftest.$ac_ext >&5
9363   rm -fr conftest*
9364   ol_cv_pthread_lpthreads_lmach_lexc=no
9365 fi
9366 rm -fr conftest*
9367 fi
9368
9369
9370                 # restore the LIBS
9371                 LIBS="$ol_LIBS"
9372         
9373 fi
9374
9375 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9376
9377         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9378                 ol_link_pthreads="-lpthreads -lmach -lexc"
9379                 ol_link_threads=posix
9380         fi
9381 fi
9382
9383                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9384 if test "$ol_link_threads" = no ; then
9385         # try -lpthreads -lexc
9386         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9387 echo "configure:9388: checking for pthread link with -lpthreads -lexc" >&5
9388 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9389   echo $ac_n "(cached) $ac_c" 1>&6
9390 else
9391   
9392                 # save the flags
9393                 ol_LIBS="$LIBS"
9394                 LIBS="-lpthreads -lexc $LIBS"
9395
9396                 if test "$cross_compiling" = yes; then
9397   cat > conftest.$ac_ext <<EOF
9398 #line 9399 "configure"
9399 #include "confdefs.h"
9400 /* pthread test headers */
9401 #include <pthread.h>
9402 #ifndef NULL
9403 #define NULL (void*)0
9404 #endif
9405
9406 static void *task(p)
9407         void *p;
9408 {
9409         return (void *) (p == NULL);
9410 }
9411
9412 int main() {
9413
9414         /* pthread test function */
9415         pthread_t t;
9416         int status;
9417 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9418         /* This system (e.g. AIX) defaults detached; must override */
9419         pthread_attr_t attr;
9420
9421         status = pthread_attr_init(&attr);
9422         if( status ) exit( status );
9423
9424         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9425         if( status ) exit( status );
9426
9427 #define ATTR    &attr
9428 #else
9429 #if HAVE_PTHREADS_D4
9430 #define ATTR    pthread_attr_default
9431 #else
9432 #define ATTR    NULL
9433 #endif
9434 #endif
9435         /* make sure pthread_create() isn't just a stub */
9436         status = pthread_create(&t, ATTR, task, NULL);
9437         if( status ) exit( status );
9438
9439         /* make sure pthread_detach() isn't just a stub */
9440 #if HAVE_PTHREADS_D4
9441         status = pthread_detach( &t );
9442 #else
9443         status = pthread_detach( t );
9444 #endif
9445
9446 #ifdef HAVE_LINUX_THREADS
9447         pthread_kill_other_threads_np();
9448 #endif
9449
9450         exit( status );
9451
9452 ; return 0; }
9453 EOF
9454 if { (eval echo configure:9455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9455   rm -rf conftest*
9456   ol_cv_pthread_lpthreads_lexc=yes
9457 else
9458   echo "configure: failed program was:" >&5
9459   cat conftest.$ac_ext >&5
9460   rm -rf conftest*
9461   ol_cv_pthread_lpthreads_lexc=no
9462 fi
9463 rm -f conftest*
9464 else
9465   cat > conftest.$ac_ext <<EOF
9466 #line 9467 "configure"
9467 #include "confdefs.h"
9468 /* pthread test headers */
9469 #include <pthread.h>
9470 #ifndef NULL
9471 #define NULL (void*)0
9472 #endif
9473
9474 static void *task(p)
9475         void *p;
9476 {
9477         return (void *) (p == NULL);
9478 }
9479
9480
9481 int main(argc, argv)
9482         int argc;
9483         char **argv;
9484 {
9485
9486         /* pthread test function */
9487         pthread_t t;
9488         int status;
9489 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9490         /* This system (e.g. AIX) defaults detached; must override */
9491         pthread_attr_t attr;
9492
9493         status = pthread_attr_init(&attr);
9494         if( status ) exit( status );
9495
9496         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9497         if( status ) exit( status );
9498
9499 #define ATTR    &attr
9500 #else
9501 #if HAVE_PTHREADS_D4
9502 #define ATTR    pthread_attr_default
9503 #else
9504 #define ATTR    NULL
9505 #endif
9506 #endif
9507         /* make sure pthread_create() isn't just a stub */
9508         status = pthread_create(&t, ATTR, task, NULL);
9509         if( status ) exit( status );
9510
9511         /* make sure pthread_detach() isn't just a stub */
9512 #if HAVE_PTHREADS_D4
9513         status = pthread_detach( &t );
9514 #else
9515         status = pthread_detach( t );
9516 #endif
9517
9518 #ifdef HAVE_LINUX_THREADS
9519         pthread_kill_other_threads_np();
9520 #endif
9521
9522         exit( status );
9523
9524 }
9525
9526 EOF
9527 if { (eval echo configure:9528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9528 then
9529   ol_cv_pthread_lpthreads_lexc=yes
9530 else
9531   echo "configure: failed program was:" >&5
9532   cat conftest.$ac_ext >&5
9533   rm -fr conftest*
9534   ol_cv_pthread_lpthreads_lexc=no
9535 fi
9536 rm -fr conftest*
9537 fi
9538
9539
9540                 # restore the LIBS
9541                 LIBS="$ol_LIBS"
9542         
9543 fi
9544
9545 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9546
9547         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9548                 ol_link_pthreads="-lpthreads -lexc"
9549                 ol_link_threads=posix
9550         fi
9551 fi
9552
9553
9554                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9555 if test "$ol_link_threads" = no ; then
9556         # try -lpthreads
9557         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9558 echo "configure:9559: checking for pthread link with -lpthreads" >&5
9559 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9560   echo $ac_n "(cached) $ac_c" 1>&6
9561 else
9562   
9563                 # save the flags
9564                 ol_LIBS="$LIBS"
9565                 LIBS="-lpthreads $LIBS"
9566
9567                 if test "$cross_compiling" = yes; then
9568   cat > conftest.$ac_ext <<EOF
9569 #line 9570 "configure"
9570 #include "confdefs.h"
9571 /* pthread test headers */
9572 #include <pthread.h>
9573 #ifndef NULL
9574 #define NULL (void*)0
9575 #endif
9576
9577 static void *task(p)
9578         void *p;
9579 {
9580         return (void *) (p == NULL);
9581 }
9582
9583 int main() {
9584
9585         /* pthread test function */
9586         pthread_t t;
9587         int status;
9588 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9589         /* This system (e.g. AIX) defaults detached; must override */
9590         pthread_attr_t attr;
9591
9592         status = pthread_attr_init(&attr);
9593         if( status ) exit( status );
9594
9595         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9596         if( status ) exit( status );
9597
9598 #define ATTR    &attr
9599 #else
9600 #if HAVE_PTHREADS_D4
9601 #define ATTR    pthread_attr_default
9602 #else
9603 #define ATTR    NULL
9604 #endif
9605 #endif
9606         /* make sure pthread_create() isn't just a stub */
9607         status = pthread_create(&t, ATTR, task, NULL);
9608         if( status ) exit( status );
9609
9610         /* make sure pthread_detach() isn't just a stub */
9611 #if HAVE_PTHREADS_D4
9612         status = pthread_detach( &t );
9613 #else
9614         status = pthread_detach( t );
9615 #endif
9616
9617 #ifdef HAVE_LINUX_THREADS
9618         pthread_kill_other_threads_np();
9619 #endif
9620
9621         exit( status );
9622
9623 ; return 0; }
9624 EOF
9625 if { (eval echo configure:9626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9626   rm -rf conftest*
9627   ol_cv_pthread_lib_lpthreads=yes
9628 else
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631   rm -rf conftest*
9632   ol_cv_pthread_lib_lpthreads=no
9633 fi
9634 rm -f conftest*
9635 else
9636   cat > conftest.$ac_ext <<EOF
9637 #line 9638 "configure"
9638 #include "confdefs.h"
9639 /* pthread test headers */
9640 #include <pthread.h>
9641 #ifndef NULL
9642 #define NULL (void*)0
9643 #endif
9644
9645 static void *task(p)
9646         void *p;
9647 {
9648         return (void *) (p == NULL);
9649 }
9650
9651
9652 int main(argc, argv)
9653         int argc;
9654         char **argv;
9655 {
9656
9657         /* pthread test function */
9658         pthread_t t;
9659         int status;
9660 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9661         /* This system (e.g. AIX) defaults detached; must override */
9662         pthread_attr_t attr;
9663
9664         status = pthread_attr_init(&attr);
9665         if( status ) exit( status );
9666
9667         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9668         if( status ) exit( status );
9669
9670 #define ATTR    &attr
9671 #else
9672 #if HAVE_PTHREADS_D4
9673 #define ATTR    pthread_attr_default
9674 #else
9675 #define ATTR    NULL
9676 #endif
9677 #endif
9678         /* make sure pthread_create() isn't just a stub */
9679         status = pthread_create(&t, ATTR, task, NULL);
9680         if( status ) exit( status );
9681
9682         /* make sure pthread_detach() isn't just a stub */
9683 #if HAVE_PTHREADS_D4
9684         status = pthread_detach( &t );
9685 #else
9686         status = pthread_detach( t );
9687 #endif
9688
9689 #ifdef HAVE_LINUX_THREADS
9690         pthread_kill_other_threads_np();
9691 #endif
9692
9693         exit( status );
9694
9695 }
9696
9697 EOF
9698 if { (eval echo configure:9699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9699 then
9700   ol_cv_pthread_lib_lpthreads=yes
9701 else
9702   echo "configure: failed program was:" >&5
9703   cat conftest.$ac_ext >&5
9704   rm -fr conftest*
9705   ol_cv_pthread_lib_lpthreads=no
9706 fi
9707 rm -fr conftest*
9708 fi
9709
9710
9711                 # restore the LIBS
9712                 LIBS="$ol_LIBS"
9713         
9714 fi
9715
9716 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9717
9718         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9719                 ol_link_pthreads="-lpthreads"
9720                 ol_link_threads=posix
9721         fi
9722 fi
9723
9724
9725                 if test $ol_link_threads != no ; then
9726                         cat >> confdefs.h <<\EOF
9727 #define HAVE_PTHREADS 1
9728 EOF
9729
9730
9731                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9732
9733                                                 save_CPPFLAGS="$CPPFLAGS"
9734                         save_LIBS="$LIBS"
9735                         LIBS="$LTHREAD_LIBS $LIBS"
9736
9737                                                                                                 for ac_func in sched_yield pthread_yield
9738 do
9739 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9740 echo "configure:9741: checking for $ac_func" >&5
9741 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9742   echo $ac_n "(cached) $ac_c" 1>&6
9743 else
9744   cat > conftest.$ac_ext <<EOF
9745 #line 9746 "configure"
9746 #include "confdefs.h"
9747 /* System header to define __stub macros and hopefully few prototypes,
9748     which can conflict with char $ac_func(); below.  */
9749 #include <assert.h>
9750 /* Override any gcc2 internal prototype to avoid an error.  */
9751 /* We use char because int might match the return type of a gcc2
9752     builtin and then its argument prototype would still apply.  */
9753 char $ac_func();
9754 char (*f)();
9755
9756 int main() {
9757
9758 /* The GNU C library defines this for functions which it implements
9759     to always fail with ENOSYS.  Some functions are actually named
9760     something starting with __ and the normal name is an alias.  */
9761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9762 choke me
9763 #else
9764 f = $ac_func;
9765 #endif
9766
9767 ; return 0; }
9768 EOF
9769 if { (eval echo configure:9770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9770   rm -rf conftest*
9771   eval "ac_cv_func_$ac_func=yes"
9772 else
9773   echo "configure: failed program was:" >&5
9774   cat conftest.$ac_ext >&5
9775   rm -rf conftest*
9776   eval "ac_cv_func_$ac_func=no"
9777 fi
9778 rm -f conftest*
9779 fi
9780
9781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9782   echo "$ac_t""yes" 1>&6
9783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9784   cat >> confdefs.h <<EOF
9785 #define $ac_tr_func 1
9786 EOF
9787  
9788 else
9789   echo "$ac_t""no" 1>&6
9790 fi
9791 done
9792
9793
9794                         if test $ac_cv_func_sched_yield = no -a \
9795                                 $ac_cv_func_pthread_yield = no ; then
9796                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9797 echo "configure:9798: checking for sched_yield in -lrt" >&5
9798 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9799 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   ac_save_LIBS="$LIBS"
9803 LIBS="-lrt  $LIBS"
9804 cat > conftest.$ac_ext <<EOF
9805 #line 9806 "configure"
9806 #include "confdefs.h"
9807 /* Override any gcc2 internal prototype to avoid an error.  */
9808 /* We use char because int might match the return type of a gcc2
9809     builtin and then its argument prototype would still apply.  */
9810 char sched_yield();
9811
9812 int main() {
9813 sched_yield()
9814 ; return 0; }
9815 EOF
9816 if { (eval echo configure:9817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9817   rm -rf conftest*
9818   eval "ac_cv_lib_$ac_lib_var=yes"
9819 else
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   eval "ac_cv_lib_$ac_lib_var=no"
9824 fi
9825 rm -f conftest*
9826 LIBS="$ac_save_LIBS"
9827
9828 fi
9829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9830   echo "$ac_t""yes" 1>&6
9831   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9832                                         cat >> confdefs.h <<\EOF
9833 #define HAVE_SCHED_YIELD 1
9834 EOF
9835
9836                                         ac_cv_func_sched_yield=yes
9837 else
9838   echo "$ac_t""no" 1>&6
9839 ac_cv_func_sched_yield=no
9840 fi
9841
9842                         fi
9843                         if test $ac_cv_func_sched_yield = no -a \
9844                                 $ac_cv_func_pthread_yield = no ; then
9845                                                                                                 for ac_func in thr_yield
9846 do
9847 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9848 echo "configure:9849: checking for $ac_func" >&5
9849 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9850   echo $ac_n "(cached) $ac_c" 1>&6
9851 else
9852   cat > conftest.$ac_ext <<EOF
9853 #line 9854 "configure"
9854 #include "confdefs.h"
9855 /* System header to define __stub macros and hopefully few prototypes,
9856     which can conflict with char $ac_func(); below.  */
9857 #include <assert.h>
9858 /* Override any gcc2 internal prototype to avoid an error.  */
9859 /* We use char because int might match the return type of a gcc2
9860     builtin and then its argument prototype would still apply.  */
9861 char $ac_func();
9862 char (*f)();
9863
9864 int main() {
9865
9866 /* The GNU C library defines this for functions which it implements
9867     to always fail with ENOSYS.  Some functions are actually named
9868     something starting with __ and the normal name is an alias.  */
9869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9870 choke me
9871 #else
9872 f = $ac_func;
9873 #endif
9874
9875 ; return 0; }
9876 EOF
9877 if { (eval echo configure:9878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9878   rm -rf conftest*
9879   eval "ac_cv_func_$ac_func=yes"
9880 else
9881   echo "configure: failed program was:" >&5
9882   cat conftest.$ac_ext >&5
9883   rm -rf conftest*
9884   eval "ac_cv_func_$ac_func=no"
9885 fi
9886 rm -f conftest*
9887 fi
9888
9889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9890   echo "$ac_t""yes" 1>&6
9891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9892   cat >> confdefs.h <<EOF
9893 #define $ac_tr_func 1
9894 EOF
9895  
9896 else
9897   echo "$ac_t""no" 1>&6
9898 fi
9899 done
9900
9901                         fi
9902                         if test $ac_cv_func_sched_yield = no -a \
9903                                 $ac_cv_func_pthread_yield = no -a \
9904                                 "$ac_cv_func_thr_yield" = no ; then
9905                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9906                         fi
9907
9908                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9909 do
9910 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9911 echo "configure:9912: checking for $ac_func" >&5
9912 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9913   echo $ac_n "(cached) $ac_c" 1>&6
9914 else
9915   cat > conftest.$ac_ext <<EOF
9916 #line 9917 "configure"
9917 #include "confdefs.h"
9918 /* System header to define __stub macros and hopefully few prototypes,
9919     which can conflict with char $ac_func(); below.  */
9920 #include <assert.h>
9921 /* Override any gcc2 internal prototype to avoid an error.  */
9922 /* We use char because int might match the return type of a gcc2
9923     builtin and then its argument prototype would still apply.  */
9924 char $ac_func();
9925 char (*f)();
9926
9927 int main() {
9928
9929 /* The GNU C library defines this for functions which it implements
9930     to always fail with ENOSYS.  Some functions are actually named
9931     something starting with __ and the normal name is an alias.  */
9932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9933 choke me
9934 #else
9935 f = $ac_func;
9936 #endif
9937
9938 ; return 0; }
9939 EOF
9940 if { (eval echo configure:9941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9941   rm -rf conftest*
9942   eval "ac_cv_func_$ac_func=yes"
9943 else
9944   echo "configure: failed program was:" >&5
9945   cat conftest.$ac_ext >&5
9946   rm -rf conftest*
9947   eval "ac_cv_func_$ac_func=no"
9948 fi
9949 rm -f conftest*
9950 fi
9951
9952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9953   echo "$ac_t""yes" 1>&6
9954     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9955   cat >> confdefs.h <<EOF
9956 #define $ac_tr_func 1
9957 EOF
9958  
9959 else
9960   echo "$ac_t""no" 1>&6
9961 fi
9962 done
9963
9964
9965                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9966 echo "configure:9967: checking for pthread_detach with <pthread.h>" >&5
9967 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9968   echo $ac_n "(cached) $ac_c" 1>&6
9969 else
9970   
9971                                                                 cat > conftest.$ac_ext <<EOF
9972 #line 9973 "configure"
9973 #include "confdefs.h"
9974
9975 #include <pthread.h>
9976 #ifndef NULL
9977 #define NULL (void*)0
9978 #endif
9979
9980 int main() {
9981 pthread_detach(NULL);
9982 ; return 0; }
9983 EOF
9984 if { (eval echo configure:9985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9985   rm -rf conftest*
9986   ol_cv_func_pthread_detach=yes
9987 else
9988   echo "configure: failed program was:" >&5
9989   cat conftest.$ac_ext >&5
9990   rm -rf conftest*
9991   ol_cv_func_pthread_detach=no
9992 fi
9993 rm -f conftest*
9994                         
9995 fi
9996
9997 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9998
9999                         if test $ol_cv_func_pthread_detach = no ; then
10000                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10001                         fi
10002
10003                         cat >> confdefs.h <<\EOF
10004 #define HAVE_PTHREAD_DETACH 1
10005 EOF
10006
10007
10008                                                 for ac_func in \
10009                                 pthread_setconcurrency \
10010                                 pthread_getconcurrency \
10011                                 thr_setconcurrency \
10012                                 thr_getconcurrency \
10013                         
10014 do
10015 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10016 echo "configure:10017: checking for $ac_func" >&5
10017 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10018   echo $ac_n "(cached) $ac_c" 1>&6
10019 else
10020   cat > conftest.$ac_ext <<EOF
10021 #line 10022 "configure"
10022 #include "confdefs.h"
10023 /* System header to define __stub macros and hopefully few prototypes,
10024     which can conflict with char $ac_func(); below.  */
10025 #include <assert.h>
10026 /* Override any gcc2 internal prototype to avoid an error.  */
10027 /* We use char because int might match the return type of a gcc2
10028     builtin and then its argument prototype would still apply.  */
10029 char $ac_func();
10030 char (*f)();
10031
10032 int main() {
10033
10034 /* The GNU C library defines this for functions which it implements
10035     to always fail with ENOSYS.  Some functions are actually named
10036     something starting with __ and the normal name is an alias.  */
10037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10038 choke me
10039 #else
10040 f = $ac_func;
10041 #endif
10042
10043 ; return 0; }
10044 EOF
10045 if { (eval echo configure:10046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10046   rm -rf conftest*
10047   eval "ac_cv_func_$ac_func=yes"
10048 else
10049   echo "configure: failed program was:" >&5
10050   cat conftest.$ac_ext >&5
10051   rm -rf conftest*
10052   eval "ac_cv_func_$ac_func=no"
10053 fi
10054 rm -f conftest*
10055 fi
10056
10057 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10058   echo "$ac_t""yes" 1>&6
10059     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10060   cat >> confdefs.h <<EOF
10061 #define $ac_tr_func 1
10062 EOF
10063  
10064 else
10065   echo "$ac_t""no" 1>&6
10066 fi
10067 done
10068
10069
10070                         
10071         for ac_func in pthread_kill_other_threads_np
10072 do
10073 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10074 echo "configure:10075: checking for $ac_func" >&5
10075 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10076   echo $ac_n "(cached) $ac_c" 1>&6
10077 else
10078   cat > conftest.$ac_ext <<EOF
10079 #line 10080 "configure"
10080 #include "confdefs.h"
10081 /* System header to define __stub macros and hopefully few prototypes,
10082     which can conflict with char $ac_func(); below.  */
10083 #include <assert.h>
10084 /* Override any gcc2 internal prototype to avoid an error.  */
10085 /* We use char because int might match the return type of a gcc2
10086     builtin and then its argument prototype would still apply.  */
10087 char $ac_func();
10088 char (*f)();
10089
10090 int main() {
10091
10092 /* The GNU C library defines this for functions which it implements
10093     to always fail with ENOSYS.  Some functions are actually named
10094     something starting with __ and the normal name is an alias.  */
10095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10096 choke me
10097 #else
10098 f = $ac_func;
10099 #endif
10100
10101 ; return 0; }
10102 EOF
10103 if { (eval echo configure:10104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10104   rm -rf conftest*
10105   eval "ac_cv_func_$ac_func=yes"
10106 else
10107   echo "configure: failed program was:" >&5
10108   cat conftest.$ac_ext >&5
10109   rm -rf conftest*
10110   eval "ac_cv_func_$ac_func=no"
10111 fi
10112 rm -f conftest*
10113 fi
10114
10115 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10116   echo "$ac_t""yes" 1>&6
10117     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10118   cat >> confdefs.h <<EOF
10119 #define $ac_tr_func 1
10120 EOF
10121  
10122 else
10123   echo "$ac_t""no" 1>&6
10124 fi
10125 done
10126
10127         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10128 echo "configure:10129: checking for LinuxThreads implementation" >&5
10129 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10130   echo $ac_n "(cached) $ac_c" 1>&6
10131 else
10132   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10133 fi
10134
10135 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10136
10137                         
10138         
10139         
10140         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10141 echo "configure:10142: checking for LinuxThreads consistency" >&5
10142 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10143   echo $ac_n "(cached) $ac_c" 1>&6
10144 else
10145   
10146                 if test $ol_cv_header_linux_threads = yes -a \
10147                         $ol_cv_sys_linux_threads = yes; then
10148                         ol_cv_linux_threads=yes
10149                 elif test $ol_cv_header_linux_threads = no -a \
10150                         $ol_cv_sys_linux_threads = no; then
10151                         ol_cv_linux_threads=no
10152                 else
10153                         ol_cv_linux_threads=error
10154                 fi
10155         
10156 fi
10157
10158 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10159
10160
10161                         if test $ol_cv_linux_threads = error; then
10162                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10163                         fi
10164
10165                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10166 echo "configure:10167: checking if pthread_create() works" >&5
10167 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10168   echo $ac_n "(cached) $ac_c" 1>&6
10169 else
10170   
10171                         if test "$cross_compiling" = yes; then
10172                                 ol_cv_pthread_create_works=yes
10173 else
10174   cat > conftest.$ac_ext <<EOF
10175 #line 10176 "configure"
10176 #include "confdefs.h"
10177 /* pthread test headers */
10178 #include <pthread.h>
10179 #ifndef NULL
10180 #define NULL (void*)0
10181 #endif
10182
10183 static void *task(p)
10184         void *p;
10185 {
10186         return (void *) (p == NULL);
10187 }
10188
10189
10190 int main(argc, argv)
10191         int argc;
10192         char **argv;
10193 {
10194
10195         /* pthread test function */
10196         pthread_t t;
10197         int status;
10198 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10199         /* This system (e.g. AIX) defaults detached; must override */
10200         pthread_attr_t attr;
10201
10202         status = pthread_attr_init(&attr);
10203         if( status ) exit( status );
10204
10205         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10206         if( status ) exit( status );
10207
10208 #define ATTR    &attr
10209 #else
10210 #if HAVE_PTHREADS_D4
10211 #define ATTR    pthread_attr_default
10212 #else
10213 #define ATTR    NULL
10214 #endif
10215 #endif
10216         /* make sure pthread_create() isn't just a stub */
10217         status = pthread_create(&t, ATTR, task, NULL);
10218         if( status ) exit( status );
10219
10220         /* make sure pthread_detach() isn't just a stub */
10221 #if HAVE_PTHREADS_D4
10222         status = pthread_detach( &t );
10223 #else
10224         status = pthread_detach( t );
10225 #endif
10226
10227 #ifdef HAVE_LINUX_THREADS
10228         pthread_kill_other_threads_np();
10229 #endif
10230
10231         exit( status );
10232
10233 }
10234
10235 EOF
10236 if { (eval echo configure:10237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10237 then
10238   ol_cv_pthread_create_works=yes
10239 else
10240   echo "configure: failed program was:" >&5
10241   cat conftest.$ac_ext >&5
10242   rm -fr conftest*
10243   ol_cv_pthread_create_works=no
10244 fi
10245 rm -fr conftest*
10246 fi
10247
10248 fi
10249
10250 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10251
10252                         if test $ol_cv_pthread_create_works = no ; then
10253                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10254                         fi
10255
10256                                                 if test $ol_with_yielding_select = auto ; then
10257                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10258 echo "configure:10259: checking if select yields when using pthreads" >&5
10259 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10260   echo $ac_n "(cached) $ac_c" 1>&6
10261 else
10262   
10263                                 if test "$cross_compiling" = yes; then
10264   ol_cv_pthread_select_yields=cross
10265 else
10266   cat > conftest.$ac_ext <<EOF
10267 #line 10268 "configure"
10268 #include "confdefs.h"
10269
10270 #include <sys/types.h>
10271 #include <sys/time.h>
10272 #include <unistd.h>
10273 #include <pthread.h>
10274 #ifndef NULL
10275 #define NULL (void*) 0
10276 #endif
10277
10278 static int fildes[2];
10279
10280 static void *task(p)
10281         void *p;
10282 {
10283         int i;
10284         struct timeval tv;
10285
10286         fd_set rfds;
10287
10288         tv.tv_sec=10;
10289         tv.tv_usec=0;
10290
10291         FD_ZERO(&rfds);
10292         FD_SET(fildes[0], &rfds);
10293
10294         /* we're not interested in any fds */
10295         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10296
10297         if(i < 0) {
10298                 perror("select");
10299                 exit(10);
10300         }
10301
10302         exit(0); /* if we exit here, the select blocked the whole process */
10303 }
10304
10305 int main(argc, argv)
10306         int argc;
10307         char **argv;
10308 {
10309         pthread_t t;
10310
10311         /* create a pipe to select */
10312         if(pipe(&fildes[0])) {
10313                 perror("select");
10314                 exit(1);
10315         }
10316
10317 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10318         (void) pthread_setconcurrency(2);
10319 #else
10320 #ifdef HAVE_THR_SETCONCURRENCY
10321         /* Set Solaris LWP concurrency to 2 */
10322         thr_setconcurrency(2);
10323 #endif
10324 #endif
10325
10326 #if HAVE_PTHREADS_D4
10327         pthread_create(&t, pthread_attr_default, task, NULL);
10328 #else
10329         pthread_create(&t, NULL, task, NULL);
10330 #endif
10331
10332 #if HAVE_SCHED_YIELD
10333         sched_yield();  /* make sure task runs first */
10334 #else
10335 #ifdef HAVE_PTHREAD_YIELD
10336         pthread_yield();        /* make sure task runs first */
10337 #endif
10338 #endif
10339
10340         exit(2);
10341 }
10342 EOF
10343 if { (eval echo configure:10344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10344 then
10345   ol_cv_pthread_select_yields=no
10346 else
10347   echo "configure: failed program was:" >&5
10348   cat conftest.$ac_ext >&5
10349   rm -fr conftest*
10350   ol_cv_pthread_select_yields=yes
10351 fi
10352 rm -fr conftest*
10353 fi
10354
10355 fi
10356
10357 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10358
10359                                 if test $ol_cv_pthread_select_yields = cross ; then
10360                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10361                                 fi
10362
10363                                 if test $ol_cv_pthread_select_yields = yes ; then
10364                                         ol_with_yielding_select=yes
10365                                 fi
10366                         fi
10367
10368                                                 CPPFLAGS="$save_CPPFLAGS"
10369                         LIBS="$save_LIBS"
10370                 else
10371                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10372                 fi
10373         fi
10374
10375         if test $ol_with_threads = posix ; then
10376                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10377         fi
10378 fi
10379
10380 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10381         -o $ol_with_threads = mach ; then
10382
10383                 for ac_hdr in mach/cthreads.h
10384 do
10385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10387 echo "configure:10388: checking for $ac_hdr" >&5
10388 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10389   echo $ac_n "(cached) $ac_c" 1>&6
10390 else
10391   cat > conftest.$ac_ext <<EOF
10392 #line 10393 "configure"
10393 #include "confdefs.h"
10394 #include <$ac_hdr>
10395 EOF
10396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10397 { (eval echo configure:10398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10399 if test -z "$ac_err"; then
10400   rm -rf conftest*
10401   eval "ac_cv_header_$ac_safe=yes"
10402 else
10403   echo "$ac_err" >&5
10404   echo "configure: failed program was:" >&5
10405   cat conftest.$ac_ext >&5
10406   rm -rf conftest*
10407   eval "ac_cv_header_$ac_safe=no"
10408 fi
10409 rm -f conftest*
10410 fi
10411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10412   echo "$ac_t""yes" 1>&6
10413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10414   cat >> confdefs.h <<EOF
10415 #define $ac_tr_hdr 1
10416 EOF
10417  
10418 else
10419   echo "$ac_t""no" 1>&6
10420 fi
10421 done
10422
10423         if test $ac_cv_header_mach_cthreads_h = yes ; then
10424                 ol_with_threads=found
10425
10426                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10427 echo "configure:10428: checking for cthread_fork" >&5
10428 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10429   echo $ac_n "(cached) $ac_c" 1>&6
10430 else
10431   cat > conftest.$ac_ext <<EOF
10432 #line 10433 "configure"
10433 #include "confdefs.h"
10434 /* System header to define __stub macros and hopefully few prototypes,
10435     which can conflict with char cthread_fork(); below.  */
10436 #include <assert.h>
10437 /* Override any gcc2 internal prototype to avoid an error.  */
10438 /* We use char because int might match the return type of a gcc2
10439     builtin and then its argument prototype would still apply.  */
10440 char cthread_fork();
10441 char (*f)();
10442
10443 int main() {
10444
10445 /* The GNU C library defines this for functions which it implements
10446     to always fail with ENOSYS.  Some functions are actually named
10447     something starting with __ and the normal name is an alias.  */
10448 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10449 choke me
10450 #else
10451 f = cthread_fork;
10452 #endif
10453
10454 ; return 0; }
10455 EOF
10456 if { (eval echo configure:10457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10457   rm -rf conftest*
10458   eval "ac_cv_func_cthread_fork=yes"
10459 else
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -rf conftest*
10463   eval "ac_cv_func_cthread_fork=no"
10464 fi
10465 rm -f conftest*
10466 fi
10467
10468 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10469   echo "$ac_t""yes" 1>&6
10470   ol_link_threads=yes
10471 else
10472   echo "$ac_t""no" 1>&6
10473 fi
10474
10475
10476                 if test $ol_link_threads = no ; then
10477                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10478 echo "configure:10479: checking for cthread_fork with -all_load" >&5
10479 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   
10483                                                                 save_LIBS="$LIBS"
10484                                 LIBS="-all_load $LIBS"
10485                                 cat > conftest.$ac_ext <<EOF
10486 #line 10487 "configure"
10487 #include "confdefs.h"
10488 #include <mach/cthreads.h>
10489 int main() {
10490
10491                                         cthread_fork((void *)0, (void *)0);
10492                                         
10493 ; return 0; }
10494 EOF
10495 if { (eval echo configure:10496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10496   rm -rf conftest*
10497   ol_cv_cthread_all_load=yes
10498 else
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   ol_cv_cthread_all_load=no
10503 fi
10504 rm -f conftest*
10505                                                                 LIBS="$save_LIBS"
10506                         
10507 fi
10508
10509 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10510
10511                         if test $ol_cv_cthread_all_load = yes ; then
10512                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10513                                 ol_link_threads=mach
10514                         fi
10515                 fi
10516
10517                 if test $ol_link_threads != no ; then
10518                         : check for cthread specific functionality here
10519                         cat >> confdefs.h <<\EOF
10520 #define HAVE_MACH_CTHREADS 1
10521 EOF
10522
10523                 else
10524                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10525                 fi
10526         fi
10527
10528         if test $ol_with_threads = mach ; then
10529                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10530         fi
10531 fi
10532
10533 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10534         -o $ol_with_threads = pth ; then
10535
10536         for ac_hdr in pth.h
10537 do
10538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10540 echo "configure:10541: checking for $ac_hdr" >&5
10541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10542   echo $ac_n "(cached) $ac_c" 1>&6
10543 else
10544   cat > conftest.$ac_ext <<EOF
10545 #line 10546 "configure"
10546 #include "confdefs.h"
10547 #include <$ac_hdr>
10548 EOF
10549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10550 { (eval echo configure:10551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10552 if test -z "$ac_err"; then
10553   rm -rf conftest*
10554   eval "ac_cv_header_$ac_safe=yes"
10555 else
10556   echo "$ac_err" >&5
10557   echo "configure: failed program was:" >&5
10558   cat conftest.$ac_ext >&5
10559   rm -rf conftest*
10560   eval "ac_cv_header_$ac_safe=no"
10561 fi
10562 rm -f conftest*
10563 fi
10564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10565   echo "$ac_t""yes" 1>&6
10566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10567   cat >> confdefs.h <<EOF
10568 #define $ac_tr_hdr 1
10569 EOF
10570  
10571 else
10572   echo "$ac_t""no" 1>&6
10573 fi
10574 done
10575
10576
10577         if test $ac_cv_header_pth_h = yes ; then
10578                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10579 echo "configure:10580: checking for pth_version in -lpth" >&5
10580 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10581 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10582   echo $ac_n "(cached) $ac_c" 1>&6
10583 else
10584   ac_save_LIBS="$LIBS"
10585 LIBS="-lpth  $LIBS"
10586 cat > conftest.$ac_ext <<EOF
10587 #line 10588 "configure"
10588 #include "confdefs.h"
10589 /* Override any gcc2 internal prototype to avoid an error.  */
10590 /* We use char because int might match the return type of a gcc2
10591     builtin and then its argument prototype would still apply.  */
10592 char pth_version();
10593
10594 int main() {
10595 pth_version()
10596 ; return 0; }
10597 EOF
10598 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10599   rm -rf conftest*
10600   eval "ac_cv_lib_$ac_lib_var=yes"
10601 else
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -rf conftest*
10605   eval "ac_cv_lib_$ac_lib_var=no"
10606 fi
10607 rm -f conftest*
10608 LIBS="$ac_save_LIBS"
10609
10610 fi
10611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10612   echo "$ac_t""yes" 1>&6
10613   have_pth=yes
10614 else
10615   echo "$ac_t""no" 1>&6
10616 have_pth=no
10617 fi
10618
10619
10620                 if test $have_pth = yes ; then
10621                         cat >> confdefs.h <<\EOF
10622 #define HAVE_GNU_PTH 1
10623 EOF
10624
10625                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10626                         ol_link_threads=pth
10627
10628                         if test $ol_with_yielding_select = auto ; then
10629                                 ol_with_yielding_select=yes
10630                         fi
10631                 fi
10632         fi
10633 fi
10634
10635 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10636         -o $ol_with_threads = lwp ; then
10637
10638                 for ac_hdr in thread.h synch.h
10639 do
10640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10641 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10642 echo "configure:10643: checking for $ac_hdr" >&5
10643 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10644   echo $ac_n "(cached) $ac_c" 1>&6
10645 else
10646   cat > conftest.$ac_ext <<EOF
10647 #line 10648 "configure"
10648 #include "confdefs.h"
10649 #include <$ac_hdr>
10650 EOF
10651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10652 { (eval echo configure:10653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10654 if test -z "$ac_err"; then
10655   rm -rf conftest*
10656   eval "ac_cv_header_$ac_safe=yes"
10657 else
10658   echo "$ac_err" >&5
10659   echo "configure: failed program was:" >&5
10660   cat conftest.$ac_ext >&5
10661   rm -rf conftest*
10662   eval "ac_cv_header_$ac_safe=no"
10663 fi
10664 rm -f conftest*
10665 fi
10666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10667   echo "$ac_t""yes" 1>&6
10668     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10669   cat >> confdefs.h <<EOF
10670 #define $ac_tr_hdr 1
10671 EOF
10672  
10673 else
10674   echo "$ac_t""no" 1>&6
10675 fi
10676 done
10677
10678         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10679                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10680 echo "configure:10681: checking for thr_create in -lthread" >&5
10681 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10682 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10683   echo $ac_n "(cached) $ac_c" 1>&6
10684 else
10685   ac_save_LIBS="$LIBS"
10686 LIBS="-lthread  $LIBS"
10687 cat > conftest.$ac_ext <<EOF
10688 #line 10689 "configure"
10689 #include "confdefs.h"
10690 /* Override any gcc2 internal prototype to avoid an error.  */
10691 /* We use char because int might match the return type of a gcc2
10692     builtin and then its argument prototype would still apply.  */
10693 char thr_create();
10694
10695 int main() {
10696 thr_create()
10697 ; return 0; }
10698 EOF
10699 if { (eval echo configure:10700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10700   rm -rf conftest*
10701   eval "ac_cv_lib_$ac_lib_var=yes"
10702 else
10703   echo "configure: failed program was:" >&5
10704   cat conftest.$ac_ext >&5
10705   rm -rf conftest*
10706   eval "ac_cv_lib_$ac_lib_var=no"
10707 fi
10708 rm -f conftest*
10709 LIBS="$ac_save_LIBS"
10710
10711 fi
10712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10713   echo "$ac_t""yes" 1>&6
10714   have_thr=yes
10715 else
10716   echo "$ac_t""no" 1>&6
10717 have_thr=no
10718 fi
10719
10720
10721                 if test $have_thr = yes ; then
10722                         cat >> confdefs.h <<\EOF
10723 #define HAVE_THR 1
10724 EOF
10725
10726                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10727                         ol_link_threads=thr
10728
10729                         if test $ol_with_yielding_select = auto ; then
10730                                 ol_with_yielding_select=yes
10731                         fi
10732
10733                                                 for ac_func in \
10734                                 thr_setconcurrency \
10735                                 thr_getconcurrency \
10736                         
10737 do
10738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10739 echo "configure:10740: checking for $ac_func" >&5
10740 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 /* System header to define __stub macros and hopefully few prototypes,
10747     which can conflict with char $ac_func(); below.  */
10748 #include <assert.h>
10749 /* Override any gcc2 internal prototype to avoid an error.  */
10750 /* We use char because int might match the return type of a gcc2
10751     builtin and then its argument prototype would still apply.  */
10752 char $ac_func();
10753 char (*f)();
10754
10755 int main() {
10756
10757 /* The GNU C library defines this for functions which it implements
10758     to always fail with ENOSYS.  Some functions are actually named
10759     something starting with __ and the normal name is an alias.  */
10760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10761 choke me
10762 #else
10763 f = $ac_func;
10764 #endif
10765
10766 ; return 0; }
10767 EOF
10768 if { (eval echo configure:10769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10769   rm -rf conftest*
10770   eval "ac_cv_func_$ac_func=yes"
10771 else
10772   echo "configure: failed program was:" >&5
10773   cat conftest.$ac_ext >&5
10774   rm -rf conftest*
10775   eval "ac_cv_func_$ac_func=no"
10776 fi
10777 rm -f conftest*
10778 fi
10779
10780 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10781   echo "$ac_t""yes" 1>&6
10782     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10783   cat >> confdefs.h <<EOF
10784 #define $ac_tr_func 1
10785 EOF
10786  
10787 else
10788   echo "$ac_t""no" 1>&6
10789 fi
10790 done
10791
10792                 fi
10793         fi
10794
10795                 for ac_hdr in lwp/lwp.h
10796 do
10797 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10798 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10799 echo "configure:10800: checking for $ac_hdr" >&5
10800 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10801   echo $ac_n "(cached) $ac_c" 1>&6
10802 else
10803   cat > conftest.$ac_ext <<EOF
10804 #line 10805 "configure"
10805 #include "confdefs.h"
10806 #include <$ac_hdr>
10807 EOF
10808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10809 { (eval echo configure:10810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10811 if test -z "$ac_err"; then
10812   rm -rf conftest*
10813   eval "ac_cv_header_$ac_safe=yes"
10814 else
10815   echo "$ac_err" >&5
10816   echo "configure: failed program was:" >&5
10817   cat conftest.$ac_ext >&5
10818   rm -rf conftest*
10819   eval "ac_cv_header_$ac_safe=no"
10820 fi
10821 rm -f conftest*
10822 fi
10823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10824   echo "$ac_t""yes" 1>&6
10825     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10826   cat >> confdefs.h <<EOF
10827 #define $ac_tr_hdr 1
10828 EOF
10829  
10830 else
10831   echo "$ac_t""no" 1>&6
10832 fi
10833 done
10834
10835         if test $ac_cv_header_lwp_lwp_h = yes ; then
10836                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10837 echo "configure:10838: checking for lwp_create in -llwp" >&5
10838 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10839 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10840   echo $ac_n "(cached) $ac_c" 1>&6
10841 else
10842   ac_save_LIBS="$LIBS"
10843 LIBS="-llwp  $LIBS"
10844 cat > conftest.$ac_ext <<EOF
10845 #line 10846 "configure"
10846 #include "confdefs.h"
10847 /* Override any gcc2 internal prototype to avoid an error.  */
10848 /* We use char because int might match the return type of a gcc2
10849     builtin and then its argument prototype would still apply.  */
10850 char lwp_create();
10851
10852 int main() {
10853 lwp_create()
10854 ; return 0; }
10855 EOF
10856 if { (eval echo configure:10857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10857   rm -rf conftest*
10858   eval "ac_cv_lib_$ac_lib_var=yes"
10859 else
10860   echo "configure: failed program was:" >&5
10861   cat conftest.$ac_ext >&5
10862   rm -rf conftest*
10863   eval "ac_cv_lib_$ac_lib_var=no"
10864 fi
10865 rm -f conftest*
10866 LIBS="$ac_save_LIBS"
10867
10868 fi
10869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10870   echo "$ac_t""yes" 1>&6
10871   have_lwp=yes
10872 else
10873   echo "$ac_t""no" 1>&6
10874 have_lwp=no
10875 fi
10876
10877
10878                 if test $have_lwp = yes ; then
10879                         cat >> confdefs.h <<\EOF
10880 #define HAVE_LWP 1
10881 EOF
10882
10883                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10884                         ol_link_threads=lwp
10885
10886                         if test $ol_with_yielding_select = auto ; then
10887                                 ol_with_yielding_select=no
10888                         fi
10889                 fi
10890         fi
10891 fi
10892
10893 if test $ol_with_yielding_select = yes ; then
10894         cat >> confdefs.h <<\EOF
10895 #define HAVE_YIELDING_SELECT 1
10896 EOF
10897
10898 fi
10899
10900 if test $ol_with_threads = manual ; then
10901                 ol_link_threads=yes
10902
10903         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10904
10905         for ac_hdr in pthread.h sched.h
10906 do
10907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10908 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10909 echo "configure:10910: checking for $ac_hdr" >&5
10910 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10911   echo $ac_n "(cached) $ac_c" 1>&6
10912 else
10913   cat > conftest.$ac_ext <<EOF
10914 #line 10915 "configure"
10915 #include "confdefs.h"
10916 #include <$ac_hdr>
10917 EOF
10918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10919 { (eval echo configure:10920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10921 if test -z "$ac_err"; then
10922   rm -rf conftest*
10923   eval "ac_cv_header_$ac_safe=yes"
10924 else
10925   echo "$ac_err" >&5
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   eval "ac_cv_header_$ac_safe=no"
10930 fi
10931 rm -f conftest*
10932 fi
10933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10934   echo "$ac_t""yes" 1>&6
10935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10936   cat >> confdefs.h <<EOF
10937 #define $ac_tr_hdr 1
10938 EOF
10939  
10940 else
10941   echo "$ac_t""no" 1>&6
10942 fi
10943 done
10944
10945         for ac_func in sched_yield pthread_yield
10946 do
10947 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10948 echo "configure:10949: checking for $ac_func" >&5
10949 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10950   echo $ac_n "(cached) $ac_c" 1>&6
10951 else
10952   cat > conftest.$ac_ext <<EOF
10953 #line 10954 "configure"
10954 #include "confdefs.h"
10955 /* System header to define __stub macros and hopefully few prototypes,
10956     which can conflict with char $ac_func(); below.  */
10957 #include <assert.h>
10958 /* Override any gcc2 internal prototype to avoid an error.  */
10959 /* We use char because int might match the return type of a gcc2
10960     builtin and then its argument prototype would still apply.  */
10961 char $ac_func();
10962 char (*f)();
10963
10964 int main() {
10965
10966 /* The GNU C library defines this for functions which it implements
10967     to always fail with ENOSYS.  Some functions are actually named
10968     something starting with __ and the normal name is an alias.  */
10969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10970 choke me
10971 #else
10972 f = $ac_func;
10973 #endif
10974
10975 ; return 0; }
10976 EOF
10977 if { (eval echo configure:10978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10978   rm -rf conftest*
10979   eval "ac_cv_func_$ac_func=yes"
10980 else
10981   echo "configure: failed program was:" >&5
10982   cat conftest.$ac_ext >&5
10983   rm -rf conftest*
10984   eval "ac_cv_func_$ac_func=no"
10985 fi
10986 rm -f conftest*
10987 fi
10988
10989 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10990   echo "$ac_t""yes" 1>&6
10991     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10992   cat >> confdefs.h <<EOF
10993 #define $ac_tr_func 1
10994 EOF
10995  
10996 else
10997   echo "$ac_t""no" 1>&6
10998 fi
10999 done
11000
11001         
11002         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11003 echo "configure:11004: checking for LinuxThreads pthread.h" >&5
11004 if eval "test \"\${ol_cv_header_linux_threads+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 #include <pthread.h>
11011 EOF
11012 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11013   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11014   rm -rf conftest*
11015   ol_cv_header_linux_threads=yes
11016 else
11017   rm -rf conftest*
11018   ol_cv_header_linux_threads=no
11019 fi
11020 rm -f conftest*
11021
11022                 
11023 fi
11024
11025 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11026         if test $ol_cv_header_linux_threads = yes; then
11027                 cat >> confdefs.h <<\EOF
11028 #define HAVE_LINUX_THREADS 1
11029 EOF
11030
11031         fi
11032
11033
11034         for ac_hdr in mach/cthreads.h
11035 do
11036 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11037 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11038 echo "configure:11039: checking for $ac_hdr" >&5
11039 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11040   echo $ac_n "(cached) $ac_c" 1>&6
11041 else
11042   cat > conftest.$ac_ext <<EOF
11043 #line 11044 "configure"
11044 #include "confdefs.h"
11045 #include <$ac_hdr>
11046 EOF
11047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11048 { (eval echo configure:11049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11050 if test -z "$ac_err"; then
11051   rm -rf conftest*
11052   eval "ac_cv_header_$ac_safe=yes"
11053 else
11054   echo "$ac_err" >&5
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -rf conftest*
11058   eval "ac_cv_header_$ac_safe=no"
11059 fi
11060 rm -f conftest*
11061 fi
11062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11063   echo "$ac_t""yes" 1>&6
11064     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11065   cat >> confdefs.h <<EOF
11066 #define $ac_tr_hdr 1
11067 EOF
11068  
11069 else
11070   echo "$ac_t""no" 1>&6
11071 fi
11072 done
11073
11074         for ac_hdr in lwp/lwp.h
11075 do
11076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11078 echo "configure:11079: checking for $ac_hdr" >&5
11079 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11080   echo $ac_n "(cached) $ac_c" 1>&6
11081 else
11082   cat > conftest.$ac_ext <<EOF
11083 #line 11084 "configure"
11084 #include "confdefs.h"
11085 #include <$ac_hdr>
11086 EOF
11087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11088 { (eval echo configure:11089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11090 if test -z "$ac_err"; then
11091   rm -rf conftest*
11092   eval "ac_cv_header_$ac_safe=yes"
11093 else
11094   echo "$ac_err" >&5
11095   echo "configure: failed program was:" >&5
11096   cat conftest.$ac_ext >&5
11097   rm -rf conftest*
11098   eval "ac_cv_header_$ac_safe=no"
11099 fi
11100 rm -f conftest*
11101 fi
11102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11103   echo "$ac_t""yes" 1>&6
11104     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11105   cat >> confdefs.h <<EOF
11106 #define $ac_tr_hdr 1
11107 EOF
11108  
11109 else
11110   echo "$ac_t""no" 1>&6
11111 fi
11112 done
11113
11114         for ac_hdr in thread.h synch.h
11115 do
11116 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11117 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11118 echo "configure:11119: checking for $ac_hdr" >&5
11119 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11120   echo $ac_n "(cached) $ac_c" 1>&6
11121 else
11122   cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125 #include <$ac_hdr>
11126 EOF
11127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11128 { (eval echo configure:11129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11130 if test -z "$ac_err"; then
11131   rm -rf conftest*
11132   eval "ac_cv_header_$ac_safe=yes"
11133 else
11134   echo "$ac_err" >&5
11135   echo "configure: failed program was:" >&5
11136   cat conftest.$ac_ext >&5
11137   rm -rf conftest*
11138   eval "ac_cv_header_$ac_safe=no"
11139 fi
11140 rm -f conftest*
11141 fi
11142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11143   echo "$ac_t""yes" 1>&6
11144     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11145   cat >> confdefs.h <<EOF
11146 #define $ac_tr_hdr 1
11147 EOF
11148  
11149 else
11150   echo "$ac_t""no" 1>&6
11151 fi
11152 done
11153
11154 fi
11155
11156 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11157                         cat >> confdefs.h <<\EOF
11158 #define REENTRANT 1
11159 EOF
11160
11161         cat >> confdefs.h <<\EOF
11162 #define _REENTRANT 1
11163 EOF
11164
11165         cat >> confdefs.h <<\EOF
11166 #define THREAD_SAFE 1
11167 EOF
11168
11169         cat >> confdefs.h <<\EOF
11170 #define _THREAD_SAFE 1
11171 EOF
11172
11173         cat >> confdefs.h <<\EOF
11174 #define THREADSAFE 1
11175 EOF
11176
11177         cat >> confdefs.h <<\EOF
11178 #define _THREADSAFE 1
11179 EOF
11180
11181         cat >> confdefs.h <<\EOF
11182 #define _SGI_MP_SOURCE 1
11183 EOF
11184
11185
11186                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11187 echo "configure:11188: checking for thread specific errno" >&5
11188 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11189   echo $ac_n "(cached) $ac_c" 1>&6
11190 else
11191   
11192                 cat > conftest.$ac_ext <<EOF
11193 #line 11194 "configure"
11194 #include "confdefs.h"
11195 #include <errno.h>
11196 int main() {
11197 errno = 0;
11198 ; return 0; }
11199 EOF
11200 if { (eval echo configure:11201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11201   rm -rf conftest*
11202   ol_cv_errno_thread_specific=yes
11203 else
11204   echo "configure: failed program was:" >&5
11205   cat conftest.$ac_ext >&5
11206   rm -rf conftest*
11207   ol_cv_errno_thread_specific=no
11208 fi
11209 rm -f conftest*
11210         
11211 fi
11212
11213 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11214
11215                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11216 echo "configure:11217: checking for thread specific h_errno" >&5
11217 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11218   echo $ac_n "(cached) $ac_c" 1>&6
11219 else
11220   
11221                 cat > conftest.$ac_ext <<EOF
11222 #line 11223 "configure"
11223 #include "confdefs.h"
11224 #include <netdb.h>
11225 int main() {
11226 h_errno = 0;
11227 ; return 0; }
11228 EOF
11229 if { (eval echo configure:11230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11230   rm -rf conftest*
11231   ol_cv_h_errno_thread_specific=yes
11232 else
11233   echo "configure: failed program was:" >&5
11234   cat conftest.$ac_ext >&5
11235   rm -rf conftest*
11236   ol_cv_h_errno_thread_specific=no
11237 fi
11238 rm -f conftest*
11239         
11240 fi
11241
11242 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11243
11244         if test $ol_cv_errno_thread_specific != yes \
11245                 -o $ol_cv_h_errno_thread_specific != yes ; then
11246                 LIBS="$LTHREAD_LIBS $LIBS"
11247                 LTHREAD_LIBS=""
11248         fi
11249
11250 fi  
11251
11252 if test $ol_link_threads = no ; then
11253         if test $ol_with_threads = yes ; then
11254                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11255         fi
11256
11257         if test $ol_with_threads = auto ; then
11258                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11259                 ol_with_threads=no
11260         fi
11261
11262         cat >> confdefs.h <<\EOF
11263 #define NO_THREADS 1
11264 EOF
11265
11266         LTHREAD_LIBS=""
11267 fi
11268
11269 if test $ol_link_threads != no ; then
11270         cat >> confdefs.h <<\EOF
11271 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11272 EOF
11273
11274 fi
11275
11276 ol_link_ldbm=no 
11277
11278 if test $ol_with_ldbm_api = auto \
11279         -o $ol_with_ldbm_api = berkeley \
11280         -o $ol_with_ldbm_api = bcompat ; then
11281
11282         if test $ol_with_ldbm_api = bcompat; then \
11283                 ol_cv_berkeley_db=no
11284 for ac_hdr in db_185.h db.h
11285 do
11286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11288 echo "configure:11289: checking for $ac_hdr" >&5
11289 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11290   echo $ac_n "(cached) $ac_c" 1>&6
11291 else
11292   cat > conftest.$ac_ext <<EOF
11293 #line 11294 "configure"
11294 #include "confdefs.h"
11295 #include <$ac_hdr>
11296 EOF
11297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11298 { (eval echo configure:11299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11300 if test -z "$ac_err"; then
11301   rm -rf conftest*
11302   eval "ac_cv_header_$ac_safe=yes"
11303 else
11304   echo "$ac_err" >&5
11305   echo "configure: failed program was:" >&5
11306   cat conftest.$ac_ext >&5
11307   rm -rf conftest*
11308   eval "ac_cv_header_$ac_safe=no"
11309 fi
11310 rm -f conftest*
11311 fi
11312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11313   echo "$ac_t""yes" 1>&6
11314     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11315   cat >> confdefs.h <<EOF
11316 #define $ac_tr_hdr 1
11317 EOF
11318  
11319 else
11320   echo "$ac_t""no" 1>&6
11321 fi
11322 done
11323
11324 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11325         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11326 echo "configure:11327: checking if Berkeley DB header compatibility" >&5
11327 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11328   echo $ac_n "(cached) $ac_c" 1>&6
11329 else
11330   
11331                 cat > conftest.$ac_ext <<EOF
11332 #line 11333 "configure"
11333 #include "confdefs.h"
11334
11335 #if HAVE_DB_185_H
11336 #       include <db_185.h>
11337 #else
11338 #       include <db.h>
11339 #endif
11340
11341  /* this check could be improved */
11342 #ifndef DB_VERSION_MAJOR
11343 #       define DB_VERSION_MAJOR 1
11344 #endif
11345
11346 #if DB_VERSION_MAJOR == 1 
11347         __db_version_1
11348 #endif
11349
11350 EOF
11351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11352   egrep "__db_version_1" >/dev/null 2>&1; then
11353   rm -rf conftest*
11354   ol_cv_header_db1=yes
11355 else
11356   rm -rf conftest*
11357   ol_cv_header_db1=no
11358 fi
11359 rm -f conftest*
11360
11361 fi
11362
11363 echo "$ac_t""$ol_cv_header_db1" 1>&6
11364
11365         if test ol_cv_header_db1=yes ; then
11366                 ol_cv_lib_db=no
11367 if test $ol_cv_lib_db = no ; then
11368         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11369 echo "configure:11370: checking for Berkeley DB link (default)" >&5
11370 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11371   echo $ac_n "(cached) $ac_c" 1>&6
11372 else
11373   
11374         ol_DB_LIB=
11375         ol_LIBS=$LIBS
11376         LIBS="$ol_DB_LIB $LIBS"
11377
11378         cat > conftest.$ac_ext <<EOF
11379 #line 11380 "configure"
11380 #include "confdefs.h"
11381
11382 #ifdef HAVE_DB_185_H
11383 # include <db_185.h>
11384 #else
11385 # include <db.h>
11386 #endif
11387
11388 #ifndef DB_VERSION_MAJOR
11389 # define DB_VERSION_MAJOR 1
11390 #endif
11391
11392 #ifndef NULL
11393 #define NULL ((void*)0)
11394 #endif
11395
11396 int main() {
11397
11398 #if DB_VERSION_MAJOR > 2
11399         db_env_create( NULL, 0 );
11400 #elif DB_VERSION_MAJOR > 1
11401         db_appexit( NULL );
11402 #else
11403         (void) dbopen( NULL, 0, 0, 0, NULL);
11404 #endif
11405
11406 ; return 0; }
11407 EOF
11408 if { (eval echo configure:11409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11409   rm -rf conftest*
11410   ol_cv_db_none=yes
11411 else
11412   echo "configure: failed program was:" >&5
11413   cat conftest.$ac_ext >&5
11414   rm -rf conftest*
11415   ol_cv_db_none=no
11416 fi
11417 rm -f conftest*
11418
11419         LIBS="$ol_LIBS"
11420
11421 fi
11422
11423 echo "$ac_t""$ol_cv_db_none" 1>&6
11424
11425         if test $ol_cv_db_none = yes ; then
11426                 ol_cv_lib_db=yes
11427         fi
11428 fi
11429
11430 if test $ol_cv_lib_db = no ; then
11431         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11432 echo "configure:11433: checking for Berkeley DB link (-ldb)" >&5
11433 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11434   echo $ac_n "(cached) $ac_c" 1>&6
11435 else
11436   
11437         ol_DB_LIB=-ldb
11438         ol_LIBS=$LIBS
11439         LIBS="$ol_DB_LIB $LIBS"
11440
11441         cat > conftest.$ac_ext <<EOF
11442 #line 11443 "configure"
11443 #include "confdefs.h"
11444
11445 #ifdef HAVE_DB_185_H
11446 # include <db_185.h>
11447 #else
11448 # include <db.h>
11449 #endif
11450
11451 #ifndef DB_VERSION_MAJOR
11452 # define DB_VERSION_MAJOR 1
11453 #endif
11454
11455 #ifndef NULL
11456 #define NULL ((void*)0)
11457 #endif
11458
11459 int main() {
11460
11461 #if DB_VERSION_MAJOR > 2
11462         db_env_create( NULL, 0 );
11463 #elif DB_VERSION_MAJOR > 1
11464         db_appexit( NULL );
11465 #else
11466         (void) dbopen( NULL, 0, 0, 0, NULL);
11467 #endif
11468
11469 ; return 0; }
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11472   rm -rf conftest*
11473   ol_cv_db_db=yes
11474 else
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   ol_cv_db_db=no
11479 fi
11480 rm -f conftest*
11481
11482         LIBS="$ol_LIBS"
11483
11484 fi
11485
11486 echo "$ac_t""$ol_cv_db_db" 1>&6
11487
11488         if test $ol_cv_db_db = yes ; then
11489                 ol_cv_lib_db=-ldb
11490         fi
11491 fi
11492
11493 if test $ol_cv_lib_db = no ; then
11494         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11495 echo "configure:11496: checking for Berkeley DB link (-ldb3)" >&5
11496 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11497   echo $ac_n "(cached) $ac_c" 1>&6
11498 else
11499   
11500         ol_DB_LIB=-ldb3
11501         ol_LIBS=$LIBS
11502         LIBS="$ol_DB_LIB $LIBS"
11503
11504         cat > conftest.$ac_ext <<EOF
11505 #line 11506 "configure"
11506 #include "confdefs.h"
11507
11508 #ifdef HAVE_DB_185_H
11509 # include <db_185.h>
11510 #else
11511 # include <db.h>
11512 #endif
11513
11514 #ifndef DB_VERSION_MAJOR
11515 # define DB_VERSION_MAJOR 1
11516 #endif
11517
11518 #ifndef NULL
11519 #define NULL ((void*)0)
11520 #endif
11521
11522 int main() {
11523
11524 #if DB_VERSION_MAJOR > 2
11525         db_env_create( NULL, 0 );
11526 #elif DB_VERSION_MAJOR > 1
11527         db_appexit( NULL );
11528 #else
11529         (void) dbopen( NULL, 0, 0, 0, NULL);
11530 #endif
11531
11532 ; return 0; }
11533 EOF
11534 if { (eval echo configure:11535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11535   rm -rf conftest*
11536   ol_cv_db_db3=yes
11537 else
11538   echo "configure: failed program was:" >&5
11539   cat conftest.$ac_ext >&5
11540   rm -rf conftest*
11541   ol_cv_db_db3=no
11542 fi
11543 rm -f conftest*
11544
11545         LIBS="$ol_LIBS"
11546
11547 fi
11548
11549 echo "$ac_t""$ol_cv_db_db3" 1>&6
11550
11551         if test $ol_cv_db_db3 = yes ; then
11552                 ol_cv_lib_db=-ldb3
11553         fi
11554 fi
11555
11556 if test $ol_cv_lib_db = no ; then
11557         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11558 echo "configure:11559: checking for Berkeley DB link (-ldb2)" >&5
11559 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11560   echo $ac_n "(cached) $ac_c" 1>&6
11561 else
11562   
11563         ol_DB_LIB=-ldb2
11564         ol_LIBS=$LIBS
11565         LIBS="$ol_DB_LIB $LIBS"
11566
11567         cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570
11571 #ifdef HAVE_DB_185_H
11572 # include <db_185.h>
11573 #else
11574 # include <db.h>
11575 #endif
11576
11577 #ifndef DB_VERSION_MAJOR
11578 # define DB_VERSION_MAJOR 1
11579 #endif
11580
11581 #ifndef NULL
11582 #define NULL ((void*)0)
11583 #endif
11584
11585 int main() {
11586
11587 #if DB_VERSION_MAJOR > 2
11588         db_env_create( NULL, 0 );
11589 #elif DB_VERSION_MAJOR > 1
11590         db_appexit( NULL );
11591 #else
11592         (void) dbopen( NULL, 0, 0, 0, NULL);
11593 #endif
11594
11595 ; return 0; }
11596 EOF
11597 if { (eval echo configure:11598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11598   rm -rf conftest*
11599   ol_cv_db_db2=yes
11600 else
11601   echo "configure: failed program was:" >&5
11602   cat conftest.$ac_ext >&5
11603   rm -rf conftest*
11604   ol_cv_db_db2=no
11605 fi
11606 rm -f conftest*
11607
11608         LIBS="$ol_LIBS"
11609
11610 fi
11611
11612 echo "$ac_t""$ol_cv_db_db2" 1>&6
11613
11614         if test $ol_cv_db_db2 = yes ; then
11615                 ol_cv_lib_db=-ldb2
11616         fi
11617 fi
11618
11619 if test $ol_cv_lib_db = no ; then
11620         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11621 echo "configure:11622: checking for Berkeley DB link (-ldb1)" >&5
11622 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11623   echo $ac_n "(cached) $ac_c" 1>&6
11624 else
11625   
11626         ol_DB_LIB=-ldb1
11627         ol_LIBS=$LIBS
11628         LIBS="$ol_DB_LIB $LIBS"
11629
11630         cat > conftest.$ac_ext <<EOF
11631 #line 11632 "configure"
11632 #include "confdefs.h"
11633
11634 #ifdef HAVE_DB_185_H
11635 # include <db_185.h>
11636 #else
11637 # include <db.h>
11638 #endif
11639
11640 #ifndef DB_VERSION_MAJOR
11641 # define DB_VERSION_MAJOR 1
11642 #endif
11643
11644 #ifndef NULL
11645 #define NULL ((void*)0)
11646 #endif
11647
11648 int main() {
11649
11650 #if DB_VERSION_MAJOR > 2
11651         db_env_create( NULL, 0 );
11652 #elif DB_VERSION_MAJOR > 1
11653         db_appexit( NULL );
11654 #else
11655         (void) dbopen( NULL, 0, 0, 0, NULL);
11656 #endif
11657
11658 ; return 0; }
11659 EOF
11660 if { (eval echo configure:11661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11661   rm -rf conftest*
11662   ol_cv_db_db1=yes
11663 else
11664   echo "configure: failed program was:" >&5
11665   cat conftest.$ac_ext >&5
11666   rm -rf conftest*
11667   ol_cv_db_db1=no
11668 fi
11669 rm -f conftest*
11670
11671         LIBS="$ol_LIBS"
11672
11673 fi
11674
11675 echo "$ac_t""$ol_cv_db_db1" 1>&6
11676
11677         if test $ol_cv_db_db1 = yes ; then
11678                 ol_cv_lib_db=-ldb1
11679         fi
11680 fi
11681
11682
11683                 if test "$ol_cv_lib_db" != no ; then
11684                         ol_cv_berkeley_db=yes
11685                 fi
11686         fi
11687 fi
11688
11689         else
11690                 ol_cv_berkeley_db=no
11691 for ac_hdr in db.h
11692 do
11693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11695 echo "configure:11696: checking for $ac_hdr" >&5
11696 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11697   echo $ac_n "(cached) $ac_c" 1>&6
11698 else
11699   cat > conftest.$ac_ext <<EOF
11700 #line 11701 "configure"
11701 #include "confdefs.h"
11702 #include <$ac_hdr>
11703 EOF
11704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11705 { (eval echo configure:11706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11707 if test -z "$ac_err"; then
11708   rm -rf conftest*
11709   eval "ac_cv_header_$ac_safe=yes"
11710 else
11711   echo "$ac_err" >&5
11712   echo "configure: failed program was:" >&5
11713   cat conftest.$ac_ext >&5
11714   rm -rf conftest*
11715   eval "ac_cv_header_$ac_safe=no"
11716 fi
11717 rm -f conftest*
11718 fi
11719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11720   echo "$ac_t""yes" 1>&6
11721     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11722   cat >> confdefs.h <<EOF
11723 #define $ac_tr_hdr 1
11724 EOF
11725  
11726 else
11727   echo "$ac_t""no" 1>&6
11728 fi
11729 done
11730
11731 if test $ac_cv_header_db_h = yes; then
11732         ol_cv_lib_db=no
11733 if test $ol_cv_lib_db = no ; then
11734         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11735 echo "configure:11736: checking for Berkeley DB link (default)" >&5
11736 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11737   echo $ac_n "(cached) $ac_c" 1>&6
11738 else
11739   
11740         ol_DB_LIB=
11741         ol_LIBS=$LIBS
11742         LIBS="$ol_DB_LIB $LIBS"
11743
11744         cat > conftest.$ac_ext <<EOF
11745 #line 11746 "configure"
11746 #include "confdefs.h"
11747
11748 #ifdef HAVE_DB_185_H
11749 # include <db_185.h>
11750 #else
11751 # include <db.h>
11752 #endif
11753
11754 #ifndef DB_VERSION_MAJOR
11755 # define DB_VERSION_MAJOR 1
11756 #endif
11757
11758 #ifndef NULL
11759 #define NULL ((void*)0)
11760 #endif
11761
11762 int main() {
11763
11764 #if DB_VERSION_MAJOR > 2
11765         db_env_create( NULL, 0 );
11766 #elif DB_VERSION_MAJOR > 1
11767         db_appexit( NULL );
11768 #else
11769         (void) dbopen( NULL, 0, 0, 0, NULL);
11770 #endif
11771
11772 ; return 0; }
11773 EOF
11774 if { (eval echo configure:11775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11775   rm -rf conftest*
11776   ol_cv_db_none=yes
11777 else
11778   echo "configure: failed program was:" >&5
11779   cat conftest.$ac_ext >&5
11780   rm -rf conftest*
11781   ol_cv_db_none=no
11782 fi
11783 rm -f conftest*
11784
11785         LIBS="$ol_LIBS"
11786
11787 fi
11788
11789 echo "$ac_t""$ol_cv_db_none" 1>&6
11790
11791         if test $ol_cv_db_none = yes ; then
11792                 ol_cv_lib_db=yes
11793         fi
11794 fi
11795
11796 if test $ol_cv_lib_db = no ; then
11797         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11798 echo "configure:11799: checking for Berkeley DB link (-ldb)" >&5
11799 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11800   echo $ac_n "(cached) $ac_c" 1>&6
11801 else
11802   
11803         ol_DB_LIB=-ldb
11804         ol_LIBS=$LIBS
11805         LIBS="$ol_DB_LIB $LIBS"
11806
11807         cat > conftest.$ac_ext <<EOF
11808 #line 11809 "configure"
11809 #include "confdefs.h"
11810
11811 #ifdef HAVE_DB_185_H
11812 # include <db_185.h>
11813 #else
11814 # include <db.h>
11815 #endif
11816
11817 #ifndef DB_VERSION_MAJOR
11818 # define DB_VERSION_MAJOR 1
11819 #endif
11820
11821 #ifndef NULL
11822 #define NULL ((void*)0)
11823 #endif
11824
11825 int main() {
11826
11827 #if DB_VERSION_MAJOR > 2
11828         db_env_create( NULL, 0 );
11829 #elif DB_VERSION_MAJOR > 1
11830         db_appexit( NULL );
11831 #else
11832         (void) dbopen( NULL, 0, 0, 0, NULL);
11833 #endif
11834
11835 ; return 0; }
11836 EOF
11837 if { (eval echo configure:11838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11838   rm -rf conftest*
11839   ol_cv_db_db=yes
11840 else
11841   echo "configure: failed program was:" >&5
11842   cat conftest.$ac_ext >&5
11843   rm -rf conftest*
11844   ol_cv_db_db=no
11845 fi
11846 rm -f conftest*
11847
11848         LIBS="$ol_LIBS"
11849
11850 fi
11851
11852 echo "$ac_t""$ol_cv_db_db" 1>&6
11853
11854         if test $ol_cv_db_db = yes ; then
11855                 ol_cv_lib_db=-ldb
11856         fi
11857 fi
11858
11859 if test $ol_cv_lib_db = no ; then
11860         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11861 echo "configure:11862: checking for Berkeley DB link (-ldb3)" >&5
11862 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11863   echo $ac_n "(cached) $ac_c" 1>&6
11864 else
11865   
11866         ol_DB_LIB=-ldb3
11867         ol_LIBS=$LIBS
11868         LIBS="$ol_DB_LIB $LIBS"
11869
11870         cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873
11874 #ifdef HAVE_DB_185_H
11875 # include <db_185.h>
11876 #else
11877 # include <db.h>
11878 #endif
11879
11880 #ifndef DB_VERSION_MAJOR
11881 # define DB_VERSION_MAJOR 1
11882 #endif
11883
11884 #ifndef NULL
11885 #define NULL ((void*)0)
11886 #endif
11887
11888 int main() {
11889
11890 #if DB_VERSION_MAJOR > 2
11891         db_env_create( NULL, 0 );
11892 #elif DB_VERSION_MAJOR > 1
11893         db_appexit( NULL );
11894 #else
11895         (void) dbopen( NULL, 0, 0, 0, NULL);
11896 #endif
11897
11898 ; return 0; }
11899 EOF
11900 if { (eval echo configure:11901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11901   rm -rf conftest*
11902   ol_cv_db_db3=yes
11903 else
11904   echo "configure: failed program was:" >&5
11905   cat conftest.$ac_ext >&5
11906   rm -rf conftest*
11907   ol_cv_db_db3=no
11908 fi
11909 rm -f conftest*
11910
11911         LIBS="$ol_LIBS"
11912
11913 fi
11914
11915 echo "$ac_t""$ol_cv_db_db3" 1>&6
11916
11917         if test $ol_cv_db_db3 = yes ; then
11918                 ol_cv_lib_db=-ldb3
11919         fi
11920 fi
11921
11922 if test $ol_cv_lib_db = no ; then
11923         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11924 echo "configure:11925: checking for Berkeley DB link (-ldb2)" >&5
11925 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11926   echo $ac_n "(cached) $ac_c" 1>&6
11927 else
11928   
11929         ol_DB_LIB=-ldb2
11930         ol_LIBS=$LIBS
11931         LIBS="$ol_DB_LIB $LIBS"
11932
11933         cat > conftest.$ac_ext <<EOF
11934 #line 11935 "configure"
11935 #include "confdefs.h"
11936
11937 #ifdef HAVE_DB_185_H
11938 # include <db_185.h>
11939 #else
11940 # include <db.h>
11941 #endif
11942
11943 #ifndef DB_VERSION_MAJOR
11944 # define DB_VERSION_MAJOR 1
11945 #endif
11946
11947 #ifndef NULL
11948 #define NULL ((void*)0)
11949 #endif
11950
11951 int main() {
11952
11953 #if DB_VERSION_MAJOR > 2
11954         db_env_create( NULL, 0 );
11955 #elif DB_VERSION_MAJOR > 1
11956         db_appexit( NULL );
11957 #else
11958         (void) dbopen( NULL, 0, 0, 0, NULL);
11959 #endif
11960
11961 ; return 0; }
11962 EOF
11963 if { (eval echo configure:11964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11964   rm -rf conftest*
11965   ol_cv_db_db2=yes
11966 else
11967   echo "configure: failed program was:" >&5
11968   cat conftest.$ac_ext >&5
11969   rm -rf conftest*
11970   ol_cv_db_db2=no
11971 fi
11972 rm -f conftest*
11973
11974         LIBS="$ol_LIBS"
11975
11976 fi
11977
11978 echo "$ac_t""$ol_cv_db_db2" 1>&6
11979
11980         if test $ol_cv_db_db2 = yes ; then
11981                 ol_cv_lib_db=-ldb2
11982         fi
11983 fi
11984
11985 if test $ol_cv_lib_db = no ; then
11986         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11987 echo "configure:11988: checking for Berkeley DB link (-ldb1)" >&5
11988 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11989   echo $ac_n "(cached) $ac_c" 1>&6
11990 else
11991   
11992         ol_DB_LIB=-ldb1
11993         ol_LIBS=$LIBS
11994         LIBS="$ol_DB_LIB $LIBS"
11995
11996         cat > conftest.$ac_ext <<EOF
11997 #line 11998 "configure"
11998 #include "confdefs.h"
11999
12000 #ifdef HAVE_DB_185_H
12001 # include <db_185.h>
12002 #else
12003 # include <db.h>
12004 #endif
12005
12006 #ifndef DB_VERSION_MAJOR
12007 # define DB_VERSION_MAJOR 1
12008 #endif
12009
12010 #ifndef NULL
12011 #define NULL ((void*)0)
12012 #endif
12013
12014 int main() {
12015
12016 #if DB_VERSION_MAJOR > 2
12017         db_env_create( NULL, 0 );
12018 #elif DB_VERSION_MAJOR > 1
12019         db_appexit( NULL );
12020 #else
12021         (void) dbopen( NULL, 0, 0, 0, NULL);
12022 #endif
12023
12024 ; return 0; }
12025 EOF
12026 if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12027   rm -rf conftest*
12028   ol_cv_db_db1=yes
12029 else
12030   echo "configure: failed program was:" >&5
12031   cat conftest.$ac_ext >&5
12032   rm -rf conftest*
12033   ol_cv_db_db1=no
12034 fi
12035 rm -f conftest*
12036
12037         LIBS="$ol_LIBS"
12038
12039 fi
12040
12041 echo "$ac_t""$ol_cv_db_db1" 1>&6
12042
12043         if test $ol_cv_db_db1 = yes ; then
12044                 ol_cv_lib_db=-ldb1
12045         fi
12046 fi
12047
12048
12049         if test "$ol_cv_lib_db" != no ; then
12050                 ol_cv_berkeley_db=yes
12051                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12052 echo "configure:12053: checking for Berkeley DB thread support" >&5
12053 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12054   echo $ac_n "(cached) $ac_c" 1>&6
12055 else
12056   
12057         ol_LIBS="$LIBS"
12058         if test $ol_cv_lib_db != yes ; then
12059                 LIBS="$ol_cv_lib_db"
12060         fi
12061
12062         if test "$cross_compiling" = yes; then
12063   ol_cv_berkeley_db_thread=cross
12064 else
12065   cat > conftest.$ac_ext <<EOF
12066 #line 12067 "configure"
12067 #include "confdefs.h"
12068
12069 #ifdef HAVE_DB_185_H
12070         choke me;
12071 #else
12072 #include <db.h>
12073 #endif
12074 #ifndef NULL
12075 #define NULL ((void *)0)
12076 #endif
12077 main()
12078 {
12079         int rc;
12080         u_int32_t flags = DB_CREATE | DB_THREAD;
12081
12082 #if DB_VERSION_MAJOR > 2
12083         DB_ENV *env = NULL;
12084
12085         rc = db_env_create( &env, 0 );
12086
12087         if( rc == 0 ) {
12088 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12089                 rc = env->open( env, NULL, flags, 0 );
12090 #else
12091                 rc = env->open( env, NULL, NULL, flags, 0 );
12092 #endif
12093         }
12094
12095 #else
12096         DB_ENV env;
12097         memset( &env, '\0', sizeof(env) );
12098
12099         rc = db_appinit( NULL, NULL, &env, flags );
12100
12101         if( rc == 0 ) {
12102                 db_appexit( &env );
12103         }
12104 #endif
12105 #if DB_VERSION_MAJOR > 2
12106 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12107         env->remove( env, NULL, DB_FORCE);
12108 #else
12109         env->remove( env, NULL, NULL, DB_FORCE);
12110 #endif
12111 #endif
12112
12113         return rc;
12114 }
12115 EOF
12116 if { (eval echo configure:12117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12117 then
12118   ol_cv_berkeley_db_thread=yes
12119 else
12120   echo "configure: failed program was:" >&5
12121   cat conftest.$ac_ext >&5
12122   rm -fr conftest*
12123   ol_cv_berkeley_db_thread=no
12124 fi
12125 rm -fr conftest*
12126 fi
12127
12128
12129         LIBS="$ol_LIBS"
12130
12131         if test $ol_cv_berkeley_db_thread != no ; then
12132                 cat >> confdefs.h <<\EOF
12133 #define HAVE_BERKELEY_DB_THREAD 1
12134 EOF
12135
12136         fi
12137
12138 fi
12139
12140 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12141         fi
12142 fi
12143
12144         fi
12145
12146         if test $ol_cv_berkeley_db != no ; then
12147                 cat >> confdefs.h <<\EOF
12148 #define HAVE_BERKELEY_DB 1
12149 EOF
12150
12151
12152                 ol_link_ldbm=berkeley
12153                 ol_with_ldbm_api=db
12154
12155                 if test $ol_with_ldbm_type = hash ; then
12156                         cat >> confdefs.h <<\EOF
12157 #define LDBM_USE_DBHASH 1
12158 EOF
12159
12160                 else
12161                         cat >> confdefs.h <<\EOF
12162 #define LDBM_USE_DBBTREE 1
12163 EOF
12164
12165                 fi
12166
12167                                                 if test $ol_cv_lib_db != yes ; then
12168                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12169                 fi
12170         fi
12171 fi
12172
12173 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12174         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12175         ol_with_ldbm_api=none
12176 fi
12177
12178 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12179         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12180 echo "configure:12181: checking for MDBM library" >&5
12181 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12182   echo $ac_n "(cached) $ac_c" 1>&6
12183 else
12184         ol_LIBS="$LIBS"
12185         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12186 echo "configure:12187: checking for mdbm_set_chain" >&5
12187 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12188   echo $ac_n "(cached) $ac_c" 1>&6
12189 else
12190   cat > conftest.$ac_ext <<EOF
12191 #line 12192 "configure"
12192 #include "confdefs.h"
12193 /* System header to define __stub macros and hopefully few prototypes,
12194     which can conflict with char mdbm_set_chain(); below.  */
12195 #include <assert.h>
12196 /* Override any gcc2 internal prototype to avoid an error.  */
12197 /* We use char because int might match the return type of a gcc2
12198     builtin and then its argument prototype would still apply.  */
12199 char mdbm_set_chain();
12200 char (*f)();
12201
12202 int main() {
12203
12204 /* The GNU C library defines this for functions which it implements
12205     to always fail with ENOSYS.  Some functions are actually named
12206     something starting with __ and the normal name is an alias.  */
12207 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12208 choke me
12209 #else
12210 f = mdbm_set_chain;
12211 #endif
12212
12213 ; return 0; }
12214 EOF
12215 if { (eval echo configure:12216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12216   rm -rf conftest*
12217   eval "ac_cv_func_mdbm_set_chain=yes"
12218 else
12219   echo "configure: failed program was:" >&5
12220   cat conftest.$ac_ext >&5
12221   rm -rf conftest*
12222   eval "ac_cv_func_mdbm_set_chain=no"
12223 fi
12224 rm -f conftest*
12225 fi
12226
12227 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12228   echo "$ac_t""yes" 1>&6
12229   ol_cv_lib_mdbm=yes
12230 else
12231   echo "$ac_t""no" 1>&6
12232
12233                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12234 echo "configure:12235: checking for mdbm_set_chain in -lmdbm" >&5
12235 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12236 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12237   echo $ac_n "(cached) $ac_c" 1>&6
12238 else
12239   ac_save_LIBS="$LIBS"
12240 LIBS="-lmdbm  $LIBS"
12241 cat > conftest.$ac_ext <<EOF
12242 #line 12243 "configure"
12243 #include "confdefs.h"
12244 /* Override any gcc2 internal prototype to avoid an error.  */
12245 /* We use char because int might match the return type of a gcc2
12246     builtin and then its argument prototype would still apply.  */
12247 char mdbm_set_chain();
12248
12249 int main() {
12250 mdbm_set_chain()
12251 ; return 0; }
12252 EOF
12253 if { (eval echo configure:12254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12254   rm -rf conftest*
12255   eval "ac_cv_lib_$ac_lib_var=yes"
12256 else
12257   echo "configure: failed program was:" >&5
12258   cat conftest.$ac_ext >&5
12259   rm -rf conftest*
12260   eval "ac_cv_lib_$ac_lib_var=no"
12261 fi
12262 rm -f conftest*
12263 LIBS="$ac_save_LIBS"
12264
12265 fi
12266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12267   echo "$ac_t""yes" 1>&6
12268   ol_cv_lib_mdbm=-lmdbm
12269 else
12270   echo "$ac_t""no" 1>&6
12271 ol_cv_lib_mdbm=no
12272 fi
12273
12274         
12275 fi
12276
12277         LIBS="$ol_LIBS"
12278
12279 fi
12280
12281 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12282
12283
12284  for ac_hdr in mdbm.h
12285 do
12286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12288 echo "configure:12289: checking for $ac_hdr" >&5
12289 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12290   echo $ac_n "(cached) $ac_c" 1>&6
12291 else
12292   cat > conftest.$ac_ext <<EOF
12293 #line 12294 "configure"
12294 #include "confdefs.h"
12295 #include <$ac_hdr>
12296 EOF
12297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12298 { (eval echo configure:12299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12300 if test -z "$ac_err"; then
12301   rm -rf conftest*
12302   eval "ac_cv_header_$ac_safe=yes"
12303 else
12304   echo "$ac_err" >&5
12305   echo "configure: failed program was:" >&5
12306   cat conftest.$ac_ext >&5
12307   rm -rf conftest*
12308   eval "ac_cv_header_$ac_safe=no"
12309 fi
12310 rm -f conftest*
12311 fi
12312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12313   echo "$ac_t""yes" 1>&6
12314     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12315   cat >> confdefs.h <<EOF
12316 #define $ac_tr_hdr 1
12317 EOF
12318  
12319 else
12320   echo "$ac_t""no" 1>&6
12321 fi
12322 done
12323
12324  echo $ac_n "checking for db""... $ac_c" 1>&6
12325 echo "configure:12326: checking for db" >&5
12326 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12327   echo $ac_n "(cached) $ac_c" 1>&6
12328 else
12329   
12330         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12331                 ol_cv_mdbm=no
12332         else
12333                 ol_cv_mdbm=yes
12334         fi
12335
12336 fi
12337
12338 echo "$ac_t""$ol_cv_mdbm" 1>&6
12339  if test $ol_cv_mdbm = yes ; then
12340         cat >> confdefs.h <<\EOF
12341 #define HAVE_MDBM 1
12342 EOF
12343
12344  fi
12345
12346
12347         if test $ol_cv_mdbm = yes ; then
12348                 ol_link_ldbm=mdbm
12349                 ol_with_ldbm_api=mdbm
12350                 if test $ol_cv_lib_mdbm != yes ; then
12351                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12352                 fi
12353         fi
12354 fi
12355
12356 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12357         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12358 echo "configure:12359: checking for GDBM library" >&5
12359 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12360   echo $ac_n "(cached) $ac_c" 1>&6
12361 else
12362         ol_LIBS="$LIBS"
12363         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12364 echo "configure:12365: checking for gdbm_open" >&5
12365 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12366   echo $ac_n "(cached) $ac_c" 1>&6
12367 else
12368   cat > conftest.$ac_ext <<EOF
12369 #line 12370 "configure"
12370 #include "confdefs.h"
12371 /* System header to define __stub macros and hopefully few prototypes,
12372     which can conflict with char gdbm_open(); below.  */
12373 #include <assert.h>
12374 /* Override any gcc2 internal prototype to avoid an error.  */
12375 /* We use char because int might match the return type of a gcc2
12376     builtin and then its argument prototype would still apply.  */
12377 char gdbm_open();
12378 char (*f)();
12379
12380 int main() {
12381
12382 /* The GNU C library defines this for functions which it implements
12383     to always fail with ENOSYS.  Some functions are actually named
12384     something starting with __ and the normal name is an alias.  */
12385 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12386 choke me
12387 #else
12388 f = gdbm_open;
12389 #endif
12390
12391 ; return 0; }
12392 EOF
12393 if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12394   rm -rf conftest*
12395   eval "ac_cv_func_gdbm_open=yes"
12396 else
12397   echo "configure: failed program was:" >&5
12398   cat conftest.$ac_ext >&5
12399   rm -rf conftest*
12400   eval "ac_cv_func_gdbm_open=no"
12401 fi
12402 rm -f conftest*
12403 fi
12404
12405 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12406   echo "$ac_t""yes" 1>&6
12407   ol_cv_lib_gdbm=yes
12408 else
12409   echo "$ac_t""no" 1>&6
12410
12411                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12412 echo "configure:12413: checking for gdbm_open in -lgdbm" >&5
12413 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12415   echo $ac_n "(cached) $ac_c" 1>&6
12416 else
12417   ac_save_LIBS="$LIBS"
12418 LIBS="-lgdbm  $LIBS"
12419 cat > conftest.$ac_ext <<EOF
12420 #line 12421 "configure"
12421 #include "confdefs.h"
12422 /* Override any gcc2 internal prototype to avoid an error.  */
12423 /* We use char because int might match the return type of a gcc2
12424     builtin and then its argument prototype would still apply.  */
12425 char gdbm_open();
12426
12427 int main() {
12428 gdbm_open()
12429 ; return 0; }
12430 EOF
12431 if { (eval echo configure:12432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12432   rm -rf conftest*
12433   eval "ac_cv_lib_$ac_lib_var=yes"
12434 else
12435   echo "configure: failed program was:" >&5
12436   cat conftest.$ac_ext >&5
12437   rm -rf conftest*
12438   eval "ac_cv_lib_$ac_lib_var=no"
12439 fi
12440 rm -f conftest*
12441 LIBS="$ac_save_LIBS"
12442
12443 fi
12444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12445   echo "$ac_t""yes" 1>&6
12446   ol_cv_lib_gdbm=-lgdbm
12447 else
12448   echo "$ac_t""no" 1>&6
12449 ol_cv_lib_gdbm=no
12450 fi
12451
12452         
12453 fi
12454
12455         LIBS="$ol_LIBS"
12456
12457 fi
12458
12459 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12460
12461
12462  for ac_hdr in gdbm.h
12463 do
12464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12466 echo "configure:12467: checking for $ac_hdr" >&5
12467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12468   echo $ac_n "(cached) $ac_c" 1>&6
12469 else
12470   cat > conftest.$ac_ext <<EOF
12471 #line 12472 "configure"
12472 #include "confdefs.h"
12473 #include <$ac_hdr>
12474 EOF
12475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12476 { (eval echo configure:12477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12478 if test -z "$ac_err"; then
12479   rm -rf conftest*
12480   eval "ac_cv_header_$ac_safe=yes"
12481 else
12482   echo "$ac_err" >&5
12483   echo "configure: failed program was:" >&5
12484   cat conftest.$ac_ext >&5
12485   rm -rf conftest*
12486   eval "ac_cv_header_$ac_safe=no"
12487 fi
12488 rm -f conftest*
12489 fi
12490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12491   echo "$ac_t""yes" 1>&6
12492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12493   cat >> confdefs.h <<EOF
12494 #define $ac_tr_hdr 1
12495 EOF
12496  
12497 else
12498   echo "$ac_t""no" 1>&6
12499 fi
12500 done
12501
12502  echo $ac_n "checking for db""... $ac_c" 1>&6
12503 echo "configure:12504: checking for db" >&5
12504 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12505   echo $ac_n "(cached) $ac_c" 1>&6
12506 else
12507   
12508         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12509                 ol_cv_gdbm=no
12510         else
12511                 ol_cv_gdbm=yes
12512         fi
12513
12514 fi
12515
12516 echo "$ac_t""$ol_cv_gdbm" 1>&6
12517  if test $ol_cv_gdbm = yes ; then
12518         cat >> confdefs.h <<\EOF
12519 #define HAVE_GDBM 1
12520 EOF
12521
12522  fi
12523
12524
12525         if test $ol_cv_gdbm = yes ; then
12526                 ol_link_ldbm=gdbm
12527                 ol_with_ldbm_api=gdbm
12528
12529                 if test $ol_cv_lib_gdbm != yes ; then
12530                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12531                 fi
12532         fi
12533 fi
12534
12535 if test $ol_with_ldbm_api = ndbm ; then
12536         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12537 echo "configure:12538: checking for NDBM library" >&5
12538 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12539   echo $ac_n "(cached) $ac_c" 1>&6
12540 else
12541         ol_LIBS="$LIBS"
12542         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12543 echo "configure:12544: checking for dbm_open" >&5
12544 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12545   echo $ac_n "(cached) $ac_c" 1>&6
12546 else
12547   cat > conftest.$ac_ext <<EOF
12548 #line 12549 "configure"
12549 #include "confdefs.h"
12550 /* System header to define __stub macros and hopefully few prototypes,
12551     which can conflict with char dbm_open(); below.  */
12552 #include <assert.h>
12553 /* Override any gcc2 internal prototype to avoid an error.  */
12554 /* We use char because int might match the return type of a gcc2
12555     builtin and then its argument prototype would still apply.  */
12556 char dbm_open();
12557 char (*f)();
12558
12559 int main() {
12560
12561 /* The GNU C library defines this for functions which it implements
12562     to always fail with ENOSYS.  Some functions are actually named
12563     something starting with __ and the normal name is an alias.  */
12564 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12565 choke me
12566 #else
12567 f = dbm_open;
12568 #endif
12569
12570 ; return 0; }
12571 EOF
12572 if { (eval echo configure:12573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12573   rm -rf conftest*
12574   eval "ac_cv_func_dbm_open=yes"
12575 else
12576   echo "configure: failed program was:" >&5
12577   cat conftest.$ac_ext >&5
12578   rm -rf conftest*
12579   eval "ac_cv_func_dbm_open=no"
12580 fi
12581 rm -f conftest*
12582 fi
12583
12584 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12585   echo "$ac_t""yes" 1>&6
12586   ol_cv_lib_ndbm=yes
12587 else
12588   echo "$ac_t""no" 1>&6
12589
12590                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12591 echo "configure:12592: checking for dbm_open in -lndbm" >&5
12592 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12594   echo $ac_n "(cached) $ac_c" 1>&6
12595 else
12596   ac_save_LIBS="$LIBS"
12597 LIBS="-lndbm  $LIBS"
12598 cat > conftest.$ac_ext <<EOF
12599 #line 12600 "configure"
12600 #include "confdefs.h"
12601 /* Override any gcc2 internal prototype to avoid an error.  */
12602 /* We use char because int might match the return type of a gcc2
12603     builtin and then its argument prototype would still apply.  */
12604 char dbm_open();
12605
12606 int main() {
12607 dbm_open()
12608 ; return 0; }
12609 EOF
12610 if { (eval echo configure:12611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12611   rm -rf conftest*
12612   eval "ac_cv_lib_$ac_lib_var=yes"
12613 else
12614   echo "configure: failed program was:" >&5
12615   cat conftest.$ac_ext >&5
12616   rm -rf conftest*
12617   eval "ac_cv_lib_$ac_lib_var=no"
12618 fi
12619 rm -f conftest*
12620 LIBS="$ac_save_LIBS"
12621
12622 fi
12623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12624   echo "$ac_t""yes" 1>&6
12625   ol_cv_lib_ndbm=-lndbm
12626 else
12627   echo "$ac_t""no" 1>&6
12628
12629                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12630 echo "configure:12631: checking for dbm_open in -ldbm" >&5
12631 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12632 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12633   echo $ac_n "(cached) $ac_c" 1>&6
12634 else
12635   ac_save_LIBS="$LIBS"
12636 LIBS="-ldbm  $LIBS"
12637 cat > conftest.$ac_ext <<EOF
12638 #line 12639 "configure"
12639 #include "confdefs.h"
12640 /* Override any gcc2 internal prototype to avoid an error.  */
12641 /* We use char because int might match the return type of a gcc2
12642     builtin and then its argument prototype would still apply.  */
12643 char dbm_open();
12644
12645 int main() {
12646 dbm_open()
12647 ; return 0; }
12648 EOF
12649 if { (eval echo configure:12650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12650   rm -rf conftest*
12651   eval "ac_cv_lib_$ac_lib_var=yes"
12652 else
12653   echo "configure: failed program was:" >&5
12654   cat conftest.$ac_ext >&5
12655   rm -rf conftest*
12656   eval "ac_cv_lib_$ac_lib_var=no"
12657 fi
12658 rm -f conftest*
12659 LIBS="$ac_save_LIBS"
12660
12661 fi
12662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12663   echo "$ac_t""yes" 1>&6
12664   ol_cv_lib_ndbm=-ldbm
12665 else
12666   echo "$ac_t""no" 1>&6
12667 ol_cv_lib_ndbm=no
12668 fi
12669                 
12670 fi
12671
12672         
12673 fi
12674
12675         LIBS="$ol_LIBS"
12676
12677 fi
12678
12679 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12680
12681
12682  for ac_hdr in ndbm.h
12683 do
12684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12686 echo "configure:12687: checking for $ac_hdr" >&5
12687 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12688   echo $ac_n "(cached) $ac_c" 1>&6
12689 else
12690   cat > conftest.$ac_ext <<EOF
12691 #line 12692 "configure"
12692 #include "confdefs.h"
12693 #include <$ac_hdr>
12694 EOF
12695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12696 { (eval echo configure:12697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12698 if test -z "$ac_err"; then
12699   rm -rf conftest*
12700   eval "ac_cv_header_$ac_safe=yes"
12701 else
12702   echo "$ac_err" >&5
12703   echo "configure: failed program was:" >&5
12704   cat conftest.$ac_ext >&5
12705   rm -rf conftest*
12706   eval "ac_cv_header_$ac_safe=no"
12707 fi
12708 rm -f conftest*
12709 fi
12710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12711   echo "$ac_t""yes" 1>&6
12712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12713   cat >> confdefs.h <<EOF
12714 #define $ac_tr_hdr 1
12715 EOF
12716  
12717 else
12718   echo "$ac_t""no" 1>&6
12719 fi
12720 done
12721
12722  echo $ac_n "checking for db""... $ac_c" 1>&6
12723 echo "configure:12724: checking for db" >&5
12724 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12725   echo $ac_n "(cached) $ac_c" 1>&6
12726 else
12727   
12728         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12729                 ol_cv_ndbm=no
12730         else
12731                 ol_cv_ndbm=yes
12732         fi
12733
12734 fi
12735
12736 echo "$ac_t""$ol_cv_ndbm" 1>&6
12737  if test $ol_cv_ndbm = yes ; then
12738         cat >> confdefs.h <<\EOF
12739 #define HAVE_NDBM 1
12740 EOF
12741
12742  fi
12743
12744
12745         if test $ol_cv_ndbm = yes ; then
12746                 ol_link_ldbm=ndbm
12747                 ol_with_ldbm_api=ndbm
12748
12749                 if test $ol_cv_lib_ndbm != yes ; then
12750                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12751                 fi
12752         fi
12753 fi
12754
12755 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12756         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12757         if test $ol_enable_ldbm = yes ; then
12758                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12759         fi
12760
12761         echo "configure: warning: disabling LDBM" 1>&2
12762         ol_enable_ldbm=no
12763 fi
12764
12765 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12766         LINK_BINS_DYNAMIC="yes"
12767 else
12768         LINK_BINS_DYNAMIC="no"
12769 fi
12770
12771 if test $ol_enable_wrappers != no ; then
12772         for ac_hdr in tcpd.h
12773 do
12774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12776 echo "configure:12777: checking for $ac_hdr" >&5
12777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12778   echo $ac_n "(cached) $ac_c" 1>&6
12779 else
12780   cat > conftest.$ac_ext <<EOF
12781 #line 12782 "configure"
12782 #include "confdefs.h"
12783 #include <$ac_hdr>
12784 EOF
12785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12786 { (eval echo configure:12787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12788 if test -z "$ac_err"; then
12789   rm -rf conftest*
12790   eval "ac_cv_header_$ac_safe=yes"
12791 else
12792   echo "$ac_err" >&5
12793   echo "configure: failed program was:" >&5
12794   cat conftest.$ac_ext >&5
12795   rm -rf conftest*
12796   eval "ac_cv_header_$ac_safe=no"
12797 fi
12798 rm -f conftest*
12799 fi
12800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12801   echo "$ac_t""yes" 1>&6
12802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12803   cat >> confdefs.h <<EOF
12804 #define $ac_tr_hdr 1
12805 EOF
12806  
12807 else
12808   echo "$ac_t""no" 1>&6
12809 fi
12810 done
12811
12812
12813         if test $ac_cv_header_tcpd_h != yes ; then
12814                 have_wrappers=no
12815         else
12816                 cat > conftest.$ac_ext <<EOF
12817 #line 12818 "configure"
12818 #include "confdefs.h"
12819
12820 int allow_severity = 0;
12821 int deny_severity  = 0;
12822                 
12823 int main() {
12824 hosts_access()
12825 ; return 0; }
12826 EOF
12827 if { (eval echo configure:12828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12828   rm -rf conftest*
12829   have_wrappers=yes
12830 else
12831   echo "configure: failed program was:" >&5
12832   cat conftest.$ac_ext >&5
12833   rm -rf conftest*
12834   have_wrappers=no
12835 fi
12836 rm -f conftest*
12837         fi
12838
12839         if test $have_wrappers = yes ; then
12840                 cat >> confdefs.h <<\EOF
12841 #define HAVE_TCPD 1
12842 EOF
12843
12844                 WRAP_LIBS="-lwrap"
12845
12846                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12847 echo "configure:12848: checking for main in -lnsl" >&5
12848 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12849 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12850   echo $ac_n "(cached) $ac_c" 1>&6
12851 else
12852   ac_save_LIBS="$LIBS"
12853 LIBS="-lnsl  $LIBS"
12854 cat > conftest.$ac_ext <<EOF
12855 #line 12856 "configure"
12856 #include "confdefs.h"
12857
12858 int main() {
12859 main()
12860 ; return 0; }
12861 EOF
12862 if { (eval echo configure:12863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12863   rm -rf conftest*
12864   eval "ac_cv_lib_$ac_lib_var=yes"
12865 else
12866   echo "configure: failed program was:" >&5
12867   cat conftest.$ac_ext >&5
12868   rm -rf conftest*
12869   eval "ac_cv_lib_$ac_lib_var=no"
12870 fi
12871 rm -f conftest*
12872 LIBS="$ac_save_LIBS"
12873
12874 fi
12875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12876   echo "$ac_t""yes" 1>&6
12877     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12878     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12879   cat >> confdefs.h <<EOF
12880 #define $ac_tr_lib 1
12881 EOF
12882
12883   LIBS="-lnsl $LIBS"
12884
12885 else
12886   echo "$ac_t""no" 1>&6
12887 fi
12888
12889         else
12890                 echo "configure: warning: could not find -lwrap" 1>&2
12891                 if test $ol_enable_wrappers = yes ; then
12892                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12893                 fi
12894
12895                 echo "configure: warning: disabling wrappers support" 1>&2
12896                 ol_enable_wrappers=no
12897                 WRAP_LIBS=""
12898         fi
12899 fi
12900
12901 if test $ol_enable_syslog != no ; then
12902         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12903 echo "configure:12904: checking for openlog" >&5
12904 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12905   echo $ac_n "(cached) $ac_c" 1>&6
12906 else
12907   cat > conftest.$ac_ext <<EOF
12908 #line 12909 "configure"
12909 #include "confdefs.h"
12910 /* System header to define __stub macros and hopefully few prototypes,
12911     which can conflict with char openlog(); below.  */
12912 #include <assert.h>
12913 /* Override any gcc2 internal prototype to avoid an error.  */
12914 /* We use char because int might match the return type of a gcc2
12915     builtin and then its argument prototype would still apply.  */
12916 char openlog();
12917 char (*f)();
12918
12919 int main() {
12920
12921 /* The GNU C library defines this for functions which it implements
12922     to always fail with ENOSYS.  Some functions are actually named
12923     something starting with __ and the normal name is an alias.  */
12924 #if defined (__stub_openlog) || defined (__stub___openlog)
12925 choke me
12926 #else
12927 f = openlog;
12928 #endif
12929
12930 ; return 0; }
12931 EOF
12932 if { (eval echo configure:12933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12933   rm -rf conftest*
12934   eval "ac_cv_func_openlog=yes"
12935 else
12936   echo "configure: failed program was:" >&5
12937   cat conftest.$ac_ext >&5
12938   rm -rf conftest*
12939   eval "ac_cv_func_openlog=no"
12940 fi
12941 rm -f conftest*
12942 fi
12943
12944 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12945   echo "$ac_t""yes" 1>&6
12946   :
12947 else
12948   echo "$ac_t""no" 1>&6
12949 fi
12950
12951         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12952                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12953         fi
12954         ol_enable_syslog=$ac_cv_func_openlog
12955 fi
12956
12957 ol_link_sql=no
12958 if test $ol_enable_sql != no ; then
12959         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
12960 echo "configure:12961: checking for SQLDriverConnect in -liodbc" >&5
12961 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
12962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12963   echo $ac_n "(cached) $ac_c" 1>&6
12964 else
12965   ac_save_LIBS="$LIBS"
12966 LIBS="-liodbc  $LIBS"
12967 cat > conftest.$ac_ext <<EOF
12968 #line 12969 "configure"
12969 #include "confdefs.h"
12970 /* Override any gcc2 internal prototype to avoid an error.  */
12971 /* We use char because int might match the return type of a gcc2
12972     builtin and then its argument prototype would still apply.  */
12973 char SQLDriverConnect();
12974
12975 int main() {
12976 SQLDriverConnect()
12977 ; return 0; }
12978 EOF
12979 if { (eval echo configure:12980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12980   rm -rf conftest*
12981   eval "ac_cv_lib_$ac_lib_var=yes"
12982 else
12983   echo "configure: failed program was:" >&5
12984   cat conftest.$ac_ext >&5
12985   rm -rf conftest*
12986   eval "ac_cv_lib_$ac_lib_var=no"
12987 fi
12988 rm -f conftest*
12989 LIBS="$ac_save_LIBS"
12990
12991 fi
12992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12993   echo "$ac_t""yes" 1>&6
12994   have_iodbc=yes
12995 else
12996   echo "$ac_t""no" 1>&6
12997 have_iodbc=no
12998 fi
12999
13000         if test $have_iodbc = yes ; then
13001                 ol_link_sql="-liodbc"
13002         else
13003                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13004 echo "configure:13005: checking for SQLDriverConnect in -lodbc" >&5
13005 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13006 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13007   echo $ac_n "(cached) $ac_c" 1>&6
13008 else
13009   ac_save_LIBS="$LIBS"
13010 LIBS="-lodbc  $LIBS"
13011 cat > conftest.$ac_ext <<EOF
13012 #line 13013 "configure"
13013 #include "confdefs.h"
13014 /* Override any gcc2 internal prototype to avoid an error.  */
13015 /* We use char because int might match the return type of a gcc2
13016     builtin and then its argument prototype would still apply.  */
13017 char SQLDriverConnect();
13018
13019 int main() {
13020 SQLDriverConnect()
13021 ; return 0; }
13022 EOF
13023 if { (eval echo configure:13024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13024   rm -rf conftest*
13025   eval "ac_cv_lib_$ac_lib_var=yes"
13026 else
13027   echo "configure: failed program was:" >&5
13028   cat conftest.$ac_ext >&5
13029   rm -rf conftest*
13030   eval "ac_cv_lib_$ac_lib_var=no"
13031 fi
13032 rm -f conftest*
13033 LIBS="$ac_save_LIBS"
13034
13035 fi
13036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13037   echo "$ac_t""yes" 1>&6
13038   have_odbc=yes
13039 else
13040   echo "$ac_t""no" 1>&6
13041 have_odbc=no
13042 fi
13043
13044                 if test $have_odbc = yes ; then
13045                         ol_link_sql="-lodbc"
13046                 fi
13047         fi
13048
13049         if test $ol_link_sql != no ; then
13050                 SLAPD_SQL_LIBS="$ol_link_sql"
13051
13052         elif test $ol_enable_sql != auto ; then
13053                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13054         fi
13055 fi
13056
13057 ol_link_termcap=no
13058 for ac_hdr in termcap.h ncurses.h
13059 do
13060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13062 echo "configure:13063: checking for $ac_hdr" >&5
13063 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13064   echo $ac_n "(cached) $ac_c" 1>&6
13065 else
13066   cat > conftest.$ac_ext <<EOF
13067 #line 13068 "configure"
13068 #include "confdefs.h"
13069 #include <$ac_hdr>
13070 EOF
13071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13072 { (eval echo configure:13073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13074 if test -z "$ac_err"; then
13075   rm -rf conftest*
13076   eval "ac_cv_header_$ac_safe=yes"
13077 else
13078   echo "$ac_err" >&5
13079   echo "configure: failed program was:" >&5
13080   cat conftest.$ac_ext >&5
13081   rm -rf conftest*
13082   eval "ac_cv_header_$ac_safe=no"
13083 fi
13084 rm -f conftest*
13085 fi
13086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13087   echo "$ac_t""yes" 1>&6
13088     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13089   cat >> confdefs.h <<EOF
13090 #define $ac_tr_hdr 1
13091 EOF
13092  
13093 else
13094   echo "$ac_t""no" 1>&6
13095 fi
13096 done
13097
13098
13099 if test $ol_link_termcap = no ; then
13100         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13101 echo "configure:13102: checking for tputs in -ltermcap" >&5
13102 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13103 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13104   echo $ac_n "(cached) $ac_c" 1>&6
13105 else
13106   ac_save_LIBS="$LIBS"
13107 LIBS="-ltermcap  $LIBS"
13108 cat > conftest.$ac_ext <<EOF
13109 #line 13110 "configure"
13110 #include "confdefs.h"
13111 /* Override any gcc2 internal prototype to avoid an error.  */
13112 /* We use char because int might match the return type of a gcc2
13113     builtin and then its argument prototype would still apply.  */
13114 char tputs();
13115
13116 int main() {
13117 tputs()
13118 ; return 0; }
13119 EOF
13120 if { (eval echo configure:13121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13121   rm -rf conftest*
13122   eval "ac_cv_lib_$ac_lib_var=yes"
13123 else
13124   echo "configure: failed program was:" >&5
13125   cat conftest.$ac_ext >&5
13126   rm -rf conftest*
13127   eval "ac_cv_lib_$ac_lib_var=no"
13128 fi
13129 rm -f conftest*
13130 LIBS="$ac_save_LIBS"
13131
13132 fi
13133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13134   echo "$ac_t""yes" 1>&6
13135   have_termcap=yes
13136 else
13137   echo "$ac_t""no" 1>&6
13138 have_termcap=no
13139 fi
13140
13141         if test $have_termcap = yes ; then
13142                 cat >> confdefs.h <<\EOF
13143 #define HAVE_TERMCAP 1
13144 EOF
13145
13146                 ol_link_termcap=yes
13147                 TERMCAP_LIBS=-ltermcap
13148         fi
13149 fi
13150
13151 if test $ol_link_termcap = no ; then
13152         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13153 echo "configure:13154: checking for initscr in -lncurses" >&5
13154 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13156   echo $ac_n "(cached) $ac_c" 1>&6
13157 else
13158   ac_save_LIBS="$LIBS"
13159 LIBS="-lncurses  $LIBS"
13160 cat > conftest.$ac_ext <<EOF
13161 #line 13162 "configure"
13162 #include "confdefs.h"
13163 /* Override any gcc2 internal prototype to avoid an error.  */
13164 /* We use char because int might match the return type of a gcc2
13165     builtin and then its argument prototype would still apply.  */
13166 char initscr();
13167
13168 int main() {
13169 initscr()
13170 ; return 0; }
13171 EOF
13172 if { (eval echo configure:13173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13173   rm -rf conftest*
13174   eval "ac_cv_lib_$ac_lib_var=yes"
13175 else
13176   echo "configure: failed program was:" >&5
13177   cat conftest.$ac_ext >&5
13178   rm -rf conftest*
13179   eval "ac_cv_lib_$ac_lib_var=no"
13180 fi
13181 rm -f conftest*
13182 LIBS="$ac_save_LIBS"
13183
13184 fi
13185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13186   echo "$ac_t""yes" 1>&6
13187   have_ncurses=yes
13188 else
13189   echo "$ac_t""no" 1>&6
13190 have_ncurses=no
13191 fi
13192
13193         if test $have_ncurses = yes ; then
13194                 cat >> confdefs.h <<\EOF
13195 #define HAVE_NCURSES 1
13196 EOF
13197
13198                 ol_link_termcap=yes
13199                 TERMCAP_LIBS=-lncurses
13200         fi
13201 fi
13202
13203 if test $ol_link_termcap = no ; then
13204         cat >> confdefs.h <<\EOF
13205 #define NO_TERMCAP 1
13206 EOF
13207
13208         TERMCAP_LIBS=
13209 fi
13210
13211 ol_link_sasl=no
13212 ol_link_spasswd=no
13213 if test $ol_with_cyrus_sasl != no ; then
13214         for ac_hdr in sasl.h
13215 do
13216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13218 echo "configure:13219: checking for $ac_hdr" >&5
13219 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13220   echo $ac_n "(cached) $ac_c" 1>&6
13221 else
13222   cat > conftest.$ac_ext <<EOF
13223 #line 13224 "configure"
13224 #include "confdefs.h"
13225 #include <$ac_hdr>
13226 EOF
13227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13228 { (eval echo configure:13229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13230 if test -z "$ac_err"; then
13231   rm -rf conftest*
13232   eval "ac_cv_header_$ac_safe=yes"
13233 else
13234   echo "$ac_err" >&5
13235   echo "configure: failed program was:" >&5
13236   cat conftest.$ac_ext >&5
13237   rm -rf conftest*
13238   eval "ac_cv_header_$ac_safe=no"
13239 fi
13240 rm -f conftest*
13241 fi
13242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13243   echo "$ac_t""yes" 1>&6
13244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13245   cat >> confdefs.h <<EOF
13246 #define $ac_tr_hdr 1
13247 EOF
13248  
13249 else
13250   echo "$ac_t""no" 1>&6
13251 fi
13252 done
13253
13254
13255         if test $ac_cv_header_sasl_h = yes ; then
13256                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13257 echo "configure:13258: checking for sasl_client_init in -lsasl" >&5
13258 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13259 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13260   echo $ac_n "(cached) $ac_c" 1>&6
13261 else
13262   ac_save_LIBS="$LIBS"
13263 LIBS="-lsasl  $LIBS"
13264 cat > conftest.$ac_ext <<EOF
13265 #line 13266 "configure"
13266 #include "confdefs.h"
13267 /* Override any gcc2 internal prototype to avoid an error.  */
13268 /* We use char because int might match the return type of a gcc2
13269     builtin and then its argument prototype would still apply.  */
13270 char sasl_client_init();
13271
13272 int main() {
13273 sasl_client_init()
13274 ; return 0; }
13275 EOF
13276 if { (eval echo configure:13277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13277   rm -rf conftest*
13278   eval "ac_cv_lib_$ac_lib_var=yes"
13279 else
13280   echo "configure: failed program was:" >&5
13281   cat conftest.$ac_ext >&5
13282   rm -rf conftest*
13283   eval "ac_cv_lib_$ac_lib_var=no"
13284 fi
13285 rm -f conftest*
13286 LIBS="$ac_save_LIBS"
13287
13288 fi
13289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13290   echo "$ac_t""yes" 1>&6
13291   have_cyrus_sasl=yes
13292 else
13293   echo "$ac_t""no" 1>&6
13294 have_cyrus_sasl=no
13295 fi
13296
13297
13298                 if test $have_cyrus_sasl != no ; then
13299                         SASL_LIBS="-lsasl"
13300                         cat >> confdefs.h <<\EOF
13301 #define HAVE_CYRUS_SASL 1
13302 EOF
13303
13304                         ol_link_sasl=yes
13305                 fi
13306         fi
13307
13308         if test $ol_link_sasl = no ; then
13309                 if test $ol_with_cyrus_sasl != auto ; then
13310                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13311                 else
13312                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13313                         echo "configure: warning: SASL authentication not supported!" 1>&2
13314                         if test $ol_link_tls = no ; then
13315                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13316                         fi
13317                 fi
13318
13319         elif test $ol_enable_spasswd != no ; then
13320                 ol_link_spasswd=yes
13321         fi
13322
13323 else
13324         echo "configure: warning: SASL authentication not supported!" 1>&2
13325         if test $ol_link_tls = no ; then
13326                 echo "configure: warning: Strong authentication not supported!" 1>&2
13327         fi
13328 fi
13329
13330 if test $cross_compiling != yes ; then
13331         dev=no
13332         if test -r /dev/urandom ; then
13333                 dev="/dev/urandom";
13334         elif test -r /idev/urandom ; then
13335                 dev="/idev/urandom";
13336         elif test -r /dev/srandom ; then
13337                 dev="/dev/srandom";
13338         elif test -r /dev/random ; then
13339                 dev="/dev/random";
13340         elif test -r /idev/random ; then
13341                 dev="/idev/random";
13342         fi
13343
13344         if test $dev != no ; then
13345                 cat >> confdefs.h <<EOF
13346 #define URANDOM_DEVICE "$dev"
13347 EOF
13348
13349         fi
13350 fi
13351
13352 ol_link_fetch=no
13353 if test $ol_with_fetch != no ; then
13354         ol_LIBS=$LIBS
13355 LIBS="-lfetch -lcom_err $LIBS"
13356 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13357 echo "configure:13358: checking fetch(3) library" >&5
13358 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13359   echo $ac_n "(cached) $ac_c" 1>&6
13360 else
13361   
13362         cat > conftest.$ac_ext <<EOF
13363 #line 13364 "configure"
13364 #include "confdefs.h"
13365
13366 #include <sys/param.h>
13367 #include <stdio.h>
13368 #include <fetch.h>
13369 int main() {
13370 struct url *u = fetchParseURL("file:///"); 
13371 ; return 0; }
13372 EOF
13373 if { (eval echo configure:13374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13374   rm -rf conftest*
13375   ol_cv_lib_fetch=yes
13376 else
13377   echo "configure: failed program was:" >&5
13378   cat conftest.$ac_ext >&5
13379   rm -rf conftest*
13380   ol_cv_lib_fetch=no
13381 fi
13382 rm -f conftest*
13383 fi
13384
13385 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13386 LIBS=$ol_LIBS
13387 if test $ol_cv_lib_fetch != no ; then
13388         ol_link_fetch="-lfetch -lcom_err"
13389         cat >> confdefs.h <<\EOF
13390 #define HAVE_FETCH 1
13391 EOF
13392
13393 fi
13394
13395
13396         if test $ol_cv_lib_fetch != no ; then
13397                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13398                 ol_link_fetch=freebsd
13399
13400         elif test $ol_with_fetch != auto ; then
13401                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13402         fi 
13403 fi
13404
13405 ol_link_readline=no
13406 if test $ol_with_readline != no ; then
13407         for ac_hdr in readline/readline.h readline/history.h
13408 do
13409 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13410 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13411 echo "configure:13412: checking for $ac_hdr" >&5
13412 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13413   echo $ac_n "(cached) $ac_c" 1>&6
13414 else
13415   cat > conftest.$ac_ext <<EOF
13416 #line 13417 "configure"
13417 #include "confdefs.h"
13418 #include <$ac_hdr>
13419 EOF
13420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13421 { (eval echo configure:13422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13423 if test -z "$ac_err"; then
13424   rm -rf conftest*
13425   eval "ac_cv_header_$ac_safe=yes"
13426 else
13427   echo "$ac_err" >&5
13428   echo "configure: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   rm -rf conftest*
13431   eval "ac_cv_header_$ac_safe=no"
13432 fi
13433 rm -f conftest*
13434 fi
13435 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13436   echo "$ac_t""yes" 1>&6
13437     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13438   cat >> confdefs.h <<EOF
13439 #define $ac_tr_hdr 1
13440 EOF
13441  
13442 else
13443   echo "$ac_t""no" 1>&6
13444 fi
13445 done
13446
13447
13448         if test $ac_cv_header_readline_readline_h = yes ; then
13449                 save_LIBS="$LIBS"
13450                 LIBS="$TERMCAP_LIBS $LIBS"
13451                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13452 echo "configure:13453: checking for readline in -lreadline" >&5
13453 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13454 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13455   echo $ac_n "(cached) $ac_c" 1>&6
13456 else
13457   ac_save_LIBS="$LIBS"
13458 LIBS="-lreadline  $LIBS"
13459 cat > conftest.$ac_ext <<EOF
13460 #line 13461 "configure"
13461 #include "confdefs.h"
13462 /* Override any gcc2 internal prototype to avoid an error.  */
13463 /* We use char because int might match the return type of a gcc2
13464     builtin and then its argument prototype would still apply.  */
13465 char readline();
13466
13467 int main() {
13468 readline()
13469 ; return 0; }
13470 EOF
13471 if { (eval echo configure:13472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13472   rm -rf conftest*
13473   eval "ac_cv_lib_$ac_lib_var=yes"
13474 else
13475   echo "configure: failed program was:" >&5
13476   cat conftest.$ac_ext >&5
13477   rm -rf conftest*
13478   eval "ac_cv_lib_$ac_lib_var=no"
13479 fi
13480 rm -f conftest*
13481 LIBS="$ac_save_LIBS"
13482
13483 fi
13484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13485   echo "$ac_t""yes" 1>&6
13486   have_readline=yes
13487 else
13488   echo "$ac_t""no" 1>&6
13489 have_readline=no
13490 fi
13491
13492                 LIBS="$save_LIBS"
13493                         
13494                 if test $have_readline = yes ; then
13495                         ol_with_readline=found
13496                         ol_link_readline=yes
13497
13498                         READLINE_LIBS="-lreadline"
13499                 fi
13500         fi
13501 fi
13502
13503 if test $ol_link_readline = yes ; then
13504         cat >> confdefs.h <<\EOF
13505 #define HAVE_READLINE 1
13506 EOF
13507
13508 fi
13509
13510
13511 if test $ol_enable_crypt != no ; then
13512         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13513 echo "configure:13514: checking for crypt" >&5
13514 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13515   echo $ac_n "(cached) $ac_c" 1>&6
13516 else
13517   cat > conftest.$ac_ext <<EOF
13518 #line 13519 "configure"
13519 #include "confdefs.h"
13520 /* System header to define __stub macros and hopefully few prototypes,
13521     which can conflict with char crypt(); below.  */
13522 #include <assert.h>
13523 /* Override any gcc2 internal prototype to avoid an error.  */
13524 /* We use char because int might match the return type of a gcc2
13525     builtin and then its argument prototype would still apply.  */
13526 char crypt();
13527 char (*f)();
13528
13529 int main() {
13530
13531 /* The GNU C library defines this for functions which it implements
13532     to always fail with ENOSYS.  Some functions are actually named
13533     something starting with __ and the normal name is an alias.  */
13534 #if defined (__stub_crypt) || defined (__stub___crypt)
13535 choke me
13536 #else
13537 f = crypt;
13538 #endif
13539
13540 ; return 0; }
13541 EOF
13542 if { (eval echo configure:13543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13543   rm -rf conftest*
13544   eval "ac_cv_func_crypt=yes"
13545 else
13546   echo "configure: failed program was:" >&5
13547   cat conftest.$ac_ext >&5
13548   rm -rf conftest*
13549   eval "ac_cv_func_crypt=no"
13550 fi
13551 rm -f conftest*
13552 fi
13553
13554 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13555   echo "$ac_t""yes" 1>&6
13556   have_crypt=yes
13557 else
13558   echo "$ac_t""no" 1>&6
13559
13560                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13561 echo "configure:13562: checking for crypt in -lcrypt" >&5
13562 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13563 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13564   echo $ac_n "(cached) $ac_c" 1>&6
13565 else
13566   ac_save_LIBS="$LIBS"
13567 LIBS="-lcrypt  $LIBS"
13568 cat > conftest.$ac_ext <<EOF
13569 #line 13570 "configure"
13570 #include "confdefs.h"
13571 /* Override any gcc2 internal prototype to avoid an error.  */
13572 /* We use char because int might match the return type of a gcc2
13573     builtin and then its argument prototype would still apply.  */
13574 char crypt();
13575
13576 int main() {
13577 crypt()
13578 ; return 0; }
13579 EOF
13580 if { (eval echo configure:13581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13581   rm -rf conftest*
13582   eval "ac_cv_lib_$ac_lib_var=yes"
13583 else
13584   echo "configure: failed program was:" >&5
13585   cat conftest.$ac_ext >&5
13586   rm -rf conftest*
13587   eval "ac_cv_lib_$ac_lib_var=no"
13588 fi
13589 rm -f conftest*
13590 LIBS="$ac_save_LIBS"
13591
13592 fi
13593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13594   echo "$ac_t""yes" 1>&6
13595   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13596                         have_crypt=yes
13597 else
13598   echo "$ac_t""no" 1>&6
13599 have_crypt=no
13600 fi
13601
13602 fi
13603
13604
13605         if test $have_crypt = yes ; then
13606                 cat >> confdefs.h <<\EOF
13607 #define HAVE_CRYPT 1
13608 EOF
13609
13610         else
13611                 echo "configure: warning: could not find crypt" 1>&2
13612                 if test $ol_enable_crypt = yes ; then
13613                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13614                 fi
13615
13616                 echo "configure: warning: disabling crypt support" 1>&2
13617                 ol_enable_crypt=no
13618         fi
13619 fi
13620
13621 if test $ol_enable_proctitle != no ; then
13622         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13623 echo "configure:13624: checking for setproctitle" >&5
13624 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13625   echo $ac_n "(cached) $ac_c" 1>&6
13626 else
13627   cat > conftest.$ac_ext <<EOF
13628 #line 13629 "configure"
13629 #include "confdefs.h"
13630 /* System header to define __stub macros and hopefully few prototypes,
13631     which can conflict with char setproctitle(); below.  */
13632 #include <assert.h>
13633 /* Override any gcc2 internal prototype to avoid an error.  */
13634 /* We use char because int might match the return type of a gcc2
13635     builtin and then its argument prototype would still apply.  */
13636 char setproctitle();
13637 char (*f)();
13638
13639 int main() {
13640
13641 /* The GNU C library defines this for functions which it implements
13642     to always fail with ENOSYS.  Some functions are actually named
13643     something starting with __ and the normal name is an alias.  */
13644 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13645 choke me
13646 #else
13647 f = setproctitle;
13648 #endif
13649
13650 ; return 0; }
13651 EOF
13652 if { (eval echo configure:13653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13653   rm -rf conftest*
13654   eval "ac_cv_func_setproctitle=yes"
13655 else
13656   echo "configure: failed program was:" >&5
13657   cat conftest.$ac_ext >&5
13658   rm -rf conftest*
13659   eval "ac_cv_func_setproctitle=no"
13660 fi
13661 rm -f conftest*
13662 fi
13663
13664 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13665   echo "$ac_t""yes" 1>&6
13666   have_setproctitle=yes
13667 else
13668   echo "$ac_t""no" 1>&6
13669
13670                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13671 echo "configure:13672: checking for setproctitle in -lutil" >&5
13672 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13673 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13674   echo $ac_n "(cached) $ac_c" 1>&6
13675 else
13676   ac_save_LIBS="$LIBS"
13677 LIBS="-lutil  $LIBS"
13678 cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 /* Override any gcc2 internal prototype to avoid an error.  */
13682 /* We use char because int might match the return type of a gcc2
13683     builtin and then its argument prototype would still apply.  */
13684 char setproctitle();
13685
13686 int main() {
13687 setproctitle()
13688 ; return 0; }
13689 EOF
13690 if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13691   rm -rf conftest*
13692   eval "ac_cv_lib_$ac_lib_var=yes"
13693 else
13694   echo "configure: failed program was:" >&5
13695   cat conftest.$ac_ext >&5
13696   rm -rf conftest*
13697   eval "ac_cv_lib_$ac_lib_var=no"
13698 fi
13699 rm -f conftest*
13700 LIBS="$ac_save_LIBS"
13701
13702 fi
13703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13704   echo "$ac_t""yes" 1>&6
13705   have_setproctitle=yes
13706                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13707 else
13708   echo "$ac_t""no" 1>&6
13709 have_setproctitle=no
13710                         LIBOBJS="$LIBOBJS setproctitle.o"
13711                         LIBSRCS="$LIBSRCS setproctitle.c"
13712 fi
13713
13714 fi
13715
13716
13717         if test $have_setproctitle = yes ; then
13718                 cat >> confdefs.h <<\EOF
13719 #define HAVE_SETPROCTITLE 1
13720 EOF
13721
13722         fi
13723 fi
13724
13725 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13726 echo "configure:13727: checking for ANSI C header files" >&5
13727 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13728   echo $ac_n "(cached) $ac_c" 1>&6
13729 else
13730   cat > conftest.$ac_ext <<EOF
13731 #line 13732 "configure"
13732 #include "confdefs.h"
13733 #include <stdlib.h>
13734 #include <stdarg.h>
13735 #include <string.h>
13736 #include <float.h>
13737 EOF
13738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13739 { (eval echo configure:13740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13741 if test -z "$ac_err"; then
13742   rm -rf conftest*
13743   ac_cv_header_stdc=yes
13744 else
13745   echo "$ac_err" >&5
13746   echo "configure: failed program was:" >&5
13747   cat conftest.$ac_ext >&5
13748   rm -rf conftest*
13749   ac_cv_header_stdc=no
13750 fi
13751 rm -f conftest*
13752
13753 if test $ac_cv_header_stdc = yes; then
13754   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13755 cat > conftest.$ac_ext <<EOF
13756 #line 13757 "configure"
13757 #include "confdefs.h"
13758 #include <string.h>
13759 EOF
13760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13761   egrep "memchr" >/dev/null 2>&1; then
13762   :
13763 else
13764   rm -rf conftest*
13765   ac_cv_header_stdc=no
13766 fi
13767 rm -f conftest*
13768
13769 fi
13770
13771 if test $ac_cv_header_stdc = yes; then
13772   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13773 cat > conftest.$ac_ext <<EOF
13774 #line 13775 "configure"
13775 #include "confdefs.h"
13776 #include <stdlib.h>
13777 EOF
13778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13779   egrep "free" >/dev/null 2>&1; then
13780   :
13781 else
13782   rm -rf conftest*
13783   ac_cv_header_stdc=no
13784 fi
13785 rm -f conftest*
13786
13787 fi
13788
13789 if test $ac_cv_header_stdc = yes; then
13790   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13791 if test "$cross_compiling" = yes; then
13792   :
13793 else
13794   cat > conftest.$ac_ext <<EOF
13795 #line 13796 "configure"
13796 #include "confdefs.h"
13797 #include <ctype.h>
13798 #if ((' ' & 0x0FF) == 0x020)
13799 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13800 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13801 #else
13802 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13803  || ('j' <= (c) && (c) <= 'r') \
13804  || ('s' <= (c) && (c) <= 'z'))
13805 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13806 #endif
13807 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13808 int main () { int i; for (i = 0; i < 256; i++)
13809 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13810 exit (0); }
13811
13812 EOF
13813 if { (eval echo configure:13814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13814 then
13815   :
13816 else
13817   echo "configure: failed program was:" >&5
13818   cat conftest.$ac_ext >&5
13819   rm -fr conftest*
13820   ac_cv_header_stdc=no
13821 fi
13822 rm -fr conftest*
13823 fi
13824
13825 fi
13826 fi
13827
13828 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13829 if test $ac_cv_header_stdc = yes; then
13830   cat >> confdefs.h <<\EOF
13831 #define STDC_HEADERS 1
13832 EOF
13833
13834 fi
13835
13836 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13837 echo "configure:13838: checking for mode_t" >&5
13838 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13839   echo $ac_n "(cached) $ac_c" 1>&6
13840 else
13841   cat > conftest.$ac_ext <<EOF
13842 #line 13843 "configure"
13843 #include "confdefs.h"
13844 #include <sys/types.h>
13845 #if STDC_HEADERS
13846 #include <stdlib.h>
13847 #include <stddef.h>
13848 #endif
13849
13850 EOF
13851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13852   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13853   rm -rf conftest*
13854   eval "ac_cv_type_mode_t=yes"
13855 else
13856   rm -rf conftest*
13857   eval "ac_cv_type_mode_t=no"
13858 fi
13859 rm -f conftest*
13860
13861 fi
13862 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13863   echo "$ac_t""yes" 1>&6
13864 else
13865   echo "$ac_t""no" 1>&6
13866   cat >> confdefs.h <<EOF
13867 #define mode_t int
13868 EOF
13869
13870 fi
13871
13872 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13873 echo "configure:13874: checking for off_t" >&5
13874 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13875   echo $ac_n "(cached) $ac_c" 1>&6
13876 else
13877   cat > conftest.$ac_ext <<EOF
13878 #line 13879 "configure"
13879 #include "confdefs.h"
13880 #include <sys/types.h>
13881 #if STDC_HEADERS
13882 #include <stdlib.h>
13883 #include <stddef.h>
13884 #endif
13885
13886 EOF
13887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13888   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13889   rm -rf conftest*
13890   eval "ac_cv_type_off_t=yes"
13891 else
13892   rm -rf conftest*
13893   eval "ac_cv_type_off_t=no"
13894 fi
13895 rm -f conftest*
13896
13897 fi
13898 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13899   echo "$ac_t""yes" 1>&6
13900 else
13901   echo "$ac_t""no" 1>&6
13902   cat >> confdefs.h <<EOF
13903 #define off_t long
13904 EOF
13905
13906 fi
13907
13908 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13909 echo "configure:13910: checking for pid_t" >&5
13910 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13911   echo $ac_n "(cached) $ac_c" 1>&6
13912 else
13913   cat > conftest.$ac_ext <<EOF
13914 #line 13915 "configure"
13915 #include "confdefs.h"
13916 #include <sys/types.h>
13917 #if STDC_HEADERS
13918 #include <stdlib.h>
13919 #include <stddef.h>
13920 #endif
13921
13922 EOF
13923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13924   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13925   rm -rf conftest*
13926   eval "ac_cv_type_pid_t=yes"
13927 else
13928   rm -rf conftest*
13929   eval "ac_cv_type_pid_t=no"
13930 fi
13931 rm -f conftest*
13932
13933 fi
13934 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13935   echo "$ac_t""yes" 1>&6
13936 else
13937   echo "$ac_t""no" 1>&6
13938   cat >> confdefs.h <<EOF
13939 #define pid_t int
13940 EOF
13941
13942 fi
13943
13944 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13945 echo "configure:13946: checking for ptrdiff_t" >&5
13946 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13947   echo $ac_n "(cached) $ac_c" 1>&6
13948 else
13949   cat > conftest.$ac_ext <<EOF
13950 #line 13951 "configure"
13951 #include "confdefs.h"
13952 #include <stddef.h>
13953 int main() {
13954 ptrdiff_t p
13955 ; return 0; }
13956 EOF
13957 if { (eval echo configure:13958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13958   rm -rf conftest*
13959   am_cv_type_ptrdiff_t=yes
13960 else
13961   echo "configure: failed program was:" >&5
13962   cat conftest.$ac_ext >&5
13963   rm -rf conftest*
13964   am_cv_type_ptrdiff_t=no
13965 fi
13966 rm -f conftest*
13967 fi
13968
13969 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13970    if test $am_cv_type_ptrdiff_t = yes; then
13971      cat >> confdefs.h <<\EOF
13972 #define HAVE_PTRDIFF_T 1
13973 EOF
13974
13975    fi
13976
13977 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13978 echo "configure:13979: checking return type of signal handlers" >&5
13979 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13980   echo $ac_n "(cached) $ac_c" 1>&6
13981 else
13982   cat > conftest.$ac_ext <<EOF
13983 #line 13984 "configure"
13984 #include "confdefs.h"
13985 #include <sys/types.h>
13986 #include <signal.h>
13987 #ifdef signal
13988 #undef signal
13989 #endif
13990 #ifdef __cplusplus
13991 extern "C" void (*signal (int, void (*)(int)))(int);
13992 #else
13993 void (*signal ()) ();
13994 #endif
13995
13996 int main() {
13997 int i;
13998 ; return 0; }
13999 EOF
14000 if { (eval echo configure:14001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14001   rm -rf conftest*
14002   ac_cv_type_signal=void
14003 else
14004   echo "configure: failed program was:" >&5
14005   cat conftest.$ac_ext >&5
14006   rm -rf conftest*
14007   ac_cv_type_signal=int
14008 fi
14009 rm -f conftest*
14010 fi
14011
14012 echo "$ac_t""$ac_cv_type_signal" 1>&6
14013 cat >> confdefs.h <<EOF
14014 #define RETSIGTYPE $ac_cv_type_signal
14015 EOF
14016
14017
14018 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14019 echo "configure:14020: checking for size_t" >&5
14020 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14021   echo $ac_n "(cached) $ac_c" 1>&6
14022 else
14023   cat > conftest.$ac_ext <<EOF
14024 #line 14025 "configure"
14025 #include "confdefs.h"
14026 #include <sys/types.h>
14027 #if STDC_HEADERS
14028 #include <stdlib.h>
14029 #include <stddef.h>
14030 #endif
14031
14032 EOF
14033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14034   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14035   rm -rf conftest*
14036   eval "ac_cv_type_size_t=yes"
14037 else
14038   rm -rf conftest*
14039   eval "ac_cv_type_size_t=no"
14040 fi
14041 rm -f conftest*
14042
14043 fi
14044 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14045   echo "$ac_t""yes" 1>&6
14046 else
14047   echo "$ac_t""no" 1>&6
14048   cat >> confdefs.h <<EOF
14049 #define size_t unsigned
14050 EOF
14051
14052 fi
14053
14054
14055 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14056 echo "configure:14057: checking for ssize_t" >&5
14057 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14058   echo $ac_n "(cached) $ac_c" 1>&6
14059 else
14060   cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063 #include <sys/types.h>
14064 #if STDC_HEADERS
14065 #include <stdlib.h>
14066 #include <stddef.h>
14067 #endif
14068
14069 EOF
14070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14071   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14072   rm -rf conftest*
14073   eval "ac_cv_type_ssize_t=yes"
14074 else
14075   rm -rf conftest*
14076   eval "ac_cv_type_ssize_t=no"
14077 fi
14078 rm -f conftest*
14079
14080 fi
14081 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14082   echo "$ac_t""yes" 1>&6
14083 else
14084   echo "$ac_t""no" 1>&6
14085   cat >> confdefs.h <<EOF
14086 #define ssize_t signed int
14087 EOF
14088
14089 fi
14090
14091 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14092 echo "configure:14093: checking for caddr_t" >&5
14093 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14094   echo $ac_n "(cached) $ac_c" 1>&6
14095 else
14096   cat > conftest.$ac_ext <<EOF
14097 #line 14098 "configure"
14098 #include "confdefs.h"
14099 #include <sys/types.h>
14100 #if STDC_HEADERS
14101 #include <stdlib.h>
14102 #include <stddef.h>
14103 #endif
14104
14105 EOF
14106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14107   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14108   rm -rf conftest*
14109   eval "ac_cv_type_caddr_t=yes"
14110 else
14111   rm -rf conftest*
14112   eval "ac_cv_type_caddr_t=no"
14113 fi
14114 rm -f conftest*
14115
14116 fi
14117 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14118   echo "$ac_t""yes" 1>&6
14119 else
14120   echo "$ac_t""no" 1>&6
14121   cat >> confdefs.h <<EOF
14122 #define caddr_t char *
14123 EOF
14124
14125 fi
14126
14127
14128 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14129 echo "configure:14130: checking for socklen_t" >&5
14130 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14131   echo $ac_n "(cached) $ac_c" 1>&6
14132 else
14133   cat > conftest.$ac_ext <<EOF
14134 #line 14135 "configure"
14135 #include "confdefs.h"
14136
14137 #ifdef HAVE_SYS_TYPES_H
14138 #include <sys/types.h>
14139 #endif
14140 #ifdef HAVE_SYS_SOCKET_H
14141 #include <sys/socket.h>
14142 #endif
14143
14144 int main() {
14145 socklen_t len;
14146 ; return 0; }
14147 EOF
14148 if { (eval echo configure:14149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14149   rm -rf conftest*
14150   ol_cv_type_socklen_t=yes
14151 else
14152   echo "configure: failed program was:" >&5
14153   cat conftest.$ac_ext >&5
14154   rm -rf conftest*
14155   ol_cv_type_socklen_t=no
14156 fi
14157 rm -f conftest*
14158 fi
14159
14160 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14161   if test $ol_cv_type_socklen_t = no; then
14162     cat >> confdefs.h <<\EOF
14163 #define socklen_t int
14164 EOF
14165
14166   fi
14167  
14168 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14169 echo "configure:14170: checking for member st_blksize in aggregate type struct stat" >&5
14170 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14171   echo $ac_n "(cached) $ac_c" 1>&6
14172 else
14173   cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 #include <sys/types.h>
14177 #include <sys/stat.h>
14178 int main() {
14179 struct stat foo; foo.st_blksize;
14180 ; return 0; }
14181 EOF
14182 if { (eval echo configure:14183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14183   rm -rf conftest*
14184   ac_cv_c_struct_member_st_blksize=yes
14185 else
14186   echo "configure: failed program was:" >&5
14187   cat conftest.$ac_ext >&5
14188   rm -rf conftest*
14189   ac_cv_c_struct_member_st_blksize=no
14190 fi
14191 rm -f conftest*
14192 fi
14193
14194 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14195 st_blksize="$ac_cv_c_struct_member_st_blksize"
14196 if test $ac_cv_c_struct_member_st_blksize = yes; then
14197   cat >> confdefs.h <<\EOF
14198 #define HAVE_ST_BLKSIZE 1
14199 EOF
14200
14201 fi
14202
14203 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14204 echo "configure:14205: checking whether time.h and sys/time.h may both be included" >&5
14205 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14206   echo $ac_n "(cached) $ac_c" 1>&6
14207 else
14208   cat > conftest.$ac_ext <<EOF
14209 #line 14210 "configure"
14210 #include "confdefs.h"
14211 #include <sys/types.h>
14212 #include <sys/time.h>
14213 #include <time.h>
14214 int main() {
14215 struct tm *tp;
14216 ; return 0; }
14217 EOF
14218 if { (eval echo configure:14219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14219   rm -rf conftest*
14220   ac_cv_header_time=yes
14221 else
14222   echo "configure: failed program was:" >&5
14223   cat conftest.$ac_ext >&5
14224   rm -rf conftest*
14225   ac_cv_header_time=no
14226 fi
14227 rm -f conftest*
14228 fi
14229
14230 echo "$ac_t""$ac_cv_header_time" 1>&6
14231 if test $ac_cv_header_time = yes; then
14232   cat >> confdefs.h <<\EOF
14233 #define TIME_WITH_SYS_TIME 1
14234 EOF
14235
14236 fi
14237
14238 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14239 echo "configure:14240: checking whether struct tm is in sys/time.h or time.h" >&5
14240 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14241   echo $ac_n "(cached) $ac_c" 1>&6
14242 else
14243   cat > conftest.$ac_ext <<EOF
14244 #line 14245 "configure"
14245 #include "confdefs.h"
14246 #include <sys/types.h>
14247 #include <time.h>
14248 int main() {
14249 struct tm *tp; tp->tm_sec;
14250 ; return 0; }
14251 EOF
14252 if { (eval echo configure:14253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14253   rm -rf conftest*
14254   ac_cv_struct_tm=time.h
14255 else
14256   echo "configure: failed program was:" >&5
14257   cat conftest.$ac_ext >&5
14258   rm -rf conftest*
14259   ac_cv_struct_tm=sys/time.h
14260 fi
14261 rm -f conftest*
14262 fi
14263
14264 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14265 if test $ac_cv_struct_tm = sys/time.h; then
14266   cat >> confdefs.h <<\EOF
14267 #define TM_IN_SYS_TIME 1
14268 EOF
14269
14270 fi
14271
14272 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14273 echo "configure:14274: checking for uid_t in sys/types.h" >&5
14274 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14275   echo $ac_n "(cached) $ac_c" 1>&6
14276 else
14277   cat > conftest.$ac_ext <<EOF
14278 #line 14279 "configure"
14279 #include "confdefs.h"
14280 #include <sys/types.h>
14281 EOF
14282 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14283   egrep "uid_t" >/dev/null 2>&1; then
14284   rm -rf conftest*
14285   ac_cv_type_uid_t=yes
14286 else
14287   rm -rf conftest*
14288   ac_cv_type_uid_t=no
14289 fi
14290 rm -f conftest*
14291
14292 fi
14293
14294 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14295 if test $ac_cv_type_uid_t = no; then
14296   cat >> confdefs.h <<\EOF
14297 #define uid_t int
14298 EOF
14299
14300   cat >> confdefs.h <<\EOF
14301 #define gid_t int
14302 EOF
14303
14304 fi
14305
14306 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14307 echo "configure:14308: checking for sig_atomic_t" >&5
14308 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14309   echo $ac_n "(cached) $ac_c" 1>&6
14310 else
14311   cat > conftest.$ac_ext <<EOF
14312 #line 14313 "configure"
14313 #include "confdefs.h"
14314 #include <signal.h>
14315 int main() {
14316 sig_atomic_t atomic;
14317 ; return 0; }
14318 EOF
14319 if { (eval echo configure:14320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14320   rm -rf conftest*
14321   ol_cv_type_sig_atomic_t=yes
14322 else
14323   echo "configure: failed program was:" >&5
14324   cat conftest.$ac_ext >&5
14325   rm -rf conftest*
14326   ol_cv_type_sig_atomic_t=no
14327 fi
14328 rm -f conftest*
14329 fi
14330
14331 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14332   if test $ol_cv_type_sig_atomic_t = no; then
14333     cat >> confdefs.h <<\EOF
14334 #define sig_atomic_t int
14335 EOF
14336
14337   fi
14338  
14339
14340
14341 # test for pw_gecos in struct passwd
14342 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14343 echo "configure:14344: checking struct passwd for pw_gecos" >&5
14344 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14345   echo $ac_n "(cached) $ac_c" 1>&6
14346 else
14347   
14348         cat > conftest.$ac_ext <<EOF
14349 #line 14350 "configure"
14350 #include "confdefs.h"
14351 #include <pwd.h>
14352 int main() {
14353
14354         struct passwd pwd;
14355         pwd.pw_gecos = pwd.pw_name;
14356
14357 ; return 0; }
14358 EOF
14359 if { (eval echo configure:14360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14360   rm -rf conftest*
14361   ol_cv_struct_passwd_pw_gecos=yes
14362 else
14363   echo "configure: failed program was:" >&5
14364   cat conftest.$ac_ext >&5
14365   rm -rf conftest*
14366   ol_cv_struct_passwd_pw_gecos=no
14367 fi
14368 rm -f conftest*
14369 fi
14370
14371 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14372 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14373         cat >> confdefs.h <<\EOF
14374 #define HAVE_PW_GECOS 1
14375 EOF
14376
14377 fi
14378
14379 # test for pw_passwd in struct passwd
14380 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14381 echo "configure:14382: checking struct passwd for pw_passwd" >&5
14382 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14383   echo $ac_n "(cached) $ac_c" 1>&6
14384 else
14385   
14386         cat > conftest.$ac_ext <<EOF
14387 #line 14388 "configure"
14388 #include "confdefs.h"
14389 #include <pwd.h>
14390 int main() {
14391
14392         struct passwd pwd;
14393         pwd.pw_passwd = pwd.pw_name;
14394
14395 ; return 0; }
14396 EOF
14397 if { (eval echo configure:14398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14398   rm -rf conftest*
14399   ol_cv_struct_passwd_pw_passwd=yes
14400 else
14401   echo "configure: failed program was:" >&5
14402   cat conftest.$ac_ext >&5
14403   rm -rf conftest*
14404   ol_cv_struct_passwd_pw_passwd=no
14405 fi
14406 rm -f conftest*
14407 fi
14408
14409 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14410 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14411         cat >> confdefs.h <<\EOF
14412 #define HAVE_PW_PASSWD 1
14413 EOF
14414
14415 fi
14416
14417
14418 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14419 echo "configure:14420: checking if toupper() requires islower()" >&5
14420 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14421   echo $ac_n "(cached) $ac_c" 1>&6
14422 else
14423   
14424         if test "$cross_compiling" = yes; then
14425   ol_cv_c_upper_lower=safe
14426 else
14427   cat > conftest.$ac_ext <<EOF
14428 #line 14429 "configure"
14429 #include "confdefs.h"
14430
14431 #include <ctype.h>
14432 main()
14433 {
14434         if ('C' == toupper('C'))
14435                 exit(0);
14436         else
14437                 exit(1);
14438 }
14439 EOF
14440 if { (eval echo configure:14441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14441 then
14442   ol_cv_c_upper_lower=no
14443 else
14444   echo "configure: failed program was:" >&5
14445   cat conftest.$ac_ext >&5
14446   rm -fr conftest*
14447   ol_cv_c_upper_lower=yes
14448 fi
14449 rm -fr conftest*
14450 fi
14451
14452 fi
14453
14454 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14455 if test $ol_cv_c_upper_lower != no ; then
14456         cat >> confdefs.h <<\EOF
14457 #define C_UPPER_LOWER 1
14458 EOF
14459
14460 fi
14461
14462 echo $ac_n "checking for working const""... $ac_c" 1>&6
14463 echo "configure:14464: checking for working const" >&5
14464 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14465   echo $ac_n "(cached) $ac_c" 1>&6
14466 else
14467   cat > conftest.$ac_ext <<EOF
14468 #line 14469 "configure"
14469 #include "confdefs.h"
14470
14471 int main() {
14472
14473 /* Ultrix mips cc rejects this.  */
14474 typedef int charset[2]; const charset x;
14475 /* SunOS 4.1.1 cc rejects this.  */
14476 char const *const *ccp;
14477 char **p;
14478 /* NEC SVR4.0.2 mips cc rejects this.  */
14479 struct point {int x, y;};
14480 static struct point const zero = {0,0};
14481 /* AIX XL C 1.02.0.0 rejects this.
14482    It does not let you subtract one const X* pointer from another in an arm
14483    of an if-expression whose if-part is not a constant expression */
14484 const char *g = "string";
14485 ccp = &g + (g ? g-g : 0);
14486 /* HPUX 7.0 cc rejects these. */
14487 ++ccp;
14488 p = (char**) ccp;
14489 ccp = (char const *const *) p;
14490 { /* SCO 3.2v4 cc rejects this.  */
14491   char *t;
14492   char const *s = 0 ? (char *) 0 : (char const *) 0;
14493
14494   *t++ = 0;
14495 }
14496 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14497   int x[] = {25, 17};
14498   const int *foo = &x[0];
14499   ++foo;
14500 }
14501 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14502   typedef const int *iptr;
14503   iptr p = 0;
14504   ++p;
14505 }
14506 { /* AIX XL C 1.02.0.0 rejects this saying
14507      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14508   struct s { int j; const int *ap[3]; };
14509   struct s *b; b->j = 5;
14510 }
14511 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14512   const int foo = 10;
14513 }
14514
14515 ; return 0; }
14516 EOF
14517 if { (eval echo configure:14518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14518   rm -rf conftest*
14519   ac_cv_c_const=yes
14520 else
14521   echo "configure: failed program was:" >&5
14522   cat conftest.$ac_ext >&5
14523   rm -rf conftest*
14524   ac_cv_c_const=no
14525 fi
14526 rm -f conftest*
14527 fi
14528
14529 echo "$ac_t""$ac_cv_c_const" 1>&6
14530 if test $ac_cv_c_const = no; then
14531   cat >> confdefs.h <<\EOF
14532 #define const 
14533 EOF
14534
14535 fi
14536
14537 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14538 echo "configure:14539: checking if compiler understands volatile" >&5
14539 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14540   echo $ac_n "(cached) $ac_c" 1>&6
14541 else
14542   cat > conftest.$ac_ext <<EOF
14543 #line 14544 "configure"
14544 #include "confdefs.h"
14545 int x, y, z;
14546 int main() {
14547 volatile int a; int * volatile b = x ? &y : &z;
14548       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14549       *b = 0;
14550 ; return 0; }
14551 EOF
14552 if { (eval echo configure:14553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14553   rm -rf conftest*
14554   ol_cv_c_volatile=yes
14555 else
14556   echo "configure: failed program was:" >&5
14557   cat conftest.$ac_ext >&5
14558   rm -rf conftest*
14559   ol_cv_c_volatile=no
14560 fi
14561 rm -f conftest*
14562 fi
14563
14564 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14565   if test $ol_cv_c_volatile = yes; then
14566     : 
14567   else
14568     cat >> confdefs.h <<\EOF
14569 #define volatile 
14570 EOF
14571
14572   fi
14573  
14574
14575 if test $cross_compiling = yes ; then
14576         cat >> confdefs.h <<\EOF
14577 #define CROSS_COMPILING 1
14578 EOF
14579
14580 else
14581         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14582 echo "configure:14583: checking whether byte ordering is bigendian" >&5
14583 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14584   echo $ac_n "(cached) $ac_c" 1>&6
14585 else
14586   ac_cv_c_bigendian=unknown
14587 # See if sys/param.h defines the BYTE_ORDER macro.
14588 cat > conftest.$ac_ext <<EOF
14589 #line 14590 "configure"
14590 #include "confdefs.h"
14591 #include <sys/types.h>
14592 #include <sys/param.h>
14593 int main() {
14594
14595 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14596  bogus endian macros
14597 #endif
14598 ; return 0; }
14599 EOF
14600 if { (eval echo configure:14601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14601   rm -rf conftest*
14602   # It does; now see whether it defined to BIG_ENDIAN or not.
14603 cat > conftest.$ac_ext <<EOF
14604 #line 14605 "configure"
14605 #include "confdefs.h"
14606 #include <sys/types.h>
14607 #include <sys/param.h>
14608 int main() {
14609
14610 #if BYTE_ORDER != BIG_ENDIAN
14611  not big endian
14612 #endif
14613 ; return 0; }
14614 EOF
14615 if { (eval echo configure:14616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14616   rm -rf conftest*
14617   ac_cv_c_bigendian=yes
14618 else
14619   echo "configure: failed program was:" >&5
14620   cat conftest.$ac_ext >&5
14621   rm -rf conftest*
14622   ac_cv_c_bigendian=no
14623 fi
14624 rm -f conftest*
14625 else
14626   echo "configure: failed program was:" >&5
14627   cat conftest.$ac_ext >&5
14628 fi
14629 rm -f conftest*
14630 if test $ac_cv_c_bigendian = unknown; then
14631 if test "$cross_compiling" = yes; then
14632     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14633 else
14634   cat > conftest.$ac_ext <<EOF
14635 #line 14636 "configure"
14636 #include "confdefs.h"
14637 main () {
14638   /* Are we little or big endian?  From Harbison&Steele.  */
14639   union
14640   {
14641     long l;
14642     char c[sizeof (long)];
14643   } u;
14644   u.l = 1;
14645   exit (u.c[sizeof (long) - 1] == 1);
14646 }
14647 EOF
14648 if { (eval echo configure:14649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14649 then
14650   ac_cv_c_bigendian=no
14651 else
14652   echo "configure: failed program was:" >&5
14653   cat conftest.$ac_ext >&5
14654   rm -fr conftest*
14655   ac_cv_c_bigendian=yes
14656 fi
14657 rm -fr conftest*
14658 fi
14659
14660 fi
14661 fi
14662
14663 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14664 if test $ac_cv_c_bigendian = yes; then
14665   cat >> confdefs.h <<\EOF
14666 #define WORDS_BIGENDIAN 1
14667 EOF
14668
14669 fi
14670
14671 fi
14672
14673 echo $ac_n "checking size of short""... $ac_c" 1>&6
14674 echo "configure:14675: checking size of short" >&5 
14675 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14676   echo $ac_n "(cached) $ac_c" 1>&6
14677 else
14678   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14679   cat > conftest.$ac_ext <<EOF
14680 #line 14681 "configure"
14681 #include "confdefs.h"
14682 #include "confdefs.h" 
14683 #include <sys/types.h> 
14684  
14685
14686 int main() {
14687 switch (0) case 0: case (sizeof (short) == $ac_size):;
14688 ; return 0; }
14689 EOF
14690 if { (eval echo configure:14691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14691   rm -rf conftest*
14692   ac_cv_sizeof_short=$ac_size
14693 else
14694   echo "configure: failed program was:" >&5
14695   cat conftest.$ac_ext >&5
14696 fi
14697 rm -f conftest* 
14698   if test x$ac_cv_sizeof_short != x ; then break; fi 
14699 done 
14700
14701 fi
14702  
14703 if test x$ac_cv_sizeof_short = x ; then 
14704   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14705 fi 
14706 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14707 cat >> confdefs.h <<EOF
14708 #define SIZEOF_SHORT $ac_cv_sizeof_short
14709 EOF
14710  
14711  
14712 echo $ac_n "checking size of int""... $ac_c" 1>&6
14713 echo "configure:14714: checking size of int" >&5 
14714 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14715   echo $ac_n "(cached) $ac_c" 1>&6
14716 else
14717   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14718   cat > conftest.$ac_ext <<EOF
14719 #line 14720 "configure"
14720 #include "confdefs.h"
14721 #include "confdefs.h" 
14722 #include <sys/types.h> 
14723  
14724
14725 int main() {
14726 switch (0) case 0: case (sizeof (int) == $ac_size):;
14727 ; return 0; }
14728 EOF
14729 if { (eval echo configure:14730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14730   rm -rf conftest*
14731   ac_cv_sizeof_int=$ac_size
14732 else
14733   echo "configure: failed program was:" >&5
14734   cat conftest.$ac_ext >&5
14735 fi
14736 rm -f conftest* 
14737   if test x$ac_cv_sizeof_int != x ; then break; fi 
14738 done 
14739
14740 fi
14741  
14742 if test x$ac_cv_sizeof_int = x ; then 
14743   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14744 fi 
14745 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14746 cat >> confdefs.h <<EOF
14747 #define SIZEOF_INT $ac_cv_sizeof_int
14748 EOF
14749  
14750  
14751 echo $ac_n "checking size of long""... $ac_c" 1>&6
14752 echo "configure:14753: checking size of long" >&5 
14753 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14754   echo $ac_n "(cached) $ac_c" 1>&6
14755 else
14756   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14757   cat > conftest.$ac_ext <<EOF
14758 #line 14759 "configure"
14759 #include "confdefs.h"
14760 #include "confdefs.h" 
14761 #include <sys/types.h> 
14762  
14763
14764 int main() {
14765 switch (0) case 0: case (sizeof (long) == $ac_size):;
14766 ; return 0; }
14767 EOF
14768 if { (eval echo configure:14769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14769   rm -rf conftest*
14770   ac_cv_sizeof_long=$ac_size
14771 else
14772   echo "configure: failed program was:" >&5
14773   cat conftest.$ac_ext >&5
14774 fi
14775 rm -f conftest* 
14776   if test x$ac_cv_sizeof_long != x ; then break; fi 
14777 done 
14778
14779 fi
14780  
14781 if test x$ac_cv_sizeof_long = x ; then 
14782   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14783 fi 
14784 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14785 cat >> confdefs.h <<EOF
14786 #define SIZEOF_LONG $ac_cv_sizeof_long
14787 EOF
14788  
14789
14790
14791 if test "$ac_cv_sizeof_int" -lt 4 ; then
14792         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14793
14794         cat >> confdefs.h <<\EOF
14795 #define LBER_INT_T long
14796 EOF
14797
14798 else
14799         cat >> confdefs.h <<\EOF
14800 #define LBER_INT_T int
14801 EOF
14802
14803 fi
14804
14805 cat >> confdefs.h <<\EOF
14806 #define LBER_LEN_T long
14807 EOF
14808
14809 cat >> confdefs.h <<\EOF
14810 #define LBER_SOCKET_T int
14811 EOF
14812
14813 cat >> confdefs.h <<\EOF
14814 #define LBER_TAG_T long
14815 EOF
14816
14817
14818 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14819 echo "configure:14820: checking for 8-bit clean memcmp" >&5
14820 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14821   echo $ac_n "(cached) $ac_c" 1>&6
14822 else
14823   if test "$cross_compiling" = yes; then
14824   ac_cv_func_memcmp_clean=no
14825 else
14826   cat > conftest.$ac_ext <<EOF
14827 #line 14828 "configure"
14828 #include "confdefs.h"
14829
14830 main()
14831 {
14832   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14833   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14834 }
14835
14836 EOF
14837 if { (eval echo configure:14838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14838 then
14839   ac_cv_func_memcmp_clean=yes
14840 else
14841   echo "configure: failed program was:" >&5
14842   cat conftest.$ac_ext >&5
14843   rm -fr conftest*
14844   ac_cv_func_memcmp_clean=no
14845 fi
14846 rm -fr conftest*
14847 fi
14848
14849 fi
14850
14851 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14852 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14853
14854 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14855 echo "configure:14856: checking for strftime" >&5
14856 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14857   echo $ac_n "(cached) $ac_c" 1>&6
14858 else
14859   cat > conftest.$ac_ext <<EOF
14860 #line 14861 "configure"
14861 #include "confdefs.h"
14862 /* System header to define __stub macros and hopefully few prototypes,
14863     which can conflict with char strftime(); below.  */
14864 #include <assert.h>
14865 /* Override any gcc2 internal prototype to avoid an error.  */
14866 /* We use char because int might match the return type of a gcc2
14867     builtin and then its argument prototype would still apply.  */
14868 char strftime();
14869 char (*f)();
14870
14871 int main() {
14872
14873 /* The GNU C library defines this for functions which it implements
14874     to always fail with ENOSYS.  Some functions are actually named
14875     something starting with __ and the normal name is an alias.  */
14876 #if defined (__stub_strftime) || defined (__stub___strftime)
14877 choke me
14878 #else
14879 f = strftime;
14880 #endif
14881
14882 ; return 0; }
14883 EOF
14884 if { (eval echo configure:14885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14885   rm -rf conftest*
14886   eval "ac_cv_func_strftime=yes"
14887 else
14888   echo "configure: failed program was:" >&5
14889   cat conftest.$ac_ext >&5
14890   rm -rf conftest*
14891   eval "ac_cv_func_strftime=no"
14892 fi
14893 rm -f conftest*
14894 fi
14895
14896 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14897   echo "$ac_t""yes" 1>&6
14898   cat >> confdefs.h <<\EOF
14899 #define HAVE_STRFTIME 1
14900 EOF
14901
14902 else
14903   echo "$ac_t""no" 1>&6
14904 # strftime is in -lintl on SCO UNIX.
14905 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14906 echo "configure:14907: checking for strftime in -lintl" >&5
14907 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14908 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14909   echo $ac_n "(cached) $ac_c" 1>&6
14910 else
14911   ac_save_LIBS="$LIBS"
14912 LIBS="-lintl  $LIBS"
14913 cat > conftest.$ac_ext <<EOF
14914 #line 14915 "configure"
14915 #include "confdefs.h"
14916 /* Override any gcc2 internal prototype to avoid an error.  */
14917 /* We use char because int might match the return type of a gcc2
14918     builtin and then its argument prototype would still apply.  */
14919 char strftime();
14920
14921 int main() {
14922 strftime()
14923 ; return 0; }
14924 EOF
14925 if { (eval echo configure:14926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14926   rm -rf conftest*
14927   eval "ac_cv_lib_$ac_lib_var=yes"
14928 else
14929   echo "configure: failed program was:" >&5
14930   cat conftest.$ac_ext >&5
14931   rm -rf conftest*
14932   eval "ac_cv_lib_$ac_lib_var=no"
14933 fi
14934 rm -f conftest*
14935 LIBS="$ac_save_LIBS"
14936
14937 fi
14938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14939   echo "$ac_t""yes" 1>&6
14940   cat >> confdefs.h <<\EOF
14941 #define HAVE_STRFTIME 1
14942 EOF
14943
14944 LIBS="-lintl $LIBS"
14945 else
14946   echo "$ac_t""no" 1>&6
14947 fi
14948
14949 fi
14950
14951
14952 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14953 echo "configure:14954: checking for inet_aton()" >&5
14954 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14955   echo $ac_n "(cached) $ac_c" 1>&6
14956 else
14957   cat > conftest.$ac_ext <<EOF
14958 #line 14959 "configure"
14959 #include "confdefs.h"
14960
14961 #ifdef HAVE_SYS_TYPES_H
14962 #       include <sys/types.h>
14963 #endif
14964 #ifdef HAVE_SYS_SOCKET_H
14965 #       include <sys/socket.h>
14966 #       ifdef HAVE_SYS_SELECT_H
14967 #               include <sys/select.h>
14968 #       endif
14969 #       include <netinet/in.h>
14970 #       ifdef HAVE_ARPA_INET_H
14971 #               include <arpa/inet.h>
14972 #       endif
14973 #endif
14974
14975 int main() {
14976 struct in_addr in;
14977 int rc = inet_aton( "255.255.255.255", &in );
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   ol_cv_func_inet_aton=yes
14983 else
14984   echo "configure: failed program was:" >&5
14985   cat conftest.$ac_ext >&5
14986   rm -rf conftest*
14987   ol_cv_func_inet_aton=no
14988 fi
14989 rm -f conftest*
14990 fi
14991
14992 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14993   if test $ol_cv_func_inet_aton != no; then
14994     cat >> confdefs.h <<\EOF
14995 #define HAVE_INET_ATON 1
14996 EOF
14997
14998   fi
14999  
15000
15001 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15002 echo "configure:15003: checking for _spawnlp" >&5
15003 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15004   echo $ac_n "(cached) $ac_c" 1>&6
15005 else
15006   cat > conftest.$ac_ext <<EOF
15007 #line 15008 "configure"
15008 #include "confdefs.h"
15009 /* System header to define __stub macros and hopefully few prototypes,
15010     which can conflict with char _spawnlp(); below.  */
15011 #include <assert.h>
15012 /* Override any gcc2 internal prototype to avoid an error.  */
15013 /* We use char because int might match the return type of a gcc2
15014     builtin and then its argument prototype would still apply.  */
15015 char _spawnlp();
15016 char (*f)();
15017
15018 int main() {
15019
15020 /* The GNU C library defines this for functions which it implements
15021     to always fail with ENOSYS.  Some functions are actually named
15022     something starting with __ and the normal name is an alias.  */
15023 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15024 choke me
15025 #else
15026 f = _spawnlp;
15027 #endif
15028
15029 ; return 0; }
15030 EOF
15031 if { (eval echo configure:15032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15032   rm -rf conftest*
15033   eval "ac_cv_func__spawnlp=yes"
15034 else
15035   echo "configure: failed program was:" >&5
15036   cat conftest.$ac_ext >&5
15037   rm -rf conftest*
15038   eval "ac_cv_func__spawnlp=no"
15039 fi
15040 rm -f conftest*
15041 fi
15042
15043 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15044   echo "$ac_t""yes" 1>&6
15045   cat >> confdefs.h <<\EOF
15046 #define HAVE_SPAWNLP 1
15047 EOF
15048
15049 else
15050   echo "$ac_t""no" 1>&6
15051 fi
15052
15053
15054 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15055 echo "configure:15056: checking for _snprintf" >&5
15056 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15057   echo $ac_n "(cached) $ac_c" 1>&6
15058 else
15059   cat > conftest.$ac_ext <<EOF
15060 #line 15061 "configure"
15061 #include "confdefs.h"
15062 /* System header to define __stub macros and hopefully few prototypes,
15063     which can conflict with char _snprintf(); below.  */
15064 #include <assert.h>
15065 /* Override any gcc2 internal prototype to avoid an error.  */
15066 /* We use char because int might match the return type of a gcc2
15067     builtin and then its argument prototype would still apply.  */
15068 char _snprintf();
15069 char (*f)();
15070
15071 int main() {
15072
15073 /* The GNU C library defines this for functions which it implements
15074     to always fail with ENOSYS.  Some functions are actually named
15075     something starting with __ and the normal name is an alias.  */
15076 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15077 choke me
15078 #else
15079 f = _snprintf;
15080 #endif
15081
15082 ; return 0; }
15083 EOF
15084 if { (eval echo configure:15085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15085   rm -rf conftest*
15086   eval "ac_cv_func__snprintf=yes"
15087 else
15088   echo "configure: failed program was:" >&5
15089   cat conftest.$ac_ext >&5
15090   rm -rf conftest*
15091   eval "ac_cv_func__snprintf=no"
15092 fi
15093 rm -f conftest*
15094 fi
15095
15096 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15097   echo "$ac_t""yes" 1>&6
15098   ac_cv_func_snprintf=yes
15099         cat >> confdefs.h <<\EOF
15100 #define snprintf _snprintf
15101 EOF
15102
15103
15104 else
15105   echo "$ac_t""no" 1>&6
15106 fi
15107
15108
15109 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15110 echo "configure:15111: checking for _vsnprintf" >&5
15111 if eval "test \"\${ac_cv_func__vsnprintf+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 _vsnprintf(); 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 _vsnprintf();
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__vsnprintf) || defined (__stub____vsnprintf)
15132 choke me
15133 #else
15134 f = _vsnprintf;
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__vsnprintf=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__vsnprintf=no"
15147 fi
15148 rm -f conftest*
15149 fi
15150
15151 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15152   echo "$ac_t""yes" 1>&6
15153   ac_cv_func_vsnprintf=yes
15154         cat >> confdefs.h <<\EOF
15155 #define vsnprintf _vsnprintf
15156 EOF
15157
15158
15159 else
15160   echo "$ac_t""no" 1>&6
15161 fi
15162
15163
15164 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15165 echo "configure:15166: checking for vprintf" >&5
15166 if eval "test \"\${ac_cv_func_vprintf+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 vprintf(); 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 vprintf();
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_vprintf) || defined (__stub___vprintf)
15187 choke me
15188 #else
15189 f = vprintf;
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_vprintf=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_vprintf=no"
15202 fi
15203 rm -f conftest*
15204 fi
15205
15206 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15207   echo "$ac_t""yes" 1>&6
15208   cat >> confdefs.h <<\EOF
15209 #define HAVE_VPRINTF 1
15210 EOF
15211
15212 else
15213   echo "$ac_t""no" 1>&6
15214 fi
15215
15216 if test "$ac_cv_func_vprintf" != yes; then
15217 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15218 echo "configure:15219: checking for _doprnt" >&5
15219 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15220   echo $ac_n "(cached) $ac_c" 1>&6
15221 else
15222   cat > conftest.$ac_ext <<EOF
15223 #line 15224 "configure"
15224 #include "confdefs.h"
15225 /* System header to define __stub macros and hopefully few prototypes,
15226     which can conflict with char _doprnt(); below.  */
15227 #include <assert.h>
15228 /* Override any gcc2 internal prototype to avoid an error.  */
15229 /* We use char because int might match the return type of a gcc2
15230     builtin and then its argument prototype would still apply.  */
15231 char _doprnt();
15232 char (*f)();
15233
15234 int main() {
15235
15236 /* The GNU C library defines this for functions which it implements
15237     to always fail with ENOSYS.  Some functions are actually named
15238     something starting with __ and the normal name is an alias.  */
15239 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15240 choke me
15241 #else
15242 f = _doprnt;
15243 #endif
15244
15245 ; return 0; }
15246 EOF
15247 if { (eval echo configure:15248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15248   rm -rf conftest*
15249   eval "ac_cv_func__doprnt=yes"
15250 else
15251   echo "configure: failed program was:" >&5
15252   cat conftest.$ac_ext >&5
15253   rm -rf conftest*
15254   eval "ac_cv_func__doprnt=no"
15255 fi
15256 rm -f conftest*
15257 fi
15258
15259 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15260   echo "$ac_t""yes" 1>&6
15261   cat >> confdefs.h <<\EOF
15262 #define HAVE_DOPRNT 1
15263 EOF
15264
15265 else
15266   echo "$ac_t""no" 1>&6
15267 fi
15268
15269 fi
15270
15271
15272 if test $ac_cv_func_vprintf = yes ; then
15273                 for ac_func in vsnprintf vsprintf
15274 do
15275 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15276 echo "configure:15277: checking for $ac_func" >&5
15277 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15278   echo $ac_n "(cached) $ac_c" 1>&6
15279 else
15280   cat > conftest.$ac_ext <<EOF
15281 #line 15282 "configure"
15282 #include "confdefs.h"
15283 /* System header to define __stub macros and hopefully few prototypes,
15284     which can conflict with char $ac_func(); below.  */
15285 #include <assert.h>
15286 /* Override any gcc2 internal prototype to avoid an error.  */
15287 /* We use char because int might match the return type of a gcc2
15288     builtin and then its argument prototype would still apply.  */
15289 char $ac_func();
15290 char (*f)();
15291
15292 int main() {
15293
15294 /* The GNU C library defines this for functions which it implements
15295     to always fail with ENOSYS.  Some functions are actually named
15296     something starting with __ and the normal name is an alias.  */
15297 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15298 choke me
15299 #else
15300 f = $ac_func;
15301 #endif
15302
15303 ; return 0; }
15304 EOF
15305 if { (eval echo configure:15306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15306   rm -rf conftest*
15307   eval "ac_cv_func_$ac_func=yes"
15308 else
15309   echo "configure: failed program was:" >&5
15310   cat conftest.$ac_ext >&5
15311   rm -rf conftest*
15312   eval "ac_cv_func_$ac_func=no"
15313 fi
15314 rm -f conftest*
15315 fi
15316
15317 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15318   echo "$ac_t""yes" 1>&6
15319     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15320   cat >> confdefs.h <<EOF
15321 #define $ac_tr_func 1
15322 EOF
15323  
15324 else
15325   echo "$ac_t""no" 1>&6
15326 fi
15327 done
15328
15329 fi
15330
15331 for ac_func in \
15332         bcopy                   \
15333         closesocket             \
15334         chroot                  \
15335         endgrent                \
15336         endpwent                \
15337         flock                   \
15338         getdtablesize   \
15339         getgrgid                \
15340         gethostname             \
15341         getpass                 \
15342         getpassphrase   \
15343         getpwuid                \
15344         getpwnam                \
15345         getspnam                \
15346         gettimeofday    \
15347         initgroups              \
15348         lockf                   \
15349         memcpy                  \
15350         memmove                 \
15351         mkstemp                 \
15352         pipe                    \
15353         read                    \
15354         recv                    \
15355         recvfrom                \
15356         setpwfile               \
15357         setgid                  \
15358         setegid                 \
15359         setsid                  \
15360         setuid                  \
15361         seteuid                 \
15362         sigaction               \
15363         signal                  \
15364         sigset                  \
15365         snprintf                \
15366         strdup                  \
15367         strerror                \
15368         strpbrk                 \
15369         strrchr                 \
15370         strsep                  \
15371         strstr                  \
15372         strtol                  \
15373         strtoul                 \
15374         strspn                  \
15375         sysconf                 \
15376         waitpid                 \
15377         wait4                   \
15378         write                   \
15379         send                    \
15380         sendto                  \
15381
15382 do
15383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15384 echo "configure:15385: checking for $ac_func" >&5
15385 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15386   echo $ac_n "(cached) $ac_c" 1>&6
15387 else
15388   cat > conftest.$ac_ext <<EOF
15389 #line 15390 "configure"
15390 #include "confdefs.h"
15391 /* System header to define __stub macros and hopefully few prototypes,
15392     which can conflict with char $ac_func(); below.  */
15393 #include <assert.h>
15394 /* Override any gcc2 internal prototype to avoid an error.  */
15395 /* We use char because int might match the return type of a gcc2
15396     builtin and then its argument prototype would still apply.  */
15397 char $ac_func();
15398 char (*f)();
15399
15400 int main() {
15401
15402 /* The GNU C library defines this for functions which it implements
15403     to always fail with ENOSYS.  Some functions are actually named
15404     something starting with __ and the normal name is an alias.  */
15405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15406 choke me
15407 #else
15408 f = $ac_func;
15409 #endif
15410
15411 ; return 0; }
15412 EOF
15413 if { (eval echo configure:15414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15414   rm -rf conftest*
15415   eval "ac_cv_func_$ac_func=yes"
15416 else
15417   echo "configure: failed program was:" >&5
15418   cat conftest.$ac_ext >&5
15419   rm -rf conftest*
15420   eval "ac_cv_func_$ac_func=no"
15421 fi
15422 rm -f conftest*
15423 fi
15424
15425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15426   echo "$ac_t""yes" 1>&6
15427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15428   cat >> confdefs.h <<EOF
15429 #define $ac_tr_func 1
15430 EOF
15431  
15432 else
15433   echo "$ac_t""no" 1>&6
15434 fi
15435 done
15436
15437
15438 for ac_func in getopt tempnam
15439 do
15440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15441 echo "configure:15442: checking for $ac_func" >&5
15442 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15443   echo $ac_n "(cached) $ac_c" 1>&6
15444 else
15445   cat > conftest.$ac_ext <<EOF
15446 #line 15447 "configure"
15447 #include "confdefs.h"
15448 /* System header to define __stub macros and hopefully few prototypes,
15449     which can conflict with char $ac_func(); below.  */
15450 #include <assert.h>
15451 /* Override any gcc2 internal prototype to avoid an error.  */
15452 /* We use char because int might match the return type of a gcc2
15453     builtin and then its argument prototype would still apply.  */
15454 char $ac_func();
15455 char (*f)();
15456
15457 int main() {
15458
15459 /* The GNU C library defines this for functions which it implements
15460     to always fail with ENOSYS.  Some functions are actually named
15461     something starting with __ and the normal name is an alias.  */
15462 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15463 choke me
15464 #else
15465 f = $ac_func;
15466 #endif
15467
15468 ; return 0; }
15469 EOF
15470 if { (eval echo configure:15471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15471   rm -rf conftest*
15472   eval "ac_cv_func_$ac_func=yes"
15473 else
15474   echo "configure: failed program was:" >&5
15475   cat conftest.$ac_ext >&5
15476   rm -rf conftest*
15477   eval "ac_cv_func_$ac_func=no"
15478 fi
15479 rm -f conftest*
15480 fi
15481
15482 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15483   echo "$ac_t""yes" 1>&6
15484     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15485   cat >> confdefs.h <<EOF
15486 #define $ac_tr_func 1
15487 EOF
15488  
15489 else
15490   echo "$ac_t""no" 1>&6
15491 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15492 fi
15493 done
15494
15495
15496
15497 if test "$ac_cv_func_getopt" != yes; then
15498     LIBSRCS="$LIBSRCS getopt.c"
15499 fi
15500
15501 if test "$ac_cv_func_tempnam" != yes; then
15502     LIBSRCS="$LIBSRCS tempnam.c"
15503 fi
15504
15505 # Check Configuration
15506 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15507 echo "configure:15508: checking declaration of sys_errlist" >&5
15508 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15509   echo $ac_n "(cached) $ac_c" 1>&6
15510 else
15511   
15512         cat > conftest.$ac_ext <<EOF
15513 #line 15514 "configure"
15514 #include "confdefs.h"
15515
15516 #include <stdio.h>
15517 #include <sys/types.h>
15518 #include <errno.h>
15519 #ifdef WINNT
15520 #include <stdlib.h>
15521 #endif 
15522 int main() {
15523 char *c = (char *) *sys_errlist
15524 ; return 0; }
15525 EOF
15526 if { (eval echo configure:15527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15527   rm -rf conftest*
15528   ol_cv_dcl_sys_errlist=yes
15529         ol_cv_have_sys_errlist=yes
15530 else
15531   echo "configure: failed program was:" >&5
15532   cat conftest.$ac_ext >&5
15533   rm -rf conftest*
15534   ol_cv_dcl_sys_errlist=no
15535 fi
15536 rm -f conftest*
15537 fi
15538
15539 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15540 #
15541 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15542 if test $ol_cv_dcl_sys_errlist = no ; then
15543         cat >> confdefs.h <<\EOF
15544 #define DECL_SYS_ERRLIST 1
15545 EOF
15546
15547
15548         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15549 echo "configure:15550: checking existence of sys_errlist" >&5
15550 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15551   echo $ac_n "(cached) $ac_c" 1>&6
15552 else
15553   
15554                 cat > conftest.$ac_ext <<EOF
15555 #line 15556 "configure"
15556 #include "confdefs.h"
15557 #include <errno.h>
15558 int main() {
15559 char *c = (char *) *sys_errlist
15560 ; return 0; }
15561 EOF
15562 if { (eval echo configure:15563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15563   rm -rf conftest*
15564   ol_cv_have_sys_errlist=yes
15565 else
15566   echo "configure: failed program was:" >&5
15567   cat conftest.$ac_ext >&5
15568   rm -rf conftest*
15569   ol_cv_have_sys_errlist=no
15570 fi
15571 rm -f conftest*
15572 fi
15573
15574 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15575 fi
15576 if test $ol_cv_have_sys_errlist = yes ; then
15577         cat >> confdefs.h <<\EOF
15578 #define HAVE_SYS_ERRLIST 1
15579 EOF
15580
15581 fi
15582
15583
15584
15585 if test "$ol_enable_debug" != no ; then
15586         cat >> confdefs.h <<\EOF
15587 #define LDAP_DEBUG 1
15588 EOF
15589
15590 fi
15591 if test "$ol_enable_syslog" = yes ; then
15592         cat >> confdefs.h <<\EOF
15593 #define LDAP_SYSLOG 1
15594 EOF
15595
15596 fi
15597 if test "$ol_enable_libui" = yes ; then
15598         cat >> confdefs.h <<\EOF
15599 #define LDAP_LIBUI 1
15600 EOF
15601
15602 fi
15603 if test "$ol_enable_cache" = no ; then
15604         cat >> confdefs.h <<\EOF
15605 #define LDAP_NOCACHE 1
15606 EOF
15607
15608 fi
15609 if test "$ol_link_kbind" != no ; then
15610         cat >> confdefs.h <<\EOF
15611 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15612 EOF
15613
15614 fi
15615 if test "$ol_enable_proctitle" != no ; then
15616         cat >> confdefs.h <<\EOF
15617 #define LDAP_PROCTITLE 1
15618 EOF
15619
15620 fi
15621 if test "$ol_enable_referrals" != no ; then
15622         cat >> confdefs.h <<\EOF
15623 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15624 EOF
15625
15626 fi
15627 if test "$ol_enable_local" != no; then
15628         cat >> confdefs.h <<\EOF
15629 #define LDAP_PF_LOCAL 1
15630 EOF
15631
15632 fi
15633 if test "$ol_link_ipv6" != no; then
15634         cat >> confdefs.h <<\EOF
15635 #define LDAP_PF_INET6 1
15636 EOF
15637
15638 fi
15639 if test "$ol_enable_cleartext" != no ; then
15640         cat >> confdefs.h <<\EOF
15641 #define SLAPD_CLEARTEXT 1
15642 EOF
15643
15644 fi
15645 if test "$ol_enable_crypt" != no ; then
15646         cat >> confdefs.h <<\EOF
15647 #define SLAPD_CRYPT 1
15648 EOF
15649
15650 fi
15651 if test "$ol_link_kpasswd" != no ; then
15652         cat >> confdefs.h <<\EOF
15653 #define SLAPD_KPASSWD 1
15654 EOF
15655
15656 fi
15657 if test "$ol_link_spasswd" != no ; then
15658         cat >> confdefs.h <<\EOF
15659 #define SLAPD_SPASSWD 1
15660 EOF
15661
15662 fi
15663 if test "$ol_enable_multimaster" != no ; then
15664         cat >> confdefs.h <<\EOF
15665 #define SLAPD_MULTIMASTER 1
15666 EOF
15667
15668 fi
15669 if test "$ol_enable_phonetic" != no ; then
15670         cat >> confdefs.h <<\EOF
15671 #define SLAPD_PHONETIC 1
15672 EOF
15673
15674 fi
15675 if test "$ol_enable_rlookups" != no ; then
15676         cat >> confdefs.h <<\EOF
15677 #define SLAPD_RLOOKUPS 1
15678 EOF
15679
15680 fi
15681 if test "$ol_enable_aci" != no ; then
15682         cat >> confdefs.h <<\EOF
15683 #define SLAPD_ACI_ENABLED 1
15684 EOF
15685
15686 fi
15687
15688 if test "$ol_link_modules" != no ; then
15689         cat >> confdefs.h <<\EOF
15690 #define SLAPD_MODULES 1
15691 EOF
15692
15693         BUILD_SLAPD=yes
15694         SLAPD_MODULES_LDFLAGS="-dlopen self"
15695 fi
15696
15697 if test "$ol_link_dnssrv" != no ; then
15698         cat >> confdefs.h <<\EOF
15699 #define SLAPD_DNSSRV 1
15700 EOF
15701
15702         BUILD_SLAPD=yes
15703         BUILD_DNSSRV=yes
15704         if test "$ol_with_dnssrv_module" != static ; then
15705                 cat >> confdefs.h <<\EOF
15706 #define SLAPD_DNSSRV_DYNAMIC 1
15707 EOF
15708
15709                 BUILD_DNSSRV=mod
15710                 BUILD_DNSSRV_DYNAMIC=shared
15711                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15712         fi
15713 fi
15714
15715 if test "$ol_enable_ldap" != no ; then
15716         cat >> confdefs.h <<\EOF
15717 #define SLAPD_LDAP 1
15718 EOF
15719
15720         BUILD_SLAPD=yes
15721         BUILD_LDAP=yes
15722         if test "$ol_with_ldap_module" != static ; then
15723                 cat >> confdefs.h <<\EOF
15724 #define SLAPD_LDAP_DYNAMIC 1
15725 EOF
15726
15727                 BUILD_LDAP=mod
15728                 BUILD_LDAP_DYNAMIC=shared
15729                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15730         fi
15731 fi
15732
15733 if test "$ol_link_ldbm" != no ; then
15734         cat >> confdefs.h <<\EOF
15735 #define SLAPD_LDBM 1
15736 EOF
15737
15738         BUILD_SLAPD=yes
15739         BUILD_LDBM=yes
15740         if test "$ol_with_ldbm_module" != static ; then
15741                 cat >> confdefs.h <<\EOF
15742 #define SLAPD_LDBM_DYNAMIC 1
15743 EOF
15744
15745                 BUILD_LDBM=mod
15746                 BUILD_LDBM_DYNAMIC=shared
15747                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15748         fi
15749 fi
15750
15751 if test "$ol_enable_passwd" != no ; then
15752         cat >> confdefs.h <<\EOF
15753 #define SLAPD_PASSWD 1
15754 EOF
15755
15756         BUILD_SLAPD=yes
15757         BUILD_PASSWD=yes
15758         if test "$ol_with_passwd_module" != static ; then
15759                 cat >> confdefs.h <<\EOF
15760 #define SLAPD_PASSWD_DYNAMIC 1
15761 EOF
15762
15763                 BUILD_PASSWD=mod
15764                 BUILD_PASSWD_DYNAMIC=shared
15765                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15766         fi
15767 fi
15768
15769 if test "$ol_enable_shell" != no ; then
15770         cat >> confdefs.h <<\EOF
15771 #define SLAPD_SHELL 1
15772 EOF
15773
15774         BUILD_SLAPD=yes
15775         BUILD_SHELL=yes
15776         if test "$ol_with_shell_module" != static ; then
15777                 cat >> confdefs.h <<\EOF
15778 #define SLAPD_SHELL_DYNAMIC 1
15779 EOF
15780
15781                 BUILD_SHELL=mod
15782                 BUILD_SHELL_DYNAMIC=shared
15783                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15784         fi
15785 fi
15786
15787 if test "$ol_enable_sql" != no ; then
15788         cat >> confdefs.h <<\EOF
15789 #define SLAPD_SQL 1
15790 EOF
15791
15792         BUILD_SLAPD=yes
15793         BUILD_SQL=yes
15794         if test "$ol_with_sql_module" != static; then
15795                 cat >> confdefs.h <<\EOF
15796 #define SLAPD_SQL_DYNAMIC 1
15797 EOF
15798
15799                 BUILD_SQL=mod
15800                 BUILD_SQL_DYNAMIC=shared
15801                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15802         fi
15803 fi
15804
15805 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15806         $BUILD_SLAPD = yes ; then
15807         BUILD_SLURPD=yes
15808 fi
15809
15810
15811 if test "$LINK_BINS_DYNAMIC" = yes; then
15812     LIB_LINKAGE=DYN
15813     LT_LIB_LINKAGE=shared
15814 else
15815     LIB_LINKAGE=STAT
15816     LT_LIB_LINKAGE=static
15817 fi
15818
15819 if test "$ac_cv_mingw32" = yes ; then
15820     PLAT=NT
15821     DYN_EXT=dll
15822 else
15823     PLAT=UNIX
15824     DYN_EXT=so
15825 fi
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835   
15836   
15837   
15838   
15839   
15840   
15841   
15842   
15843   
15844   
15845   
15846   
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877 trap '' 1 2 15
15878
15879 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15880
15881 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15882 # Let make expand exec_prefix.
15883 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15884
15885 # Any assignment to VPATH causes Sun make to only execute
15886 # the first set of double-colon rules, so remove it if not needed.
15887 # If there is a colon in the path, we need to keep it.
15888 if test "x$srcdir" = x.; then
15889   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15890 fi
15891
15892 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15893
15894 DEFS=-DHAVE_CONFIG_H
15895
15896 # Without the "./", some shells look in PATH for config.status.
15897 : ${CONFIG_STATUS=./config.status}
15898
15899 echo creating $CONFIG_STATUS
15900 rm -f $CONFIG_STATUS
15901 cat > $CONFIG_STATUS <<EOF
15902 #! /bin/sh
15903 # Generated automatically by configure.
15904 # Run this file to recreate the current configuration.
15905 # This directory was configured as follows,
15906 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15907 #
15908 # $0 $ac_configure_args
15909 #
15910 # Compiler output produced by configure, useful for debugging
15911 # configure, is in ./config.log if it exists.
15912
15913 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15914 for ac_option
15915 do
15916   case "\$ac_option" in
15917   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15918     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15919     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15920   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15921     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15922     exit 0 ;;
15923   -help | --help | --hel | --he | --h)
15924     echo "\$ac_cs_usage"; exit 0 ;;
15925   *) echo "\$ac_cs_usage"; exit 1 ;;
15926   esac
15927 done
15928
15929 ac_given_srcdir=$srcdir
15930 ac_given_INSTALL="$INSTALL"
15931
15932 trap 'rm -fr `echo "\
15933 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15934 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15935 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15936 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15937 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15938 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15939 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15940 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15941 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15942 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15943 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15944 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15945 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15946 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15947 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15948 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15949 include/Makefile:build/top.mk:include/Makefile.in \
15950 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15951 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15952 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15953 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15954 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15955 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15956 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15957 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15958 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15959 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15960 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15961 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15962 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15963 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15964 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15965 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15966 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15967 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15968 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15969 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15970 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15971 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15972 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15973 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15974  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15975 EOF
15976 cat >> $CONFIG_STATUS <<EOF
15977
15978 # Protect against being on the right side of a sed subst in config.status.
15979 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15980  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15981 $ac_vpsub
15982 $extrasub
15983 s%@SHELL@%$SHELL%g
15984 s%@CFLAGS@%$CFLAGS%g
15985 s%@CPPFLAGS@%$CPPFLAGS%g
15986 s%@CXXFLAGS@%$CXXFLAGS%g
15987 s%@FFLAGS@%$FFLAGS%g
15988 s%@DEFS@%$DEFS%g
15989 s%@LDFLAGS@%$LDFLAGS%g
15990 s%@LIBS@%$LIBS%g
15991 s%@exec_prefix@%$exec_prefix%g
15992 s%@prefix@%$prefix%g
15993 s%@program_transform_name@%$program_transform_name%g
15994 s%@bindir@%$bindir%g
15995 s%@sbindir@%$sbindir%g
15996 s%@libexecdir@%$libexecdir%g
15997 s%@datadir@%$datadir%g
15998 s%@sysconfdir@%$sysconfdir%g
15999 s%@sharedstatedir@%$sharedstatedir%g
16000 s%@localstatedir@%$localstatedir%g
16001 s%@libdir@%$libdir%g
16002 s%@includedir@%$includedir%g
16003 s%@oldincludedir@%$oldincludedir%g
16004 s%@infodir@%$infodir%g
16005 s%@mandir@%$mandir%g
16006 s%@host@%$host%g
16007 s%@host_alias@%$host_alias%g
16008 s%@host_cpu@%$host_cpu%g
16009 s%@host_vendor@%$host_vendor%g
16010 s%@host_os@%$host_os%g
16011 s%@target@%$target%g
16012 s%@target_alias@%$target_alias%g
16013 s%@target_cpu@%$target_cpu%g
16014 s%@target_vendor@%$target_vendor%g
16015 s%@target_os@%$target_os%g
16016 s%@build@%$build%g
16017 s%@build_alias@%$build_alias%g
16018 s%@build_cpu@%$build_cpu%g
16019 s%@build_vendor@%$build_vendor%g
16020 s%@build_os@%$build_os%g
16021 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16022 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16023 s%@INSTALL_DATA@%$INSTALL_DATA%g
16024 s%@PACKAGE@%$PACKAGE%g
16025 s%@VERSION@%$VERSION%g
16026 s%@ACLOCAL@%$ACLOCAL%g
16027 s%@AUTOCONF@%$AUTOCONF%g
16028 s%@AUTOMAKE@%$AUTOMAKE%g
16029 s%@AUTOHEADER@%$AUTOHEADER%g
16030 s%@MAKEINFO@%$MAKEINFO%g
16031 s%@install_sh@%$install_sh%g
16032 s%@AMTAR@%$AMTAR%g
16033 s%@AWK@%$AWK%g
16034 s%@AMTARFLAGS@%$AMTARFLAGS%g
16035 s%@SET_MAKE@%$SET_MAKE%g
16036 s%@top_builddir@%$top_builddir%g
16037 s%@ldap_subdir@%$ldap_subdir%g
16038 s%@CC@%$CC%g
16039 s%@RANLIB@%$RANLIB%g
16040 s%@LN_S@%$LN_S%g
16041 s%@DLLTOOL@%$DLLTOOL%g
16042 s%@AS@%$AS%g
16043 s%@OBJDUMP@%$OBJDUMP%g
16044 s%@LIBTOOL@%$LIBTOOL%g
16045 s%@LN_H@%$LN_H%g
16046 s%@SENDMAIL@%$SENDMAIL%g
16047 s%@EDITOR@%$EDITOR%g
16048 s%@FINGER@%$FINGER%g
16049 s%@CPP@%$CPP%g
16050 s%@EXEEXT@%$EXEEXT%g
16051 s%@OBJEXT@%$OBJEXT%g
16052 s%@OL_MKDEP@%$OL_MKDEP%g
16053 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16054 s%@LIBOBJS@%$LIBOBJS%g
16055 s%@LIBSRCS@%$LIBSRCS%g
16056 s%@PLAT@%$PLAT%g
16057 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16058 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16059 s%@DYN_EXT@%$DYN_EXT%g
16060 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16061 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16062 s%@BUILD_LDAP@%$BUILD_LDAP%g
16063 s%@BUILD_LDBM@%$BUILD_LDBM%g
16064 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16065 s%@BUILD_SHELL@%$BUILD_SHELL%g
16066 s%@BUILD_SQL@%$BUILD_SQL%g
16067 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16068 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16069 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16070 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16071 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16072 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16073 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16074 s%@LDAP_LIBS@%$LDAP_LIBS%g
16075 s%@LDIF_LIBS@%$LDIF_LIBS%g
16076 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16077 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16078 s%@LDBM_LIBS@%$LDBM_LIBS%g
16079 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16080 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16081 s%@WRAP_LIBS@%$WRAP_LIBS%g
16082 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16083 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16084 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16085 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16086 s%@KRB4_LIBS@%$KRB4_LIBS%g
16087 s%@KRB5_LIBS@%$KRB5_LIBS%g
16088 s%@READLINE_LIBS@%$READLINE_LIBS%g
16089 s%@SASL_LIBS@%$SASL_LIBS%g
16090 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16091 s%@TLS_LIBS@%$TLS_LIBS%g
16092 s%@MODULES_LIBS@%$MODULES_LIBS%g
16093 s%@AUTH_LIBS@%$AUTH_LIBS%g
16094 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16095 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16096 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16097
16098 CEOF
16099 EOF
16100
16101 cat >> $CONFIG_STATUS <<\EOF
16102
16103 # Split the substitutions into bite-sized pieces for seds with
16104 # small command number limits, like on Digital OSF/1 and HP-UX.
16105 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16106 ac_file=1 # Number of current file.
16107 ac_beg=1 # First line for current file.
16108 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16109 ac_more_lines=:
16110 ac_sed_cmds=""
16111 while $ac_more_lines; do
16112   if test $ac_beg -gt 1; then
16113     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16114   else
16115     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16116   fi
16117   if test ! -s conftest.s$ac_file; then
16118     ac_more_lines=false
16119     rm -f conftest.s$ac_file
16120   else
16121     if test -z "$ac_sed_cmds"; then
16122       ac_sed_cmds="sed -f conftest.s$ac_file"
16123     else
16124       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16125     fi
16126     ac_file=`expr $ac_file + 1`
16127     ac_beg=$ac_end
16128     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16129   fi
16130 done
16131 if test -z "$ac_sed_cmds"; then
16132   ac_sed_cmds=cat
16133 fi
16134 EOF
16135
16136 cat >> $CONFIG_STATUS <<EOF
16137
16138 CONFIG_FILES=\${CONFIG_FILES-"\
16139 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16140 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16141 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16142 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16143 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16144 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16145 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16146 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16147 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16148 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16149 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16150 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16151 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16152 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16153 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16154 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16155 include/Makefile:build/top.mk:include/Makefile.in \
16156 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16157 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16158 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16159 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16160 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16161 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16162 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16163 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16164 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16165 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16166 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16167 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16168 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16169 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16170 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16171 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16172 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16173 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16174 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16175 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16176 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16177 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16178 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16179 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16180 "}
16181 EOF
16182 cat >> $CONFIG_STATUS <<\EOF
16183 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16184   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16185   case "$ac_file" in
16186   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16187        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16188   *) ac_file_in="${ac_file}.in" ;;
16189   esac
16190
16191   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16192
16193   # Remove last slash and all that follows it.  Not all systems have dirname.
16194   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16195   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16196     # The file is in a subdirectory.
16197     test ! -d "$ac_dir" && mkdir "$ac_dir"
16198     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16199     # A "../" for each directory in $ac_dir_suffix.
16200     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16201   else
16202     ac_dir_suffix= ac_dots=
16203   fi
16204
16205   case "$ac_given_srcdir" in
16206   .)  srcdir=.
16207       if test -z "$ac_dots"; then top_srcdir=.
16208       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16209   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16210   *) # Relative path.
16211     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16212     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16213   esac
16214
16215   case "$ac_given_INSTALL" in
16216   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16217   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16218   esac
16219
16220   echo creating "$ac_file"
16221   rm -f "$ac_file"
16222   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16223   case "$ac_file" in
16224   *[Mm]akefile*) ac_comsub="1i\\
16225 # $configure_input" ;;
16226   *) ac_comsub= ;;
16227   esac
16228
16229   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16230   sed -e "$ac_comsub
16231 s%@configure_input@%$configure_input%g
16232 s%@srcdir@%$srcdir%g
16233 s%@top_srcdir@%$top_srcdir%g
16234 s%@INSTALL@%$INSTALL%g
16235 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16236 fi; done
16237 rm -f conftest.s*
16238
16239 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16240 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16241 #
16242 # ac_d sets the value in "#define NAME VALUE" lines.
16243 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16244 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16245 ac_dC='\3'
16246 ac_dD='%g'
16247 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16248 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16249 ac_uB='\([      ]\)%\1#\2define\3'
16250 ac_uC=' '
16251 ac_uD='\4%g'
16252 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16253 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16254 ac_eB='$%\1#\2define\3'
16255 ac_eC=' '
16256 ac_eD='%g'
16257
16258 if test "${CONFIG_HEADERS+set}" != set; then
16259 EOF
16260 cat >> $CONFIG_STATUS <<EOF
16261   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16262 EOF
16263 cat >> $CONFIG_STATUS <<\EOF
16264 fi
16265 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16266   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16267   case "$ac_file" in
16268   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16269        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16270   *) ac_file_in="${ac_file}.in" ;;
16271   esac
16272
16273   echo creating $ac_file
16274
16275   rm -f conftest.frag conftest.in conftest.out
16276   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16277   cat $ac_file_inputs > conftest.in
16278
16279 EOF
16280
16281 # Transform confdefs.h into a sed script conftest.vals that substitutes
16282 # the proper values into config.h.in to produce config.h.  And first:
16283 # Protect against being on the right side of a sed subst in config.status.
16284 # Protect against being in an unquoted here document in config.status.
16285 rm -f conftest.vals
16286 cat > conftest.hdr <<\EOF
16287 s/[\\&%]/\\&/g
16288 s%[\\$`]%\\&%g
16289 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16290 s%ac_d%ac_u%gp
16291 s%ac_u%ac_e%gp
16292 EOF
16293 sed -n -f conftest.hdr confdefs.h > conftest.vals
16294 rm -f conftest.hdr
16295
16296 # This sed command replaces #undef with comments.  This is necessary, for
16297 # example, in the case of _POSIX_SOURCE, which is predefined and required
16298 # on some systems where configure will not decide to define it.
16299 cat >> conftest.vals <<\EOF
16300 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16301 EOF
16302
16303 # Break up conftest.vals because some shells have a limit on
16304 # the size of here documents, and old seds have small limits too.
16305
16306 rm -f conftest.tail
16307 while :
16308 do
16309   ac_lines=`grep -c . conftest.vals`
16310   # grep -c gives empty output for an empty file on some AIX systems.
16311   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16312   # Write a limited-size here document to conftest.frag.
16313   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16314   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16315   echo 'CEOF
16316   sed -f conftest.frag conftest.in > conftest.out
16317   rm -f conftest.in
16318   mv conftest.out conftest.in
16319 ' >> $CONFIG_STATUS
16320   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16321   rm -f conftest.vals
16322   mv conftest.tail conftest.vals
16323 done
16324 rm -f conftest.vals
16325
16326 cat >> $CONFIG_STATUS <<\EOF
16327   rm -f conftest.frag conftest.h
16328   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16329   cat conftest.in >> conftest.h
16330   rm -f conftest.in
16331   if cmp -s $ac_file conftest.h 2>/dev/null; then
16332     echo "$ac_file is unchanged"
16333     rm -f conftest.h
16334   else
16335     # Remove last slash and all that follows it.  Not all systems have dirname.
16336       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16337       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16338       # The file is in a subdirectory.
16339       test ! -d "$ac_dir" && mkdir "$ac_dir"
16340     fi
16341     rm -f $ac_file
16342     mv conftest.h $ac_file
16343   fi
16344 fi; done
16345
16346 EOF
16347 cat >> $CONFIG_STATUS <<EOF
16348
16349 EOF
16350 cat >> $CONFIG_STATUS <<\EOF
16351
16352 date > stamp-h
16353 echo Please \"make depend\" to build dependencies
16354
16355 exit 0
16356 EOF
16357 chmod +x $CONFIG_STATUS
16358 rm -fr confdefs* $ac_clean_files
16359 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16360