]> git.sur5r.net Git - openldap/blob - configure
Update bufsize handling
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.223.2.22 2001/01/17 01:24:30 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug          enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog         enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle      enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache          enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd      enable kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-phonetic     enable phonetic/soundex (no)"
77 ac_help="$ac_help
78     --enable-rlookups     enable reverse lookups (no)"
79 ac_help="$ac_help
80     --enable-aci          enable per-object ACIs (no)"
81 ac_help="$ac_help
82     --enable-wrappers     enable tcp wrapper support (no)"
83 ac_help="$ac_help
84     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
85 ac_help="$ac_help
86     --enable-dnssrv       enable dnssrv backend (no)"
87 ac_help="$ac_help
88     --with-dnssrv-module  module type (static)"
89 ac_help="$ac_help
90     --enable-ldap         enable ldap backend (no)"
91 ac_help="$ac_help
92     --with-ldap-module    module type (static)"
93 ac_help="$ac_help
94     --enable-ldbm         enable ldbm backend (yes)"
95 ac_help="$ac_help
96     --with-ldbm-api       with LDBM API (auto)"
97 ac_help="$ac_help
98     --with-ldbm-module    module type (static)"
99 ac_help="$ac_help
100     --with-ldbm-type      use LDBM type (auto)"
101 ac_help="$ac_help
102     --enable-passwd       enable passwd backend (no)"
103 ac_help="$ac_help
104     --with-passwd-module  module type (static)"
105 ac_help="$ac_help
106     --enable-shell        enable shell backend (no)"
107 ac_help="$ac_help
108     --with-shell-module   module type (static)"
109 ac_help="$ac_help
110     --enable-sql          enable sql backend (no)"
111 ac_help="$ac_help
112     --with-sql-module     module type (static)"
113 ac_help="$ac_help
114 SLURPD (Replication Daemon) Options:"
115 ac_help="$ac_help
116   --enable-slurpd         enable building slurpd (auto)"
117 ac_help="$ac_help
118 Library Generation & Linking Options"
119 ac_help="$ac_help
120   --enable-static[=PKGS]  build static libraries [default=yes]"
121 ac_help="$ac_help
122   --enable-shared[=PKGS]  build shared libraries [default=yes]"
123 ac_help="$ac_help
124   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
125 ac_help="$ac_help
126   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
127 ac_help="$ac_help
128   --disable-libtool-lock  avoid locking (might break parallel builds)"
129
130 # Initialize some variables set by options.
131 # The variables have the same names as the options, with
132 # dashes changed to underlines.
133 build=NONE
134 cache_file=./config.cache
135 exec_prefix=NONE
136 host=NONE
137 no_create=
138 nonopt=NONE
139 no_recursion=
140 prefix=NONE
141 program_prefix=NONE
142 program_suffix=NONE
143 program_transform_name=s,x,x,
144 silent=
145 site=
146 srcdir=
147 target=NONE
148 verbose=
149 x_includes=NONE
150 x_libraries=NONE
151 bindir='${exec_prefix}/bin'
152 sbindir='${exec_prefix}/sbin'
153 libexecdir='${exec_prefix}/libexec'
154 datadir='${prefix}/share'
155 sysconfdir='${prefix}/etc'
156 sharedstatedir='${prefix}/com'
157 localstatedir='${prefix}/var'
158 libdir='${exec_prefix}/lib'
159 includedir='${prefix}/include'
160 oldincludedir='/usr/include'
161 infodir='${prefix}/info'
162 mandir='${prefix}/man'
163
164 # Initialize some other variables.
165 subdirs=
166 MFLAGS= MAKEFLAGS=
167 SHELL=${CONFIG_SHELL-/bin/sh}
168 # Maximum number of lines to put in a shell here document.
169 ac_max_here_lines=12
170
171 ac_prev=
172 for ac_option
173 do
174
175   # If the previous option needs an argument, assign it.
176   if test -n "$ac_prev"; then
177     eval "$ac_prev=\$ac_option"
178     ac_prev=
179     continue
180   fi
181
182   case "$ac_option" in
183   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
184   *) ac_optarg= ;;
185   esac
186
187   # Accept the important Cygnus configure options, so we can diagnose typos.
188
189   case "$ac_option" in
190
191   -bindir | --bindir | --bindi | --bind | --bin | --bi)
192     ac_prev=bindir ;;
193   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
194     bindir="$ac_optarg" ;;
195
196   -build | --build | --buil | --bui | --bu)
197     ac_prev=build ;;
198   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
199     build="$ac_optarg" ;;
200
201   -cache-file | --cache-file | --cache-fil | --cache-fi \
202   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
203     ac_prev=cache_file ;;
204   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
205   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
206     cache_file="$ac_optarg" ;;
207
208   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
209     ac_prev=datadir ;;
210   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
211   | --da=*)
212     datadir="$ac_optarg" ;;
213
214   -disable-* | --disable-*)
215     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
216     # Reject names that are not valid shell variable names.
217     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
218       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
219     fi
220     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
221     eval "enable_${ac_feature}=no" ;;
222
223   -enable-* | --enable-*)
224     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
225     # Reject names that are not valid shell variable names.
226     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
227       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
228     fi
229     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
230     case "$ac_option" in
231       *=*) ;;
232       *) ac_optarg=yes ;;
233     esac
234     eval "enable_${ac_feature}='$ac_optarg'" ;;
235
236   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
237   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
238   | --exec | --exe | --ex)
239     ac_prev=exec_prefix ;;
240   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
241   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
242   | --exec=* | --exe=* | --ex=*)
243     exec_prefix="$ac_optarg" ;;
244
245   -gas | --gas | --ga | --g)
246     # Obsolete; use --with-gas.
247     with_gas=yes ;;
248
249   -help | --help | --hel | --he)
250     # Omit some internal or obsolete options to make the list less imposing.
251     # This message is too long to be a string in the A/UX 3.1 sh.
252     cat << EOF
253 Usage: configure [options] [host]
254 Options: [defaults in brackets after descriptions]
255 Configuration:
256   --cache-file=FILE       cache test results in FILE
257   --help                  print this message
258   --no-create             do not create output files
259   --quiet, --silent       do not print \`checking...' messages
260   --version               print the version of autoconf that created configure
261 Directory and file names:
262   --prefix=PREFIX         install architecture-independent files in PREFIX
263                           [$ac_default_prefix]
264   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
265                           [same as prefix]
266   --bindir=DIR            user executables in DIR [EPREFIX/bin]
267   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
268   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
269   --datadir=DIR           read-only architecture-independent data in DIR
270                           [PREFIX/share]
271   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
272   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
273                           [PREFIX/com]
274   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
275   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
276   --includedir=DIR        C header files in DIR [PREFIX/include]
277   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
278   --infodir=DIR           info documentation in DIR [PREFIX/info]
279   --mandir=DIR            man documentation in DIR [PREFIX/man]
280   --srcdir=DIR            find the sources in DIR [configure dir or ..]
281   --program-prefix=PREFIX prepend PREFIX to installed program names
282   --program-suffix=SUFFIX append SUFFIX to installed program names
283   --program-transform-name=PROGRAM
284                           run sed PROGRAM on installed program names
285 EOF
286     cat << EOF
287 Host type:
288   --build=BUILD           configure for building on BUILD [BUILD=HOST]
289   --host=HOST             configure for HOST [guessed]
290   --target=TARGET         configure for TARGET [TARGET=HOST]
291 Features and packages:
292   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
293   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
294   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
295   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
296   --x-includes=DIR        X include files are in DIR
297   --x-libraries=DIR       X library files are in DIR
298 EOF
299     if test -n "$ac_help"; then
300       echo "--enable and --with options recognized:$ac_help"
301     fi
302     exit 0 ;;
303
304   -host | --host | --hos | --ho)
305     ac_prev=host ;;
306   -host=* | --host=* | --hos=* | --ho=*)
307     host="$ac_optarg" ;;
308
309   -includedir | --includedir | --includedi | --included | --include \
310   | --includ | --inclu | --incl | --inc)
311     ac_prev=includedir ;;
312   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
313   | --includ=* | --inclu=* | --incl=* | --inc=*)
314     includedir="$ac_optarg" ;;
315
316   -infodir | --infodir | --infodi | --infod | --info | --inf)
317     ac_prev=infodir ;;
318   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
319     infodir="$ac_optarg" ;;
320
321   -libdir | --libdir | --libdi | --libd)
322     ac_prev=libdir ;;
323   -libdir=* | --libdir=* | --libdi=* | --libd=*)
324     libdir="$ac_optarg" ;;
325
326   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
327   | --libexe | --libex | --libe)
328     ac_prev=libexecdir ;;
329   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
330   | --libexe=* | --libex=* | --libe=*)
331     libexecdir="$ac_optarg" ;;
332
333   -localstatedir | --localstatedir | --localstatedi | --localstated \
334   | --localstate | --localstat | --localsta | --localst \
335   | --locals | --local | --loca | --loc | --lo)
336     ac_prev=localstatedir ;;
337   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
338   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
339   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
340     localstatedir="$ac_optarg" ;;
341
342   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
343     ac_prev=mandir ;;
344   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
345     mandir="$ac_optarg" ;;
346
347   -nfp | --nfp | --nf)
348     # Obsolete; use --without-fp.
349     with_fp=no ;;
350
351   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
352   | --no-cr | --no-c)
353     no_create=yes ;;
354
355   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
356   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
357     no_recursion=yes ;;
358
359   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
360   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
361   | --oldin | --oldi | --old | --ol | --o)
362     ac_prev=oldincludedir ;;
363   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
364   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
365   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
366     oldincludedir="$ac_optarg" ;;
367
368   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
369     ac_prev=prefix ;;
370   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
371     prefix="$ac_optarg" ;;
372
373   -program-prefix | --program-prefix | --program-prefi | --program-pref \
374   | --program-pre | --program-pr | --program-p)
375     ac_prev=program_prefix ;;
376   -program-prefix=* | --program-prefix=* | --program-prefi=* \
377   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
378     program_prefix="$ac_optarg" ;;
379
380   -program-suffix | --program-suffix | --program-suffi | --program-suff \
381   | --program-suf | --program-su | --program-s)
382     ac_prev=program_suffix ;;
383   -program-suffix=* | --program-suffix=* | --program-suffi=* \
384   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
385     program_suffix="$ac_optarg" ;;
386
387   -program-transform-name | --program-transform-name \
388   | --program-transform-nam | --program-transform-na \
389   | --program-transform-n | --program-transform- \
390   | --program-transform | --program-transfor \
391   | --program-transfo | --program-transf \
392   | --program-trans | --program-tran \
393   | --progr-tra | --program-tr | --program-t)
394     ac_prev=program_transform_name ;;
395   -program-transform-name=* | --program-transform-name=* \
396   | --program-transform-nam=* | --program-transform-na=* \
397   | --program-transform-n=* | --program-transform-=* \
398   | --program-transform=* | --program-transfor=* \
399   | --program-transfo=* | --program-transf=* \
400   | --program-trans=* | --program-tran=* \
401   | --progr-tra=* | --program-tr=* | --program-t=*)
402     program_transform_name="$ac_optarg" ;;
403
404   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
405   | -silent | --silent | --silen | --sile | --sil)
406     silent=yes ;;
407
408   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
409     ac_prev=sbindir ;;
410   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
411   | --sbi=* | --sb=*)
412     sbindir="$ac_optarg" ;;
413
414   -sharedstatedir | --sharedstatedir | --sharedstatedi \
415   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
416   | --sharedst | --shareds | --shared | --share | --shar \
417   | --sha | --sh)
418     ac_prev=sharedstatedir ;;
419   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
420   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
421   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
422   | --sha=* | --sh=*)
423     sharedstatedir="$ac_optarg" ;;
424
425   -site | --site | --sit)
426     ac_prev=site ;;
427   -site=* | --site=* | --sit=*)
428     site="$ac_optarg" ;;
429
430   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
431     ac_prev=srcdir ;;
432   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
433     srcdir="$ac_optarg" ;;
434
435   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
436   | --syscon | --sysco | --sysc | --sys | --sy)
437     ac_prev=sysconfdir ;;
438   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
439   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
440     sysconfdir="$ac_optarg" ;;
441
442   -target | --target | --targe | --targ | --tar | --ta | --t)
443     ac_prev=target ;;
444   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
445     target="$ac_optarg" ;;
446
447   -v | -verbose | --verbose | --verbos | --verbo | --verb)
448     verbose=yes ;;
449
450   -version | --version | --versio | --versi | --vers)
451     echo "configure generated by autoconf version 2.13.1"
452     exit 0 ;;
453
454   -with-* | --with-*)
455     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
456     # Reject names that are not valid shell variable names.
457     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
458       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
459     fi
460     ac_package=`echo $ac_package| sed 's/-/_/g'`
461     case "$ac_option" in
462       *=*) ;;
463       *) ac_optarg=yes ;;
464     esac
465     eval "with_${ac_package}='$ac_optarg'" ;;
466
467   -without-* | --without-*)
468     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
469     # Reject names that are not valid shell variable names.
470     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
471       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
472     fi
473     ac_package=`echo $ac_package| sed 's/-/_/g'`
474     eval "with_${ac_package}=no" ;;
475
476   --x)
477     # Obsolete; use --with-x.
478     with_x=yes ;;
479
480   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
481   | --x-incl | --x-inc | --x-in | --x-i)
482     ac_prev=x_includes ;;
483   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
484   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
485     x_includes="$ac_optarg" ;;
486
487   -x-libraries | --x-libraries | --x-librarie | --x-librari \
488   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
489     ac_prev=x_libraries ;;
490   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
491   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
492     x_libraries="$ac_optarg" ;;
493
494   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
495     ;;
496
497   *)
498     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
499       echo "configure: warning: $ac_option: invalid host type" 1>&2
500     fi
501     if test "x$nonopt" != xNONE; then
502       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
503     fi
504     nonopt="$ac_option"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
512 fi
513
514 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
515
516 # File descriptor usage:
517 # 0 standard input
518 # 1 file creation
519 # 2 errors and warnings
520 # 3 some systems may open it to /dev/tty
521 # 4 used on the Kubota Titan
522 # 6 checking for... messages and results
523 # 5 compiler messages saved in config.log
524 if test "$silent" = yes; then
525   exec 6>/dev/null
526 else
527   exec 6>&1
528 fi
529 exec 5>./config.log
530
531 echo "\
532 This file contains any messages produced by compilers while
533 running configure, to aid debugging if configure makes a mistake.
534 " 1>&5
535
536 # Strip out --no-create and --no-recursion so they do not pile up.
537 # Also quote any args containing shell metacharacters.
538 ac_configure_args=
539 for ac_arg
540 do
541   case "$ac_arg" in
542   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
543   | --no-cr | --no-c) ;;
544   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
545   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
546   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
547   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
548   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
549   esac
550 done
551
552 # NLS nuisances.
553 # Only set these to C if already set.  These must not be set unconditionally
554 # because not all systems understand e.g. LANG=C (notably SCO).
555 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
556 # Non-C LC_CTYPE values break the ctype check.
557 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
558 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
559 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
560 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
561
562 # confdefs.h avoids OS command line length limits that DEFS can exceed.
563 rm -rf conftest* confdefs.h
564 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
565 echo > confdefs.h
566
567 # A filename unique to this package, relative to the directory that
568 # configure is in, which we can look for to find out if srcdir is correct.
569 ac_unique_file=build/version
570
571 # Find the source files, if location was not specified.
572 if test -z "$srcdir"; then
573   ac_srcdir_defaulted=yes
574   # Try the directory containing this script, then its parent.
575   ac_prog=$0
576   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
577   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
578   srcdir=$ac_confdir
579   if test ! -r $srcdir/$ac_unique_file; then
580     srcdir=..
581   fi
582 else
583   ac_srcdir_defaulted=no
584 fi
585 if test ! -r $srcdir/$ac_unique_file; then
586   if test "$ac_srcdir_defaulted" = yes; then
587     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
588   else
589     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
590   fi
591 fi
592 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
593
594 # Prefer explicitly selected file to automatically selected ones.
595 if test -z "$CONFIG_SITE"; then
596   if test "x$prefix" != xNONE; then
597     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
598   else
599     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
600   fi
601 fi
602 for ac_site_file in $CONFIG_SITE; do
603   if test -r "$ac_site_file"; then
604     echo "loading site script $ac_site_file"
605     . "$ac_site_file"
606   fi
607 done
608
609
610 ac_ext=c
611 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
612 ac_cpp='$CPP $CPPFLAGS'
613 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
614 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
615 cross_compiling=$ac_cv_prog_cc_cross
616
617 ac_exeext=
618 ac_objext=o
619 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
620   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
621   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
622     ac_n= ac_c='
623 ' ac_t='        '
624   else
625     ac_n=-n ac_c= ac_t=
626   fi
627 else
628   ac_n= ac_c='\c' ac_t=
629 fi
630
631
632 # set unset (borrowed from autoconf 2.49c)
633 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
634   ol_unset=unset
635 else
636   ol_unset=false
637 fi
638 # unset CDPATH
639 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
640
641 ac_aux_dir=
642 for ac_dir in build $srcdir/build; do
643   if test -f $ac_dir/install-sh; then
644     ac_aux_dir=$ac_dir
645     ac_install_sh="$ac_aux_dir/install-sh -c"
646     break
647   elif test -f $ac_dir/install.sh; then
648     ac_aux_dir=$ac_dir
649     ac_install_sh="$ac_aux_dir/install.sh -c"
650     break
651   elif test -f $ac_dir/shtool; then
652     ac_aux_dir=$ac_dir
653     ac_install_sh="$ac_aux_dir/shtool install -c"
654     break
655   fi
656 done
657 if test -z "$ac_aux_dir"; then
658   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
659 fi
660 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
661 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
662 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
663
664 OL_VERSION=`cat $ac_aux_dir/version`
665 if test -z "$OL_VERSION"; then
666         { echo "configure: error: could not determine version" 1>&2; exit 1; }
667 fi
668
669 echo "Configuring OpenLDAP $OL_VERSION ..."
670
671
672 echo $ac_n "checking host system type""... $ac_c" 1>&6
673 echo "configure:674: checking host system type" >&5
674 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
675
676 # Make sure we can run config.sub.
677   if $ac_config_sub sun4 >/dev/null 2>&1; then :
678     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
679   fi
680
681   ac_cv_host_alias=$host
682   case "$ac_cv_host_alias" in
683   NONE)
684     case $nonopt in
685     NONE)
686       if ac_cv_host_alias=`$ac_config_guess`; then :
687       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
688       fi ;;
689     *) ac_cv_host_alias=$nonopt ;;
690     esac ;;
691   esac
692
693   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
694   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
695   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
696   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
697 else
698   echo $ac_n "(cached) $ac_c" 1>&6
699 fi
700
701 echo "$ac_t""$ac_cv_host" 1>&6
702
703 host=$ac_cv_host
704 host_alias=$ac_cv_host_alias
705 host_cpu=$ac_cv_host_cpu
706 host_vendor=$ac_cv_host_vendor
707 host_os=$ac_cv_host_os
708
709
710
711
712
713 echo $ac_n "checking target system type""... $ac_c" 1>&6
714 echo "configure:715: checking target system type" >&5
715 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
716
717 # Make sure we can run config.sub.
718   if $ac_config_sub sun4 >/dev/null 2>&1; then :
719     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
720   fi
721
722   ac_cv_target_alias=$target
723   case "$ac_cv_target_alias" in
724   NONE)
725     case $nonopt in
726     NONE)
727       ac_cv_target_alias=$host_alias ;;
728
729     *) ac_cv_target_alias=$nonopt ;;
730     esac ;;
731   esac
732
733   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
734   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
735   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
736   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
737 else
738   echo $ac_n "(cached) $ac_c" 1>&6
739 fi
740
741 echo "$ac_t""$ac_cv_target" 1>&6
742
743 target=$ac_cv_target
744 target_alias=$ac_cv_target_alias
745 target_cpu=$ac_cv_target_cpu
746 target_vendor=$ac_cv_target_vendor
747 target_os=$ac_cv_target_os
748
749
750
751
752
753 echo $ac_n "checking build system type""... $ac_c" 1>&6
754 echo "configure:755: checking build system type" >&5
755 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
756
757 # Make sure we can run config.sub.
758   if $ac_config_sub sun4 >/dev/null 2>&1; then :
759     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
760   fi
761
762   ac_cv_build_alias=$build
763   case "$ac_cv_build_alias" in
764   NONE)
765     case $nonopt in
766     NONE)
767       ac_cv_build_alias=$host_alias ;;
768
769     *) ac_cv_build_alias=$nonopt ;;
770     esac ;;
771   esac
772
773   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
774   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
775   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
776   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
777 else
778   echo $ac_n "(cached) $ac_c" 1>&6
779 fi
780
781 echo "$ac_t""$ac_cv_build" 1>&6
782
783 build=$ac_cv_build
784 build_alias=$ac_cv_build_alias
785 build_cpu=$ac_cv_build_cpu
786 build_vendor=$ac_cv_build_vendor
787 build_os=$ac_cv_build_os
788
789
790
791
792
793 # Do some error checking and defaulting for the host and target type.
794 # The inputs are:
795 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
796 #
797 # The rules are:
798 # 1. You are not allowed to specify --host, --target, and nonopt at the
799 #    same time.
800 # 2. Host defaults to nonopt.
801 # 3. If nonopt is not specified, then host defaults to the current host,
802 #    as determined by config.guess.
803 # 4. Target and build default to nonopt.
804 # 5. If nonopt is not specified, then target and build default to host.
805
806 # The aliases save the names the user supplied, while $host etc.
807 # will get canonicalized.
808 case $host---$target---$nonopt in
809 NONE---*---* | *---NONE---* | *---*---NONE) ;;
810 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
811 esac
812
813 test "$host_alias" != "$target_alias" &&
814   test "$program_prefix$program_suffix$program_transform_name" = \
815     NONENONEs,x,x, &&
816   program_prefix=${target_alias}-
817
818
819 # Find a good install program.  We prefer a C program (faster),
820 # so one script is as good as another.  But avoid the broken or
821 # incompatible versions:
822 # SysV /etc/install, /usr/sbin/install
823 # SunOS /usr/etc/install
824 # IRIX /sbin/install
825 # AIX /bin/install
826 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
827 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
828 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
829 # ./install, which can be erroneously created by make from ./install.sh.
830 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
831 echo "configure:832: checking for a BSD compatible install" >&5
832 if test -z "$INSTALL"; then
833 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
834   echo $ac_n "(cached) $ac_c" 1>&6
835 else
836     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
837   for ac_dir in $PATH; do
838     # Account for people who put trailing slashes in PATH elements.
839     case "$ac_dir/" in
840     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
841     *)
842       # OSF1 and SCO ODT 3.0 have their own names for install.
843       # Don't use installbsd from OSF since it installs stuff as root
844       # by default.
845       for ac_prog in ginstall scoinst install; do
846         if test -f $ac_dir/$ac_prog; then
847           if test $ac_prog = install &&
848             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
849             # AIX install.  It has an incompatible calling convention.
850             :
851           elif test $ac_prog = install &&
852             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
853             # program-specific install script used by HP pwplus--don't use.
854             :
855           else
856             ac_cv_path_install="$ac_dir/$ac_prog -c"
857             break 2
858           fi
859         fi
860       done
861       ;;
862     esac
863   done
864   IFS="$ac_save_IFS"
865
866 fi
867   if test "${ac_cv_path_install+set}" = set; then
868     INSTALL="$ac_cv_path_install"
869   else
870     # As a last resort, use the slow shell script.  We don't cache a
871     # path for INSTALL within a source directory, because that will
872     # break other packages using the cache if that directory is
873     # removed, or if the path is relative.
874     INSTALL="$ac_install_sh"
875   fi
876 fi
877 echo "$ac_t""$INSTALL" 1>&6
878
879 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
880 # It thinks the first close brace ends the variable substitution.
881 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
882
883 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
884
885 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
886
887 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
888 echo "configure:889: checking whether build environment is sane" >&5
889 # Just in case
890 sleep 1
891 echo timestamp > conftestfile
892 # Do `set' in a subshell so we don't clobber the current shell's
893 # arguments.  Must try -L first in case configure is actually a
894 # symlink; some systems play weird games with the mod time of symlinks
895 # (eg FreeBSD returns the mod time of the symlink's containing
896 # directory).
897 if (
898    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
899    if test "$*" = "X"; then
900       # -L didn't work.
901       set X `ls -t $srcdir/configure conftestfile`
902    fi
903    if test "$*" != "X $srcdir/configure conftestfile" \
904       && test "$*" != "X conftestfile $srcdir/configure"; then
905
906       # If neither matched, then we have a broken ls.  This can happen
907       # if, for instance, CONFIG_SHELL is bash and it inherits a
908       # broken ls alias from the environment.  This has actually
909       # happened.  Such a system could not be considered "sane".
910       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
911 alias in your environment" 1>&2; exit 1; }
912    fi
913
914    test "$2" = conftestfile
915    )
916 then
917    # Ok.
918    :
919 else
920    { echo "configure: error: newly created file is older than distributed files!
921 Check your system clock" 1>&2; exit 1; }
922 fi
923 rm -f conftest*
924 echo "$ac_t""yes" 1>&6
925 if test "$program_transform_name" = s,x,x,; then
926   program_transform_name=
927 else
928   # Double any \ or $.  echo might interpret backslashes.
929   cat <<\EOF_SED > conftestsed
930 s,\\,\\\\,g; s,\$,$$,g
931 EOF_SED
932   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
933   rm -f conftestsed
934 fi
935 test "$program_prefix" != NONE &&
936   program_transform_name="s,^,${program_prefix},;$program_transform_name"
937 # Use a double $ so make ignores it.
938 test "$program_suffix" != NONE &&
939   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
940
941 # sed with no file args requires a program.
942 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
943
944 for ac_prog in mawk gawk nawk awk
945 do
946 # Extract the first word of "$ac_prog", so it can be a program name with args.
947 set dummy $ac_prog; ac_word=$2
948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
949 echo "configure:950: checking for $ac_word" >&5
950 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
951   echo $ac_n "(cached) $ac_c" 1>&6
952 else
953   if test -n "$AWK"; then
954   ac_cv_prog_AWK="$AWK" # Let the user override the test.
955 else
956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
957   ac_dummy="$PATH"
958   for ac_dir in $ac_dummy; do
959     test -z "$ac_dir" && ac_dir=.
960     if test -f $ac_dir/$ac_word; then
961       ac_cv_prog_AWK="$ac_prog"
962       break
963     fi
964   done
965   IFS="$ac_save_ifs"
966 fi
967 fi
968 AWK="$ac_cv_prog_AWK"
969 if test -n "$AWK"; then
970   echo "$ac_t""$AWK" 1>&6
971 else
972   echo "$ac_t""no" 1>&6
973 fi
974
975 test -n "$AWK" && break
976 done
977
978 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
979 echo "configure:980: checking whether ${MAKE-make} sets \${MAKE}" >&5
980 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
981 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
982   echo $ac_n "(cached) $ac_c" 1>&6
983 else
984   cat > conftestmake <<\EOF
985 all:
986         @echo 'ac_maketemp="${MAKE}"'
987 EOF
988 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
989 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
990 if test -n "$ac_maketemp"; then
991   eval ac_cv_prog_make_${ac_make}_set=yes
992 else
993   eval ac_cv_prog_make_${ac_make}_set=no
994 fi
995 rm -f conftestmake
996 fi
997 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
998   echo "$ac_t""yes" 1>&6
999   SET_MAKE=
1000 else
1001   echo "$ac_t""no" 1>&6
1002   SET_MAKE="MAKE=${MAKE-make}"
1003 fi
1004
1005
1006
1007 PACKAGE=OpenLDAP
1008
1009 VERSION=$OL_VERSION
1010
1011 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1012   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1013 fi
1014
1015
1016
1017 missing_dir=`cd $ac_aux_dir && pwd`
1018 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1019 echo "configure:1020: checking for working aclocal" >&5
1020 # Run test in a subshell; some versions of sh will print an error if
1021 # an executable is not found, even if stderr is redirected.
1022 # Redirect stdin to placate older versions of autoconf.  Sigh.
1023 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1024    ACLOCAL=aclocal
1025    echo "$ac_t""found" 1>&6
1026 else
1027    ACLOCAL="$missing_dir/missing aclocal"
1028    echo "$ac_t""missing" 1>&6
1029 fi
1030
1031 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1032 echo "configure:1033: checking for working autoconf" >&5
1033 # Run test in a subshell; some versions of sh will print an error if
1034 # an executable is not found, even if stderr is redirected.
1035 # Redirect stdin to placate older versions of autoconf.  Sigh.
1036 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1037    AUTOCONF=autoconf
1038    echo "$ac_t""found" 1>&6
1039 else
1040    AUTOCONF="$missing_dir/missing autoconf"
1041    echo "$ac_t""missing" 1>&6
1042 fi
1043
1044 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1045 echo "configure:1046: checking for working automake" >&5
1046 # Run test in a subshell; some versions of sh will print an error if
1047 # an executable is not found, even if stderr is redirected.
1048 # Redirect stdin to placate older versions of autoconf.  Sigh.
1049 if (automake --version) < /dev/null > /dev/null 2>&1; then
1050    AUTOMAKE=automake
1051    echo "$ac_t""found" 1>&6
1052 else
1053    AUTOMAKE="$missing_dir/missing automake"
1054    echo "$ac_t""missing" 1>&6
1055 fi
1056
1057 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1058 echo "configure:1059: checking for working autoheader" >&5
1059 # Run test in a subshell; some versions of sh will print an error if
1060 # an executable is not found, even if stderr is redirected.
1061 # Redirect stdin to placate older versions of autoconf.  Sigh.
1062 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1063    AUTOHEADER=autoheader
1064    echo "$ac_t""found" 1>&6
1065 else
1066    AUTOHEADER="$missing_dir/missing autoheader"
1067    echo "$ac_t""missing" 1>&6
1068 fi
1069
1070 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1071 echo "configure:1072: checking for working makeinfo" >&5
1072 # Run test in a subshell; some versions of sh will print an error if
1073 # an executable is not found, even if stderr is redirected.
1074 # Redirect stdin to placate older versions of autoconf.  Sigh.
1075 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1076    MAKEINFO=makeinfo
1077    echo "$ac_t""found" 1>&6
1078 else
1079    MAKEINFO="$missing_dir/missing makeinfo"
1080    echo "$ac_t""missing" 1>&6
1081 fi
1082
1083 install_sh="$missing_dir/install-sh"
1084 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1085
1086 for ac_prog in gnutar gtar tar
1087 do
1088 # Extract the first word of "$ac_prog", so it can be a program name with args.
1089 set dummy $ac_prog; ac_word=$2
1090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1091 echo "configure:1092: checking for $ac_word" >&5
1092 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1093   echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095   if test -n "$AMTAR"; then
1096   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1097 else
1098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1099   ac_dummy="$PATH"
1100   for ac_dir in $ac_dummy; do
1101     test -z "$ac_dir" && ac_dir=.
1102     if test -f $ac_dir/$ac_word; then
1103       ac_cv_prog_AMTAR="$ac_prog"
1104       break
1105     fi
1106   done
1107   IFS="$ac_save_ifs"
1108 fi
1109 fi
1110 AMTAR="$ac_cv_prog_AMTAR"
1111 if test -n "$AMTAR"; then
1112   echo "$ac_t""$AMTAR" 1>&6
1113 else
1114   echo "$ac_t""no" 1>&6
1115 fi
1116
1117 test -n "$AMTAR" && break
1118 done
1119
1120
1121 AMTARFLAGS=
1122 if test -n "$AMTAR"; then
1123   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1124         AMTARFLAGS=o
1125   fi
1126 fi
1127
1128 cat >> confdefs.h <<EOF
1129 #define OPENLDAP_PACKAGE "$PACKAGE"
1130 EOF
1131
1132 cat >> confdefs.h <<EOF
1133 #define OPENLDAP_VERSION "$VERSION"
1134 EOF
1135
1136
1137
1138
1139 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1140 echo "configure:1141: checking configure arguments" >&5
1141
1142
1143 top_builddir=`pwd`
1144
1145 ldap_subdir="/openldap"
1146
1147 # Check whether --with-subdir or --without-subdir was given.
1148 if test "${with_subdir+set}" = set; then
1149   withval="$with_subdir"
1150   case "$withval" in
1151         no) ldap_subdir=""
1152                 ;;
1153         yes)
1154                 ;;
1155         /*|\\*)
1156                 ldap_subdir="$withval"
1157                 ;;
1158         *)
1159                 ldap_subdir="/$withval"
1160                 ;;
1161 esac
1162
1163 fi
1164
1165
1166 # OpenLDAP --enable-debug
1167         # Check whether --enable-debug or --disable-debug was given.
1168 if test "${enable_debug+set}" = set; then
1169   enableval="$enable_debug"
1170   
1171         ol_arg=invalid
1172         for ol_val in auto yes no ; do
1173                 if test "$enableval" = "$ol_val" ; then
1174                         ol_arg="$ol_val"
1175                 fi
1176         done
1177         if test "$ol_arg" = "invalid" ; then
1178                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1179         fi
1180         ol_enable_debug="$ol_arg"
1181
1182 else
1183         ol_enable_debug="yes"
1184 fi
1185 # end --enable-debug
1186 # OpenLDAP --enable-syslog
1187         # Check whether --enable-syslog or --disable-syslog was given.
1188 if test "${enable_syslog+set}" = set; then
1189   enableval="$enable_syslog"
1190   
1191         ol_arg=invalid
1192         for ol_val in auto yes no ; do
1193                 if test "$enableval" = "$ol_val" ; then
1194                         ol_arg="$ol_val"
1195                 fi
1196         done
1197         if test "$ol_arg" = "invalid" ; then
1198                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1199         fi
1200         ol_enable_syslog="$ol_arg"
1201
1202 else
1203         ol_enable_syslog="auto"
1204 fi
1205 # end --enable-syslog
1206 # OpenLDAP --enable-proctitle
1207         # Check whether --enable-proctitle or --disable-proctitle was given.
1208 if test "${enable_proctitle+set}" = set; then
1209   enableval="$enable_proctitle"
1210   
1211         ol_arg=invalid
1212         for ol_val in auto yes no ; do
1213                 if test "$enableval" = "$ol_val" ; then
1214                         ol_arg="$ol_val"
1215                 fi
1216         done
1217         if test "$ol_arg" = "invalid" ; then
1218                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1219         fi
1220         ol_enable_proctitle="$ol_arg"
1221
1222 else
1223         ol_enable_proctitle="yes"
1224 fi
1225 # end --enable-proctitle
1226 # OpenLDAP --enable-cache
1227         # Check whether --enable-cache or --disable-cache was given.
1228 if test "${enable_cache+set}" = set; then
1229   enableval="$enable_cache"
1230   
1231         ol_arg=invalid
1232         for ol_val in auto yes no ; do
1233                 if test "$enableval" = "$ol_val" ; then
1234                         ol_arg="$ol_val"
1235                 fi
1236         done
1237         if test "$ol_arg" = "invalid" ; then
1238                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1239         fi
1240         ol_enable_cache="$ol_arg"
1241
1242 else
1243         ol_enable_cache="yes"
1244 fi
1245 # end --enable-cache
1246 # OpenLDAP --enable-referrals
1247         # Check whether --enable-referrals or --disable-referrals was given.
1248 if test "${enable_referrals+set}" = set; then
1249   enableval="$enable_referrals"
1250   
1251         ol_arg=invalid
1252         for ol_val in auto yes no ; do
1253                 if test "$enableval" = "$ol_val" ; then
1254                         ol_arg="$ol_val"
1255                 fi
1256         done
1257         if test "$ol_arg" = "invalid" ; then
1258                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1259         fi
1260         ol_enable_referrals="$ol_arg"
1261
1262 else
1263         ol_enable_referrals="yes"
1264 fi
1265 # end --enable-referrals
1266 # OpenLDAP --enable-kbind
1267         # Check whether --enable-kbind or --disable-kbind was given.
1268 if test "${enable_kbind+set}" = set; then
1269   enableval="$enable_kbind"
1270   
1271         ol_arg=invalid
1272         for ol_val in auto yes no ; do
1273                 if test "$enableval" = "$ol_val" ; then
1274                         ol_arg="$ol_val"
1275                 fi
1276         done
1277         if test "$ol_arg" = "invalid" ; then
1278                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1279         fi
1280         ol_enable_kbind="$ol_arg"
1281
1282 else
1283         ol_enable_kbind="no"
1284 fi
1285 # end --enable-kbind
1286 # OpenLDAP --enable-ipv6
1287         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1288 if test "${enable_ipv6+set}" = set; then
1289   enableval="$enable_ipv6"
1290   
1291         ol_arg=invalid
1292         for ol_val in auto yes no ; do
1293                 if test "$enableval" = "$ol_val" ; then
1294                         ol_arg="$ol_val"
1295                 fi
1296         done
1297         if test "$ol_arg" = "invalid" ; then
1298                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1299         fi
1300         ol_enable_ipv6="$ol_arg"
1301
1302 else
1303         ol_enable_ipv6="auto"
1304 fi
1305 # end --enable-ipv6
1306 # OpenLDAP --enable-local
1307         # Check whether --enable-local or --disable-local was given.
1308 if test "${enable_local+set}" = set; then
1309   enableval="$enable_local"
1310   
1311         ol_arg=invalid
1312         for ol_val in auto yes no ; do
1313                 if test "$enableval" = "$ol_val" ; then
1314                         ol_arg="$ol_val"
1315                 fi
1316         done
1317         if test "$ol_arg" = "invalid" ; then
1318                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1319         fi
1320         ol_enable_local="$ol_arg"
1321
1322 else
1323         ol_enable_local="auto"
1324 fi
1325 # end --enable-local
1326 # OpenLDAP --enable-x_compile
1327         # Check whether --enable-x_compile or --disable-x_compile was given.
1328 if test "${enable_x_compile+set}" = set; then
1329   enableval="$enable_x_compile"
1330   
1331         ol_arg=invalid
1332         for ol_val in yes no ; do
1333                 if test "$enableval" = "$ol_val" ; then
1334                         ol_arg="$ol_val"
1335                 fi
1336         done
1337         if test "$ol_arg" = "invalid" ; then
1338                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1339         fi
1340         ol_enable_x_compile="$ol_arg"
1341
1342 else
1343         ol_enable_x_compile="no"
1344 fi
1345 # end --enable-x_compile
1346
1347
1348 # OpenLDAP --with-cyrus_sasl
1349         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1350 if test "${with_cyrus_sasl+set}" = set; then
1351   withval="$with_cyrus_sasl"
1352   
1353         ol_arg=invalid
1354         for ol_val in auto yes no  ; do
1355                 if test "$withval" = "$ol_val" ; then
1356                         ol_arg="$ol_val"
1357                 fi
1358         done
1359         if test "$ol_arg" = "invalid" ; then
1360                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1361         fi
1362         ol_with_cyrus_sasl="$ol_arg"
1363
1364 else
1365         ol_with_cyrus_sasl="auto"
1366 fi
1367 # end --with-cyrus_sasl
1368
1369 # OpenLDAP --with-fetch
1370         # Check whether --with-fetch or --without-fetch was given.
1371 if test "${with_fetch+set}" = set; then
1372   withval="$with_fetch"
1373   
1374         ol_arg=invalid
1375         for ol_val in auto yes no  ; do
1376                 if test "$withval" = "$ol_val" ; then
1377                         ol_arg="$ol_val"
1378                 fi
1379         done
1380         if test "$ol_arg" = "invalid" ; then
1381                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1382         fi
1383         ol_with_fetch="$ol_arg"
1384
1385 else
1386         ol_with_fetch="auto"
1387 fi
1388 # end --with-fetch
1389
1390 # OpenLDAP --with-kerberos
1391         # Check whether --with-kerberos or --without-kerberos was given.
1392 if test "${with_kerberos+set}" = set; then
1393   withval="$with_kerberos"
1394   
1395         ol_arg=invalid
1396         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1397                 if test "$withval" = "$ol_val" ; then
1398                         ol_arg="$ol_val"
1399                 fi
1400         done
1401         if test "$ol_arg" = "invalid" ; then
1402                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1403         fi
1404         ol_with_kerberos="$ol_arg"
1405
1406 else
1407         ol_with_kerberos="auto"
1408 fi
1409 # end --with-kerberos
1410
1411 # OpenLDAP --with-readline
1412         # Check whether --with-readline or --without-readline was given.
1413 if test "${with_readline+set}" = set; then
1414   withval="$with_readline"
1415   
1416         ol_arg=invalid
1417         for ol_val in auto yes no  ; do
1418                 if test "$withval" = "$ol_val" ; then
1419                         ol_arg="$ol_val"
1420                 fi
1421         done
1422         if test "$ol_arg" = "invalid" ; then
1423                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1424         fi
1425         ol_with_readline="$ol_arg"
1426
1427 else
1428         ol_with_readline="auto"
1429 fi
1430 # end --with-readline
1431
1432 # OpenLDAP --with-threads
1433         # Check whether --with-threads or --without-threads was given.
1434 if test "${with_threads+set}" = set; then
1435   withval="$with_threads"
1436   
1437         ol_arg=invalid
1438         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1439                 if test "$withval" = "$ol_val" ; then
1440                         ol_arg="$ol_val"
1441                 fi
1442         done
1443         if test "$ol_arg" = "invalid" ; then
1444                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1445         fi
1446         ol_with_threads="$ol_arg"
1447
1448 else
1449         ol_with_threads="auto"
1450 fi
1451 # end --with-threads
1452
1453 # OpenLDAP --with-tls
1454         # Check whether --with-tls or --without-tls was given.
1455 if test "${with_tls+set}" = set; then
1456   withval="$with_tls"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto ssleay openssl yes no  ; do
1460                 if test "$withval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1466         fi
1467         ol_with_tls="$ol_arg"
1468
1469 else
1470         ol_with_tls="auto"
1471 fi
1472 # end --with-tls
1473
1474 # OpenLDAP --with-yielding_select
1475         # Check whether --with-yielding_select or --without-yielding_select was given.
1476 if test "${with_yielding_select+set}" = set; then
1477   withval="$with_yielding_select"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no manual  ; do
1481                 if test "$withval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1487         fi
1488         ol_with_yielding_select="$ol_arg"
1489
1490 else
1491         ol_with_yielding_select="auto"
1492 fi
1493 # end --with-yielding_select
1494
1495
1496
1497 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1498 if test "${with_xxslapdoptions+set}" = set; then
1499   withval="$with_xxslapdoptions"
1500   :
1501 fi
1502
1503 # OpenLDAP --enable-slapd
1504         # Check whether --enable-slapd or --disable-slapd was given.
1505 if test "${enable_slapd+set}" = set; then
1506   enableval="$enable_slapd"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto yes no ; do
1510                 if test "$enableval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1516         fi
1517         ol_enable_slapd="$ol_arg"
1518
1519 else
1520         ol_enable_slapd="yes"
1521 fi
1522 # end --enable-slapd
1523 # OpenLDAP --enable-cleartext
1524         # Check whether --enable-cleartext or --disable-cleartext was given.
1525 if test "${enable_cleartext+set}" = set; then
1526   enableval="$enable_cleartext"
1527   
1528         ol_arg=invalid
1529         for ol_val in auto yes no ; do
1530                 if test "$enableval" = "$ol_val" ; then
1531                         ol_arg="$ol_val"
1532                 fi
1533         done
1534         if test "$ol_arg" = "invalid" ; then
1535                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1536         fi
1537         ol_enable_cleartext="$ol_arg"
1538
1539 else
1540         ol_enable_cleartext="yes"
1541 fi
1542 # end --enable-cleartext
1543 # OpenLDAP --enable-crypt
1544         # Check whether --enable-crypt or --disable-crypt was given.
1545 if test "${enable_crypt+set}" = set; then
1546   enableval="$enable_crypt"
1547   
1548         ol_arg=invalid
1549         for ol_val in auto yes no ; do
1550                 if test "$enableval" = "$ol_val" ; then
1551                         ol_arg="$ol_val"
1552                 fi
1553         done
1554         if test "$ol_arg" = "invalid" ; then
1555                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1556         fi
1557         ol_enable_crypt="$ol_arg"
1558
1559 else
1560         ol_enable_crypt="auto"
1561 fi
1562 # end --enable-crypt
1563 # OpenLDAP --enable-kpasswd
1564         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1565 if test "${enable_kpasswd+set}" = set; then
1566   enableval="$enable_kpasswd"
1567   
1568         ol_arg=invalid
1569         for ol_val in auto yes no ; do
1570                 if test "$enableval" = "$ol_val" ; then
1571                         ol_arg="$ol_val"
1572                 fi
1573         done
1574         if test "$ol_arg" = "invalid" ; then
1575                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1576         fi
1577         ol_enable_kpasswd="$ol_arg"
1578
1579 else
1580         ol_enable_kpasswd="no"
1581 fi
1582 # end --enable-kpasswd
1583 # OpenLDAP --enable-spasswd
1584         # Check whether --enable-spasswd or --disable-spasswd was given.
1585 if test "${enable_spasswd+set}" = set; then
1586   enableval="$enable_spasswd"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto yes no ; do
1590                 if test "$enableval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1596         fi
1597         ol_enable_spasswd="$ol_arg"
1598
1599 else
1600         ol_enable_spasswd="no"
1601 fi
1602 # end --enable-spasswd
1603 # OpenLDAP --enable-modules
1604         # Check whether --enable-modules or --disable-modules was given.
1605 if test "${enable_modules+set}" = set; then
1606   enableval="$enable_modules"
1607   
1608         ol_arg=invalid
1609         for ol_val in auto yes no ; do
1610                 if test "$enableval" = "$ol_val" ; then
1611                         ol_arg="$ol_val"
1612                 fi
1613         done
1614         if test "$ol_arg" = "invalid" ; then
1615                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1616         fi
1617         ol_enable_modules="$ol_arg"
1618
1619 else
1620         ol_enable_modules="no"
1621 fi
1622 # end --enable-modules
1623 # OpenLDAP --enable-phonetic
1624         # Check whether --enable-phonetic or --disable-phonetic was given.
1625 if test "${enable_phonetic+set}" = set; then
1626   enableval="$enable_phonetic"
1627   
1628         ol_arg=invalid
1629         for ol_val in auto yes no ; do
1630                 if test "$enableval" = "$ol_val" ; then
1631                         ol_arg="$ol_val"
1632                 fi
1633         done
1634         if test "$ol_arg" = "invalid" ; then
1635                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1636         fi
1637         ol_enable_phonetic="$ol_arg"
1638
1639 else
1640         ol_enable_phonetic="no"
1641 fi
1642 # end --enable-phonetic
1643 # OpenLDAP --enable-rlookups
1644         # Check whether --enable-rlookups or --disable-rlookups was given.
1645 if test "${enable_rlookups+set}" = set; then
1646   enableval="$enable_rlookups"
1647   
1648         ol_arg=invalid
1649         for ol_val in auto yes no ; do
1650                 if test "$enableval" = "$ol_val" ; then
1651                         ol_arg="$ol_val"
1652                 fi
1653         done
1654         if test "$ol_arg" = "invalid" ; then
1655                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1656         fi
1657         ol_enable_rlookups="$ol_arg"
1658
1659 else
1660         ol_enable_rlookups="no"
1661 fi
1662 # end --enable-rlookups
1663 # OpenLDAP --enable-aci
1664         # Check whether --enable-aci or --disable-aci was given.
1665 if test "${enable_aci+set}" = set; then
1666   enableval="$enable_aci"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1676         fi
1677         ol_enable_aci="$ol_arg"
1678
1679 else
1680         ol_enable_aci="no"
1681 fi
1682 # end --enable-aci
1683 # OpenLDAP --enable-wrappers
1684         # Check whether --enable-wrappers or --disable-wrappers was given.
1685 if test "${enable_wrappers+set}" = set; then
1686   enableval="$enable_wrappers"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1696         fi
1697         ol_enable_wrappers="$ol_arg"
1698
1699 else
1700         ol_enable_wrappers="no"
1701 fi
1702 # end --enable-wrappers
1703 # OpenLDAP --enable-dynamic
1704         # Check whether --enable-dynamic or --disable-dynamic was given.
1705 if test "${enable_dynamic+set}" = set; then
1706   enableval="$enable_dynamic"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1716         fi
1717         ol_enable_dynamic="$ol_arg"
1718
1719 else
1720         ol_enable_dynamic="no"
1721 fi
1722 # end --enable-dynamic
1723
1724 # OpenLDAP --enable-dnssrv
1725         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1726 if test "${enable_dnssrv+set}" = set; then
1727   enableval="$enable_dnssrv"
1728   
1729         ol_arg=invalid
1730         for ol_val in auto yes no ; do
1731                 if test "$enableval" = "$ol_val" ; then
1732                         ol_arg="$ol_val"
1733                 fi
1734         done
1735         if test "$ol_arg" = "invalid" ; then
1736                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1737         fi
1738         ol_enable_dnssrv="$ol_arg"
1739
1740 else
1741         ol_enable_dnssrv="no"
1742 fi
1743 # end --enable-dnssrv
1744 # OpenLDAP --with-dnssrv_module
1745         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1746 if test "${with_dnssrv_module+set}" = set; then
1747   withval="$with_dnssrv_module"
1748   
1749         ol_arg=invalid
1750         for ol_val in static dynamic ; do
1751                 if test "$withval" = "$ol_val" ; then
1752                         ol_arg="$ol_val"
1753                 fi
1754         done
1755         if test "$ol_arg" = "invalid" ; then
1756                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1757         fi
1758         ol_with_dnssrv_module="$ol_arg"
1759
1760 else
1761         ol_with_dnssrv_module="static"
1762 fi
1763 # end --with-dnssrv_module
1764
1765 # OpenLDAP --enable-ldap
1766         # Check whether --enable-ldap or --disable-ldap was given.
1767 if test "${enable_ldap+set}" = set; then
1768   enableval="$enable_ldap"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto yes no ; do
1772                 if test "$enableval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1778         fi
1779         ol_enable_ldap="$ol_arg"
1780
1781 else
1782         ol_enable_ldap="no"
1783 fi
1784 # end --enable-ldap
1785 # OpenLDAP --with-ldap_module
1786         # Check whether --with-ldap_module or --without-ldap_module was given.
1787 if test "${with_ldap_module+set}" = set; then
1788   withval="$with_ldap_module"
1789   
1790         ol_arg=invalid
1791         for ol_val in static dynamic ; do
1792                 if test "$withval" = "$ol_val" ; then
1793                         ol_arg="$ol_val"
1794                 fi
1795         done
1796         if test "$ol_arg" = "invalid" ; then
1797                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1798         fi
1799         ol_with_ldap_module="$ol_arg"
1800
1801 else
1802         ol_with_ldap_module="static"
1803 fi
1804 # end --with-ldap_module
1805
1806 # OpenLDAP --enable-ldbm
1807         # Check whether --enable-ldbm or --disable-ldbm was given.
1808 if test "${enable_ldbm+set}" = set; then
1809   enableval="$enable_ldbm"
1810   
1811         ol_arg=invalid
1812         for ol_val in auto yes no ; do
1813                 if test "$enableval" = "$ol_val" ; then
1814                         ol_arg="$ol_val"
1815                 fi
1816         done
1817         if test "$ol_arg" = "invalid" ; then
1818                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1819         fi
1820         ol_enable_ldbm="$ol_arg"
1821
1822 else
1823         ol_enable_ldbm="yes"
1824 fi
1825 # end --enable-ldbm
1826 # OpenLDAP --with-ldbm_api
1827         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1828 if test "${with_ldbm_api+set}" = set; then
1829   withval="$with_ldbm_api"
1830   
1831         ol_arg=invalid
1832         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1833                 if test "$withval" = "$ol_val" ; then
1834                         ol_arg="$ol_val"
1835                 fi
1836         done
1837         if test "$ol_arg" = "invalid" ; then
1838                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1839         fi
1840         ol_with_ldbm_api="$ol_arg"
1841
1842 else
1843         ol_with_ldbm_api="auto"
1844 fi
1845 # end --with-ldbm_api
1846
1847 # OpenLDAP --with-ldbm_module
1848         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1849 if test "${with_ldbm_module+set}" = set; then
1850   withval="$with_ldbm_module"
1851   
1852         ol_arg=invalid
1853         for ol_val in static dynamic ; do
1854                 if test "$withval" = "$ol_val" ; then
1855                         ol_arg="$ol_val"
1856                 fi
1857         done
1858         if test "$ol_arg" = "invalid" ; then
1859                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1860         fi
1861         ol_with_ldbm_module="$ol_arg"
1862
1863 else
1864         ol_with_ldbm_module="static"
1865 fi
1866 # end --with-ldbm_module
1867
1868 # OpenLDAP --with-ldbm_type
1869         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1870 if test "${with_ldbm_type+set}" = set; then
1871   withval="$with_ldbm_type"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto btree hash ; do
1875                 if test "$withval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1881         fi
1882         ol_with_ldbm_type="$ol_arg"
1883
1884 else
1885         ol_with_ldbm_type="auto"
1886 fi
1887 # end --with-ldbm_type
1888
1889 # OpenLDAP --enable-passwd
1890         # Check whether --enable-passwd or --disable-passwd was given.
1891 if test "${enable_passwd+set}" = set; then
1892   enableval="$enable_passwd"
1893   
1894         ol_arg=invalid
1895         for ol_val in auto yes no ; do
1896                 if test "$enableval" = "$ol_val" ; then
1897                         ol_arg="$ol_val"
1898                 fi
1899         done
1900         if test "$ol_arg" = "invalid" ; then
1901                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1902         fi
1903         ol_enable_passwd="$ol_arg"
1904
1905 else
1906         ol_enable_passwd="no"
1907 fi
1908 # end --enable-passwd
1909 # OpenLDAP --with-passwd_module
1910         # Check whether --with-passwd_module or --without-passwd_module was given.
1911 if test "${with_passwd_module+set}" = set; then
1912   withval="$with_passwd_module"
1913   
1914         ol_arg=invalid
1915         for ol_val in static dynamic ; do
1916                 if test "$withval" = "$ol_val" ; then
1917                         ol_arg="$ol_val"
1918                 fi
1919         done
1920         if test "$ol_arg" = "invalid" ; then
1921                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1922         fi
1923         ol_with_passwd_module="$ol_arg"
1924
1925 else
1926         ol_with_passwd_module="static"
1927 fi
1928 # end --with-passwd_module
1929
1930 # OpenLDAP --enable-shell
1931         # Check whether --enable-shell or --disable-shell was given.
1932 if test "${enable_shell+set}" = set; then
1933   enableval="$enable_shell"
1934   
1935         ol_arg=invalid
1936         for ol_val in auto yes no ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1943         fi
1944         ol_enable_shell="$ol_arg"
1945
1946 else
1947         ol_enable_shell="no"
1948 fi
1949 # end --enable-shell
1950 # OpenLDAP --with-shell_module
1951         # Check whether --with-shell_module or --without-shell_module was given.
1952 if test "${with_shell_module+set}" = set; then
1953   withval="$with_shell_module"
1954   
1955         ol_arg=invalid
1956         for ol_val in static dynamic ; do
1957                 if test "$withval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1963         fi
1964         ol_with_shell_module="$ol_arg"
1965
1966 else
1967         ol_with_shell_module="static"
1968 fi
1969 # end --with-shell_module
1970
1971 # OpenLDAP --enable-sql
1972         # Check whether --enable-sql or --disable-sql was given.
1973 if test "${enable_sql+set}" = set; then
1974   enableval="$enable_sql"
1975   
1976         ol_arg=invalid
1977         for ol_val in auto yes no ; do
1978                 if test "$enableval" = "$ol_val" ; then
1979                         ol_arg="$ol_val"
1980                 fi
1981         done
1982         if test "$ol_arg" = "invalid" ; then
1983                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
1984         fi
1985         ol_enable_sql="$ol_arg"
1986
1987 else
1988         ol_enable_sql="no"
1989 fi
1990 # end --enable-sql
1991 # OpenLDAP --with-sql_module
1992         # Check whether --with-sql_module or --without-sql_module was given.
1993 if test "${with_sql_module+set}" = set; then
1994   withval="$with_sql_module"
1995   
1996         ol_arg=invalid
1997         for ol_val in static dynamic ; do
1998                 if test "$withval" = "$ol_val" ; then
1999                         ol_arg="$ol_val"
2000                 fi
2001         done
2002         if test "$ol_arg" = "invalid" ; then
2003                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2004         fi
2005         ol_with_sql_module="$ol_arg"
2006
2007 else
2008         ol_with_sql_module="static"
2009 fi
2010 # end --with-sql_module
2011
2012
2013 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2014 if test "${with_xxslurpdoptions+set}" = set; then
2015   withval="$with_xxslurpdoptions"
2016   :
2017 fi
2018
2019 # OpenLDAP --enable-slurpd
2020         # Check whether --enable-slurpd or --disable-slurpd was given.
2021 if test "${enable_slurpd+set}" = set; then
2022   enableval="$enable_slurpd"
2023   
2024         ol_arg=invalid
2025         for ol_val in auto yes no ; do
2026                 if test "$enableval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2032         fi
2033         ol_enable_slurpd="$ol_arg"
2034
2035 else
2036         ol_enable_slurpd="auto"
2037 fi
2038 # end --enable-slurpd
2039
2040 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2041 if test "${with_xxliboptions+set}" = set; then
2042   withval="$with_xxliboptions"
2043   :
2044 fi
2045
2046 # Check whether --enable-static or --disable-static was given.
2047 if test "${enable_static+set}" = set; then
2048   enableval="$enable_static"
2049   p=${PACKAGE-default}
2050 case "$enableval" in
2051 yes) enable_static=yes ;;
2052 no) enable_static=no ;;
2053 *)
2054   enable_static=no
2055   # Look at the argument we got.  We use all the common list separators.
2056   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2057   for pkg in $enableval; do
2058     if test "X$pkg" = "X$p"; then
2059       enable_static=yes
2060     fi
2061   done
2062   IFS="$ac_save_ifs"
2063   ;;
2064 esac
2065 else
2066   enable_static=yes
2067 fi
2068
2069 # Check whether --enable-shared or --disable-shared was given.
2070 if test "${enable_shared+set}" = set; then
2071   enableval="$enable_shared"
2072   p=${PACKAGE-default}
2073 case "$enableval" in
2074 yes) enable_shared=yes ;;
2075 no) enable_shared=no ;;
2076 *)
2077   enable_shared=no
2078   # Look at the argument we got.  We use all the common list separators.
2079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2080   for pkg in $enableval; do
2081     if test "X$pkg" = "X$p"; then
2082       enable_shared=yes
2083     fi
2084   done
2085   IFS="$ac_save_ifs"
2086   ;;
2087 esac
2088 else
2089   enable_shared=yes
2090 fi
2091
2092
2093
2094 # validate options
2095 if test $ol_enable_slapd = no ; then
2096                 if test $ol_enable_dnssrv = yes ; then
2097                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2098         fi
2099         if test $ol_enable_ldap = yes ; then
2100                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2101         fi
2102         if test $ol_enable_ldbm = yes ; then
2103                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2104         fi
2105         if test $ol_enable_passwd = yes ; then
2106                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2107         fi
2108         if test $ol_enable_shell = yes ; then
2109                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2110         fi
2111         if test $ol_enable_sql = yes ; then
2112                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2113         fi
2114         if test $ol_enable_modules = yes ; then
2115                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2116         fi
2117         if test $ol_enable_multimaster = yes ; then
2118                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2119         fi
2120         if test $ol_enable_wrappers = yes ; then
2121                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2122         fi
2123         if test $ol_enable_phonetic = yes ; then
2124                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2125         fi
2126         if test $ol_enable_rlookups = yes ; then
2127                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2128         fi
2129         if test $ol_enable_aci = yes ; then
2130                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2131         fi
2132         if test $ol_with_ldbm_api != auto ; then
2133                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2134         fi
2135         if test $ol_with_ldbm_type != auto ; then
2136                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2137         fi
2138         if test $ol_with_dnssrv_module != static ; then
2139                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2140         fi
2141         if test $ol_with_ldap_module != static ; then
2142                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2143         fi
2144         if test $ol_with_ldbm_module != static ; then
2145                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2146         fi
2147         if test $ol_with_passwd_module != static ; then
2148                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2149         fi
2150         if test $ol_with_shell_module != static ; then
2151                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2152         fi
2153         if test $ol_with_sql_module != static ; then
2154                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2155         fi
2156         if test $ol_enable_slurpd = yes ; then
2157                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2158         fi
2159
2160         # force settings to no
2161         ol_enable_dnssrv=no
2162         ol_enable_ldap=no
2163         ol_enable_ldbm=no
2164         ol_enable_passwd=no
2165         ol_enable_shell=no
2166         ol_enable_sql=no
2167
2168         ol_enable_modules=no
2169         ol_enable_phonetic=no
2170         ol_enable_rlookups=no
2171         ol_enable_aci=no
2172         ol_enable_wrappers=no
2173         ol_enable_dynamic=no
2174
2175         ol_with_ldbm_api=no
2176         ol_with_ldbm_type=no
2177
2178         ol_with_dnssrv_module=static
2179         ol_with_ldap_module=static
2180         ol_with_ldbm_module=static
2181         ol_with_passwd_module=static
2182         ol_with_shell_module=static
2183         ol_with_sql_module=static
2184
2185         ol_enable_slurpd=no
2186
2187 elif test $ol_enable_ldbm = no ; then
2188         
2189         if test $ol_with_ldbm_api != auto ; then
2190                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2191         fi
2192
2193         if test $ol_with_ldbm_type != auto ; then
2194                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2195         fi
2196
2197         if test $ol_with_ldbm_module != static ; then
2198                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2199         fi
2200
2201         if test $ol_enable_modules != yes -a \
2202                 $ol_enable_dnssrv = no -a \
2203                 $ol_enable_ldap = no -a \
2204                 $ol_enable_passwd = no -a \
2205                 $ol_enable_shell = no -a \
2206                 $ol_enable_sql = no ; then
2207                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2208         fi
2209
2210         ol_with_ldbm_api=no
2211         ol_with_ldbm_type=no
2212         ol_with_ldbm_module=static
2213
2214 else
2215                 if test $ol_with_ldbm_api = gdbm -a \
2216                 $ol_with_ldbm_type = btree ; then
2217                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2218         fi
2219         if test $ol_with_ldbm_api = mdbm -a \
2220                 $ol_with_ldbm_type = btree ; then
2221                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2222         fi
2223         if test $ol_with_ldbm_api = ndbm -a \
2224                 $ol_with_ldbm_type = btree ; then
2225                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2226         fi
2227 fi
2228
2229 if test $ol_enable_slurpd = yes ; then
2230                 if test $ol_with_threads = no ; then
2231                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2232         fi
2233 fi
2234
2235 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2236         if test $ol_with_kerberos = no ; then
2237                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2238         fi
2239         ol_with_kerberos=yes
2240 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2241         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2242                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2243         fi
2244         ol_with_kerberos=no
2245 fi
2246
2247 if test $ol_enable_spasswd = yes ; then
2248         if test $ol_with_cyrus_sasl = no ; then
2249                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2250         fi
2251         ol_with_cyrus_sasl=yes
2252 fi
2253
2254 echo "$ac_t""done" 1>&6
2255
2256 LDAP_LIBS=
2257 LDIF_LIBS=
2258 LDBM_LIBS=
2259 LTHREAD_LIBS=
2260 LUTIL_LIBS=
2261
2262 SLAPD_LIBS=
2263 SLURPD_LIBS=
2264
2265 BUILD_SLAPD=no
2266 BUILD_SLURPD=no
2267
2268 BUILD_THREAD=no
2269
2270 BUILD_DNSSRV=no
2271 BUILD_LDAP=no
2272 BUILD_LDBM=no
2273 BUILD_PASSWD=no
2274 BUILD_SHELL=no
2275 BUILD_SQL=no
2276
2277 BUILD_DNSSRV_DYNAMIC=static
2278 BUILD_LDAP_DYNAMIC=static
2279 BUILD_LDBM_DYNAMIC=static
2280 BUILD_PASSWD_DYNAMIC=static
2281 BUILD_SHELL_DYNAMIC=static
2282 BUILD_SQL_DYNAMIC=static
2283
2284 SLAPD_MODULES_LDFLAGS=
2285 SLAPD_MODULES_CPPFLAGS=
2286 SLAPD_MODULES_LIST=
2287
2288 SLAPD_SQL_LDFLAGS=
2289 SLAPD_SQL_LIBS=
2290 SLAPD_SQL_INCLUDES=
2291
2292 KRB4_LIBS=
2293 KRB5_LIBS=
2294 READLINE_LIBS=
2295 SASL_LIBS=
2296 TERMCAP_LIBS=
2297 TLS_LIBS=
2298 MODULES_LIBS=
2299 AUTH_LIBS=
2300
2301
2302
2303 cat >> confdefs.h <<\EOF
2304 #define HAVE_MKVERSION 1
2305 EOF
2306
2307
2308
2309
2310 ol_aix_threads=no
2311 case "$target" in
2312 *-*-aix*)       if test -z "$CC" ; then
2313                 case "$ol_with_threads" in
2314                 auto | yes |  posix) ol_aix_threads=yes ;;
2315                 esac
2316         fi
2317 ;;
2318 esac
2319
2320 if test $ol_aix_threads = yes ; then
2321         if test -z "${CC}" ; then
2322                 for ac_prog in cc_r xlc_r cc
2323 do
2324 # Extract the first word of "$ac_prog", so it can be a program name with args.
2325 set dummy $ac_prog; ac_word=$2
2326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2327 echo "configure:2328: checking for $ac_word" >&5
2328 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2329   echo $ac_n "(cached) $ac_c" 1>&6
2330 else
2331   if test -n "$CC"; then
2332   ac_cv_prog_CC="$CC" # Let the user override the test.
2333 else
2334   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2335   ac_dummy="$PATH"
2336   for ac_dir in $ac_dummy; do
2337     test -z "$ac_dir" && ac_dir=.
2338     if test -f $ac_dir/$ac_word; then
2339       ac_cv_prog_CC="$ac_prog"
2340       break
2341     fi
2342   done
2343   IFS="$ac_save_ifs"
2344 fi
2345 fi
2346 CC="$ac_cv_prog_CC"
2347 if test -n "$CC"; then
2348   echo "$ac_t""$CC" 1>&6
2349 else
2350   echo "$ac_t""no" 1>&6
2351 fi
2352
2353 test -n "$CC" && break
2354 done
2355
2356
2357                 if test "$CC" = cc ; then
2358                                                 if test $ol_with_threads != auto ; then
2359                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2360                         else
2361                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2362                         fi
2363                         ol_with_threads=no
2364                 fi
2365         fi
2366
2367         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2368                 ol_with_threads=posix
2369                 ol_cv_pthread_create=yes
2370         fi
2371 fi
2372
2373 if test -z "${CC}"; then
2374         for ac_prog in cc
2375 do
2376 # Extract the first word of "$ac_prog", so it can be a program name with args.
2377 set dummy $ac_prog; ac_word=$2
2378 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2379 echo "configure:2380: checking for $ac_word" >&5
2380 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2381   echo $ac_n "(cached) $ac_c" 1>&6
2382 else
2383   if test -n "$CC"; then
2384   ac_cv_prog_CC="$CC" # Let the user override the test.
2385 else
2386   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2387   ac_dummy="$PATH"
2388   for ac_dir in $ac_dummy; do
2389     test -z "$ac_dir" && ac_dir=.
2390     if test -f $ac_dir/$ac_word; then
2391       ac_cv_prog_CC="$ac_prog"
2392       break
2393     fi
2394   done
2395   IFS="$ac_save_ifs"
2396 fi
2397 fi
2398 CC="$ac_cv_prog_CC"
2399 if test -n "$CC"; then
2400   echo "$ac_t""$CC" 1>&6
2401 else
2402   echo "$ac_t""no" 1>&6
2403 fi
2404
2405 test -n "$CC" && break
2406 done
2407
2408 fi
2409
2410
2411
2412
2413 # Check whether --enable-fast-install or --disable-fast-install was given.
2414 if test "${enable_fast_install+set}" = set; then
2415   enableval="$enable_fast_install"
2416   p=${PACKAGE-default}
2417 case "$enableval" in
2418 yes) enable_fast_install=yes ;;
2419 no) enable_fast_install=no ;;
2420 *)
2421   enable_fast_install=no
2422   # Look at the argument we got.  We use all the common list separators.
2423   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2424   for pkg in $enableval; do
2425     if test "X$pkg" = "X$p"; then
2426       enable_fast_install=yes
2427     fi
2428   done
2429   IFS="$ac_save_ifs"
2430   ;;
2431 esac
2432 else
2433   enable_fast_install=yes
2434 fi
2435
2436 # Extract the first word of "ranlib", so it can be a program name with args.
2437 set dummy ranlib; ac_word=$2
2438 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2439 echo "configure:2440: checking for $ac_word" >&5
2440 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2441   echo $ac_n "(cached) $ac_c" 1>&6
2442 else
2443   if test -n "$RANLIB"; then
2444   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2445 else
2446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2447   ac_dummy="$PATH"
2448   for ac_dir in $ac_dummy; do
2449     test -z "$ac_dir" && ac_dir=.
2450     if test -f $ac_dir/$ac_word; then
2451       ac_cv_prog_RANLIB="ranlib"
2452       break
2453     fi
2454   done
2455   IFS="$ac_save_ifs"
2456   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2457 fi
2458 fi
2459 RANLIB="$ac_cv_prog_RANLIB"
2460 if test -n "$RANLIB"; then
2461   echo "$ac_t""$RANLIB" 1>&6
2462 else
2463   echo "$ac_t""no" 1>&6
2464 fi
2465
2466 # Extract the first word of "gcc", so it can be a program name with args.
2467 set dummy gcc; ac_word=$2
2468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2469 echo "configure:2470: checking for $ac_word" >&5
2470 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2471   echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473   if test -n "$CC"; then
2474   ac_cv_prog_CC="$CC" # Let the user override the test.
2475 else
2476   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2477   ac_dummy="$PATH"
2478   for ac_dir in $ac_dummy; do
2479     test -z "$ac_dir" && ac_dir=.
2480     if test -f $ac_dir/$ac_word; then
2481       ac_cv_prog_CC="gcc"
2482       break
2483     fi
2484   done
2485   IFS="$ac_save_ifs"
2486 fi
2487 fi
2488 CC="$ac_cv_prog_CC"
2489 if test -n "$CC"; then
2490   echo "$ac_t""$CC" 1>&6
2491 else
2492   echo "$ac_t""no" 1>&6
2493 fi
2494
2495 if test -z "$CC"; then
2496   # Extract the first word of "cc", so it can be a program name with args.
2497 set dummy cc; ac_word=$2
2498 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2499 echo "configure:2500: checking for $ac_word" >&5
2500 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2501   echo $ac_n "(cached) $ac_c" 1>&6
2502 else
2503   if test -n "$CC"; then
2504   ac_cv_prog_CC="$CC" # Let the user override the test.
2505 else
2506   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2507   ac_prog_rejected=no
2508   ac_dummy="$PATH"
2509   for ac_dir in $ac_dummy; do
2510     test -z "$ac_dir" && ac_dir=.
2511     if test -f $ac_dir/$ac_word; then
2512       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2513         ac_prog_rejected=yes
2514         continue
2515       fi
2516       ac_cv_prog_CC="cc"
2517       break
2518     fi
2519   done
2520   IFS="$ac_save_ifs"
2521 if test $ac_prog_rejected = yes; then
2522   # We found a bogon in the path, so make sure we never use it.
2523   set dummy $ac_cv_prog_CC
2524   shift
2525   if test $# -gt 0; then
2526     # We chose a different compiler from the bogus one.
2527     # However, it has the same basename, so the bogon will be chosen
2528     # first if we set CC to just the basename; use the full file name.
2529     shift
2530     set dummy "$ac_dir/$ac_word" "$@"
2531     shift
2532     ac_cv_prog_CC="$@"
2533   fi
2534 fi
2535 fi
2536 fi
2537 CC="$ac_cv_prog_CC"
2538 if test -n "$CC"; then
2539   echo "$ac_t""$CC" 1>&6
2540 else
2541   echo "$ac_t""no" 1>&6
2542 fi
2543
2544   if test -z "$CC"; then
2545     case "`uname -s`" in
2546     *win32* | *WIN32* | *CYGWIN*)
2547       # Extract the first word of "cl", so it can be a program name with args.
2548 set dummy cl; ac_word=$2
2549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2550 echo "configure:2551: checking for $ac_word" >&5
2551 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2552   echo $ac_n "(cached) $ac_c" 1>&6
2553 else
2554   if test -n "$CC"; then
2555   ac_cv_prog_CC="$CC" # Let the user override the test.
2556 else
2557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2558   ac_dummy="$PATH"
2559   for ac_dir in $ac_dummy; do
2560     test -z "$ac_dir" && ac_dir=.
2561     if test -f $ac_dir/$ac_word; then
2562       ac_cv_prog_CC="cl"
2563       break
2564     fi
2565   done
2566   IFS="$ac_save_ifs"
2567 fi
2568 fi
2569 CC="$ac_cv_prog_CC"
2570 if test -n "$CC"; then
2571   echo "$ac_t""$CC" 1>&6
2572 else
2573   echo "$ac_t""no" 1>&6
2574 fi
2575  ;;
2576     esac
2577   fi
2578   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2579 fi
2580
2581 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2582 echo "configure:2583: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2583
2584 ac_ext=c
2585 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2586 ac_cpp='$CPP $CPPFLAGS'
2587 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2588 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2589 cross_compiling=$ac_cv_prog_cc_cross
2590
2591 cat > conftest.$ac_ext << EOF
2592
2593 #line 2594 "configure"
2594 #include "confdefs.h"
2595
2596 main(){return(0);}
2597 EOF
2598 if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2599   ac_cv_prog_cc_works=yes
2600   # If we can't run a trivial program, we are probably using a cross compiler.
2601   if (./conftest; exit) 2>/dev/null; then
2602     ac_cv_prog_cc_cross=no
2603   else
2604     ac_cv_prog_cc_cross=yes
2605   fi
2606 else
2607   echo "configure: failed program was:" >&5
2608   cat conftest.$ac_ext >&5
2609   ac_cv_prog_cc_works=no
2610 fi
2611 rm -fr conftest*
2612 ac_ext=c
2613 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2614 ac_cpp='$CPP $CPPFLAGS'
2615 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2616 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2617 cross_compiling=$ac_cv_prog_cc_cross
2618
2619 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2620 if test $ac_cv_prog_cc_works = no; then
2621   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2622 fi
2623 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2624 echo "configure:2625: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2625 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2626 cross_compiling=$ac_cv_prog_cc_cross
2627
2628 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2629 echo "configure:2630: checking whether we are using GNU C" >&5
2630 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2631   echo $ac_n "(cached) $ac_c" 1>&6
2632 else
2633   cat > conftest.c <<EOF
2634 #ifdef __GNUC__
2635   yes;
2636 #endif
2637 EOF
2638 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2639   ac_cv_prog_gcc=yes
2640 else
2641   ac_cv_prog_gcc=no
2642 fi
2643 fi
2644
2645 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2646
2647 if test $ac_cv_prog_gcc = yes; then
2648   GCC=yes
2649 else
2650   GCC=
2651 fi
2652
2653 ac_test_CFLAGS="${CFLAGS+set}"
2654 ac_save_CFLAGS="$CFLAGS"
2655 CFLAGS=
2656 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2657 echo "configure:2658: checking whether ${CC-cc} accepts -g" >&5
2658 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2659   echo $ac_n "(cached) $ac_c" 1>&6
2660 else
2661   echo 'void f(){}' > conftest.c
2662 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2663   ac_cv_prog_cc_g=yes
2664 else
2665   ac_cv_prog_cc_g=no
2666 fi
2667 rm -f conftest*
2668
2669 fi
2670
2671 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2672 if test "$ac_test_CFLAGS" = set; then
2673   CFLAGS="$ac_save_CFLAGS"
2674 elif test $ac_cv_prog_cc_g = yes; then
2675   if test "$GCC" = yes; then
2676     CFLAGS="-g -O2"
2677   else
2678     CFLAGS="-g"
2679   fi
2680 else
2681   if test "$GCC" = yes; then
2682     CFLAGS="-O2"
2683   else
2684     CFLAGS=
2685   fi
2686 fi
2687
2688 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2689 if test "${with_gnu_ld+set}" = set; then
2690   withval="$with_gnu_ld"
2691   test "$withval" = no || with_gnu_ld=yes
2692 else
2693   with_gnu_ld=no
2694 fi
2695
2696 ac_prog=ld
2697 if test "$ac_cv_prog_gcc" = yes; then
2698   # Check if gcc -print-prog-name=ld gives a path.
2699   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2700 echo "configure:2701: checking for ld used by GCC" >&5
2701   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2702   case "$ac_prog" in
2703     # Accept absolute paths.
2704     [\\/]* | [A-Za-z]:[\\/]*)
2705       re_direlt='/[^/][^/]*/\.\./'
2706       # Canonicalize the path of ld
2707       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2708       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2709         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2710       done
2711       test -z "$LD" && LD="$ac_prog"
2712       ;;
2713   "")
2714     # If it fails, then pretend we aren't using GCC.
2715     ac_prog=ld
2716     ;;
2717   *)
2718     # If it is relative, then search for the first ld in PATH.
2719     with_gnu_ld=unknown
2720     ;;
2721   esac
2722 elif test "$with_gnu_ld" = yes; then
2723   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2724 echo "configure:2725: checking for GNU ld" >&5
2725 else
2726   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2727 echo "configure:2728: checking for non-GNU ld" >&5
2728 fi
2729 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2730   echo $ac_n "(cached) $ac_c" 1>&6
2731 else
2732   if test -z "$LD"; then
2733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2734   for ac_dir in $PATH; do
2735     test -z "$ac_dir" && ac_dir=.
2736     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2737       ac_cv_path_LD="$ac_dir/$ac_prog"
2738       # Check to see if the program is GNU ld.  I'd rather use --version,
2739       # but apparently some GNU ld's only accept -v.
2740       # Break only if it was the GNU/non-GNU ld that we prefer.
2741       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2742         test "$with_gnu_ld" != no && break
2743       else
2744         test "$with_gnu_ld" != yes && break
2745       fi
2746     fi
2747   done
2748   IFS="$ac_save_ifs"
2749 else
2750   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2751 fi
2752 fi
2753
2754 LD="$ac_cv_path_LD"
2755 if test -n "$LD"; then
2756   echo "$ac_t""$LD" 1>&6
2757 else
2758   echo "$ac_t""no" 1>&6
2759 fi
2760 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2761 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2762 echo "configure:2763: checking if the linker ($LD) is GNU ld" >&5
2763 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2764   echo $ac_n "(cached) $ac_c" 1>&6
2765 else
2766   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2767 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2768   ac_cv_prog_gnu_ld=yes
2769 else
2770   ac_cv_prog_gnu_ld=no
2771 fi
2772 fi
2773
2774 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2775
2776
2777 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2778 echo "configure:2779: checking for BSD-compatible nm" >&5
2779 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2780   echo $ac_n "(cached) $ac_c" 1>&6
2781 else
2782   if test -n "$NM"; then
2783   # Let the user override the test.
2784   ac_cv_path_NM="$NM"
2785 else
2786   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2787   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2788     test -z "$ac_dir" && ac_dir=.
2789     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2790       # Check to see if the nm accepts a BSD-compat flag.
2791       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2792       #   nm: unknown option "B" ignored
2793       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2794         ac_cv_path_NM="$ac_dir/nm -B"
2795         break
2796       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2797         ac_cv_path_NM="$ac_dir/nm -p"
2798         break
2799       else
2800         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2801         continue # so that we can try to find one that supports BSD flags
2802       fi
2803     fi
2804   done
2805   IFS="$ac_save_ifs"
2806   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2807 fi
2808 fi
2809
2810 NM="$ac_cv_path_NM"
2811 echo "$ac_t""$NM" 1>&6
2812
2813 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2814 echo "configure:2815: checking whether ln -s works" >&5
2815 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2816   echo $ac_n "(cached) $ac_c" 1>&6
2817 else
2818   rm -f conftestdata
2819 if ln -s X conftestdata 2>/dev/null
2820 then
2821   rm -f conftestdata
2822   ac_cv_prog_LN_S="ln -s"
2823 else
2824   ac_cv_prog_LN_S=ln
2825 fi
2826 fi
2827 LN_S="$ac_cv_prog_LN_S"
2828 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2829   echo "$ac_t""yes" 1>&6
2830 else
2831   echo "$ac_t""no" 1>&6
2832 fi
2833
2834 if test $host != $build; then
2835   ac_tool_prefix=${host_alias}-
2836 else
2837   ac_tool_prefix=
2838 fi
2839
2840
2841 case "$target" in
2842 NONE) lt_target="$host" ;;
2843 *) lt_target="$target" ;;
2844 esac
2845
2846 # Check for any special flags to pass to ltconfig.
2847 libtool_flags="--cache-file=$cache_file"
2848 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2849 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2850 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2851 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2852 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2853 libtool_flags="$libtool_flags --enable-dlopen"
2854 libtool_flags="$libtool_flags --enable-win32-dll"
2855 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2856 if test "${enable_libtool_lock+set}" = set; then
2857   enableval="$enable_libtool_lock"
2858   :
2859 fi
2860
2861 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2862 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2863
2864 # Some flags need to be propagated to the compiler or linker for good
2865 # libtool support.
2866 case "$lt_target" in
2867 *-*-irix6*)
2868   # Find out which ABI we are using.
2869   echo '#line 2870 "configure"' > conftest.$ac_ext
2870   if { (eval echo configure:2871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2871     case "`/usr/bin/file conftest.o`" in
2872     *32-bit*)
2873       LD="${LD-ld} -32"
2874       ;;
2875     *N32*)
2876       LD="${LD-ld} -n32"
2877       ;;
2878     *64-bit*)
2879       LD="${LD-ld} -64"
2880       ;;
2881     esac
2882   fi
2883   rm -rf conftest*
2884   ;;
2885
2886 *-*-sco3.2v5*)
2887   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2888   SAVE_CFLAGS="$CFLAGS"
2889   CFLAGS="$CFLAGS -belf"
2890   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2891 echo "configure:2892: checking whether the C compiler needs -belf" >&5
2892 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2893   echo $ac_n "(cached) $ac_c" 1>&6
2894 else
2895   cat > conftest.$ac_ext <<EOF
2896 #line 2897 "configure"
2897 #include "confdefs.h"
2898
2899 int main() {
2900
2901 ; return 0; }
2902 EOF
2903 if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2904   rm -rf conftest*
2905   lt_cv_cc_needs_belf=yes
2906 else
2907   echo "configure: failed program was:" >&5
2908   cat conftest.$ac_ext >&5
2909   rm -rf conftest*
2910   lt_cv_cc_needs_belf=no
2911 fi
2912 rm -f conftest*
2913 fi
2914
2915 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2916   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2917     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2918     CFLAGS="$SAVE_CFLAGS"
2919   fi
2920   ;;
2921
2922 *-*-cygwin* | *-*-mingw*)
2923   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2924 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2926 echo "configure:2927: checking for $ac_word" >&5
2927 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2928   echo $ac_n "(cached) $ac_c" 1>&6
2929 else
2930   if test -n "$DLLTOOL"; then
2931   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2932 else
2933   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2934   ac_dummy="$PATH"
2935   for ac_dir in $ac_dummy; do
2936     test -z "$ac_dir" && ac_dir=.
2937     if test -f $ac_dir/$ac_word; then
2938       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2939       break
2940     fi
2941   done
2942   IFS="$ac_save_ifs"
2943 fi
2944 fi
2945 DLLTOOL="$ac_cv_prog_DLLTOOL"
2946 if test -n "$DLLTOOL"; then
2947   echo "$ac_t""$DLLTOOL" 1>&6
2948 else
2949   echo "$ac_t""no" 1>&6
2950 fi
2951
2952
2953 if test -z "$ac_cv_prog_DLLTOOL"; then
2954 if test -n "$ac_tool_prefix"; then
2955   # Extract the first word of "dlltool", so it can be a program name with args.
2956 set dummy dlltool; ac_word=$2
2957 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2958 echo "configure:2959: checking for $ac_word" >&5
2959 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2960   echo $ac_n "(cached) $ac_c" 1>&6
2961 else
2962   if test -n "$DLLTOOL"; then
2963   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2964 else
2965   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2966   ac_dummy="$PATH"
2967   for ac_dir in $ac_dummy; do
2968     test -z "$ac_dir" && ac_dir=.
2969     if test -f $ac_dir/$ac_word; then
2970       ac_cv_prog_DLLTOOL="dlltool"
2971       break
2972     fi
2973   done
2974   IFS="$ac_save_ifs"
2975   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
2976 fi
2977 fi
2978 DLLTOOL="$ac_cv_prog_DLLTOOL"
2979 if test -n "$DLLTOOL"; then
2980   echo "$ac_t""$DLLTOOL" 1>&6
2981 else
2982   echo "$ac_t""no" 1>&6
2983 fi
2984
2985 else
2986   DLLTOOL="false"
2987 fi
2988 fi
2989
2990   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
2991 set dummy ${ac_tool_prefix}as; ac_word=$2
2992 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2993 echo "configure:2994: checking for $ac_word" >&5
2994 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
2995   echo $ac_n "(cached) $ac_c" 1>&6
2996 else
2997   if test -n "$AS"; then
2998   ac_cv_prog_AS="$AS" # Let the user override the test.
2999 else
3000   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3001   ac_dummy="$PATH"
3002   for ac_dir in $ac_dummy; do
3003     test -z "$ac_dir" && ac_dir=.
3004     if test -f $ac_dir/$ac_word; then
3005       ac_cv_prog_AS="${ac_tool_prefix}as"
3006       break
3007     fi
3008   done
3009   IFS="$ac_save_ifs"
3010 fi
3011 fi
3012 AS="$ac_cv_prog_AS"
3013 if test -n "$AS"; then
3014   echo "$ac_t""$AS" 1>&6
3015 else
3016   echo "$ac_t""no" 1>&6
3017 fi
3018
3019
3020 if test -z "$ac_cv_prog_AS"; then
3021 if test -n "$ac_tool_prefix"; then
3022   # Extract the first word of "as", so it can be a program name with args.
3023 set dummy as; ac_word=$2
3024 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3025 echo "configure:3026: checking for $ac_word" >&5
3026 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3027   echo $ac_n "(cached) $ac_c" 1>&6
3028 else
3029   if test -n "$AS"; then
3030   ac_cv_prog_AS="$AS" # Let the user override the test.
3031 else
3032   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3033   ac_dummy="$PATH"
3034   for ac_dir in $ac_dummy; do
3035     test -z "$ac_dir" && ac_dir=.
3036     if test -f $ac_dir/$ac_word; then
3037       ac_cv_prog_AS="as"
3038       break
3039     fi
3040   done
3041   IFS="$ac_save_ifs"
3042   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3043 fi
3044 fi
3045 AS="$ac_cv_prog_AS"
3046 if test -n "$AS"; then
3047   echo "$ac_t""$AS" 1>&6
3048 else
3049   echo "$ac_t""no" 1>&6
3050 fi
3051
3052 else
3053   AS="false"
3054 fi
3055 fi
3056
3057   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3058 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3060 echo "configure:3061: checking for $ac_word" >&5
3061 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3062   echo $ac_n "(cached) $ac_c" 1>&6
3063 else
3064   if test -n "$OBJDUMP"; then
3065   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3066 else
3067   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3068   ac_dummy="$PATH"
3069   for ac_dir in $ac_dummy; do
3070     test -z "$ac_dir" && ac_dir=.
3071     if test -f $ac_dir/$ac_word; then
3072       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3073       break
3074     fi
3075   done
3076   IFS="$ac_save_ifs"
3077 fi
3078 fi
3079 OBJDUMP="$ac_cv_prog_OBJDUMP"
3080 if test -n "$OBJDUMP"; then
3081   echo "$ac_t""$OBJDUMP" 1>&6
3082 else
3083   echo "$ac_t""no" 1>&6
3084 fi
3085
3086
3087 if test -z "$ac_cv_prog_OBJDUMP"; then
3088 if test -n "$ac_tool_prefix"; then
3089   # Extract the first word of "objdump", so it can be a program name with args.
3090 set dummy objdump; ac_word=$2
3091 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3092 echo "configure:3093: checking for $ac_word" >&5
3093 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3094   echo $ac_n "(cached) $ac_c" 1>&6
3095 else
3096   if test -n "$OBJDUMP"; then
3097   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3098 else
3099   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3100   ac_dummy="$PATH"
3101   for ac_dir in $ac_dummy; do
3102     test -z "$ac_dir" && ac_dir=.
3103     if test -f $ac_dir/$ac_word; then
3104       ac_cv_prog_OBJDUMP="objdump"
3105       break
3106     fi
3107   done
3108   IFS="$ac_save_ifs"
3109   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3110 fi
3111 fi
3112 OBJDUMP="$ac_cv_prog_OBJDUMP"
3113 if test -n "$OBJDUMP"; then
3114   echo "$ac_t""$OBJDUMP" 1>&6
3115 else
3116   echo "$ac_t""no" 1>&6
3117 fi
3118
3119 else
3120   OBJDUMP="false"
3121 fi
3122 fi
3123
3124   ;;
3125
3126 esac
3127
3128
3129 # Save cache, so that ltconfig can load it
3130
3131
3132 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3133 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3134 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3135 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3136 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3137 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3138 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3139 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3140
3141 # Reload cache, that may have been modified by ltconfig
3142
3143
3144 # This can be used to rebuild libtool when needed
3145 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3146
3147 # Always use our own libtool.
3148 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3149
3150 # Redirect the config.log output again, so that the ltconfig log is not
3151 # clobbered by the next message.
3152 exec 5>>./config.log
3153
3154
3155 for ac_prog in mawk gawk nawk awk
3156 do
3157 # Extract the first word of "$ac_prog", so it can be a program name with args.
3158 set dummy $ac_prog; ac_word=$2
3159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3160 echo "configure:3161: checking for $ac_word" >&5
3161 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3162   echo $ac_n "(cached) $ac_c" 1>&6
3163 else
3164   if test -n "$AWK"; then
3165   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3166 else
3167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3168   ac_dummy="$PATH"
3169   for ac_dir in $ac_dummy; do
3170     test -z "$ac_dir" && ac_dir=.
3171     if test -f $ac_dir/$ac_word; then
3172       ac_cv_prog_AWK="$ac_prog"
3173       break
3174     fi
3175   done
3176   IFS="$ac_save_ifs"
3177 fi
3178 fi
3179 AWK="$ac_cv_prog_AWK"
3180 if test -n "$AWK"; then
3181   echo "$ac_t""$AWK" 1>&6
3182 else
3183   echo "$ac_t""no" 1>&6
3184 fi
3185
3186 test -n "$AWK" && break
3187 done
3188
3189 # test for ln hardlink support
3190 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3191 echo "configure:3192: checking whether ln works" >&5
3192 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3193   echo $ac_n "(cached) $ac_c" 1>&6
3194 else
3195   rm -f conftest.src conftest.dst
3196 echo "conftest" > conftest.src
3197 if ln conftest.src conftest.dst 2>/dev/null
3198 then
3199   ol_cv_prog_LN_H="ln"
3200 else
3201   ol_cv_prog_LN_H="cp"
3202 fi
3203 rm -f conftest.src conftest.dst
3204
3205 fi
3206 LN_H="$ol_cv_prog_LN_H"
3207 if test "$ol_cv_prog_LN_H" = "ln"; then
3208         echo "$ac_t""yes" 1>&6
3209 else
3210         echo "$ac_t""no" 1>&6
3211 fi
3212
3213 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3214 echo "configure:3215: checking whether ln -s works" >&5
3215 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   rm -f conftestdata
3219 if ln -s X conftestdata 2>/dev/null
3220 then
3221   rm -f conftestdata
3222   ac_cv_prog_LN_S="ln -s"
3223 else
3224   ac_cv_prog_LN_S=ln
3225 fi
3226 fi
3227 LN_S="$ac_cv_prog_LN_S"
3228 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3229   echo "$ac_t""yes" 1>&6
3230 else
3231   echo "$ac_t""no" 1>&6
3232 fi
3233
3234
3235 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3236         LN_S="$LN_H"
3237 fi
3238
3239 # Extract the first word of "sendmail", so it can be a program name with args.
3240 set dummy sendmail; ac_word=$2
3241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3242 echo "configure:3243: checking for $ac_word" >&5
3243 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   case "$SENDMAIL" in
3247   /*)
3248   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3249   ;;
3250   ?:/*)
3251   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3252   ;;
3253   *)
3254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3255   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3256   for ac_dir in $ac_dummy; do 
3257     test -z "$ac_dir" && ac_dir=.
3258     if test -f $ac_dir/$ac_word; then
3259       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3260       break
3261     fi
3262   done
3263   IFS="$ac_save_ifs"
3264   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3265   ;;
3266 esac
3267 fi
3268 SENDMAIL="$ac_cv_path_SENDMAIL"
3269 if test -n "$SENDMAIL"; then
3270   echo "$ac_t""$SENDMAIL" 1>&6
3271 else
3272   echo "$ac_t""no" 1>&6
3273 fi
3274
3275 # Extract the first word of "vi", so it can be a program name with args.
3276 set dummy vi; ac_word=$2
3277 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3278 echo "configure:3279: checking for $ac_word" >&5
3279 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3280   echo $ac_n "(cached) $ac_c" 1>&6
3281 else
3282   case "$EDITOR" in
3283   /*)
3284   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3285   ;;
3286   ?:/*)
3287   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3288   ;;
3289   *)
3290   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3291   ac_dummy="$PATH:/usr/ucb"
3292   for ac_dir in $ac_dummy; do 
3293     test -z "$ac_dir" && ac_dir=.
3294     if test -f $ac_dir/$ac_word; then
3295       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3296       break
3297     fi
3298   done
3299   IFS="$ac_save_ifs"
3300   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3301   ;;
3302 esac
3303 fi
3304 EDITOR="$ac_cv_path_EDITOR"
3305 if test -n "$EDITOR"; then
3306   echo "$ac_t""$EDITOR" 1>&6
3307 else
3308   echo "$ac_t""no" 1>&6
3309 fi
3310
3311 # Extract the first word of "finger", so it can be a program name with args.
3312 set dummy finger; ac_word=$2
3313 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3314 echo "configure:3315: checking for $ac_word" >&5
3315 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3316   echo $ac_n "(cached) $ac_c" 1>&6
3317 else
3318   case "$FINGER" in
3319   /*)
3320   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3321   ;;
3322   ?:/*)
3323   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3324   ;;
3325   *)
3326   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3327   ac_dummy="$PATH:/usr/ucb"
3328   for ac_dir in $ac_dummy; do 
3329     test -z "$ac_dir" && ac_dir=.
3330     if test -f $ac_dir/$ac_word; then
3331       ac_cv_path_FINGER="$ac_dir/$ac_word"
3332       break
3333     fi
3334   done
3335   IFS="$ac_save_ifs"
3336   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3337   ;;
3338 esac
3339 fi
3340 FINGER="$ac_cv_path_FINGER"
3341 if test -n "$FINGER"; then
3342   echo "$ac_t""$FINGER" 1>&6
3343 else
3344   echo "$ac_t""no" 1>&6
3345 fi
3346
3347
3348 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3349 echo "configure:3350: checking how to run the C preprocessor" >&5
3350 # On Suns, sometimes $CPP names a directory.
3351 if test -n "$CPP" && test -d "$CPP"; then
3352   CPP=
3353 fi
3354 if test -z "$CPP"; then
3355 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3356   echo $ac_n "(cached) $ac_c" 1>&6
3357 else
3358     # This must be in double quotes, not single quotes, because CPP may get
3359   # substituted into the Makefile and "${CC-cc}" will confuse make.
3360   CPP="${CC-cc} -E"
3361   # On the NeXT, cc -E runs the code through the compiler's parser,
3362   # not just through cpp.
3363   cat > conftest.$ac_ext <<EOF
3364 #line 3365 "configure"
3365 #include "confdefs.h"
3366 #include <assert.h>
3367 Syntax Error
3368 EOF
3369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3370 { (eval echo configure:3371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3372 if test -z "$ac_err"; then
3373   :
3374 else
3375   echo "$ac_err" >&5
3376   echo "configure: failed program was:" >&5
3377   cat conftest.$ac_ext >&5
3378   rm -rf conftest*
3379   CPP="${CC-cc} -E -traditional-cpp"
3380   cat > conftest.$ac_ext <<EOF
3381 #line 3382 "configure"
3382 #include "confdefs.h"
3383 #include <assert.h>
3384 Syntax Error
3385 EOF
3386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3387 { (eval echo configure:3388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3389 if test -z "$ac_err"; then
3390   :
3391 else
3392   echo "$ac_err" >&5
3393   echo "configure: failed program was:" >&5
3394   cat conftest.$ac_ext >&5
3395   rm -rf conftest*
3396   CPP="${CC-cc} -nologo -E"
3397   cat > conftest.$ac_ext <<EOF
3398 #line 3399 "configure"
3399 #include "confdefs.h"
3400 #include <assert.h>
3401 Syntax Error
3402 EOF
3403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3404 { (eval echo configure:3405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3406 if test -z "$ac_err"; then
3407   :
3408 else
3409   echo "$ac_err" >&5
3410   echo "configure: failed program was:" >&5
3411   cat conftest.$ac_ext >&5
3412   rm -rf conftest*
3413   CPP=/lib/cpp
3414 fi
3415 rm -f conftest*
3416 fi
3417 rm -f conftest*
3418 fi
3419 rm -f conftest*
3420   ac_cv_prog_CPP="$CPP"
3421 fi
3422   CPP="$ac_cv_prog_CPP"
3423 else
3424   ac_cv_prog_CPP="$CPP"
3425 fi
3426 echo "$ac_t""$CPP" 1>&6
3427
3428
3429 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3430         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3431
3432 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3433         echo "configure: warning: programs compiled here do run here..." 1>&2
3434         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3435
3436 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3437         echo "configure: warning: programs compiled here do not run here..." 1>&2
3438         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3439 fi
3440
3441 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3442 echo "configure:3443: checking for AIX" >&5
3443 cat > conftest.$ac_ext <<EOF
3444 #line 3445 "configure"
3445 #include "confdefs.h"
3446 #ifdef _AIX
3447   yes
3448 #endif
3449
3450 EOF
3451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3452   egrep "yes" >/dev/null 2>&1; then
3453   rm -rf conftest*
3454   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3455 #define _ALL_SOURCE 1
3456 EOF
3457
3458 else
3459   rm -rf conftest*
3460   echo "$ac_t""no" 1>&6
3461 fi
3462 rm -f conftest*
3463
3464
3465 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3466 echo "configure:3467: checking for POSIXized ISC" >&5
3467 if test -d /etc/conf/kconfig.d &&
3468   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3469 then
3470   echo "$ac_t""yes" 1>&6
3471   ISC=yes # If later tests want to check for ISC.
3472   cat >> confdefs.h <<\EOF
3473 #define _POSIX_SOURCE 1
3474 EOF
3475
3476   if test "$GCC" = yes; then
3477     CC="$CC -posix"
3478   else
3479     CC="$CC -Xp"
3480   fi
3481 else
3482   echo "$ac_t""no" 1>&6
3483   ISC=
3484 fi
3485
3486 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3487 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3488 echo "configure:3489: checking for minix/config.h" >&5
3489 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3490   echo $ac_n "(cached) $ac_c" 1>&6
3491 else
3492   cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495 #include <minix/config.h>
3496 EOF
3497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3498 { (eval echo configure:3499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3500 if test -z "$ac_err"; then
3501   rm -rf conftest*
3502   eval "ac_cv_header_$ac_safe=yes"
3503 else
3504   echo "$ac_err" >&5
3505   echo "configure: failed program was:" >&5
3506   cat conftest.$ac_ext >&5
3507   rm -rf conftest*
3508   eval "ac_cv_header_$ac_safe=no"
3509 fi
3510 rm -f conftest*
3511 fi
3512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3513   echo "$ac_t""yes" 1>&6
3514   MINIX=yes
3515 else
3516   echo "$ac_t""no" 1>&6
3517 MINIX=
3518 fi
3519
3520 if test "$MINIX" = yes; then
3521   cat >> confdefs.h <<\EOF
3522 #define _POSIX_SOURCE 1
3523 EOF
3524
3525   cat >> confdefs.h <<\EOF
3526 #define _POSIX_1_SOURCE 2
3527 EOF
3528
3529   cat >> confdefs.h <<\EOF
3530 #define _MINIX 1
3531 EOF
3532
3533 fi
3534
3535
3536 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3537 echo "configure:3538: checking for Cygwin environment" >&5
3538 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3539   echo $ac_n "(cached) $ac_c" 1>&6
3540 else
3541   cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544
3545 int main() {
3546
3547 #ifndef __CYGWIN__
3548 #define __CYGWIN__ __CYGWIN32__
3549 #endif
3550 return __CYGWIN__;
3551 ; return 0; }
3552 EOF
3553 if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3554   rm -rf conftest*
3555   ac_cv_cygwin=yes
3556 else
3557   echo "configure: failed program was:" >&5
3558   cat conftest.$ac_ext >&5
3559   rm -rf conftest*
3560   ac_cv_cygwin=no
3561 fi
3562 rm -f conftest*
3563 fi
3564
3565 echo "$ac_t""$ac_cv_cygwin" 1>&6
3566 CYGWIN=
3567 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3568 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3569 echo "configure:3570: checking for mingw32 environment" >&5
3570 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3571   echo $ac_n "(cached) $ac_c" 1>&6
3572 else
3573   cat > conftest.$ac_ext <<EOF
3574 #line 3575 "configure"
3575 #include "confdefs.h"
3576
3577 int main() {
3578 return __MINGW32__;
3579 ; return 0; }
3580 EOF
3581 if { (eval echo configure:3582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3582   rm -rf conftest*
3583   ac_cv_mingw32=yes
3584 else
3585   echo "configure: failed program was:" >&5
3586   cat conftest.$ac_ext >&5
3587   rm -rf conftest*
3588   ac_cv_mingw32=no
3589 fi
3590 rm -f conftest*
3591 fi
3592
3593 echo "$ac_t""$ac_cv_mingw32" 1>&6
3594 MINGW32=
3595 test "$ac_cv_mingw32" = yes && MINGW32=yes
3596 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3597 echo "configure:3598: checking for EMX OS/2 environment" >&5
3598 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   cat > conftest.$ac_ext <<EOF
3602 #line 3603 "configure"
3603 #include "confdefs.h"
3604
3605 int main() {
3606 return __EMX__;
3607 ; return 0; }
3608 EOF
3609 if { (eval echo configure:3610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3610   rm -rf conftest*
3611   ac_cv_emxos2=yes
3612 else
3613   echo "configure: failed program was:" >&5
3614   cat conftest.$ac_ext >&5
3615   rm -rf conftest*
3616   ac_cv_emxos2=no
3617 fi
3618 rm -f conftest*
3619 fi
3620
3621 echo "$ac_t""$ac_cv_emxos2" 1>&6
3622 EMXOS2=
3623 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3624
3625
3626
3627 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3628 echo "configure:3629: checking for executable suffix" >&5
3629 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3630   echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3633   ac_cv_exeext=.exe
3634 else
3635   rm -f conftest*
3636   echo 'int main () { return 0; }' > conftest.$ac_ext
3637   ac_cv_exeext=
3638   if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3639     for file in conftest.*; do
3640       case $file in
3641       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3642       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3643       esac
3644     done
3645   else
3646     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3647   fi
3648   rm -f conftest*
3649   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3650 fi
3651 fi
3652
3653 EXEEXT=""
3654 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3655 echo "$ac_t""${ac_cv_exeext}" 1>&6
3656 ac_exeext=$EXEEXT
3657
3658 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3659 echo "configure:3660: checking for object suffix" >&5
3660 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3661   echo $ac_n "(cached) $ac_c" 1>&6
3662 else
3663   rm -f conftest*
3664 echo 'int i = 1;' > conftest.$ac_ext
3665 if { (eval echo configure:3666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3666   for ac_file in conftest.*; do
3667     case $ac_file in
3668     *.c) ;;
3669     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3670     esac
3671   done
3672 else
3673   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3674 fi
3675 rm -f conftest*
3676 fi
3677
3678 echo "$ac_t""$ac_cv_objext" 1>&6
3679 OBJEXT=$ac_cv_objext
3680 ac_objext=$ac_cv_objext
3681
3682
3683 cat >> confdefs.h <<EOF
3684 #define EXEEXT "${EXEEXT}"
3685 EOF
3686
3687
3688 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3689 echo "configure:3690: checking for be_app in -lbe" >&5
3690 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3692   echo $ac_n "(cached) $ac_c" 1>&6
3693 else
3694   ac_save_LIBS="$LIBS"
3695 LIBS="-lbe -lroot -lnet $LIBS"
3696 cat > conftest.$ac_ext <<EOF
3697 #line 3698 "configure"
3698 #include "confdefs.h"
3699 /* Override any gcc2 internal prototype to avoid an error.  */
3700 /* We use char because int might match the return type of a gcc2
3701     builtin and then its argument prototype would still apply.  */
3702 char be_app();
3703
3704 int main() {
3705 be_app()
3706 ; return 0; }
3707 EOF
3708 if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3709   rm -rf conftest*
3710   eval "ac_cv_lib_$ac_lib_var=yes"
3711 else
3712   echo "configure: failed program was:" >&5
3713   cat conftest.$ac_ext >&5
3714   rm -rf conftest*
3715   eval "ac_cv_lib_$ac_lib_var=no"
3716 fi
3717 rm -f conftest*
3718 LIBS="$ac_save_LIBS"
3719
3720 fi
3721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3722   echo "$ac_t""yes" 1>&6
3723   LIBS="$LIBS -lbe -lroot -lnet"
3724 else
3725   echo "$ac_t""no" 1>&6
3726 :
3727 fi
3728
3729
3730
3731
3732
3733 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3734 echo "configure:3735: checking for ${CC-cc} option to accept ANSI C" >&5
3735 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3736   echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738   am_cv_prog_cc_stdc=no
3739 ac_save_CC="$CC"
3740 # Don't try gcc -ansi; that turns off useful extensions and
3741 # breaks some systems' header files.
3742 # AIX                   -qlanglvl=ansi
3743 # Ultrix and OSF/1      -std1
3744 # HP-UX 10.20 and later -Ae
3745 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3746 # SVR4                  -Xc -D__EXTENSIONS__
3747 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3748 do
3749   CC="$ac_save_CC $ac_arg"
3750   cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753 #include <stdarg.h>
3754 #include <stdio.h>
3755 #include <sys/types.h>
3756 #include <sys/stat.h>
3757 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3758 struct buf { int x; };
3759 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3760 static char *e (p, i)
3761      char **p;
3762      int i;
3763 {
3764   return p[i];
3765 }
3766 static char *f (char * (*g) (char **, int), char **p, ...)
3767 {
3768   char *s;
3769   va_list v;
3770   va_start (v,p);
3771   s = g (p, va_arg (v,int));
3772   va_end (v);
3773   return s;
3774 }
3775 int test (int i, double x);
3776 struct s1 {int (*f) (int a);};
3777 struct s2 {int (*f) (double a);};
3778 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3779 int argc;
3780 char **argv;
3781
3782 int main() {
3783
3784 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3785
3786 ; return 0; }
3787 EOF
3788 if { (eval echo configure:3789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3789   rm -rf conftest*
3790   am_cv_prog_cc_stdc="$ac_arg"; break
3791 else
3792   echo "configure: failed program was:" >&5
3793   cat conftest.$ac_ext >&5
3794 fi
3795 rm -f conftest*
3796 done
3797 CC="$ac_save_CC"
3798
3799 fi
3800
3801 if test -z "$am_cv_prog_cc_stdc"; then
3802   echo "$ac_t""none needed" 1>&6
3803 else
3804   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3805 fi
3806 case "x$am_cv_prog_cc_stdc" in
3807   x|xno) ;;
3808   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3809 esac
3810
3811 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3812         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3813 fi
3814
3815 # test for make depend flag
3816 OL_MKDEP=
3817 OL_MKDEP_FLAGS=
3818 if test -z "${MKDEP}"; then
3819         OL_MKDEP="${CC-cc}"
3820         if test -z "${MKDEP_FLAGS}"; then
3821                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3822 echo "configure:3823: checking for ${OL_MKDEP} depend flag" >&5
3823 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   
3827                         ol_cv_mkdep=no
3828                         for flag in "-M" "-xM"; do
3829                                 cat > conftest.c <<EOF
3830  noCode;
3831 EOF
3832                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3833                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3834                                 then
3835                                         if test ! -f conftest."${ac_object}" ; then
3836                                                 ol_cv_mkdep=$flag
3837                                                 OL_MKDEP_FLAGS="$flag"
3838                                                 break
3839                                         fi
3840                                 fi
3841                         done
3842                         rm -f conftest*
3843                 
3844 fi
3845
3846 echo "$ac_t""$ol_cv_mkdep" 1>&6
3847         else
3848                 cc_cv_mkdep=yes
3849                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3850         fi
3851 else
3852         cc_cv_mkdep=yes
3853         OL_MKDEP="${MKDEP}"
3854         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3855 fi
3856
3857
3858
3859 if test "${ol_cv_mkdep}" = no ; then
3860         # this will soon become an error
3861         echo "configure: warning: do not know how to generate dependencies" 1>&2
3862 fi
3863
3864 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3865 echo "configure:3866: checking for afopen in -ls" >&5
3866 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3867 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3868   echo $ac_n "(cached) $ac_c" 1>&6
3869 else
3870   ac_save_LIBS="$LIBS"
3871 LIBS="-ls  $LIBS"
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 /* Override any gcc2 internal prototype to avoid an error.  */
3876 /* We use char because int might match the return type of a gcc2
3877     builtin and then its argument prototype would still apply.  */
3878 char afopen();
3879
3880 int main() {
3881 afopen()
3882 ; return 0; }
3883 EOF
3884 if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=yes"
3887 else
3888   echo "configure: failed program was:" >&5
3889   cat conftest.$ac_ext >&5
3890   rm -rf conftest*
3891   eval "ac_cv_lib_$ac_lib_var=no"
3892 fi
3893 rm -f conftest*
3894 LIBS="$ac_save_LIBS"
3895
3896 fi
3897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3898   echo "$ac_t""yes" 1>&6
3899   
3900         AUTH_LIBS=-ls
3901         cat >> confdefs.h <<\EOF
3902 #define HAVE_AIX_SECURITY 1
3903 EOF
3904
3905
3906 else
3907   echo "$ac_t""no" 1>&6
3908 fi
3909
3910
3911
3912 ol_link_modules=no
3913 if test $ol_enable_modules != no ; then
3914         for ac_hdr in ltdl.h
3915 do
3916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3918 echo "configure:3919: checking for $ac_hdr" >&5
3919 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3920   echo $ac_n "(cached) $ac_c" 1>&6
3921 else
3922   cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #include <$ac_hdr>
3926 EOF
3927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3928 { (eval echo configure:3929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3930 if test -z "$ac_err"; then
3931   rm -rf conftest*
3932   eval "ac_cv_header_$ac_safe=yes"
3933 else
3934   echo "$ac_err" >&5
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -rf conftest*
3938   eval "ac_cv_header_$ac_safe=no"
3939 fi
3940 rm -f conftest*
3941 fi
3942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3943   echo "$ac_t""yes" 1>&6
3944     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3945   cat >> confdefs.h <<EOF
3946 #define $ac_tr_hdr 1
3947 EOF
3948  
3949 else
3950   echo "$ac_t""no" 1>&6
3951 fi
3952 done
3953
3954
3955         if test $ac_cv_header_ltdl_h = no ; then
3956                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3957         fi
3958
3959         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3960 echo "configure:3961: checking for lt_dlinit in -lltdl" >&5
3961 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3963   echo $ac_n "(cached) $ac_c" 1>&6
3964 else
3965   ac_save_LIBS="$LIBS"
3966 LIBS="-lltdl  $LIBS"
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 /* Override any gcc2 internal prototype to avoid an error.  */
3971 /* We use char because int might match the return type of a gcc2
3972     builtin and then its argument prototype would still apply.  */
3973 char lt_dlinit();
3974
3975 int main() {
3976 lt_dlinit()
3977 ; return 0; }
3978 EOF
3979 if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3980   rm -rf conftest*
3981   eval "ac_cv_lib_$ac_lib_var=yes"
3982 else
3983   echo "configure: failed program was:" >&5
3984   cat conftest.$ac_ext >&5
3985   rm -rf conftest*
3986   eval "ac_cv_lib_$ac_lib_var=no"
3987 fi
3988 rm -f conftest*
3989 LIBS="$ac_save_LIBS"
3990
3991 fi
3992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3993   echo "$ac_t""yes" 1>&6
3994   
3995             MODULES_LIBS=-lltdl
3996             cat >> confdefs.h <<\EOF
3997 #define HAVE_LIBLTDL 1
3998 EOF
3999
4000         
4001 else
4002   echo "$ac_t""no" 1>&6
4003 fi
4004
4005
4006         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4007                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4008         fi
4009         ol_link_modules=yes
4010 else
4011         ol_with_dnssrv_module=static
4012         ol_with_ldap_module=static
4013         ol_with_ldbm_module=static
4014         ol_with_passwd_module=static
4015         ol_with_shell_module=static
4016         ol_with_sql_module=static
4017 fi
4018
4019 # test for EBCDIC
4020 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4021 echo "configure:4022: checking for EBCDIC" >&5
4022 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4023   echo $ac_n "(cached) $ac_c" 1>&6
4024 else
4025   
4026         cat > conftest.$ac_ext <<EOF
4027 #line 4028 "configure"
4028 #include "confdefs.h"
4029
4030 #if !('M' == 0xd4)
4031 #include <__ASCII__/generate_error.h>
4032 #endif
4033
4034 EOF
4035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4036 { (eval echo configure:4037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4038 if test -z "$ac_err"; then
4039   rm -rf conftest*
4040   ol_cv_cpp_ebcdic=yes
4041 else
4042   echo "$ac_err" >&5
4043   echo "configure: failed program was:" >&5
4044   cat conftest.$ac_ext >&5
4045   rm -rf conftest*
4046   ol_cv_cpp_ebcdic=no
4047 fi
4048 rm -f conftest*
4049 fi
4050
4051 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4052 if test $ol_cv_cpp_ebcdic = yes ; then
4053         cat >> confdefs.h <<\EOF
4054 #define HAVE_EBCDIC 1
4055 EOF
4056
4057 fi
4058
4059 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4060 echo "configure:4061: checking for ANSI C header files" >&5
4061 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4062   echo $ac_n "(cached) $ac_c" 1>&6
4063 else
4064   cat > conftest.$ac_ext <<EOF
4065 #line 4066 "configure"
4066 #include "confdefs.h"
4067 #include <stdlib.h>
4068 #include <stdarg.h>
4069 #include <string.h>
4070 #include <float.h>
4071 EOF
4072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4073 { (eval echo configure:4074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4075 if test -z "$ac_err"; then
4076   rm -rf conftest*
4077   ol_cv_header_stdc=yes
4078 else
4079   echo "$ac_err" >&5
4080   echo "configure: failed program was:" >&5
4081   cat conftest.$ac_ext >&5
4082   rm -rf conftest*
4083   ol_cv_header_stdc=no
4084 fi
4085 rm -f conftest*
4086
4087 if test $ol_cv_header_stdc = yes; then
4088   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4089 cat > conftest.$ac_ext <<EOF
4090 #line 4091 "configure"
4091 #include "confdefs.h"
4092 #include <string.h>
4093 EOF
4094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4095   egrep "memchr" >/dev/null 2>&1; then
4096   :
4097 else
4098   rm -rf conftest*
4099   ol_cv_header_stdc=no
4100 fi
4101 rm -f conftest*
4102
4103 fi
4104
4105 if test $ol_cv_header_stdc = yes; then
4106   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4107 cat > conftest.$ac_ext <<EOF
4108 #line 4109 "configure"
4109 #include "confdefs.h"
4110 #include <stdlib.h>
4111 EOF
4112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4113   egrep "free" >/dev/null 2>&1; then
4114   :
4115 else
4116   rm -rf conftest*
4117   ol_cv_header_stdc=no
4118 fi
4119 rm -f conftest*
4120
4121 fi
4122
4123 if test $ol_cv_header_stdc = yes; then
4124   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4125 if test "$cross_compiling" = yes; then
4126   :
4127 else
4128   cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131 #include <ctype.h>
4132 #ifndef HAVE_EBCDIC
4133 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4134 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4135 #else
4136 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4137                 || ('j' <= (c) && (c) <= 'r') \
4138                 || ('s' <= (c) && (c) <= 'z'))
4139 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4140 #endif
4141 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4142 int main () { int i; for (i = 0; i < 256; i++)
4143 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4144 exit (0); }
4145
4146 EOF
4147 if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4148 then
4149   :
4150 else
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -fr conftest*
4154   ol_cv_header_stdc=no
4155 fi
4156 rm -fr conftest*
4157 fi
4158
4159 fi
4160 fi
4161
4162 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4163 if test $ol_cv_header_stdc = yes; then
4164   cat >> confdefs.h <<\EOF
4165 #define STDC_HEADERS 1
4166 EOF
4167
4168 fi
4169 ac_cv_header_stdc=disable
4170
4171
4172 if test $ol_cv_header_stdc != yes; then
4173         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4174 fi
4175
4176 ac_header_dirent=no
4177 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4178 do
4179 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4180 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4181 echo "configure:4182: checking for $ac_hdr that defines DIR" >&5
4182 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4183   echo $ac_n "(cached) $ac_c" 1>&6
4184 else
4185   cat > conftest.$ac_ext <<EOF
4186 #line 4187 "configure"
4187 #include "confdefs.h"
4188 #include <sys/types.h>
4189 #include <$ac_hdr>
4190 int main() {
4191 DIR *dirp = 0;
4192 ; return 0; }
4193 EOF
4194 if { (eval echo configure:4195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4195   rm -rf conftest*
4196   eval "ac_cv_header_dirent_$ac_safe=yes"
4197 else
4198   echo "configure: failed program was:" >&5
4199   cat conftest.$ac_ext >&5
4200   rm -rf conftest*
4201   eval "ac_cv_header_dirent_$ac_safe=no"
4202 fi
4203 rm -f conftest*
4204 fi
4205 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4206   echo "$ac_t""yes" 1>&6
4207     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4208   cat >> confdefs.h <<EOF
4209 #define $ac_tr_hdr 1
4210 EOF
4211  ac_header_dirent=$ac_hdr; break
4212 else
4213   echo "$ac_t""no" 1>&6
4214 fi
4215 done
4216 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4217 if test $ac_header_dirent = dirent.h; then
4218 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4219 echo "configure:4220: checking for opendir in -ldir" >&5
4220 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4221 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   ac_save_LIBS="$LIBS"
4225 LIBS="-ldir  $LIBS"
4226 cat > conftest.$ac_ext <<EOF
4227 #line 4228 "configure"
4228 #include "confdefs.h"
4229 /* Override any gcc2 internal prototype to avoid an error.  */
4230 /* We use char because int might match the return type of a gcc2
4231     builtin and then its argument prototype would still apply.  */
4232 char opendir();
4233
4234 int main() {
4235 opendir()
4236 ; return 0; }
4237 EOF
4238 if { (eval echo configure:4239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4239   rm -rf conftest*
4240   eval "ac_cv_lib_$ac_lib_var=yes"
4241 else
4242   echo "configure: failed program was:" >&5
4243   cat conftest.$ac_ext >&5
4244   rm -rf conftest*
4245   eval "ac_cv_lib_$ac_lib_var=no"
4246 fi
4247 rm -f conftest*
4248 LIBS="$ac_save_LIBS"
4249
4250 fi
4251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4252   echo "$ac_t""yes" 1>&6
4253   LIBS="$LIBS -ldir"
4254 else
4255   echo "$ac_t""no" 1>&6
4256 fi
4257
4258 else
4259 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4260 echo "configure:4261: checking for opendir in -lx" >&5
4261 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4263   echo $ac_n "(cached) $ac_c" 1>&6
4264 else
4265   ac_save_LIBS="$LIBS"
4266 LIBS="-lx  $LIBS"
4267 cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4270 /* Override any gcc2 internal prototype to avoid an error.  */
4271 /* We use char because int might match the return type of a gcc2
4272     builtin and then its argument prototype would still apply.  */
4273 char opendir();
4274
4275 int main() {
4276 opendir()
4277 ; return 0; }
4278 EOF
4279 if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4280   rm -rf conftest*
4281   eval "ac_cv_lib_$ac_lib_var=yes"
4282 else
4283   echo "configure: failed program was:" >&5
4284   cat conftest.$ac_ext >&5
4285   rm -rf conftest*
4286   eval "ac_cv_lib_$ac_lib_var=no"
4287 fi
4288 rm -f conftest*
4289 LIBS="$ac_save_LIBS"
4290
4291 fi
4292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4293   echo "$ac_t""yes" 1>&6
4294   LIBS="$LIBS -lx"
4295 else
4296   echo "$ac_t""no" 1>&6
4297 fi
4298
4299 fi
4300
4301 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4302 echo "configure:4303: checking for sys/wait.h that is POSIX.1 compatible" >&5
4303 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4304   echo $ac_n "(cached) $ac_c" 1>&6
4305 else
4306   cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 #include <sys/types.h>
4310 #include <sys/wait.h>
4311 #ifndef WEXITSTATUS
4312 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4313 #endif
4314 #ifndef WIFEXITED
4315 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4316 #endif
4317 int main() {
4318 int s;
4319 wait (&s);
4320 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4321 ; return 0; }
4322 EOF
4323 if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4324   rm -rf conftest*
4325   ac_cv_header_sys_wait_h=yes
4326 else
4327   echo "configure: failed program was:" >&5
4328   cat conftest.$ac_ext >&5
4329   rm -rf conftest*
4330   ac_cv_header_sys_wait_h=no
4331 fi
4332 rm -f conftest*
4333 fi
4334
4335 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4336 if test $ac_cv_header_sys_wait_h = yes; then
4337   cat >> confdefs.h <<\EOF
4338 #define HAVE_SYS_WAIT_H 1
4339 EOF
4340
4341 fi
4342
4343 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4344 echo "configure:4345: checking POSIX termios" >&5
4345 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4346   echo $ac_n "(cached) $ac_c" 1>&6
4347 else
4348   cat > conftest.$ac_ext <<EOF
4349 #line 4350 "configure"
4350 #include "confdefs.h"
4351 #include <sys/types.h>
4352 #include <unistd.h>
4353 #include <termios.h>
4354 int main() {
4355 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4356    tcgetattr(0, 0);
4357 ; return 0; }
4358 EOF
4359 if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4360   rm -rf conftest*
4361   am_cv_sys_posix_termios=yes
4362 else
4363   echo "configure: failed program was:" >&5
4364   cat conftest.$ac_ext >&5
4365   rm -rf conftest*
4366   am_cv_sys_posix_termios=no
4367 fi
4368 rm -f conftest*
4369 fi
4370
4371 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4372
4373
4374  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4375 echo "configure:4376: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4376 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4377   echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4380
4381   gwinsz_in_termios_h=no
4382   if test $am_cv_sys_posix_termios = yes; then
4383     cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 #include <sys/types.h>
4387 #     include <termios.h>
4388 #     ifdef TIOCGWINSZ
4389         yes
4390 #     endif
4391     
4392 EOF
4393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4394   egrep "yes" >/dev/null 2>&1; then
4395   rm -rf conftest*
4396   gwinsz_in_termios_h=yes
4397 fi
4398 rm -f conftest*
4399
4400   fi
4401
4402   if test $gwinsz_in_termios_h = no; then
4403     cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4406 #include <sys/types.h>
4407 #     include <sys/ioctl.h>
4408 #     ifdef TIOCGWINSZ
4409         yes
4410 #     endif
4411     
4412 EOF
4413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4414   egrep "yes" >/dev/null 2>&1; then
4415   rm -rf conftest*
4416   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4417 fi
4418 rm -f conftest*
4419
4420   fi
4421   
4422 fi
4423
4424 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4425   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4426     cat >> confdefs.h <<\EOF
4427 #define GWINSZ_IN_SYS_IOCTL 1
4428 EOF
4429
4430   fi
4431
4432 if test $am_cv_sys_posix_termios = yes ; then
4433         cat >> confdefs.h <<\EOF
4434 #define HAVE_POSIX_TERMIOS 1
4435 EOF
4436
4437 fi
4438
4439 for ac_hdr in \
4440         arpa/inet.h             \
4441         arpa/nameser.h  \
4442         assert.h                \
4443         conio.h                 \
4444         crypt.h                 \
4445         direct.h                \
4446         errno.h                 \
4447         fcntl.h                 \
4448         filio.h                 \
4449         getopt.h                \
4450         grp.h                   \
4451         io.h                    \
4452         libutil.h               \
4453         limits.h                \
4454         locale.h                \
4455         netinet/tcp.h   \
4456         malloc.h                \
4457         memory.h                \
4458         psap.h                  \
4459         pwd.h                   \
4460         process.h               \
4461         resolv.h                \
4462         sgtty.h                 \
4463         shadow.h                \
4464         stddef.h                \
4465         string.h                \
4466         strings.h               \
4467         sysexits.h              \
4468         sys/file.h              \
4469         sys/filio.h             \
4470         sys/errno.h             \
4471         sys/ioctl.h             \
4472         sys/param.h             \
4473         sys/resource.h  \
4474         sys/select.h    \
4475         sys/socket.h    \
4476         sys/syslog.h    \
4477         sys/time.h              \
4478         sys/types.h             \
4479         syslog.h                \
4480         termios.h               \
4481         unistd.h                \
4482         winsock.h               \
4483
4484 do
4485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4487 echo "configure:4488: checking for $ac_hdr" >&5
4488 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   cat > conftest.$ac_ext <<EOF
4492 #line 4493 "configure"
4493 #include "confdefs.h"
4494 #include <$ac_hdr>
4495 EOF
4496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4497 { (eval echo configure:4498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4499 if test -z "$ac_err"; then
4500   rm -rf conftest*
4501   eval "ac_cv_header_$ac_safe=yes"
4502 else
4503   echo "$ac_err" >&5
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -rf conftest*
4507   eval "ac_cv_header_$ac_safe=no"
4508 fi
4509 rm -f conftest*
4510 fi
4511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4512   echo "$ac_t""yes" 1>&6
4513     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4514   cat >> confdefs.h <<EOF
4515 #define $ac_tr_hdr 1
4516 EOF
4517  
4518 else
4519   echo "$ac_t""no" 1>&6
4520 fi
4521 done
4522
4523
4524
4525
4526 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4527 echo "configure:4528: checking for sigset in -lV3" >&5
4528 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   ac_save_LIBS="$LIBS"
4533 LIBS="-lV3  $LIBS"
4534 cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537 /* Override any gcc2 internal prototype to avoid an error.  */
4538 /* We use char because int might match the return type of a gcc2
4539     builtin and then its argument prototype would still apply.  */
4540 char sigset();
4541
4542 int main() {
4543 sigset()
4544 ; return 0; }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547   rm -rf conftest*
4548   eval "ac_cv_lib_$ac_lib_var=yes"
4549 else
4550   echo "configure: failed program was:" >&5
4551   cat conftest.$ac_ext >&5
4552   rm -rf conftest*
4553   eval "ac_cv_lib_$ac_lib_var=no"
4554 fi
4555 rm -f conftest*
4556 LIBS="$ac_save_LIBS"
4557
4558 fi
4559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4560   echo "$ac_t""yes" 1>&6
4561     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4562     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4563   cat >> confdefs.h <<EOF
4564 #define $ac_tr_lib 1
4565 EOF
4566
4567   LIBS="-lV3 $LIBS"
4568
4569 else
4570   echo "$ac_t""no" 1>&6
4571 fi
4572
4573
4574 if test $ac_cv_header_winsock_h = yes; then
4575         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4576 echo "configure:4577: checking for winsock" >&5
4577 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4578   echo $ac_n "(cached) $ac_c" 1>&6
4579 else
4580   cat > conftest.$ac_ext <<EOF
4581 #line 4582 "configure"
4582 #include "confdefs.h"
4583 #include <winsock.h>
4584 int main() {
4585
4586                         socket(0,0,0);
4587                         select(0,NULL,NULL,NULL,NULL);
4588                         closesocket(0);
4589                         gethostname(NULL,0);
4590         
4591 ; return 0; }
4592 EOF
4593 if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4594   rm -rf conftest*
4595   ol_cv_winsock=yes
4596 else
4597   echo "configure: failed program was:" >&5
4598   cat conftest.$ac_ext >&5
4599   rm -rf conftest*
4600   ol_cv_winsock=no
4601 fi
4602 rm -f conftest*]
4603 fi
4604
4605 echo "$ac_t""$ol_cv_winsock" 1>&6
4606
4607         if test $ol_cv_winsock = yes ; then
4608                 cat >> confdefs.h <<\EOF
4609 #define HAVE_WINSOCK 1
4610 EOF
4611
4612                 ac_cv_func_socket=yes
4613                 ac_cv_func_select=yes
4614                 ac_cv_func_closesocket=yes
4615                 ac_cv_func_gethostname=yes
4616         fi
4617 fi
4618
4619
4620 echo $ac_n "checking for socket""... $ac_c" 1>&6
4621 echo "configure:4622: checking for socket" >&5
4622 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4623   echo $ac_n "(cached) $ac_c" 1>&6
4624 else
4625   cat > conftest.$ac_ext <<EOF
4626 #line 4627 "configure"
4627 #include "confdefs.h"
4628 /* System header to define __stub macros and hopefully few prototypes,
4629     which can conflict with char socket(); below.  */
4630 #include <assert.h>
4631 /* Override any gcc2 internal prototype to avoid an error.  */
4632 /* We use char because int might match the return type of a gcc2
4633     builtin and then its argument prototype would still apply.  */
4634 char socket();
4635 char (*f)();
4636
4637 int main() {
4638
4639 /* The GNU C library defines this for functions which it implements
4640     to always fail with ENOSYS.  Some functions are actually named
4641     something starting with __ and the normal name is an alias.  */
4642 #if defined (__stub_socket) || defined (__stub___socket)
4643 choke me
4644 #else
4645 f = socket;
4646 #endif
4647
4648 ; return 0; }
4649 EOF
4650 if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4651   rm -rf conftest*
4652   eval "ac_cv_func_socket=yes"
4653 else
4654   echo "configure: failed program was:" >&5
4655   cat conftest.$ac_ext >&5
4656   rm -rf conftest*
4657   eval "ac_cv_func_socket=no"
4658 fi
4659 rm -f conftest*
4660 fi
4661
4662 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4663   echo "$ac_t""yes" 1>&6
4664   :
4665 else
4666   echo "$ac_t""no" 1>&6
4667         
4668         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4669 echo "configure:4670: checking for main in -lsocket" >&5
4670 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4671 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   ac_save_LIBS="$LIBS"
4675 LIBS="-lsocket  $LIBS"
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679
4680 int main() {
4681 main()
4682 ; return 0; }
4683 EOF
4684 if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4685   rm -rf conftest*
4686   eval "ac_cv_lib_$ac_lib_var=yes"
4687 else
4688   echo "configure: failed program was:" >&5
4689   cat conftest.$ac_ext >&5
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=no"
4692 fi
4693 rm -f conftest*
4694 LIBS="$ac_save_LIBS"
4695
4696 fi
4697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4698   echo "$ac_t""yes" 1>&6
4699     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4700     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4701   cat >> confdefs.h <<EOF
4702 #define $ac_tr_lib 1
4703 EOF
4704
4705   LIBS="-lsocket $LIBS"
4706
4707 else
4708   echo "$ac_t""no" 1>&6
4709 fi
4710
4711         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4712 echo "configure:4713: checking for main in -lnet" >&5
4713 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4714 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4715   echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717   ac_save_LIBS="$LIBS"
4718 LIBS="-lnet  $LIBS"
4719 cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722
4723 int main() {
4724 main()
4725 ; return 0; }
4726 EOF
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4728   rm -rf conftest*
4729   eval "ac_cv_lib_$ac_lib_var=yes"
4730 else
4731   echo "configure: failed program was:" >&5
4732   cat conftest.$ac_ext >&5
4733   rm -rf conftest*
4734   eval "ac_cv_lib_$ac_lib_var=no"
4735 fi
4736 rm -f conftest*
4737 LIBS="$ac_save_LIBS"
4738
4739 fi
4740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4741   echo "$ac_t""yes" 1>&6
4742     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4743     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4744   cat >> confdefs.h <<EOF
4745 #define $ac_tr_lib 1
4746 EOF
4747
4748   LIBS="-lnet $LIBS"
4749
4750 else
4751   echo "$ac_t""no" 1>&6
4752 fi
4753
4754         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4755 echo "configure:4756: checking for main in -lnsl_s" >&5
4756 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4758   echo $ac_n "(cached) $ac_c" 1>&6
4759 else
4760   ac_save_LIBS="$LIBS"
4761 LIBS="-lnsl_s  $LIBS"
4762 cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765
4766 int main() {
4767 main()
4768 ; return 0; }
4769 EOF
4770 if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4771   rm -rf conftest*
4772   eval "ac_cv_lib_$ac_lib_var=yes"
4773 else
4774   echo "configure: failed program was:" >&5
4775   cat conftest.$ac_ext >&5
4776   rm -rf conftest*
4777   eval "ac_cv_lib_$ac_lib_var=no"
4778 fi
4779 rm -f conftest*
4780 LIBS="$ac_save_LIBS"
4781
4782 fi
4783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4786     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4787   cat >> confdefs.h <<EOF
4788 #define $ac_tr_lib 1
4789 EOF
4790
4791   LIBS="-lnsl_s $LIBS"
4792
4793 else
4794   echo "$ac_t""no" 1>&6
4795 fi
4796
4797         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4798 echo "configure:4799: checking for main in -lnsl" >&5
4799 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   ac_save_LIBS="$LIBS"
4804 LIBS="-lnsl  $LIBS"
4805 cat > conftest.$ac_ext <<EOF
4806 #line 4807 "configure"
4807 #include "confdefs.h"
4808
4809 int main() {
4810 main()
4811 ; return 0; }
4812 EOF
4813 if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4814   rm -rf conftest*
4815   eval "ac_cv_lib_$ac_lib_var=yes"
4816 else
4817   echo "configure: failed program was:" >&5
4818   cat conftest.$ac_ext >&5
4819   rm -rf conftest*
4820   eval "ac_cv_lib_$ac_lib_var=no"
4821 fi
4822 rm -f conftest*
4823 LIBS="$ac_save_LIBS"
4824
4825 fi
4826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4827   echo "$ac_t""yes" 1>&6
4828     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4829     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4830   cat >> confdefs.h <<EOF
4831 #define $ac_tr_lib 1
4832 EOF
4833
4834   LIBS="-lnsl $LIBS"
4835
4836 else
4837   echo "$ac_t""no" 1>&6
4838 fi
4839
4840         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4841 echo "configure:4842: checking for socket in -linet" >&5
4842 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4843 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4844   echo $ac_n "(cached) $ac_c" 1>&6
4845 else
4846   ac_save_LIBS="$LIBS"
4847 LIBS="-linet  $LIBS"
4848 cat > conftest.$ac_ext <<EOF
4849 #line 4850 "configure"
4850 #include "confdefs.h"
4851 /* Override any gcc2 internal prototype to avoid an error.  */
4852 /* We use char because int might match the return type of a gcc2
4853     builtin and then its argument prototype would still apply.  */
4854 char socket();
4855
4856 int main() {
4857 socket()
4858 ; return 0; }
4859 EOF
4860 if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4861   rm -rf conftest*
4862   eval "ac_cv_lib_$ac_lib_var=yes"
4863 else
4864   echo "configure: failed program was:" >&5
4865   cat conftest.$ac_ext >&5
4866   rm -rf conftest*
4867   eval "ac_cv_lib_$ac_lib_var=no"
4868 fi
4869 rm -f conftest*
4870 LIBS="$ac_save_LIBS"
4871
4872 fi
4873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4874   echo "$ac_t""yes" 1>&6
4875     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4876     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4877   cat >> confdefs.h <<EOF
4878 #define $ac_tr_lib 1
4879 EOF
4880
4881   LIBS="-linet $LIBS"
4882
4883 else
4884   echo "$ac_t""no" 1>&6
4885 fi
4886
4887         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4888 echo "configure:4889: checking for main in -lgen" >&5
4889 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4891   echo $ac_n "(cached) $ac_c" 1>&6
4892 else
4893   ac_save_LIBS="$LIBS"
4894 LIBS="-lgen  $LIBS"
4895 cat > conftest.$ac_ext <<EOF
4896 #line 4897 "configure"
4897 #include "confdefs.h"
4898
4899 int main() {
4900 main()
4901 ; return 0; }
4902 EOF
4903 if { (eval echo configure:4904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4904   rm -rf conftest*
4905   eval "ac_cv_lib_$ac_lib_var=yes"
4906 else
4907   echo "configure: failed program was:" >&5
4908   cat conftest.$ac_ext >&5
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=no"
4911 fi
4912 rm -f conftest*
4913 LIBS="$ac_save_LIBS"
4914
4915 fi
4916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4917   echo "$ac_t""yes" 1>&6
4918     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4919     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4920   cat >> confdefs.h <<EOF
4921 #define $ac_tr_lib 1
4922 EOF
4923
4924   LIBS="-lgen $LIBS"
4925
4926 else
4927   echo "$ac_t""no" 1>&6
4928 fi
4929
4930
4931 fi
4932
4933
4934 echo $ac_n "checking for select""... $ac_c" 1>&6
4935 echo "configure:4936: checking for select" >&5
4936 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4937   echo $ac_n "(cached) $ac_c" 1>&6
4938 else
4939   cat > conftest.$ac_ext <<EOF
4940 #line 4941 "configure"
4941 #include "confdefs.h"
4942 /* System header to define __stub macros and hopefully few prototypes,
4943     which can conflict with char select(); below.  */
4944 #include <assert.h>
4945 /* Override any gcc2 internal prototype to avoid an error.  */
4946 /* We use char because int might match the return type of a gcc2
4947     builtin and then its argument prototype would still apply.  */
4948 char select();
4949 char (*f)();
4950
4951 int main() {
4952
4953 /* The GNU C library defines this for functions which it implements
4954     to always fail with ENOSYS.  Some functions are actually named
4955     something starting with __ and the normal name is an alias.  */
4956 #if defined (__stub_select) || defined (__stub___select)
4957 choke me
4958 #else
4959 f = select;
4960 #endif
4961
4962 ; return 0; }
4963 EOF
4964 if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4965   rm -rf conftest*
4966   eval "ac_cv_func_select=yes"
4967 else
4968   echo "configure: failed program was:" >&5
4969   cat conftest.$ac_ext >&5
4970   rm -rf conftest*
4971   eval "ac_cv_func_select=no"
4972 fi
4973 rm -f conftest*
4974 fi
4975
4976 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4977   echo "$ac_t""yes" 1>&6
4978   :
4979 else
4980   echo "$ac_t""no" 1>&6
4981 { echo "configure: error: select() required." 1>&2; exit 1; }
4982 fi
4983
4984
4985 if test "${ac_cv_header_winsock_h}" != yes; then
4986                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4987 echo "configure:4988: checking types of arguments for select()" >&5
4988  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4989   echo $ac_n "(cached) $ac_c" 1>&6
4990 else
4991    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4992   echo $ac_n "(cached) $ac_c" 1>&6
4993 else
4994     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4995   echo $ac_n "(cached) $ac_c" 1>&6
4996 else
4997      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4998      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4999       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5000        cat > conftest.$ac_ext <<EOF
5001 #line 5002 "configure"
5002 #include "confdefs.h"
5003 #ifdef HAVE_SYS_TYPES_H
5004 #include <sys/types.h>
5005 #endif
5006 #ifdef HAVE_SYS_TIME_H
5007 #include <sys/time.h>
5008 #endif
5009 #ifdef HAVE_SYS_SELECT_H
5010 #include <sys/select.h>
5011 #endif
5012 #ifdef HAVE_SYS_SOCKET_H
5013 #include <sys/socket.h>
5014 #endif
5015 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);
5016 int main() {
5017
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5021   rm -rf conftest*
5022           ac_not_found=no ; break 3
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   ac_not_found=yes
5028 fi
5029 rm -f conftest*
5030       done
5031      done
5032     done
5033    
5034 fi
5035   
5036 fi
5037  
5038 fi
5039  if test "$ac_not_found" = yes; then
5040   ac_cv_func_select_arg1=int 
5041   ac_cv_func_select_arg234='int *' 
5042   ac_cv_func_select_arg5='struct timeval *'
5043  fi
5044  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5045  cat >> confdefs.h <<EOF
5046 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5047 EOF
5048
5049  cat >> confdefs.h <<EOF
5050 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5051 EOF
5052
5053  cat >> confdefs.h <<EOF
5054 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5055 EOF
5056
5057
5058 fi
5059
5060
5061 for ac_hdr in regex.h 
5062 do
5063 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5064 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5065 echo "configure:5066: checking for $ac_hdr" >&5
5066 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5067   echo $ac_n "(cached) $ac_c" 1>&6
5068 else
5069   cat > conftest.$ac_ext <<EOF
5070 #line 5071 "configure"
5071 #include "confdefs.h"
5072 #include <$ac_hdr>
5073 EOF
5074 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5075 { (eval echo configure:5076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5076 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5077 if test -z "$ac_err"; then
5078   rm -rf conftest*
5079   eval "ac_cv_header_$ac_safe=yes"
5080 else
5081   echo "$ac_err" >&5
5082   echo "configure: failed program was:" >&5
5083   cat conftest.$ac_ext >&5
5084   rm -rf conftest*
5085   eval "ac_cv_header_$ac_safe=no"
5086 fi
5087 rm -f conftest*
5088 fi
5089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5090   echo "$ac_t""yes" 1>&6
5091     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5092   cat >> confdefs.h <<EOF
5093 #define $ac_tr_hdr 1
5094 EOF
5095  
5096 else
5097   echo "$ac_t""no" 1>&6
5098 fi
5099 done
5100
5101 if test "$ac_cv_header_regex_h" != yes ; then
5102         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5103 fi
5104 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5105 echo "configure:5106: checking for regfree" >&5
5106 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5107   echo $ac_n "(cached) $ac_c" 1>&6
5108 else
5109   cat > conftest.$ac_ext <<EOF
5110 #line 5111 "configure"
5111 #include "confdefs.h"
5112 /* System header to define __stub macros and hopefully few prototypes,
5113     which can conflict with char regfree(); below.  */
5114 #include <assert.h>
5115 /* Override any gcc2 internal prototype to avoid an error.  */
5116 /* We use char because int might match the return type of a gcc2
5117     builtin and then its argument prototype would still apply.  */
5118 char regfree();
5119 char (*f)();
5120
5121 int main() {
5122
5123 /* The GNU C library defines this for functions which it implements
5124     to always fail with ENOSYS.  Some functions are actually named
5125     something starting with __ and the normal name is an alias.  */
5126 #if defined (__stub_regfree) || defined (__stub___regfree)
5127 choke me
5128 #else
5129 f = regfree;
5130 #endif
5131
5132 ; return 0; }
5133 EOF
5134 if { (eval echo configure:5135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5135   rm -rf conftest*
5136   eval "ac_cv_func_regfree=yes"
5137 else
5138   echo "configure: failed program was:" >&5
5139   cat conftest.$ac_ext >&5
5140   rm -rf conftest*
5141   eval "ac_cv_func_regfree=no"
5142 fi
5143 rm -f conftest*
5144 fi
5145
5146 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5147   echo "$ac_t""yes" 1>&6
5148   :
5149 else
5150   echo "$ac_t""no" 1>&6
5151 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5152 fi
5153
5154
5155
5156 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5157 echo "configure:5158: checking for compatible POSIX regex" >&5
5158 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5159   echo $ac_n "(cached) $ac_c" 1>&6
5160 else
5161   
5162         if test "$cross_compiling" = yes; then
5163   ol_cv_c_posix_regex=cross
5164 else
5165   cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168
5169 #include <sys/types.h>
5170 #include <regex.h>
5171 static char *pattern, *string;
5172 main()
5173 {
5174         int rc;
5175         regex_t re;
5176
5177         pattern = "^A";
5178
5179         if(regcomp(&re, pattern, 0)) {
5180                 return -1;
5181         }
5182         
5183         string = "ALL MATCH";
5184         
5185         rc = regexec(&re, string, 0, (void*)0, 0);
5186
5187         regfree(&re);
5188
5189         return rc;
5190 }
5191 EOF
5192 if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5193 then
5194   ol_cv_c_posix_regex=yes
5195 else
5196   echo "configure: failed program was:" >&5
5197   cat conftest.$ac_ext >&5
5198   rm -fr conftest*
5199   ol_cv_c_posix_regex=no
5200 fi
5201 rm -fr conftest*
5202 fi
5203
5204 fi
5205
5206 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5207
5208 if test "$ol_cv_c_posix_regex" = no ; then
5209         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5210 fi
5211
5212 ol_link_dnssrv=no
5213 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5214 echo "configure:5215: checking for res_query" >&5
5215 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5216   echo $ac_n "(cached) $ac_c" 1>&6
5217 else
5218   cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221 /* System header to define __stub macros and hopefully few prototypes,
5222     which can conflict with char res_query(); below.  */
5223 #include <assert.h>
5224 /* Override any gcc2 internal prototype to avoid an error.  */
5225 /* We use char because int might match the return type of a gcc2
5226     builtin and then its argument prototype would still apply.  */
5227 char res_query();
5228 char (*f)();
5229
5230 int main() {
5231
5232 /* The GNU C library defines this for functions which it implements
5233     to always fail with ENOSYS.  Some functions are actually named
5234     something starting with __ and the normal name is an alias.  */
5235 #if defined (__stub_res_query) || defined (__stub___res_query)
5236 choke me
5237 #else
5238 f = res_query;
5239 #endif
5240
5241 ; return 0; }
5242 EOF
5243 if { (eval echo configure:5244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5244   rm -rf conftest*
5245   eval "ac_cv_func_res_query=yes"
5246 else
5247   echo "configure: failed program was:" >&5
5248   cat conftest.$ac_ext >&5
5249   rm -rf conftest*
5250   eval "ac_cv_func_res_query=no"
5251 fi
5252 rm -f conftest*
5253 fi
5254
5255 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5256   echo "$ac_t""yes" 1>&6
5257   :
5258 else
5259   echo "$ac_t""no" 1>&6
5260 fi
5261
5262 if test $ac_cv_func_res_query = no ; then 
5263         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5264 echo "configure:5265: checking for res_query in -lbind" >&5
5265 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   ac_save_LIBS="$LIBS"
5270 LIBS="-lbind  $LIBS"
5271 cat > conftest.$ac_ext <<EOF
5272 #line 5273 "configure"
5273 #include "confdefs.h"
5274 /* Override any gcc2 internal prototype to avoid an error.  */
5275 /* We use char because int might match the return type of a gcc2
5276     builtin and then its argument prototype would still apply.  */
5277 char res_query();
5278
5279 int main() {
5280 res_query()
5281 ; return 0; }
5282 EOF
5283 if { (eval echo configure:5284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5284   rm -rf conftest*
5285   eval "ac_cv_lib_$ac_lib_var=yes"
5286 else
5287   echo "configure: failed program was:" >&5
5288   cat conftest.$ac_ext >&5
5289   rm -rf conftest*
5290   eval "ac_cv_lib_$ac_lib_var=no"
5291 fi
5292 rm -f conftest*
5293 LIBS="$ac_save_LIBS"
5294
5295 fi
5296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5297   echo "$ac_t""yes" 1>&6
5298     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5299     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5300   cat >> confdefs.h <<EOF
5301 #define $ac_tr_lib 1
5302 EOF
5303
5304   LIBS="-lbind $LIBS"
5305
5306 else
5307   echo "$ac_t""no" 1>&6
5308 fi
5309
5310         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5311 fi
5312
5313 if test $ac_cv_func_res_query = no ; then 
5314         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5315 echo "configure:5316: checking for __res_query in -lbind" >&5
5316 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5318   echo $ac_n "(cached) $ac_c" 1>&6
5319 else
5320   ac_save_LIBS="$LIBS"
5321 LIBS="-lbind  $LIBS"
5322 cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325 /* Override any gcc2 internal prototype to avoid an error.  */
5326 /* We use char because int might match the return type of a gcc2
5327     builtin and then its argument prototype would still apply.  */
5328 char __res_query();
5329
5330 int main() {
5331 __res_query()
5332 ; return 0; }
5333 EOF
5334 if { (eval echo configure:5335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5335   rm -rf conftest*
5336   eval "ac_cv_lib_$ac_lib_var=yes"
5337 else
5338   echo "configure: failed program was:" >&5
5339   cat conftest.$ac_ext >&5
5340   rm -rf conftest*
5341   eval "ac_cv_lib_$ac_lib_var=no"
5342 fi
5343 rm -f conftest*
5344 LIBS="$ac_save_LIBS"
5345
5346 fi
5347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5348   echo "$ac_t""yes" 1>&6
5349     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5351   cat >> confdefs.h <<EOF
5352 #define $ac_tr_lib 1
5353 EOF
5354
5355   LIBS="-lbind $LIBS"
5356
5357 else
5358   echo "$ac_t""no" 1>&6
5359 fi
5360
5361         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5362 fi
5363
5364 if test $ac_cv_func_res_query = no ; then 
5365         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5366 echo "configure:5367: checking for res_query in -lresolv" >&5
5367 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5369   echo $ac_n "(cached) $ac_c" 1>&6
5370 else
5371   ac_save_LIBS="$LIBS"
5372 LIBS="-lresolv  $LIBS"
5373 cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5376 /* Override any gcc2 internal prototype to avoid an error.  */
5377 /* We use char because int might match the return type of a gcc2
5378     builtin and then its argument prototype would still apply.  */
5379 char res_query();
5380
5381 int main() {
5382 res_query()
5383 ; return 0; }
5384 EOF
5385 if { (eval echo configure:5386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5386   rm -rf conftest*
5387   eval "ac_cv_lib_$ac_lib_var=yes"
5388 else
5389   echo "configure: failed program was:" >&5
5390   cat conftest.$ac_ext >&5
5391   rm -rf conftest*
5392   eval "ac_cv_lib_$ac_lib_var=no"
5393 fi
5394 rm -f conftest*
5395 LIBS="$ac_save_LIBS"
5396
5397 fi
5398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5399   echo "$ac_t""yes" 1>&6
5400     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5401     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5402   cat >> confdefs.h <<EOF
5403 #define $ac_tr_lib 1
5404 EOF
5405
5406   LIBS="-lresolv $LIBS"
5407
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411
5412         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5413 fi
5414
5415 if test "$ac_cv_func_res_query" = yes ; then
5416         cat >> confdefs.h <<\EOF
5417 #define HAVE_RES_QUERY 1
5418 EOF
5419
5420
5421         if test $ol_enable_dnssrv != no ; then
5422                 ol_link_dnssrv=yes
5423         fi
5424 fi
5425
5426 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5427         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5428 fi
5429
5430 for ac_func in getaddrinfo 
5431 do
5432 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5433 echo "configure:5434: checking for $ac_func" >&5
5434 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5435   echo $ac_n "(cached) $ac_c" 1>&6
5436 else
5437   cat > conftest.$ac_ext <<EOF
5438 #line 5439 "configure"
5439 #include "confdefs.h"
5440 /* System header to define __stub macros and hopefully few prototypes,
5441     which can conflict with char $ac_func(); below.  */
5442 #include <assert.h>
5443 /* Override any gcc2 internal prototype to avoid an error.  */
5444 /* We use char because int might match the return type of a gcc2
5445     builtin and then its argument prototype would still apply.  */
5446 char $ac_func();
5447 char (*f)();
5448
5449 int main() {
5450
5451 /* The GNU C library defines this for functions which it implements
5452     to always fail with ENOSYS.  Some functions are actually named
5453     something starting with __ and the normal name is an alias.  */
5454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5455 choke me
5456 #else
5457 f = $ac_func;
5458 #endif
5459
5460 ; return 0; }
5461 EOF
5462 if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5463   rm -rf conftest*
5464   eval "ac_cv_func_$ac_func=yes"
5465 else
5466   echo "configure: failed program was:" >&5
5467   cat conftest.$ac_ext >&5
5468   rm -rf conftest*
5469   eval "ac_cv_func_$ac_func=no"
5470 fi
5471 rm -f conftest*
5472 fi
5473
5474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5475   echo "$ac_t""yes" 1>&6
5476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5477   cat >> confdefs.h <<EOF
5478 #define $ac_tr_func 1
5479 EOF
5480  
5481 else
5482   echo "$ac_t""no" 1>&6
5483 fi
5484 done
5485
5486
5487 ol_link_ipv6=no
5488 if test $ac_cv_func_getaddrinfo = no ; then
5489         if test $ol_enable_ipv6 = yes ; then
5490                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5491         fi
5492 else
5493         for ac_func in gai_strerror 
5494 do
5495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5496 echo "configure:5497: checking for $ac_func" >&5
5497 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5498   echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500   cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 /* System header to define __stub macros and hopefully few prototypes,
5504     which can conflict with char $ac_func(); below.  */
5505 #include <assert.h>
5506 /* Override any gcc2 internal prototype to avoid an error.  */
5507 /* We use char because int might match the return type of a gcc2
5508     builtin and then its argument prototype would still apply.  */
5509 char $ac_func();
5510 char (*f)();
5511
5512 int main() {
5513
5514 /* The GNU C library defines this for functions which it implements
5515     to always fail with ENOSYS.  Some functions are actually named
5516     something starting with __ and the normal name is an alias.  */
5517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5518 choke me
5519 #else
5520 f = $ac_func;
5521 #endif
5522
5523 ; return 0; }
5524 EOF
5525 if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5526   rm -rf conftest*
5527   eval "ac_cv_func_$ac_func=yes"
5528 else
5529   echo "configure: failed program was:" >&5
5530   cat conftest.$ac_ext >&5
5531   rm -rf conftest*
5532   eval "ac_cv_func_$ac_func=no"
5533 fi
5534 rm -f conftest*
5535 fi
5536
5537 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5538   echo "$ac_t""yes" 1>&6
5539     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5540   cat >> confdefs.h <<EOF
5541 #define $ac_tr_func 1
5542 EOF
5543  
5544 else
5545   echo "$ac_t""no" 1>&6
5546 fi
5547 done
5548
5549
5550         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5551 echo "configure:5552: checking INET6_ADDRSTRLEN" >&5
5552 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5553   echo $ac_n "(cached) $ac_c" 1>&6
5554 else
5555   
5556                 cat > conftest.$ac_ext <<EOF
5557 #line 5558 "configure"
5558 #include "confdefs.h"
5559
5560 #                       include <netinet/in.h>
5561 #                       ifdef INET6_ADDRSTRLEN
5562                                 __has_inet6_addrstrlen__;
5563 #                       endif
5564                 
5565 EOF
5566 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5567   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5568   rm -rf conftest*
5569   ol_cv_inet6_addrstrlen=yes
5570 else
5571   rm -rf conftest*
5572   ol_cv_inet6_addrstrlen=no
5573 fi
5574 rm -f conftest*
5575
5576 fi
5577
5578 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5579
5580         if test $ol_cv_inet6_addrstrlen = yes ; then
5581                 ol_link_ipv6=yes
5582         elif test $ol_enable_ipv6 = yes ; then
5583                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5584         fi
5585 fi
5586
5587 if test $ol_enable_local != no ; then
5588         for ac_hdr in sys/un.h 
5589 do
5590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5592 echo "configure:5593: checking for $ac_hdr" >&5
5593 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5594   echo $ac_n "(cached) $ac_c" 1>&6
5595 else
5596   cat > conftest.$ac_ext <<EOF
5597 #line 5598 "configure"
5598 #include "confdefs.h"
5599 #include <$ac_hdr>
5600 EOF
5601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5602 { (eval echo configure:5603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5604 if test -z "$ac_err"; then
5605   rm -rf conftest*
5606   eval "ac_cv_header_$ac_safe=yes"
5607 else
5608   echo "$ac_err" >&5
5609   echo "configure: failed program was:" >&5
5610   cat conftest.$ac_ext >&5
5611   rm -rf conftest*
5612   eval "ac_cv_header_$ac_safe=no"
5613 fi
5614 rm -f conftest*
5615 fi
5616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5617   echo "$ac_t""yes" 1>&6
5618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5619   cat >> confdefs.h <<EOF
5620 #define $ac_tr_hdr 1
5621 EOF
5622  
5623 else
5624   echo "$ac_t""no" 1>&6
5625 fi
5626 done
5627
5628
5629         if test $ol_enable_local = auto ; then
5630                 ol_enable_local=$ac_cv_header_sys_un_h
5631         elif test $ac_cv_header_sys_un_h = no ; then
5632                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5633         fi
5634 fi
5635
5636 ol_link_kbind=no
5637 ol_link_kpasswd=no
5638 ol_link_krb5=no
5639 ol_link_krb4=no
5640
5641 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5642         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5643         -o $ol_with_kerberos = k425 ; then
5644
5645         for ac_hdr in krb5.h
5646 do
5647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5649 echo "configure:5650: checking for $ac_hdr" >&5
5650 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5651   echo $ac_n "(cached) $ac_c" 1>&6
5652 else
5653   cat > conftest.$ac_ext <<EOF
5654 #line 5655 "configure"
5655 #include "confdefs.h"
5656 #include <$ac_hdr>
5657 EOF
5658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5659 { (eval echo configure:5660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5661 if test -z "$ac_err"; then
5662   rm -rf conftest*
5663   eval "ac_cv_header_$ac_safe=yes"
5664 else
5665   echo "$ac_err" >&5
5666   echo "configure: failed program was:" >&5
5667   cat conftest.$ac_ext >&5
5668   rm -rf conftest*
5669   eval "ac_cv_header_$ac_safe=no"
5670 fi
5671 rm -f conftest*
5672 fi
5673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5674   echo "$ac_t""yes" 1>&6
5675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5676   cat >> confdefs.h <<EOF
5677 #define $ac_tr_hdr 1
5678 EOF
5679  
5680 else
5681   echo "$ac_t""no" 1>&6
5682 fi
5683 done
5684
5685
5686         if test $ac_cv_header_krb5_h = yes ; then
5687                                 for ac_hdr in heim_err.h
5688 do
5689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5690 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5691 echo "configure:5692: checking for $ac_hdr" >&5
5692 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5693   echo $ac_n "(cached) $ac_c" 1>&6
5694 else
5695   cat > conftest.$ac_ext <<EOF
5696 #line 5697 "configure"
5697 #include "confdefs.h"
5698 #include <$ac_hdr>
5699 EOF
5700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5701 { (eval echo configure:5702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5703 if test -z "$ac_err"; then
5704   rm -rf conftest*
5705   eval "ac_cv_header_$ac_safe=yes"
5706 else
5707   echo "$ac_err" >&5
5708   echo "configure: failed program was:" >&5
5709   cat conftest.$ac_ext >&5
5710   rm -rf conftest*
5711   eval "ac_cv_header_$ac_safe=no"
5712 fi
5713 rm -f conftest*
5714 fi
5715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5716   echo "$ac_t""yes" 1>&6
5717     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5718   cat >> confdefs.h <<EOF
5719 #define $ac_tr_hdr 1
5720 EOF
5721  
5722 else
5723   echo "$ac_t""no" 1>&6
5724 fi
5725 done
5726
5727                 if test $ac_cv_header_heim_err_h = yes ; then
5728                         krb5_impl=heimdal
5729                 else
5730                         krb5_impl=mit
5731                 fi
5732
5733                 if test $krb5_impl = mit; then
5734                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5735 echo "configure:5736: checking for main in -lkrb5" >&5
5736 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5738   echo $ac_n "(cached) $ac_c" 1>&6
5739 else
5740   ac_save_LIBS="$LIBS"
5741 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5742 cat > conftest.$ac_ext <<EOF
5743 #line 5744 "configure"
5744 #include "confdefs.h"
5745
5746 int main() {
5747 main()
5748 ; return 0; }
5749 EOF
5750 if { (eval echo configure:5751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5751   rm -rf conftest*
5752   eval "ac_cv_lib_$ac_lib_var=yes"
5753 else
5754   echo "configure: failed program was:" >&5
5755   cat conftest.$ac_ext >&5
5756   rm -rf conftest*
5757   eval "ac_cv_lib_$ac_lib_var=no"
5758 fi
5759 rm -f conftest*
5760 LIBS="$ac_save_LIBS"
5761
5762 fi
5763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5764   echo "$ac_t""yes" 1>&6
5765   have_krb5=yes
5766                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5767 else
5768   echo "$ac_t""no" 1>&6
5769 have_krb5=no
5770 fi
5771
5772
5773                 elif test $krb5_impl = heimdal; then
5774                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5775 echo "configure:5776: checking for main in -lkrb5" >&5
5776 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5778   echo $ac_n "(cached) $ac_c" 1>&6
5779 else
5780   ac_save_LIBS="$LIBS"
5781 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5782 cat > conftest.$ac_ext <<EOF
5783 #line 5784 "configure"
5784 #include "confdefs.h"
5785
5786 int main() {
5787 main()
5788 ; return 0; }
5789 EOF
5790 if { (eval echo configure:5791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5791   rm -rf conftest*
5792   eval "ac_cv_lib_$ac_lib_var=yes"
5793 else
5794   echo "configure: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   rm -rf conftest*
5797   eval "ac_cv_lib_$ac_lib_var=no"
5798 fi
5799 rm -f conftest*
5800 LIBS="$ac_save_LIBS"
5801
5802 fi
5803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5804   echo "$ac_t""yes" 1>&6
5805   have_krb5=yes
5806                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5807 else
5808   echo "$ac_t""no" 1>&6
5809 have_krb5=no
5810 fi
5811
5812
5813                         cat >> confdefs.h <<\EOF
5814 #define HAVE_HEIMDAL_KERBEROS 1
5815 EOF
5816
5817                 else
5818                         have_krb5=no
5819                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5820                 fi
5821
5822                 if test $have_krb5 = yes ; then
5823                         ol_link_krb5=yes
5824
5825                         cat >> confdefs.h <<\EOF
5826 #define HAVE_KRB5 1
5827 EOF
5828
5829
5830                         if test $ol_enable_kpasswd != no ; then
5831                                 ol_link_kpasswd=yes;
5832                         fi
5833
5834                         if test $ol_with_kerberos = k5only ; then
5835                                 ol_with_kerberos=found
5836                         fi
5837
5838                 elif test $ol_with_kerberos != auto ; then
5839                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5840                 fi
5841
5842         fi
5843 fi
5844
5845 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
5846         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5847
5848         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5849 do
5850 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5851 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5852 echo "configure:5853: checking for $ac_hdr" >&5
5853 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5854   echo $ac_n "(cached) $ac_c" 1>&6
5855 else
5856   cat > conftest.$ac_ext <<EOF
5857 #line 5858 "configure"
5858 #include "confdefs.h"
5859 #include <$ac_hdr>
5860 EOF
5861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5862 { (eval echo configure:5863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5864 if test -z "$ac_err"; then
5865   rm -rf conftest*
5866   eval "ac_cv_header_$ac_safe=yes"
5867 else
5868   echo "$ac_err" >&5
5869   echo "configure: failed program was:" >&5
5870   cat conftest.$ac_ext >&5
5871   rm -rf conftest*
5872   eval "ac_cv_header_$ac_safe=no"
5873 fi
5874 rm -f conftest*
5875 fi
5876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5877   echo "$ac_t""yes" 1>&6
5878     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5879   cat >> confdefs.h <<EOF
5880 #define $ac_tr_hdr 1
5881 EOF
5882  
5883 else
5884   echo "$ac_t""no" 1>&6
5885 fi
5886 done
5887
5888
5889         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5890                 if test $krb5_impl = mit; then
5891                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5892 echo "configure:5893: checking for main in -lkrb4" >&5
5893 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5894 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5895   echo $ac_n "(cached) $ac_c" 1>&6
5896 else
5897   ac_save_LIBS="$LIBS"
5898 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5899 cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902
5903 int main() {
5904 main()
5905 ; return 0; }
5906 EOF
5907 if { (eval echo configure:5908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5908   rm -rf conftest*
5909   eval "ac_cv_lib_$ac_lib_var=yes"
5910 else
5911   echo "configure: failed program was:" >&5
5912   cat conftest.$ac_ext >&5
5913   rm -rf conftest*
5914   eval "ac_cv_lib_$ac_lib_var=no"
5915 fi
5916 rm -f conftest*
5917 LIBS="$ac_save_LIBS"
5918
5919 fi
5920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5921   echo "$ac_t""yes" 1>&6
5922   have_k425=yes
5923                                 KRB4_LIBS="-lkrb4 -ldes425"
5924 else
5925   echo "$ac_t""no" 1>&6
5926 have_k425=no
5927 fi
5928
5929
5930                 elif test $krb5_impl = heimdal; then
5931                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5932 echo "configure:5933: checking for main in -lkrb4" >&5
5933 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5935   echo $ac_n "(cached) $ac_c" 1>&6
5936 else
5937   ac_save_LIBS="$LIBS"
5938 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5939 cat > conftest.$ac_ext <<EOF
5940 #line 5941 "configure"
5941 #include "confdefs.h"
5942
5943 int main() {
5944 main()
5945 ; return 0; }
5946 EOF
5947 if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5948   rm -rf conftest*
5949   eval "ac_cv_lib_$ac_lib_var=yes"
5950 else
5951   echo "configure: failed program was:" >&5
5952   cat conftest.$ac_ext >&5
5953   rm -rf conftest*
5954   eval "ac_cv_lib_$ac_lib_var=no"
5955 fi
5956 rm -f conftest*
5957 LIBS="$ac_save_LIBS"
5958
5959 fi
5960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5961   echo "$ac_t""yes" 1>&6
5962   have_k425=yes
5963                                 KRB4_LIBS="-lkrb4"
5964 else
5965   echo "$ac_t""no" 1>&6
5966 have_k425=no
5967 fi
5968
5969
5970                 else
5971                         have_425=no
5972                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5973                 fi
5974
5975                 if test $have_k425 = yes ; then
5976                         ol_with_kerberos=found
5977                         ol_link_krb4=yes
5978
5979                         cat >> confdefs.h <<\EOF
5980 #define HAVE_KRB425 1
5981 EOF
5982
5983                         cat >> confdefs.h <<\EOF
5984 #define HAVE_KRB4 1
5985 EOF
5986
5987
5988                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5989 echo "configure:5990: checking for des_debug in Kerberos libraries" >&5
5990 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5991   echo $ac_n "(cached) $ac_c" 1>&6
5992 else
5993   
5994                                                                 save_LIBS="$LIBS"
5995                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
5996                                 cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999
6000 #include <kerberosIV/krb.h>
6001 #include <kerberosIV/des.h>
6002 extern int des_debug;
6003
6004 int main() {
6005
6006 des_debug = 1;
6007
6008 ; return 0; }
6009 EOF
6010 if { (eval echo configure:6011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6011   rm -rf conftest*
6012   ol_cv_var_des_debug=yes
6013 else
6014   echo "configure: failed program was:" >&5
6015   cat conftest.$ac_ext >&5
6016   rm -rf conftest*
6017   ol_cv_var_des_debug=no
6018 fi
6019 rm -f conftest*
6020                                                                 LIBS="$save_LIBS"
6021                         
6022 fi
6023
6024 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6025
6026                         if test $ol_cv_var_des_debug = yes ; then
6027                                 cat >> confdefs.h <<\EOF
6028 #define HAVE_DES_DEBUG 1
6029 EOF
6030
6031                         fi
6032
6033                         LIBS="$save_LIBS"
6034                 fi
6035         fi
6036 fi
6037
6038 if test $ol_link_krb5 = yes ; then
6039         ol_with_kerberos=found
6040 fi
6041
6042 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6043         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6044
6045         for ac_hdr in krb.h des.h krb-archaeology.h 
6046 do
6047 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6048 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6049 echo "configure:6050: checking for $ac_hdr" >&5
6050 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6051   echo $ac_n "(cached) $ac_c" 1>&6
6052 else
6053   cat > conftest.$ac_ext <<EOF
6054 #line 6055 "configure"
6055 #include "confdefs.h"
6056 #include <$ac_hdr>
6057 EOF
6058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6059 { (eval echo configure:6060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6061 if test -z "$ac_err"; then
6062   rm -rf conftest*
6063   eval "ac_cv_header_$ac_safe=yes"
6064 else
6065   echo "$ac_err" >&5
6066   echo "configure: failed program was:" >&5
6067   cat conftest.$ac_ext >&5
6068   rm -rf conftest*
6069   eval "ac_cv_header_$ac_safe=no"
6070 fi
6071 rm -f conftest*
6072 fi
6073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6074   echo "$ac_t""yes" 1>&6
6075     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6076   cat >> confdefs.h <<EOF
6077 #define $ac_tr_hdr 1
6078 EOF
6079  
6080 else
6081   echo "$ac_t""no" 1>&6
6082 fi
6083 done
6084
6085
6086         if test $ac_cv_header_krb_h = yes ; then
6087                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6088 echo "configure:6089: checking for main in -lkrb" >&5
6089 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6091   echo $ac_n "(cached) $ac_c" 1>&6
6092 else
6093   ac_save_LIBS="$LIBS"
6094 LIBS="-lkrb -ldes $LIBS"
6095 cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098
6099 int main() {
6100 main()
6101 ; return 0; }
6102 EOF
6103 if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6104   rm -rf conftest*
6105   eval "ac_cv_lib_$ac_lib_var=yes"
6106 else
6107   echo "configure: failed program was:" >&5
6108   cat conftest.$ac_ext >&5
6109   rm -rf conftest*
6110   eval "ac_cv_lib_$ac_lib_var=no"
6111 fi
6112 rm -f conftest*
6113 LIBS="$ac_save_LIBS"
6114
6115 fi
6116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6117   echo "$ac_t""yes" 1>&6
6118   have_k4=yes
6119 else
6120   echo "$ac_t""no" 1>&6
6121 have_k4=no
6122 fi
6123
6124
6125                 if test $have_k4 = yes ; then
6126                         ol_with_kerberos=found
6127                         ol_link_krb4=yes
6128
6129                         cat >> confdefs.h <<\EOF
6130 #define HAVE_KRB4 1
6131 EOF
6132
6133
6134                         KRB4_LIBS="-lkrb -ldes"
6135
6136                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6137                                 cat >> confdefs.h <<\EOF
6138 #define HAVE_KTH_KERBEROS 1
6139 EOF
6140
6141                         fi
6142                 fi
6143         fi
6144 fi
6145
6146 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6147         ol_link_kpasswd=yes
6148 fi
6149
6150 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6151         ol_link_kbind=yes
6152
6153 elif test $ol_enable_kbind = yes ; then
6154         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6155 fi
6156
6157 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6158         cat >> confdefs.h <<\EOF
6159 #define HAVE_KERBEROS 1
6160 EOF
6161
6162
6163 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6164         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6165 fi
6166
6167 ol_link_tls=no
6168 if test $ol_with_tls != no ; then
6169         for ac_hdr in openssl/ssl.h ssl.h
6170 do
6171 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6172 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6173 echo "configure:6174: checking for $ac_hdr" >&5
6174 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6175   echo $ac_n "(cached) $ac_c" 1>&6
6176 else
6177   cat > conftest.$ac_ext <<EOF
6178 #line 6179 "configure"
6179 #include "confdefs.h"
6180 #include <$ac_hdr>
6181 EOF
6182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6183 { (eval echo configure:6184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6185 if test -z "$ac_err"; then
6186   rm -rf conftest*
6187   eval "ac_cv_header_$ac_safe=yes"
6188 else
6189   echo "$ac_err" >&5
6190   echo "configure: failed program was:" >&5
6191   cat conftest.$ac_ext >&5
6192   rm -rf conftest*
6193   eval "ac_cv_header_$ac_safe=no"
6194 fi
6195 rm -f conftest*
6196 fi
6197 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6198   echo "$ac_t""yes" 1>&6
6199     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6200   cat >> confdefs.h <<EOF
6201 #define $ac_tr_hdr 1
6202 EOF
6203  
6204 else
6205   echo "$ac_t""no" 1>&6
6206 fi
6207 done
6208
6209         
6210         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6211                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6212 echo "configure:6213: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6213 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6215   echo $ac_n "(cached) $ac_c" 1>&6
6216 else
6217   ac_save_LIBS="$LIBS"
6218 LIBS="-lssl -lcrypto $LIBS"
6219 cat > conftest.$ac_ext <<EOF
6220 #line 6221 "configure"
6221 #include "confdefs.h"
6222 /* Override any gcc2 internal prototype to avoid an error.  */
6223 /* We use char because int might match the return type of a gcc2
6224     builtin and then its argument prototype would still apply.  */
6225 char SSLeay_add_ssl_algorithms();
6226
6227 int main() {
6228 SSLeay_add_ssl_algorithms()
6229 ; return 0; }
6230 EOF
6231 if { (eval echo configure:6232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6232   rm -rf conftest*
6233   eval "ac_cv_lib_$ac_lib_var=yes"
6234 else
6235   echo "configure: failed program was:" >&5
6236   cat conftest.$ac_ext >&5
6237   rm -rf conftest*
6238   eval "ac_cv_lib_$ac_lib_var=no"
6239 fi
6240 rm -f conftest*
6241 LIBS="$ac_save_LIBS"
6242
6243 fi
6244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6245   echo "$ac_t""yes" 1>&6
6246   have_ssleay=yes
6247                         need_rsaref=no
6248 else
6249   echo "$ac_t""no" 1>&6
6250 have_ssleay=no
6251 fi
6252
6253                         
6254                 if test $have_ssleay = no ; then
6255                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6256 echo "configure:6257: checking for SSL_library_init in -lssl" >&5
6257 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6259   echo $ac_n "(cached) $ac_c" 1>&6
6260 else
6261   ac_save_LIBS="$LIBS"
6262 LIBS="-lssl -lcrypto $LIBS"
6263 cat > conftest.$ac_ext <<EOF
6264 #line 6265 "configure"
6265 #include "confdefs.h"
6266 /* Override any gcc2 internal prototype to avoid an error.  */
6267 /* We use char because int might match the return type of a gcc2
6268     builtin and then its argument prototype would still apply.  */
6269 char SSL_library_init();
6270
6271 int main() {
6272 SSL_library_init()
6273 ; return 0; }
6274 EOF
6275 if { (eval echo configure:6276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6276   rm -rf conftest*
6277   eval "ac_cv_lib_$ac_lib_var=yes"
6278 else
6279   echo "configure: failed program was:" >&5
6280   cat conftest.$ac_ext >&5
6281   rm -rf conftest*
6282   eval "ac_cv_lib_$ac_lib_var=no"
6283 fi
6284 rm -f conftest*
6285 LIBS="$ac_save_LIBS"
6286
6287 fi
6288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6289   echo "$ac_t""yes" 1>&6
6290   have_ssleay=yes
6291                                 need_rsaref=no
6292 else
6293   echo "$ac_t""no" 1>&6
6294 have_ssleay=no
6295 fi
6296
6297                 fi
6298
6299                 if test $have_ssleay = no ; then
6300                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6301 echo "configure:6302: checking for ssl3_accept in -lssl" >&5
6302 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6303 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6304   echo $ac_n "(cached) $ac_c" 1>&6
6305 else
6306   ac_save_LIBS="$LIBS"
6307 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6308 cat > conftest.$ac_ext <<EOF
6309 #line 6310 "configure"
6310 #include "confdefs.h"
6311 /* Override any gcc2 internal prototype to avoid an error.  */
6312 /* We use char because int might match the return type of a gcc2
6313     builtin and then its argument prototype would still apply.  */
6314 char ssl3_accept();
6315
6316 int main() {
6317 ssl3_accept()
6318 ; return 0; }
6319 EOF
6320 if { (eval echo configure:6321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6321   rm -rf conftest*
6322   eval "ac_cv_lib_$ac_lib_var=yes"
6323 else
6324   echo "configure: failed program was:" >&5
6325   cat conftest.$ac_ext >&5
6326   rm -rf conftest*
6327   eval "ac_cv_lib_$ac_lib_var=no"
6328 fi
6329 rm -f conftest*
6330 LIBS="$ac_save_LIBS"
6331
6332 fi
6333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6334   echo "$ac_t""yes" 1>&6
6335   have_ssleay=yes
6336                                 need_rsaref=yes
6337 else
6338   echo "$ac_t""no" 1>&6
6339 have_ssleay=no
6340 fi
6341
6342                 fi
6343
6344                 if test $have_ssleay = yes ; then
6345                         ol_with_tls=found
6346                         ol_link_tls=yes
6347
6348                         cat >> confdefs.h <<\EOF
6349 #define HAVE_SSLEAY 1
6350 EOF
6351
6352
6353                         if test $need_rsaref = yes; then
6354                                 cat >> confdefs.h <<\EOF
6355 #define HAVE_RSAREF 1
6356 EOF
6357
6358
6359                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6360                         else
6361                                 TLS_LIBS="-lssl -lcrypto"
6362                         fi
6363                 fi
6364         fi
6365
6366 else
6367         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6368 fi
6369
6370 if test $ol_link_tls = yes ; then
6371         cat >> confdefs.h <<\EOF
6372 #define HAVE_TLS 1
6373 EOF
6374
6375
6376 elif test $ol_with_tls = auto ; then
6377         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6378         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6379
6380 elif test $ol_with_tls != no ; then
6381         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6382 fi
6383
6384 for ac_func in \
6385         ctime_r                 \
6386         gethostbyname_r gethostbyaddr_r \
6387
6388 do
6389 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6390 echo "configure:6391: checking for $ac_func" >&5
6391 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6392   echo $ac_n "(cached) $ac_c" 1>&6
6393 else
6394   cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397 /* System header to define __stub macros and hopefully few prototypes,
6398     which can conflict with char $ac_func(); below.  */
6399 #include <assert.h>
6400 /* Override any gcc2 internal prototype to avoid an error.  */
6401 /* We use char because int might match the return type of a gcc2
6402     builtin and then its argument prototype would still apply.  */
6403 char $ac_func();
6404 char (*f)();
6405
6406 int main() {
6407
6408 /* The GNU C library defines this for functions which it implements
6409     to always fail with ENOSYS.  Some functions are actually named
6410     something starting with __ and the normal name is an alias.  */
6411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6412 choke me
6413 #else
6414 f = $ac_func;
6415 #endif
6416
6417 ; return 0; }
6418 EOF
6419 if { (eval echo configure:6420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6420   rm -rf conftest*
6421   eval "ac_cv_func_$ac_func=yes"
6422 else
6423   echo "configure: failed program was:" >&5
6424   cat conftest.$ac_ext >&5
6425   rm -rf conftest*
6426   eval "ac_cv_func_$ac_func=no"
6427 fi
6428 rm -f conftest*
6429 fi
6430
6431 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6432   echo "$ac_t""yes" 1>&6
6433     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6434   cat >> confdefs.h <<EOF
6435 #define $ac_tr_func 1
6436 EOF
6437  
6438 else
6439   echo "$ac_t""no" 1>&6
6440 fi
6441 done
6442
6443
6444 if test "$ac_cv_func_ctime_r" = no ; then
6445         ol_cv_func_ctime_r_nargs=0
6446 else
6447         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6448 echo "configure:6449: checking number of arguments of ctime_r" >&5
6449 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6450   echo $ac_n "(cached) $ac_c" 1>&6
6451 else
6452   cat > conftest.$ac_ext <<EOF
6453 #line 6454 "configure"
6454 #include "confdefs.h"
6455 #include <time.h>
6456 int main() {
6457 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6458 ; return 0; }
6459 EOF
6460 if { (eval echo configure:6461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6461   rm -rf conftest*
6462   ol_cv_func_ctime_r_nargs3=yes
6463 else
6464   echo "configure: failed program was:" >&5
6465   cat conftest.$ac_ext >&5
6466   rm -rf conftest*
6467   ol_cv_func_ctime_r_nargs3=no
6468 fi
6469 rm -f conftest*
6470
6471         cat > conftest.$ac_ext <<EOF
6472 #line 6473 "configure"
6473 #include "confdefs.h"
6474 #include <time.h>
6475 int main() {
6476 time_t ti; char *buffer; ctime_r(&ti,buffer);
6477 ; return 0; }
6478 EOF
6479 if { (eval echo configure:6480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6480   rm -rf conftest*
6481   ol_cv_func_ctime_r_nargs2=yes
6482 else
6483   echo "configure: failed program was:" >&5
6484   cat conftest.$ac_ext >&5
6485   rm -rf conftest*
6486   ol_cv_func_ctime_r_nargs2=no
6487 fi
6488 rm -f conftest*
6489
6490         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6491                 $ol_cv_func_ctime_r_nargs2 = no ; then
6492
6493                 ol_cv_func_ctime_r_nargs=3
6494
6495         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6496                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6497
6498                 ol_cv_func_ctime_r_nargs=2
6499
6500         else
6501                 ol_cv_func_ctime_r_nargs=0
6502         fi
6503   
6504 fi
6505
6506 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6507
6508   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6509         cat >> confdefs.h <<EOF
6510 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6511 EOF
6512
6513   fi
6514
6515 fi
6516
6517 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6518         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6519 echo "configure:6520: checking number of arguments of gethostbyname_r" >&5
6520 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6521   echo $ac_n "(cached) $ac_c" 1>&6
6522 else
6523   cat > conftest.$ac_ext <<EOF
6524 #line 6525 "configure"
6525 #include "confdefs.h"
6526 #include <sys/types.h>
6527 #include <sys/socket.h>
6528 #include <netinet/in.h>
6529 #include <netdb.h>
6530 #define BUFSIZE (sizeof(struct hostent)+10)
6531 int main() {
6532 struct hostent hent; char buffer[BUFSIZE];
6533                 int bufsize=BUFSIZE;int h_errno;
6534                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6535                         buffer, bufsize, &h_errno);
6536 ; return 0; }
6537 EOF
6538 if { (eval echo configure:6539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6539   rm -rf conftest*
6540   ol_cv_func_gethostbyname_r_nargs5=yes
6541 else
6542   echo "configure: failed program was:" >&5
6543   cat conftest.$ac_ext >&5
6544   rm -rf conftest*
6545   ol_cv_func_gethostbyname_r_nargs5=no
6546 fi
6547 rm -f conftest*
6548
6549         cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552 #include <sys/types.h>
6553 #include <sys/socket.h>
6554 #include <netinet/in.h>
6555 #include <netdb.h>
6556 #define BUFSIZE (sizeof(struct hostent)+10)
6557 int main() {
6558 struct hostent hent;struct hostent *rhent;
6559                 char buffer[BUFSIZE];
6560                 int bufsize=BUFSIZE;int h_errno;
6561                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6562                         &rhent, &h_errno);
6563 ; return 0; }
6564 EOF
6565 if { (eval echo configure:6566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6566   rm -rf conftest*
6567   ol_cv_func_gethostbyname_r_nargs6=yes
6568 else
6569   echo "configure: failed program was:" >&5
6570   cat conftest.$ac_ext >&5
6571   rm -rf conftest*
6572   ol_cv_func_gethostbyname_r_nargs6=no
6573 fi
6574 rm -f conftest*
6575
6576         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6577                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6578
6579                 ol_cv_func_gethostbyname_r_nargs=5
6580
6581         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6582                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6583
6584                 ol_cv_func_gethostbyname_r_nargs=6
6585
6586         else
6587                 ol_cv_func_gethostbyname_r_nargs=0
6588         fi
6589   
6590 fi
6591
6592 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6593   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6594         cat >> confdefs.h <<EOF
6595 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6596 EOF
6597
6598   fi
6599
6600 else
6601         ol_cv_func_gethostbyname_r_nargs=0
6602 fi
6603  
6604 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6605         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6606 echo "configure:6607: checking number of arguments of gethostbyaddr_r" >&5
6607 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6608   echo $ac_n "(cached) $ac_c" 1>&6
6609 else
6610   cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 #include <sys/types.h>
6614 #include <sys/socket.h>
6615 #include <netinet/in.h>
6616 #include <netdb.h>
6617 #define BUFSIZE (sizeof(struct hostent)+10)
6618 int main() {
6619 struct hostent hent; char buffer[BUFSIZE]; 
6620             struct in_addr add;
6621             size_t alen=sizeof(struct in_addr);
6622             int bufsize=BUFSIZE;int h_errno;
6623                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6624                         alen, AF_INET, &hent, buffer, bufsize, &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_nargs7=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_nargs7=no
6635 fi
6636 rm -f conftest*
6637
6638         cat > conftest.$ac_ext <<EOF
6639 #line 6640 "configure"
6640 #include "confdefs.h"
6641 #include <sys/types.h>
6642 #include <sys/socket.h>
6643 #include <netinet/in.h>
6644 #include <netdb.h>
6645 #define BUFSIZE (sizeof(struct hostent)+10)
6646 int main() {
6647 struct hostent hent;
6648                 struct hostent *rhent; char buffer[BUFSIZE]; 
6649                 struct in_addr add;
6650                 size_t alen=sizeof(struct in_addr);
6651                 int bufsize=BUFSIZE;int h_errno;
6652                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6653                         alen, AF_INET, &hent, buffer, bufsize, 
6654                         &rhent, &h_errno);
6655 ; return 0; }
6656 EOF
6657 if { (eval echo configure:6658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6658   rm -rf conftest*
6659   ol_cv_func_gethostbyaddr_r_nargs8=yes
6660 else
6661   echo "configure: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   rm -rf conftest*
6664   ol_cv_func_gethostbyaddr_r_nargs8=no
6665 fi
6666 rm -f conftest*
6667
6668         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6669                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6670
6671                 ol_cv_func_gethostbyaddr_r_nargs=7
6672
6673         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6674                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6675
6676                 ol_cv_func_gethostbyaddr_r_nargs=8
6677
6678         else
6679                 ol_cv_func_gethostbyaddr_r_nargs=0
6680         fi
6681   
6682 fi
6683
6684 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6685   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6686     cat >> confdefs.h <<EOF
6687 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6688 EOF
6689
6690   fi
6691
6692 else
6693         ol_cv_func_gethostbyaddr_r_nargs=0
6694 fi
6695
6696 if test "$ac_cv_func_ctime_r" = yes \
6697         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6698         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6699         -a "$ac_cv_func_gethostbyname_r" = yes \
6700         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6701         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6702         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6703         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6704         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6705         ; then
6706  
6707         cat >> confdefs.h <<\EOF
6708 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6709 EOF
6710
6711 fi
6712
6713 ol_link_threads=no
6714
6715 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6716         -o $ol_with_threads = nt ; then
6717
6718         
6719         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6720 echo "configure:6721: checking for NT Threads" >&5
6721 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6722   echo $ac_n "(cached) $ac_c" 1>&6
6723 else
6724   
6725                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6726 echo "configure:6727: checking for _beginthread" >&5
6727 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6728   echo $ac_n "(cached) $ac_c" 1>&6
6729 else
6730   cat > conftest.$ac_ext <<EOF
6731 #line 6732 "configure"
6732 #include "confdefs.h"
6733 /* System header to define __stub macros and hopefully few prototypes,
6734     which can conflict with char _beginthread(); below.  */
6735 #include <assert.h>
6736 /* Override any gcc2 internal prototype to avoid an error.  */
6737 /* We use char because int might match the return type of a gcc2
6738     builtin and then its argument prototype would still apply.  */
6739 char _beginthread();
6740 char (*f)();
6741
6742 int main() {
6743
6744 /* The GNU C library defines this for functions which it implements
6745     to always fail with ENOSYS.  Some functions are actually named
6746     something starting with __ and the normal name is an alias.  */
6747 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6748 choke me
6749 #else
6750 f = _beginthread;
6751 #endif
6752
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6756   rm -rf conftest*
6757   eval "ac_cv_func__beginthread=yes"
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   eval "ac_cv_func__beginthread=no"
6763 fi
6764 rm -f conftest*
6765 fi
6766
6767 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6768   echo "$ac_t""yes" 1>&6
6769   ol_cv_nt_threads=yes
6770 else
6771   echo "$ac_t""no" 1>&6
6772 ol_cv_nt_threads=no
6773 fi
6774
6775         
6776 fi
6777
6778 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6779
6780         if test $ol_cv_nt_threads = yes ; then
6781                 cat >> confdefs.h <<\EOF
6782 #define HAVE_NT_THREADS 1
6783 EOF
6784
6785         fi
6786
6787
6788         if test "$ol_cv_nt_threads" = yes ; then
6789         ol_link_threads=nt
6790         ol_with_threads=found
6791         ol_with_yielding_select=yes
6792
6793                 cat >> confdefs.h <<\EOF
6794 #define HAVE_NT_SERVICE_MANAGER 1
6795 EOF
6796
6797                 cat >> confdefs.h <<\EOF
6798 #define HAVE_NT_EVENT_LOG 1
6799 EOF
6800
6801         fi
6802
6803         if test $ol_with_threads = nt ; then
6804                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6805         fi
6806 fi
6807
6808 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6809         -o $ol_with_threads = posix ; then
6810
6811         for ac_hdr in pthread.h
6812 do
6813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6815 echo "configure:6816: checking for $ac_hdr" >&5
6816 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6817   echo $ac_n "(cached) $ac_c" 1>&6
6818 else
6819   cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822 #include <$ac_hdr>
6823 EOF
6824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6825 { (eval echo configure:6826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6827 if test -z "$ac_err"; then
6828   rm -rf conftest*
6829   eval "ac_cv_header_$ac_safe=yes"
6830 else
6831   echo "$ac_err" >&5
6832   echo "configure: failed program was:" >&5
6833   cat conftest.$ac_ext >&5
6834   rm -rf conftest*
6835   eval "ac_cv_header_$ac_safe=no"
6836 fi
6837 rm -f conftest*
6838 fi
6839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6840   echo "$ac_t""yes" 1>&6
6841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6842   cat >> confdefs.h <<EOF
6843 #define $ac_tr_hdr 1
6844 EOF
6845  
6846 else
6847   echo "$ac_t""no" 1>&6
6848 fi
6849 done
6850
6851
6852         if test $ac_cv_header_pthread_h = yes ; then
6853                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6854 echo "configure:6855: checking POSIX thread version" >&5
6855 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6856   echo $ac_n "(cached) $ac_c" 1>&6
6857 else
6858   
6859         cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862
6863 #               include <pthread.h>
6864                 /* this check could be improved */
6865 #               ifdef PTHREAD_ONCE_INIT
6866                         pthread_version_final;
6867 #               endif
6868         
6869 EOF
6870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6871   egrep "pthread_version_final" >/dev/null 2>&1; then
6872   rm -rf conftest*
6873   ol_pthread_final=yes
6874 else
6875   rm -rf conftest*
6876   ol_pthread_final=no
6877 fi
6878 rm -f conftest*
6879
6880
6881         cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884
6885 #               include <pthread.h>
6886                 /* this check could be improved */
6887 #               ifdef pthread_once_init
6888                         pthread_version_draft4;
6889 #               endif
6890         
6891 EOF
6892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6893   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6894   rm -rf conftest*
6895   ol_pthread_draft4=yes
6896 else
6897   rm -rf conftest*
6898   ol_pthread_draft4=no
6899 fi
6900 rm -f conftest*
6901
6902
6903         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6904                 ol_cv_pthread_version=final
6905         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6906                 ol_cv_pthread_version=draft4
6907         else
6908                 ol_cv_pthread_version=unknown
6909         fi
6910
6911 fi
6912
6913 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6914
6915
6916                 if test $ol_cv_pthread_version = final ; then
6917                         cat >> confdefs.h <<\EOF
6918 #define HAVE_PTHREADS_FINAL 1
6919 EOF
6920
6921                 elif test $ol_cv_pthread_version = draft4 ; then
6922                         cat >> confdefs.h <<\EOF
6923 #define HAVE_PTHREADS_D4 1
6924 EOF
6925
6926                 else
6927                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6928                 fi
6929
6930                 # consider threads found
6931                 ol_with_threads=found
6932
6933                 
6934         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6935 echo "configure:6936: checking for LinuxThreads pthread.h" >&5
6936 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6937   echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939   cat > conftest.$ac_ext <<EOF
6940 #line 6941 "configure"
6941 #include "confdefs.h"
6942 #include <pthread.h>
6943 EOF
6944 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6945   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6946   rm -rf conftest*
6947   ol_cv_header_linux_threads=yes
6948 else
6949   rm -rf conftest*
6950   ol_cv_header_linux_threads=no
6951 fi
6952 rm -f conftest*
6953
6954                 
6955 fi
6956
6957 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6958         if test $ol_cv_header_linux_threads = yes; then
6959                 cat >> confdefs.h <<\EOF
6960 #define HAVE_LINUX_THREADS 1
6961 EOF
6962
6963         fi
6964
6965                 
6966         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6967 echo "configure:6968: checking for GNU Pth pthread.h" >&5
6968 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 #include <pthread.h>
6975 #ifdef _POSIX_THREAD_IS_GNU_PTH
6976         __gnu_pth__;
6977 #endif
6978
6979 EOF
6980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6981   egrep "__gnu_pth__" >/dev/null 2>&1; then
6982   rm -rf conftest*
6983   ol_cv_header_gnu_pth_pthread_h=yes
6984 else
6985   rm -rf conftest*
6986   ol_cv_header_gnu_pth_pthread_h=no
6987 fi
6988 rm -f conftest*
6989
6990                 
6991 fi
6992
6993 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6994
6995
6996                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6997                         for ac_hdr in sched.h
6998 do
6999 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7000 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7001 echo "configure:7002: checking for $ac_hdr" >&5
7002 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7003   echo $ac_n "(cached) $ac_c" 1>&6
7004 else
7005   cat > conftest.$ac_ext <<EOF
7006 #line 7007 "configure"
7007 #include "confdefs.h"
7008 #include <$ac_hdr>
7009 EOF
7010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7011 { (eval echo configure:7012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7013 if test -z "$ac_err"; then
7014   rm -rf conftest*
7015   eval "ac_cv_header_$ac_safe=yes"
7016 else
7017   echo "$ac_err" >&5
7018   echo "configure: failed program was:" >&5
7019   cat conftest.$ac_ext >&5
7020   rm -rf conftest*
7021   eval "ac_cv_header_$ac_safe=no"
7022 fi
7023 rm -f conftest*
7024 fi
7025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7026   echo "$ac_t""yes" 1>&6
7027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7028   cat >> confdefs.h <<EOF
7029 #define $ac_tr_hdr 1
7030 EOF
7031  
7032 else
7033   echo "$ac_t""no" 1>&6
7034 fi
7035 done
7036
7037                 fi
7038
7039                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7040                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7041 echo "configure:7042: checking for pthread_create in default libraries" >&5
7042 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   
7046                 if test "$cross_compiling" = yes; then
7047   cat > conftest.$ac_ext <<EOF
7048 #line 7049 "configure"
7049 #include "confdefs.h"
7050 /* pthread test headers */
7051 #include <pthread.h>
7052 #ifndef NULL
7053 #define NULL (void*)0
7054 #endif
7055
7056 static void *task(p)
7057         void *p;
7058 {
7059         return (void *) (p == NULL);
7060 }
7061
7062 int main() {
7063
7064         /* pthread test function */
7065         pthread_t t;
7066         int status;
7067 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7068         /* This system (e.g. AIX) defaults detached; must override */
7069         pthread_attr_t attr;
7070
7071         status = pthread_attr_init(&attr);
7072         if( status ) exit( status );
7073
7074         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7075         if( status ) exit( status );
7076
7077 #define ATTR    &attr
7078 #else
7079 #if HAVE_PTHREADS_D4
7080 #define ATTR    pthread_attr_default
7081 #else
7082 #define ATTR    NULL
7083 #endif
7084 #endif
7085         /* make sure pthread_create() isn't just a stub */
7086         status = pthread_create(&t, ATTR, task, NULL);
7087         if( status ) exit( status );
7088
7089         /* make sure pthread_detach() isn't just a stub */
7090 #if HAVE_PTHREADS_D4
7091         status = pthread_detach( &t );
7092 #else
7093         status = pthread_detach( t );
7094 #endif
7095
7096 #ifdef HAVE_LINUX_THREADS
7097         pthread_kill_other_threads_np();
7098 #endif
7099
7100         exit( status );
7101
7102 ; return 0; }
7103 EOF
7104 if { (eval echo configure:7105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7105   rm -rf conftest*
7106   ol_cv_pthread_create=yes
7107 else
7108   echo "configure: failed program was:" >&5
7109   cat conftest.$ac_ext >&5
7110   rm -rf conftest*
7111   ol_cv_pthread_create=no
7112 fi
7113 rm -f conftest*
7114 else
7115   cat > conftest.$ac_ext <<EOF
7116 #line 7117 "configure"
7117 #include "confdefs.h"
7118 /* pthread test headers */
7119 #include <pthread.h>
7120 #ifndef NULL
7121 #define NULL (void*)0
7122 #endif
7123
7124 static void *task(p)
7125         void *p;
7126 {
7127         return (void *) (p == NULL);
7128 }
7129
7130
7131 int main(argc, argv)
7132         int argc;
7133         char **argv;
7134 {
7135
7136         /* pthread test function */
7137         pthread_t t;
7138         int status;
7139 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7140         /* This system (e.g. AIX) defaults detached; must override */
7141         pthread_attr_t attr;
7142
7143         status = pthread_attr_init(&attr);
7144         if( status ) exit( status );
7145
7146         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7147         if( status ) exit( status );
7148
7149 #define ATTR    &attr
7150 #else
7151 #if HAVE_PTHREADS_D4
7152 #define ATTR    pthread_attr_default
7153 #else
7154 #define ATTR    NULL
7155 #endif
7156 #endif
7157         /* make sure pthread_create() isn't just a stub */
7158         status = pthread_create(&t, ATTR, task, NULL);
7159         if( status ) exit( status );
7160
7161         /* make sure pthread_detach() isn't just a stub */
7162 #if HAVE_PTHREADS_D4
7163         status = pthread_detach( &t );
7164 #else
7165         status = pthread_detach( t );
7166 #endif
7167
7168 #ifdef HAVE_LINUX_THREADS
7169         pthread_kill_other_threads_np();
7170 #endif
7171
7172         exit( status );
7173
7174 }
7175
7176 EOF
7177 if { (eval echo configure:7178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7178 then
7179   ol_cv_pthread_create=yes
7180 else
7181   echo "configure: failed program was:" >&5
7182   cat conftest.$ac_ext >&5
7183   rm -fr conftest*
7184   ol_cv_pthread_create=no
7185 fi
7186 rm -fr conftest*
7187 fi
7188
7189 fi
7190
7191 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7192
7193                 if test $ol_cv_pthread_create != no ; then
7194                         ol_link_threads=posix
7195                         ol_link_pthreads=""
7196                 fi
7197                 
7198                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7199 if test "$ol_link_threads" = no ; then
7200         # try -kthread
7201         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7202 echo "configure:7203: checking for pthread link with -kthread" >&5
7203 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7204   echo $ac_n "(cached) $ac_c" 1>&6
7205 else
7206   
7207                 # save the flags
7208                 ol_LIBS="$LIBS"
7209                 LIBS="-kthread $LIBS"
7210
7211                 if test "$cross_compiling" = yes; then
7212   cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 /* pthread test headers */
7216 #include <pthread.h>
7217 #ifndef NULL
7218 #define NULL (void*)0
7219 #endif
7220
7221 static void *task(p)
7222         void *p;
7223 {
7224         return (void *) (p == NULL);
7225 }
7226
7227 int main() {
7228
7229         /* pthread test function */
7230         pthread_t t;
7231         int status;
7232 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7233         /* This system (e.g. AIX) defaults detached; must override */
7234         pthread_attr_t attr;
7235
7236         status = pthread_attr_init(&attr);
7237         if( status ) exit( status );
7238
7239         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7240         if( status ) exit( status );
7241
7242 #define ATTR    &attr
7243 #else
7244 #if HAVE_PTHREADS_D4
7245 #define ATTR    pthread_attr_default
7246 #else
7247 #define ATTR    NULL
7248 #endif
7249 #endif
7250         /* make sure pthread_create() isn't just a stub */
7251         status = pthread_create(&t, ATTR, task, NULL);
7252         if( status ) exit( status );
7253
7254         /* make sure pthread_detach() isn't just a stub */
7255 #if HAVE_PTHREADS_D4
7256         status = pthread_detach( &t );
7257 #else
7258         status = pthread_detach( t );
7259 #endif
7260
7261 #ifdef HAVE_LINUX_THREADS
7262         pthread_kill_other_threads_np();
7263 #endif
7264
7265         exit( status );
7266
7267 ; return 0; }
7268 EOF
7269 if { (eval echo configure:7270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7270   rm -rf conftest*
7271   ol_cv_pthread_kthread=yes
7272 else
7273   echo "configure: failed program was:" >&5
7274   cat conftest.$ac_ext >&5
7275   rm -rf conftest*
7276   ol_cv_pthread_kthread=no
7277 fi
7278 rm -f conftest*
7279 else
7280   cat > conftest.$ac_ext <<EOF
7281 #line 7282 "configure"
7282 #include "confdefs.h"
7283 /* pthread test headers */
7284 #include <pthread.h>
7285 #ifndef NULL
7286 #define NULL (void*)0
7287 #endif
7288
7289 static void *task(p)
7290         void *p;
7291 {
7292         return (void *) (p == NULL);
7293 }
7294
7295
7296 int main(argc, argv)
7297         int argc;
7298         char **argv;
7299 {
7300
7301         /* pthread test function */
7302         pthread_t t;
7303         int status;
7304 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7305         /* This system (e.g. AIX) defaults detached; must override */
7306         pthread_attr_t attr;
7307
7308         status = pthread_attr_init(&attr);
7309         if( status ) exit( status );
7310
7311         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7312         if( status ) exit( status );
7313
7314 #define ATTR    &attr
7315 #else
7316 #if HAVE_PTHREADS_D4
7317 #define ATTR    pthread_attr_default
7318 #else
7319 #define ATTR    NULL
7320 #endif
7321 #endif
7322         /* make sure pthread_create() isn't just a stub */
7323         status = pthread_create(&t, ATTR, task, NULL);
7324         if( status ) exit( status );
7325
7326         /* make sure pthread_detach() isn't just a stub */
7327 #if HAVE_PTHREADS_D4
7328         status = pthread_detach( &t );
7329 #else
7330         status = pthread_detach( t );
7331 #endif
7332
7333 #ifdef HAVE_LINUX_THREADS
7334         pthread_kill_other_threads_np();
7335 #endif
7336
7337         exit( status );
7338
7339 }
7340
7341 EOF
7342 if { (eval echo configure:7343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7343 then
7344   ol_cv_pthread_kthread=yes
7345 else
7346   echo "configure: failed program was:" >&5
7347   cat conftest.$ac_ext >&5
7348   rm -fr conftest*
7349   ol_cv_pthread_kthread=no
7350 fi
7351 rm -fr conftest*
7352 fi
7353
7354
7355                 # restore the LIBS
7356                 LIBS="$ol_LIBS"
7357         
7358 fi
7359
7360 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7361
7362         if test $ol_cv_pthread_kthread = yes ; then
7363                 ol_link_pthreads="-kthread"
7364                 ol_link_threads=posix
7365         fi
7366 fi
7367
7368                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7369 if test "$ol_link_threads" = no ; then
7370         # try -pthread
7371         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7372 echo "configure:7373: checking for pthread link with -pthread" >&5
7373 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7374   echo $ac_n "(cached) $ac_c" 1>&6
7375 else
7376   
7377                 # save the flags
7378                 ol_LIBS="$LIBS"
7379                 LIBS="-pthread $LIBS"
7380
7381                 if test "$cross_compiling" = yes; then
7382   cat > conftest.$ac_ext <<EOF
7383 #line 7384 "configure"
7384 #include "confdefs.h"
7385 /* pthread test headers */
7386 #include <pthread.h>
7387 #ifndef NULL
7388 #define NULL (void*)0
7389 #endif
7390
7391 static void *task(p)
7392         void *p;
7393 {
7394         return (void *) (p == NULL);
7395 }
7396
7397 int main() {
7398
7399         /* pthread test function */
7400         pthread_t t;
7401         int status;
7402 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7403         /* This system (e.g. AIX) defaults detached; must override */
7404         pthread_attr_t attr;
7405
7406         status = pthread_attr_init(&attr);
7407         if( status ) exit( status );
7408
7409         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7410         if( status ) exit( status );
7411
7412 #define ATTR    &attr
7413 #else
7414 #if HAVE_PTHREADS_D4
7415 #define ATTR    pthread_attr_default
7416 #else
7417 #define ATTR    NULL
7418 #endif
7419 #endif
7420         /* make sure pthread_create() isn't just a stub */
7421         status = pthread_create(&t, ATTR, task, NULL);
7422         if( status ) exit( status );
7423
7424         /* make sure pthread_detach() isn't just a stub */
7425 #if HAVE_PTHREADS_D4
7426         status = pthread_detach( &t );
7427 #else
7428         status = pthread_detach( t );
7429 #endif
7430
7431 #ifdef HAVE_LINUX_THREADS
7432         pthread_kill_other_threads_np();
7433 #endif
7434
7435         exit( status );
7436
7437 ; return 0; }
7438 EOF
7439 if { (eval echo configure:7440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7440   rm -rf conftest*
7441   ol_cv_pthread_pthread=yes
7442 else
7443   echo "configure: failed program was:" >&5
7444   cat conftest.$ac_ext >&5
7445   rm -rf conftest*
7446   ol_cv_pthread_pthread=no
7447 fi
7448 rm -f conftest*
7449 else
7450   cat > conftest.$ac_ext <<EOF
7451 #line 7452 "configure"
7452 #include "confdefs.h"
7453 /* pthread test headers */
7454 #include <pthread.h>
7455 #ifndef NULL
7456 #define NULL (void*)0
7457 #endif
7458
7459 static void *task(p)
7460         void *p;
7461 {
7462         return (void *) (p == NULL);
7463 }
7464
7465
7466 int main(argc, argv)
7467         int argc;
7468         char **argv;
7469 {
7470
7471         /* pthread test function */
7472         pthread_t t;
7473         int status;
7474 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7475         /* This system (e.g. AIX) defaults detached; must override */
7476         pthread_attr_t attr;
7477
7478         status = pthread_attr_init(&attr);
7479         if( status ) exit( status );
7480
7481         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7482         if( status ) exit( status );
7483
7484 #define ATTR    &attr
7485 #else
7486 #if HAVE_PTHREADS_D4
7487 #define ATTR    pthread_attr_default
7488 #else
7489 #define ATTR    NULL
7490 #endif
7491 #endif
7492         /* make sure pthread_create() isn't just a stub */
7493         status = pthread_create(&t, ATTR, task, NULL);
7494         if( status ) exit( status );
7495
7496         /* make sure pthread_detach() isn't just a stub */
7497 #if HAVE_PTHREADS_D4
7498         status = pthread_detach( &t );
7499 #else
7500         status = pthread_detach( t );
7501 #endif
7502
7503 #ifdef HAVE_LINUX_THREADS
7504         pthread_kill_other_threads_np();
7505 #endif
7506
7507         exit( status );
7508
7509 }
7510
7511 EOF
7512 if { (eval echo configure:7513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7513 then
7514   ol_cv_pthread_pthread=yes
7515 else
7516   echo "configure: failed program was:" >&5
7517   cat conftest.$ac_ext >&5
7518   rm -fr conftest*
7519   ol_cv_pthread_pthread=no
7520 fi
7521 rm -fr conftest*
7522 fi
7523
7524
7525                 # restore the LIBS
7526                 LIBS="$ol_LIBS"
7527         
7528 fi
7529
7530 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7531
7532         if test $ol_cv_pthread_pthread = yes ; then
7533                 ol_link_pthreads="-pthread"
7534                 ol_link_threads=posix
7535         fi
7536 fi
7537
7538                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7539 if test "$ol_link_threads" = no ; then
7540         # try -pthreads
7541         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7542 echo "configure:7543: checking for pthread link with -pthreads" >&5
7543 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7544   echo $ac_n "(cached) $ac_c" 1>&6
7545 else
7546   
7547                 # save the flags
7548                 ol_LIBS="$LIBS"
7549                 LIBS="-pthreads $LIBS"
7550
7551                 if test "$cross_compiling" = yes; then
7552   cat > conftest.$ac_ext <<EOF
7553 #line 7554 "configure"
7554 #include "confdefs.h"
7555 /* pthread test headers */
7556 #include <pthread.h>
7557 #ifndef NULL
7558 #define NULL (void*)0
7559 #endif
7560
7561 static void *task(p)
7562         void *p;
7563 {
7564         return (void *) (p == NULL);
7565 }
7566
7567 int main() {
7568
7569         /* pthread test function */
7570         pthread_t t;
7571         int status;
7572 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7573         /* This system (e.g. AIX) defaults detached; must override */
7574         pthread_attr_t attr;
7575
7576         status = pthread_attr_init(&attr);
7577         if( status ) exit( status );
7578
7579         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7580         if( status ) exit( status );
7581
7582 #define ATTR    &attr
7583 #else
7584 #if HAVE_PTHREADS_D4
7585 #define ATTR    pthread_attr_default
7586 #else
7587 #define ATTR    NULL
7588 #endif
7589 #endif
7590         /* make sure pthread_create() isn't just a stub */
7591         status = pthread_create(&t, ATTR, task, NULL);
7592         if( status ) exit( status );
7593
7594         /* make sure pthread_detach() isn't just a stub */
7595 #if HAVE_PTHREADS_D4
7596         status = pthread_detach( &t );
7597 #else
7598         status = pthread_detach( t );
7599 #endif
7600
7601 #ifdef HAVE_LINUX_THREADS
7602         pthread_kill_other_threads_np();
7603 #endif
7604
7605         exit( status );
7606
7607 ; return 0; }
7608 EOF
7609 if { (eval echo configure:7610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7610   rm -rf conftest*
7611   ol_cv_pthread_pthreads=yes
7612 else
7613   echo "configure: failed program was:" >&5
7614   cat conftest.$ac_ext >&5
7615   rm -rf conftest*
7616   ol_cv_pthread_pthreads=no
7617 fi
7618 rm -f conftest*
7619 else
7620   cat > conftest.$ac_ext <<EOF
7621 #line 7622 "configure"
7622 #include "confdefs.h"
7623 /* pthread test headers */
7624 #include <pthread.h>
7625 #ifndef NULL
7626 #define NULL (void*)0
7627 #endif
7628
7629 static void *task(p)
7630         void *p;
7631 {
7632         return (void *) (p == NULL);
7633 }
7634
7635
7636 int main(argc, argv)
7637         int argc;
7638         char **argv;
7639 {
7640
7641         /* pthread test function */
7642         pthread_t t;
7643         int status;
7644 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7645         /* This system (e.g. AIX) defaults detached; must override */
7646         pthread_attr_t attr;
7647
7648         status = pthread_attr_init(&attr);
7649         if( status ) exit( status );
7650
7651         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7652         if( status ) exit( status );
7653
7654 #define ATTR    &attr
7655 #else
7656 #if HAVE_PTHREADS_D4
7657 #define ATTR    pthread_attr_default
7658 #else
7659 #define ATTR    NULL
7660 #endif
7661 #endif
7662         /* make sure pthread_create() isn't just a stub */
7663         status = pthread_create(&t, ATTR, task, NULL);
7664         if( status ) exit( status );
7665
7666         /* make sure pthread_detach() isn't just a stub */
7667 #if HAVE_PTHREADS_D4
7668         status = pthread_detach( &t );
7669 #else
7670         status = pthread_detach( t );
7671 #endif
7672
7673 #ifdef HAVE_LINUX_THREADS
7674         pthread_kill_other_threads_np();
7675 #endif
7676
7677         exit( status );
7678
7679 }
7680
7681 EOF
7682 if { (eval echo configure:7683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7683 then
7684   ol_cv_pthread_pthreads=yes
7685 else
7686   echo "configure: failed program was:" >&5
7687   cat conftest.$ac_ext >&5
7688   rm -fr conftest*
7689   ol_cv_pthread_pthreads=no
7690 fi
7691 rm -fr conftest*
7692 fi
7693
7694
7695                 # restore the LIBS
7696                 LIBS="$ol_LIBS"
7697         
7698 fi
7699
7700 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7701
7702         if test $ol_cv_pthread_pthreads = yes ; then
7703                 ol_link_pthreads="-pthreads"
7704                 ol_link_threads=posix
7705         fi
7706 fi
7707
7708                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7709 if test "$ol_link_threads" = no ; then
7710         # try -mthreads
7711         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7712 echo "configure:7713: checking for pthread link with -mthreads" >&5
7713 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7714   echo $ac_n "(cached) $ac_c" 1>&6
7715 else
7716   
7717                 # save the flags
7718                 ol_LIBS="$LIBS"
7719                 LIBS="-mthreads $LIBS"
7720
7721                 if test "$cross_compiling" = yes; then
7722   cat > conftest.$ac_ext <<EOF
7723 #line 7724 "configure"
7724 #include "confdefs.h"
7725 /* pthread test headers */
7726 #include <pthread.h>
7727 #ifndef NULL
7728 #define NULL (void*)0
7729 #endif
7730
7731 static void *task(p)
7732         void *p;
7733 {
7734         return (void *) (p == NULL);
7735 }
7736
7737 int main() {
7738
7739         /* pthread test function */
7740         pthread_t t;
7741         int status;
7742 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7743         /* This system (e.g. AIX) defaults detached; must override */
7744         pthread_attr_t attr;
7745
7746         status = pthread_attr_init(&attr);
7747         if( status ) exit( status );
7748
7749         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7750         if( status ) exit( status );
7751
7752 #define ATTR    &attr
7753 #else
7754 #if HAVE_PTHREADS_D4
7755 #define ATTR    pthread_attr_default
7756 #else
7757 #define ATTR    NULL
7758 #endif
7759 #endif
7760         /* make sure pthread_create() isn't just a stub */
7761         status = pthread_create(&t, ATTR, task, NULL);
7762         if( status ) exit( status );
7763
7764         /* make sure pthread_detach() isn't just a stub */
7765 #if HAVE_PTHREADS_D4
7766         status = pthread_detach( &t );
7767 #else
7768         status = pthread_detach( t );
7769 #endif
7770
7771 #ifdef HAVE_LINUX_THREADS
7772         pthread_kill_other_threads_np();
7773 #endif
7774
7775         exit( status );
7776
7777 ; return 0; }
7778 EOF
7779 if { (eval echo configure:7780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7780   rm -rf conftest*
7781   ol_cv_pthread_mthreads=yes
7782 else
7783   echo "configure: failed program was:" >&5
7784   cat conftest.$ac_ext >&5
7785   rm -rf conftest*
7786   ol_cv_pthread_mthreads=no
7787 fi
7788 rm -f conftest*
7789 else
7790   cat > conftest.$ac_ext <<EOF
7791 #line 7792 "configure"
7792 #include "confdefs.h"
7793 /* pthread test headers */
7794 #include <pthread.h>
7795 #ifndef NULL
7796 #define NULL (void*)0
7797 #endif
7798
7799 static void *task(p)
7800         void *p;
7801 {
7802         return (void *) (p == NULL);
7803 }
7804
7805
7806 int main(argc, argv)
7807         int argc;
7808         char **argv;
7809 {
7810
7811         /* pthread test function */
7812         pthread_t t;
7813         int status;
7814 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7815         /* This system (e.g. AIX) defaults detached; must override */
7816         pthread_attr_t attr;
7817
7818         status = pthread_attr_init(&attr);
7819         if( status ) exit( status );
7820
7821         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7822         if( status ) exit( status );
7823
7824 #define ATTR    &attr
7825 #else
7826 #if HAVE_PTHREADS_D4
7827 #define ATTR    pthread_attr_default
7828 #else
7829 #define ATTR    NULL
7830 #endif
7831 #endif
7832         /* make sure pthread_create() isn't just a stub */
7833         status = pthread_create(&t, ATTR, task, NULL);
7834         if( status ) exit( status );
7835
7836         /* make sure pthread_detach() isn't just a stub */
7837 #if HAVE_PTHREADS_D4
7838         status = pthread_detach( &t );
7839 #else
7840         status = pthread_detach( t );
7841 #endif
7842
7843 #ifdef HAVE_LINUX_THREADS
7844         pthread_kill_other_threads_np();
7845 #endif
7846
7847         exit( status );
7848
7849 }
7850
7851 EOF
7852 if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7853 then
7854   ol_cv_pthread_mthreads=yes
7855 else
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -fr conftest*
7859   ol_cv_pthread_mthreads=no
7860 fi
7861 rm -fr conftest*
7862 fi
7863
7864
7865                 # restore the LIBS
7866                 LIBS="$ol_LIBS"
7867         
7868 fi
7869
7870 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7871
7872         if test $ol_cv_pthread_mthreads = yes ; then
7873                 ol_link_pthreads="-mthreads"
7874                 ol_link_threads=posix
7875         fi
7876 fi
7877
7878                 # Pthread try link: -thread (ol_cv_pthread_thread)
7879 if test "$ol_link_threads" = no ; then
7880         # try -thread
7881         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7882 echo "configure:7883: checking for pthread link with -thread" >&5
7883 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7884   echo $ac_n "(cached) $ac_c" 1>&6
7885 else
7886   
7887                 # save the flags
7888                 ol_LIBS="$LIBS"
7889                 LIBS="-thread $LIBS"
7890
7891                 if test "$cross_compiling" = yes; then
7892   cat > conftest.$ac_ext <<EOF
7893 #line 7894 "configure"
7894 #include "confdefs.h"
7895 /* pthread test headers */
7896 #include <pthread.h>
7897 #ifndef NULL
7898 #define NULL (void*)0
7899 #endif
7900
7901 static void *task(p)
7902         void *p;
7903 {
7904         return (void *) (p == NULL);
7905 }
7906
7907 int main() {
7908
7909         /* pthread test function */
7910         pthread_t t;
7911         int status;
7912 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7913         /* This system (e.g. AIX) defaults detached; must override */
7914         pthread_attr_t attr;
7915
7916         status = pthread_attr_init(&attr);
7917         if( status ) exit( status );
7918
7919         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7920         if( status ) exit( status );
7921
7922 #define ATTR    &attr
7923 #else
7924 #if HAVE_PTHREADS_D4
7925 #define ATTR    pthread_attr_default
7926 #else
7927 #define ATTR    NULL
7928 #endif
7929 #endif
7930         /* make sure pthread_create() isn't just a stub */
7931         status = pthread_create(&t, ATTR, task, NULL);
7932         if( status ) exit( status );
7933
7934         /* make sure pthread_detach() isn't just a stub */
7935 #if HAVE_PTHREADS_D4
7936         status = pthread_detach( &t );
7937 #else
7938         status = pthread_detach( t );
7939 #endif
7940
7941 #ifdef HAVE_LINUX_THREADS
7942         pthread_kill_other_threads_np();
7943 #endif
7944
7945         exit( status );
7946
7947 ; return 0; }
7948 EOF
7949 if { (eval echo configure:7950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7950   rm -rf conftest*
7951   ol_cv_pthread_thread=yes
7952 else
7953   echo "configure: failed program was:" >&5
7954   cat conftest.$ac_ext >&5
7955   rm -rf conftest*
7956   ol_cv_pthread_thread=no
7957 fi
7958 rm -f conftest*
7959 else
7960   cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 /* pthread test headers */
7964 #include <pthread.h>
7965 #ifndef NULL
7966 #define NULL (void*)0
7967 #endif
7968
7969 static void *task(p)
7970         void *p;
7971 {
7972         return (void *) (p == NULL);
7973 }
7974
7975
7976 int main(argc, argv)
7977         int argc;
7978         char **argv;
7979 {
7980
7981         /* pthread test function */
7982         pthread_t t;
7983         int status;
7984 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7985         /* This system (e.g. AIX) defaults detached; must override */
7986         pthread_attr_t attr;
7987
7988         status = pthread_attr_init(&attr);
7989         if( status ) exit( status );
7990
7991         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7992         if( status ) exit( status );
7993
7994 #define ATTR    &attr
7995 #else
7996 #if HAVE_PTHREADS_D4
7997 #define ATTR    pthread_attr_default
7998 #else
7999 #define ATTR    NULL
8000 #endif
8001 #endif
8002         /* make sure pthread_create() isn't just a stub */
8003         status = pthread_create(&t, ATTR, task, NULL);
8004         if( status ) exit( status );
8005
8006         /* make sure pthread_detach() isn't just a stub */
8007 #if HAVE_PTHREADS_D4
8008         status = pthread_detach( &t );
8009 #else
8010         status = pthread_detach( t );
8011 #endif
8012
8013 #ifdef HAVE_LINUX_THREADS
8014         pthread_kill_other_threads_np();
8015 #endif
8016
8017         exit( status );
8018
8019 }
8020
8021 EOF
8022 if { (eval echo configure:8023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8023 then
8024   ol_cv_pthread_thread=yes
8025 else
8026   echo "configure: failed program was:" >&5
8027   cat conftest.$ac_ext >&5
8028   rm -fr conftest*
8029   ol_cv_pthread_thread=no
8030 fi
8031 rm -fr conftest*
8032 fi
8033
8034
8035                 # restore the LIBS
8036                 LIBS="$ol_LIBS"
8037         
8038 fi
8039
8040 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8041
8042         if test $ol_cv_pthread_thread = yes ; then
8043                 ol_link_pthreads="-thread"
8044                 ol_link_threads=posix
8045         fi
8046 fi
8047
8048
8049                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8050 if test "$ol_link_threads" = no ; then
8051         # try -lpthread -lmach -lexc -lc_r
8052         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8053 echo "configure:8054: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8054 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8055   echo $ac_n "(cached) $ac_c" 1>&6
8056 else
8057   
8058                 # save the flags
8059                 ol_LIBS="$LIBS"
8060                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8061
8062                 if test "$cross_compiling" = yes; then
8063   cat > conftest.$ac_ext <<EOF
8064 #line 8065 "configure"
8065 #include "confdefs.h"
8066 /* pthread test headers */
8067 #include <pthread.h>
8068 #ifndef NULL
8069 #define NULL (void*)0
8070 #endif
8071
8072 static void *task(p)
8073         void *p;
8074 {
8075         return (void *) (p == NULL);
8076 }
8077
8078 int main() {
8079
8080         /* pthread test function */
8081         pthread_t t;
8082         int status;
8083 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8084         /* This system (e.g. AIX) defaults detached; must override */
8085         pthread_attr_t attr;
8086
8087         status = pthread_attr_init(&attr);
8088         if( status ) exit( status );
8089
8090         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8091         if( status ) exit( status );
8092
8093 #define ATTR    &attr
8094 #else
8095 #if HAVE_PTHREADS_D4
8096 #define ATTR    pthread_attr_default
8097 #else
8098 #define ATTR    NULL
8099 #endif
8100 #endif
8101         /* make sure pthread_create() isn't just a stub */
8102         status = pthread_create(&t, ATTR, task, NULL);
8103         if( status ) exit( status );
8104
8105         /* make sure pthread_detach() isn't just a stub */
8106 #if HAVE_PTHREADS_D4
8107         status = pthread_detach( &t );
8108 #else
8109         status = pthread_detach( t );
8110 #endif
8111
8112 #ifdef HAVE_LINUX_THREADS
8113         pthread_kill_other_threads_np();
8114 #endif
8115
8116         exit( status );
8117
8118 ; return 0; }
8119 EOF
8120 if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8121   rm -rf conftest*
8122   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8123 else
8124   echo "configure: failed program was:" >&5
8125   cat conftest.$ac_ext >&5
8126   rm -rf conftest*
8127   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8128 fi
8129 rm -f conftest*
8130 else
8131   cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 /* pthread test headers */
8135 #include <pthread.h>
8136 #ifndef NULL
8137 #define NULL (void*)0
8138 #endif
8139
8140 static void *task(p)
8141         void *p;
8142 {
8143         return (void *) (p == NULL);
8144 }
8145
8146
8147 int main(argc, argv)
8148         int argc;
8149         char **argv;
8150 {
8151
8152         /* pthread test function */
8153         pthread_t t;
8154         int status;
8155 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8156         /* This system (e.g. AIX) defaults detached; must override */
8157         pthread_attr_t attr;
8158
8159         status = pthread_attr_init(&attr);
8160         if( status ) exit( status );
8161
8162         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8163         if( status ) exit( status );
8164
8165 #define ATTR    &attr
8166 #else
8167 #if HAVE_PTHREADS_D4
8168 #define ATTR    pthread_attr_default
8169 #else
8170 #define ATTR    NULL
8171 #endif
8172 #endif
8173         /* make sure pthread_create() isn't just a stub */
8174         status = pthread_create(&t, ATTR, task, NULL);
8175         if( status ) exit( status );
8176
8177         /* make sure pthread_detach() isn't just a stub */
8178 #if HAVE_PTHREADS_D4
8179         status = pthread_detach( &t );
8180 #else
8181         status = pthread_detach( t );
8182 #endif
8183
8184 #ifdef HAVE_LINUX_THREADS
8185         pthread_kill_other_threads_np();
8186 #endif
8187
8188         exit( status );
8189
8190 }
8191
8192 EOF
8193 if { (eval echo configure:8194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8194 then
8195   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8196 else
8197   echo "configure: failed program was:" >&5
8198   cat conftest.$ac_ext >&5
8199   rm -fr conftest*
8200   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8201 fi
8202 rm -fr conftest*
8203 fi
8204
8205
8206                 # restore the LIBS
8207                 LIBS="$ol_LIBS"
8208         
8209 fi
8210
8211 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8212
8213         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8214                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8215                 ol_link_threads=posix
8216         fi
8217 fi
8218
8219                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8220 if test "$ol_link_threads" = no ; then
8221         # try -lpthread -lmach -lexc
8222         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8223 echo "configure:8224: checking for pthread link with -lpthread -lmach -lexc" >&5
8224 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8225   echo $ac_n "(cached) $ac_c" 1>&6
8226 else
8227   
8228                 # save the flags
8229                 ol_LIBS="$LIBS"
8230                 LIBS="-lpthread -lmach -lexc $LIBS"
8231
8232                 if test "$cross_compiling" = yes; then
8233   cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 /* pthread test headers */
8237 #include <pthread.h>
8238 #ifndef NULL
8239 #define NULL (void*)0
8240 #endif
8241
8242 static void *task(p)
8243         void *p;
8244 {
8245         return (void *) (p == NULL);
8246 }
8247
8248 int main() {
8249
8250         /* pthread test function */
8251         pthread_t t;
8252         int status;
8253 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8254         /* This system (e.g. AIX) defaults detached; must override */
8255         pthread_attr_t attr;
8256
8257         status = pthread_attr_init(&attr);
8258         if( status ) exit( status );
8259
8260         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8261         if( status ) exit( status );
8262
8263 #define ATTR    &attr
8264 #else
8265 #if HAVE_PTHREADS_D4
8266 #define ATTR    pthread_attr_default
8267 #else
8268 #define ATTR    NULL
8269 #endif
8270 #endif
8271         /* make sure pthread_create() isn't just a stub */
8272         status = pthread_create(&t, ATTR, task, NULL);
8273         if( status ) exit( status );
8274
8275         /* make sure pthread_detach() isn't just a stub */
8276 #if HAVE_PTHREADS_D4
8277         status = pthread_detach( &t );
8278 #else
8279         status = pthread_detach( t );
8280 #endif
8281
8282 #ifdef HAVE_LINUX_THREADS
8283         pthread_kill_other_threads_np();
8284 #endif
8285
8286         exit( status );
8287
8288 ; return 0; }
8289 EOF
8290 if { (eval echo configure:8291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8291   rm -rf conftest*
8292   ol_cv_pthread_lpthread_lmach_lexc=yes
8293 else
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   ol_cv_pthread_lpthread_lmach_lexc=no
8298 fi
8299 rm -f conftest*
8300 else
8301   cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 /* pthread test headers */
8305 #include <pthread.h>
8306 #ifndef NULL
8307 #define NULL (void*)0
8308 #endif
8309
8310 static void *task(p)
8311         void *p;
8312 {
8313         return (void *) (p == NULL);
8314 }
8315
8316
8317 int main(argc, argv)
8318         int argc;
8319         char **argv;
8320 {
8321
8322         /* pthread test function */
8323         pthread_t t;
8324         int status;
8325 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8326         /* This system (e.g. AIX) defaults detached; must override */
8327         pthread_attr_t attr;
8328
8329         status = pthread_attr_init(&attr);
8330         if( status ) exit( status );
8331
8332         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8333         if( status ) exit( status );
8334
8335 #define ATTR    &attr
8336 #else
8337 #if HAVE_PTHREADS_D4
8338 #define ATTR    pthread_attr_default
8339 #else
8340 #define ATTR    NULL
8341 #endif
8342 #endif
8343         /* make sure pthread_create() isn't just a stub */
8344         status = pthread_create(&t, ATTR, task, NULL);
8345         if( status ) exit( status );
8346
8347         /* make sure pthread_detach() isn't just a stub */
8348 #if HAVE_PTHREADS_D4
8349         status = pthread_detach( &t );
8350 #else
8351         status = pthread_detach( t );
8352 #endif
8353
8354 #ifdef HAVE_LINUX_THREADS
8355         pthread_kill_other_threads_np();
8356 #endif
8357
8358         exit( status );
8359
8360 }
8361
8362 EOF
8363 if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8364 then
8365   ol_cv_pthread_lpthread_lmach_lexc=yes
8366 else
8367   echo "configure: failed program was:" >&5
8368   cat conftest.$ac_ext >&5
8369   rm -fr conftest*
8370   ol_cv_pthread_lpthread_lmach_lexc=no
8371 fi
8372 rm -fr conftest*
8373 fi
8374
8375
8376                 # restore the LIBS
8377                 LIBS="$ol_LIBS"
8378         
8379 fi
8380
8381 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8382
8383         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8384                 ol_link_pthreads="-lpthread -lmach -lexc"
8385                 ol_link_threads=posix
8386         fi
8387 fi
8388
8389
8390                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8391 if test "$ol_link_threads" = no ; then
8392         # try -lpthread -Wl,-woff,85
8393         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8394 echo "configure:8395: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8395 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8396   echo $ac_n "(cached) $ac_c" 1>&6
8397 else
8398   
8399                 # save the flags
8400                 ol_LIBS="$LIBS"
8401                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8402
8403                 if test "$cross_compiling" = yes; then
8404   cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 /* pthread test headers */
8408 #include <pthread.h>
8409 #ifndef NULL
8410 #define NULL (void*)0
8411 #endif
8412
8413 static void *task(p)
8414         void *p;
8415 {
8416         return (void *) (p == NULL);
8417 }
8418
8419 int main() {
8420
8421         /* pthread test function */
8422         pthread_t t;
8423         int status;
8424 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8425         /* This system (e.g. AIX) defaults detached; must override */
8426         pthread_attr_t attr;
8427
8428         status = pthread_attr_init(&attr);
8429         if( status ) exit( status );
8430
8431         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8432         if( status ) exit( status );
8433
8434 #define ATTR    &attr
8435 #else
8436 #if HAVE_PTHREADS_D4
8437 #define ATTR    pthread_attr_default
8438 #else
8439 #define ATTR    NULL
8440 #endif
8441 #endif
8442         /* make sure pthread_create() isn't just a stub */
8443         status = pthread_create(&t, ATTR, task, NULL);
8444         if( status ) exit( status );
8445
8446         /* make sure pthread_detach() isn't just a stub */
8447 #if HAVE_PTHREADS_D4
8448         status = pthread_detach( &t );
8449 #else
8450         status = pthread_detach( t );
8451 #endif
8452
8453 #ifdef HAVE_LINUX_THREADS
8454         pthread_kill_other_threads_np();
8455 #endif
8456
8457         exit( status );
8458
8459 ; return 0; }
8460 EOF
8461 if { (eval echo configure:8462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8462   rm -rf conftest*
8463   ol_cv_pthread_lib_lpthread_woff=yes
8464 else
8465   echo "configure: failed program was:" >&5
8466   cat conftest.$ac_ext >&5
8467   rm -rf conftest*
8468   ol_cv_pthread_lib_lpthread_woff=no
8469 fi
8470 rm -f conftest*
8471 else
8472   cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 /* pthread test headers */
8476 #include <pthread.h>
8477 #ifndef NULL
8478 #define NULL (void*)0
8479 #endif
8480
8481 static void *task(p)
8482         void *p;
8483 {
8484         return (void *) (p == NULL);
8485 }
8486
8487
8488 int main(argc, argv)
8489         int argc;
8490         char **argv;
8491 {
8492
8493         /* pthread test function */
8494         pthread_t t;
8495         int status;
8496 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8497         /* This system (e.g. AIX) defaults detached; must override */
8498         pthread_attr_t attr;
8499
8500         status = pthread_attr_init(&attr);
8501         if( status ) exit( status );
8502
8503         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8504         if( status ) exit( status );
8505
8506 #define ATTR    &attr
8507 #else
8508 #if HAVE_PTHREADS_D4
8509 #define ATTR    pthread_attr_default
8510 #else
8511 #define ATTR    NULL
8512 #endif
8513 #endif
8514         /* make sure pthread_create() isn't just a stub */
8515         status = pthread_create(&t, ATTR, task, NULL);
8516         if( status ) exit( status );
8517
8518         /* make sure pthread_detach() isn't just a stub */
8519 #if HAVE_PTHREADS_D4
8520         status = pthread_detach( &t );
8521 #else
8522         status = pthread_detach( t );
8523 #endif
8524
8525 #ifdef HAVE_LINUX_THREADS
8526         pthread_kill_other_threads_np();
8527 #endif
8528
8529         exit( status );
8530
8531 }
8532
8533 EOF
8534 if { (eval echo configure:8535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8535 then
8536   ol_cv_pthread_lib_lpthread_woff=yes
8537 else
8538   echo "configure: failed program was:" >&5
8539   cat conftest.$ac_ext >&5
8540   rm -fr conftest*
8541   ol_cv_pthread_lib_lpthread_woff=no
8542 fi
8543 rm -fr conftest*
8544 fi
8545
8546
8547                 # restore the LIBS
8548                 LIBS="$ol_LIBS"
8549         
8550 fi
8551
8552 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8553
8554         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8555                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8556                 ol_link_threads=posix
8557         fi
8558 fi
8559
8560
8561                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8562 if test "$ol_link_threads" = no ; then
8563         # try -lpthread
8564         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8565 echo "configure:8566: checking for pthread link with -lpthread" >&5
8566 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8567   echo $ac_n "(cached) $ac_c" 1>&6
8568 else
8569   
8570                 # save the flags
8571                 ol_LIBS="$LIBS"
8572                 LIBS="-lpthread $LIBS"
8573
8574                 if test "$cross_compiling" = yes; then
8575   cat > conftest.$ac_ext <<EOF
8576 #line 8577 "configure"
8577 #include "confdefs.h"
8578 /* pthread test headers */
8579 #include <pthread.h>
8580 #ifndef NULL
8581 #define NULL (void*)0
8582 #endif
8583
8584 static void *task(p)
8585         void *p;
8586 {
8587         return (void *) (p == NULL);
8588 }
8589
8590 int main() {
8591
8592         /* pthread test function */
8593         pthread_t t;
8594         int status;
8595 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8596         /* This system (e.g. AIX) defaults detached; must override */
8597         pthread_attr_t attr;
8598
8599         status = pthread_attr_init(&attr);
8600         if( status ) exit( status );
8601
8602         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8603         if( status ) exit( status );
8604
8605 #define ATTR    &attr
8606 #else
8607 #if HAVE_PTHREADS_D4
8608 #define ATTR    pthread_attr_default
8609 #else
8610 #define ATTR    NULL
8611 #endif
8612 #endif
8613         /* make sure pthread_create() isn't just a stub */
8614         status = pthread_create(&t, ATTR, task, NULL);
8615         if( status ) exit( status );
8616
8617         /* make sure pthread_detach() isn't just a stub */
8618 #if HAVE_PTHREADS_D4
8619         status = pthread_detach( &t );
8620 #else
8621         status = pthread_detach( t );
8622 #endif
8623
8624 #ifdef HAVE_LINUX_THREADS
8625         pthread_kill_other_threads_np();
8626 #endif
8627
8628         exit( status );
8629
8630 ; return 0; }
8631 EOF
8632 if { (eval echo configure:8633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8633   rm -rf conftest*
8634   ol_cv_pthread_lpthread=yes
8635 else
8636   echo "configure: failed program was:" >&5
8637   cat conftest.$ac_ext >&5
8638   rm -rf conftest*
8639   ol_cv_pthread_lpthread=no
8640 fi
8641 rm -f conftest*
8642 else
8643   cat > conftest.$ac_ext <<EOF
8644 #line 8645 "configure"
8645 #include "confdefs.h"
8646 /* pthread test headers */
8647 #include <pthread.h>
8648 #ifndef NULL
8649 #define NULL (void*)0
8650 #endif
8651
8652 static void *task(p)
8653         void *p;
8654 {
8655         return (void *) (p == NULL);
8656 }
8657
8658
8659 int main(argc, argv)
8660         int argc;
8661         char **argv;
8662 {
8663
8664         /* pthread test function */
8665         pthread_t t;
8666         int status;
8667 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8668         /* This system (e.g. AIX) defaults detached; must override */
8669         pthread_attr_t attr;
8670
8671         status = pthread_attr_init(&attr);
8672         if( status ) exit( status );
8673
8674         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8675         if( status ) exit( status );
8676
8677 #define ATTR    &attr
8678 #else
8679 #if HAVE_PTHREADS_D4
8680 #define ATTR    pthread_attr_default
8681 #else
8682 #define ATTR    NULL
8683 #endif
8684 #endif
8685         /* make sure pthread_create() isn't just a stub */
8686         status = pthread_create(&t, ATTR, task, NULL);
8687         if( status ) exit( status );
8688
8689         /* make sure pthread_detach() isn't just a stub */
8690 #if HAVE_PTHREADS_D4
8691         status = pthread_detach( &t );
8692 #else
8693         status = pthread_detach( t );
8694 #endif
8695
8696 #ifdef HAVE_LINUX_THREADS
8697         pthread_kill_other_threads_np();
8698 #endif
8699
8700         exit( status );
8701
8702 }
8703
8704 EOF
8705 if { (eval echo configure:8706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8706 then
8707   ol_cv_pthread_lpthread=yes
8708 else
8709   echo "configure: failed program was:" >&5
8710   cat conftest.$ac_ext >&5
8711   rm -fr conftest*
8712   ol_cv_pthread_lpthread=no
8713 fi
8714 rm -fr conftest*
8715 fi
8716
8717
8718                 # restore the LIBS
8719                 LIBS="$ol_LIBS"
8720         
8721 fi
8722
8723 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8724
8725         if test $ol_cv_pthread_lpthread = yes ; then
8726                 ol_link_pthreads="-lpthread"
8727                 ol_link_threads=posix
8728         fi
8729 fi
8730
8731                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8732 if test "$ol_link_threads" = no ; then
8733         # try -lc_r
8734         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8735 echo "configure:8736: checking for pthread link with -lc_r" >&5
8736 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8737   echo $ac_n "(cached) $ac_c" 1>&6
8738 else
8739   
8740                 # save the flags
8741                 ol_LIBS="$LIBS"
8742                 LIBS="-lc_r $LIBS"
8743
8744                 if test "$cross_compiling" = yes; then
8745   cat > conftest.$ac_ext <<EOF
8746 #line 8747 "configure"
8747 #include "confdefs.h"
8748 /* pthread test headers */
8749 #include <pthread.h>
8750 #ifndef NULL
8751 #define NULL (void*)0
8752 #endif
8753
8754 static void *task(p)
8755         void *p;
8756 {
8757         return (void *) (p == NULL);
8758 }
8759
8760 int main() {
8761
8762         /* pthread test function */
8763         pthread_t t;
8764         int status;
8765 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8766         /* This system (e.g. AIX) defaults detached; must override */
8767         pthread_attr_t attr;
8768
8769         status = pthread_attr_init(&attr);
8770         if( status ) exit( status );
8771
8772         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8773         if( status ) exit( status );
8774
8775 #define ATTR    &attr
8776 #else
8777 #if HAVE_PTHREADS_D4
8778 #define ATTR    pthread_attr_default
8779 #else
8780 #define ATTR    NULL
8781 #endif
8782 #endif
8783         /* make sure pthread_create() isn't just a stub */
8784         status = pthread_create(&t, ATTR, task, NULL);
8785         if( status ) exit( status );
8786
8787         /* make sure pthread_detach() isn't just a stub */
8788 #if HAVE_PTHREADS_D4
8789         status = pthread_detach( &t );
8790 #else
8791         status = pthread_detach( t );
8792 #endif
8793
8794 #ifdef HAVE_LINUX_THREADS
8795         pthread_kill_other_threads_np();
8796 #endif
8797
8798         exit( status );
8799
8800 ; return 0; }
8801 EOF
8802 if { (eval echo configure:8803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8803   rm -rf conftest*
8804   ol_cv_pthread_lc_r=yes
8805 else
8806   echo "configure: failed program was:" >&5
8807   cat conftest.$ac_ext >&5
8808   rm -rf conftest*
8809   ol_cv_pthread_lc_r=no
8810 fi
8811 rm -f conftest*
8812 else
8813   cat > conftest.$ac_ext <<EOF
8814 #line 8815 "configure"
8815 #include "confdefs.h"
8816 /* pthread test headers */
8817 #include <pthread.h>
8818 #ifndef NULL
8819 #define NULL (void*)0
8820 #endif
8821
8822 static void *task(p)
8823         void *p;
8824 {
8825         return (void *) (p == NULL);
8826 }
8827
8828
8829 int main(argc, argv)
8830         int argc;
8831         char **argv;
8832 {
8833
8834         /* pthread test function */
8835         pthread_t t;
8836         int status;
8837 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8838         /* This system (e.g. AIX) defaults detached; must override */
8839         pthread_attr_t attr;
8840
8841         status = pthread_attr_init(&attr);
8842         if( status ) exit( status );
8843
8844         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8845         if( status ) exit( status );
8846
8847 #define ATTR    &attr
8848 #else
8849 #if HAVE_PTHREADS_D4
8850 #define ATTR    pthread_attr_default
8851 #else
8852 #define ATTR    NULL
8853 #endif
8854 #endif
8855         /* make sure pthread_create() isn't just a stub */
8856         status = pthread_create(&t, ATTR, task, NULL);
8857         if( status ) exit( status );
8858
8859         /* make sure pthread_detach() isn't just a stub */
8860 #if HAVE_PTHREADS_D4
8861         status = pthread_detach( &t );
8862 #else
8863         status = pthread_detach( t );
8864 #endif
8865
8866 #ifdef HAVE_LINUX_THREADS
8867         pthread_kill_other_threads_np();
8868 #endif
8869
8870         exit( status );
8871
8872 }
8873
8874 EOF
8875 if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8876 then
8877   ol_cv_pthread_lc_r=yes
8878 else
8879   echo "configure: failed program was:" >&5
8880   cat conftest.$ac_ext >&5
8881   rm -fr conftest*
8882   ol_cv_pthread_lc_r=no
8883 fi
8884 rm -fr conftest*
8885 fi
8886
8887
8888                 # restore the LIBS
8889                 LIBS="$ol_LIBS"
8890         
8891 fi
8892
8893 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8894
8895         if test $ol_cv_pthread_lc_r = yes ; then
8896                 ol_link_pthreads="-lc_r"
8897                 ol_link_threads=posix
8898         fi
8899 fi
8900
8901
8902                 # Pthread try link: -threads (ol_cv_pthread_threads)
8903 if test "$ol_link_threads" = no ; then
8904         # try -threads
8905         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8906 echo "configure:8907: checking for pthread link with -threads" >&5
8907 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8908   echo $ac_n "(cached) $ac_c" 1>&6
8909 else
8910   
8911                 # save the flags
8912                 ol_LIBS="$LIBS"
8913                 LIBS="-threads $LIBS"
8914
8915                 if test "$cross_compiling" = yes; then
8916   cat > conftest.$ac_ext <<EOF
8917 #line 8918 "configure"
8918 #include "confdefs.h"
8919 /* pthread test headers */
8920 #include <pthread.h>
8921 #ifndef NULL
8922 #define NULL (void*)0
8923 #endif
8924
8925 static void *task(p)
8926         void *p;
8927 {
8928         return (void *) (p == NULL);
8929 }
8930
8931 int main() {
8932
8933         /* pthread test function */
8934         pthread_t t;
8935         int status;
8936 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8937         /* This system (e.g. AIX) defaults detached; must override */
8938         pthread_attr_t attr;
8939
8940         status = pthread_attr_init(&attr);
8941         if( status ) exit( status );
8942
8943         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8944         if( status ) exit( status );
8945
8946 #define ATTR    &attr
8947 #else
8948 #if HAVE_PTHREADS_D4
8949 #define ATTR    pthread_attr_default
8950 #else
8951 #define ATTR    NULL
8952 #endif
8953 #endif
8954         /* make sure pthread_create() isn't just a stub */
8955         status = pthread_create(&t, ATTR, task, NULL);
8956         if( status ) exit( status );
8957
8958         /* make sure pthread_detach() isn't just a stub */
8959 #if HAVE_PTHREADS_D4
8960         status = pthread_detach( &t );
8961 #else
8962         status = pthread_detach( t );
8963 #endif
8964
8965 #ifdef HAVE_LINUX_THREADS
8966         pthread_kill_other_threads_np();
8967 #endif
8968
8969         exit( status );
8970
8971 ; return 0; }
8972 EOF
8973 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8974   rm -rf conftest*
8975   ol_cv_pthread_threads=yes
8976 else
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -rf conftest*
8980   ol_cv_pthread_threads=no
8981 fi
8982 rm -f conftest*
8983 else
8984   cat > conftest.$ac_ext <<EOF
8985 #line 8986 "configure"
8986 #include "confdefs.h"
8987 /* pthread test headers */
8988 #include <pthread.h>
8989 #ifndef NULL
8990 #define NULL (void*)0
8991 #endif
8992
8993 static void *task(p)
8994         void *p;
8995 {
8996         return (void *) (p == NULL);
8997 }
8998
8999
9000 int main(argc, argv)
9001         int argc;
9002         char **argv;
9003 {
9004
9005         /* pthread test function */
9006         pthread_t t;
9007         int status;
9008 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9009         /* This system (e.g. AIX) defaults detached; must override */
9010         pthread_attr_t attr;
9011
9012         status = pthread_attr_init(&attr);
9013         if( status ) exit( status );
9014
9015         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9016         if( status ) exit( status );
9017
9018 #define ATTR    &attr
9019 #else
9020 #if HAVE_PTHREADS_D4
9021 #define ATTR    pthread_attr_default
9022 #else
9023 #define ATTR    NULL
9024 #endif
9025 #endif
9026         /* make sure pthread_create() isn't just a stub */
9027         status = pthread_create(&t, ATTR, task, NULL);
9028         if( status ) exit( status );
9029
9030         /* make sure pthread_detach() isn't just a stub */
9031 #if HAVE_PTHREADS_D4
9032         status = pthread_detach( &t );
9033 #else
9034         status = pthread_detach( t );
9035 #endif
9036
9037 #ifdef HAVE_LINUX_THREADS
9038         pthread_kill_other_threads_np();
9039 #endif
9040
9041         exit( status );
9042
9043 }
9044
9045 EOF
9046 if { (eval echo configure:9047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9047 then
9048   ol_cv_pthread_threads=yes
9049 else
9050   echo "configure: failed program was:" >&5
9051   cat conftest.$ac_ext >&5
9052   rm -fr conftest*
9053   ol_cv_pthread_threads=no
9054 fi
9055 rm -fr conftest*
9056 fi
9057
9058
9059                 # restore the LIBS
9060                 LIBS="$ol_LIBS"
9061         
9062 fi
9063
9064 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9065
9066         if test $ol_cv_pthread_threads = yes ; then
9067                 ol_link_pthreads="-threads"
9068                 ol_link_threads=posix
9069         fi
9070 fi
9071
9072
9073                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9074 if test "$ol_link_threads" = no ; then
9075         # try -lpthreads -lmach -lexc -lc_r
9076         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9077 echo "configure:9078: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9078 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9079   echo $ac_n "(cached) $ac_c" 1>&6
9080 else
9081   
9082                 # save the flags
9083                 ol_LIBS="$LIBS"
9084                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9085
9086                 if test "$cross_compiling" = yes; then
9087   cat > conftest.$ac_ext <<EOF
9088 #line 9089 "configure"
9089 #include "confdefs.h"
9090 /* pthread test headers */
9091 #include <pthread.h>
9092 #ifndef NULL
9093 #define NULL (void*)0
9094 #endif
9095
9096 static void *task(p)
9097         void *p;
9098 {
9099         return (void *) (p == NULL);
9100 }
9101
9102 int main() {
9103
9104         /* pthread test function */
9105         pthread_t t;
9106         int status;
9107 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9108         /* This system (e.g. AIX) defaults detached; must override */
9109         pthread_attr_t attr;
9110
9111         status = pthread_attr_init(&attr);
9112         if( status ) exit( status );
9113
9114         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9115         if( status ) exit( status );
9116
9117 #define ATTR    &attr
9118 #else
9119 #if HAVE_PTHREADS_D4
9120 #define ATTR    pthread_attr_default
9121 #else
9122 #define ATTR    NULL
9123 #endif
9124 #endif
9125         /* make sure pthread_create() isn't just a stub */
9126         status = pthread_create(&t, ATTR, task, NULL);
9127         if( status ) exit( status );
9128
9129         /* make sure pthread_detach() isn't just a stub */
9130 #if HAVE_PTHREADS_D4
9131         status = pthread_detach( &t );
9132 #else
9133         status = pthread_detach( t );
9134 #endif
9135
9136 #ifdef HAVE_LINUX_THREADS
9137         pthread_kill_other_threads_np();
9138 #endif
9139
9140         exit( status );
9141
9142 ; return 0; }
9143 EOF
9144 if { (eval echo configure:9145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9145   rm -rf conftest*
9146   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9147 else
9148   echo "configure: failed program was:" >&5
9149   cat conftest.$ac_ext >&5
9150   rm -rf conftest*
9151   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9152 fi
9153 rm -f conftest*
9154 else
9155   cat > conftest.$ac_ext <<EOF
9156 #line 9157 "configure"
9157 #include "confdefs.h"
9158 /* pthread test headers */
9159 #include <pthread.h>
9160 #ifndef NULL
9161 #define NULL (void*)0
9162 #endif
9163
9164 static void *task(p)
9165         void *p;
9166 {
9167         return (void *) (p == NULL);
9168 }
9169
9170
9171 int main(argc, argv)
9172         int argc;
9173         char **argv;
9174 {
9175
9176         /* pthread test function */
9177         pthread_t t;
9178         int status;
9179 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9180         /* This system (e.g. AIX) defaults detached; must override */
9181         pthread_attr_t attr;
9182
9183         status = pthread_attr_init(&attr);
9184         if( status ) exit( status );
9185
9186         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9187         if( status ) exit( status );
9188
9189 #define ATTR    &attr
9190 #else
9191 #if HAVE_PTHREADS_D4
9192 #define ATTR    pthread_attr_default
9193 #else
9194 #define ATTR    NULL
9195 #endif
9196 #endif
9197         /* make sure pthread_create() isn't just a stub */
9198         status = pthread_create(&t, ATTR, task, NULL);
9199         if( status ) exit( status );
9200
9201         /* make sure pthread_detach() isn't just a stub */
9202 #if HAVE_PTHREADS_D4
9203         status = pthread_detach( &t );
9204 #else
9205         status = pthread_detach( t );
9206 #endif
9207
9208 #ifdef HAVE_LINUX_THREADS
9209         pthread_kill_other_threads_np();
9210 #endif
9211
9212         exit( status );
9213
9214 }
9215
9216 EOF
9217 if { (eval echo configure:9218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9218 then
9219   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9220 else
9221   echo "configure: failed program was:" >&5
9222   cat conftest.$ac_ext >&5
9223   rm -fr conftest*
9224   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9225 fi
9226 rm -fr conftest*
9227 fi
9228
9229
9230                 # restore the LIBS
9231                 LIBS="$ol_LIBS"
9232         
9233 fi
9234
9235 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9236
9237         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9238                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9239                 ol_link_threads=posix
9240         fi
9241 fi
9242
9243                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9244 if test "$ol_link_threads" = no ; then
9245         # try -lpthreads -lmach -lexc
9246         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9247 echo "configure:9248: checking for pthread link with -lpthreads -lmach -lexc" >&5
9248 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9249   echo $ac_n "(cached) $ac_c" 1>&6
9250 else
9251   
9252                 # save the flags
9253                 ol_LIBS="$LIBS"
9254                 LIBS="-lpthreads -lmach -lexc $LIBS"
9255
9256                 if test "$cross_compiling" = yes; then
9257   cat > conftest.$ac_ext <<EOF
9258 #line 9259 "configure"
9259 #include "confdefs.h"
9260 /* pthread test headers */
9261 #include <pthread.h>
9262 #ifndef NULL
9263 #define NULL (void*)0
9264 #endif
9265
9266 static void *task(p)
9267         void *p;
9268 {
9269         return (void *) (p == NULL);
9270 }
9271
9272 int main() {
9273
9274         /* pthread test function */
9275         pthread_t t;
9276         int status;
9277 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9278         /* This system (e.g. AIX) defaults detached; must override */
9279         pthread_attr_t attr;
9280
9281         status = pthread_attr_init(&attr);
9282         if( status ) exit( status );
9283
9284         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9285         if( status ) exit( status );
9286
9287 #define ATTR    &attr
9288 #else
9289 #if HAVE_PTHREADS_D4
9290 #define ATTR    pthread_attr_default
9291 #else
9292 #define ATTR    NULL
9293 #endif
9294 #endif
9295         /* make sure pthread_create() isn't just a stub */
9296         status = pthread_create(&t, ATTR, task, NULL);
9297         if( status ) exit( status );
9298
9299         /* make sure pthread_detach() isn't just a stub */
9300 #if HAVE_PTHREADS_D4
9301         status = pthread_detach( &t );
9302 #else
9303         status = pthread_detach( t );
9304 #endif
9305
9306 #ifdef HAVE_LINUX_THREADS
9307         pthread_kill_other_threads_np();
9308 #endif
9309
9310         exit( status );
9311
9312 ; return 0; }
9313 EOF
9314 if { (eval echo configure:9315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9315   rm -rf conftest*
9316   ol_cv_pthread_lpthreads_lmach_lexc=yes
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320   rm -rf conftest*
9321   ol_cv_pthread_lpthreads_lmach_lexc=no
9322 fi
9323 rm -f conftest*
9324 else
9325   cat > conftest.$ac_ext <<EOF
9326 #line 9327 "configure"
9327 #include "confdefs.h"
9328 /* pthread test headers */
9329 #include <pthread.h>
9330 #ifndef NULL
9331 #define NULL (void*)0
9332 #endif
9333
9334 static void *task(p)
9335         void *p;
9336 {
9337         return (void *) (p == NULL);
9338 }
9339
9340
9341 int main(argc, argv)
9342         int argc;
9343         char **argv;
9344 {
9345
9346         /* pthread test function */
9347         pthread_t t;
9348         int status;
9349 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9350         /* This system (e.g. AIX) defaults detached; must override */
9351         pthread_attr_t attr;
9352
9353         status = pthread_attr_init(&attr);
9354         if( status ) exit( status );
9355
9356         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9357         if( status ) exit( status );
9358
9359 #define ATTR    &attr
9360 #else
9361 #if HAVE_PTHREADS_D4
9362 #define ATTR    pthread_attr_default
9363 #else
9364 #define ATTR    NULL
9365 #endif
9366 #endif
9367         /* make sure pthread_create() isn't just a stub */
9368         status = pthread_create(&t, ATTR, task, NULL);
9369         if( status ) exit( status );
9370
9371         /* make sure pthread_detach() isn't just a stub */
9372 #if HAVE_PTHREADS_D4
9373         status = pthread_detach( &t );
9374 #else
9375         status = pthread_detach( t );
9376 #endif
9377
9378 #ifdef HAVE_LINUX_THREADS
9379         pthread_kill_other_threads_np();
9380 #endif
9381
9382         exit( status );
9383
9384 }
9385
9386 EOF
9387 if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9388 then
9389   ol_cv_pthread_lpthreads_lmach_lexc=yes
9390 else
9391   echo "configure: failed program was:" >&5
9392   cat conftest.$ac_ext >&5
9393   rm -fr conftest*
9394   ol_cv_pthread_lpthreads_lmach_lexc=no
9395 fi
9396 rm -fr conftest*
9397 fi
9398
9399
9400                 # restore the LIBS
9401                 LIBS="$ol_LIBS"
9402         
9403 fi
9404
9405 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9406
9407         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9408                 ol_link_pthreads="-lpthreads -lmach -lexc"
9409                 ol_link_threads=posix
9410         fi
9411 fi
9412
9413                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9414 if test "$ol_link_threads" = no ; then
9415         # try -lpthreads -lexc
9416         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9417 echo "configure:9418: checking for pthread link with -lpthreads -lexc" >&5
9418 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9419   echo $ac_n "(cached) $ac_c" 1>&6
9420 else
9421   
9422                 # save the flags
9423                 ol_LIBS="$LIBS"
9424                 LIBS="-lpthreads -lexc $LIBS"
9425
9426                 if test "$cross_compiling" = yes; then
9427   cat > conftest.$ac_ext <<EOF
9428 #line 9429 "configure"
9429 #include "confdefs.h"
9430 /* pthread test headers */
9431 #include <pthread.h>
9432 #ifndef NULL
9433 #define NULL (void*)0
9434 #endif
9435
9436 static void *task(p)
9437         void *p;
9438 {
9439         return (void *) (p == NULL);
9440 }
9441
9442 int main() {
9443
9444         /* pthread test function */
9445         pthread_t t;
9446         int status;
9447 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9448         /* This system (e.g. AIX) defaults detached; must override */
9449         pthread_attr_t attr;
9450
9451         status = pthread_attr_init(&attr);
9452         if( status ) exit( status );
9453
9454         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9455         if( status ) exit( status );
9456
9457 #define ATTR    &attr
9458 #else
9459 #if HAVE_PTHREADS_D4
9460 #define ATTR    pthread_attr_default
9461 #else
9462 #define ATTR    NULL
9463 #endif
9464 #endif
9465         /* make sure pthread_create() isn't just a stub */
9466         status = pthread_create(&t, ATTR, task, NULL);
9467         if( status ) exit( status );
9468
9469         /* make sure pthread_detach() isn't just a stub */
9470 #if HAVE_PTHREADS_D4
9471         status = pthread_detach( &t );
9472 #else
9473         status = pthread_detach( t );
9474 #endif
9475
9476 #ifdef HAVE_LINUX_THREADS
9477         pthread_kill_other_threads_np();
9478 #endif
9479
9480         exit( status );
9481
9482 ; return 0; }
9483 EOF
9484 if { (eval echo configure:9485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9485   rm -rf conftest*
9486   ol_cv_pthread_lpthreads_lexc=yes
9487 else
9488   echo "configure: failed program was:" >&5
9489   cat conftest.$ac_ext >&5
9490   rm -rf conftest*
9491   ol_cv_pthread_lpthreads_lexc=no
9492 fi
9493 rm -f conftest*
9494 else
9495   cat > conftest.$ac_ext <<EOF
9496 #line 9497 "configure"
9497 #include "confdefs.h"
9498 /* pthread test headers */
9499 #include <pthread.h>
9500 #ifndef NULL
9501 #define NULL (void*)0
9502 #endif
9503
9504 static void *task(p)
9505         void *p;
9506 {
9507         return (void *) (p == NULL);
9508 }
9509
9510
9511 int main(argc, argv)
9512         int argc;
9513         char **argv;
9514 {
9515
9516         /* pthread test function */
9517         pthread_t t;
9518         int status;
9519 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9520         /* This system (e.g. AIX) defaults detached; must override */
9521         pthread_attr_t attr;
9522
9523         status = pthread_attr_init(&attr);
9524         if( status ) exit( status );
9525
9526         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9527         if( status ) exit( status );
9528
9529 #define ATTR    &attr
9530 #else
9531 #if HAVE_PTHREADS_D4
9532 #define ATTR    pthread_attr_default
9533 #else
9534 #define ATTR    NULL
9535 #endif
9536 #endif
9537         /* make sure pthread_create() isn't just a stub */
9538         status = pthread_create(&t, ATTR, task, NULL);
9539         if( status ) exit( status );
9540
9541         /* make sure pthread_detach() isn't just a stub */
9542 #if HAVE_PTHREADS_D4
9543         status = pthread_detach( &t );
9544 #else
9545         status = pthread_detach( t );
9546 #endif
9547
9548 #ifdef HAVE_LINUX_THREADS
9549         pthread_kill_other_threads_np();
9550 #endif
9551
9552         exit( status );
9553
9554 }
9555
9556 EOF
9557 if { (eval echo configure:9558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9558 then
9559   ol_cv_pthread_lpthreads_lexc=yes
9560 else
9561   echo "configure: failed program was:" >&5
9562   cat conftest.$ac_ext >&5
9563   rm -fr conftest*
9564   ol_cv_pthread_lpthreads_lexc=no
9565 fi
9566 rm -fr conftest*
9567 fi
9568
9569
9570                 # restore the LIBS
9571                 LIBS="$ol_LIBS"
9572         
9573 fi
9574
9575 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9576
9577         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9578                 ol_link_pthreads="-lpthreads -lexc"
9579                 ol_link_threads=posix
9580         fi
9581 fi
9582
9583
9584                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9585 if test "$ol_link_threads" = no ; then
9586         # try -lpthreads
9587         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9588 echo "configure:9589: checking for pthread link with -lpthreads" >&5
9589 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9590   echo $ac_n "(cached) $ac_c" 1>&6
9591 else
9592   
9593                 # save the flags
9594                 ol_LIBS="$LIBS"
9595                 LIBS="-lpthreads $LIBS"
9596
9597                 if test "$cross_compiling" = yes; then
9598   cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 /* pthread test headers */
9602 #include <pthread.h>
9603 #ifndef NULL
9604 #define NULL (void*)0
9605 #endif
9606
9607 static void *task(p)
9608         void *p;
9609 {
9610         return (void *) (p == NULL);
9611 }
9612
9613 int main() {
9614
9615         /* pthread test function */
9616         pthread_t t;
9617         int status;
9618 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9619         /* This system (e.g. AIX) defaults detached; must override */
9620         pthread_attr_t attr;
9621
9622         status = pthread_attr_init(&attr);
9623         if( status ) exit( status );
9624
9625         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9626         if( status ) exit( status );
9627
9628 #define ATTR    &attr
9629 #else
9630 #if HAVE_PTHREADS_D4
9631 #define ATTR    pthread_attr_default
9632 #else
9633 #define ATTR    NULL
9634 #endif
9635 #endif
9636         /* make sure pthread_create() isn't just a stub */
9637         status = pthread_create(&t, ATTR, task, NULL);
9638         if( status ) exit( status );
9639
9640         /* make sure pthread_detach() isn't just a stub */
9641 #if HAVE_PTHREADS_D4
9642         status = pthread_detach( &t );
9643 #else
9644         status = pthread_detach( t );
9645 #endif
9646
9647 #ifdef HAVE_LINUX_THREADS
9648         pthread_kill_other_threads_np();
9649 #endif
9650
9651         exit( status );
9652
9653 ; return 0; }
9654 EOF
9655 if { (eval echo configure:9656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9656   rm -rf conftest*
9657   ol_cv_pthread_lib_lpthreads=yes
9658 else
9659   echo "configure: failed program was:" >&5
9660   cat conftest.$ac_ext >&5
9661   rm -rf conftest*
9662   ol_cv_pthread_lib_lpthreads=no
9663 fi
9664 rm -f conftest*
9665 else
9666   cat > conftest.$ac_ext <<EOF
9667 #line 9668 "configure"
9668 #include "confdefs.h"
9669 /* pthread test headers */
9670 #include <pthread.h>
9671 #ifndef NULL
9672 #define NULL (void*)0
9673 #endif
9674
9675 static void *task(p)
9676         void *p;
9677 {
9678         return (void *) (p == NULL);
9679 }
9680
9681
9682 int main(argc, argv)
9683         int argc;
9684         char **argv;
9685 {
9686
9687         /* pthread test function */
9688         pthread_t t;
9689         int status;
9690 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9691         /* This system (e.g. AIX) defaults detached; must override */
9692         pthread_attr_t attr;
9693
9694         status = pthread_attr_init(&attr);
9695         if( status ) exit( status );
9696
9697         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9698         if( status ) exit( status );
9699
9700 #define ATTR    &attr
9701 #else
9702 #if HAVE_PTHREADS_D4
9703 #define ATTR    pthread_attr_default
9704 #else
9705 #define ATTR    NULL
9706 #endif
9707 #endif
9708         /* make sure pthread_create() isn't just a stub */
9709         status = pthread_create(&t, ATTR, task, NULL);
9710         if( status ) exit( status );
9711
9712         /* make sure pthread_detach() isn't just a stub */
9713 #if HAVE_PTHREADS_D4
9714         status = pthread_detach( &t );
9715 #else
9716         status = pthread_detach( t );
9717 #endif
9718
9719 #ifdef HAVE_LINUX_THREADS
9720         pthread_kill_other_threads_np();
9721 #endif
9722
9723         exit( status );
9724
9725 }
9726
9727 EOF
9728 if { (eval echo configure:9729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9729 then
9730   ol_cv_pthread_lib_lpthreads=yes
9731 else
9732   echo "configure: failed program was:" >&5
9733   cat conftest.$ac_ext >&5
9734   rm -fr conftest*
9735   ol_cv_pthread_lib_lpthreads=no
9736 fi
9737 rm -fr conftest*
9738 fi
9739
9740
9741                 # restore the LIBS
9742                 LIBS="$ol_LIBS"
9743         
9744 fi
9745
9746 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9747
9748         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9749                 ol_link_pthreads="-lpthreads"
9750                 ol_link_threads=posix
9751         fi
9752 fi
9753
9754
9755                 if test $ol_link_threads != no ; then
9756                         cat >> confdefs.h <<\EOF
9757 #define HAVE_PTHREADS 1
9758 EOF
9759
9760
9761                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9762
9763                                                 save_CPPFLAGS="$CPPFLAGS"
9764                         save_LIBS="$LIBS"
9765                         LIBS="$LTHREAD_LIBS $LIBS"
9766
9767                                                                                                 for ac_func in sched_yield pthread_yield
9768 do
9769 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9770 echo "configure:9771: checking for $ac_func" >&5
9771 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   cat > conftest.$ac_ext <<EOF
9775 #line 9776 "configure"
9776 #include "confdefs.h"
9777 /* System header to define __stub macros and hopefully few prototypes,
9778     which can conflict with char $ac_func(); below.  */
9779 #include <assert.h>
9780 /* Override any gcc2 internal prototype to avoid an error.  */
9781 /* We use char because int might match the return type of a gcc2
9782     builtin and then its argument prototype would still apply.  */
9783 char $ac_func();
9784 char (*f)();
9785
9786 int main() {
9787
9788 /* The GNU C library defines this for functions which it implements
9789     to always fail with ENOSYS.  Some functions are actually named
9790     something starting with __ and the normal name is an alias.  */
9791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9792 choke me
9793 #else
9794 f = $ac_func;
9795 #endif
9796
9797 ; return 0; }
9798 EOF
9799 if { (eval echo configure:9800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9800   rm -rf conftest*
9801   eval "ac_cv_func_$ac_func=yes"
9802 else
9803   echo "configure: failed program was:" >&5
9804   cat conftest.$ac_ext >&5
9805   rm -rf conftest*
9806   eval "ac_cv_func_$ac_func=no"
9807 fi
9808 rm -f conftest*
9809 fi
9810
9811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9812   echo "$ac_t""yes" 1>&6
9813     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9814   cat >> confdefs.h <<EOF
9815 #define $ac_tr_func 1
9816 EOF
9817  
9818 else
9819   echo "$ac_t""no" 1>&6
9820 fi
9821 done
9822
9823
9824                         if test $ac_cv_func_sched_yield = no -a \
9825                                 $ac_cv_func_pthread_yield = no ; then
9826                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9827 echo "configure:9828: checking for sched_yield in -lrt" >&5
9828 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9830   echo $ac_n "(cached) $ac_c" 1>&6
9831 else
9832   ac_save_LIBS="$LIBS"
9833 LIBS="-lrt  $LIBS"
9834 cat > conftest.$ac_ext <<EOF
9835 #line 9836 "configure"
9836 #include "confdefs.h"
9837 /* Override any gcc2 internal prototype to avoid an error.  */
9838 /* We use char because int might match the return type of a gcc2
9839     builtin and then its argument prototype would still apply.  */
9840 char sched_yield();
9841
9842 int main() {
9843 sched_yield()
9844 ; return 0; }
9845 EOF
9846 if { (eval echo configure:9847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9847   rm -rf conftest*
9848   eval "ac_cv_lib_$ac_lib_var=yes"
9849 else
9850   echo "configure: failed program was:" >&5
9851   cat conftest.$ac_ext >&5
9852   rm -rf conftest*
9853   eval "ac_cv_lib_$ac_lib_var=no"
9854 fi
9855 rm -f conftest*
9856 LIBS="$ac_save_LIBS"
9857
9858 fi
9859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9860   echo "$ac_t""yes" 1>&6
9861   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9862                                         cat >> confdefs.h <<\EOF
9863 #define HAVE_SCHED_YIELD 1
9864 EOF
9865
9866                                         ac_cv_func_sched_yield=yes
9867 else
9868   echo "$ac_t""no" 1>&6
9869 ac_cv_func_sched_yield=no
9870 fi
9871
9872                         fi
9873                         if test $ac_cv_func_sched_yield = no -a \
9874                                 $ac_cv_func_pthread_yield = no ; then
9875                                                                                                 for ac_func in thr_yield
9876 do
9877 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9878 echo "configure:9879: checking for $ac_func" >&5
9879 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9880   echo $ac_n "(cached) $ac_c" 1>&6
9881 else
9882   cat > conftest.$ac_ext <<EOF
9883 #line 9884 "configure"
9884 #include "confdefs.h"
9885 /* System header to define __stub macros and hopefully few prototypes,
9886     which can conflict with char $ac_func(); below.  */
9887 #include <assert.h>
9888 /* Override any gcc2 internal prototype to avoid an error.  */
9889 /* We use char because int might match the return type of a gcc2
9890     builtin and then its argument prototype would still apply.  */
9891 char $ac_func();
9892 char (*f)();
9893
9894 int main() {
9895
9896 /* The GNU C library defines this for functions which it implements
9897     to always fail with ENOSYS.  Some functions are actually named
9898     something starting with __ and the normal name is an alias.  */
9899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9900 choke me
9901 #else
9902 f = $ac_func;
9903 #endif
9904
9905 ; return 0; }
9906 EOF
9907 if { (eval echo configure:9908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9908   rm -rf conftest*
9909   eval "ac_cv_func_$ac_func=yes"
9910 else
9911   echo "configure: failed program was:" >&5
9912   cat conftest.$ac_ext >&5
9913   rm -rf conftest*
9914   eval "ac_cv_func_$ac_func=no"
9915 fi
9916 rm -f conftest*
9917 fi
9918
9919 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9920   echo "$ac_t""yes" 1>&6
9921     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9922   cat >> confdefs.h <<EOF
9923 #define $ac_tr_func 1
9924 EOF
9925  
9926 else
9927   echo "$ac_t""no" 1>&6
9928 fi
9929 done
9930
9931                         fi
9932                         if test $ac_cv_func_sched_yield = no -a \
9933                                 $ac_cv_func_pthread_yield = no -a \
9934                                 "$ac_cv_func_thr_yield" = no ; then
9935                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9936                         fi
9937
9938                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9939 do
9940 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9941 echo "configure:9942: checking for $ac_func" >&5
9942 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9943   echo $ac_n "(cached) $ac_c" 1>&6
9944 else
9945   cat > conftest.$ac_ext <<EOF
9946 #line 9947 "configure"
9947 #include "confdefs.h"
9948 /* System header to define __stub macros and hopefully few prototypes,
9949     which can conflict with char $ac_func(); below.  */
9950 #include <assert.h>
9951 /* Override any gcc2 internal prototype to avoid an error.  */
9952 /* We use char because int might match the return type of a gcc2
9953     builtin and then its argument prototype would still apply.  */
9954 char $ac_func();
9955 char (*f)();
9956
9957 int main() {
9958
9959 /* The GNU C library defines this for functions which it implements
9960     to always fail with ENOSYS.  Some functions are actually named
9961     something starting with __ and the normal name is an alias.  */
9962 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9963 choke me
9964 #else
9965 f = $ac_func;
9966 #endif
9967
9968 ; return 0; }
9969 EOF
9970 if { (eval echo configure:9971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9971   rm -rf conftest*
9972   eval "ac_cv_func_$ac_func=yes"
9973 else
9974   echo "configure: failed program was:" >&5
9975   cat conftest.$ac_ext >&5
9976   rm -rf conftest*
9977   eval "ac_cv_func_$ac_func=no"
9978 fi
9979 rm -f conftest*
9980 fi
9981
9982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9983   echo "$ac_t""yes" 1>&6
9984     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9985   cat >> confdefs.h <<EOF
9986 #define $ac_tr_func 1
9987 EOF
9988  
9989 else
9990   echo "$ac_t""no" 1>&6
9991 fi
9992 done
9993
9994
9995                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9996 echo "configure:9997: checking for pthread_detach with <pthread.h>" >&5
9997 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9998   echo $ac_n "(cached) $ac_c" 1>&6
9999 else
10000   
10001                                                                 cat > conftest.$ac_ext <<EOF
10002 #line 10003 "configure"
10003 #include "confdefs.h"
10004
10005 #include <pthread.h>
10006 #ifndef NULL
10007 #define NULL (void*)0
10008 #endif
10009
10010 int main() {
10011 pthread_detach(NULL);
10012 ; return 0; }
10013 EOF
10014 if { (eval echo configure:10015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10015   rm -rf conftest*
10016   ol_cv_func_pthread_detach=yes
10017 else
10018   echo "configure: failed program was:" >&5
10019   cat conftest.$ac_ext >&5
10020   rm -rf conftest*
10021   ol_cv_func_pthread_detach=no
10022 fi
10023 rm -f conftest*
10024                         
10025 fi
10026
10027 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10028
10029                         if test $ol_cv_func_pthread_detach = no ; then
10030                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10031                         fi
10032
10033                         cat >> confdefs.h <<\EOF
10034 #define HAVE_PTHREAD_DETACH 1
10035 EOF
10036
10037
10038                                                 for ac_func in \
10039                                 pthread_setconcurrency \
10040                                 pthread_getconcurrency \
10041                                 thr_setconcurrency \
10042                                 thr_getconcurrency \
10043                         
10044 do
10045 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10046 echo "configure:10047: checking for $ac_func" >&5
10047 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10048   echo $ac_n "(cached) $ac_c" 1>&6
10049 else
10050   cat > conftest.$ac_ext <<EOF
10051 #line 10052 "configure"
10052 #include "confdefs.h"
10053 /* System header to define __stub macros and hopefully few prototypes,
10054     which can conflict with char $ac_func(); below.  */
10055 #include <assert.h>
10056 /* Override any gcc2 internal prototype to avoid an error.  */
10057 /* We use char because int might match the return type of a gcc2
10058     builtin and then its argument prototype would still apply.  */
10059 char $ac_func();
10060 char (*f)();
10061
10062 int main() {
10063
10064 /* The GNU C library defines this for functions which it implements
10065     to always fail with ENOSYS.  Some functions are actually named
10066     something starting with __ and the normal name is an alias.  */
10067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10068 choke me
10069 #else
10070 f = $ac_func;
10071 #endif
10072
10073 ; return 0; }
10074 EOF
10075 if { (eval echo configure:10076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10076   rm -rf conftest*
10077   eval "ac_cv_func_$ac_func=yes"
10078 else
10079   echo "configure: failed program was:" >&5
10080   cat conftest.$ac_ext >&5
10081   rm -rf conftest*
10082   eval "ac_cv_func_$ac_func=no"
10083 fi
10084 rm -f conftest*
10085 fi
10086
10087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10088   echo "$ac_t""yes" 1>&6
10089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10090   cat >> confdefs.h <<EOF
10091 #define $ac_tr_func 1
10092 EOF
10093  
10094 else
10095   echo "$ac_t""no" 1>&6
10096 fi
10097 done
10098
10099
10100                         
10101         for ac_func in pthread_kill_other_threads_np
10102 do
10103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10104 echo "configure:10105: checking for $ac_func" >&5
10105 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   cat > conftest.$ac_ext <<EOF
10109 #line 10110 "configure"
10110 #include "confdefs.h"
10111 /* System header to define __stub macros and hopefully few prototypes,
10112     which can conflict with char $ac_func(); below.  */
10113 #include <assert.h>
10114 /* Override any gcc2 internal prototype to avoid an error.  */
10115 /* We use char because int might match the return type of a gcc2
10116     builtin and then its argument prototype would still apply.  */
10117 char $ac_func();
10118 char (*f)();
10119
10120 int main() {
10121
10122 /* The GNU C library defines this for functions which it implements
10123     to always fail with ENOSYS.  Some functions are actually named
10124     something starting with __ and the normal name is an alias.  */
10125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10126 choke me
10127 #else
10128 f = $ac_func;
10129 #endif
10130
10131 ; return 0; }
10132 EOF
10133 if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10134   rm -rf conftest*
10135   eval "ac_cv_func_$ac_func=yes"
10136 else
10137   echo "configure: failed program was:" >&5
10138   cat conftest.$ac_ext >&5
10139   rm -rf conftest*
10140   eval "ac_cv_func_$ac_func=no"
10141 fi
10142 rm -f conftest*
10143 fi
10144
10145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10146   echo "$ac_t""yes" 1>&6
10147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10148   cat >> confdefs.h <<EOF
10149 #define $ac_tr_func 1
10150 EOF
10151  
10152 else
10153   echo "$ac_t""no" 1>&6
10154 fi
10155 done
10156
10157         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10158 echo "configure:10159: checking for LinuxThreads implementation" >&5
10159 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10160   echo $ac_n "(cached) $ac_c" 1>&6
10161 else
10162   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10163 fi
10164
10165 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10166
10167                         
10168         
10169         
10170         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10171 echo "configure:10172: checking for LinuxThreads consistency" >&5
10172 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10173   echo $ac_n "(cached) $ac_c" 1>&6
10174 else
10175   
10176                 if test $ol_cv_header_linux_threads = yes -a \
10177                         $ol_cv_sys_linux_threads = yes; then
10178                         ol_cv_linux_threads=yes
10179                 elif test $ol_cv_header_linux_threads = no -a \
10180                         $ol_cv_sys_linux_threads = no; then
10181                         ol_cv_linux_threads=no
10182                 else
10183                         ol_cv_linux_threads=error
10184                 fi
10185         
10186 fi
10187
10188 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10189
10190
10191                         if test $ol_cv_linux_threads = error; then
10192                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10193                         fi
10194
10195                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10196 echo "configure:10197: checking if pthread_create() works" >&5
10197 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   
10201                         if test "$cross_compiling" = yes; then
10202                                 ol_cv_pthread_create_works=yes
10203 else
10204   cat > conftest.$ac_ext <<EOF
10205 #line 10206 "configure"
10206 #include "confdefs.h"
10207 /* pthread test headers */
10208 #include <pthread.h>
10209 #ifndef NULL
10210 #define NULL (void*)0
10211 #endif
10212
10213 static void *task(p)
10214         void *p;
10215 {
10216         return (void *) (p == NULL);
10217 }
10218
10219
10220 int main(argc, argv)
10221         int argc;
10222         char **argv;
10223 {
10224
10225         /* pthread test function */
10226         pthread_t t;
10227         int status;
10228 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10229         /* This system (e.g. AIX) defaults detached; must override */
10230         pthread_attr_t attr;
10231
10232         status = pthread_attr_init(&attr);
10233         if( status ) exit( status );
10234
10235         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10236         if( status ) exit( status );
10237
10238 #define ATTR    &attr
10239 #else
10240 #if HAVE_PTHREADS_D4
10241 #define ATTR    pthread_attr_default
10242 #else
10243 #define ATTR    NULL
10244 #endif
10245 #endif
10246         /* make sure pthread_create() isn't just a stub */
10247         status = pthread_create(&t, ATTR, task, NULL);
10248         if( status ) exit( status );
10249
10250         /* make sure pthread_detach() isn't just a stub */
10251 #if HAVE_PTHREADS_D4
10252         status = pthread_detach( &t );
10253 #else
10254         status = pthread_detach( t );
10255 #endif
10256
10257 #ifdef HAVE_LINUX_THREADS
10258         pthread_kill_other_threads_np();
10259 #endif
10260
10261         exit( status );
10262
10263 }
10264
10265 EOF
10266 if { (eval echo configure:10267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10267 then
10268   ol_cv_pthread_create_works=yes
10269 else
10270   echo "configure: failed program was:" >&5
10271   cat conftest.$ac_ext >&5
10272   rm -fr conftest*
10273   ol_cv_pthread_create_works=no
10274 fi
10275 rm -fr conftest*
10276 fi
10277
10278 fi
10279
10280 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10281
10282                         if test $ol_cv_pthread_create_works = no ; then
10283                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10284                         fi
10285
10286                                                 if test $ol_with_yielding_select = auto ; then
10287                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10288 echo "configure:10289: checking if select yields when using pthreads" >&5
10289 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   
10293                                 if test "$cross_compiling" = yes; then
10294   ol_cv_pthread_select_yields=cross
10295 else
10296   cat > conftest.$ac_ext <<EOF
10297 #line 10298 "configure"
10298 #include "confdefs.h"
10299
10300 #include <sys/types.h>
10301 #include <sys/time.h>
10302 #include <unistd.h>
10303 #include <pthread.h>
10304 #ifndef NULL
10305 #define NULL (void*) 0
10306 #endif
10307
10308 static int fildes[2];
10309
10310 static void *task(p)
10311         void *p;
10312 {
10313         int i;
10314         struct timeval tv;
10315
10316         fd_set rfds;
10317
10318         tv.tv_sec=10;
10319         tv.tv_usec=0;
10320
10321         FD_ZERO(&rfds);
10322         FD_SET(fildes[0], &rfds);
10323
10324         /* we're not interested in any fds */
10325         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10326
10327         if(i < 0) {
10328                 perror("select");
10329                 exit(10);
10330         }
10331
10332         exit(0); /* if we exit here, the select blocked the whole process */
10333 }
10334
10335 int main(argc, argv)
10336         int argc;
10337         char **argv;
10338 {
10339         pthread_t t;
10340
10341         /* create a pipe to select */
10342         if(pipe(&fildes[0])) {
10343                 perror("select");
10344                 exit(1);
10345         }
10346
10347 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10348         (void) pthread_setconcurrency(2);
10349 #else
10350 #ifdef HAVE_THR_SETCONCURRENCY
10351         /* Set Solaris LWP concurrency to 2 */
10352         thr_setconcurrency(2);
10353 #endif
10354 #endif
10355
10356 #if HAVE_PTHREADS_D4
10357         pthread_create(&t, pthread_attr_default, task, NULL);
10358 #else
10359         pthread_create(&t, NULL, task, NULL);
10360 #endif
10361
10362 #if HAVE_SCHED_YIELD
10363         sched_yield();  /* make sure task runs first */
10364 #else
10365 #ifdef HAVE_PTHREAD_YIELD
10366         pthread_yield();        /* make sure task runs first */
10367 #endif
10368 #endif
10369
10370         exit(2);
10371 }
10372 EOF
10373 if { (eval echo configure:10374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10374 then
10375   ol_cv_pthread_select_yields=no
10376 else
10377   echo "configure: failed program was:" >&5
10378   cat conftest.$ac_ext >&5
10379   rm -fr conftest*
10380   ol_cv_pthread_select_yields=yes
10381 fi
10382 rm -fr conftest*
10383 fi
10384
10385 fi
10386
10387 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10388
10389                                 if test $ol_cv_pthread_select_yields = cross ; then
10390                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10391                                 fi
10392
10393                                 if test $ol_cv_pthread_select_yields = yes ; then
10394                                         ol_with_yielding_select=yes
10395                                 fi
10396                         fi
10397
10398                                                 CPPFLAGS="$save_CPPFLAGS"
10399                         LIBS="$save_LIBS"
10400                 else
10401                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10402                 fi
10403         fi
10404
10405         if test $ol_with_threads = posix ; then
10406                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10407         fi
10408 fi
10409
10410 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10411         -o $ol_with_threads = mach ; then
10412
10413                 for ac_hdr in mach/cthreads.h
10414 do
10415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10417 echo "configure:10418: checking for $ac_hdr" >&5
10418 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10419   echo $ac_n "(cached) $ac_c" 1>&6
10420 else
10421   cat > conftest.$ac_ext <<EOF
10422 #line 10423 "configure"
10423 #include "confdefs.h"
10424 #include <$ac_hdr>
10425 EOF
10426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10427 { (eval echo configure:10428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10429 if test -z "$ac_err"; then
10430   rm -rf conftest*
10431   eval "ac_cv_header_$ac_safe=yes"
10432 else
10433   echo "$ac_err" >&5
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -rf conftest*
10437   eval "ac_cv_header_$ac_safe=no"
10438 fi
10439 rm -f conftest*
10440 fi
10441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10442   echo "$ac_t""yes" 1>&6
10443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10444   cat >> confdefs.h <<EOF
10445 #define $ac_tr_hdr 1
10446 EOF
10447  
10448 else
10449   echo "$ac_t""no" 1>&6
10450 fi
10451 done
10452
10453         if test $ac_cv_header_mach_cthreads_h = yes ; then
10454                 ol_with_threads=found
10455
10456                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10457 echo "configure:10458: checking for cthread_fork" >&5
10458 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10459   echo $ac_n "(cached) $ac_c" 1>&6
10460 else
10461   cat > conftest.$ac_ext <<EOF
10462 #line 10463 "configure"
10463 #include "confdefs.h"
10464 /* System header to define __stub macros and hopefully few prototypes,
10465     which can conflict with char cthread_fork(); below.  */
10466 #include <assert.h>
10467 /* Override any gcc2 internal prototype to avoid an error.  */
10468 /* We use char because int might match the return type of a gcc2
10469     builtin and then its argument prototype would still apply.  */
10470 char cthread_fork();
10471 char (*f)();
10472
10473 int main() {
10474
10475 /* The GNU C library defines this for functions which it implements
10476     to always fail with ENOSYS.  Some functions are actually named
10477     something starting with __ and the normal name is an alias.  */
10478 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10479 choke me
10480 #else
10481 f = cthread_fork;
10482 #endif
10483
10484 ; return 0; }
10485 EOF
10486 if { (eval echo configure:10487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10487   rm -rf conftest*
10488   eval "ac_cv_func_cthread_fork=yes"
10489 else
10490   echo "configure: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   rm -rf conftest*
10493   eval "ac_cv_func_cthread_fork=no"
10494 fi
10495 rm -f conftest*
10496 fi
10497
10498 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10499   echo "$ac_t""yes" 1>&6
10500   ol_link_threads=yes
10501 else
10502   echo "$ac_t""no" 1>&6
10503 fi
10504
10505
10506                 if test $ol_link_threads = no ; then
10507                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10508 echo "configure:10509: checking for cthread_fork with -all_load" >&5
10509 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10510   echo $ac_n "(cached) $ac_c" 1>&6
10511 else
10512   
10513                                                                 save_LIBS="$LIBS"
10514                                 LIBS="-all_load $LIBS"
10515                                 cat > conftest.$ac_ext <<EOF
10516 #line 10517 "configure"
10517 #include "confdefs.h"
10518 #include <mach/cthreads.h>
10519 int main() {
10520
10521                                         cthread_fork((void *)0, (void *)0);
10522                                         
10523 ; return 0; }
10524 EOF
10525 if { (eval echo configure:10526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10526   rm -rf conftest*
10527   ol_cv_cthread_all_load=yes
10528 else
10529   echo "configure: failed program was:" >&5
10530   cat conftest.$ac_ext >&5
10531   rm -rf conftest*
10532   ol_cv_cthread_all_load=no
10533 fi
10534 rm -f conftest*
10535                                                                 LIBS="$save_LIBS"
10536                         
10537 fi
10538
10539 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10540
10541                         if test $ol_cv_cthread_all_load = yes ; then
10542                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10543                                 ol_link_threads=mach
10544                         fi
10545                 fi
10546
10547                 if test $ol_link_threads != no ; then
10548                         : check for cthread specific functionality here
10549                         cat >> confdefs.h <<\EOF
10550 #define HAVE_MACH_CTHREADS 1
10551 EOF
10552
10553                 else
10554                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10555                 fi
10556         fi
10557
10558         if test $ol_with_threads = mach ; then
10559                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10560         fi
10561 fi
10562
10563 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10564         -o $ol_with_threads = pth ; then
10565
10566         for ac_hdr in pth.h
10567 do
10568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10569 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10570 echo "configure:10571: checking for $ac_hdr" >&5
10571 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10572   echo $ac_n "(cached) $ac_c" 1>&6
10573 else
10574   cat > conftest.$ac_ext <<EOF
10575 #line 10576 "configure"
10576 #include "confdefs.h"
10577 #include <$ac_hdr>
10578 EOF
10579 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10580 { (eval echo configure:10581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10581 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10582 if test -z "$ac_err"; then
10583   rm -rf conftest*
10584   eval "ac_cv_header_$ac_safe=yes"
10585 else
10586   echo "$ac_err" >&5
10587   echo "configure: failed program was:" >&5
10588   cat conftest.$ac_ext >&5
10589   rm -rf conftest*
10590   eval "ac_cv_header_$ac_safe=no"
10591 fi
10592 rm -f conftest*
10593 fi
10594 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10595   echo "$ac_t""yes" 1>&6
10596     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10597   cat >> confdefs.h <<EOF
10598 #define $ac_tr_hdr 1
10599 EOF
10600  
10601 else
10602   echo "$ac_t""no" 1>&6
10603 fi
10604 done
10605
10606
10607         if test $ac_cv_header_pth_h = yes ; then
10608                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10609 echo "configure:10610: checking for pth_version in -lpth" >&5
10610 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10611 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10612   echo $ac_n "(cached) $ac_c" 1>&6
10613 else
10614   ac_save_LIBS="$LIBS"
10615 LIBS="-lpth  $LIBS"
10616 cat > conftest.$ac_ext <<EOF
10617 #line 10618 "configure"
10618 #include "confdefs.h"
10619 /* Override any gcc2 internal prototype to avoid an error.  */
10620 /* We use char because int might match the return type of a gcc2
10621     builtin and then its argument prototype would still apply.  */
10622 char pth_version();
10623
10624 int main() {
10625 pth_version()
10626 ; return 0; }
10627 EOF
10628 if { (eval echo configure:10629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10629   rm -rf conftest*
10630   eval "ac_cv_lib_$ac_lib_var=yes"
10631 else
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -rf conftest*
10635   eval "ac_cv_lib_$ac_lib_var=no"
10636 fi
10637 rm -f conftest*
10638 LIBS="$ac_save_LIBS"
10639
10640 fi
10641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10642   echo "$ac_t""yes" 1>&6
10643   have_pth=yes
10644 else
10645   echo "$ac_t""no" 1>&6
10646 have_pth=no
10647 fi
10648
10649
10650                 if test $have_pth = yes ; then
10651                         cat >> confdefs.h <<\EOF
10652 #define HAVE_GNU_PTH 1
10653 EOF
10654
10655                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10656                         ol_link_threads=pth
10657
10658                         if test $ol_with_yielding_select = auto ; then
10659                                 ol_with_yielding_select=yes
10660                         fi
10661                 fi
10662         fi
10663 fi
10664
10665 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10666         -o $ol_with_threads = lwp ; then
10667
10668                 for ac_hdr in thread.h synch.h
10669 do
10670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10672 echo "configure:10673: checking for $ac_hdr" >&5
10673 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10674   echo $ac_n "(cached) $ac_c" 1>&6
10675 else
10676   cat > conftest.$ac_ext <<EOF
10677 #line 10678 "configure"
10678 #include "confdefs.h"
10679 #include <$ac_hdr>
10680 EOF
10681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10682 { (eval echo configure:10683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10684 if test -z "$ac_err"; then
10685   rm -rf conftest*
10686   eval "ac_cv_header_$ac_safe=yes"
10687 else
10688   echo "$ac_err" >&5
10689   echo "configure: failed program was:" >&5
10690   cat conftest.$ac_ext >&5
10691   rm -rf conftest*
10692   eval "ac_cv_header_$ac_safe=no"
10693 fi
10694 rm -f conftest*
10695 fi
10696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10697   echo "$ac_t""yes" 1>&6
10698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10699   cat >> confdefs.h <<EOF
10700 #define $ac_tr_hdr 1
10701 EOF
10702  
10703 else
10704   echo "$ac_t""no" 1>&6
10705 fi
10706 done
10707
10708         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10709                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10710 echo "configure:10711: checking for thr_create in -lthread" >&5
10711 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10712 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10713   echo $ac_n "(cached) $ac_c" 1>&6
10714 else
10715   ac_save_LIBS="$LIBS"
10716 LIBS="-lthread  $LIBS"
10717 cat > conftest.$ac_ext <<EOF
10718 #line 10719 "configure"
10719 #include "confdefs.h"
10720 /* Override any gcc2 internal prototype to avoid an error.  */
10721 /* We use char because int might match the return type of a gcc2
10722     builtin and then its argument prototype would still apply.  */
10723 char thr_create();
10724
10725 int main() {
10726 thr_create()
10727 ; return 0; }
10728 EOF
10729 if { (eval echo configure:10730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10730   rm -rf conftest*
10731   eval "ac_cv_lib_$ac_lib_var=yes"
10732 else
10733   echo "configure: failed program was:" >&5
10734   cat conftest.$ac_ext >&5
10735   rm -rf conftest*
10736   eval "ac_cv_lib_$ac_lib_var=no"
10737 fi
10738 rm -f conftest*
10739 LIBS="$ac_save_LIBS"
10740
10741 fi
10742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10743   echo "$ac_t""yes" 1>&6
10744   have_thr=yes
10745 else
10746   echo "$ac_t""no" 1>&6
10747 have_thr=no
10748 fi
10749
10750
10751                 if test $have_thr = yes ; then
10752                         cat >> confdefs.h <<\EOF
10753 #define HAVE_THR 1
10754 EOF
10755
10756                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10757                         ol_link_threads=thr
10758
10759                         if test $ol_with_yielding_select = auto ; then
10760                                 ol_with_yielding_select=yes
10761                         fi
10762
10763                                                 for ac_func in \
10764                                 thr_setconcurrency \
10765                                 thr_getconcurrency \
10766                         
10767 do
10768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10769 echo "configure:10770: checking for $ac_func" >&5
10770 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10771   echo $ac_n "(cached) $ac_c" 1>&6
10772 else
10773   cat > conftest.$ac_ext <<EOF
10774 #line 10775 "configure"
10775 #include "confdefs.h"
10776 /* System header to define __stub macros and hopefully few prototypes,
10777     which can conflict with char $ac_func(); below.  */
10778 #include <assert.h>
10779 /* Override any gcc2 internal prototype to avoid an error.  */
10780 /* We use char because int might match the return type of a gcc2
10781     builtin and then its argument prototype would still apply.  */
10782 char $ac_func();
10783 char (*f)();
10784
10785 int main() {
10786
10787 /* The GNU C library defines this for functions which it implements
10788     to always fail with ENOSYS.  Some functions are actually named
10789     something starting with __ and the normal name is an alias.  */
10790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10791 choke me
10792 #else
10793 f = $ac_func;
10794 #endif
10795
10796 ; return 0; }
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10799   rm -rf conftest*
10800   eval "ac_cv_func_$ac_func=yes"
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -rf conftest*
10805   eval "ac_cv_func_$ac_func=no"
10806 fi
10807 rm -f conftest*
10808 fi
10809
10810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10811   echo "$ac_t""yes" 1>&6
10812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10813   cat >> confdefs.h <<EOF
10814 #define $ac_tr_func 1
10815 EOF
10816  
10817 else
10818   echo "$ac_t""no" 1>&6
10819 fi
10820 done
10821
10822                 fi
10823         fi
10824
10825                 for ac_hdr in lwp/lwp.h
10826 do
10827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10828 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10829 echo "configure:10830: checking for $ac_hdr" >&5
10830 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10831   echo $ac_n "(cached) $ac_c" 1>&6
10832 else
10833   cat > conftest.$ac_ext <<EOF
10834 #line 10835 "configure"
10835 #include "confdefs.h"
10836 #include <$ac_hdr>
10837 EOF
10838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10839 { (eval echo configure:10840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10841 if test -z "$ac_err"; then
10842   rm -rf conftest*
10843   eval "ac_cv_header_$ac_safe=yes"
10844 else
10845   echo "$ac_err" >&5
10846   echo "configure: failed program was:" >&5
10847   cat conftest.$ac_ext >&5
10848   rm -rf conftest*
10849   eval "ac_cv_header_$ac_safe=no"
10850 fi
10851 rm -f conftest*
10852 fi
10853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10854   echo "$ac_t""yes" 1>&6
10855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10856   cat >> confdefs.h <<EOF
10857 #define $ac_tr_hdr 1
10858 EOF
10859  
10860 else
10861   echo "$ac_t""no" 1>&6
10862 fi
10863 done
10864
10865         if test $ac_cv_header_lwp_lwp_h = yes ; then
10866                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10867 echo "configure:10868: checking for lwp_create in -llwp" >&5
10868 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10869 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10870   echo $ac_n "(cached) $ac_c" 1>&6
10871 else
10872   ac_save_LIBS="$LIBS"
10873 LIBS="-llwp  $LIBS"
10874 cat > conftest.$ac_ext <<EOF
10875 #line 10876 "configure"
10876 #include "confdefs.h"
10877 /* Override any gcc2 internal prototype to avoid an error.  */
10878 /* We use char because int might match the return type of a gcc2
10879     builtin and then its argument prototype would still apply.  */
10880 char lwp_create();
10881
10882 int main() {
10883 lwp_create()
10884 ; return 0; }
10885 EOF
10886 if { (eval echo configure:10887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10887   rm -rf conftest*
10888   eval "ac_cv_lib_$ac_lib_var=yes"
10889 else
10890   echo "configure: failed program was:" >&5
10891   cat conftest.$ac_ext >&5
10892   rm -rf conftest*
10893   eval "ac_cv_lib_$ac_lib_var=no"
10894 fi
10895 rm -f conftest*
10896 LIBS="$ac_save_LIBS"
10897
10898 fi
10899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10900   echo "$ac_t""yes" 1>&6
10901   have_lwp=yes
10902 else
10903   echo "$ac_t""no" 1>&6
10904 have_lwp=no
10905 fi
10906
10907
10908                 if test $have_lwp = yes ; then
10909                         cat >> confdefs.h <<\EOF
10910 #define HAVE_LWP 1
10911 EOF
10912
10913                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10914                         ol_link_threads=lwp
10915
10916                         if test $ol_with_yielding_select = auto ; then
10917                                 ol_with_yielding_select=no
10918                         fi
10919                 fi
10920         fi
10921 fi
10922
10923 if test $ol_with_yielding_select = yes ; then
10924         cat >> confdefs.h <<\EOF
10925 #define HAVE_YIELDING_SELECT 1
10926 EOF
10927
10928 fi
10929
10930 if test $ol_with_threads = manual ; then
10931                 ol_link_threads=yes
10932
10933         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10934
10935         for ac_hdr in pthread.h sched.h
10936 do
10937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10939 echo "configure:10940: checking for $ac_hdr" >&5
10940 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10941   echo $ac_n "(cached) $ac_c" 1>&6
10942 else
10943   cat > conftest.$ac_ext <<EOF
10944 #line 10945 "configure"
10945 #include "confdefs.h"
10946 #include <$ac_hdr>
10947 EOF
10948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10949 { (eval echo configure:10950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10951 if test -z "$ac_err"; then
10952   rm -rf conftest*
10953   eval "ac_cv_header_$ac_safe=yes"
10954 else
10955   echo "$ac_err" >&5
10956   echo "configure: failed program was:" >&5
10957   cat conftest.$ac_ext >&5
10958   rm -rf conftest*
10959   eval "ac_cv_header_$ac_safe=no"
10960 fi
10961 rm -f conftest*
10962 fi
10963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10964   echo "$ac_t""yes" 1>&6
10965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10966   cat >> confdefs.h <<EOF
10967 #define $ac_tr_hdr 1
10968 EOF
10969  
10970 else
10971   echo "$ac_t""no" 1>&6
10972 fi
10973 done
10974
10975         for ac_func in sched_yield pthread_yield
10976 do
10977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10978 echo "configure:10979: checking for $ac_func" >&5
10979 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10980   echo $ac_n "(cached) $ac_c" 1>&6
10981 else
10982   cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985 /* System header to define __stub macros and hopefully few prototypes,
10986     which can conflict with char $ac_func(); below.  */
10987 #include <assert.h>
10988 /* Override any gcc2 internal prototype to avoid an error.  */
10989 /* We use char because int might match the return type of a gcc2
10990     builtin and then its argument prototype would still apply.  */
10991 char $ac_func();
10992 char (*f)();
10993
10994 int main() {
10995
10996 /* The GNU C library defines this for functions which it implements
10997     to always fail with ENOSYS.  Some functions are actually named
10998     something starting with __ and the normal name is an alias.  */
10999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11000 choke me
11001 #else
11002 f = $ac_func;
11003 #endif
11004
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11008   rm -rf conftest*
11009   eval "ac_cv_func_$ac_func=yes"
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   eval "ac_cv_func_$ac_func=no"
11015 fi
11016 rm -f conftest*
11017 fi
11018
11019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11020   echo "$ac_t""yes" 1>&6
11021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11022   cat >> confdefs.h <<EOF
11023 #define $ac_tr_func 1
11024 EOF
11025  
11026 else
11027   echo "$ac_t""no" 1>&6
11028 fi
11029 done
11030
11031         
11032         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11033 echo "configure:11034: checking for LinuxThreads pthread.h" >&5
11034 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11035   echo $ac_n "(cached) $ac_c" 1>&6
11036 else
11037   cat > conftest.$ac_ext <<EOF
11038 #line 11039 "configure"
11039 #include "confdefs.h"
11040 #include <pthread.h>
11041 EOF
11042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11043   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11044   rm -rf conftest*
11045   ol_cv_header_linux_threads=yes
11046 else
11047   rm -rf conftest*
11048   ol_cv_header_linux_threads=no
11049 fi
11050 rm -f conftest*
11051
11052                 
11053 fi
11054
11055 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11056         if test $ol_cv_header_linux_threads = yes; then
11057                 cat >> confdefs.h <<\EOF
11058 #define HAVE_LINUX_THREADS 1
11059 EOF
11060
11061         fi
11062
11063
11064         for ac_hdr in mach/cthreads.h
11065 do
11066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11068 echo "configure:11069: checking for $ac_hdr" >&5
11069 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11070   echo $ac_n "(cached) $ac_c" 1>&6
11071 else
11072   cat > conftest.$ac_ext <<EOF
11073 #line 11074 "configure"
11074 #include "confdefs.h"
11075 #include <$ac_hdr>
11076 EOF
11077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11078 { (eval echo configure:11079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11080 if test -z "$ac_err"; then
11081   rm -rf conftest*
11082   eval "ac_cv_header_$ac_safe=yes"
11083 else
11084   echo "$ac_err" >&5
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_header_$ac_safe=no"
11089 fi
11090 rm -f conftest*
11091 fi
11092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11093   echo "$ac_t""yes" 1>&6
11094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11095   cat >> confdefs.h <<EOF
11096 #define $ac_tr_hdr 1
11097 EOF
11098  
11099 else
11100   echo "$ac_t""no" 1>&6
11101 fi
11102 done
11103
11104         for ac_hdr in lwp/lwp.h
11105 do
11106 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11107 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11108 echo "configure:11109: checking for $ac_hdr" >&5
11109 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115 #include <$ac_hdr>
11116 EOF
11117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11118 { (eval echo configure:11119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11120 if test -z "$ac_err"; then
11121   rm -rf conftest*
11122   eval "ac_cv_header_$ac_safe=yes"
11123 else
11124   echo "$ac_err" >&5
11125   echo "configure: failed program was:" >&5
11126   cat conftest.$ac_ext >&5
11127   rm -rf conftest*
11128   eval "ac_cv_header_$ac_safe=no"
11129 fi
11130 rm -f conftest*
11131 fi
11132 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11133   echo "$ac_t""yes" 1>&6
11134     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11135   cat >> confdefs.h <<EOF
11136 #define $ac_tr_hdr 1
11137 EOF
11138  
11139 else
11140   echo "$ac_t""no" 1>&6
11141 fi
11142 done
11143
11144         for ac_hdr in thread.h synch.h
11145 do
11146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11148 echo "configure:11149: checking for $ac_hdr" >&5
11149 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   cat > conftest.$ac_ext <<EOF
11153 #line 11154 "configure"
11154 #include "confdefs.h"
11155 #include <$ac_hdr>
11156 EOF
11157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11158 { (eval echo configure:11159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11160 if test -z "$ac_err"; then
11161   rm -rf conftest*
11162   eval "ac_cv_header_$ac_safe=yes"
11163 else
11164   echo "$ac_err" >&5
11165   echo "configure: failed program was:" >&5
11166   cat conftest.$ac_ext >&5
11167   rm -rf conftest*
11168   eval "ac_cv_header_$ac_safe=no"
11169 fi
11170 rm -f conftest*
11171 fi
11172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11173   echo "$ac_t""yes" 1>&6
11174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11175   cat >> confdefs.h <<EOF
11176 #define $ac_tr_hdr 1
11177 EOF
11178  
11179 else
11180   echo "$ac_t""no" 1>&6
11181 fi
11182 done
11183
11184 fi
11185
11186 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11187                         cat >> confdefs.h <<\EOF
11188 #define REENTRANT 1
11189 EOF
11190
11191         cat >> confdefs.h <<\EOF
11192 #define _REENTRANT 1
11193 EOF
11194
11195         cat >> confdefs.h <<\EOF
11196 #define THREAD_SAFE 1
11197 EOF
11198
11199         cat >> confdefs.h <<\EOF
11200 #define _THREAD_SAFE 1
11201 EOF
11202
11203         cat >> confdefs.h <<\EOF
11204 #define THREADSAFE 1
11205 EOF
11206
11207         cat >> confdefs.h <<\EOF
11208 #define _THREADSAFE 1
11209 EOF
11210
11211         cat >> confdefs.h <<\EOF
11212 #define _SGI_MP_SOURCE 1
11213 EOF
11214
11215
11216                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11217 echo "configure:11218: checking for thread specific errno" >&5
11218 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11219   echo $ac_n "(cached) $ac_c" 1>&6
11220 else
11221   
11222                 cat > conftest.$ac_ext <<EOF
11223 #line 11224 "configure"
11224 #include "confdefs.h"
11225 #include <errno.h>
11226 int main() {
11227 errno = 0;
11228 ; return 0; }
11229 EOF
11230 if { (eval echo configure:11231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11231   rm -rf conftest*
11232   ol_cv_errno_thread_specific=yes
11233 else
11234   echo "configure: failed program was:" >&5
11235   cat conftest.$ac_ext >&5
11236   rm -rf conftest*
11237   ol_cv_errno_thread_specific=no
11238 fi
11239 rm -f conftest*
11240         
11241 fi
11242
11243 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11244
11245                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11246 echo "configure:11247: checking for thread specific h_errno" >&5
11247 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11248   echo $ac_n "(cached) $ac_c" 1>&6
11249 else
11250   
11251                 cat > conftest.$ac_ext <<EOF
11252 #line 11253 "configure"
11253 #include "confdefs.h"
11254 #include <netdb.h>
11255 int main() {
11256 h_errno = 0;
11257 ; return 0; }
11258 EOF
11259 if { (eval echo configure:11260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11260   rm -rf conftest*
11261   ol_cv_h_errno_thread_specific=yes
11262 else
11263   echo "configure: failed program was:" >&5
11264   cat conftest.$ac_ext >&5
11265   rm -rf conftest*
11266   ol_cv_h_errno_thread_specific=no
11267 fi
11268 rm -f conftest*
11269         
11270 fi
11271
11272 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11273
11274         if test $ol_cv_errno_thread_specific != yes \
11275                 -o $ol_cv_h_errno_thread_specific != yes ; then
11276                 LIBS="$LTHREAD_LIBS $LIBS"
11277                 LTHREAD_LIBS=""
11278         fi
11279
11280 fi  
11281
11282 if test $ol_link_threads = no ; then
11283         if test $ol_with_threads = yes ; then
11284                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11285         fi
11286
11287         if test $ol_with_threads = auto ; then
11288                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11289                 ol_with_threads=no
11290         fi
11291
11292         cat >> confdefs.h <<\EOF
11293 #define NO_THREADS 1
11294 EOF
11295
11296         LTHREAD_LIBS=""
11297 fi
11298
11299 if test $ol_link_threads != no ; then
11300         cat >> confdefs.h <<\EOF
11301 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11302 EOF
11303
11304 fi
11305
11306 ol_link_ldbm=no 
11307
11308 if test $ol_with_ldbm_api = auto \
11309         -o $ol_with_ldbm_api = berkeley \
11310         -o $ol_with_ldbm_api = bcompat ; then
11311
11312         if test $ol_with_ldbm_api = bcompat; then \
11313                 ol_cv_berkeley_db=no
11314 for ac_hdr in db_185.h db.h
11315 do
11316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11318 echo "configure:11319: checking for $ac_hdr" >&5
11319 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11320   echo $ac_n "(cached) $ac_c" 1>&6
11321 else
11322   cat > conftest.$ac_ext <<EOF
11323 #line 11324 "configure"
11324 #include "confdefs.h"
11325 #include <$ac_hdr>
11326 EOF
11327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11328 { (eval echo configure:11329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11330 if test -z "$ac_err"; then
11331   rm -rf conftest*
11332   eval "ac_cv_header_$ac_safe=yes"
11333 else
11334   echo "$ac_err" >&5
11335   echo "configure: failed program was:" >&5
11336   cat conftest.$ac_ext >&5
11337   rm -rf conftest*
11338   eval "ac_cv_header_$ac_safe=no"
11339 fi
11340 rm -f conftest*
11341 fi
11342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11343   echo "$ac_t""yes" 1>&6
11344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11345   cat >> confdefs.h <<EOF
11346 #define $ac_tr_hdr 1
11347 EOF
11348  
11349 else
11350   echo "$ac_t""no" 1>&6
11351 fi
11352 done
11353
11354 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11355         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11356 echo "configure:11357: checking if Berkeley DB header compatibility" >&5
11357 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11358   echo $ac_n "(cached) $ac_c" 1>&6
11359 else
11360   
11361                 cat > conftest.$ac_ext <<EOF
11362 #line 11363 "configure"
11363 #include "confdefs.h"
11364
11365 #if HAVE_DB_185_H
11366 #       include <db_185.h>
11367 #else
11368 #       include <db.h>
11369 #endif
11370
11371  /* this check could be improved */
11372 #ifndef DB_VERSION_MAJOR
11373 #       define DB_VERSION_MAJOR 1
11374 #endif
11375
11376 #if DB_VERSION_MAJOR == 1 
11377         __db_version_1
11378 #endif
11379
11380 EOF
11381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11382   egrep "__db_version_1" >/dev/null 2>&1; then
11383   rm -rf conftest*
11384   ol_cv_header_db1=yes
11385 else
11386   rm -rf conftest*
11387   ol_cv_header_db1=no
11388 fi
11389 rm -f conftest*
11390
11391 fi
11392
11393 echo "$ac_t""$ol_cv_header_db1" 1>&6
11394
11395         if test ol_cv_header_db1=yes ; then
11396                 ol_cv_lib_db=no
11397 if test $ol_cv_lib_db = no ; then
11398         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11399 echo "configure:11400: checking for Berkeley DB link (default)" >&5
11400 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11401   echo $ac_n "(cached) $ac_c" 1>&6
11402 else
11403   
11404         ol_DB_LIB=
11405         ol_LIBS=$LIBS
11406         LIBS="$ol_DB_LIB $LIBS"
11407
11408         cat > conftest.$ac_ext <<EOF
11409 #line 11410 "configure"
11410 #include "confdefs.h"
11411
11412 #ifdef HAVE_DB_185_H
11413 # include <db_185.h>
11414 #else
11415 # include <db.h>
11416 #endif
11417
11418 #ifndef DB_VERSION_MAJOR
11419 # define DB_VERSION_MAJOR 1
11420 #endif
11421
11422 #ifndef NULL
11423 #define NULL ((void*)0)
11424 #endif
11425
11426 int main() {
11427
11428 #if DB_VERSION_MAJOR > 2
11429         db_env_create( NULL, 0 );
11430 #elif DB_VERSION_MAJOR > 1
11431         db_appexit( NULL );
11432 #else
11433         (void) dbopen( NULL, 0, 0, 0, NULL);
11434 #endif
11435
11436 ; return 0; }
11437 EOF
11438 if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11439   rm -rf conftest*
11440   ol_cv_db_none=yes
11441 else
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444   rm -rf conftest*
11445   ol_cv_db_none=no
11446 fi
11447 rm -f conftest*
11448
11449         LIBS="$ol_LIBS"
11450
11451 fi
11452
11453 echo "$ac_t""$ol_cv_db_none" 1>&6
11454
11455         if test $ol_cv_db_none = yes ; then
11456                 ol_cv_lib_db=yes
11457         fi
11458 fi
11459
11460 if test $ol_cv_lib_db = no ; then
11461         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11462 echo "configure:11463: checking for Berkeley DB link (-ldb)" >&5
11463 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11464   echo $ac_n "(cached) $ac_c" 1>&6
11465 else
11466   
11467         ol_DB_LIB=-ldb
11468         ol_LIBS=$LIBS
11469         LIBS="$ol_DB_LIB $LIBS"
11470
11471         cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474
11475 #ifdef HAVE_DB_185_H
11476 # include <db_185.h>
11477 #else
11478 # include <db.h>
11479 #endif
11480
11481 #ifndef DB_VERSION_MAJOR
11482 # define DB_VERSION_MAJOR 1
11483 #endif
11484
11485 #ifndef NULL
11486 #define NULL ((void*)0)
11487 #endif
11488
11489 int main() {
11490
11491 #if DB_VERSION_MAJOR > 2
11492         db_env_create( NULL, 0 );
11493 #elif DB_VERSION_MAJOR > 1
11494         db_appexit( NULL );
11495 #else
11496         (void) dbopen( NULL, 0, 0, 0, NULL);
11497 #endif
11498
11499 ; return 0; }
11500 EOF
11501 if { (eval echo configure:11502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11502   rm -rf conftest*
11503   ol_cv_db_db=yes
11504 else
11505   echo "configure: failed program was:" >&5
11506   cat conftest.$ac_ext >&5
11507   rm -rf conftest*
11508   ol_cv_db_db=no
11509 fi
11510 rm -f conftest*
11511
11512         LIBS="$ol_LIBS"
11513
11514 fi
11515
11516 echo "$ac_t""$ol_cv_db_db" 1>&6
11517
11518         if test $ol_cv_db_db = yes ; then
11519                 ol_cv_lib_db=-ldb
11520         fi
11521 fi
11522
11523 if test $ol_cv_lib_db = no ; then
11524         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11525 echo "configure:11526: checking for Berkeley DB link (-ldb3)" >&5
11526 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11527   echo $ac_n "(cached) $ac_c" 1>&6
11528 else
11529   
11530         ol_DB_LIB=-ldb3
11531         ol_LIBS=$LIBS
11532         LIBS="$ol_DB_LIB $LIBS"
11533
11534         cat > conftest.$ac_ext <<EOF
11535 #line 11536 "configure"
11536 #include "confdefs.h"
11537
11538 #ifdef HAVE_DB_185_H
11539 # include <db_185.h>
11540 #else
11541 # include <db.h>
11542 #endif
11543
11544 #ifndef DB_VERSION_MAJOR
11545 # define DB_VERSION_MAJOR 1
11546 #endif
11547
11548 #ifndef NULL
11549 #define NULL ((void*)0)
11550 #endif
11551
11552 int main() {
11553
11554 #if DB_VERSION_MAJOR > 2
11555         db_env_create( NULL, 0 );
11556 #elif DB_VERSION_MAJOR > 1
11557         db_appexit( NULL );
11558 #else
11559         (void) dbopen( NULL, 0, 0, 0, NULL);
11560 #endif
11561
11562 ; return 0; }
11563 EOF
11564 if { (eval echo configure:11565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11565   rm -rf conftest*
11566   ol_cv_db_db3=yes
11567 else
11568   echo "configure: failed program was:" >&5
11569   cat conftest.$ac_ext >&5
11570   rm -rf conftest*
11571   ol_cv_db_db3=no
11572 fi
11573 rm -f conftest*
11574
11575         LIBS="$ol_LIBS"
11576
11577 fi
11578
11579 echo "$ac_t""$ol_cv_db_db3" 1>&6
11580
11581         if test $ol_cv_db_db3 = yes ; then
11582                 ol_cv_lib_db=-ldb3
11583         fi
11584 fi
11585
11586 if test $ol_cv_lib_db = no ; then
11587         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11588 echo "configure:11589: checking for Berkeley DB link (-ldb2)" >&5
11589 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   
11593         ol_DB_LIB=-ldb2
11594         ol_LIBS=$LIBS
11595         LIBS="$ol_DB_LIB $LIBS"
11596
11597         cat > conftest.$ac_ext <<EOF
11598 #line 11599 "configure"
11599 #include "confdefs.h"
11600
11601 #ifdef HAVE_DB_185_H
11602 # include <db_185.h>
11603 #else
11604 # include <db.h>
11605 #endif
11606
11607 #ifndef DB_VERSION_MAJOR
11608 # define DB_VERSION_MAJOR 1
11609 #endif
11610
11611 #ifndef NULL
11612 #define NULL ((void*)0)
11613 #endif
11614
11615 int main() {
11616
11617 #if DB_VERSION_MAJOR > 2
11618         db_env_create( NULL, 0 );
11619 #elif DB_VERSION_MAJOR > 1
11620         db_appexit( NULL );
11621 #else
11622         (void) dbopen( NULL, 0, 0, 0, NULL);
11623 #endif
11624
11625 ; return 0; }
11626 EOF
11627 if { (eval echo configure:11628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11628   rm -rf conftest*
11629   ol_cv_db_db2=yes
11630 else
11631   echo "configure: failed program was:" >&5
11632   cat conftest.$ac_ext >&5
11633   rm -rf conftest*
11634   ol_cv_db_db2=no
11635 fi
11636 rm -f conftest*
11637
11638         LIBS="$ol_LIBS"
11639
11640 fi
11641
11642 echo "$ac_t""$ol_cv_db_db2" 1>&6
11643
11644         if test $ol_cv_db_db2 = yes ; then
11645                 ol_cv_lib_db=-ldb2
11646         fi
11647 fi
11648
11649 if test $ol_cv_lib_db = no ; then
11650         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11651 echo "configure:11652: checking for Berkeley DB link (-ldb1)" >&5
11652 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11653   echo $ac_n "(cached) $ac_c" 1>&6
11654 else
11655   
11656         ol_DB_LIB=-ldb1
11657         ol_LIBS=$LIBS
11658         LIBS="$ol_DB_LIB $LIBS"
11659
11660         cat > conftest.$ac_ext <<EOF
11661 #line 11662 "configure"
11662 #include "confdefs.h"
11663
11664 #ifdef HAVE_DB_185_H
11665 # include <db_185.h>
11666 #else
11667 # include <db.h>
11668 #endif
11669
11670 #ifndef DB_VERSION_MAJOR
11671 # define DB_VERSION_MAJOR 1
11672 #endif
11673
11674 #ifndef NULL
11675 #define NULL ((void*)0)
11676 #endif
11677
11678 int main() {
11679
11680 #if DB_VERSION_MAJOR > 2
11681         db_env_create( NULL, 0 );
11682 #elif DB_VERSION_MAJOR > 1
11683         db_appexit( NULL );
11684 #else
11685         (void) dbopen( NULL, 0, 0, 0, NULL);
11686 #endif
11687
11688 ; return 0; }
11689 EOF
11690 if { (eval echo configure:11691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11691   rm -rf conftest*
11692   ol_cv_db_db1=yes
11693 else
11694   echo "configure: failed program was:" >&5
11695   cat conftest.$ac_ext >&5
11696   rm -rf conftest*
11697   ol_cv_db_db1=no
11698 fi
11699 rm -f conftest*
11700
11701         LIBS="$ol_LIBS"
11702
11703 fi
11704
11705 echo "$ac_t""$ol_cv_db_db1" 1>&6
11706
11707         if test $ol_cv_db_db1 = yes ; then
11708                 ol_cv_lib_db=-ldb1
11709         fi
11710 fi
11711
11712
11713                 if test "$ol_cv_lib_db" != no ; then
11714                         ol_cv_berkeley_db=yes
11715                 fi
11716         fi
11717 fi
11718
11719         else
11720                 ol_cv_berkeley_db=no
11721 for ac_hdr in db.h
11722 do
11723 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11724 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11725 echo "configure:11726: checking for $ac_hdr" >&5
11726 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11727   echo $ac_n "(cached) $ac_c" 1>&6
11728 else
11729   cat > conftest.$ac_ext <<EOF
11730 #line 11731 "configure"
11731 #include "confdefs.h"
11732 #include <$ac_hdr>
11733 EOF
11734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11735 { (eval echo configure:11736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11737 if test -z "$ac_err"; then
11738   rm -rf conftest*
11739   eval "ac_cv_header_$ac_safe=yes"
11740 else
11741   echo "$ac_err" >&5
11742   echo "configure: failed program was:" >&5
11743   cat conftest.$ac_ext >&5
11744   rm -rf conftest*
11745   eval "ac_cv_header_$ac_safe=no"
11746 fi
11747 rm -f conftest*
11748 fi
11749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11750   echo "$ac_t""yes" 1>&6
11751     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11752   cat >> confdefs.h <<EOF
11753 #define $ac_tr_hdr 1
11754 EOF
11755  
11756 else
11757   echo "$ac_t""no" 1>&6
11758 fi
11759 done
11760
11761 if test $ac_cv_header_db_h = yes; then
11762         ol_cv_lib_db=no
11763 if test $ol_cv_lib_db = no ; then
11764         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11765 echo "configure:11766: checking for Berkeley DB link (default)" >&5
11766 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11767   echo $ac_n "(cached) $ac_c" 1>&6
11768 else
11769   
11770         ol_DB_LIB=
11771         ol_LIBS=$LIBS
11772         LIBS="$ol_DB_LIB $LIBS"
11773
11774         cat > conftest.$ac_ext <<EOF
11775 #line 11776 "configure"
11776 #include "confdefs.h"
11777
11778 #ifdef HAVE_DB_185_H
11779 # include <db_185.h>
11780 #else
11781 # include <db.h>
11782 #endif
11783
11784 #ifndef DB_VERSION_MAJOR
11785 # define DB_VERSION_MAJOR 1
11786 #endif
11787
11788 #ifndef NULL
11789 #define NULL ((void*)0)
11790 #endif
11791
11792 int main() {
11793
11794 #if DB_VERSION_MAJOR > 2
11795         db_env_create( NULL, 0 );
11796 #elif DB_VERSION_MAJOR > 1
11797         db_appexit( NULL );
11798 #else
11799         (void) dbopen( NULL, 0, 0, 0, NULL);
11800 #endif
11801
11802 ; return 0; }
11803 EOF
11804 if { (eval echo configure:11805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11805   rm -rf conftest*
11806   ol_cv_db_none=yes
11807 else
11808   echo "configure: failed program was:" >&5
11809   cat conftest.$ac_ext >&5
11810   rm -rf conftest*
11811   ol_cv_db_none=no
11812 fi
11813 rm -f conftest*
11814
11815         LIBS="$ol_LIBS"
11816
11817 fi
11818
11819 echo "$ac_t""$ol_cv_db_none" 1>&6
11820
11821         if test $ol_cv_db_none = yes ; then
11822                 ol_cv_lib_db=yes
11823         fi
11824 fi
11825
11826 if test $ol_cv_lib_db = no ; then
11827         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11828 echo "configure:11829: checking for Berkeley DB link (-ldb)" >&5
11829 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11830   echo $ac_n "(cached) $ac_c" 1>&6
11831 else
11832   
11833         ol_DB_LIB=-ldb
11834         ol_LIBS=$LIBS
11835         LIBS="$ol_DB_LIB $LIBS"
11836
11837         cat > conftest.$ac_ext <<EOF
11838 #line 11839 "configure"
11839 #include "confdefs.h"
11840
11841 #ifdef HAVE_DB_185_H
11842 # include <db_185.h>
11843 #else
11844 # include <db.h>
11845 #endif
11846
11847 #ifndef DB_VERSION_MAJOR
11848 # define DB_VERSION_MAJOR 1
11849 #endif
11850
11851 #ifndef NULL
11852 #define NULL ((void*)0)
11853 #endif
11854
11855 int main() {
11856
11857 #if DB_VERSION_MAJOR > 2
11858         db_env_create( NULL, 0 );
11859 #elif DB_VERSION_MAJOR > 1
11860         db_appexit( NULL );
11861 #else
11862         (void) dbopen( NULL, 0, 0, 0, NULL);
11863 #endif
11864
11865 ; return 0; }
11866 EOF
11867 if { (eval echo configure:11868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11868   rm -rf conftest*
11869   ol_cv_db_db=yes
11870 else
11871   echo "configure: failed program was:" >&5
11872   cat conftest.$ac_ext >&5
11873   rm -rf conftest*
11874   ol_cv_db_db=no
11875 fi
11876 rm -f conftest*
11877
11878         LIBS="$ol_LIBS"
11879
11880 fi
11881
11882 echo "$ac_t""$ol_cv_db_db" 1>&6
11883
11884         if test $ol_cv_db_db = yes ; then
11885                 ol_cv_lib_db=-ldb
11886         fi
11887 fi
11888
11889 if test $ol_cv_lib_db = no ; then
11890         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11891 echo "configure:11892: checking for Berkeley DB link (-ldb3)" >&5
11892 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11893   echo $ac_n "(cached) $ac_c" 1>&6
11894 else
11895   
11896         ol_DB_LIB=-ldb3
11897         ol_LIBS=$LIBS
11898         LIBS="$ol_DB_LIB $LIBS"
11899
11900         cat > conftest.$ac_ext <<EOF
11901 #line 11902 "configure"
11902 #include "confdefs.h"
11903
11904 #ifdef HAVE_DB_185_H
11905 # include <db_185.h>
11906 #else
11907 # include <db.h>
11908 #endif
11909
11910 #ifndef DB_VERSION_MAJOR
11911 # define DB_VERSION_MAJOR 1
11912 #endif
11913
11914 #ifndef NULL
11915 #define NULL ((void*)0)
11916 #endif
11917
11918 int main() {
11919
11920 #if DB_VERSION_MAJOR > 2
11921         db_env_create( NULL, 0 );
11922 #elif DB_VERSION_MAJOR > 1
11923         db_appexit( NULL );
11924 #else
11925         (void) dbopen( NULL, 0, 0, 0, NULL);
11926 #endif
11927
11928 ; return 0; }
11929 EOF
11930 if { (eval echo configure:11931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11931   rm -rf conftest*
11932   ol_cv_db_db3=yes
11933 else
11934   echo "configure: failed program was:" >&5
11935   cat conftest.$ac_ext >&5
11936   rm -rf conftest*
11937   ol_cv_db_db3=no
11938 fi
11939 rm -f conftest*
11940
11941         LIBS="$ol_LIBS"
11942
11943 fi
11944
11945 echo "$ac_t""$ol_cv_db_db3" 1>&6
11946
11947         if test $ol_cv_db_db3 = yes ; then
11948                 ol_cv_lib_db=-ldb3
11949         fi
11950 fi
11951
11952 if test $ol_cv_lib_db = no ; then
11953         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11954 echo "configure:11955: checking for Berkeley DB link (-ldb2)" >&5
11955 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11956   echo $ac_n "(cached) $ac_c" 1>&6
11957 else
11958   
11959         ol_DB_LIB=-ldb2
11960         ol_LIBS=$LIBS
11961         LIBS="$ol_DB_LIB $LIBS"
11962
11963         cat > conftest.$ac_ext <<EOF
11964 #line 11965 "configure"
11965 #include "confdefs.h"
11966
11967 #ifdef HAVE_DB_185_H
11968 # include <db_185.h>
11969 #else
11970 # include <db.h>
11971 #endif
11972
11973 #ifndef DB_VERSION_MAJOR
11974 # define DB_VERSION_MAJOR 1
11975 #endif
11976
11977 #ifndef NULL
11978 #define NULL ((void*)0)
11979 #endif
11980
11981 int main() {
11982
11983 #if DB_VERSION_MAJOR > 2
11984         db_env_create( NULL, 0 );
11985 #elif DB_VERSION_MAJOR > 1
11986         db_appexit( NULL );
11987 #else
11988         (void) dbopen( NULL, 0, 0, 0, NULL);
11989 #endif
11990
11991 ; return 0; }
11992 EOF
11993 if { (eval echo configure:11994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11994   rm -rf conftest*
11995   ol_cv_db_db2=yes
11996 else
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999   rm -rf conftest*
12000   ol_cv_db_db2=no
12001 fi
12002 rm -f conftest*
12003
12004         LIBS="$ol_LIBS"
12005
12006 fi
12007
12008 echo "$ac_t""$ol_cv_db_db2" 1>&6
12009
12010         if test $ol_cv_db_db2 = yes ; then
12011                 ol_cv_lib_db=-ldb2
12012         fi
12013 fi
12014
12015 if test $ol_cv_lib_db = no ; then
12016         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12017 echo "configure:12018: checking for Berkeley DB link (-ldb1)" >&5
12018 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12019   echo $ac_n "(cached) $ac_c" 1>&6
12020 else
12021   
12022         ol_DB_LIB=-ldb1
12023         ol_LIBS=$LIBS
12024         LIBS="$ol_DB_LIB $LIBS"
12025
12026         cat > conftest.$ac_ext <<EOF
12027 #line 12028 "configure"
12028 #include "confdefs.h"
12029
12030 #ifdef HAVE_DB_185_H
12031 # include <db_185.h>
12032 #else
12033 # include <db.h>
12034 #endif
12035
12036 #ifndef DB_VERSION_MAJOR
12037 # define DB_VERSION_MAJOR 1
12038 #endif
12039
12040 #ifndef NULL
12041 #define NULL ((void*)0)
12042 #endif
12043
12044 int main() {
12045
12046 #if DB_VERSION_MAJOR > 2
12047         db_env_create( NULL, 0 );
12048 #elif DB_VERSION_MAJOR > 1
12049         db_appexit( NULL );
12050 #else
12051         (void) dbopen( NULL, 0, 0, 0, NULL);
12052 #endif
12053
12054 ; return 0; }
12055 EOF
12056 if { (eval echo configure:12057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12057   rm -rf conftest*
12058   ol_cv_db_db1=yes
12059 else
12060   echo "configure: failed program was:" >&5
12061   cat conftest.$ac_ext >&5
12062   rm -rf conftest*
12063   ol_cv_db_db1=no
12064 fi
12065 rm -f conftest*
12066
12067         LIBS="$ol_LIBS"
12068
12069 fi
12070
12071 echo "$ac_t""$ol_cv_db_db1" 1>&6
12072
12073         if test $ol_cv_db_db1 = yes ; then
12074                 ol_cv_lib_db=-ldb1
12075         fi
12076 fi
12077
12078
12079         if test "$ol_cv_lib_db" != no ; then
12080                 ol_cv_berkeley_db=yes
12081                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12082 echo "configure:12083: checking for Berkeley DB thread support" >&5
12083 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12084   echo $ac_n "(cached) $ac_c" 1>&6
12085 else
12086   
12087         ol_LIBS="$LIBS"
12088         if test $ol_cv_lib_db != yes ; then
12089                 LIBS="$ol_cv_lib_db"
12090         fi
12091
12092         if test "$cross_compiling" = yes; then
12093   ol_cv_berkeley_db_thread=cross
12094 else
12095   cat > conftest.$ac_ext <<EOF
12096 #line 12097 "configure"
12097 #include "confdefs.h"
12098
12099 #ifdef HAVE_DB_185_H
12100         choke me;
12101 #else
12102 #include <db.h>
12103 #endif
12104 #ifndef NULL
12105 #define NULL ((void *)0)
12106 #endif
12107 main()
12108 {
12109         int rc;
12110         u_int32_t flags = DB_CREATE | DB_THREAD;
12111
12112 #if DB_VERSION_MAJOR > 2
12113         DB_ENV *env = NULL;
12114
12115         rc = db_env_create( &env, 0 );
12116
12117         if( rc == 0 ) {
12118 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12119                 rc = env->open( env, NULL, flags, 0 );
12120 #else
12121                 rc = env->open( env, NULL, NULL, flags, 0 );
12122 #endif
12123         }
12124
12125 #else
12126         DB_ENV env;
12127         memset( &env, '\0', sizeof(env) );
12128
12129         rc = db_appinit( NULL, NULL, &env, flags );
12130
12131         if( rc == 0 ) {
12132                 db_appexit( &env );
12133         }
12134 #endif
12135 #if DB_VERSION_MAJOR > 2
12136 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12137         env->remove( env, NULL, DB_FORCE);
12138 #else
12139         env->remove( env, NULL, NULL, DB_FORCE);
12140 #endif
12141 #endif
12142
12143         return rc;
12144 }
12145 EOF
12146 if { (eval echo configure:12147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12147 then
12148   ol_cv_berkeley_db_thread=yes
12149 else
12150   echo "configure: failed program was:" >&5
12151   cat conftest.$ac_ext >&5
12152   rm -fr conftest*
12153   ol_cv_berkeley_db_thread=no
12154 fi
12155 rm -fr conftest*
12156 fi
12157
12158
12159         LIBS="$ol_LIBS"
12160
12161         if test $ol_cv_berkeley_db_thread != no ; then
12162                 cat >> confdefs.h <<\EOF
12163 #define HAVE_BERKELEY_DB_THREAD 1
12164 EOF
12165
12166         fi
12167
12168 fi
12169
12170 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12171         fi
12172 fi
12173
12174         fi
12175
12176         if test $ol_cv_berkeley_db != no ; then
12177                 cat >> confdefs.h <<\EOF
12178 #define HAVE_BERKELEY_DB 1
12179 EOF
12180
12181
12182                 ol_link_ldbm=berkeley
12183                 ol_with_ldbm_api=db
12184
12185                 if test $ol_with_ldbm_type = hash ; then
12186                         cat >> confdefs.h <<\EOF
12187 #define LDBM_USE_DBHASH 1
12188 EOF
12189
12190                 else
12191                         cat >> confdefs.h <<\EOF
12192 #define LDBM_USE_DBBTREE 1
12193 EOF
12194
12195                 fi
12196
12197                                                 if test $ol_cv_lib_db != yes ; then
12198                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12199                 fi
12200         fi
12201 fi
12202
12203 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12204         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12205         ol_with_ldbm_api=none
12206 fi
12207
12208 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12209         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12210 echo "configure:12211: checking for MDBM library" >&5
12211 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12212   echo $ac_n "(cached) $ac_c" 1>&6
12213 else
12214         ol_LIBS="$LIBS"
12215         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12216 echo "configure:12217: checking for mdbm_set_chain" >&5
12217 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12218   echo $ac_n "(cached) $ac_c" 1>&6
12219 else
12220   cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 /* System header to define __stub macros and hopefully few prototypes,
12224     which can conflict with char mdbm_set_chain(); below.  */
12225 #include <assert.h>
12226 /* Override any gcc2 internal prototype to avoid an error.  */
12227 /* We use char because int might match the return type of a gcc2
12228     builtin and then its argument prototype would still apply.  */
12229 char mdbm_set_chain();
12230 char (*f)();
12231
12232 int main() {
12233
12234 /* The GNU C library defines this for functions which it implements
12235     to always fail with ENOSYS.  Some functions are actually named
12236     something starting with __ and the normal name is an alias.  */
12237 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12238 choke me
12239 #else
12240 f = mdbm_set_chain;
12241 #endif
12242
12243 ; return 0; }
12244 EOF
12245 if { (eval echo configure:12246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12246   rm -rf conftest*
12247   eval "ac_cv_func_mdbm_set_chain=yes"
12248 else
12249   echo "configure: failed program was:" >&5
12250   cat conftest.$ac_ext >&5
12251   rm -rf conftest*
12252   eval "ac_cv_func_mdbm_set_chain=no"
12253 fi
12254 rm -f conftest*
12255 fi
12256
12257 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12258   echo "$ac_t""yes" 1>&6
12259   ol_cv_lib_mdbm=yes
12260 else
12261   echo "$ac_t""no" 1>&6
12262
12263                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12264 echo "configure:12265: checking for mdbm_set_chain in -lmdbm" >&5
12265 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12267   echo $ac_n "(cached) $ac_c" 1>&6
12268 else
12269   ac_save_LIBS="$LIBS"
12270 LIBS="-lmdbm  $LIBS"
12271 cat > conftest.$ac_ext <<EOF
12272 #line 12273 "configure"
12273 #include "confdefs.h"
12274 /* Override any gcc2 internal prototype to avoid an error.  */
12275 /* We use char because int might match the return type of a gcc2
12276     builtin and then its argument prototype would still apply.  */
12277 char mdbm_set_chain();
12278
12279 int main() {
12280 mdbm_set_chain()
12281 ; return 0; }
12282 EOF
12283 if { (eval echo configure:12284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12284   rm -rf conftest*
12285   eval "ac_cv_lib_$ac_lib_var=yes"
12286 else
12287   echo "configure: failed program was:" >&5
12288   cat conftest.$ac_ext >&5
12289   rm -rf conftest*
12290   eval "ac_cv_lib_$ac_lib_var=no"
12291 fi
12292 rm -f conftest*
12293 LIBS="$ac_save_LIBS"
12294
12295 fi
12296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12297   echo "$ac_t""yes" 1>&6
12298   ol_cv_lib_mdbm=-lmdbm
12299 else
12300   echo "$ac_t""no" 1>&6
12301 ol_cv_lib_mdbm=no
12302 fi
12303
12304         
12305 fi
12306
12307         LIBS="$ol_LIBS"
12308
12309 fi
12310
12311 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12312
12313
12314  for ac_hdr in mdbm.h
12315 do
12316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12318 echo "configure:12319: checking for $ac_hdr" >&5
12319 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12320   echo $ac_n "(cached) $ac_c" 1>&6
12321 else
12322   cat > conftest.$ac_ext <<EOF
12323 #line 12324 "configure"
12324 #include "confdefs.h"
12325 #include <$ac_hdr>
12326 EOF
12327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12328 { (eval echo configure:12329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12330 if test -z "$ac_err"; then
12331   rm -rf conftest*
12332   eval "ac_cv_header_$ac_safe=yes"
12333 else
12334   echo "$ac_err" >&5
12335   echo "configure: failed program was:" >&5
12336   cat conftest.$ac_ext >&5
12337   rm -rf conftest*
12338   eval "ac_cv_header_$ac_safe=no"
12339 fi
12340 rm -f conftest*
12341 fi
12342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12343   echo "$ac_t""yes" 1>&6
12344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12345   cat >> confdefs.h <<EOF
12346 #define $ac_tr_hdr 1
12347 EOF
12348  
12349 else
12350   echo "$ac_t""no" 1>&6
12351 fi
12352 done
12353
12354  echo $ac_n "checking for db""... $ac_c" 1>&6
12355 echo "configure:12356: checking for db" >&5
12356 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12357   echo $ac_n "(cached) $ac_c" 1>&6
12358 else
12359   
12360         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12361                 ol_cv_mdbm=no
12362         else
12363                 ol_cv_mdbm=yes
12364         fi
12365
12366 fi
12367
12368 echo "$ac_t""$ol_cv_mdbm" 1>&6
12369  if test $ol_cv_mdbm = yes ; then
12370         cat >> confdefs.h <<\EOF
12371 #define HAVE_MDBM 1
12372 EOF
12373
12374  fi
12375
12376
12377         if test $ol_cv_mdbm = yes ; then
12378                 ol_link_ldbm=mdbm
12379                 ol_with_ldbm_api=mdbm
12380                 if test $ol_cv_lib_mdbm != yes ; then
12381                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12382                 fi
12383         fi
12384 fi
12385
12386 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12387         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12388 echo "configure:12389: checking for GDBM library" >&5
12389 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12390   echo $ac_n "(cached) $ac_c" 1>&6
12391 else
12392         ol_LIBS="$LIBS"
12393         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12394 echo "configure:12395: checking for gdbm_open" >&5
12395 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12396   echo $ac_n "(cached) $ac_c" 1>&6
12397 else
12398   cat > conftest.$ac_ext <<EOF
12399 #line 12400 "configure"
12400 #include "confdefs.h"
12401 /* System header to define __stub macros and hopefully few prototypes,
12402     which can conflict with char gdbm_open(); below.  */
12403 #include <assert.h>
12404 /* Override any gcc2 internal prototype to avoid an error.  */
12405 /* We use char because int might match the return type of a gcc2
12406     builtin and then its argument prototype would still apply.  */
12407 char gdbm_open();
12408 char (*f)();
12409
12410 int main() {
12411
12412 /* The GNU C library defines this for functions which it implements
12413     to always fail with ENOSYS.  Some functions are actually named
12414     something starting with __ and the normal name is an alias.  */
12415 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12416 choke me
12417 #else
12418 f = gdbm_open;
12419 #endif
12420
12421 ; return 0; }
12422 EOF
12423 if { (eval echo configure:12424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12424   rm -rf conftest*
12425   eval "ac_cv_func_gdbm_open=yes"
12426 else
12427   echo "configure: failed program was:" >&5
12428   cat conftest.$ac_ext >&5
12429   rm -rf conftest*
12430   eval "ac_cv_func_gdbm_open=no"
12431 fi
12432 rm -f conftest*
12433 fi
12434
12435 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12436   echo "$ac_t""yes" 1>&6
12437   ol_cv_lib_gdbm=yes
12438 else
12439   echo "$ac_t""no" 1>&6
12440
12441                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12442 echo "configure:12443: checking for gdbm_open in -lgdbm" >&5
12443 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12444 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12445   echo $ac_n "(cached) $ac_c" 1>&6
12446 else
12447   ac_save_LIBS="$LIBS"
12448 LIBS="-lgdbm  $LIBS"
12449 cat > conftest.$ac_ext <<EOF
12450 #line 12451 "configure"
12451 #include "confdefs.h"
12452 /* Override any gcc2 internal prototype to avoid an error.  */
12453 /* We use char because int might match the return type of a gcc2
12454     builtin and then its argument prototype would still apply.  */
12455 char gdbm_open();
12456
12457 int main() {
12458 gdbm_open()
12459 ; return 0; }
12460 EOF
12461 if { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12462   rm -rf conftest*
12463   eval "ac_cv_lib_$ac_lib_var=yes"
12464 else
12465   echo "configure: failed program was:" >&5
12466   cat conftest.$ac_ext >&5
12467   rm -rf conftest*
12468   eval "ac_cv_lib_$ac_lib_var=no"
12469 fi
12470 rm -f conftest*
12471 LIBS="$ac_save_LIBS"
12472
12473 fi
12474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12475   echo "$ac_t""yes" 1>&6
12476   ol_cv_lib_gdbm=-lgdbm
12477 else
12478   echo "$ac_t""no" 1>&6
12479 ol_cv_lib_gdbm=no
12480 fi
12481
12482         
12483 fi
12484
12485         LIBS="$ol_LIBS"
12486
12487 fi
12488
12489 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12490
12491
12492  for ac_hdr in gdbm.h
12493 do
12494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12496 echo "configure:12497: checking for $ac_hdr" >&5
12497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12498   echo $ac_n "(cached) $ac_c" 1>&6
12499 else
12500   cat > conftest.$ac_ext <<EOF
12501 #line 12502 "configure"
12502 #include "confdefs.h"
12503 #include <$ac_hdr>
12504 EOF
12505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12506 { (eval echo configure:12507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12508 if test -z "$ac_err"; then
12509   rm -rf conftest*
12510   eval "ac_cv_header_$ac_safe=yes"
12511 else
12512   echo "$ac_err" >&5
12513   echo "configure: failed program was:" >&5
12514   cat conftest.$ac_ext >&5
12515   rm -rf conftest*
12516   eval "ac_cv_header_$ac_safe=no"
12517 fi
12518 rm -f conftest*
12519 fi
12520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12521   echo "$ac_t""yes" 1>&6
12522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12523   cat >> confdefs.h <<EOF
12524 #define $ac_tr_hdr 1
12525 EOF
12526  
12527 else
12528   echo "$ac_t""no" 1>&6
12529 fi
12530 done
12531
12532  echo $ac_n "checking for db""... $ac_c" 1>&6
12533 echo "configure:12534: checking for db" >&5
12534 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12535   echo $ac_n "(cached) $ac_c" 1>&6
12536 else
12537   
12538         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12539                 ol_cv_gdbm=no
12540         else
12541                 ol_cv_gdbm=yes
12542         fi
12543
12544 fi
12545
12546 echo "$ac_t""$ol_cv_gdbm" 1>&6
12547  if test $ol_cv_gdbm = yes ; then
12548         cat >> confdefs.h <<\EOF
12549 #define HAVE_GDBM 1
12550 EOF
12551
12552  fi
12553
12554
12555         if test $ol_cv_gdbm = yes ; then
12556                 ol_link_ldbm=gdbm
12557                 ol_with_ldbm_api=gdbm
12558
12559                 if test $ol_cv_lib_gdbm != yes ; then
12560                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12561                 fi
12562         fi
12563 fi
12564
12565 if test $ol_with_ldbm_api = ndbm ; then
12566         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12567 echo "configure:12568: checking for NDBM library" >&5
12568 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12569   echo $ac_n "(cached) $ac_c" 1>&6
12570 else
12571         ol_LIBS="$LIBS"
12572         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12573 echo "configure:12574: checking for dbm_open" >&5
12574 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12575   echo $ac_n "(cached) $ac_c" 1>&6
12576 else
12577   cat > conftest.$ac_ext <<EOF
12578 #line 12579 "configure"
12579 #include "confdefs.h"
12580 /* System header to define __stub macros and hopefully few prototypes,
12581     which can conflict with char dbm_open(); below.  */
12582 #include <assert.h>
12583 /* Override any gcc2 internal prototype to avoid an error.  */
12584 /* We use char because int might match the return type of a gcc2
12585     builtin and then its argument prototype would still apply.  */
12586 char dbm_open();
12587 char (*f)();
12588
12589 int main() {
12590
12591 /* The GNU C library defines this for functions which it implements
12592     to always fail with ENOSYS.  Some functions are actually named
12593     something starting with __ and the normal name is an alias.  */
12594 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12595 choke me
12596 #else
12597 f = dbm_open;
12598 #endif
12599
12600 ; return 0; }
12601 EOF
12602 if { (eval echo configure:12603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12603   rm -rf conftest*
12604   eval "ac_cv_func_dbm_open=yes"
12605 else
12606   echo "configure: failed program was:" >&5
12607   cat conftest.$ac_ext >&5
12608   rm -rf conftest*
12609   eval "ac_cv_func_dbm_open=no"
12610 fi
12611 rm -f conftest*
12612 fi
12613
12614 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12615   echo "$ac_t""yes" 1>&6
12616   ol_cv_lib_ndbm=yes
12617 else
12618   echo "$ac_t""no" 1>&6
12619
12620                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12621 echo "configure:12622: checking for dbm_open in -lndbm" >&5
12622 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12624   echo $ac_n "(cached) $ac_c" 1>&6
12625 else
12626   ac_save_LIBS="$LIBS"
12627 LIBS="-lndbm  $LIBS"
12628 cat > conftest.$ac_ext <<EOF
12629 #line 12630 "configure"
12630 #include "confdefs.h"
12631 /* Override any gcc2 internal prototype to avoid an error.  */
12632 /* We use char because int might match the return type of a gcc2
12633     builtin and then its argument prototype would still apply.  */
12634 char dbm_open();
12635
12636 int main() {
12637 dbm_open()
12638 ; return 0; }
12639 EOF
12640 if { (eval echo configure:12641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12641   rm -rf conftest*
12642   eval "ac_cv_lib_$ac_lib_var=yes"
12643 else
12644   echo "configure: failed program was:" >&5
12645   cat conftest.$ac_ext >&5
12646   rm -rf conftest*
12647   eval "ac_cv_lib_$ac_lib_var=no"
12648 fi
12649 rm -f conftest*
12650 LIBS="$ac_save_LIBS"
12651
12652 fi
12653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12654   echo "$ac_t""yes" 1>&6
12655   ol_cv_lib_ndbm=-lndbm
12656 else
12657   echo "$ac_t""no" 1>&6
12658
12659                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12660 echo "configure:12661: checking for dbm_open in -ldbm" >&5
12661 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12663   echo $ac_n "(cached) $ac_c" 1>&6
12664 else
12665   ac_save_LIBS="$LIBS"
12666 LIBS="-ldbm  $LIBS"
12667 cat > conftest.$ac_ext <<EOF
12668 #line 12669 "configure"
12669 #include "confdefs.h"
12670 /* Override any gcc2 internal prototype to avoid an error.  */
12671 /* We use char because int might match the return type of a gcc2
12672     builtin and then its argument prototype would still apply.  */
12673 char dbm_open();
12674
12675 int main() {
12676 dbm_open()
12677 ; return 0; }
12678 EOF
12679 if { (eval echo configure:12680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12680   rm -rf conftest*
12681   eval "ac_cv_lib_$ac_lib_var=yes"
12682 else
12683   echo "configure: failed program was:" >&5
12684   cat conftest.$ac_ext >&5
12685   rm -rf conftest*
12686   eval "ac_cv_lib_$ac_lib_var=no"
12687 fi
12688 rm -f conftest*
12689 LIBS="$ac_save_LIBS"
12690
12691 fi
12692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12693   echo "$ac_t""yes" 1>&6
12694   ol_cv_lib_ndbm=-ldbm
12695 else
12696   echo "$ac_t""no" 1>&6
12697 ol_cv_lib_ndbm=no
12698 fi
12699                 
12700 fi
12701
12702         
12703 fi
12704
12705         LIBS="$ol_LIBS"
12706
12707 fi
12708
12709 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12710
12711
12712  for ac_hdr in ndbm.h
12713 do
12714 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12715 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12716 echo "configure:12717: checking for $ac_hdr" >&5
12717 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12718   echo $ac_n "(cached) $ac_c" 1>&6
12719 else
12720   cat > conftest.$ac_ext <<EOF
12721 #line 12722 "configure"
12722 #include "confdefs.h"
12723 #include <$ac_hdr>
12724 EOF
12725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12726 { (eval echo configure:12727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12728 if test -z "$ac_err"; then
12729   rm -rf conftest*
12730   eval "ac_cv_header_$ac_safe=yes"
12731 else
12732   echo "$ac_err" >&5
12733   echo "configure: failed program was:" >&5
12734   cat conftest.$ac_ext >&5
12735   rm -rf conftest*
12736   eval "ac_cv_header_$ac_safe=no"
12737 fi
12738 rm -f conftest*
12739 fi
12740 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12741   echo "$ac_t""yes" 1>&6
12742     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12743   cat >> confdefs.h <<EOF
12744 #define $ac_tr_hdr 1
12745 EOF
12746  
12747 else
12748   echo "$ac_t""no" 1>&6
12749 fi
12750 done
12751
12752  echo $ac_n "checking for db""... $ac_c" 1>&6
12753 echo "configure:12754: checking for db" >&5
12754 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12755   echo $ac_n "(cached) $ac_c" 1>&6
12756 else
12757   
12758         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12759                 ol_cv_ndbm=no
12760         else
12761                 ol_cv_ndbm=yes
12762         fi
12763
12764 fi
12765
12766 echo "$ac_t""$ol_cv_ndbm" 1>&6
12767  if test $ol_cv_ndbm = yes ; then
12768         cat >> confdefs.h <<\EOF
12769 #define HAVE_NDBM 1
12770 EOF
12771
12772  fi
12773
12774
12775         if test $ol_cv_ndbm = yes ; then
12776                 ol_link_ldbm=ndbm
12777                 ol_with_ldbm_api=ndbm
12778
12779                 if test $ol_cv_lib_ndbm != yes ; then
12780                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12781                 fi
12782         fi
12783 fi
12784
12785 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12786         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12787         if test $ol_enable_ldbm = yes ; then
12788                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12789         fi
12790
12791         echo "configure: warning: disabling LDBM" 1>&2
12792         ol_enable_ldbm=no
12793 fi
12794
12795 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12796         LINK_BINS_DYNAMIC="yes"
12797 else
12798         LINK_BINS_DYNAMIC="no"
12799 fi
12800
12801 if test $ol_enable_wrappers != no ; then
12802         for ac_hdr in tcpd.h
12803 do
12804 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12805 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12806 echo "configure:12807: checking for $ac_hdr" >&5
12807 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12808   echo $ac_n "(cached) $ac_c" 1>&6
12809 else
12810   cat > conftest.$ac_ext <<EOF
12811 #line 12812 "configure"
12812 #include "confdefs.h"
12813 #include <$ac_hdr>
12814 EOF
12815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12816 { (eval echo configure:12817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12818 if test -z "$ac_err"; then
12819   rm -rf conftest*
12820   eval "ac_cv_header_$ac_safe=yes"
12821 else
12822   echo "$ac_err" >&5
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -rf conftest*
12826   eval "ac_cv_header_$ac_safe=no"
12827 fi
12828 rm -f conftest*
12829 fi
12830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12831   echo "$ac_t""yes" 1>&6
12832     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12833   cat >> confdefs.h <<EOF
12834 #define $ac_tr_hdr 1
12835 EOF
12836  
12837 else
12838   echo "$ac_t""no" 1>&6
12839 fi
12840 done
12841
12842
12843         if test $ac_cv_header_tcpd_h != yes ; then
12844                 have_wrappers=no
12845         else
12846                 cat > conftest.$ac_ext <<EOF
12847 #line 12848 "configure"
12848 #include "confdefs.h"
12849
12850 int allow_severity = 0;
12851 int deny_severity  = 0;
12852                 
12853 int main() {
12854 hosts_access()
12855 ; return 0; }
12856 EOF
12857 if { (eval echo configure:12858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12858   rm -rf conftest*
12859   have_wrappers=yes
12860 else
12861   echo "configure: failed program was:" >&5
12862   cat conftest.$ac_ext >&5
12863   rm -rf conftest*
12864   have_wrappers=no
12865 fi
12866 rm -f conftest*
12867         fi
12868
12869         if test $have_wrappers = yes ; then
12870                 cat >> confdefs.h <<\EOF
12871 #define HAVE_TCPD 1
12872 EOF
12873
12874                 WRAP_LIBS="-lwrap"
12875
12876                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12877 echo "configure:12878: checking for main in -lnsl" >&5
12878 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12879 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12880   echo $ac_n "(cached) $ac_c" 1>&6
12881 else
12882   ac_save_LIBS="$LIBS"
12883 LIBS="-lnsl  $LIBS"
12884 cat > conftest.$ac_ext <<EOF
12885 #line 12886 "configure"
12886 #include "confdefs.h"
12887
12888 int main() {
12889 main()
12890 ; return 0; }
12891 EOF
12892 if { (eval echo configure:12893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12893   rm -rf conftest*
12894   eval "ac_cv_lib_$ac_lib_var=yes"
12895 else
12896   echo "configure: failed program was:" >&5
12897   cat conftest.$ac_ext >&5
12898   rm -rf conftest*
12899   eval "ac_cv_lib_$ac_lib_var=no"
12900 fi
12901 rm -f conftest*
12902 LIBS="$ac_save_LIBS"
12903
12904 fi
12905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12906   echo "$ac_t""yes" 1>&6
12907     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12908     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12909   cat >> confdefs.h <<EOF
12910 #define $ac_tr_lib 1
12911 EOF
12912
12913   LIBS="-lnsl $LIBS"
12914
12915 else
12916   echo "$ac_t""no" 1>&6
12917 fi
12918
12919         else
12920                 echo "configure: warning: could not find -lwrap" 1>&2
12921                 if test $ol_enable_wrappers = yes ; then
12922                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12923                 fi
12924
12925                 echo "configure: warning: disabling wrappers support" 1>&2
12926                 ol_enable_wrappers=no
12927                 WRAP_LIBS=""
12928         fi
12929 fi
12930
12931 if test $ol_enable_syslog != no ; then
12932         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12933 echo "configure:12934: checking for openlog" >&5
12934 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12935   echo $ac_n "(cached) $ac_c" 1>&6
12936 else
12937   cat > conftest.$ac_ext <<EOF
12938 #line 12939 "configure"
12939 #include "confdefs.h"
12940 /* System header to define __stub macros and hopefully few prototypes,
12941     which can conflict with char openlog(); below.  */
12942 #include <assert.h>
12943 /* Override any gcc2 internal prototype to avoid an error.  */
12944 /* We use char because int might match the return type of a gcc2
12945     builtin and then its argument prototype would still apply.  */
12946 char openlog();
12947 char (*f)();
12948
12949 int main() {
12950
12951 /* The GNU C library defines this for functions which it implements
12952     to always fail with ENOSYS.  Some functions are actually named
12953     something starting with __ and the normal name is an alias.  */
12954 #if defined (__stub_openlog) || defined (__stub___openlog)
12955 choke me
12956 #else
12957 f = openlog;
12958 #endif
12959
12960 ; return 0; }
12961 EOF
12962 if { (eval echo configure:12963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12963   rm -rf conftest*
12964   eval "ac_cv_func_openlog=yes"
12965 else
12966   echo "configure: failed program was:" >&5
12967   cat conftest.$ac_ext >&5
12968   rm -rf conftest*
12969   eval "ac_cv_func_openlog=no"
12970 fi
12971 rm -f conftest*
12972 fi
12973
12974 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12975   echo "$ac_t""yes" 1>&6
12976   :
12977 else
12978   echo "$ac_t""no" 1>&6
12979 fi
12980
12981         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12982                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12983         fi
12984         ol_enable_syslog=$ac_cv_func_openlog
12985 fi
12986
12987 ol_link_sql=no
12988 if test $ol_enable_sql != no ; then
12989         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
12990 echo "configure:12991: checking for SQLDriverConnect in -liodbc" >&5
12991 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
12992 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12993   echo $ac_n "(cached) $ac_c" 1>&6
12994 else
12995   ac_save_LIBS="$LIBS"
12996 LIBS="-liodbc  $LIBS"
12997 cat > conftest.$ac_ext <<EOF
12998 #line 12999 "configure"
12999 #include "confdefs.h"
13000 /* Override any gcc2 internal prototype to avoid an error.  */
13001 /* We use char because int might match the return type of a gcc2
13002     builtin and then its argument prototype would still apply.  */
13003 char SQLDriverConnect();
13004
13005 int main() {
13006 SQLDriverConnect()
13007 ; return 0; }
13008 EOF
13009 if { (eval echo configure:13010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13010   rm -rf conftest*
13011   eval "ac_cv_lib_$ac_lib_var=yes"
13012 else
13013   echo "configure: failed program was:" >&5
13014   cat conftest.$ac_ext >&5
13015   rm -rf conftest*
13016   eval "ac_cv_lib_$ac_lib_var=no"
13017 fi
13018 rm -f conftest*
13019 LIBS="$ac_save_LIBS"
13020
13021 fi
13022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13023   echo "$ac_t""yes" 1>&6
13024   have_iodbc=yes
13025 else
13026   echo "$ac_t""no" 1>&6
13027 have_iodbc=no
13028 fi
13029
13030         if test $have_iodbc = yes ; then
13031                 ol_link_sql="-liodbc"
13032         else
13033                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13034 echo "configure:13035: checking for SQLDriverConnect in -lodbc" >&5
13035 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13037   echo $ac_n "(cached) $ac_c" 1>&6
13038 else
13039   ac_save_LIBS="$LIBS"
13040 LIBS="-lodbc  $LIBS"
13041 cat > conftest.$ac_ext <<EOF
13042 #line 13043 "configure"
13043 #include "confdefs.h"
13044 /* Override any gcc2 internal prototype to avoid an error.  */
13045 /* We use char because int might match the return type of a gcc2
13046     builtin and then its argument prototype would still apply.  */
13047 char SQLDriverConnect();
13048
13049 int main() {
13050 SQLDriverConnect()
13051 ; return 0; }
13052 EOF
13053 if { (eval echo configure:13054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13054   rm -rf conftest*
13055   eval "ac_cv_lib_$ac_lib_var=yes"
13056 else
13057   echo "configure: failed program was:" >&5
13058   cat conftest.$ac_ext >&5
13059   rm -rf conftest*
13060   eval "ac_cv_lib_$ac_lib_var=no"
13061 fi
13062 rm -f conftest*
13063 LIBS="$ac_save_LIBS"
13064
13065 fi
13066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13067   echo "$ac_t""yes" 1>&6
13068   have_odbc=yes
13069 else
13070   echo "$ac_t""no" 1>&6
13071 have_odbc=no
13072 fi
13073
13074                 if test $have_odbc = yes ; then
13075                         ol_link_sql="-lodbc"
13076                 fi
13077         fi
13078
13079         if test $ol_link_sql != no ; then
13080                 SLAPD_SQL_LIBS="$ol_link_sql"
13081
13082         elif test $ol_enable_sql != auto ; then
13083                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13084         fi
13085 fi
13086
13087 ol_link_termcap=no
13088 for ac_hdr in termcap.h ncurses.h
13089 do
13090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13092 echo "configure:13093: checking for $ac_hdr" >&5
13093 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13094   echo $ac_n "(cached) $ac_c" 1>&6
13095 else
13096   cat > conftest.$ac_ext <<EOF
13097 #line 13098 "configure"
13098 #include "confdefs.h"
13099 #include <$ac_hdr>
13100 EOF
13101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13102 { (eval echo configure:13103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13104 if test -z "$ac_err"; then
13105   rm -rf conftest*
13106   eval "ac_cv_header_$ac_safe=yes"
13107 else
13108   echo "$ac_err" >&5
13109   echo "configure: failed program was:" >&5
13110   cat conftest.$ac_ext >&5
13111   rm -rf conftest*
13112   eval "ac_cv_header_$ac_safe=no"
13113 fi
13114 rm -f conftest*
13115 fi
13116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13117   echo "$ac_t""yes" 1>&6
13118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13119   cat >> confdefs.h <<EOF
13120 #define $ac_tr_hdr 1
13121 EOF
13122  
13123 else
13124   echo "$ac_t""no" 1>&6
13125 fi
13126 done
13127
13128
13129 if test $ol_link_termcap = no ; then
13130         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13131 echo "configure:13132: checking for tputs in -ltermcap" >&5
13132 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13134   echo $ac_n "(cached) $ac_c" 1>&6
13135 else
13136   ac_save_LIBS="$LIBS"
13137 LIBS="-ltermcap  $LIBS"
13138 cat > conftest.$ac_ext <<EOF
13139 #line 13140 "configure"
13140 #include "confdefs.h"
13141 /* Override any gcc2 internal prototype to avoid an error.  */
13142 /* We use char because int might match the return type of a gcc2
13143     builtin and then its argument prototype would still apply.  */
13144 char tputs();
13145
13146 int main() {
13147 tputs()
13148 ; return 0; }
13149 EOF
13150 if { (eval echo configure:13151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13151   rm -rf conftest*
13152   eval "ac_cv_lib_$ac_lib_var=yes"
13153 else
13154   echo "configure: failed program was:" >&5
13155   cat conftest.$ac_ext >&5
13156   rm -rf conftest*
13157   eval "ac_cv_lib_$ac_lib_var=no"
13158 fi
13159 rm -f conftest*
13160 LIBS="$ac_save_LIBS"
13161
13162 fi
13163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13164   echo "$ac_t""yes" 1>&6
13165   have_termcap=yes
13166 else
13167   echo "$ac_t""no" 1>&6
13168 have_termcap=no
13169 fi
13170
13171         if test $have_termcap = yes ; then
13172                 cat >> confdefs.h <<\EOF
13173 #define HAVE_TERMCAP 1
13174 EOF
13175
13176                 ol_link_termcap=yes
13177                 TERMCAP_LIBS=-ltermcap
13178         fi
13179 fi
13180
13181 if test $ol_link_termcap = no ; then
13182         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13183 echo "configure:13184: checking for initscr in -lncurses" >&5
13184 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13185 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13186   echo $ac_n "(cached) $ac_c" 1>&6
13187 else
13188   ac_save_LIBS="$LIBS"
13189 LIBS="-lncurses  $LIBS"
13190 cat > conftest.$ac_ext <<EOF
13191 #line 13192 "configure"
13192 #include "confdefs.h"
13193 /* Override any gcc2 internal prototype to avoid an error.  */
13194 /* We use char because int might match the return type of a gcc2
13195     builtin and then its argument prototype would still apply.  */
13196 char initscr();
13197
13198 int main() {
13199 initscr()
13200 ; return 0; }
13201 EOF
13202 if { (eval echo configure:13203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13203   rm -rf conftest*
13204   eval "ac_cv_lib_$ac_lib_var=yes"
13205 else
13206   echo "configure: failed program was:" >&5
13207   cat conftest.$ac_ext >&5
13208   rm -rf conftest*
13209   eval "ac_cv_lib_$ac_lib_var=no"
13210 fi
13211 rm -f conftest*
13212 LIBS="$ac_save_LIBS"
13213
13214 fi
13215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13216   echo "$ac_t""yes" 1>&6
13217   have_ncurses=yes
13218 else
13219   echo "$ac_t""no" 1>&6
13220 have_ncurses=no
13221 fi
13222
13223         if test $have_ncurses = yes ; then
13224                 cat >> confdefs.h <<\EOF
13225 #define HAVE_NCURSES 1
13226 EOF
13227
13228                 ol_link_termcap=yes
13229                 TERMCAP_LIBS=-lncurses
13230         fi
13231 fi
13232
13233 if test $ol_link_termcap = no ; then
13234         cat >> confdefs.h <<\EOF
13235 #define NO_TERMCAP 1
13236 EOF
13237
13238         TERMCAP_LIBS=
13239 fi
13240
13241 ol_link_sasl=no
13242 ol_link_spasswd=no
13243 if test $ol_with_cyrus_sasl != no ; then
13244         for ac_hdr in sasl.h
13245 do
13246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13248 echo "configure:13249: checking for $ac_hdr" >&5
13249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13250   echo $ac_n "(cached) $ac_c" 1>&6
13251 else
13252   cat > conftest.$ac_ext <<EOF
13253 #line 13254 "configure"
13254 #include "confdefs.h"
13255 #include <$ac_hdr>
13256 EOF
13257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13258 { (eval echo configure:13259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13260 if test -z "$ac_err"; then
13261   rm -rf conftest*
13262   eval "ac_cv_header_$ac_safe=yes"
13263 else
13264   echo "$ac_err" >&5
13265   echo "configure: failed program was:" >&5
13266   cat conftest.$ac_ext >&5
13267   rm -rf conftest*
13268   eval "ac_cv_header_$ac_safe=no"
13269 fi
13270 rm -f conftest*
13271 fi
13272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13273   echo "$ac_t""yes" 1>&6
13274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13275   cat >> confdefs.h <<EOF
13276 #define $ac_tr_hdr 1
13277 EOF
13278  
13279 else
13280   echo "$ac_t""no" 1>&6
13281 fi
13282 done
13283
13284
13285         if test $ac_cv_header_sasl_h = yes ; then
13286                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13287 echo "configure:13288: checking for sasl_client_init in -lsasl" >&5
13288 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13289 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13290   echo $ac_n "(cached) $ac_c" 1>&6
13291 else
13292   ac_save_LIBS="$LIBS"
13293 LIBS="-lsasl  $LIBS"
13294 cat > conftest.$ac_ext <<EOF
13295 #line 13296 "configure"
13296 #include "confdefs.h"
13297 /* Override any gcc2 internal prototype to avoid an error.  */
13298 /* We use char because int might match the return type of a gcc2
13299     builtin and then its argument prototype would still apply.  */
13300 char sasl_client_init();
13301
13302 int main() {
13303 sasl_client_init()
13304 ; return 0; }
13305 EOF
13306 if { (eval echo configure:13307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13307   rm -rf conftest*
13308   eval "ac_cv_lib_$ac_lib_var=yes"
13309 else
13310   echo "configure: failed program was:" >&5
13311   cat conftest.$ac_ext >&5
13312   rm -rf conftest*
13313   eval "ac_cv_lib_$ac_lib_var=no"
13314 fi
13315 rm -f conftest*
13316 LIBS="$ac_save_LIBS"
13317
13318 fi
13319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13320   echo "$ac_t""yes" 1>&6
13321   have_cyrus_sasl=yes
13322 else
13323   echo "$ac_t""no" 1>&6
13324 have_cyrus_sasl=no
13325 fi
13326
13327
13328                 if test $have_cyrus_sasl != no ; then
13329                         SASL_LIBS="-lsasl"
13330                         cat >> confdefs.h <<\EOF
13331 #define HAVE_CYRUS_SASL 1
13332 EOF
13333
13334                         ol_link_sasl=yes
13335                 fi
13336         fi
13337
13338         if test $ol_link_sasl = no ; then
13339                 if test $ol_with_cyrus_sasl != auto ; then
13340                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13341                 else
13342                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13343                         echo "configure: warning: SASL authentication not supported!" 1>&2
13344                         if test $ol_link_tls = no ; then
13345                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13346                         fi
13347                 fi
13348
13349         elif test $ol_enable_spasswd != no ; then
13350                 ol_link_spasswd=yes
13351         fi
13352
13353 else
13354         echo "configure: warning: SASL authentication not supported!" 1>&2
13355         if test $ol_link_tls = no ; then
13356                 echo "configure: warning: Strong authentication not supported!" 1>&2
13357         fi
13358 fi
13359
13360 if test $cross_compiling != yes ; then
13361         dev=no
13362         if test -r /dev/urandom ; then
13363                 dev="/dev/urandom";
13364         elif test -r /idev/urandom ; then
13365                 dev="/idev/urandom";
13366         elif test -r /dev/srandom ; then
13367                 dev="/dev/srandom";
13368         elif test -r /dev/random ; then
13369                 dev="/dev/random";
13370         elif test -r /idev/random ; then
13371                 dev="/idev/random";
13372         fi
13373
13374         if test $dev != no ; then
13375                 cat >> confdefs.h <<EOF
13376 #define URANDOM_DEVICE "$dev"
13377 EOF
13378
13379         fi
13380 fi
13381
13382 ol_link_fetch=no
13383 if test $ol_with_fetch != no ; then
13384         ol_LIBS=$LIBS
13385 LIBS="-lfetch -lcom_err $LIBS"
13386 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13387 echo "configure:13388: checking fetch(3) library" >&5
13388 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13389   echo $ac_n "(cached) $ac_c" 1>&6
13390 else
13391   
13392         cat > conftest.$ac_ext <<EOF
13393 #line 13394 "configure"
13394 #include "confdefs.h"
13395
13396 #include <sys/param.h>
13397 #include <stdio.h>
13398 #include <fetch.h>
13399 int main() {
13400 struct url *u = fetchParseURL("file:///"); 
13401 ; return 0; }
13402 EOF
13403 if { (eval echo configure:13404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13404   rm -rf conftest*
13405   ol_cv_lib_fetch=yes
13406 else
13407   echo "configure: failed program was:" >&5
13408   cat conftest.$ac_ext >&5
13409   rm -rf conftest*
13410   ol_cv_lib_fetch=no
13411 fi
13412 rm -f conftest*
13413 fi
13414
13415 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13416 LIBS=$ol_LIBS
13417 if test $ol_cv_lib_fetch != no ; then
13418         ol_link_fetch="-lfetch -lcom_err"
13419         cat >> confdefs.h <<\EOF
13420 #define HAVE_FETCH 1
13421 EOF
13422
13423 fi
13424
13425
13426         if test $ol_cv_lib_fetch != no ; then
13427                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13428                 ol_link_fetch=freebsd
13429
13430         elif test $ol_with_fetch != auto ; then
13431                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13432         fi 
13433 fi
13434
13435 ol_link_readline=no
13436 if test $ol_with_readline != no ; then
13437         for ac_hdr in readline/readline.h readline/history.h
13438 do
13439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13441 echo "configure:13442: checking for $ac_hdr" >&5
13442 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13443   echo $ac_n "(cached) $ac_c" 1>&6
13444 else
13445   cat > conftest.$ac_ext <<EOF
13446 #line 13447 "configure"
13447 #include "confdefs.h"
13448 #include <$ac_hdr>
13449 EOF
13450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13451 { (eval echo configure:13452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13453 if test -z "$ac_err"; then
13454   rm -rf conftest*
13455   eval "ac_cv_header_$ac_safe=yes"
13456 else
13457   echo "$ac_err" >&5
13458   echo "configure: failed program was:" >&5
13459   cat conftest.$ac_ext >&5
13460   rm -rf conftest*
13461   eval "ac_cv_header_$ac_safe=no"
13462 fi
13463 rm -f conftest*
13464 fi
13465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13466   echo "$ac_t""yes" 1>&6
13467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13468   cat >> confdefs.h <<EOF
13469 #define $ac_tr_hdr 1
13470 EOF
13471  
13472 else
13473   echo "$ac_t""no" 1>&6
13474 fi
13475 done
13476
13477
13478         if test $ac_cv_header_readline_readline_h = yes ; then
13479                 save_LIBS="$LIBS"
13480                 LIBS="$TERMCAP_LIBS $LIBS"
13481                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13482 echo "configure:13483: checking for readline in -lreadline" >&5
13483 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13484 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13485   echo $ac_n "(cached) $ac_c" 1>&6
13486 else
13487   ac_save_LIBS="$LIBS"
13488 LIBS="-lreadline  $LIBS"
13489 cat > conftest.$ac_ext <<EOF
13490 #line 13491 "configure"
13491 #include "confdefs.h"
13492 /* Override any gcc2 internal prototype to avoid an error.  */
13493 /* We use char because int might match the return type of a gcc2
13494     builtin and then its argument prototype would still apply.  */
13495 char readline();
13496
13497 int main() {
13498 readline()
13499 ; return 0; }
13500 EOF
13501 if { (eval echo configure:13502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13502   rm -rf conftest*
13503   eval "ac_cv_lib_$ac_lib_var=yes"
13504 else
13505   echo "configure: failed program was:" >&5
13506   cat conftest.$ac_ext >&5
13507   rm -rf conftest*
13508   eval "ac_cv_lib_$ac_lib_var=no"
13509 fi
13510 rm -f conftest*
13511 LIBS="$ac_save_LIBS"
13512
13513 fi
13514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13515   echo "$ac_t""yes" 1>&6
13516   have_readline=yes
13517 else
13518   echo "$ac_t""no" 1>&6
13519 have_readline=no
13520 fi
13521
13522                 LIBS="$save_LIBS"
13523                         
13524                 if test $have_readline = yes ; then
13525                         ol_with_readline=found
13526                         ol_link_readline=yes
13527
13528                         READLINE_LIBS="-lreadline"
13529                 fi
13530         fi
13531 fi
13532
13533 if test $ol_link_readline = yes ; then
13534         cat >> confdefs.h <<\EOF
13535 #define HAVE_READLINE 1
13536 EOF
13537
13538 fi
13539
13540
13541 if test $ol_enable_crypt != no ; then
13542         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13543 echo "configure:13544: checking for crypt" >&5
13544 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13545   echo $ac_n "(cached) $ac_c" 1>&6
13546 else
13547   cat > conftest.$ac_ext <<EOF
13548 #line 13549 "configure"
13549 #include "confdefs.h"
13550 /* System header to define __stub macros and hopefully few prototypes,
13551     which can conflict with char crypt(); below.  */
13552 #include <assert.h>
13553 /* Override any gcc2 internal prototype to avoid an error.  */
13554 /* We use char because int might match the return type of a gcc2
13555     builtin and then its argument prototype would still apply.  */
13556 char crypt();
13557 char (*f)();
13558
13559 int main() {
13560
13561 /* The GNU C library defines this for functions which it implements
13562     to always fail with ENOSYS.  Some functions are actually named
13563     something starting with __ and the normal name is an alias.  */
13564 #if defined (__stub_crypt) || defined (__stub___crypt)
13565 choke me
13566 #else
13567 f = crypt;
13568 #endif
13569
13570 ; return 0; }
13571 EOF
13572 if { (eval echo configure:13573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13573   rm -rf conftest*
13574   eval "ac_cv_func_crypt=yes"
13575 else
13576   echo "configure: failed program was:" >&5
13577   cat conftest.$ac_ext >&5
13578   rm -rf conftest*
13579   eval "ac_cv_func_crypt=no"
13580 fi
13581 rm -f conftest*
13582 fi
13583
13584 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13585   echo "$ac_t""yes" 1>&6
13586   have_crypt=yes
13587 else
13588   echo "$ac_t""no" 1>&6
13589
13590                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13591 echo "configure:13592: checking for crypt in -lcrypt" >&5
13592 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13594   echo $ac_n "(cached) $ac_c" 1>&6
13595 else
13596   ac_save_LIBS="$LIBS"
13597 LIBS="-lcrypt  $LIBS"
13598 cat > conftest.$ac_ext <<EOF
13599 #line 13600 "configure"
13600 #include "confdefs.h"
13601 /* Override any gcc2 internal prototype to avoid an error.  */
13602 /* We use char because int might match the return type of a gcc2
13603     builtin and then its argument prototype would still apply.  */
13604 char crypt();
13605
13606 int main() {
13607 crypt()
13608 ; return 0; }
13609 EOF
13610 if { (eval echo configure:13611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13611   rm -rf conftest*
13612   eval "ac_cv_lib_$ac_lib_var=yes"
13613 else
13614   echo "configure: failed program was:" >&5
13615   cat conftest.$ac_ext >&5
13616   rm -rf conftest*
13617   eval "ac_cv_lib_$ac_lib_var=no"
13618 fi
13619 rm -f conftest*
13620 LIBS="$ac_save_LIBS"
13621
13622 fi
13623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13624   echo "$ac_t""yes" 1>&6
13625   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13626                         have_crypt=yes
13627 else
13628   echo "$ac_t""no" 1>&6
13629 have_crypt=no
13630 fi
13631
13632 fi
13633
13634
13635         if test $have_crypt = yes ; then
13636                 cat >> confdefs.h <<\EOF
13637 #define HAVE_CRYPT 1
13638 EOF
13639
13640         else
13641                 echo "configure: warning: could not find crypt" 1>&2
13642                 if test $ol_enable_crypt = yes ; then
13643                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13644                 fi
13645
13646                 echo "configure: warning: disabling crypt support" 1>&2
13647                 ol_enable_crypt=no
13648         fi
13649 fi
13650
13651 if test $ol_enable_proctitle != no ; then
13652         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13653 echo "configure:13654: checking for setproctitle" >&5
13654 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13655   echo $ac_n "(cached) $ac_c" 1>&6
13656 else
13657   cat > conftest.$ac_ext <<EOF
13658 #line 13659 "configure"
13659 #include "confdefs.h"
13660 /* System header to define __stub macros and hopefully few prototypes,
13661     which can conflict with char setproctitle(); below.  */
13662 #include <assert.h>
13663 /* Override any gcc2 internal prototype to avoid an error.  */
13664 /* We use char because int might match the return type of a gcc2
13665     builtin and then its argument prototype would still apply.  */
13666 char setproctitle();
13667 char (*f)();
13668
13669 int main() {
13670
13671 /* The GNU C library defines this for functions which it implements
13672     to always fail with ENOSYS.  Some functions are actually named
13673     something starting with __ and the normal name is an alias.  */
13674 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13675 choke me
13676 #else
13677 f = setproctitle;
13678 #endif
13679
13680 ; return 0; }
13681 EOF
13682 if { (eval echo configure:13683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13683   rm -rf conftest*
13684   eval "ac_cv_func_setproctitle=yes"
13685 else
13686   echo "configure: failed program was:" >&5
13687   cat conftest.$ac_ext >&5
13688   rm -rf conftest*
13689   eval "ac_cv_func_setproctitle=no"
13690 fi
13691 rm -f conftest*
13692 fi
13693
13694 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13695   echo "$ac_t""yes" 1>&6
13696   have_setproctitle=yes
13697 else
13698   echo "$ac_t""no" 1>&6
13699
13700                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13701 echo "configure:13702: checking for setproctitle in -lutil" >&5
13702 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13704   echo $ac_n "(cached) $ac_c" 1>&6
13705 else
13706   ac_save_LIBS="$LIBS"
13707 LIBS="-lutil  $LIBS"
13708 cat > conftest.$ac_ext <<EOF
13709 #line 13710 "configure"
13710 #include "confdefs.h"
13711 /* Override any gcc2 internal prototype to avoid an error.  */
13712 /* We use char because int might match the return type of a gcc2
13713     builtin and then its argument prototype would still apply.  */
13714 char setproctitle();
13715
13716 int main() {
13717 setproctitle()
13718 ; return 0; }
13719 EOF
13720 if { (eval echo configure:13721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13721   rm -rf conftest*
13722   eval "ac_cv_lib_$ac_lib_var=yes"
13723 else
13724   echo "configure: failed program was:" >&5
13725   cat conftest.$ac_ext >&5
13726   rm -rf conftest*
13727   eval "ac_cv_lib_$ac_lib_var=no"
13728 fi
13729 rm -f conftest*
13730 LIBS="$ac_save_LIBS"
13731
13732 fi
13733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13734   echo "$ac_t""yes" 1>&6
13735   have_setproctitle=yes
13736                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13737 else
13738   echo "$ac_t""no" 1>&6
13739 have_setproctitle=no
13740                         LIBOBJS="$LIBOBJS setproctitle.o"
13741                         LIBSRCS="$LIBSRCS setproctitle.c"
13742 fi
13743
13744 fi
13745
13746
13747         if test $have_setproctitle = yes ; then
13748                 cat >> confdefs.h <<\EOF
13749 #define HAVE_SETPROCTITLE 1
13750 EOF
13751
13752         fi
13753 fi
13754
13755 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13756 echo "configure:13757: checking for ANSI C header files" >&5
13757 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13758   echo $ac_n "(cached) $ac_c" 1>&6
13759 else
13760   cat > conftest.$ac_ext <<EOF
13761 #line 13762 "configure"
13762 #include "confdefs.h"
13763 #include <stdlib.h>
13764 #include <stdarg.h>
13765 #include <string.h>
13766 #include <float.h>
13767 EOF
13768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13769 { (eval echo configure:13770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13771 if test -z "$ac_err"; then
13772   rm -rf conftest*
13773   ac_cv_header_stdc=yes
13774 else
13775   echo "$ac_err" >&5
13776   echo "configure: failed program was:" >&5
13777   cat conftest.$ac_ext >&5
13778   rm -rf conftest*
13779   ac_cv_header_stdc=no
13780 fi
13781 rm -f conftest*
13782
13783 if test $ac_cv_header_stdc = yes; then
13784   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13785 cat > conftest.$ac_ext <<EOF
13786 #line 13787 "configure"
13787 #include "confdefs.h"
13788 #include <string.h>
13789 EOF
13790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13791   egrep "memchr" >/dev/null 2>&1; then
13792   :
13793 else
13794   rm -rf conftest*
13795   ac_cv_header_stdc=no
13796 fi
13797 rm -f conftest*
13798
13799 fi
13800
13801 if test $ac_cv_header_stdc = yes; then
13802   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13803 cat > conftest.$ac_ext <<EOF
13804 #line 13805 "configure"
13805 #include "confdefs.h"
13806 #include <stdlib.h>
13807 EOF
13808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13809   egrep "free" >/dev/null 2>&1; then
13810   :
13811 else
13812   rm -rf conftest*
13813   ac_cv_header_stdc=no
13814 fi
13815 rm -f conftest*
13816
13817 fi
13818
13819 if test $ac_cv_header_stdc = yes; then
13820   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13821 if test "$cross_compiling" = yes; then
13822   :
13823 else
13824   cat > conftest.$ac_ext <<EOF
13825 #line 13826 "configure"
13826 #include "confdefs.h"
13827 #include <ctype.h>
13828 #if ((' ' & 0x0FF) == 0x020)
13829 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13830 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13831 #else
13832 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13833  || ('j' <= (c) && (c) <= 'r') \
13834  || ('s' <= (c) && (c) <= 'z'))
13835 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13836 #endif
13837 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13838 int main () { int i; for (i = 0; i < 256; i++)
13839 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13840 exit (0); }
13841
13842 EOF
13843 if { (eval echo configure:13844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13844 then
13845   :
13846 else
13847   echo "configure: failed program was:" >&5
13848   cat conftest.$ac_ext >&5
13849   rm -fr conftest*
13850   ac_cv_header_stdc=no
13851 fi
13852 rm -fr conftest*
13853 fi
13854
13855 fi
13856 fi
13857
13858 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13859 if test $ac_cv_header_stdc = yes; then
13860   cat >> confdefs.h <<\EOF
13861 #define STDC_HEADERS 1
13862 EOF
13863
13864 fi
13865
13866 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13867 echo "configure:13868: checking for mode_t" >&5
13868 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13869   echo $ac_n "(cached) $ac_c" 1>&6
13870 else
13871   cat > conftest.$ac_ext <<EOF
13872 #line 13873 "configure"
13873 #include "confdefs.h"
13874 #include <sys/types.h>
13875 #if STDC_HEADERS
13876 #include <stdlib.h>
13877 #include <stddef.h>
13878 #endif
13879
13880 EOF
13881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13882   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13883   rm -rf conftest*
13884   eval "ac_cv_type_mode_t=yes"
13885 else
13886   rm -rf conftest*
13887   eval "ac_cv_type_mode_t=no"
13888 fi
13889 rm -f conftest*
13890
13891 fi
13892 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13893   echo "$ac_t""yes" 1>&6
13894 else
13895   echo "$ac_t""no" 1>&6
13896   cat >> confdefs.h <<EOF
13897 #define mode_t int
13898 EOF
13899
13900 fi
13901
13902 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13903 echo "configure:13904: checking for off_t" >&5
13904 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13905   echo $ac_n "(cached) $ac_c" 1>&6
13906 else
13907   cat > conftest.$ac_ext <<EOF
13908 #line 13909 "configure"
13909 #include "confdefs.h"
13910 #include <sys/types.h>
13911 #if STDC_HEADERS
13912 #include <stdlib.h>
13913 #include <stddef.h>
13914 #endif
13915
13916 EOF
13917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13918   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13919   rm -rf conftest*
13920   eval "ac_cv_type_off_t=yes"
13921 else
13922   rm -rf conftest*
13923   eval "ac_cv_type_off_t=no"
13924 fi
13925 rm -f conftest*
13926
13927 fi
13928 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13929   echo "$ac_t""yes" 1>&6
13930 else
13931   echo "$ac_t""no" 1>&6
13932   cat >> confdefs.h <<EOF
13933 #define off_t long
13934 EOF
13935
13936 fi
13937
13938 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13939 echo "configure:13940: checking for pid_t" >&5
13940 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13941   echo $ac_n "(cached) $ac_c" 1>&6
13942 else
13943   cat > conftest.$ac_ext <<EOF
13944 #line 13945 "configure"
13945 #include "confdefs.h"
13946 #include <sys/types.h>
13947 #if STDC_HEADERS
13948 #include <stdlib.h>
13949 #include <stddef.h>
13950 #endif
13951
13952 EOF
13953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13954   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13955   rm -rf conftest*
13956   eval "ac_cv_type_pid_t=yes"
13957 else
13958   rm -rf conftest*
13959   eval "ac_cv_type_pid_t=no"
13960 fi
13961 rm -f conftest*
13962
13963 fi
13964 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13965   echo "$ac_t""yes" 1>&6
13966 else
13967   echo "$ac_t""no" 1>&6
13968   cat >> confdefs.h <<EOF
13969 #define pid_t int
13970 EOF
13971
13972 fi
13973
13974 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13975 echo "configure:13976: checking for ptrdiff_t" >&5
13976 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13977   echo $ac_n "(cached) $ac_c" 1>&6
13978 else
13979   cat > conftest.$ac_ext <<EOF
13980 #line 13981 "configure"
13981 #include "confdefs.h"
13982 #include <stddef.h>
13983 int main() {
13984 ptrdiff_t p
13985 ; return 0; }
13986 EOF
13987 if { (eval echo configure:13988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13988   rm -rf conftest*
13989   am_cv_type_ptrdiff_t=yes
13990 else
13991   echo "configure: failed program was:" >&5
13992   cat conftest.$ac_ext >&5
13993   rm -rf conftest*
13994   am_cv_type_ptrdiff_t=no
13995 fi
13996 rm -f conftest*
13997 fi
13998
13999 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14000    if test $am_cv_type_ptrdiff_t = yes; then
14001      cat >> confdefs.h <<\EOF
14002 #define HAVE_PTRDIFF_T 1
14003 EOF
14004
14005    fi
14006
14007 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14008 echo "configure:14009: checking return type of signal handlers" >&5
14009 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14010   echo $ac_n "(cached) $ac_c" 1>&6
14011 else
14012   cat > conftest.$ac_ext <<EOF
14013 #line 14014 "configure"
14014 #include "confdefs.h"
14015 #include <sys/types.h>
14016 #include <signal.h>
14017 #ifdef signal
14018 #undef signal
14019 #endif
14020 #ifdef __cplusplus
14021 extern "C" void (*signal (int, void (*)(int)))(int);
14022 #else
14023 void (*signal ()) ();
14024 #endif
14025
14026 int main() {
14027 int i;
14028 ; return 0; }
14029 EOF
14030 if { (eval echo configure:14031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14031   rm -rf conftest*
14032   ac_cv_type_signal=void
14033 else
14034   echo "configure: failed program was:" >&5
14035   cat conftest.$ac_ext >&5
14036   rm -rf conftest*
14037   ac_cv_type_signal=int
14038 fi
14039 rm -f conftest*
14040 fi
14041
14042 echo "$ac_t""$ac_cv_type_signal" 1>&6
14043 cat >> confdefs.h <<EOF
14044 #define RETSIGTYPE $ac_cv_type_signal
14045 EOF
14046
14047
14048 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14049 echo "configure:14050: checking for size_t" >&5
14050 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14051   echo $ac_n "(cached) $ac_c" 1>&6
14052 else
14053   cat > conftest.$ac_ext <<EOF
14054 #line 14055 "configure"
14055 #include "confdefs.h"
14056 #include <sys/types.h>
14057 #if STDC_HEADERS
14058 #include <stdlib.h>
14059 #include <stddef.h>
14060 #endif
14061
14062 EOF
14063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14064   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14065   rm -rf conftest*
14066   eval "ac_cv_type_size_t=yes"
14067 else
14068   rm -rf conftest*
14069   eval "ac_cv_type_size_t=no"
14070 fi
14071 rm -f conftest*
14072
14073 fi
14074 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14075   echo "$ac_t""yes" 1>&6
14076 else
14077   echo "$ac_t""no" 1>&6
14078   cat >> confdefs.h <<EOF
14079 #define size_t unsigned
14080 EOF
14081
14082 fi
14083
14084
14085 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14086 echo "configure:14087: checking for ssize_t" >&5
14087 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14088   echo $ac_n "(cached) $ac_c" 1>&6
14089 else
14090   cat > conftest.$ac_ext <<EOF
14091 #line 14092 "configure"
14092 #include "confdefs.h"
14093 #include <sys/types.h>
14094 #if STDC_HEADERS
14095 #include <stdlib.h>
14096 #include <stddef.h>
14097 #endif
14098
14099 EOF
14100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14101   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14102   rm -rf conftest*
14103   eval "ac_cv_type_ssize_t=yes"
14104 else
14105   rm -rf conftest*
14106   eval "ac_cv_type_ssize_t=no"
14107 fi
14108 rm -f conftest*
14109
14110 fi
14111 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14112   echo "$ac_t""yes" 1>&6
14113 else
14114   echo "$ac_t""no" 1>&6
14115   cat >> confdefs.h <<EOF
14116 #define ssize_t signed int
14117 EOF
14118
14119 fi
14120
14121 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14122 echo "configure:14123: checking for caddr_t" >&5
14123 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14124   echo $ac_n "(cached) $ac_c" 1>&6
14125 else
14126   cat > conftest.$ac_ext <<EOF
14127 #line 14128 "configure"
14128 #include "confdefs.h"
14129 #include <sys/types.h>
14130 #if STDC_HEADERS
14131 #include <stdlib.h>
14132 #include <stddef.h>
14133 #endif
14134
14135 EOF
14136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14137   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14138   rm -rf conftest*
14139   eval "ac_cv_type_caddr_t=yes"
14140 else
14141   rm -rf conftest*
14142   eval "ac_cv_type_caddr_t=no"
14143 fi
14144 rm -f conftest*
14145
14146 fi
14147 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14148   echo "$ac_t""yes" 1>&6
14149 else
14150   echo "$ac_t""no" 1>&6
14151   cat >> confdefs.h <<EOF
14152 #define caddr_t char *
14153 EOF
14154
14155 fi
14156
14157
14158 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14159 echo "configure:14160: checking for socklen_t" >&5
14160 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14161   echo $ac_n "(cached) $ac_c" 1>&6
14162 else
14163   cat > conftest.$ac_ext <<EOF
14164 #line 14165 "configure"
14165 #include "confdefs.h"
14166
14167 #ifdef HAVE_SYS_TYPES_H
14168 #include <sys/types.h>
14169 #endif
14170 #ifdef HAVE_SYS_SOCKET_H
14171 #include <sys/socket.h>
14172 #endif
14173
14174 int main() {
14175 socklen_t len;
14176 ; return 0; }
14177 EOF
14178 if { (eval echo configure:14179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14179   rm -rf conftest*
14180   ol_cv_type_socklen_t=yes
14181 else
14182   echo "configure: failed program was:" >&5
14183   cat conftest.$ac_ext >&5
14184   rm -rf conftest*
14185   ol_cv_type_socklen_t=no
14186 fi
14187 rm -f conftest*
14188 fi
14189
14190 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14191   if test $ol_cv_type_socklen_t = no; then
14192     cat >> confdefs.h <<\EOF
14193 #define socklen_t int
14194 EOF
14195
14196   fi
14197  
14198 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14199 echo "configure:14200: checking for member st_blksize in aggregate type struct stat" >&5
14200 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14201   echo $ac_n "(cached) $ac_c" 1>&6
14202 else
14203   cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 #include <sys/types.h>
14207 #include <sys/stat.h>
14208 int main() {
14209 struct stat foo; foo.st_blksize;
14210 ; return 0; }
14211 EOF
14212 if { (eval echo configure:14213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14213   rm -rf conftest*
14214   ac_cv_c_struct_member_st_blksize=yes
14215 else
14216   echo "configure: failed program was:" >&5
14217   cat conftest.$ac_ext >&5
14218   rm -rf conftest*
14219   ac_cv_c_struct_member_st_blksize=no
14220 fi
14221 rm -f conftest*
14222 fi
14223
14224 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14225 st_blksize="$ac_cv_c_struct_member_st_blksize"
14226 if test $ac_cv_c_struct_member_st_blksize = yes; then
14227   cat >> confdefs.h <<\EOF
14228 #define HAVE_ST_BLKSIZE 1
14229 EOF
14230
14231 fi
14232
14233 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14234 echo "configure:14235: checking whether time.h and sys/time.h may both be included" >&5
14235 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14236   echo $ac_n "(cached) $ac_c" 1>&6
14237 else
14238   cat > conftest.$ac_ext <<EOF
14239 #line 14240 "configure"
14240 #include "confdefs.h"
14241 #include <sys/types.h>
14242 #include <sys/time.h>
14243 #include <time.h>
14244 int main() {
14245 struct tm *tp;
14246 ; return 0; }
14247 EOF
14248 if { (eval echo configure:14249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14249   rm -rf conftest*
14250   ac_cv_header_time=yes
14251 else
14252   echo "configure: failed program was:" >&5
14253   cat conftest.$ac_ext >&5
14254   rm -rf conftest*
14255   ac_cv_header_time=no
14256 fi
14257 rm -f conftest*
14258 fi
14259
14260 echo "$ac_t""$ac_cv_header_time" 1>&6
14261 if test $ac_cv_header_time = yes; then
14262   cat >> confdefs.h <<\EOF
14263 #define TIME_WITH_SYS_TIME 1
14264 EOF
14265
14266 fi
14267
14268 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14269 echo "configure:14270: checking whether struct tm is in sys/time.h or time.h" >&5
14270 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14271   echo $ac_n "(cached) $ac_c" 1>&6
14272 else
14273   cat > conftest.$ac_ext <<EOF
14274 #line 14275 "configure"
14275 #include "confdefs.h"
14276 #include <sys/types.h>
14277 #include <time.h>
14278 int main() {
14279 struct tm *tp; tp->tm_sec;
14280 ; return 0; }
14281 EOF
14282 if { (eval echo configure:14283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14283   rm -rf conftest*
14284   ac_cv_struct_tm=time.h
14285 else
14286   echo "configure: failed program was:" >&5
14287   cat conftest.$ac_ext >&5
14288   rm -rf conftest*
14289   ac_cv_struct_tm=sys/time.h
14290 fi
14291 rm -f conftest*
14292 fi
14293
14294 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14295 if test $ac_cv_struct_tm = sys/time.h; then
14296   cat >> confdefs.h <<\EOF
14297 #define TM_IN_SYS_TIME 1
14298 EOF
14299
14300 fi
14301
14302 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14303 echo "configure:14304: checking for uid_t in sys/types.h" >&5
14304 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14305   echo $ac_n "(cached) $ac_c" 1>&6
14306 else
14307   cat > conftest.$ac_ext <<EOF
14308 #line 14309 "configure"
14309 #include "confdefs.h"
14310 #include <sys/types.h>
14311 EOF
14312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14313   egrep "uid_t" >/dev/null 2>&1; then
14314   rm -rf conftest*
14315   ac_cv_type_uid_t=yes
14316 else
14317   rm -rf conftest*
14318   ac_cv_type_uid_t=no
14319 fi
14320 rm -f conftest*
14321
14322 fi
14323
14324 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14325 if test $ac_cv_type_uid_t = no; then
14326   cat >> confdefs.h <<\EOF
14327 #define uid_t int
14328 EOF
14329
14330   cat >> confdefs.h <<\EOF
14331 #define gid_t int
14332 EOF
14333
14334 fi
14335
14336 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14337 echo "configure:14338: checking for sig_atomic_t" >&5
14338 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14339   echo $ac_n "(cached) $ac_c" 1>&6
14340 else
14341   cat > conftest.$ac_ext <<EOF
14342 #line 14343 "configure"
14343 #include "confdefs.h"
14344 #include <signal.h>
14345 int main() {
14346 sig_atomic_t atomic;
14347 ; return 0; }
14348 EOF
14349 if { (eval echo configure:14350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14350   rm -rf conftest*
14351   ol_cv_type_sig_atomic_t=yes
14352 else
14353   echo "configure: failed program was:" >&5
14354   cat conftest.$ac_ext >&5
14355   rm -rf conftest*
14356   ol_cv_type_sig_atomic_t=no
14357 fi
14358 rm -f conftest*
14359 fi
14360
14361 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14362   if test $ol_cv_type_sig_atomic_t = no; then
14363     cat >> confdefs.h <<\EOF
14364 #define sig_atomic_t int
14365 EOF
14366
14367   fi
14368  
14369
14370
14371 # test for pw_gecos in struct passwd
14372 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14373 echo "configure:14374: checking struct passwd for pw_gecos" >&5
14374 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14375   echo $ac_n "(cached) $ac_c" 1>&6
14376 else
14377   
14378         cat > conftest.$ac_ext <<EOF
14379 #line 14380 "configure"
14380 #include "confdefs.h"
14381 #include <pwd.h>
14382 int main() {
14383
14384         struct passwd pwd;
14385         pwd.pw_gecos = pwd.pw_name;
14386
14387 ; return 0; }
14388 EOF
14389 if { (eval echo configure:14390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14390   rm -rf conftest*
14391   ol_cv_struct_passwd_pw_gecos=yes
14392 else
14393   echo "configure: failed program was:" >&5
14394   cat conftest.$ac_ext >&5
14395   rm -rf conftest*
14396   ol_cv_struct_passwd_pw_gecos=no
14397 fi
14398 rm -f conftest*
14399 fi
14400
14401 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14402 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14403         cat >> confdefs.h <<\EOF
14404 #define HAVE_PW_GECOS 1
14405 EOF
14406
14407 fi
14408
14409 # test for pw_passwd in struct passwd
14410 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14411 echo "configure:14412: checking struct passwd for pw_passwd" >&5
14412 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14413   echo $ac_n "(cached) $ac_c" 1>&6
14414 else
14415   
14416         cat > conftest.$ac_ext <<EOF
14417 #line 14418 "configure"
14418 #include "confdefs.h"
14419 #include <pwd.h>
14420 int main() {
14421
14422         struct passwd pwd;
14423         pwd.pw_passwd = pwd.pw_name;
14424
14425 ; return 0; }
14426 EOF
14427 if { (eval echo configure:14428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14428   rm -rf conftest*
14429   ol_cv_struct_passwd_pw_passwd=yes
14430 else
14431   echo "configure: failed program was:" >&5
14432   cat conftest.$ac_ext >&5
14433   rm -rf conftest*
14434   ol_cv_struct_passwd_pw_passwd=no
14435 fi
14436 rm -f conftest*
14437 fi
14438
14439 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14440 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14441         cat >> confdefs.h <<\EOF
14442 #define HAVE_PW_PASSWD 1
14443 EOF
14444
14445 fi
14446
14447
14448 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14449 echo "configure:14450: checking if toupper() requires islower()" >&5
14450 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14451   echo $ac_n "(cached) $ac_c" 1>&6
14452 else
14453   
14454         if test "$cross_compiling" = yes; then
14455   ol_cv_c_upper_lower=safe
14456 else
14457   cat > conftest.$ac_ext <<EOF
14458 #line 14459 "configure"
14459 #include "confdefs.h"
14460
14461 #include <ctype.h>
14462 main()
14463 {
14464         if ('C' == toupper('C'))
14465                 exit(0);
14466         else
14467                 exit(1);
14468 }
14469 EOF
14470 if { (eval echo configure:14471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14471 then
14472   ol_cv_c_upper_lower=no
14473 else
14474   echo "configure: failed program was:" >&5
14475   cat conftest.$ac_ext >&5
14476   rm -fr conftest*
14477   ol_cv_c_upper_lower=yes
14478 fi
14479 rm -fr conftest*
14480 fi
14481
14482 fi
14483
14484 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14485 if test $ol_cv_c_upper_lower != no ; then
14486         cat >> confdefs.h <<\EOF
14487 #define C_UPPER_LOWER 1
14488 EOF
14489
14490 fi
14491
14492 echo $ac_n "checking for working const""... $ac_c" 1>&6
14493 echo "configure:14494: checking for working const" >&5
14494 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14495   echo $ac_n "(cached) $ac_c" 1>&6
14496 else
14497   cat > conftest.$ac_ext <<EOF
14498 #line 14499 "configure"
14499 #include "confdefs.h"
14500
14501 int main() {
14502
14503 /* Ultrix mips cc rejects this.  */
14504 typedef int charset[2]; const charset x;
14505 /* SunOS 4.1.1 cc rejects this.  */
14506 char const *const *ccp;
14507 char **p;
14508 /* NEC SVR4.0.2 mips cc rejects this.  */
14509 struct point {int x, y;};
14510 static struct point const zero = {0,0};
14511 /* AIX XL C 1.02.0.0 rejects this.
14512    It does not let you subtract one const X* pointer from another in an arm
14513    of an if-expression whose if-part is not a constant expression */
14514 const char *g = "string";
14515 ccp = &g + (g ? g-g : 0);
14516 /* HPUX 7.0 cc rejects these. */
14517 ++ccp;
14518 p = (char**) ccp;
14519 ccp = (char const *const *) p;
14520 { /* SCO 3.2v4 cc rejects this.  */
14521   char *t;
14522   char const *s = 0 ? (char *) 0 : (char const *) 0;
14523
14524   *t++ = 0;
14525 }
14526 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14527   int x[] = {25, 17};
14528   const int *foo = &x[0];
14529   ++foo;
14530 }
14531 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14532   typedef const int *iptr;
14533   iptr p = 0;
14534   ++p;
14535 }
14536 { /* AIX XL C 1.02.0.0 rejects this saying
14537      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14538   struct s { int j; const int *ap[3]; };
14539   struct s *b; b->j = 5;
14540 }
14541 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14542   const int foo = 10;
14543 }
14544
14545 ; return 0; }
14546 EOF
14547 if { (eval echo configure:14548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14548   rm -rf conftest*
14549   ac_cv_c_const=yes
14550 else
14551   echo "configure: failed program was:" >&5
14552   cat conftest.$ac_ext >&5
14553   rm -rf conftest*
14554   ac_cv_c_const=no
14555 fi
14556 rm -f conftest*
14557 fi
14558
14559 echo "$ac_t""$ac_cv_c_const" 1>&6
14560 if test $ac_cv_c_const = no; then
14561   cat >> confdefs.h <<\EOF
14562 #define const 
14563 EOF
14564
14565 fi
14566
14567 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14568 echo "configure:14569: checking if compiler understands volatile" >&5
14569 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14570   echo $ac_n "(cached) $ac_c" 1>&6
14571 else
14572   cat > conftest.$ac_ext <<EOF
14573 #line 14574 "configure"
14574 #include "confdefs.h"
14575 int x, y, z;
14576 int main() {
14577 volatile int a; int * volatile b = x ? &y : &z;
14578       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14579       *b = 0;
14580 ; return 0; }
14581 EOF
14582 if { (eval echo configure:14583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14583   rm -rf conftest*
14584   ol_cv_c_volatile=yes
14585 else
14586   echo "configure: failed program was:" >&5
14587   cat conftest.$ac_ext >&5
14588   rm -rf conftest*
14589   ol_cv_c_volatile=no
14590 fi
14591 rm -f conftest*
14592 fi
14593
14594 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14595   if test $ol_cv_c_volatile = yes; then
14596     : 
14597   else
14598     cat >> confdefs.h <<\EOF
14599 #define volatile 
14600 EOF
14601
14602   fi
14603  
14604
14605 if test $cross_compiling = yes ; then
14606         cat >> confdefs.h <<\EOF
14607 #define CROSS_COMPILING 1
14608 EOF
14609
14610 else
14611         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14612 echo "configure:14613: checking whether byte ordering is bigendian" >&5
14613 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14614   echo $ac_n "(cached) $ac_c" 1>&6
14615 else
14616   ac_cv_c_bigendian=unknown
14617 # See if sys/param.h defines the BYTE_ORDER macro.
14618 cat > conftest.$ac_ext <<EOF
14619 #line 14620 "configure"
14620 #include "confdefs.h"
14621 #include <sys/types.h>
14622 #include <sys/param.h>
14623 int main() {
14624
14625 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14626  bogus endian macros
14627 #endif
14628 ; return 0; }
14629 EOF
14630 if { (eval echo configure:14631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14631   rm -rf conftest*
14632   # It does; now see whether it defined to BIG_ENDIAN or not.
14633 cat > conftest.$ac_ext <<EOF
14634 #line 14635 "configure"
14635 #include "confdefs.h"
14636 #include <sys/types.h>
14637 #include <sys/param.h>
14638 int main() {
14639
14640 #if BYTE_ORDER != BIG_ENDIAN
14641  not big endian
14642 #endif
14643 ; return 0; }
14644 EOF
14645 if { (eval echo configure:14646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14646   rm -rf conftest*
14647   ac_cv_c_bigendian=yes
14648 else
14649   echo "configure: failed program was:" >&5
14650   cat conftest.$ac_ext >&5
14651   rm -rf conftest*
14652   ac_cv_c_bigendian=no
14653 fi
14654 rm -f conftest*
14655 else
14656   echo "configure: failed program was:" >&5
14657   cat conftest.$ac_ext >&5
14658 fi
14659 rm -f conftest*
14660 if test $ac_cv_c_bigendian = unknown; then
14661 if test "$cross_compiling" = yes; then
14662     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14663 else
14664   cat > conftest.$ac_ext <<EOF
14665 #line 14666 "configure"
14666 #include "confdefs.h"
14667 main () {
14668   /* Are we little or big endian?  From Harbison&Steele.  */
14669   union
14670   {
14671     long l;
14672     char c[sizeof (long)];
14673   } u;
14674   u.l = 1;
14675   exit (u.c[sizeof (long) - 1] == 1);
14676 }
14677 EOF
14678 if { (eval echo configure:14679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14679 then
14680   ac_cv_c_bigendian=no
14681 else
14682   echo "configure: failed program was:" >&5
14683   cat conftest.$ac_ext >&5
14684   rm -fr conftest*
14685   ac_cv_c_bigendian=yes
14686 fi
14687 rm -fr conftest*
14688 fi
14689
14690 fi
14691 fi
14692
14693 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14694 if test $ac_cv_c_bigendian = yes; then
14695   cat >> confdefs.h <<\EOF
14696 #define WORDS_BIGENDIAN 1
14697 EOF
14698
14699 fi
14700
14701 fi
14702
14703 echo $ac_n "checking size of short""... $ac_c" 1>&6
14704 echo "configure:14705: checking size of short" >&5 
14705 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14706   echo $ac_n "(cached) $ac_c" 1>&6
14707 else
14708   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14709   cat > conftest.$ac_ext <<EOF
14710 #line 14711 "configure"
14711 #include "confdefs.h"
14712 #include "confdefs.h" 
14713 #include <sys/types.h> 
14714  
14715
14716 int main() {
14717 switch (0) case 0: case (sizeof (short) == $ac_size):;
14718 ; return 0; }
14719 EOF
14720 if { (eval echo configure:14721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14721   rm -rf conftest*
14722   ac_cv_sizeof_short=$ac_size
14723 else
14724   echo "configure: failed program was:" >&5
14725   cat conftest.$ac_ext >&5
14726 fi
14727 rm -f conftest* 
14728   if test x$ac_cv_sizeof_short != x ; then break; fi 
14729 done 
14730
14731 fi
14732  
14733 if test x$ac_cv_sizeof_short = x ; then 
14734   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14735 fi 
14736 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14737 cat >> confdefs.h <<EOF
14738 #define SIZEOF_SHORT $ac_cv_sizeof_short
14739 EOF
14740  
14741  
14742 echo $ac_n "checking size of int""... $ac_c" 1>&6
14743 echo "configure:14744: checking size of int" >&5 
14744 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14745   echo $ac_n "(cached) $ac_c" 1>&6
14746 else
14747   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14748   cat > conftest.$ac_ext <<EOF
14749 #line 14750 "configure"
14750 #include "confdefs.h"
14751 #include "confdefs.h" 
14752 #include <sys/types.h> 
14753  
14754
14755 int main() {
14756 switch (0) case 0: case (sizeof (int) == $ac_size):;
14757 ; return 0; }
14758 EOF
14759 if { (eval echo configure:14760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14760   rm -rf conftest*
14761   ac_cv_sizeof_int=$ac_size
14762 else
14763   echo "configure: failed program was:" >&5
14764   cat conftest.$ac_ext >&5
14765 fi
14766 rm -f conftest* 
14767   if test x$ac_cv_sizeof_int != x ; then break; fi 
14768 done 
14769
14770 fi
14771  
14772 if test x$ac_cv_sizeof_int = x ; then 
14773   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14774 fi 
14775 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14776 cat >> confdefs.h <<EOF
14777 #define SIZEOF_INT $ac_cv_sizeof_int
14778 EOF
14779  
14780  
14781 echo $ac_n "checking size of long""... $ac_c" 1>&6
14782 echo "configure:14783: checking size of long" >&5 
14783 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14784   echo $ac_n "(cached) $ac_c" 1>&6
14785 else
14786   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14787   cat > conftest.$ac_ext <<EOF
14788 #line 14789 "configure"
14789 #include "confdefs.h"
14790 #include "confdefs.h" 
14791 #include <sys/types.h> 
14792  
14793
14794 int main() {
14795 switch (0) case 0: case (sizeof (long) == $ac_size):;
14796 ; return 0; }
14797 EOF
14798 if { (eval echo configure:14799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14799   rm -rf conftest*
14800   ac_cv_sizeof_long=$ac_size
14801 else
14802   echo "configure: failed program was:" >&5
14803   cat conftest.$ac_ext >&5
14804 fi
14805 rm -f conftest* 
14806   if test x$ac_cv_sizeof_long != x ; then break; fi 
14807 done 
14808
14809 fi
14810  
14811 if test x$ac_cv_sizeof_long = x ; then 
14812   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14813 fi 
14814 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14815 cat >> confdefs.h <<EOF
14816 #define SIZEOF_LONG $ac_cv_sizeof_long
14817 EOF
14818  
14819
14820
14821 if test "$ac_cv_sizeof_int" -lt 4 ; then
14822         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14823
14824         cat >> confdefs.h <<\EOF
14825 #define LBER_INT_T long
14826 EOF
14827
14828 else
14829         cat >> confdefs.h <<\EOF
14830 #define LBER_INT_T int
14831 EOF
14832
14833 fi
14834
14835 cat >> confdefs.h <<\EOF
14836 #define LBER_LEN_T long
14837 EOF
14838
14839 cat >> confdefs.h <<\EOF
14840 #define LBER_SOCKET_T int
14841 EOF
14842
14843 cat >> confdefs.h <<\EOF
14844 #define LBER_TAG_T long
14845 EOF
14846
14847
14848 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14849 echo "configure:14850: checking for 8-bit clean memcmp" >&5
14850 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14851   echo $ac_n "(cached) $ac_c" 1>&6
14852 else
14853   if test "$cross_compiling" = yes; then
14854   ac_cv_func_memcmp_clean=no
14855 else
14856   cat > conftest.$ac_ext <<EOF
14857 #line 14858 "configure"
14858 #include "confdefs.h"
14859
14860 main()
14861 {
14862   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14863   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14864 }
14865
14866 EOF
14867 if { (eval echo configure:14868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14868 then
14869   ac_cv_func_memcmp_clean=yes
14870 else
14871   echo "configure: failed program was:" >&5
14872   cat conftest.$ac_ext >&5
14873   rm -fr conftest*
14874   ac_cv_func_memcmp_clean=no
14875 fi
14876 rm -fr conftest*
14877 fi
14878
14879 fi
14880
14881 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14882 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14883
14884 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14885 echo "configure:14886: checking for strftime" >&5
14886 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14887   echo $ac_n "(cached) $ac_c" 1>&6
14888 else
14889   cat > conftest.$ac_ext <<EOF
14890 #line 14891 "configure"
14891 #include "confdefs.h"
14892 /* System header to define __stub macros and hopefully few prototypes,
14893     which can conflict with char strftime(); below.  */
14894 #include <assert.h>
14895 /* Override any gcc2 internal prototype to avoid an error.  */
14896 /* We use char because int might match the return type of a gcc2
14897     builtin and then its argument prototype would still apply.  */
14898 char strftime();
14899 char (*f)();
14900
14901 int main() {
14902
14903 /* The GNU C library defines this for functions which it implements
14904     to always fail with ENOSYS.  Some functions are actually named
14905     something starting with __ and the normal name is an alias.  */
14906 #if defined (__stub_strftime) || defined (__stub___strftime)
14907 choke me
14908 #else
14909 f = strftime;
14910 #endif
14911
14912 ; return 0; }
14913 EOF
14914 if { (eval echo configure:14915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14915   rm -rf conftest*
14916   eval "ac_cv_func_strftime=yes"
14917 else
14918   echo "configure: failed program was:" >&5
14919   cat conftest.$ac_ext >&5
14920   rm -rf conftest*
14921   eval "ac_cv_func_strftime=no"
14922 fi
14923 rm -f conftest*
14924 fi
14925
14926 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14927   echo "$ac_t""yes" 1>&6
14928   cat >> confdefs.h <<\EOF
14929 #define HAVE_STRFTIME 1
14930 EOF
14931
14932 else
14933   echo "$ac_t""no" 1>&6
14934 # strftime is in -lintl on SCO UNIX.
14935 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14936 echo "configure:14937: checking for strftime in -lintl" >&5
14937 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14939   echo $ac_n "(cached) $ac_c" 1>&6
14940 else
14941   ac_save_LIBS="$LIBS"
14942 LIBS="-lintl  $LIBS"
14943 cat > conftest.$ac_ext <<EOF
14944 #line 14945 "configure"
14945 #include "confdefs.h"
14946 /* Override any gcc2 internal prototype to avoid an error.  */
14947 /* We use char because int might match the return type of a gcc2
14948     builtin and then its argument prototype would still apply.  */
14949 char strftime();
14950
14951 int main() {
14952 strftime()
14953 ; return 0; }
14954 EOF
14955 if { (eval echo configure:14956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14956   rm -rf conftest*
14957   eval "ac_cv_lib_$ac_lib_var=yes"
14958 else
14959   echo "configure: failed program was:" >&5
14960   cat conftest.$ac_ext >&5
14961   rm -rf conftest*
14962   eval "ac_cv_lib_$ac_lib_var=no"
14963 fi
14964 rm -f conftest*
14965 LIBS="$ac_save_LIBS"
14966
14967 fi
14968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14969   echo "$ac_t""yes" 1>&6
14970   cat >> confdefs.h <<\EOF
14971 #define HAVE_STRFTIME 1
14972 EOF
14973
14974 LIBS="-lintl $LIBS"
14975 else
14976   echo "$ac_t""no" 1>&6
14977 fi
14978
14979 fi
14980
14981
14982 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14983 echo "configure:14984: checking for inet_aton()" >&5
14984 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14985   echo $ac_n "(cached) $ac_c" 1>&6
14986 else
14987   cat > conftest.$ac_ext <<EOF
14988 #line 14989 "configure"
14989 #include "confdefs.h"
14990
14991 #ifdef HAVE_SYS_TYPES_H
14992 #       include <sys/types.h>
14993 #endif
14994 #ifdef HAVE_SYS_SOCKET_H
14995 #       include <sys/socket.h>
14996 #       ifdef HAVE_SYS_SELECT_H
14997 #               include <sys/select.h>
14998 #       endif
14999 #       include <netinet/in.h>
15000 #       ifdef HAVE_ARPA_INET_H
15001 #               include <arpa/inet.h>
15002 #       endif
15003 #endif
15004
15005 int main() {
15006 struct in_addr in;
15007 int rc = inet_aton( "255.255.255.255", &in );
15008 ; return 0; }
15009 EOF
15010 if { (eval echo configure:15011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15011   rm -rf conftest*
15012   ol_cv_func_inet_aton=yes
15013 else
15014   echo "configure: failed program was:" >&5
15015   cat conftest.$ac_ext >&5
15016   rm -rf conftest*
15017   ol_cv_func_inet_aton=no
15018 fi
15019 rm -f conftest*
15020 fi
15021
15022 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15023   if test $ol_cv_func_inet_aton != no; then
15024     cat >> confdefs.h <<\EOF
15025 #define HAVE_INET_ATON 1
15026 EOF
15027
15028   fi
15029  
15030
15031 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15032 echo "configure:15033: checking for _spawnlp" >&5
15033 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15034   echo $ac_n "(cached) $ac_c" 1>&6
15035 else
15036   cat > conftest.$ac_ext <<EOF
15037 #line 15038 "configure"
15038 #include "confdefs.h"
15039 /* System header to define __stub macros and hopefully few prototypes,
15040     which can conflict with char _spawnlp(); below.  */
15041 #include <assert.h>
15042 /* Override any gcc2 internal prototype to avoid an error.  */
15043 /* We use char because int might match the return type of a gcc2
15044     builtin and then its argument prototype would still apply.  */
15045 char _spawnlp();
15046 char (*f)();
15047
15048 int main() {
15049
15050 /* The GNU C library defines this for functions which it implements
15051     to always fail with ENOSYS.  Some functions are actually named
15052     something starting with __ and the normal name is an alias.  */
15053 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15054 choke me
15055 #else
15056 f = _spawnlp;
15057 #endif
15058
15059 ; return 0; }
15060 EOF
15061 if { (eval echo configure:15062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15062   rm -rf conftest*
15063   eval "ac_cv_func__spawnlp=yes"
15064 else
15065   echo "configure: failed program was:" >&5
15066   cat conftest.$ac_ext >&5
15067   rm -rf conftest*
15068   eval "ac_cv_func__spawnlp=no"
15069 fi
15070 rm -f conftest*
15071 fi
15072
15073 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15074   echo "$ac_t""yes" 1>&6
15075   cat >> confdefs.h <<\EOF
15076 #define HAVE_SPAWNLP 1
15077 EOF
15078
15079 else
15080   echo "$ac_t""no" 1>&6
15081 fi
15082
15083
15084 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15085 echo "configure:15086: checking for _snprintf" >&5
15086 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15087   echo $ac_n "(cached) $ac_c" 1>&6
15088 else
15089   cat > conftest.$ac_ext <<EOF
15090 #line 15091 "configure"
15091 #include "confdefs.h"
15092 /* System header to define __stub macros and hopefully few prototypes,
15093     which can conflict with char _snprintf(); below.  */
15094 #include <assert.h>
15095 /* Override any gcc2 internal prototype to avoid an error.  */
15096 /* We use char because int might match the return type of a gcc2
15097     builtin and then its argument prototype would still apply.  */
15098 char _snprintf();
15099 char (*f)();
15100
15101 int main() {
15102
15103 /* The GNU C library defines this for functions which it implements
15104     to always fail with ENOSYS.  Some functions are actually named
15105     something starting with __ and the normal name is an alias.  */
15106 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15107 choke me
15108 #else
15109 f = _snprintf;
15110 #endif
15111
15112 ; return 0; }
15113 EOF
15114 if { (eval echo configure:15115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15115   rm -rf conftest*
15116   eval "ac_cv_func__snprintf=yes"
15117 else
15118   echo "configure: failed program was:" >&5
15119   cat conftest.$ac_ext >&5
15120   rm -rf conftest*
15121   eval "ac_cv_func__snprintf=no"
15122 fi
15123 rm -f conftest*
15124 fi
15125
15126 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15127   echo "$ac_t""yes" 1>&6
15128   ac_cv_func_snprintf=yes
15129         cat >> confdefs.h <<\EOF
15130 #define snprintf _snprintf
15131 EOF
15132
15133
15134 else
15135   echo "$ac_t""no" 1>&6
15136 fi
15137
15138
15139 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15140 echo "configure:15141: checking for _vsnprintf" >&5
15141 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15142   echo $ac_n "(cached) $ac_c" 1>&6
15143 else
15144   cat > conftest.$ac_ext <<EOF
15145 #line 15146 "configure"
15146 #include "confdefs.h"
15147 /* System header to define __stub macros and hopefully few prototypes,
15148     which can conflict with char _vsnprintf(); below.  */
15149 #include <assert.h>
15150 /* Override any gcc2 internal prototype to avoid an error.  */
15151 /* We use char because int might match the return type of a gcc2
15152     builtin and then its argument prototype would still apply.  */
15153 char _vsnprintf();
15154 char (*f)();
15155
15156 int main() {
15157
15158 /* The GNU C library defines this for functions which it implements
15159     to always fail with ENOSYS.  Some functions are actually named
15160     something starting with __ and the normal name is an alias.  */
15161 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15162 choke me
15163 #else
15164 f = _vsnprintf;
15165 #endif
15166
15167 ; return 0; }
15168 EOF
15169 if { (eval echo configure:15170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15170   rm -rf conftest*
15171   eval "ac_cv_func__vsnprintf=yes"
15172 else
15173   echo "configure: failed program was:" >&5
15174   cat conftest.$ac_ext >&5
15175   rm -rf conftest*
15176   eval "ac_cv_func__vsnprintf=no"
15177 fi
15178 rm -f conftest*
15179 fi
15180
15181 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15182   echo "$ac_t""yes" 1>&6
15183   ac_cv_func_vsnprintf=yes
15184         cat >> confdefs.h <<\EOF
15185 #define vsnprintf _vsnprintf
15186 EOF
15187
15188
15189 else
15190   echo "$ac_t""no" 1>&6
15191 fi
15192
15193
15194 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15195 echo "configure:15196: checking for vprintf" >&5
15196 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15197   echo $ac_n "(cached) $ac_c" 1>&6
15198 else
15199   cat > conftest.$ac_ext <<EOF
15200 #line 15201 "configure"
15201 #include "confdefs.h"
15202 /* System header to define __stub macros and hopefully few prototypes,
15203     which can conflict with char vprintf(); below.  */
15204 #include <assert.h>
15205 /* Override any gcc2 internal prototype to avoid an error.  */
15206 /* We use char because int might match the return type of a gcc2
15207     builtin and then its argument prototype would still apply.  */
15208 char vprintf();
15209 char (*f)();
15210
15211 int main() {
15212
15213 /* The GNU C library defines this for functions which it implements
15214     to always fail with ENOSYS.  Some functions are actually named
15215     something starting with __ and the normal name is an alias.  */
15216 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15217 choke me
15218 #else
15219 f = vprintf;
15220 #endif
15221
15222 ; return 0; }
15223 EOF
15224 if { (eval echo configure:15225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15225   rm -rf conftest*
15226   eval "ac_cv_func_vprintf=yes"
15227 else
15228   echo "configure: failed program was:" >&5
15229   cat conftest.$ac_ext >&5
15230   rm -rf conftest*
15231   eval "ac_cv_func_vprintf=no"
15232 fi
15233 rm -f conftest*
15234 fi
15235
15236 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15237   echo "$ac_t""yes" 1>&6
15238   cat >> confdefs.h <<\EOF
15239 #define HAVE_VPRINTF 1
15240 EOF
15241
15242 else
15243   echo "$ac_t""no" 1>&6
15244 fi
15245
15246 if test "$ac_cv_func_vprintf" != yes; then
15247 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15248 echo "configure:15249: checking for _doprnt" >&5
15249 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15250   echo $ac_n "(cached) $ac_c" 1>&6
15251 else
15252   cat > conftest.$ac_ext <<EOF
15253 #line 15254 "configure"
15254 #include "confdefs.h"
15255 /* System header to define __stub macros and hopefully few prototypes,
15256     which can conflict with char _doprnt(); below.  */
15257 #include <assert.h>
15258 /* Override any gcc2 internal prototype to avoid an error.  */
15259 /* We use char because int might match the return type of a gcc2
15260     builtin and then its argument prototype would still apply.  */
15261 char _doprnt();
15262 char (*f)();
15263
15264 int main() {
15265
15266 /* The GNU C library defines this for functions which it implements
15267     to always fail with ENOSYS.  Some functions are actually named
15268     something starting with __ and the normal name is an alias.  */
15269 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15270 choke me
15271 #else
15272 f = _doprnt;
15273 #endif
15274
15275 ; return 0; }
15276 EOF
15277 if { (eval echo configure:15278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15278   rm -rf conftest*
15279   eval "ac_cv_func__doprnt=yes"
15280 else
15281   echo "configure: failed program was:" >&5
15282   cat conftest.$ac_ext >&5
15283   rm -rf conftest*
15284   eval "ac_cv_func__doprnt=no"
15285 fi
15286 rm -f conftest*
15287 fi
15288
15289 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15290   echo "$ac_t""yes" 1>&6
15291   cat >> confdefs.h <<\EOF
15292 #define HAVE_DOPRNT 1
15293 EOF
15294
15295 else
15296   echo "$ac_t""no" 1>&6
15297 fi
15298
15299 fi
15300
15301
15302 if test $ac_cv_func_vprintf = yes ; then
15303                 for ac_func in vsnprintf vsprintf
15304 do
15305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15306 echo "configure:15307: checking for $ac_func" >&5
15307 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15308   echo $ac_n "(cached) $ac_c" 1>&6
15309 else
15310   cat > conftest.$ac_ext <<EOF
15311 #line 15312 "configure"
15312 #include "confdefs.h"
15313 /* System header to define __stub macros and hopefully few prototypes,
15314     which can conflict with char $ac_func(); below.  */
15315 #include <assert.h>
15316 /* Override any gcc2 internal prototype to avoid an error.  */
15317 /* We use char because int might match the return type of a gcc2
15318     builtin and then its argument prototype would still apply.  */
15319 char $ac_func();
15320 char (*f)();
15321
15322 int main() {
15323
15324 /* The GNU C library defines this for functions which it implements
15325     to always fail with ENOSYS.  Some functions are actually named
15326     something starting with __ and the normal name is an alias.  */
15327 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15328 choke me
15329 #else
15330 f = $ac_func;
15331 #endif
15332
15333 ; return 0; }
15334 EOF
15335 if { (eval echo configure:15336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15336   rm -rf conftest*
15337   eval "ac_cv_func_$ac_func=yes"
15338 else
15339   echo "configure: failed program was:" >&5
15340   cat conftest.$ac_ext >&5
15341   rm -rf conftest*
15342   eval "ac_cv_func_$ac_func=no"
15343 fi
15344 rm -f conftest*
15345 fi
15346
15347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15348   echo "$ac_t""yes" 1>&6
15349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15350   cat >> confdefs.h <<EOF
15351 #define $ac_tr_func 1
15352 EOF
15353  
15354 else
15355   echo "$ac_t""no" 1>&6
15356 fi
15357 done
15358
15359 fi
15360
15361 for ac_func in \
15362         bcopy                   \
15363         closesocket             \
15364         chroot                  \
15365         endgrent                \
15366         endpwent                \
15367         flock                   \
15368         getdtablesize   \
15369         getgrgid                \
15370         gethostname             \
15371         getpass                 \
15372         getpassphrase   \
15373         getpwuid                \
15374         getpwnam                \
15375         getspnam                \
15376         gettimeofday    \
15377         initgroups              \
15378         lockf                   \
15379         memcpy                  \
15380         memmove                 \
15381         mkstemp                 \
15382         pipe                    \
15383         read                    \
15384         recv                    \
15385         recvfrom                \
15386         setpwfile               \
15387         setgid                  \
15388         setegid                 \
15389         setsid                  \
15390         setuid                  \
15391         seteuid                 \
15392         sigaction               \
15393         signal                  \
15394         sigset                  \
15395         snprintf                \
15396         strdup                  \
15397         strerror                \
15398         strpbrk                 \
15399         strrchr                 \
15400         strsep                  \
15401         strstr                  \
15402         strtol                  \
15403         strtoul                 \
15404         strspn                  \
15405         sysconf                 \
15406         waitpid                 \
15407         wait4                   \
15408         write                   \
15409         send                    \
15410         sendto                  \
15411
15412 do
15413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15414 echo "configure:15415: checking for $ac_func" >&5
15415 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15416   echo $ac_n "(cached) $ac_c" 1>&6
15417 else
15418   cat > conftest.$ac_ext <<EOF
15419 #line 15420 "configure"
15420 #include "confdefs.h"
15421 /* System header to define __stub macros and hopefully few prototypes,
15422     which can conflict with char $ac_func(); below.  */
15423 #include <assert.h>
15424 /* Override any gcc2 internal prototype to avoid an error.  */
15425 /* We use char because int might match the return type of a gcc2
15426     builtin and then its argument prototype would still apply.  */
15427 char $ac_func();
15428 char (*f)();
15429
15430 int main() {
15431
15432 /* The GNU C library defines this for functions which it implements
15433     to always fail with ENOSYS.  Some functions are actually named
15434     something starting with __ and the normal name is an alias.  */
15435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15436 choke me
15437 #else
15438 f = $ac_func;
15439 #endif
15440
15441 ; return 0; }
15442 EOF
15443 if { (eval echo configure:15444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15444   rm -rf conftest*
15445   eval "ac_cv_func_$ac_func=yes"
15446 else
15447   echo "configure: failed program was:" >&5
15448   cat conftest.$ac_ext >&5
15449   rm -rf conftest*
15450   eval "ac_cv_func_$ac_func=no"
15451 fi
15452 rm -f conftest*
15453 fi
15454
15455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15456   echo "$ac_t""yes" 1>&6
15457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15458   cat >> confdefs.h <<EOF
15459 #define $ac_tr_func 1
15460 EOF
15461  
15462 else
15463   echo "$ac_t""no" 1>&6
15464 fi
15465 done
15466
15467
15468 for ac_func in getopt tempnam
15469 do
15470 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15471 echo "configure:15472: checking for $ac_func" >&5
15472 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15473   echo $ac_n "(cached) $ac_c" 1>&6
15474 else
15475   cat > conftest.$ac_ext <<EOF
15476 #line 15477 "configure"
15477 #include "confdefs.h"
15478 /* System header to define __stub macros and hopefully few prototypes,
15479     which can conflict with char $ac_func(); below.  */
15480 #include <assert.h>
15481 /* Override any gcc2 internal prototype to avoid an error.  */
15482 /* We use char because int might match the return type of a gcc2
15483     builtin and then its argument prototype would still apply.  */
15484 char $ac_func();
15485 char (*f)();
15486
15487 int main() {
15488
15489 /* The GNU C library defines this for functions which it implements
15490     to always fail with ENOSYS.  Some functions are actually named
15491     something starting with __ and the normal name is an alias.  */
15492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15493 choke me
15494 #else
15495 f = $ac_func;
15496 #endif
15497
15498 ; return 0; }
15499 EOF
15500 if { (eval echo configure:15501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15501   rm -rf conftest*
15502   eval "ac_cv_func_$ac_func=yes"
15503 else
15504   echo "configure: failed program was:" >&5
15505   cat conftest.$ac_ext >&5
15506   rm -rf conftest*
15507   eval "ac_cv_func_$ac_func=no"
15508 fi
15509 rm -f conftest*
15510 fi
15511
15512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15513   echo "$ac_t""yes" 1>&6
15514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15515   cat >> confdefs.h <<EOF
15516 #define $ac_tr_func 1
15517 EOF
15518  
15519 else
15520   echo "$ac_t""no" 1>&6
15521 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15522 fi
15523 done
15524
15525
15526
15527 if test "$ac_cv_func_getopt" != yes; then
15528     LIBSRCS="$LIBSRCS getopt.c"
15529 fi
15530
15531 if test "$ac_cv_func_tempnam" != yes; then
15532     LIBSRCS="$LIBSRCS tempnam.c"
15533 fi
15534
15535 # Check Configuration
15536 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15537 echo "configure:15538: checking declaration of sys_errlist" >&5
15538 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15539   echo $ac_n "(cached) $ac_c" 1>&6
15540 else
15541   
15542         cat > conftest.$ac_ext <<EOF
15543 #line 15544 "configure"
15544 #include "confdefs.h"
15545
15546 #include <stdio.h>
15547 #include <sys/types.h>
15548 #include <errno.h>
15549 #ifdef WINNT
15550 #include <stdlib.h>
15551 #endif 
15552 int main() {
15553 char *c = (char *) *sys_errlist
15554 ; return 0; }
15555 EOF
15556 if { (eval echo configure:15557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15557   rm -rf conftest*
15558   ol_cv_dcl_sys_errlist=yes
15559         ol_cv_have_sys_errlist=yes
15560 else
15561   echo "configure: failed program was:" >&5
15562   cat conftest.$ac_ext >&5
15563   rm -rf conftest*
15564   ol_cv_dcl_sys_errlist=no
15565 fi
15566 rm -f conftest*
15567 fi
15568
15569 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15570 #
15571 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15572 if test $ol_cv_dcl_sys_errlist = no ; then
15573         cat >> confdefs.h <<\EOF
15574 #define DECL_SYS_ERRLIST 1
15575 EOF
15576
15577
15578         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15579 echo "configure:15580: checking existence of sys_errlist" >&5
15580 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15581   echo $ac_n "(cached) $ac_c" 1>&6
15582 else
15583   
15584                 cat > conftest.$ac_ext <<EOF
15585 #line 15586 "configure"
15586 #include "confdefs.h"
15587 #include <errno.h>
15588 int main() {
15589 char *c = (char *) *sys_errlist
15590 ; return 0; }
15591 EOF
15592 if { (eval echo configure:15593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15593   rm -rf conftest*
15594   ol_cv_have_sys_errlist=yes
15595 else
15596   echo "configure: failed program was:" >&5
15597   cat conftest.$ac_ext >&5
15598   rm -rf conftest*
15599   ol_cv_have_sys_errlist=no
15600 fi
15601 rm -f conftest*
15602 fi
15603
15604 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15605 fi
15606 if test $ol_cv_have_sys_errlist = yes ; then
15607         cat >> confdefs.h <<\EOF
15608 #define HAVE_SYS_ERRLIST 1
15609 EOF
15610
15611 fi
15612
15613
15614
15615 if test "$ol_enable_debug" != no ; then
15616         cat >> confdefs.h <<\EOF
15617 #define LDAP_DEBUG 1
15618 EOF
15619
15620 fi
15621 if test "$ol_enable_syslog" = yes ; then
15622         cat >> confdefs.h <<\EOF
15623 #define LDAP_SYSLOG 1
15624 EOF
15625
15626 fi
15627 if test "$ol_enable_libui" = yes ; then
15628         cat >> confdefs.h <<\EOF
15629 #define LDAP_LIBUI 1
15630 EOF
15631
15632 fi
15633 if test "$ol_enable_cache" = no ; then
15634         cat >> confdefs.h <<\EOF
15635 #define LDAP_NOCACHE 1
15636 EOF
15637
15638 fi
15639 if test "$ol_link_kbind" != no ; then
15640         cat >> confdefs.h <<\EOF
15641 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15642 EOF
15643
15644 fi
15645 if test "$ol_enable_proctitle" != no ; then
15646         cat >> confdefs.h <<\EOF
15647 #define LDAP_PROCTITLE 1
15648 EOF
15649
15650 fi
15651 if test "$ol_enable_referrals" != no ; then
15652         cat >> confdefs.h <<\EOF
15653 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15654 EOF
15655
15656 fi
15657 if test "$ol_enable_local" != no; then
15658         cat >> confdefs.h <<\EOF
15659 #define LDAP_PF_LOCAL 1
15660 EOF
15661
15662 fi
15663 if test "$ol_link_ipv6" != no; then
15664         cat >> confdefs.h <<\EOF
15665 #define LDAP_PF_INET6 1
15666 EOF
15667
15668 fi
15669 if test "$ol_enable_cleartext" != no ; then
15670         cat >> confdefs.h <<\EOF
15671 #define SLAPD_CLEARTEXT 1
15672 EOF
15673
15674 fi
15675 if test "$ol_enable_crypt" != no ; then
15676         cat >> confdefs.h <<\EOF
15677 #define SLAPD_CRYPT 1
15678 EOF
15679
15680 fi
15681 if test "$ol_link_kpasswd" != no ; then
15682         cat >> confdefs.h <<\EOF
15683 #define SLAPD_KPASSWD 1
15684 EOF
15685
15686 fi
15687 if test "$ol_link_spasswd" != no ; then
15688         cat >> confdefs.h <<\EOF
15689 #define SLAPD_SPASSWD 1
15690 EOF
15691
15692 fi
15693 if test "$ol_enable_phonetic" != no ; then
15694         cat >> confdefs.h <<\EOF
15695 #define SLAPD_PHONETIC 1
15696 EOF
15697
15698 fi
15699 if test "$ol_enable_rlookups" != no ; then
15700         cat >> confdefs.h <<\EOF
15701 #define SLAPD_RLOOKUPS 1
15702 EOF
15703
15704 fi
15705 if test "$ol_enable_aci" != no ; then
15706         cat >> confdefs.h <<\EOF
15707 #define SLAPD_ACI_ENABLED 1
15708 EOF
15709
15710 fi
15711
15712 if test "$ol_link_modules" != no ; then
15713         cat >> confdefs.h <<\EOF
15714 #define SLAPD_MODULES 1
15715 EOF
15716
15717         BUILD_SLAPD=yes
15718         SLAPD_MODULES_LDFLAGS="-dlopen self"
15719 fi
15720
15721 if test "$ol_link_dnssrv" != no ; then
15722         cat >> confdefs.h <<\EOF
15723 #define SLAPD_DNSSRV 1
15724 EOF
15725
15726         BUILD_SLAPD=yes
15727         BUILD_DNSSRV=yes
15728         if test "$ol_with_dnssrv_module" != static ; then
15729                 cat >> confdefs.h <<\EOF
15730 #define SLAPD_DNSSRV_DYNAMIC 1
15731 EOF
15732
15733                 BUILD_DNSSRV=mod
15734                 BUILD_DNSSRV_DYNAMIC=shared
15735                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15736         fi
15737 fi
15738
15739 if test "$ol_enable_ldap" != no ; then
15740         cat >> confdefs.h <<\EOF
15741 #define SLAPD_LDAP 1
15742 EOF
15743
15744         BUILD_SLAPD=yes
15745         BUILD_LDAP=yes
15746         if test "$ol_with_ldap_module" != static ; then
15747                 cat >> confdefs.h <<\EOF
15748 #define SLAPD_LDAP_DYNAMIC 1
15749 EOF
15750
15751                 BUILD_LDAP=mod
15752                 BUILD_LDAP_DYNAMIC=shared
15753                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15754         fi
15755 fi
15756
15757 if test "$ol_link_ldbm" != no ; then
15758         cat >> confdefs.h <<\EOF
15759 #define SLAPD_LDBM 1
15760 EOF
15761
15762         BUILD_SLAPD=yes
15763         BUILD_LDBM=yes
15764         if test "$ol_with_ldbm_module" != static ; then
15765                 cat >> confdefs.h <<\EOF
15766 #define SLAPD_LDBM_DYNAMIC 1
15767 EOF
15768
15769                 BUILD_LDBM=mod
15770                 BUILD_LDBM_DYNAMIC=shared
15771                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15772         fi
15773 fi
15774
15775 if test "$ol_enable_passwd" != no ; then
15776         cat >> confdefs.h <<\EOF
15777 #define SLAPD_PASSWD 1
15778 EOF
15779
15780         BUILD_SLAPD=yes
15781         BUILD_PASSWD=yes
15782         if test "$ol_with_passwd_module" != static ; then
15783                 cat >> confdefs.h <<\EOF
15784 #define SLAPD_PASSWD_DYNAMIC 1
15785 EOF
15786
15787                 BUILD_PASSWD=mod
15788                 BUILD_PASSWD_DYNAMIC=shared
15789                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15790         fi
15791 fi
15792
15793 if test "$ol_enable_shell" != no ; then
15794         cat >> confdefs.h <<\EOF
15795 #define SLAPD_SHELL 1
15796 EOF
15797
15798         BUILD_SLAPD=yes
15799         BUILD_SHELL=yes
15800         if test "$ol_with_shell_module" != static ; then
15801                 cat >> confdefs.h <<\EOF
15802 #define SLAPD_SHELL_DYNAMIC 1
15803 EOF
15804
15805                 BUILD_SHELL=mod
15806                 BUILD_SHELL_DYNAMIC=shared
15807                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15808         fi
15809 fi
15810
15811 if test "$ol_enable_sql" != no ; then
15812         cat >> confdefs.h <<\EOF
15813 #define SLAPD_SQL 1
15814 EOF
15815
15816         BUILD_SLAPD=yes
15817         BUILD_SQL=yes
15818         if test "$ol_with_sql_module" != static; then
15819                 cat >> confdefs.h <<\EOF
15820 #define SLAPD_SQL_DYNAMIC 1
15821 EOF
15822
15823                 BUILD_SQL=mod
15824                 BUILD_SQL_DYNAMIC=shared
15825                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15826         fi
15827 fi
15828
15829 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15830         $BUILD_SLAPD = yes ; then
15831         BUILD_SLURPD=yes
15832 fi
15833
15834
15835 if test "$LINK_BINS_DYNAMIC" = yes; then
15836     LIB_LINKAGE=DYN
15837     LT_LIB_LINKAGE=shared
15838 else
15839     LIB_LINKAGE=STAT
15840     LT_LIB_LINKAGE=static
15841 fi
15842
15843 if test "$ac_cv_mingw32" = yes ; then
15844     PLAT=NT
15845     DYN_EXT=dll
15846 else
15847     PLAT=UNIX
15848     DYN_EXT=so
15849 fi
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
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901 trap '' 1 2 15
15902
15903 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15904
15905 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15906 # Let make expand exec_prefix.
15907 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15908
15909 # Any assignment to VPATH causes Sun make to only execute
15910 # the first set of double-colon rules, so remove it if not needed.
15911 # If there is a colon in the path, we need to keep it.
15912 if test "x$srcdir" = x.; then
15913   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15914 fi
15915
15916 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15917
15918 DEFS=-DHAVE_CONFIG_H
15919
15920 # Without the "./", some shells look in PATH for config.status.
15921 : ${CONFIG_STATUS=./config.status}
15922
15923 echo creating $CONFIG_STATUS
15924 rm -f $CONFIG_STATUS
15925 cat > $CONFIG_STATUS <<EOF
15926 #! /bin/sh
15927 # Generated automatically by configure.
15928 # Run this file to recreate the current configuration.
15929 # This directory was configured as follows,
15930 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15931 #
15932 # $0 $ac_configure_args
15933 #
15934 # Compiler output produced by configure, useful for debugging
15935 # configure, is in ./config.log if it exists.
15936
15937 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15938 for ac_option
15939 do
15940   case "\$ac_option" in
15941   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15942     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15943     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15944   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15945     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15946     exit 0 ;;
15947   -help | --help | --hel | --he | --h)
15948     echo "\$ac_cs_usage"; exit 0 ;;
15949   *) echo "\$ac_cs_usage"; exit 1 ;;
15950   esac
15951 done
15952
15953 ac_given_srcdir=$srcdir
15954 ac_given_INSTALL="$INSTALL"
15955
15956 trap 'rm -fr `echo "\
15957 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15958 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15959 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15960 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15961 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15962 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15963 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15964 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15965 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15966 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15967 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15968 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15969 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15970 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15971 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15972 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15973 include/Makefile:build/top.mk:include/Makefile.in \
15974 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15975 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15976 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15977 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15978 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15979 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15980 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15981 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15982 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15983 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15984 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15985 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15986 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15987 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15988 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15989 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15990 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15991 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15992 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15993 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15994 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15995 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15996 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15997 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15998  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15999 EOF
16000 cat >> $CONFIG_STATUS <<EOF
16001
16002 # Protect against being on the right side of a sed subst in config.status.
16003 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16004  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16005 $ac_vpsub
16006 $extrasub
16007 s%@SHELL@%$SHELL%g
16008 s%@CFLAGS@%$CFLAGS%g
16009 s%@CPPFLAGS@%$CPPFLAGS%g
16010 s%@CXXFLAGS@%$CXXFLAGS%g
16011 s%@FFLAGS@%$FFLAGS%g
16012 s%@DEFS@%$DEFS%g
16013 s%@LDFLAGS@%$LDFLAGS%g
16014 s%@LIBS@%$LIBS%g
16015 s%@exec_prefix@%$exec_prefix%g
16016 s%@prefix@%$prefix%g
16017 s%@program_transform_name@%$program_transform_name%g
16018 s%@bindir@%$bindir%g
16019 s%@sbindir@%$sbindir%g
16020 s%@libexecdir@%$libexecdir%g
16021 s%@datadir@%$datadir%g
16022 s%@sysconfdir@%$sysconfdir%g
16023 s%@sharedstatedir@%$sharedstatedir%g
16024 s%@localstatedir@%$localstatedir%g
16025 s%@libdir@%$libdir%g
16026 s%@includedir@%$includedir%g
16027 s%@oldincludedir@%$oldincludedir%g
16028 s%@infodir@%$infodir%g
16029 s%@mandir@%$mandir%g
16030 s%@host@%$host%g
16031 s%@host_alias@%$host_alias%g
16032 s%@host_cpu@%$host_cpu%g
16033 s%@host_vendor@%$host_vendor%g
16034 s%@host_os@%$host_os%g
16035 s%@target@%$target%g
16036 s%@target_alias@%$target_alias%g
16037 s%@target_cpu@%$target_cpu%g
16038 s%@target_vendor@%$target_vendor%g
16039 s%@target_os@%$target_os%g
16040 s%@build@%$build%g
16041 s%@build_alias@%$build_alias%g
16042 s%@build_cpu@%$build_cpu%g
16043 s%@build_vendor@%$build_vendor%g
16044 s%@build_os@%$build_os%g
16045 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16046 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16047 s%@INSTALL_DATA@%$INSTALL_DATA%g
16048 s%@PACKAGE@%$PACKAGE%g
16049 s%@VERSION@%$VERSION%g
16050 s%@ACLOCAL@%$ACLOCAL%g
16051 s%@AUTOCONF@%$AUTOCONF%g
16052 s%@AUTOMAKE@%$AUTOMAKE%g
16053 s%@AUTOHEADER@%$AUTOHEADER%g
16054 s%@MAKEINFO@%$MAKEINFO%g
16055 s%@install_sh@%$install_sh%g
16056 s%@AMTAR@%$AMTAR%g
16057 s%@AWK@%$AWK%g
16058 s%@AMTARFLAGS@%$AMTARFLAGS%g
16059 s%@SET_MAKE@%$SET_MAKE%g
16060 s%@top_builddir@%$top_builddir%g
16061 s%@ldap_subdir@%$ldap_subdir%g
16062 s%@CC@%$CC%g
16063 s%@RANLIB@%$RANLIB%g
16064 s%@LN_S@%$LN_S%g
16065 s%@DLLTOOL@%$DLLTOOL%g
16066 s%@AS@%$AS%g
16067 s%@OBJDUMP@%$OBJDUMP%g
16068 s%@LIBTOOL@%$LIBTOOL%g
16069 s%@LN_H@%$LN_H%g
16070 s%@SENDMAIL@%$SENDMAIL%g
16071 s%@EDITOR@%$EDITOR%g
16072 s%@FINGER@%$FINGER%g
16073 s%@CPP@%$CPP%g
16074 s%@EXEEXT@%$EXEEXT%g
16075 s%@OBJEXT@%$OBJEXT%g
16076 s%@OL_MKDEP@%$OL_MKDEP%g
16077 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16078 s%@LIBOBJS@%$LIBOBJS%g
16079 s%@LIBSRCS@%$LIBSRCS%g
16080 s%@PLAT@%$PLAT%g
16081 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16082 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16083 s%@DYN_EXT@%$DYN_EXT%g
16084 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16085 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16086 s%@BUILD_LDAP@%$BUILD_LDAP%g
16087 s%@BUILD_LDBM@%$BUILD_LDBM%g
16088 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16089 s%@BUILD_SHELL@%$BUILD_SHELL%g
16090 s%@BUILD_SQL@%$BUILD_SQL%g
16091 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16092 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16093 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16094 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16095 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16096 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16097 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16098 s%@LDAP_LIBS@%$LDAP_LIBS%g
16099 s%@LDIF_LIBS@%$LDIF_LIBS%g
16100 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16101 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16102 s%@LDBM_LIBS@%$LDBM_LIBS%g
16103 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16104 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16105 s%@WRAP_LIBS@%$WRAP_LIBS%g
16106 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16107 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16108 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16109 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16110 s%@KRB4_LIBS@%$KRB4_LIBS%g
16111 s%@KRB5_LIBS@%$KRB5_LIBS%g
16112 s%@READLINE_LIBS@%$READLINE_LIBS%g
16113 s%@SASL_LIBS@%$SASL_LIBS%g
16114 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16115 s%@TLS_LIBS@%$TLS_LIBS%g
16116 s%@MODULES_LIBS@%$MODULES_LIBS%g
16117 s%@AUTH_LIBS@%$AUTH_LIBS%g
16118 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16119 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16120 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16121
16122 CEOF
16123 EOF
16124
16125 cat >> $CONFIG_STATUS <<\EOF
16126
16127 # Split the substitutions into bite-sized pieces for seds with
16128 # small command number limits, like on Digital OSF/1 and HP-UX.
16129 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16130 ac_file=1 # Number of current file.
16131 ac_beg=1 # First line for current file.
16132 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16133 ac_more_lines=:
16134 ac_sed_cmds=""
16135 while $ac_more_lines; do
16136   if test $ac_beg -gt 1; then
16137     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16138   else
16139     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16140   fi
16141   if test ! -s conftest.s$ac_file; then
16142     ac_more_lines=false
16143     rm -f conftest.s$ac_file
16144   else
16145     if test -z "$ac_sed_cmds"; then
16146       ac_sed_cmds="sed -f conftest.s$ac_file"
16147     else
16148       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16149     fi
16150     ac_file=`expr $ac_file + 1`
16151     ac_beg=$ac_end
16152     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16153   fi
16154 done
16155 if test -z "$ac_sed_cmds"; then
16156   ac_sed_cmds=cat
16157 fi
16158 EOF
16159
16160 cat >> $CONFIG_STATUS <<EOF
16161
16162 CONFIG_FILES=\${CONFIG_FILES-"\
16163 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16164 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16165 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16166 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16167 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16168 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16169 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16170 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16171 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16172 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16173 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16174 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16175 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16176 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16177 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16178 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16179 include/Makefile:build/top.mk:include/Makefile.in \
16180 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16181 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16182 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16183 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16184 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16185 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16186 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16187 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16188 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16189 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16190 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16191 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16192 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16193 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16194 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16195 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16196 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16197 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16198 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16199 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16200 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16201 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16202 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16203 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16204 "}
16205 EOF
16206 cat >> $CONFIG_STATUS <<\EOF
16207 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16208   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16209   case "$ac_file" in
16210   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16211        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16212   *) ac_file_in="${ac_file}.in" ;;
16213   esac
16214
16215   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16216
16217   # Remove last slash and all that follows it.  Not all systems have dirname.
16218   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16219   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16220     # The file is in a subdirectory.
16221     test ! -d "$ac_dir" && mkdir "$ac_dir"
16222     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16223     # A "../" for each directory in $ac_dir_suffix.
16224     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16225   else
16226     ac_dir_suffix= ac_dots=
16227   fi
16228
16229   case "$ac_given_srcdir" in
16230   .)  srcdir=.
16231       if test -z "$ac_dots"; then top_srcdir=.
16232       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16233   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16234   *) # Relative path.
16235     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16236     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16237   esac
16238
16239   case "$ac_given_INSTALL" in
16240   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16241   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16242   esac
16243
16244   echo creating "$ac_file"
16245   rm -f "$ac_file"
16246   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16247   case "$ac_file" in
16248   *[Mm]akefile*) ac_comsub="1i\\
16249 # $configure_input" ;;
16250   *) ac_comsub= ;;
16251   esac
16252
16253   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16254   sed -e "$ac_comsub
16255 s%@configure_input@%$configure_input%g
16256 s%@srcdir@%$srcdir%g
16257 s%@top_srcdir@%$top_srcdir%g
16258 s%@INSTALL@%$INSTALL%g
16259 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16260 fi; done
16261 rm -f conftest.s*
16262
16263 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16264 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16265 #
16266 # ac_d sets the value in "#define NAME VALUE" lines.
16267 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16268 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16269 ac_dC='\3'
16270 ac_dD='%g'
16271 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16272 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16273 ac_uB='\([      ]\)%\1#\2define\3'
16274 ac_uC=' '
16275 ac_uD='\4%g'
16276 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16277 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16278 ac_eB='$%\1#\2define\3'
16279 ac_eC=' '
16280 ac_eD='%g'
16281
16282 if test "${CONFIG_HEADERS+set}" != set; then
16283 EOF
16284 cat >> $CONFIG_STATUS <<EOF
16285   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16286 EOF
16287 cat >> $CONFIG_STATUS <<\EOF
16288 fi
16289 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16290   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16291   case "$ac_file" in
16292   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16293        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16294   *) ac_file_in="${ac_file}.in" ;;
16295   esac
16296
16297   echo creating $ac_file
16298
16299   rm -f conftest.frag conftest.in conftest.out
16300   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16301   cat $ac_file_inputs > conftest.in
16302
16303 EOF
16304
16305 # Transform confdefs.h into a sed script conftest.vals that substitutes
16306 # the proper values into config.h.in to produce config.h.  And first:
16307 # Protect against being on the right side of a sed subst in config.status.
16308 # Protect against being in an unquoted here document in config.status.
16309 rm -f conftest.vals
16310 cat > conftest.hdr <<\EOF
16311 s/[\\&%]/\\&/g
16312 s%[\\$`]%\\&%g
16313 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16314 s%ac_d%ac_u%gp
16315 s%ac_u%ac_e%gp
16316 EOF
16317 sed -n -f conftest.hdr confdefs.h > conftest.vals
16318 rm -f conftest.hdr
16319
16320 # This sed command replaces #undef with comments.  This is necessary, for
16321 # example, in the case of _POSIX_SOURCE, which is predefined and required
16322 # on some systems where configure will not decide to define it.
16323 cat >> conftest.vals <<\EOF
16324 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16325 EOF
16326
16327 # Break up conftest.vals because some shells have a limit on
16328 # the size of here documents, and old seds have small limits too.
16329
16330 rm -f conftest.tail
16331 while :
16332 do
16333   ac_lines=`grep -c . conftest.vals`
16334   # grep -c gives empty output for an empty file on some AIX systems.
16335   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16336   # Write a limited-size here document to conftest.frag.
16337   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16338   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16339   echo 'CEOF
16340   sed -f conftest.frag conftest.in > conftest.out
16341   rm -f conftest.in
16342   mv conftest.out conftest.in
16343 ' >> $CONFIG_STATUS
16344   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16345   rm -f conftest.vals
16346   mv conftest.tail conftest.vals
16347 done
16348 rm -f conftest.vals
16349
16350 cat >> $CONFIG_STATUS <<\EOF
16351   rm -f conftest.frag conftest.h
16352   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16353   cat conftest.in >> conftest.h
16354   rm -f conftest.in
16355   if cmp -s $ac_file conftest.h 2>/dev/null; then
16356     echo "$ac_file is unchanged"
16357     rm -f conftest.h
16358   else
16359     # Remove last slash and all that follows it.  Not all systems have dirname.
16360       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16361       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16362       # The file is in a subdirectory.
16363       test ! -d "$ac_dir" && mkdir "$ac_dir"
16364     fi
16365     rm -f $ac_file
16366     mv conftest.h $ac_file
16367   fi
16368 fi; done
16369
16370 EOF
16371 cat >> $CONFIG_STATUS <<EOF
16372
16373 EOF
16374 cat >> $CONFIG_STATUS <<\EOF
16375
16376 date > stamp-h
16377 echo Please \"make depend\" to build dependencies
16378
16379 exit 0
16380 EOF
16381 chmod +x $CONFIG_STATUS
16382 rm -fr confdefs* $ac_clean_files
16383 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16384