]> git.sur5r.net Git - openldap/blob - configure
Import from devel
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.223.2.5 2000/06/13 17:56:59 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals    enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind        enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-ipv6         enable IPv6 support (auto)"
45 ac_help="$ac_help
46   --enable-unix         enable UNIX domain socket support (auto)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --with-cyrus-sasl     with Cyrus SASL support (auto)"
51 ac_help="$ac_help
52   --with-fetch          with fetch URL support (auto)"
53 ac_help="$ac_help
54   --with-kerberos       with support (auto)"
55 ac_help="$ac_help
56   --with-readline       with readline support (auto)"
57 ac_help="$ac_help
58   --with-threads        use threads (auto)"
59 ac_help="$ac_help
60   --with-tls            with TLS/SSL support (auto)"
61 ac_help="$ac_help
62   --with-yielding-select        with implicitly yielding select (auto)"
63 ac_help="$ac_help
64 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd        enable building slapd (yes)"
67 ac_help="$ac_help
68     --enable-cleartext  enable cleartext passwords (yes)"
69 ac_help="$ac_help
70     --enable-crypt      enable crypt(3) passwords (auto)"
71 ac_help="$ac_help
72     --enable-kpasswd    enable kerberos password verification (no)"
73 ac_help="$ac_help
74     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
75 ac_help="$ac_help
76     --enable-modules    enable dynamic module support (no)"
77 ac_help="$ac_help
78     --enable-multimaster        enable multimaster replication (no)"
79 ac_help="$ac_help
80     --enable-phonetic   enable phonetic/soundex (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-wrappers   enable tcp wrapper support (no)"
87 ac_help="$ac_help
88     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
89 ac_help="$ac_help
90     --enable-dnssrv     enable dnssrv backend (no)"
91 ac_help="$ac_help
92       --with-dnssrv-module      module type (static)"
93 ac_help="$ac_help
94     --enable-ldap       enable ldap backend (no)"
95 ac_help="$ac_help
96       --with-ldap-module        module type (static)"
97 ac_help="$ac_help
98     --enable-ldbm       enable ldbm backend (yes)"
99 ac_help="$ac_help
100       --with-ldbm-api   use LDBM API (auto)"
101 ac_help="$ac_help
102       --with-ldbm-module        module type (static)"
103 ac_help="$ac_help
104       --with-ldbm-type  use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd     enable passwd backend (no)"
107 ac_help="$ac_help
108       --with-passwd-module      module type (static)"
109 ac_help="$ac_help
110     --enable-shell      enable shell backend (no)"
111 ac_help="$ac_help
112       --with-shell-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.14a)
633 if (unset 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
1129
1130 cat >> confdefs.h <<EOF
1131 #define OPENLDAP_PACKAGE "$PACKAGE"
1132 EOF
1133
1134 cat >> confdefs.h <<EOF
1135 #define OPENLDAP_VERSION "$VERSION"
1136 EOF
1137
1138
1139
1140
1141 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1142 echo "configure:1143: checking configure arguments" >&5
1143
1144
1145 top_builddir=`pwd`
1146
1147 ldap_subdir="/openldap"
1148
1149 # Check whether --with-subdir or --without-subdir was given.
1150 if test "${with_subdir+set}" = set; then
1151   withval="$with_subdir"
1152   case "$withval" in
1153         no) ldap_subdir=""
1154                 ;;
1155         yes)
1156                 ;;
1157         /*|\\*)
1158                 ldap_subdir="$withval"
1159                 ;;
1160         *)
1161                 ldap_subdir="/$withval"
1162                 ;;
1163 esac
1164
1165 fi
1166
1167
1168 # OpenLDAP --enable-debug
1169         # Check whether --enable-debug or --disable-debug was given.
1170 if test "${enable_debug+set}" = set; then
1171   enableval="$enable_debug"
1172   
1173         ol_arg=invalid
1174         for ol_val in auto yes no ; do
1175                 if test "$enableval" = "$ol_val" ; then
1176                         ol_arg="$ol_val"
1177                 fi
1178         done
1179         if test "$ol_arg" = "invalid" ; then
1180                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1181         fi
1182         ol_enable_debug="$ol_arg"
1183
1184 else
1185         ol_enable_debug="yes"
1186 fi
1187 # end --enable-debug
1188 # OpenLDAP --enable-syslog
1189         # Check whether --enable-syslog or --disable-syslog was given.
1190 if test "${enable_syslog+set}" = set; then
1191   enableval="$enable_syslog"
1192   
1193         ol_arg=invalid
1194         for ol_val in auto yes no ; do
1195                 if test "$enableval" = "$ol_val" ; then
1196                         ol_arg="$ol_val"
1197                 fi
1198         done
1199         if test "$ol_arg" = "invalid" ; then
1200                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1201         fi
1202         ol_enable_syslog="$ol_arg"
1203
1204 else
1205         ol_enable_syslog="auto"
1206 fi
1207 # end --enable-syslog
1208 # OpenLDAP --enable-proctitle
1209         # Check whether --enable-proctitle or --disable-proctitle was given.
1210 if test "${enable_proctitle+set}" = set; then
1211   enableval="$enable_proctitle"
1212   
1213         ol_arg=invalid
1214         for ol_val in auto yes no ; do
1215                 if test "$enableval" = "$ol_val" ; then
1216                         ol_arg="$ol_val"
1217                 fi
1218         done
1219         if test "$ol_arg" = "invalid" ; then
1220                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1221         fi
1222         ol_enable_proctitle="$ol_arg"
1223
1224 else
1225         ol_enable_proctitle="yes"
1226 fi
1227 # end --enable-proctitle
1228 # OpenLDAP --enable-cache
1229         # Check whether --enable-cache or --disable-cache was given.
1230 if test "${enable_cache+set}" = set; then
1231   enableval="$enable_cache"
1232   
1233         ol_arg=invalid
1234         for ol_val in auto yes no ; do
1235                 if test "$enableval" = "$ol_val" ; then
1236                         ol_arg="$ol_val"
1237                 fi
1238         done
1239         if test "$ol_arg" = "invalid" ; then
1240                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1241         fi
1242         ol_enable_cache="$ol_arg"
1243
1244 else
1245         ol_enable_cache="yes"
1246 fi
1247 # end --enable-cache
1248 # OpenLDAP --enable-referrals
1249         # Check whether --enable-referrals or --disable-referrals was given.
1250 if test "${enable_referrals+set}" = set; then
1251   enableval="$enable_referrals"
1252   
1253         ol_arg=invalid
1254         for ol_val in auto yes no ; do
1255                 if test "$enableval" = "$ol_val" ; then
1256                         ol_arg="$ol_val"
1257                 fi
1258         done
1259         if test "$ol_arg" = "invalid" ; then
1260                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1261         fi
1262         ol_enable_referrals="$ol_arg"
1263
1264 else
1265         ol_enable_referrals="yes"
1266 fi
1267 # end --enable-referrals
1268 # OpenLDAP --enable-kbind
1269         # Check whether --enable-kbind or --disable-kbind was given.
1270 if test "${enable_kbind+set}" = set; then
1271   enableval="$enable_kbind"
1272   
1273         ol_arg=invalid
1274         for ol_val in auto yes no ; do
1275                 if test "$enableval" = "$ol_val" ; then
1276                         ol_arg="$ol_val"
1277                 fi
1278         done
1279         if test "$ol_arg" = "invalid" ; then
1280                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1281         fi
1282         ol_enable_kbind="$ol_arg"
1283
1284 else
1285         ol_enable_kbind="auto"
1286 fi
1287 # end --enable-kbind
1288 # OpenLDAP --enable-cldap
1289         # Check whether --enable-cldap or --disable-cldap was given.
1290 if test "${enable_cldap+set}" = set; then
1291   enableval="$enable_cldap"
1292   
1293         ol_arg=invalid
1294         for ol_val in auto yes no ; do
1295                 if test "$enableval" = "$ol_val" ; then
1296                         ol_arg="$ol_val"
1297                 fi
1298         done
1299         if test "$ol_arg" = "invalid" ; then
1300                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1301         fi
1302         ol_enable_cldap="$ol_arg"
1303
1304 else
1305         ol_enable_cldap="no"
1306 fi
1307 # end --enable-cldap
1308 # OpenLDAP --enable-ipv6
1309         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1310 if test "${enable_ipv6+set}" = set; then
1311   enableval="$enable_ipv6"
1312   
1313         ol_arg=invalid
1314         for ol_val in auto yes no ; do
1315                 if test "$enableval" = "$ol_val" ; then
1316                         ol_arg="$ol_val"
1317                 fi
1318         done
1319         if test "$ol_arg" = "invalid" ; then
1320                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1321         fi
1322         ol_enable_ipv6="$ol_arg"
1323
1324 else
1325         ol_enable_ipv6="auto"
1326 fi
1327 # end --enable-ipv6
1328 # OpenLDAP --enable-unix
1329         # Check whether --enable-unix or --disable-unix was given.
1330 if test "${enable_unix+set}" = set; then
1331   enableval="$enable_unix"
1332   
1333         ol_arg=invalid
1334         for ol_val in auto yes no ; do
1335                 if test "$enableval" = "$ol_val" ; then
1336                         ol_arg="$ol_val"
1337                 fi
1338         done
1339         if test "$ol_arg" = "invalid" ; then
1340                 { echo "configure: error: bad value $enableval for --enable-unix" 1>&2; exit 1; }
1341         fi
1342         ol_enable_unix="$ol_arg"
1343
1344 else
1345         ol_enable_unix="auto"
1346 fi
1347 # end --enable-unix
1348 # OpenLDAP --enable-x_compile
1349         # Check whether --enable-x_compile or --disable-x_compile was given.
1350 if test "${enable_x_compile+set}" = set; then
1351   enableval="$enable_x_compile"
1352   
1353         ol_arg=invalid
1354         for ol_val in yes no ; do
1355                 if test "$enableval" = "$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 $enableval for --enable-x_compile" 1>&2; exit 1; }
1361         fi
1362         ol_enable_x_compile="$ol_arg"
1363
1364 else
1365         ol_enable_x_compile="no"
1366 fi
1367 # end --enable-x_compile
1368
1369
1370 # OpenLDAP --with-cyrus_sasl
1371         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1372 if test "${with_cyrus_sasl+set}" = set; then
1373   withval="$with_cyrus_sasl"
1374   
1375         ol_arg=invalid
1376         for ol_val in auto yes no  ; do
1377                 if test "$withval" = "$ol_val" ; then
1378                         ol_arg="$ol_val"
1379                 fi
1380         done
1381         if test "$ol_arg" = "invalid" ; then
1382                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1383         fi
1384         ol_with_cyrus_sasl="$ol_arg"
1385
1386 else
1387         ol_with_cyrus_sasl="auto"
1388 fi
1389 # end --with-cyrus_sasl
1390
1391 # OpenLDAP --with-fetch
1392         # Check whether --with-fetch or --without-fetch was given.
1393 if test "${with_fetch+set}" = set; then
1394   withval="$with_fetch"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto yes no  ; do
1398                 if test "$withval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1404         fi
1405         ol_with_fetch="$ol_arg"
1406
1407 else
1408         ol_with_fetch="auto"
1409 fi
1410 # end --with-fetch
1411
1412 # OpenLDAP --with-kerberos
1413         # Check whether --with-kerberos or --without-kerberos was given.
1414 if test "${with_kerberos+set}" = set; then
1415   withval="$with_kerberos"
1416   
1417         ol_arg=invalid
1418         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1419                 if test "$withval" = "$ol_val" ; then
1420                         ol_arg="$ol_val"
1421                 fi
1422         done
1423         if test "$ol_arg" = "invalid" ; then
1424                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1425         fi
1426         ol_with_kerberos="$ol_arg"
1427
1428 else
1429         ol_with_kerberos="auto"
1430 fi
1431 # end --with-kerberos
1432
1433 # OpenLDAP --with-readline
1434         # Check whether --with-readline or --without-readline was given.
1435 if test "${with_readline+set}" = set; then
1436   withval="$with_readline"
1437   
1438         ol_arg=invalid
1439         for ol_val in auto yes no  ; do
1440                 if test "$withval" = "$ol_val" ; then
1441                         ol_arg="$ol_val"
1442                 fi
1443         done
1444         if test "$ol_arg" = "invalid" ; then
1445                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1446         fi
1447         ol_with_readline="$ol_arg"
1448
1449 else
1450         ol_with_readline="auto"
1451 fi
1452 # end --with-readline
1453
1454 # OpenLDAP --with-threads
1455         # Check whether --with-threads or --without-threads was given.
1456 if test "${with_threads+set}" = set; then
1457   withval="$with_threads"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1461                 if test "$withval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1467         fi
1468         ol_with_threads="$ol_arg"
1469
1470 else
1471         ol_with_threads="auto"
1472 fi
1473 # end --with-threads
1474
1475 # OpenLDAP --with-tls
1476         # Check whether --with-tls or --without-tls was given.
1477 if test "${with_tls+set}" = set; then
1478   withval="$with_tls"
1479   
1480         ol_arg=invalid
1481         for ol_val in auto ssleay openssl yes no  ; do
1482                 if test "$withval" = "$ol_val" ; then
1483                         ol_arg="$ol_val"
1484                 fi
1485         done
1486         if test "$ol_arg" = "invalid" ; then
1487                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1488         fi
1489         ol_with_tls="$ol_arg"
1490
1491 else
1492         ol_with_tls="auto"
1493 fi
1494 # end --with-tls
1495
1496 # OpenLDAP --with-yielding_select
1497         # Check whether --with-yielding_select or --without-yielding_select was given.
1498 if test "${with_yielding_select+set}" = set; then
1499   withval="$with_yielding_select"
1500   
1501         ol_arg=invalid
1502         for ol_val in auto yes no manual  ; do
1503                 if test "$withval" = "$ol_val" ; then
1504                         ol_arg="$ol_val"
1505                 fi
1506         done
1507         if test "$ol_arg" = "invalid" ; then
1508                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1509         fi
1510         ol_with_yielding_select="$ol_arg"
1511
1512 else
1513         ol_with_yielding_select="auto"
1514 fi
1515 # end --with-yielding_select
1516
1517
1518
1519 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1520 if test "${with_xxslapdoptions+set}" = set; then
1521   withval="$with_xxslapdoptions"
1522   :
1523 fi
1524
1525 # OpenLDAP --enable-slapd
1526         # Check whether --enable-slapd or --disable-slapd was given.
1527 if test "${enable_slapd+set}" = set; then
1528   enableval="$enable_slapd"
1529   
1530         ol_arg=invalid
1531         for ol_val in auto yes no ; do
1532                 if test "$enableval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1538         fi
1539         ol_enable_slapd="$ol_arg"
1540
1541 else
1542         ol_enable_slapd="yes"
1543 fi
1544 # end --enable-slapd
1545 # OpenLDAP --enable-cleartext
1546         # Check whether --enable-cleartext or --disable-cleartext was given.
1547 if test "${enable_cleartext+set}" = set; then
1548   enableval="$enable_cleartext"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no ; do
1552                 if test "$enableval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1558         fi
1559         ol_enable_cleartext="$ol_arg"
1560
1561 else
1562         ol_enable_cleartext="yes"
1563 fi
1564 # end --enable-cleartext
1565 # OpenLDAP --enable-crypt
1566         # Check whether --enable-crypt or --disable-crypt was given.
1567 if test "${enable_crypt+set}" = set; then
1568   enableval="$enable_crypt"
1569   
1570         ol_arg=invalid
1571         for ol_val in auto yes no ; do
1572                 if test "$enableval" = "$ol_val" ; then
1573                         ol_arg="$ol_val"
1574                 fi
1575         done
1576         if test "$ol_arg" = "invalid" ; then
1577                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1578         fi
1579         ol_enable_crypt="$ol_arg"
1580
1581 else
1582         ol_enable_crypt="auto"
1583 fi
1584 # end --enable-crypt
1585 # OpenLDAP --enable-kpasswd
1586         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1587 if test "${enable_kpasswd+set}" = set; then
1588   enableval="$enable_kpasswd"
1589   
1590         ol_arg=invalid
1591         for ol_val in auto yes no ; do
1592                 if test "$enableval" = "$ol_val" ; then
1593                         ol_arg="$ol_val"
1594                 fi
1595         done
1596         if test "$ol_arg" = "invalid" ; then
1597                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1598         fi
1599         ol_enable_kpasswd="$ol_arg"
1600
1601 else
1602         ol_enable_kpasswd="no"
1603 fi
1604 # end --enable-kpasswd
1605 # OpenLDAP --enable-spasswd
1606         # Check whether --enable-spasswd or --disable-spasswd was given.
1607 if test "${enable_spasswd+set}" = set; then
1608   enableval="$enable_spasswd"
1609   
1610         ol_arg=invalid
1611         for ol_val in auto yes no ; do
1612                 if test "$enableval" = "$ol_val" ; then
1613                         ol_arg="$ol_val"
1614                 fi
1615         done
1616         if test "$ol_arg" = "invalid" ; then
1617                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1618         fi
1619         ol_enable_spasswd="$ol_arg"
1620
1621 else
1622         ol_enable_spasswd="no"
1623 fi
1624 # end --enable-spasswd
1625 # OpenLDAP --enable-modules
1626         # Check whether --enable-modules or --disable-modules was given.
1627 if test "${enable_modules+set}" = set; then
1628   enableval="$enable_modules"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no ; do
1632                 if test "$enableval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1638         fi
1639         ol_enable_modules="$ol_arg"
1640
1641 else
1642         ol_enable_modules="no"
1643 fi
1644 # end --enable-modules
1645 # OpenLDAP --enable-multimaster
1646         # Check whether --enable-multimaster or --disable-multimaster was given.
1647 if test "${enable_multimaster+set}" = set; then
1648   enableval="$enable_multimaster"
1649   
1650         ol_arg=invalid
1651         for ol_val in auto yes no ; do
1652                 if test "$enableval" = "$ol_val" ; then
1653                         ol_arg="$ol_val"
1654                 fi
1655         done
1656         if test "$ol_arg" = "invalid" ; then
1657                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1658         fi
1659         ol_enable_multimaster="$ol_arg"
1660
1661 else
1662         ol_enable_multimaster="no"
1663 fi
1664 # end --enable-multimaster
1665 # OpenLDAP --enable-phonetic
1666         # Check whether --enable-phonetic or --disable-phonetic was given.
1667 if test "${enable_phonetic+set}" = set; then
1668   enableval="$enable_phonetic"
1669   
1670         ol_arg=invalid
1671         for ol_val in auto yes no ; do
1672                 if test "$enableval" = "$ol_val" ; then
1673                         ol_arg="$ol_val"
1674                 fi
1675         done
1676         if test "$ol_arg" = "invalid" ; then
1677                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1678         fi
1679         ol_enable_phonetic="$ol_arg"
1680
1681 else
1682         ol_enable_phonetic="no"
1683 fi
1684 # end --enable-phonetic
1685 # OpenLDAP --enable-rlookups
1686         # Check whether --enable-rlookups or --disable-rlookups was given.
1687 if test "${enable_rlookups+set}" = set; then
1688   enableval="$enable_rlookups"
1689   
1690         ol_arg=invalid
1691         for ol_val in auto yes no ; do
1692                 if test "$enableval" = "$ol_val" ; then
1693                         ol_arg="$ol_val"
1694                 fi
1695         done
1696         if test "$ol_arg" = "invalid" ; then
1697                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1698         fi
1699         ol_enable_rlookups="$ol_arg"
1700
1701 else
1702         ol_enable_rlookups="auto"
1703 fi
1704 # end --enable-rlookups
1705 # OpenLDAP --enable-aci
1706         # Check whether --enable-aci or --disable-aci was given.
1707 if test "${enable_aci+set}" = set; then
1708   enableval="$enable_aci"
1709   
1710         ol_arg=invalid
1711         for ol_val in auto yes no ; do
1712                 if test "$enableval" = "$ol_val" ; then
1713                         ol_arg="$ol_val"
1714                 fi
1715         done
1716         if test "$ol_arg" = "invalid" ; then
1717                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1718         fi
1719         ol_enable_aci="$ol_arg"
1720
1721 else
1722         ol_enable_aci="no"
1723 fi
1724 # end --enable-aci
1725 # OpenLDAP --enable-wrappers
1726         # Check whether --enable-wrappers or --disable-wrappers was given.
1727 if test "${enable_wrappers+set}" = set; then
1728   enableval="$enable_wrappers"
1729   
1730         ol_arg=invalid
1731         for ol_val in auto yes no ; do
1732                 if test "$enableval" = "$ol_val" ; then
1733                         ol_arg="$ol_val"
1734                 fi
1735         done
1736         if test "$ol_arg" = "invalid" ; then
1737                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1738         fi
1739         ol_enable_wrappers="$ol_arg"
1740
1741 else
1742         ol_enable_wrappers="no"
1743 fi
1744 # end --enable-wrappers
1745 # OpenLDAP --enable-dynamic
1746         # Check whether --enable-dynamic or --disable-dynamic was given.
1747 if test "${enable_dynamic+set}" = set; then
1748   enableval="$enable_dynamic"
1749   
1750         ol_arg=invalid
1751         for ol_val in auto yes no ; do
1752                 if test "$enableval" = "$ol_val" ; then
1753                         ol_arg="$ol_val"
1754                 fi
1755         done
1756         if test "$ol_arg" = "invalid" ; then
1757                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1758         fi
1759         ol_enable_dynamic="$ol_arg"
1760
1761 else
1762         ol_enable_dynamic="no"
1763 fi
1764 # end --enable-dynamic
1765
1766 # OpenLDAP --enable-dnssrv
1767         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1768 if test "${enable_dnssrv+set}" = set; then
1769   enableval="$enable_dnssrv"
1770   
1771         ol_arg=invalid
1772         for ol_val in auto yes no ; do
1773                 if test "$enableval" = "$ol_val" ; then
1774                         ol_arg="$ol_val"
1775                 fi
1776         done
1777         if test "$ol_arg" = "invalid" ; then
1778                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1779         fi
1780         ol_enable_dnssrv="$ol_arg"
1781
1782 else
1783         ol_enable_dnssrv="no"
1784 fi
1785 # end --enable-dnssrv
1786 # OpenLDAP --with-dnssrv_module
1787         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1788 if test "${with_dnssrv_module+set}" = set; then
1789   withval="$with_dnssrv_module"
1790   
1791         ol_arg=invalid
1792         for ol_val in static dynamic ; do
1793                 if test "$withval" = "$ol_val" ; then
1794                         ol_arg="$ol_val"
1795                 fi
1796         done
1797         if test "$ol_arg" = "invalid" ; then
1798                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1799         fi
1800         ol_with_dnssrv_module="$ol_arg"
1801
1802 else
1803         ol_with_dnssrv_module="static"
1804 fi
1805 # end --with-dnssrv_module
1806
1807 # OpenLDAP --enable-ldap
1808         # Check whether --enable-ldap or --disable-ldap was given.
1809 if test "${enable_ldap+set}" = set; then
1810   enableval="$enable_ldap"
1811   
1812         ol_arg=invalid
1813         for ol_val in auto yes no ; do
1814                 if test "$enableval" = "$ol_val" ; then
1815                         ol_arg="$ol_val"
1816                 fi
1817         done
1818         if test "$ol_arg" = "invalid" ; then
1819                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1820         fi
1821         ol_enable_ldap="$ol_arg"
1822
1823 else
1824         ol_enable_ldap="no"
1825 fi
1826 # end --enable-ldap
1827 # OpenLDAP --with-ldap_module
1828         # Check whether --with-ldap_module or --without-ldap_module was given.
1829 if test "${with_ldap_module+set}" = set; then
1830   withval="$with_ldap_module"
1831   
1832         ol_arg=invalid
1833         for ol_val in static dynamic ; do
1834                 if test "$withval" = "$ol_val" ; then
1835                         ol_arg="$ol_val"
1836                 fi
1837         done
1838         if test "$ol_arg" = "invalid" ; then
1839                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1840         fi
1841         ol_with_ldap_module="$ol_arg"
1842
1843 else
1844         ol_with_ldap_module="static"
1845 fi
1846 # end --with-ldap_module
1847
1848 # OpenLDAP --enable-ldbm
1849         # Check whether --enable-ldbm or --disable-ldbm was given.
1850 if test "${enable_ldbm+set}" = set; then
1851   enableval="$enable_ldbm"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto yes no ; do
1855                 if test "$enableval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1861         fi
1862         ol_enable_ldbm="$ol_arg"
1863
1864 else
1865         ol_enable_ldbm="yes"
1866 fi
1867 # end --enable-ldbm
1868 # OpenLDAP --with-ldbm_api
1869         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1870 if test "${with_ldbm_api+set}" = set; then
1871   withval="$with_ldbm_api"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto berkeley bcompat mdbm gdbm ; 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_api" 1>&2; exit 1; }
1881         fi
1882         ol_with_ldbm_api="$ol_arg"
1883
1884 else
1885         ol_with_ldbm_api="auto"
1886 fi
1887 # end --with-ldbm_api
1888
1889 # OpenLDAP --with-ldbm_module
1890         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1891 if test "${with_ldbm_module+set}" = set; then
1892   withval="$with_ldbm_module"
1893   
1894         ol_arg=invalid
1895         for ol_val in static dynamic ; do
1896                 if test "$withval" = "$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 $withval for --with-ldbm_module" 1>&2; exit 1; }
1902         fi
1903         ol_with_ldbm_module="$ol_arg"
1904
1905 else
1906         ol_with_ldbm_module="static"
1907 fi
1908 # end --with-ldbm_module
1909
1910 # OpenLDAP --with-ldbm_type
1911         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1912 if test "${with_ldbm_type+set}" = set; then
1913   withval="$with_ldbm_type"
1914   
1915         ol_arg=invalid
1916         for ol_val in auto btree hash ; do
1917                 if test "$withval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1923         fi
1924         ol_with_ldbm_type="$ol_arg"
1925
1926 else
1927         ol_with_ldbm_type="auto"
1928 fi
1929 # end --with-ldbm_type
1930
1931 # OpenLDAP --enable-passwd
1932         # Check whether --enable-passwd or --disable-passwd was given.
1933 if test "${enable_passwd+set}" = set; then
1934   enableval="$enable_passwd"
1935   
1936         ol_arg=invalid
1937         for ol_val in auto yes no ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1944         fi
1945         ol_enable_passwd="$ol_arg"
1946
1947 else
1948         ol_enable_passwd="no"
1949 fi
1950 # end --enable-passwd
1951 # OpenLDAP --with-passwd_module
1952         # Check whether --with-passwd_module or --without-passwd_module was given.
1953 if test "${with_passwd_module+set}" = set; then
1954   withval="$with_passwd_module"
1955   
1956         ol_arg=invalid
1957         for ol_val in static dynamic ; do
1958                 if test "$withval" = "$ol_val" ; then
1959                         ol_arg="$ol_val"
1960                 fi
1961         done
1962         if test "$ol_arg" = "invalid" ; then
1963                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1964         fi
1965         ol_with_passwd_module="$ol_arg"
1966
1967 else
1968         ol_with_passwd_module="static"
1969 fi
1970 # end --with-passwd_module
1971
1972 # OpenLDAP --enable-shell
1973         # Check whether --enable-shell or --disable-shell was given.
1974 if test "${enable_shell+set}" = set; then
1975   enableval="$enable_shell"
1976   
1977         ol_arg=invalid
1978         for ol_val in auto yes no ; do
1979                 if test "$enableval" = "$ol_val" ; then
1980                         ol_arg="$ol_val"
1981                 fi
1982         done
1983         if test "$ol_arg" = "invalid" ; then
1984                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1985         fi
1986         ol_enable_shell="$ol_arg"
1987
1988 else
1989         ol_enable_shell="no"
1990 fi
1991 # end --enable-shell
1992 # OpenLDAP --with-shell_module
1993         # Check whether --with-shell_module or --without-shell_module was given.
1994 if test "${with_shell_module+set}" = set; then
1995   withval="$with_shell_module"
1996   
1997         ol_arg=invalid
1998         for ol_val in static dynamic ; do
1999                 if test "$withval" = "$ol_val" ; then
2000                         ol_arg="$ol_val"
2001                 fi
2002         done
2003         if test "$ol_arg" = "invalid" ; then
2004                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2005         fi
2006         ol_with_shell_module="$ol_arg"
2007
2008 else
2009         ol_with_shell_module="static"
2010 fi
2011 # end --with-shell_module
2012
2013
2014 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2015 if test "${with_xxslurpdoptions+set}" = set; then
2016   withval="$with_xxslurpdoptions"
2017   :
2018 fi
2019
2020 # OpenLDAP --enable-slurpd
2021         # Check whether --enable-slurpd or --disable-slurpd was given.
2022 if test "${enable_slurpd+set}" = set; then
2023   enableval="$enable_slurpd"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2033         fi
2034         ol_enable_slurpd="$ol_arg"
2035
2036 else
2037         ol_enable_slurpd="auto"
2038 fi
2039 # end --enable-slurpd
2040
2041 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2042 if test "${with_xxliboptions+set}" = set; then
2043   withval="$with_xxliboptions"
2044   :
2045 fi
2046
2047 # Check whether --enable-static or --disable-static was given.
2048 if test "${enable_static+set}" = set; then
2049   enableval="$enable_static"
2050   p=${PACKAGE-default}
2051 case "$enableval" in
2052 yes) enable_static=yes ;;
2053 no) enable_static=no ;;
2054 *)
2055   enable_static=no
2056   # Look at the argument we got.  We use all the common list separators.
2057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2058   for pkg in $enableval; do
2059     if test "X$pkg" = "X$p"; then
2060       enable_static=yes
2061     fi
2062   done
2063   IFS="$ac_save_ifs"
2064   ;;
2065 esac
2066 else
2067   enable_static=yes
2068 fi
2069
2070 # Check whether --enable-shared or --disable-shared was given.
2071 if test "${enable_shared+set}" = set; then
2072   enableval="$enable_shared"
2073   p=${PACKAGE-default}
2074 case "$enableval" in
2075 yes) enable_shared=yes ;;
2076 no) enable_shared=no ;;
2077 *)
2078   enable_shared=no
2079   # Look at the argument we got.  We use all the common list separators.
2080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2081   for pkg in $enableval; do
2082     if test "X$pkg" = "X$p"; then
2083       enable_shared=yes
2084     fi
2085   done
2086   IFS="$ac_save_ifs"
2087   ;;
2088 esac
2089 else
2090   enable_shared=yes
2091 fi
2092
2093
2094
2095 # validate options
2096 if test $ol_enable_slapd = no ; then
2097                 if test $ol_enable_dnssrv = yes ; then
2098                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2099         fi
2100         if test $ol_enable_ldap = yes ; then
2101                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2102         fi
2103         if test $ol_enable_ldbm = yes ; then
2104                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2105         fi
2106         if test $ol_enable_passwd = yes ; then
2107                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2108         fi
2109         if test $ol_enable_shell = yes ; then
2110                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2111         fi
2112         if test $ol_enable_modules = yes ; then
2113                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2114         fi
2115         if test $ol_enable_multimaster = yes ; then
2116                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2117         fi
2118         if test $ol_enable_wrappers = yes ; then
2119                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2120         fi
2121         if test $ol_enable_phonetic = yes ; then
2122                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2123         fi
2124         if test $ol_enable_rlookups = yes ; then
2125                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2126         fi
2127         if test $ol_enable_aci = yes ; then
2128                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2129         fi
2130         if test $ol_with_ldbm_api != auto ; then
2131                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2132         fi
2133         if test $ol_with_ldbm_type != auto ; then
2134                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2135         fi
2136         if test $ol_with_dnssrv_module != static ; then
2137                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2138         fi
2139         if test $ol_with_ldap_module != static ; then
2140                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2141         fi
2142         if test $ol_with_ldbm_module != static ; then
2143                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2144         fi
2145         if test $ol_with_passwd_module != static ; then
2146                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2147         fi
2148         if test $ol_with_shell_module != static ; then
2149                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2150         fi
2151         if test $ol_enable_slurpd = yes ; then
2152                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2153         fi
2154
2155         # force settings to no
2156         ol_enable_dnssrv=no
2157         ol_enable_ldap=no
2158         ol_enable_ldbm=no
2159         ol_enable_passwd=no
2160         ol_enable_shell=no
2161
2162         ol_enable_modules=no
2163         ol_enable_multimaster=no
2164         ol_enable_phonetic=no
2165         ol_enable_rlookups=no
2166         ol_enable_aci=no
2167         ol_enable_wrappers=no
2168         ol_enable_dynamic=no
2169
2170         ol_with_ldbm_api=no
2171         ol_with_ldbm_type=no
2172
2173         ol_with_dnssrv_module=static
2174         ol_with_ldap_module=static
2175         ol_with_ldbm_module=static
2176         ol_with_passwd_module=static
2177         ol_with_shell_module=static
2178
2179         ol_enable_slurpd=no
2180
2181 elif test $ol_enable_ldbm = no ; then
2182         
2183         if test $ol_with_ldbm_api != auto ; then
2184                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2185         fi
2186
2187         if test $ol_with_ldbm_type != auto ; then
2188                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2189         fi
2190
2191         if test $ol_with_ldbm_module != static ; then
2192                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2193         fi
2194
2195         if test $ol_enable_modules != yes -a \
2196                 $ol_enable_dnssrv = no -a \
2197                 $ol_enable_ldap = no -a \
2198                 $ol_enable_passwd = no -a \
2199                 $ol_enable_shell = no ; then
2200                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2201         fi
2202
2203         ol_with_ldbm_api=no
2204         ol_with_ldbm_type=no
2205         ol_with_ldbm_module=static
2206
2207 else
2208                 if test $ol_with_ldbm_api = gdbm -a \
2209                 $ol_with_ldbm_type = btree ; then
2210                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2211         fi
2212         if test $ol_with_ldbm_api = mdbm -a \
2213                 $ol_with_ldbm_type = btree ; then
2214                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2215         fi
2216         if test $ol_with_ldbm_api = ndbm -a \
2217                 $ol_with_ldbm_type = btree ; then
2218                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2219         fi
2220 fi
2221
2222 if test $ol_enable_slurpd = yes ; then
2223                 if test $ol_with_threads = no ; then
2224                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2225         fi
2226 fi
2227
2228 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2229         if test $ol_with_kerberos = no ; then
2230                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2231         fi
2232 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2233         if test $ol_with_kerberos != auto ; then
2234                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2235         else
2236                 ol_with_kerberos=no
2237         fi
2238 fi
2239
2240 if test $ol_enable_spasswd = yes ; then
2241         if test $ol_with_cyrus_sasl = no ; then
2242                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2243         fi
2244         ol_link_spasswd=yes
2245 fi
2246
2247 echo "$ac_t""done" 1>&6
2248
2249 LDAP_LIBS=
2250 LDIF_LIBS=
2251 LDBM_LIBS=
2252 LTHREAD_LIBS=
2253 LUTIL_LIBS=
2254
2255 SLAPD_LIBS=
2256 SLURPD_LIBS=
2257
2258 BUILD_SLAPD=no
2259 BUILD_SLURPD=no
2260
2261 BUILD_THREAD=no
2262
2263 BUILD_DNSSRV=no
2264 BUILD_LDAP=no
2265 BUILD_LDBM=no
2266 BUILD_PASSWD=no
2267 BUILD_SHELL=no
2268
2269 BUILD_DNSSRV_DYNAMIC=static
2270 BUILD_LDAP_DYNAMIC=static
2271 BUILD_LDBM_DYNAMIC=static
2272 BUILD_PASSWD_DYNAMIC=static
2273 BUILD_SHELL_DYNAMIC=static
2274
2275 SLAPD_MODULES_LDFLAGS=
2276 SLAPD_MODULES_CPPFLAGS=
2277 SLAPD_MODULES_LIST=
2278
2279 KRB4_LIBS=
2280 KRB5_LIBS=
2281 READLINE_LIBS=
2282 SASL_LIBS=
2283 TERMCAP_LIBS=
2284 TLS_LIBS=
2285 MODULES_LIBS=
2286 AUTH_LIBS=
2287
2288
2289
2290 cat >> confdefs.h <<\EOF
2291 #define HAVE_MKVERSION 1
2292 EOF
2293
2294
2295
2296
2297 ol_aix_threads=no
2298 case "$target" in
2299 *-*-aix*)       if test -z "$CC" ; then
2300                 case "$ol_with_threads" in
2301                 auto | yes |  posix) ol_aix_threads=yes ;;
2302                 esac
2303         fi
2304 ;;
2305 esac
2306
2307 if test $ol_aix_threads = yes ; then
2308         if test -z "${CC}" ; then
2309                 for ac_prog in cc_r xlc_r cc
2310 do
2311 # Extract the first word of "$ac_prog", so it can be a program name with args.
2312 set dummy $ac_prog; ac_word=$2
2313 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2314 echo "configure:2315: checking for $ac_word" >&5
2315 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2316   echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318   if test -n "$CC"; then
2319   ac_cv_prog_CC="$CC" # Let the user override the test.
2320 else
2321   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2322   ac_dummy="$PATH"
2323   for ac_dir in $ac_dummy; do
2324     test -z "$ac_dir" && ac_dir=.
2325     if test -f $ac_dir/$ac_word; then
2326       ac_cv_prog_CC="$ac_prog"
2327       break
2328     fi
2329   done
2330   IFS="$ac_save_ifs"
2331 fi
2332 fi
2333 CC="$ac_cv_prog_CC"
2334 if test -n "$CC"; then
2335   echo "$ac_t""$CC" 1>&6
2336 else
2337   echo "$ac_t""no" 1>&6
2338 fi
2339
2340 test -n "$CC" && break
2341 done
2342
2343
2344                 if test "$CC" = cc ; then
2345                                                 if test $ol_with_threads != auto ; then
2346                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2347                         else
2348                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2349                         fi
2350                         ol_with_threads=no
2351                 fi
2352         fi
2353
2354         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2355                 ol_with_threads=posix
2356                 ol_cv_pthread_create=yes
2357         fi
2358 fi
2359
2360 if test -z "${CC}"; then
2361         for ac_prog in cc
2362 do
2363 # Extract the first word of "$ac_prog", so it can be a program name with args.
2364 set dummy $ac_prog; ac_word=$2
2365 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2366 echo "configure:2367: checking for $ac_word" >&5
2367 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2368   echo $ac_n "(cached) $ac_c" 1>&6
2369 else
2370   if test -n "$CC"; then
2371   ac_cv_prog_CC="$CC" # Let the user override the test.
2372 else
2373   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2374   ac_dummy="$PATH"
2375   for ac_dir in $ac_dummy; do
2376     test -z "$ac_dir" && ac_dir=.
2377     if test -f $ac_dir/$ac_word; then
2378       ac_cv_prog_CC="$ac_prog"
2379       break
2380     fi
2381   done
2382   IFS="$ac_save_ifs"
2383 fi
2384 fi
2385 CC="$ac_cv_prog_CC"
2386 if test -n "$CC"; then
2387   echo "$ac_t""$CC" 1>&6
2388 else
2389   echo "$ac_t""no" 1>&6
2390 fi
2391
2392 test -n "$CC" && break
2393 done
2394
2395 fi
2396
2397
2398
2399
2400 # Check whether --enable-fast-install or --disable-fast-install was given.
2401 if test "${enable_fast_install+set}" = set; then
2402   enableval="$enable_fast_install"
2403   p=${PACKAGE-default}
2404 case "$enableval" in
2405 yes) enable_fast_install=yes ;;
2406 no) enable_fast_install=no ;;
2407 *)
2408   enable_fast_install=no
2409   # Look at the argument we got.  We use all the common list separators.
2410   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2411   for pkg in $enableval; do
2412     if test "X$pkg" = "X$p"; then
2413       enable_fast_install=yes
2414     fi
2415   done
2416   IFS="$ac_save_ifs"
2417   ;;
2418 esac
2419 else
2420   enable_fast_install=yes
2421 fi
2422
2423 # Extract the first word of "ranlib", so it can be a program name with args.
2424 set dummy ranlib; ac_word=$2
2425 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2426 echo "configure:2427: checking for $ac_word" >&5
2427 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2428   echo $ac_n "(cached) $ac_c" 1>&6
2429 else
2430   if test -n "$RANLIB"; then
2431   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2432 else
2433   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2434   ac_dummy="$PATH"
2435   for ac_dir in $ac_dummy; do
2436     test -z "$ac_dir" && ac_dir=.
2437     if test -f $ac_dir/$ac_word; then
2438       ac_cv_prog_RANLIB="ranlib"
2439       break
2440     fi
2441   done
2442   IFS="$ac_save_ifs"
2443   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2444 fi
2445 fi
2446 RANLIB="$ac_cv_prog_RANLIB"
2447 if test -n "$RANLIB"; then
2448   echo "$ac_t""$RANLIB" 1>&6
2449 else
2450   echo "$ac_t""no" 1>&6
2451 fi
2452
2453 # Extract the first word of "gcc", so it can be a program name with args.
2454 set dummy gcc; ac_word=$2
2455 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2456 echo "configure:2457: checking for $ac_word" >&5
2457 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2458   echo $ac_n "(cached) $ac_c" 1>&6
2459 else
2460   if test -n "$CC"; then
2461   ac_cv_prog_CC="$CC" # Let the user override the test.
2462 else
2463   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2464   ac_dummy="$PATH"
2465   for ac_dir in $ac_dummy; do
2466     test -z "$ac_dir" && ac_dir=.
2467     if test -f $ac_dir/$ac_word; then
2468       ac_cv_prog_CC="gcc"
2469       break
2470     fi
2471   done
2472   IFS="$ac_save_ifs"
2473 fi
2474 fi
2475 CC="$ac_cv_prog_CC"
2476 if test -n "$CC"; then
2477   echo "$ac_t""$CC" 1>&6
2478 else
2479   echo "$ac_t""no" 1>&6
2480 fi
2481
2482 if test -z "$CC"; then
2483   # Extract the first word of "cc", so it can be a program name with args.
2484 set dummy cc; ac_word=$2
2485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2486 echo "configure:2487: checking for $ac_word" >&5
2487 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2488   echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490   if test -n "$CC"; then
2491   ac_cv_prog_CC="$CC" # Let the user override the test.
2492 else
2493   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2494   ac_prog_rejected=no
2495   ac_dummy="$PATH"
2496   for ac_dir in $ac_dummy; do
2497     test -z "$ac_dir" && ac_dir=.
2498     if test -f $ac_dir/$ac_word; then
2499       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2500         ac_prog_rejected=yes
2501         continue
2502       fi
2503       ac_cv_prog_CC="cc"
2504       break
2505     fi
2506   done
2507   IFS="$ac_save_ifs"
2508 if test $ac_prog_rejected = yes; then
2509   # We found a bogon in the path, so make sure we never use it.
2510   set dummy $ac_cv_prog_CC
2511   shift
2512   if test $# -gt 0; then
2513     # We chose a different compiler from the bogus one.
2514     # However, it has the same basename, so the bogon will be chosen
2515     # first if we set CC to just the basename; use the full file name.
2516     shift
2517     set dummy "$ac_dir/$ac_word" "$@"
2518     shift
2519     ac_cv_prog_CC="$@"
2520   fi
2521 fi
2522 fi
2523 fi
2524 CC="$ac_cv_prog_CC"
2525 if test -n "$CC"; then
2526   echo "$ac_t""$CC" 1>&6
2527 else
2528   echo "$ac_t""no" 1>&6
2529 fi
2530
2531   if test -z "$CC"; then
2532     case "`uname -s`" in
2533     *win32* | *WIN32* | *CYGWIN*)
2534       # Extract the first word of "cl", so it can be a program name with args.
2535 set dummy cl; ac_word=$2
2536 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2537 echo "configure:2538: checking for $ac_word" >&5
2538 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2539   echo $ac_n "(cached) $ac_c" 1>&6
2540 else
2541   if test -n "$CC"; then
2542   ac_cv_prog_CC="$CC" # Let the user override the test.
2543 else
2544   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2545   ac_dummy="$PATH"
2546   for ac_dir in $ac_dummy; do
2547     test -z "$ac_dir" && ac_dir=.
2548     if test -f $ac_dir/$ac_word; then
2549       ac_cv_prog_CC="cl"
2550       break
2551     fi
2552   done
2553   IFS="$ac_save_ifs"
2554 fi
2555 fi
2556 CC="$ac_cv_prog_CC"
2557 if test -n "$CC"; then
2558   echo "$ac_t""$CC" 1>&6
2559 else
2560   echo "$ac_t""no" 1>&6
2561 fi
2562  ;;
2563     esac
2564   fi
2565   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2566 fi
2567
2568 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2569 echo "configure:2570: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2570
2571 ac_ext=c
2572 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2573 ac_cpp='$CPP $CPPFLAGS'
2574 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2575 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2576 cross_compiling=$ac_cv_prog_cc_cross
2577
2578 cat > conftest.$ac_ext << EOF
2579
2580 #line 2581 "configure"
2581 #include "confdefs.h"
2582
2583 main(){return(0);}
2584 EOF
2585 if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2586   ac_cv_prog_cc_works=yes
2587   # If we can't run a trivial program, we are probably using a cross compiler.
2588   if (./conftest; exit) 2>/dev/null; then
2589     ac_cv_prog_cc_cross=no
2590   else
2591     ac_cv_prog_cc_cross=yes
2592   fi
2593 else
2594   echo "configure: failed program was:" >&5
2595   cat conftest.$ac_ext >&5
2596   ac_cv_prog_cc_works=no
2597 fi
2598 rm -fr conftest*
2599 ac_ext=c
2600 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2601 ac_cpp='$CPP $CPPFLAGS'
2602 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2603 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2604 cross_compiling=$ac_cv_prog_cc_cross
2605
2606 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2607 if test $ac_cv_prog_cc_works = no; then
2608   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2609 fi
2610 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2611 echo "configure:2612: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2612 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2613 cross_compiling=$ac_cv_prog_cc_cross
2614
2615 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2616 echo "configure:2617: checking whether we are using GNU C" >&5
2617 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2618   echo $ac_n "(cached) $ac_c" 1>&6
2619 else
2620   cat > conftest.c <<EOF
2621 #ifdef __GNUC__
2622   yes;
2623 #endif
2624 EOF
2625 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2626   ac_cv_prog_gcc=yes
2627 else
2628   ac_cv_prog_gcc=no
2629 fi
2630 fi
2631
2632 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2633
2634 if test $ac_cv_prog_gcc = yes; then
2635   GCC=yes
2636 else
2637   GCC=
2638 fi
2639
2640 ac_test_CFLAGS="${CFLAGS+set}"
2641 ac_save_CFLAGS="$CFLAGS"
2642 CFLAGS=
2643 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2644 echo "configure:2645: checking whether ${CC-cc} accepts -g" >&5
2645 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2646   echo $ac_n "(cached) $ac_c" 1>&6
2647 else
2648   echo 'void f(){}' > conftest.c
2649 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2650   ac_cv_prog_cc_g=yes
2651 else
2652   ac_cv_prog_cc_g=no
2653 fi
2654 rm -f conftest*
2655
2656 fi
2657
2658 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2659 if test "$ac_test_CFLAGS" = set; then
2660   CFLAGS="$ac_save_CFLAGS"
2661 elif test $ac_cv_prog_cc_g = yes; then
2662   if test "$GCC" = yes; then
2663     CFLAGS="-g -O2"
2664   else
2665     CFLAGS="-g"
2666   fi
2667 else
2668   if test "$GCC" = yes; then
2669     CFLAGS="-O2"
2670   else
2671     CFLAGS=
2672   fi
2673 fi
2674
2675 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2676 if test "${with_gnu_ld+set}" = set; then
2677   withval="$with_gnu_ld"
2678   test "$withval" = no || with_gnu_ld=yes
2679 else
2680   with_gnu_ld=no
2681 fi
2682
2683 ac_prog=ld
2684 if test "$ac_cv_prog_gcc" = yes; then
2685   # Check if gcc -print-prog-name=ld gives a path.
2686   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2687 echo "configure:2688: checking for ld used by GCC" >&5
2688   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2689   case "$ac_prog" in
2690     # Accept absolute paths.
2691     [\\/]* | [A-Za-z]:[\\/]*)
2692       re_direlt='/[^/][^/]*/\.\./'
2693       # Canonicalize the path of ld
2694       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2695       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2696         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2697       done
2698       test -z "$LD" && LD="$ac_prog"
2699       ;;
2700   "")
2701     # If it fails, then pretend we aren't using GCC.
2702     ac_prog=ld
2703     ;;
2704   *)
2705     # If it is relative, then search for the first ld in PATH.
2706     with_gnu_ld=unknown
2707     ;;
2708   esac
2709 elif test "$with_gnu_ld" = yes; then
2710   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2711 echo "configure:2712: checking for GNU ld" >&5
2712 else
2713   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2714 echo "configure:2715: checking for non-GNU ld" >&5
2715 fi
2716 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2717   echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719   if test -z "$LD"; then
2720   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2721   for ac_dir in $PATH; do
2722     test -z "$ac_dir" && ac_dir=.
2723     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2724       ac_cv_path_LD="$ac_dir/$ac_prog"
2725       # Check to see if the program is GNU ld.  I'd rather use --version,
2726       # but apparently some GNU ld's only accept -v.
2727       # Break only if it was the GNU/non-GNU ld that we prefer.
2728       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2729         test "$with_gnu_ld" != no && break
2730       else
2731         test "$with_gnu_ld" != yes && break
2732       fi
2733     fi
2734   done
2735   IFS="$ac_save_ifs"
2736 else
2737   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2738 fi
2739 fi
2740
2741 LD="$ac_cv_path_LD"
2742 if test -n "$LD"; then
2743   echo "$ac_t""$LD" 1>&6
2744 else
2745   echo "$ac_t""no" 1>&6
2746 fi
2747 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2748 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2749 echo "configure:2750: checking if the linker ($LD) is GNU ld" >&5
2750 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2751   echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2754 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2755   ac_cv_prog_gnu_ld=yes
2756 else
2757   ac_cv_prog_gnu_ld=no
2758 fi
2759 fi
2760
2761 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2762
2763
2764 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2765 echo "configure:2766: checking for BSD-compatible nm" >&5
2766 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2767   echo $ac_n "(cached) $ac_c" 1>&6
2768 else
2769   if test -n "$NM"; then
2770   # Let the user override the test.
2771   ac_cv_path_NM="$NM"
2772 else
2773   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2774   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2775     test -z "$ac_dir" && ac_dir=.
2776     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2777       # Check to see if the nm accepts a BSD-compat flag.
2778       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2779       #   nm: unknown option "B" ignored
2780       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2781         ac_cv_path_NM="$ac_dir/nm -B"
2782         break
2783       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2784         ac_cv_path_NM="$ac_dir/nm -p"
2785         break
2786       else
2787         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2788         continue # so that we can try to find one that supports BSD flags
2789       fi
2790     fi
2791   done
2792   IFS="$ac_save_ifs"
2793   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2794 fi
2795 fi
2796
2797 NM="$ac_cv_path_NM"
2798 echo "$ac_t""$NM" 1>&6
2799
2800 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2801 echo "configure:2802: checking whether ln -s works" >&5
2802 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2803   echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805   rm -f conftestdata
2806 if ln -s X conftestdata 2>/dev/null
2807 then
2808   rm -f conftestdata
2809   ac_cv_prog_LN_S="ln -s"
2810 else
2811   ac_cv_prog_LN_S=ln
2812 fi
2813 fi
2814 LN_S="$ac_cv_prog_LN_S"
2815 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2816   echo "$ac_t""yes" 1>&6
2817 else
2818   echo "$ac_t""no" 1>&6
2819 fi
2820
2821 if test $host != $build; then
2822   ac_tool_prefix=${host_alias}-
2823 else
2824   ac_tool_prefix=
2825 fi
2826
2827
2828 case "$target" in
2829 NONE) lt_target="$host" ;;
2830 *) lt_target="$target" ;;
2831 esac
2832
2833 # Check for any special flags to pass to ltconfig.
2834 libtool_flags="--cache-file=$cache_file"
2835 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2836 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2837 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2838 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2839 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2840 libtool_flags="$libtool_flags --enable-dlopen"
2841 libtool_flags="$libtool_flags --enable-win32-dll"
2842 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2843 if test "${enable_libtool_lock+set}" = set; then
2844   enableval="$enable_libtool_lock"
2845   :
2846 fi
2847
2848 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2849 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2850
2851 # Some flags need to be propagated to the compiler or linker for good
2852 # libtool support.
2853 case "$lt_target" in
2854 *-*-irix6*)
2855   # Find out which ABI we are using.
2856   echo '#line 2857 "configure"' > conftest.$ac_ext
2857   if { (eval echo configure:2858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2858     case "`/usr/bin/file conftest.o`" in
2859     *32-bit*)
2860       LD="${LD-ld} -32"
2861       ;;
2862     *N32*)
2863       LD="${LD-ld} -n32"
2864       ;;
2865     *64-bit*)
2866       LD="${LD-ld} -64"
2867       ;;
2868     esac
2869   fi
2870   rm -rf conftest*
2871   ;;
2872
2873 *-*-sco3.2v5*)
2874   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2875   SAVE_CFLAGS="$CFLAGS"
2876   CFLAGS="$CFLAGS -belf"
2877   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2878 echo "configure:2879: checking whether the C compiler needs -belf" >&5
2879 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2880   echo $ac_n "(cached) $ac_c" 1>&6
2881 else
2882   cat > conftest.$ac_ext <<EOF
2883 #line 2884 "configure"
2884 #include "confdefs.h"
2885
2886 int main() {
2887
2888 ; return 0; }
2889 EOF
2890 if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2891   rm -rf conftest*
2892   lt_cv_cc_needs_belf=yes
2893 else
2894   echo "configure: failed program was:" >&5
2895   cat conftest.$ac_ext >&5
2896   rm -rf conftest*
2897   lt_cv_cc_needs_belf=no
2898 fi
2899 rm -f conftest*
2900 fi
2901
2902 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2903   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2904     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2905     CFLAGS="$SAVE_CFLAGS"
2906   fi
2907   ;;
2908
2909 *-*-cygwin* | *-*-mingw*)
2910   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2911 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2913 echo "configure:2914: checking for $ac_word" >&5
2914 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2915   echo $ac_n "(cached) $ac_c" 1>&6
2916 else
2917   if test -n "$DLLTOOL"; then
2918   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2919 else
2920   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2921   ac_dummy="$PATH"
2922   for ac_dir in $ac_dummy; do
2923     test -z "$ac_dir" && ac_dir=.
2924     if test -f $ac_dir/$ac_word; then
2925       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2926       break
2927     fi
2928   done
2929   IFS="$ac_save_ifs"
2930 fi
2931 fi
2932 DLLTOOL="$ac_cv_prog_DLLTOOL"
2933 if test -n "$DLLTOOL"; then
2934   echo "$ac_t""$DLLTOOL" 1>&6
2935 else
2936   echo "$ac_t""no" 1>&6
2937 fi
2938
2939
2940 if test -z "$ac_cv_prog_DLLTOOL"; then
2941 if test -n "$ac_tool_prefix"; then
2942   # Extract the first word of "dlltool", so it can be a program name with args.
2943 set dummy dlltool; ac_word=$2
2944 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2945 echo "configure:2946: checking for $ac_word" >&5
2946 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   if test -n "$DLLTOOL"; then
2950   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2951 else
2952   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2953   ac_dummy="$PATH"
2954   for ac_dir in $ac_dummy; do
2955     test -z "$ac_dir" && ac_dir=.
2956     if test -f $ac_dir/$ac_word; then
2957       ac_cv_prog_DLLTOOL="dlltool"
2958       break
2959     fi
2960   done
2961   IFS="$ac_save_ifs"
2962   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
2963 fi
2964 fi
2965 DLLTOOL="$ac_cv_prog_DLLTOOL"
2966 if test -n "$DLLTOOL"; then
2967   echo "$ac_t""$DLLTOOL" 1>&6
2968 else
2969   echo "$ac_t""no" 1>&6
2970 fi
2971
2972 else
2973   DLLTOOL="false"
2974 fi
2975 fi
2976
2977   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
2978 set dummy ${ac_tool_prefix}as; ac_word=$2
2979 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2980 echo "configure:2981: checking for $ac_word" >&5
2981 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
2982   echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984   if test -n "$AS"; then
2985   ac_cv_prog_AS="$AS" # Let the user override the test.
2986 else
2987   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2988   ac_dummy="$PATH"
2989   for ac_dir in $ac_dummy; do
2990     test -z "$ac_dir" && ac_dir=.
2991     if test -f $ac_dir/$ac_word; then
2992       ac_cv_prog_AS="${ac_tool_prefix}as"
2993       break
2994     fi
2995   done
2996   IFS="$ac_save_ifs"
2997 fi
2998 fi
2999 AS="$ac_cv_prog_AS"
3000 if test -n "$AS"; then
3001   echo "$ac_t""$AS" 1>&6
3002 else
3003   echo "$ac_t""no" 1>&6
3004 fi
3005
3006
3007 if test -z "$ac_cv_prog_AS"; then
3008 if test -n "$ac_tool_prefix"; then
3009   # Extract the first word of "as", so it can be a program name with args.
3010 set dummy as; ac_word=$2
3011 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3012 echo "configure:3013: checking for $ac_word" >&5
3013 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3014   echo $ac_n "(cached) $ac_c" 1>&6
3015 else
3016   if test -n "$AS"; then
3017   ac_cv_prog_AS="$AS" # Let the user override the test.
3018 else
3019   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3020   ac_dummy="$PATH"
3021   for ac_dir in $ac_dummy; do
3022     test -z "$ac_dir" && ac_dir=.
3023     if test -f $ac_dir/$ac_word; then
3024       ac_cv_prog_AS="as"
3025       break
3026     fi
3027   done
3028   IFS="$ac_save_ifs"
3029   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3030 fi
3031 fi
3032 AS="$ac_cv_prog_AS"
3033 if test -n "$AS"; then
3034   echo "$ac_t""$AS" 1>&6
3035 else
3036   echo "$ac_t""no" 1>&6
3037 fi
3038
3039 else
3040   AS="false"
3041 fi
3042 fi
3043
3044   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3045 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3046 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3047 echo "configure:3048: checking for $ac_word" >&5
3048 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   if test -n "$OBJDUMP"; then
3052   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3053 else
3054   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3055   ac_dummy="$PATH"
3056   for ac_dir in $ac_dummy; do
3057     test -z "$ac_dir" && ac_dir=.
3058     if test -f $ac_dir/$ac_word; then
3059       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3060       break
3061     fi
3062   done
3063   IFS="$ac_save_ifs"
3064 fi
3065 fi
3066 OBJDUMP="$ac_cv_prog_OBJDUMP"
3067 if test -n "$OBJDUMP"; then
3068   echo "$ac_t""$OBJDUMP" 1>&6
3069 else
3070   echo "$ac_t""no" 1>&6
3071 fi
3072
3073
3074 if test -z "$ac_cv_prog_OBJDUMP"; then
3075 if test -n "$ac_tool_prefix"; then
3076   # Extract the first word of "objdump", so it can be a program name with args.
3077 set dummy objdump; ac_word=$2
3078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3079 echo "configure:3080: checking for $ac_word" >&5
3080 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   if test -n "$OBJDUMP"; then
3084   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3085 else
3086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3087   ac_dummy="$PATH"
3088   for ac_dir in $ac_dummy; do
3089     test -z "$ac_dir" && ac_dir=.
3090     if test -f $ac_dir/$ac_word; then
3091       ac_cv_prog_OBJDUMP="objdump"
3092       break
3093     fi
3094   done
3095   IFS="$ac_save_ifs"
3096   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3097 fi
3098 fi
3099 OBJDUMP="$ac_cv_prog_OBJDUMP"
3100 if test -n "$OBJDUMP"; then
3101   echo "$ac_t""$OBJDUMP" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 else
3107   OBJDUMP="false"
3108 fi
3109 fi
3110
3111   ;;
3112
3113 esac
3114
3115
3116 # Save cache, so that ltconfig can load it
3117
3118
3119 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3120 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3121 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3122 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3123 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3124 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3125 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3126 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3127
3128 # Reload cache, that may have been modified by ltconfig
3129
3130
3131 # This can be used to rebuild libtool when needed
3132 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3133
3134 # Always use our own libtool.
3135 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3136
3137 # Redirect the config.log output again, so that the ltconfig log is not
3138 # clobbered by the next message.
3139 exec 5>>./config.log
3140
3141
3142 for ac_prog in mawk gawk nawk awk
3143 do
3144 # Extract the first word of "$ac_prog", so it can be a program name with args.
3145 set dummy $ac_prog; ac_word=$2
3146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3147 echo "configure:3148: checking for $ac_word" >&5
3148 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   if test -n "$AWK"; then
3152   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3153 else
3154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3155   ac_dummy="$PATH"
3156   for ac_dir in $ac_dummy; do
3157     test -z "$ac_dir" && ac_dir=.
3158     if test -f $ac_dir/$ac_word; then
3159       ac_cv_prog_AWK="$ac_prog"
3160       break
3161     fi
3162   done
3163   IFS="$ac_save_ifs"
3164 fi
3165 fi
3166 AWK="$ac_cv_prog_AWK"
3167 if test -n "$AWK"; then
3168   echo "$ac_t""$AWK" 1>&6
3169 else
3170   echo "$ac_t""no" 1>&6
3171 fi
3172
3173 test -n "$AWK" && break
3174 done
3175
3176 # test for ln hardlink support
3177 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3178 echo "configure:3179: checking whether ln works" >&5
3179 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3180   echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182   rm -f conftest.src conftest.dst
3183 echo "conftest" > conftest.src
3184 if ln conftest.src conftest.dst 2>/dev/null
3185 then
3186   ol_cv_prog_LN_H="ln"
3187 else
3188   ol_cv_prog_LN_H="cp"
3189 fi
3190 rm -f conftest.src conftest.dst
3191
3192 fi
3193 LN_H="$ol_cv_prog_LN_H"
3194 if test "$ol_cv_prog_LN_H" = "ln"; then
3195         echo "$ac_t""yes" 1>&6
3196 else
3197         echo "$ac_t""no" 1>&6
3198 fi
3199
3200 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3201 echo "configure:3202: checking whether ln -s works" >&5
3202 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3203   echo $ac_n "(cached) $ac_c" 1>&6
3204 else
3205   rm -f conftestdata
3206 if ln -s X conftestdata 2>/dev/null
3207 then
3208   rm -f conftestdata
3209   ac_cv_prog_LN_S="ln -s"
3210 else
3211   ac_cv_prog_LN_S=ln
3212 fi
3213 fi
3214 LN_S="$ac_cv_prog_LN_S"
3215 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3216   echo "$ac_t""yes" 1>&6
3217 else
3218   echo "$ac_t""no" 1>&6
3219 fi
3220
3221
3222 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3223         LN_S="$LN_H"
3224 fi
3225
3226 # Extract the first word of "sendmail", so it can be a program name with args.
3227 set dummy sendmail; ac_word=$2
3228 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3229 echo "configure:3230: checking for $ac_word" >&5
3230 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3231   echo $ac_n "(cached) $ac_c" 1>&6
3232 else
3233   case "$SENDMAIL" in
3234   /*)
3235   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3236   ;;
3237   ?:/*)
3238   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3239   ;;
3240   *)
3241   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3242   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3243   for ac_dir in $ac_dummy; do 
3244     test -z "$ac_dir" && ac_dir=.
3245     if test -f $ac_dir/$ac_word; then
3246       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3247       break
3248     fi
3249   done
3250   IFS="$ac_save_ifs"
3251   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3252   ;;
3253 esac
3254 fi
3255 SENDMAIL="$ac_cv_path_SENDMAIL"
3256 if test -n "$SENDMAIL"; then
3257   echo "$ac_t""$SENDMAIL" 1>&6
3258 else
3259   echo "$ac_t""no" 1>&6
3260 fi
3261
3262 # Extract the first word of "vi", so it can be a program name with args.
3263 set dummy vi; ac_word=$2
3264 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3265 echo "configure:3266: checking for $ac_word" >&5
3266 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269   case "$EDITOR" in
3270   /*)
3271   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3272   ;;
3273   ?:/*)
3274   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3275   ;;
3276   *)
3277   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3278   ac_dummy="$PATH:/usr/ucb"
3279   for ac_dir in $ac_dummy; do 
3280     test -z "$ac_dir" && ac_dir=.
3281     if test -f $ac_dir/$ac_word; then
3282       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3283       break
3284     fi
3285   done
3286   IFS="$ac_save_ifs"
3287   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3288   ;;
3289 esac
3290 fi
3291 EDITOR="$ac_cv_path_EDITOR"
3292 if test -n "$EDITOR"; then
3293   echo "$ac_t""$EDITOR" 1>&6
3294 else
3295   echo "$ac_t""no" 1>&6
3296 fi
3297
3298 # Extract the first word of "finger", so it can be a program name with args.
3299 set dummy finger; ac_word=$2
3300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3301 echo "configure:3302: checking for $ac_word" >&5
3302 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   case "$FINGER" in
3306   /*)
3307   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3308   ;;
3309   ?:/*)
3310   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3311   ;;
3312   *)
3313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3314   ac_dummy="$PATH:/usr/ucb"
3315   for ac_dir in $ac_dummy; do 
3316     test -z "$ac_dir" && ac_dir=.
3317     if test -f $ac_dir/$ac_word; then
3318       ac_cv_path_FINGER="$ac_dir/$ac_word"
3319       break
3320     fi
3321   done
3322   IFS="$ac_save_ifs"
3323   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3324   ;;
3325 esac
3326 fi
3327 FINGER="$ac_cv_path_FINGER"
3328 if test -n "$FINGER"; then
3329   echo "$ac_t""$FINGER" 1>&6
3330 else
3331   echo "$ac_t""no" 1>&6
3332 fi
3333
3334
3335 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3336 echo "configure:3337: checking how to run the C preprocessor" >&5
3337 # On Suns, sometimes $CPP names a directory.
3338 if test -n "$CPP" && test -d "$CPP"; then
3339   CPP=
3340 fi
3341 if test -z "$CPP"; then
3342 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3343   echo $ac_n "(cached) $ac_c" 1>&6
3344 else
3345     # This must be in double quotes, not single quotes, because CPP may get
3346   # substituted into the Makefile and "${CC-cc}" will confuse make.
3347   CPP="${CC-cc} -E"
3348   # On the NeXT, cc -E runs the code through the compiler's parser,
3349   # not just through cpp.
3350   cat > conftest.$ac_ext <<EOF
3351 #line 3352 "configure"
3352 #include "confdefs.h"
3353 #include <assert.h>
3354 Syntax Error
3355 EOF
3356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3357 { (eval echo configure:3358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3359 if test -z "$ac_err"; then
3360   :
3361 else
3362   echo "$ac_err" >&5
3363   echo "configure: failed program was:" >&5
3364   cat conftest.$ac_ext >&5
3365   rm -rf conftest*
3366   CPP="${CC-cc} -E -traditional-cpp"
3367   cat > conftest.$ac_ext <<EOF
3368 #line 3369 "configure"
3369 #include "confdefs.h"
3370 #include <assert.h>
3371 Syntax Error
3372 EOF
3373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3374 { (eval echo configure:3375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3376 if test -z "$ac_err"; then
3377   :
3378 else
3379   echo "$ac_err" >&5
3380   echo "configure: failed program was:" >&5
3381   cat conftest.$ac_ext >&5
3382   rm -rf conftest*
3383   CPP="${CC-cc} -nologo -E"
3384   cat > conftest.$ac_ext <<EOF
3385 #line 3386 "configure"
3386 #include "confdefs.h"
3387 #include <assert.h>
3388 Syntax Error
3389 EOF
3390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3391 { (eval echo configure:3392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3393 if test -z "$ac_err"; then
3394   :
3395 else
3396   echo "$ac_err" >&5
3397   echo "configure: failed program was:" >&5
3398   cat conftest.$ac_ext >&5
3399   rm -rf conftest*
3400   CPP=/lib/cpp
3401 fi
3402 rm -f conftest*
3403 fi
3404 rm -f conftest*
3405 fi
3406 rm -f conftest*
3407   ac_cv_prog_CPP="$CPP"
3408 fi
3409   CPP="$ac_cv_prog_CPP"
3410 else
3411   ac_cv_prog_CPP="$CPP"
3412 fi
3413 echo "$ac_t""$CPP" 1>&6
3414
3415
3416 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3417         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3418
3419 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3420         echo "configure: warning: programs compiled here do run here..." 1>&2
3421         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3422
3423 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3424         echo "configure: warning: programs compiled here do not run here..." 1>&2
3425         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3426 fi
3427
3428 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3429 echo "configure:3430: checking for AIX" >&5
3430 cat > conftest.$ac_ext <<EOF
3431 #line 3432 "configure"
3432 #include "confdefs.h"
3433 #ifdef _AIX
3434   yes
3435 #endif
3436
3437 EOF
3438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3439   egrep "yes" >/dev/null 2>&1; then
3440   rm -rf conftest*
3441   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3442 #define _ALL_SOURCE 1
3443 EOF
3444
3445 else
3446   rm -rf conftest*
3447   echo "$ac_t""no" 1>&6
3448 fi
3449 rm -f conftest*
3450
3451
3452 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3453 echo "configure:3454: checking for POSIXized ISC" >&5
3454 if test -d /etc/conf/kconfig.d &&
3455   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3456 then
3457   echo "$ac_t""yes" 1>&6
3458   ISC=yes # If later tests want to check for ISC.
3459   cat >> confdefs.h <<\EOF
3460 #define _POSIX_SOURCE 1
3461 EOF
3462
3463   if test "$GCC" = yes; then
3464     CC="$CC -posix"
3465   else
3466     CC="$CC -Xp"
3467   fi
3468 else
3469   echo "$ac_t""no" 1>&6
3470   ISC=
3471 fi
3472
3473 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3474 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3475 echo "configure:3476: checking for minix/config.h" >&5
3476 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   cat > conftest.$ac_ext <<EOF
3480 #line 3481 "configure"
3481 #include "confdefs.h"
3482 #include <minix/config.h>
3483 EOF
3484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3485 { (eval echo configure:3486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3487 if test -z "$ac_err"; then
3488   rm -rf conftest*
3489   eval "ac_cv_header_$ac_safe=yes"
3490 else
3491   echo "$ac_err" >&5
3492   echo "configure: failed program was:" >&5
3493   cat conftest.$ac_ext >&5
3494   rm -rf conftest*
3495   eval "ac_cv_header_$ac_safe=no"
3496 fi
3497 rm -f conftest*
3498 fi
3499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3500   echo "$ac_t""yes" 1>&6
3501   MINIX=yes
3502 else
3503   echo "$ac_t""no" 1>&6
3504 MINIX=
3505 fi
3506
3507 if test "$MINIX" = yes; then
3508   cat >> confdefs.h <<\EOF
3509 #define _POSIX_SOURCE 1
3510 EOF
3511
3512   cat >> confdefs.h <<\EOF
3513 #define _POSIX_1_SOURCE 2
3514 EOF
3515
3516   cat >> confdefs.h <<\EOF
3517 #define _MINIX 1
3518 EOF
3519
3520 fi
3521
3522
3523 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3524 echo "configure:3525: checking for Cygwin environment" >&5
3525 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3526   echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528   cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531
3532 int main() {
3533
3534 #ifndef __CYGWIN__
3535 #define __CYGWIN__ __CYGWIN32__
3536 #endif
3537 return __CYGWIN__;
3538 ; return 0; }
3539 EOF
3540 if { (eval echo configure:3541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3541   rm -rf conftest*
3542   ac_cv_cygwin=yes
3543 else
3544   echo "configure: failed program was:" >&5
3545   cat conftest.$ac_ext >&5
3546   rm -rf conftest*
3547   ac_cv_cygwin=no
3548 fi
3549 rm -f conftest*
3550 fi
3551
3552 echo "$ac_t""$ac_cv_cygwin" 1>&6
3553 CYGWIN=
3554 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3555 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3556 echo "configure:3557: checking for mingw32 environment" >&5
3557 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3558   echo $ac_n "(cached) $ac_c" 1>&6
3559 else
3560   cat > conftest.$ac_ext <<EOF
3561 #line 3562 "configure"
3562 #include "confdefs.h"
3563
3564 int main() {
3565 return __MINGW32__;
3566 ; return 0; }
3567 EOF
3568 if { (eval echo configure:3569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3569   rm -rf conftest*
3570   ac_cv_mingw32=yes
3571 else
3572   echo "configure: failed program was:" >&5
3573   cat conftest.$ac_ext >&5
3574   rm -rf conftest*
3575   ac_cv_mingw32=no
3576 fi
3577 rm -f conftest*
3578 fi
3579
3580 echo "$ac_t""$ac_cv_mingw32" 1>&6
3581 MINGW32=
3582 test "$ac_cv_mingw32" = yes && MINGW32=yes
3583 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3584 echo "configure:3585: checking for EMX OS/2 environment" >&5
3585 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3586   echo $ac_n "(cached) $ac_c" 1>&6
3587 else
3588   cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591
3592 int main() {
3593 return __EMX__;
3594 ; return 0; }
3595 EOF
3596 if { (eval echo configure:3597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3597   rm -rf conftest*
3598   ac_cv_emxos2=yes
3599 else
3600   echo "configure: failed program was:" >&5
3601   cat conftest.$ac_ext >&5
3602   rm -rf conftest*
3603   ac_cv_emxos2=no
3604 fi
3605 rm -f conftest*
3606 fi
3607
3608 echo "$ac_t""$ac_cv_emxos2" 1>&6
3609 EMXOS2=
3610 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3611
3612
3613
3614 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3615 echo "configure:3616: checking for executable suffix" >&5
3616 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3620   ac_cv_exeext=.exe
3621 else
3622   rm -f conftest*
3623   echo 'int main () { return 0; }' > conftest.$ac_ext
3624   ac_cv_exeext=
3625   if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3626     for file in conftest.*; do
3627       case $file in
3628       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3629       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3630       esac
3631     done
3632   else
3633     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3634   fi
3635   rm -f conftest*
3636   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3637 fi
3638 fi
3639
3640 EXEEXT=""
3641 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3642 echo "$ac_t""${ac_cv_exeext}" 1>&6
3643 ac_exeext=$EXEEXT
3644
3645 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3646 echo "configure:3647: checking for object suffix" >&5
3647 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3648   echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650   rm -f conftest*
3651 echo 'int i = 1;' > conftest.$ac_ext
3652 if { (eval echo configure:3653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3653   for ac_file in conftest.*; do
3654     case $ac_file in
3655     *.c) ;;
3656     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3657     esac
3658   done
3659 else
3660   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3661 fi
3662 rm -f conftest*
3663 fi
3664
3665 echo "$ac_t""$ac_cv_objext" 1>&6
3666 OBJEXT=$ac_cv_objext
3667 ac_objext=$ac_cv_objext
3668
3669
3670 cat >> confdefs.h <<EOF
3671 #define EXEEXT "${EXEEXT}"
3672 EOF
3673
3674
3675 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3676 echo "configure:3677: checking for be_app in -lbe" >&5
3677 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3678 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3679   echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681   ac_save_LIBS="$LIBS"
3682 LIBS="-lbe -lroot -lnet $LIBS"
3683 cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 /* Override any gcc2 internal prototype to avoid an error.  */
3687 /* We use char because int might match the return type of a gcc2
3688     builtin and then its argument prototype would still apply.  */
3689 char be_app();
3690
3691 int main() {
3692 be_app()
3693 ; return 0; }
3694 EOF
3695 if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3696   rm -rf conftest*
3697   eval "ac_cv_lib_$ac_lib_var=yes"
3698 else
3699   echo "configure: failed program was:" >&5
3700   cat conftest.$ac_ext >&5
3701   rm -rf conftest*
3702   eval "ac_cv_lib_$ac_lib_var=no"
3703 fi
3704 rm -f conftest*
3705 LIBS="$ac_save_LIBS"
3706
3707 fi
3708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3709   echo "$ac_t""yes" 1>&6
3710   LIBS="$LIBS -lbe -lroot -lnet"
3711 else
3712   echo "$ac_t""no" 1>&6
3713 :
3714 fi
3715
3716
3717
3718
3719
3720 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3721 echo "configure:3722: checking for ${CC-cc} option to accept ANSI C" >&5
3722 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3723   echo $ac_n "(cached) $ac_c" 1>&6
3724 else
3725   am_cv_prog_cc_stdc=no
3726 ac_save_CC="$CC"
3727 # Don't try gcc -ansi; that turns off useful extensions and
3728 # breaks some systems' header files.
3729 # AIX                   -qlanglvl=ansi
3730 # Ultrix and OSF/1      -std1
3731 # HP-UX 10.20 and later -Ae
3732 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3733 # SVR4                  -Xc -D__EXTENSIONS__
3734 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3735 do
3736   CC="$ac_save_CC $ac_arg"
3737   cat > conftest.$ac_ext <<EOF
3738 #line 3739 "configure"
3739 #include "confdefs.h"
3740 #include <stdarg.h>
3741 #include <stdio.h>
3742 #include <sys/types.h>
3743 #include <sys/stat.h>
3744 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3745 struct buf { int x; };
3746 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3747 static char *e (p, i)
3748      char **p;
3749      int i;
3750 {
3751   return p[i];
3752 }
3753 static char *f (char * (*g) (char **, int), char **p, ...)
3754 {
3755   char *s;
3756   va_list v;
3757   va_start (v,p);
3758   s = g (p, va_arg (v,int));
3759   va_end (v);
3760   return s;
3761 }
3762 int test (int i, double x);
3763 struct s1 {int (*f) (int a);};
3764 struct s2 {int (*f) (double a);};
3765 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3766 int argc;
3767 char **argv;
3768
3769 int main() {
3770
3771 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3772
3773 ; return 0; }
3774 EOF
3775 if { (eval echo configure:3776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3776   rm -rf conftest*
3777   am_cv_prog_cc_stdc="$ac_arg"; break
3778 else
3779   echo "configure: failed program was:" >&5
3780   cat conftest.$ac_ext >&5
3781 fi
3782 rm -f conftest*
3783 done
3784 CC="$ac_save_CC"
3785
3786 fi
3787
3788 if test -z "$am_cv_prog_cc_stdc"; then
3789   echo "$ac_t""none needed" 1>&6
3790 else
3791   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3792 fi
3793 case "x$am_cv_prog_cc_stdc" in
3794   x|xno) ;;
3795   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3796 esac
3797
3798 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3799         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3800 fi
3801
3802 # test for make depend flag
3803 OL_MKDEP=
3804 OL_MKDEP_FLAGS=
3805 if test -z "${MKDEP}"; then
3806         OL_MKDEP="${CC-cc}"
3807         if test -z "${MKDEP_FLAGS}"; then
3808                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3809 echo "configure:3810: checking for ${OL_MKDEP} depend flag" >&5
3810 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   
3814                         ol_cv_mkdep=no
3815                         for flag in "-M" "-xM"; do
3816                                 cat > conftest.c <<EOF
3817  noCode;
3818 EOF
3819                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3820                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3821                                 then
3822                                         if test ! -f conftest."${ac_object}" ; then
3823                                                 ol_cv_mkdep=$flag
3824                                                 OL_MKDEP_FLAGS="$flag"
3825                                                 break
3826                                         fi
3827                                 fi
3828                         done
3829                         rm -f conftest*
3830                 
3831 fi
3832
3833 echo "$ac_t""$ol_cv_mkdep" 1>&6
3834         else
3835                 cc_cv_mkdep=yes
3836                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3837         fi
3838 else
3839         cc_cv_mkdep=yes
3840         OL_MKDEP="${MKDEP}"
3841         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3842 fi
3843
3844
3845
3846 if test "${ol_cv_mkdep}" = no ; then
3847         # this will soon become an error
3848         echo "configure: warning: do not know how to generate dependencies" 1>&2
3849 fi
3850
3851 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3852 echo "configure:3853: checking for afopen in -ls" >&5
3853 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3854 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3855   echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857   ac_save_LIBS="$LIBS"
3858 LIBS="-ls  $LIBS"
3859 cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 /* Override any gcc2 internal prototype to avoid an error.  */
3863 /* We use char because int might match the return type of a gcc2
3864     builtin and then its argument prototype would still apply.  */
3865 char afopen();
3866
3867 int main() {
3868 afopen()
3869 ; return 0; }
3870 EOF
3871 if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3872   rm -rf conftest*
3873   eval "ac_cv_lib_$ac_lib_var=yes"
3874 else
3875   echo "configure: failed program was:" >&5
3876   cat conftest.$ac_ext >&5
3877   rm -rf conftest*
3878   eval "ac_cv_lib_$ac_lib_var=no"
3879 fi
3880 rm -f conftest*
3881 LIBS="$ac_save_LIBS"
3882
3883 fi
3884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3885   echo "$ac_t""yes" 1>&6
3886   
3887         AUTH_LIBS=-ls
3888         cat >> confdefs.h <<\EOF
3889 #define HAVE_AIX_SECURITY 1
3890 EOF
3891
3892
3893 else
3894   echo "$ac_t""no" 1>&6
3895 fi
3896
3897
3898
3899 for ac_func in getaddrinfo 
3900 do
3901 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3902 echo "configure:3903: checking for $ac_func" >&5
3903 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3904   echo $ac_n "(cached) $ac_c" 1>&6
3905 else
3906   cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 /* System header to define __stub macros and hopefully few prototypes,
3910     which can conflict with char $ac_func(); below.  */
3911 #include <assert.h>
3912 /* Override any gcc2 internal prototype to avoid an error.  */
3913 /* We use char because int might match the return type of a gcc2
3914     builtin and then its argument prototype would still apply.  */
3915 char $ac_func();
3916 char (*f)();
3917
3918 int main() {
3919
3920 /* The GNU C library defines this for functions which it implements
3921     to always fail with ENOSYS.  Some functions are actually named
3922     something starting with __ and the normal name is an alias.  */
3923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3924 choke me
3925 #else
3926 f = $ac_func;
3927 #endif
3928
3929 ; return 0; }
3930 EOF
3931 if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3932   rm -rf conftest*
3933   eval "ac_cv_func_$ac_func=yes"
3934 else
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -rf conftest*
3938   eval "ac_cv_func_$ac_func=no"
3939 fi
3940 rm -f conftest*
3941 fi
3942
3943 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3944   echo "$ac_t""yes" 1>&6
3945     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3946   cat >> confdefs.h <<EOF
3947 #define $ac_tr_func 1
3948 EOF
3949  
3950 else
3951   echo "$ac_t""no" 1>&6
3952 fi
3953 done
3954
3955
3956 if test $ac_cv_func_getaddrinfo = no ; then
3957         if test $ol_enable_ipv6 = yes ; then
3958                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
3959         fi
3960         ol_enable_ipv6=no
3961 fi
3962
3963 if test $ol_enable_unix != no ; then
3964         for ac_hdr in sys/un.h 
3965 do
3966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3968 echo "configure:3969: checking for $ac_hdr" >&5
3969 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3970   echo $ac_n "(cached) $ac_c" 1>&6
3971 else
3972   cat > conftest.$ac_ext <<EOF
3973 #line 3974 "configure"
3974 #include "confdefs.h"
3975 #include <$ac_hdr>
3976 EOF
3977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3978 { (eval echo configure:3979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3980 if test -z "$ac_err"; then
3981   rm -rf conftest*
3982   eval "ac_cv_header_$ac_safe=yes"
3983 else
3984   echo "$ac_err" >&5
3985   echo "configure: failed program was:" >&5
3986   cat conftest.$ac_ext >&5
3987   rm -rf conftest*
3988   eval "ac_cv_header_$ac_safe=no"
3989 fi
3990 rm -f conftest*
3991 fi
3992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3993   echo "$ac_t""yes" 1>&6
3994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3995   cat >> confdefs.h <<EOF
3996 #define $ac_tr_hdr 1
3997 EOF
3998  
3999 else
4000   echo "$ac_t""no" 1>&6
4001 fi
4002 done
4003
4004
4005         if test $ol_enable_unix = auto ; then
4006                 ol_enable_unix=$ac_cv_header_sys_un_h
4007         elif test $ac_cv_header_sys_un_h = no ; then
4008                 { echo "configure: error: UNIX domain support requires sys/un.h" 1>&2; exit 1; }
4009         fi
4010 fi
4011
4012 ol_link_modules=no
4013 if test $ol_enable_modules != no ; then
4014         for ac_hdr in ltdl.h
4015 do
4016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4018 echo "configure:4019: checking for $ac_hdr" >&5
4019 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4020   echo $ac_n "(cached) $ac_c" 1>&6
4021 else
4022   cat > conftest.$ac_ext <<EOF
4023 #line 4024 "configure"
4024 #include "confdefs.h"
4025 #include <$ac_hdr>
4026 EOF
4027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4028 { (eval echo configure:4029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4030 if test -z "$ac_err"; then
4031   rm -rf conftest*
4032   eval "ac_cv_header_$ac_safe=yes"
4033 else
4034   echo "$ac_err" >&5
4035   echo "configure: failed program was:" >&5
4036   cat conftest.$ac_ext >&5
4037   rm -rf conftest*
4038   eval "ac_cv_header_$ac_safe=no"
4039 fi
4040 rm -f conftest*
4041 fi
4042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4043   echo "$ac_t""yes" 1>&6
4044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4045   cat >> confdefs.h <<EOF
4046 #define $ac_tr_hdr 1
4047 EOF
4048  
4049 else
4050   echo "$ac_t""no" 1>&6
4051 fi
4052 done
4053
4054
4055         if test $ac_cv_header_ltdl_h = no ; then
4056                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4057         fi
4058
4059         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4060 echo "configure:4061: checking for lt_dlinit in -lltdl" >&5
4061 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4062 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4063   echo $ac_n "(cached) $ac_c" 1>&6
4064 else
4065   ac_save_LIBS="$LIBS"
4066 LIBS="-lltdl  $LIBS"
4067 cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070 /* Override any gcc2 internal prototype to avoid an error.  */
4071 /* We use char because int might match the return type of a gcc2
4072     builtin and then its argument prototype would still apply.  */
4073 char lt_dlinit();
4074
4075 int main() {
4076 lt_dlinit()
4077 ; return 0; }
4078 EOF
4079 if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4080   rm -rf conftest*
4081   eval "ac_cv_lib_$ac_lib_var=yes"
4082 else
4083   echo "configure: failed program was:" >&5
4084   cat conftest.$ac_ext >&5
4085   rm -rf conftest*
4086   eval "ac_cv_lib_$ac_lib_var=no"
4087 fi
4088 rm -f conftest*
4089 LIBS="$ac_save_LIBS"
4090
4091 fi
4092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4093   echo "$ac_t""yes" 1>&6
4094   
4095             MODULES_LIBS=-lltdl
4096             cat >> confdefs.h <<\EOF
4097 #define HAVE_LIBLTDL 1
4098 EOF
4099
4100         
4101 else
4102   echo "$ac_t""no" 1>&6
4103 fi
4104
4105
4106         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4107                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4108         fi
4109         ol_link_modules=yes
4110 else
4111         ol_with_dnssrv_module=static
4112         ol_with_ldap_module=static
4113         ol_with_ldbm_module=static
4114         ol_with_passwd_module=static
4115         ol_with_shell_module=static
4116 fi
4117
4118 # test for EBCDIC
4119 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4120 echo "configure:4121: checking for EBCDIC" >&5
4121 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4122   echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124   
4125         cat > conftest.$ac_ext <<EOF
4126 #line 4127 "configure"
4127 #include "confdefs.h"
4128
4129 #if !('M' == 0xd4)
4130 #include <__ASCII__/generate_error.h>
4131 #endif
4132
4133 EOF
4134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4135 { (eval echo configure:4136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4137 if test -z "$ac_err"; then
4138   rm -rf conftest*
4139   ol_cv_cpp_ebcdic=yes
4140 else
4141   echo "$ac_err" >&5
4142   echo "configure: failed program was:" >&5
4143   cat conftest.$ac_ext >&5
4144   rm -rf conftest*
4145   ol_cv_cpp_ebcdic=no
4146 fi
4147 rm -f conftest*
4148 fi
4149
4150 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4151 if test $ol_cv_cpp_ebcdic = yes ; then
4152         cat >> confdefs.h <<\EOF
4153 #define HAVE_EBCDIC 1
4154 EOF
4155
4156 fi
4157
4158 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4159 echo "configure:4160: checking for ANSI C header files" >&5
4160 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4161   echo $ac_n "(cached) $ac_c" 1>&6
4162 else
4163   cat > conftest.$ac_ext <<EOF
4164 #line 4165 "configure"
4165 #include "confdefs.h"
4166 #include <stdlib.h>
4167 #include <stdarg.h>
4168 #include <string.h>
4169 #include <float.h>
4170 EOF
4171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4172 { (eval echo configure:4173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4174 if test -z "$ac_err"; then
4175   rm -rf conftest*
4176   ol_cv_header_stdc=yes
4177 else
4178   echo "$ac_err" >&5
4179   echo "configure: failed program was:" >&5
4180   cat conftest.$ac_ext >&5
4181   rm -rf conftest*
4182   ol_cv_header_stdc=no
4183 fi
4184 rm -f conftest*
4185
4186 if test $ol_cv_header_stdc = yes; then
4187   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4188 cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <string.h>
4192 EOF
4193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4194   egrep "memchr" >/dev/null 2>&1; then
4195   :
4196 else
4197   rm -rf conftest*
4198   ol_cv_header_stdc=no
4199 fi
4200 rm -f conftest*
4201
4202 fi
4203
4204 if test $ol_cv_header_stdc = yes; then
4205   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4206 cat > conftest.$ac_ext <<EOF
4207 #line 4208 "configure"
4208 #include "confdefs.h"
4209 #include <stdlib.h>
4210 EOF
4211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4212   egrep "free" >/dev/null 2>&1; then
4213   :
4214 else
4215   rm -rf conftest*
4216   ol_cv_header_stdc=no
4217 fi
4218 rm -f conftest*
4219
4220 fi
4221
4222 if test $ol_cv_header_stdc = yes; then
4223   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4224 if test "$cross_compiling" = yes; then
4225   :
4226 else
4227   cat > conftest.$ac_ext <<EOF
4228 #line 4229 "configure"
4229 #include "confdefs.h"
4230 #include <ctype.h>
4231 #ifndef HAVE_EBCDIC
4232 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4233 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4234 #else
4235 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4236                 || ('j' <= (c) && (c) <= 'r') \
4237                 || ('s' <= (c) && (c) <= 'z'))
4238 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4239 #endif
4240 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4241 int main () { int i; for (i = 0; i < 256; i++)
4242 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4243 exit (0); }
4244
4245 EOF
4246 if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4247 then
4248   :
4249 else
4250   echo "configure: failed program was:" >&5
4251   cat conftest.$ac_ext >&5
4252   rm -fr conftest*
4253   ol_cv_header_stdc=no
4254 fi
4255 rm -fr conftest*
4256 fi
4257
4258 fi
4259 fi
4260
4261 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4262 if test $ol_cv_header_stdc = yes; then
4263   cat >> confdefs.h <<\EOF
4264 #define STDC_HEADERS 1
4265 EOF
4266
4267 fi
4268 ac_cv_header_stdc=disable
4269
4270
4271 if test $ol_cv_header_stdc != yes; then
4272         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4273 fi
4274
4275 ac_header_dirent=no
4276 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4277 do
4278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4279 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4280 echo "configure:4281: checking for $ac_hdr that defines DIR" >&5
4281 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4282   echo $ac_n "(cached) $ac_c" 1>&6
4283 else
4284   cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include <sys/types.h>
4288 #include <$ac_hdr>
4289 int main() {
4290 DIR *dirp = 0;
4291 ; return 0; }
4292 EOF
4293 if { (eval echo configure:4294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4294   rm -rf conftest*
4295   eval "ac_cv_header_dirent_$ac_safe=yes"
4296 else
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -rf conftest*
4300   eval "ac_cv_header_dirent_$ac_safe=no"
4301 fi
4302 rm -f conftest*
4303 fi
4304 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4305   echo "$ac_t""yes" 1>&6
4306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4307   cat >> confdefs.h <<EOF
4308 #define $ac_tr_hdr 1
4309 EOF
4310  ac_header_dirent=$ac_hdr; break
4311 else
4312   echo "$ac_t""no" 1>&6
4313 fi
4314 done
4315 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4316 if test $ac_header_dirent = dirent.h; then
4317 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4318 echo "configure:4319: checking for opendir in -ldir" >&5
4319 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323   ac_save_LIBS="$LIBS"
4324 LIBS="-ldir  $LIBS"
4325 cat > conftest.$ac_ext <<EOF
4326 #line 4327 "configure"
4327 #include "confdefs.h"
4328 /* Override any gcc2 internal prototype to avoid an error.  */
4329 /* We use char because int might match the return type of a gcc2
4330     builtin and then its argument prototype would still apply.  */
4331 char opendir();
4332
4333 int main() {
4334 opendir()
4335 ; return 0; }
4336 EOF
4337 if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4338   rm -rf conftest*
4339   eval "ac_cv_lib_$ac_lib_var=yes"
4340 else
4341   echo "configure: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   rm -rf conftest*
4344   eval "ac_cv_lib_$ac_lib_var=no"
4345 fi
4346 rm -f conftest*
4347 LIBS="$ac_save_LIBS"
4348
4349 fi
4350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4351   echo "$ac_t""yes" 1>&6
4352   LIBS="$LIBS -ldir"
4353 else
4354   echo "$ac_t""no" 1>&6
4355 fi
4356
4357 else
4358 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4359 echo "configure:4360: checking for opendir in -lx" >&5
4360 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4361 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4362   echo $ac_n "(cached) $ac_c" 1>&6
4363 else
4364   ac_save_LIBS="$LIBS"
4365 LIBS="-lx  $LIBS"
4366 cat > conftest.$ac_ext <<EOF
4367 #line 4368 "configure"
4368 #include "confdefs.h"
4369 /* Override any gcc2 internal prototype to avoid an error.  */
4370 /* We use char because int might match the return type of a gcc2
4371     builtin and then its argument prototype would still apply.  */
4372 char opendir();
4373
4374 int main() {
4375 opendir()
4376 ; return 0; }
4377 EOF
4378 if { (eval echo configure:4379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4379   rm -rf conftest*
4380   eval "ac_cv_lib_$ac_lib_var=yes"
4381 else
4382   echo "configure: failed program was:" >&5
4383   cat conftest.$ac_ext >&5
4384   rm -rf conftest*
4385   eval "ac_cv_lib_$ac_lib_var=no"
4386 fi
4387 rm -f conftest*
4388 LIBS="$ac_save_LIBS"
4389
4390 fi
4391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4392   echo "$ac_t""yes" 1>&6
4393   LIBS="$LIBS -lx"
4394 else
4395   echo "$ac_t""no" 1>&6
4396 fi
4397
4398 fi
4399
4400 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4401 echo "configure:4402: checking for sys/wait.h that is POSIX.1 compatible" >&5
4402 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4403   echo $ac_n "(cached) $ac_c" 1>&6
4404 else
4405   cat > conftest.$ac_ext <<EOF
4406 #line 4407 "configure"
4407 #include "confdefs.h"
4408 #include <sys/types.h>
4409 #include <sys/wait.h>
4410 #ifndef WEXITSTATUS
4411 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4412 #endif
4413 #ifndef WIFEXITED
4414 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4415 #endif
4416 int main() {
4417 int s;
4418 wait (&s);
4419 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4420 ; return 0; }
4421 EOF
4422 if { (eval echo configure:4423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4423   rm -rf conftest*
4424   ac_cv_header_sys_wait_h=yes
4425 else
4426   echo "configure: failed program was:" >&5
4427   cat conftest.$ac_ext >&5
4428   rm -rf conftest*
4429   ac_cv_header_sys_wait_h=no
4430 fi
4431 rm -f conftest*
4432 fi
4433
4434 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4435 if test $ac_cv_header_sys_wait_h = yes; then
4436   cat >> confdefs.h <<\EOF
4437 #define HAVE_SYS_WAIT_H 1
4438 EOF
4439
4440 fi
4441
4442 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4443 echo "configure:4444: checking POSIX termios" >&5
4444 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4445   echo $ac_n "(cached) $ac_c" 1>&6
4446 else
4447   cat > conftest.$ac_ext <<EOF
4448 #line 4449 "configure"
4449 #include "confdefs.h"
4450 #include <sys/types.h>
4451 #include <unistd.h>
4452 #include <termios.h>
4453 int main() {
4454 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4455    tcgetattr(0, 0);
4456 ; return 0; }
4457 EOF
4458 if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4459   rm -rf conftest*
4460   am_cv_sys_posix_termios=yes
4461 else
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464   rm -rf conftest*
4465   am_cv_sys_posix_termios=no
4466 fi
4467 rm -f conftest*
4468 fi
4469
4470 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4471
4472
4473  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4474 echo "configure:4475: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4475 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4476   echo $ac_n "(cached) $ac_c" 1>&6
4477 else
4478   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4479
4480   gwinsz_in_termios_h=no
4481   if test $am_cv_sys_posix_termios = yes; then
4482     cat > conftest.$ac_ext <<EOF
4483 #line 4484 "configure"
4484 #include "confdefs.h"
4485 #include <sys/types.h>
4486 #     include <termios.h>
4487 #     ifdef TIOCGWINSZ
4488         yes
4489 #     endif
4490     
4491 EOF
4492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4493   egrep "yes" >/dev/null 2>&1; then
4494   rm -rf conftest*
4495   gwinsz_in_termios_h=yes
4496 fi
4497 rm -f conftest*
4498
4499   fi
4500
4501   if test $gwinsz_in_termios_h = no; then
4502     cat > conftest.$ac_ext <<EOF
4503 #line 4504 "configure"
4504 #include "confdefs.h"
4505 #include <sys/types.h>
4506 #     include <sys/ioctl.h>
4507 #     ifdef TIOCGWINSZ
4508         yes
4509 #     endif
4510     
4511 EOF
4512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4513   egrep "yes" >/dev/null 2>&1; then
4514   rm -rf conftest*
4515   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4516 fi
4517 rm -f conftest*
4518
4519   fi
4520   
4521 fi
4522
4523 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4524   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4525     cat >> confdefs.h <<\EOF
4526 #define GWINSZ_IN_SYS_IOCTL 1
4527 EOF
4528
4529   fi
4530
4531 if test $am_cv_sys_posix_termios = yes ; then
4532         cat >> confdefs.h <<\EOF
4533 #define HAVE_POSIX_TERMIOS 1
4534 EOF
4535
4536 fi
4537
4538 for ac_hdr in \
4539         arpa/inet.h             \
4540         arpa/nameser.h  \
4541         assert.h                \
4542         conio.h                 \
4543         crypt.h                 \
4544         direct.h                \
4545         errno.h                 \
4546         fcntl.h                 \
4547         filio.h                 \
4548         getopt.h                \
4549         grp.h                   \
4550         io.h                    \
4551         libutil.h               \
4552         limits.h                \
4553         locale.h                \
4554         netinet/tcp.h   \
4555         malloc.h                \
4556         memory.h                \
4557         psap.h                  \
4558         pwd.h                   \
4559         process.h               \
4560         resolv.h                \
4561         sgtty.h                 \
4562         shadow.h                \
4563         stddef.h                \
4564         string.h                \
4565         strings.h               \
4566         sysexits.h              \
4567         sys/file.h              \
4568         sys/filio.h             \
4569         sys/errno.h             \
4570         sys/ioctl.h             \
4571         sys/param.h             \
4572         sys/resource.h  \
4573         sys/select.h    \
4574         sys/socket.h    \
4575         sys/syslog.h    \
4576         sys/time.h              \
4577         sys/types.h             \
4578         syslog.h                \
4579         termios.h               \
4580         unistd.h                \
4581         winsock.h               \
4582
4583 do
4584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4585 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4586 echo "configure:4587: checking for $ac_hdr" >&5
4587 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4588   echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590   cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 #include <$ac_hdr>
4594 EOF
4595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4596 { (eval echo configure:4597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4598 if test -z "$ac_err"; then
4599   rm -rf conftest*
4600   eval "ac_cv_header_$ac_safe=yes"
4601 else
4602   echo "$ac_err" >&5
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   eval "ac_cv_header_$ac_safe=no"
4607 fi
4608 rm -f conftest*
4609 fi
4610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4611   echo "$ac_t""yes" 1>&6
4612     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4613   cat >> confdefs.h <<EOF
4614 #define $ac_tr_hdr 1
4615 EOF
4616  
4617 else
4618   echo "$ac_t""no" 1>&6
4619 fi
4620 done
4621
4622
4623
4624
4625 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4626 echo "configure:4627: checking for sigset in -lV3" >&5
4627 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4629   echo $ac_n "(cached) $ac_c" 1>&6
4630 else
4631   ac_save_LIBS="$LIBS"
4632 LIBS="-lV3  $LIBS"
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 /* Override any gcc2 internal prototype to avoid an error.  */
4637 /* We use char because int might match the return type of a gcc2
4638     builtin and then its argument prototype would still apply.  */
4639 char sigset();
4640
4641 int main() {
4642 sigset()
4643 ; return 0; }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4646   rm -rf conftest*
4647   eval "ac_cv_lib_$ac_lib_var=yes"
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -rf conftest*
4652   eval "ac_cv_lib_$ac_lib_var=no"
4653 fi
4654 rm -f conftest*
4655 LIBS="$ac_save_LIBS"
4656
4657 fi
4658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4659   echo "$ac_t""yes" 1>&6
4660     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4661     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4662   cat >> confdefs.h <<EOF
4663 #define $ac_tr_lib 1
4664 EOF
4665
4666   LIBS="-lV3 $LIBS"
4667
4668 else
4669   echo "$ac_t""no" 1>&6
4670 fi
4671
4672
4673 if test $ac_cv_header_winsock_h = yes; then
4674         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4675 echo "configure:4676: checking for winsock" >&5
4676 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4677   echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679   cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682 #include <winsock.h>
4683 int main() {
4684
4685                         socket(0,0,0);
4686                         select(0,NULL,NULL,NULL,NULL);
4687                         closesocket(0);
4688                         gethostname(NULL,0);
4689         
4690 ; return 0; }
4691 EOF
4692 if { (eval echo configure:4693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4693   rm -rf conftest*
4694   ol_cv_winsock=yes
4695 else
4696   echo "configure: failed program was:" >&5
4697   cat conftest.$ac_ext >&5
4698   rm -rf conftest*
4699   ol_cv_winsock=no
4700 fi
4701 rm -f conftest*]
4702 fi
4703
4704 echo "$ac_t""$ol_cv_winsock" 1>&6
4705
4706         if test $ol_cv_winsock = yes ; then
4707                 cat >> confdefs.h <<\EOF
4708 #define HAVE_WINSOCK 1
4709 EOF
4710
4711                 ac_cv_func_socket=yes
4712                 ac_cv_func_select=yes
4713                 ac_cv_func_closesocket=yes
4714                 ac_cv_func_gethostname=yes
4715         fi
4716 fi
4717
4718
4719 echo $ac_n "checking for socket""... $ac_c" 1>&6
4720 echo "configure:4721: checking for socket" >&5
4721 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4722   echo $ac_n "(cached) $ac_c" 1>&6
4723 else
4724   cat > conftest.$ac_ext <<EOF
4725 #line 4726 "configure"
4726 #include "confdefs.h"
4727 /* System header to define __stub macros and hopefully few prototypes,
4728     which can conflict with char socket(); below.  */
4729 #include <assert.h>
4730 /* Override any gcc2 internal prototype to avoid an error.  */
4731 /* We use char because int might match the return type of a gcc2
4732     builtin and then its argument prototype would still apply.  */
4733 char socket();
4734 char (*f)();
4735
4736 int main() {
4737
4738 /* The GNU C library defines this for functions which it implements
4739     to always fail with ENOSYS.  Some functions are actually named
4740     something starting with __ and the normal name is an alias.  */
4741 #if defined (__stub_socket) || defined (__stub___socket)
4742 choke me
4743 #else
4744 f = socket;
4745 #endif
4746
4747 ; return 0; }
4748 EOF
4749 if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4750   rm -rf conftest*
4751   eval "ac_cv_func_socket=yes"
4752 else
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755   rm -rf conftest*
4756   eval "ac_cv_func_socket=no"
4757 fi
4758 rm -f conftest*
4759 fi
4760
4761 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4762   echo "$ac_t""yes" 1>&6
4763   :
4764 else
4765   echo "$ac_t""no" 1>&6
4766         
4767         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4768 echo "configure:4769: checking for main in -lsocket" >&5
4769 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4770 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4771   echo $ac_n "(cached) $ac_c" 1>&6
4772 else
4773   ac_save_LIBS="$LIBS"
4774 LIBS="-lsocket  $LIBS"
4775 cat > conftest.$ac_ext <<EOF
4776 #line 4777 "configure"
4777 #include "confdefs.h"
4778
4779 int main() {
4780 main()
4781 ; return 0; }
4782 EOF
4783 if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784   rm -rf conftest*
4785   eval "ac_cv_lib_$ac_lib_var=yes"
4786 else
4787   echo "configure: failed program was:" >&5
4788   cat conftest.$ac_ext >&5
4789   rm -rf conftest*
4790   eval "ac_cv_lib_$ac_lib_var=no"
4791 fi
4792 rm -f conftest*
4793 LIBS="$ac_save_LIBS"
4794
4795 fi
4796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4797   echo "$ac_t""yes" 1>&6
4798     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4799     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4800   cat >> confdefs.h <<EOF
4801 #define $ac_tr_lib 1
4802 EOF
4803
4804   LIBS="-lsocket $LIBS"
4805
4806 else
4807   echo "$ac_t""no" 1>&6
4808 fi
4809
4810         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4811 echo "configure:4812: checking for main in -lnet" >&5
4812 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4813 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4814   echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816   ac_save_LIBS="$LIBS"
4817 LIBS="-lnet  $LIBS"
4818 cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821
4822 int main() {
4823 main()
4824 ; return 0; }
4825 EOF
4826 if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4827   rm -rf conftest*
4828   eval "ac_cv_lib_$ac_lib_var=yes"
4829 else
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833   eval "ac_cv_lib_$ac_lib_var=no"
4834 fi
4835 rm -f conftest*
4836 LIBS="$ac_save_LIBS"
4837
4838 fi
4839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4840   echo "$ac_t""yes" 1>&6
4841     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4842     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4843   cat >> confdefs.h <<EOF
4844 #define $ac_tr_lib 1
4845 EOF
4846
4847   LIBS="-lnet $LIBS"
4848
4849 else
4850   echo "$ac_t""no" 1>&6
4851 fi
4852
4853         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4854 echo "configure:4855: checking for main in -lnsl_s" >&5
4855 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4857   echo $ac_n "(cached) $ac_c" 1>&6
4858 else
4859   ac_save_LIBS="$LIBS"
4860 LIBS="-lnsl_s  $LIBS"
4861 cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864
4865 int main() {
4866 main()
4867 ; return 0; }
4868 EOF
4869 if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4870   rm -rf conftest*
4871   eval "ac_cv_lib_$ac_lib_var=yes"
4872 else
4873   echo "configure: failed program was:" >&5
4874   cat conftest.$ac_ext >&5
4875   rm -rf conftest*
4876   eval "ac_cv_lib_$ac_lib_var=no"
4877 fi
4878 rm -f conftest*
4879 LIBS="$ac_save_LIBS"
4880
4881 fi
4882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4883   echo "$ac_t""yes" 1>&6
4884     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4885     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4886   cat >> confdefs.h <<EOF
4887 #define $ac_tr_lib 1
4888 EOF
4889
4890   LIBS="-lnsl_s $LIBS"
4891
4892 else
4893   echo "$ac_t""no" 1>&6
4894 fi
4895
4896         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4897 echo "configure:4898: checking for main in -lnsl" >&5
4898 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4900   echo $ac_n "(cached) $ac_c" 1>&6
4901 else
4902   ac_save_LIBS="$LIBS"
4903 LIBS="-lnsl  $LIBS"
4904 cat > conftest.$ac_ext <<EOF
4905 #line 4906 "configure"
4906 #include "confdefs.h"
4907
4908 int main() {
4909 main()
4910 ; return 0; }
4911 EOF
4912 if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4913   rm -rf conftest*
4914   eval "ac_cv_lib_$ac_lib_var=yes"
4915 else
4916   echo "configure: failed program was:" >&5
4917   cat conftest.$ac_ext >&5
4918   rm -rf conftest*
4919   eval "ac_cv_lib_$ac_lib_var=no"
4920 fi
4921 rm -f conftest*
4922 LIBS="$ac_save_LIBS"
4923
4924 fi
4925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4926   echo "$ac_t""yes" 1>&6
4927     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4928     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4929   cat >> confdefs.h <<EOF
4930 #define $ac_tr_lib 1
4931 EOF
4932
4933   LIBS="-lnsl $LIBS"
4934
4935 else
4936   echo "$ac_t""no" 1>&6
4937 fi
4938
4939         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4940 echo "configure:4941: checking for socket in -linet" >&5
4941 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4943   echo $ac_n "(cached) $ac_c" 1>&6
4944 else
4945   ac_save_LIBS="$LIBS"
4946 LIBS="-linet  $LIBS"
4947 cat > conftest.$ac_ext <<EOF
4948 #line 4949 "configure"
4949 #include "confdefs.h"
4950 /* Override any gcc2 internal prototype to avoid an error.  */
4951 /* We use char because int might match the return type of a gcc2
4952     builtin and then its argument prototype would still apply.  */
4953 char socket();
4954
4955 int main() {
4956 socket()
4957 ; return 0; }
4958 EOF
4959 if { (eval echo configure:4960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4960   rm -rf conftest*
4961   eval "ac_cv_lib_$ac_lib_var=yes"
4962 else
4963   echo "configure: failed program was:" >&5
4964   cat conftest.$ac_ext >&5
4965   rm -rf conftest*
4966   eval "ac_cv_lib_$ac_lib_var=no"
4967 fi
4968 rm -f conftest*
4969 LIBS="$ac_save_LIBS"
4970
4971 fi
4972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4973   echo "$ac_t""yes" 1>&6
4974     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4975     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4976   cat >> confdefs.h <<EOF
4977 #define $ac_tr_lib 1
4978 EOF
4979
4980   LIBS="-linet $LIBS"
4981
4982 else
4983   echo "$ac_t""no" 1>&6
4984 fi
4985
4986         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4987 echo "configure:4988: checking for main in -lgen" >&5
4988 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4990   echo $ac_n "(cached) $ac_c" 1>&6
4991 else
4992   ac_save_LIBS="$LIBS"
4993 LIBS="-lgen  $LIBS"
4994 cat > conftest.$ac_ext <<EOF
4995 #line 4996 "configure"
4996 #include "confdefs.h"
4997
4998 int main() {
4999 main()
5000 ; return 0; }
5001 EOF
5002 if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5003   rm -rf conftest*
5004   eval "ac_cv_lib_$ac_lib_var=yes"
5005 else
5006   echo "configure: failed program was:" >&5
5007   cat conftest.$ac_ext >&5
5008   rm -rf conftest*
5009   eval "ac_cv_lib_$ac_lib_var=no"
5010 fi
5011 rm -f conftest*
5012 LIBS="$ac_save_LIBS"
5013
5014 fi
5015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5016   echo "$ac_t""yes" 1>&6
5017     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5019   cat >> confdefs.h <<EOF
5020 #define $ac_tr_lib 1
5021 EOF
5022
5023   LIBS="-lgen $LIBS"
5024
5025 else
5026   echo "$ac_t""no" 1>&6
5027 fi
5028
5029
5030 fi
5031
5032
5033 echo $ac_n "checking for select""... $ac_c" 1>&6
5034 echo "configure:5035: checking for select" >&5
5035 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5036   echo $ac_n "(cached) $ac_c" 1>&6
5037 else
5038   cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041 /* System header to define __stub macros and hopefully few prototypes,
5042     which can conflict with char select(); below.  */
5043 #include <assert.h>
5044 /* Override any gcc2 internal prototype to avoid an error.  */
5045 /* We use char because int might match the return type of a gcc2
5046     builtin and then its argument prototype would still apply.  */
5047 char select();
5048 char (*f)();
5049
5050 int main() {
5051
5052 /* The GNU C library defines this for functions which it implements
5053     to always fail with ENOSYS.  Some functions are actually named
5054     something starting with __ and the normal name is an alias.  */
5055 #if defined (__stub_select) || defined (__stub___select)
5056 choke me
5057 #else
5058 f = select;
5059 #endif
5060
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_func_select=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_func_select=no"
5071 fi
5072 rm -f conftest*
5073 fi
5074
5075 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5076   echo "$ac_t""yes" 1>&6
5077   :
5078 else
5079   echo "$ac_t""no" 1>&6
5080 { echo "configure: error: select() required." 1>&2; exit 1; }
5081 fi
5082
5083
5084 if test "${ac_cv_header_winsock_h}" != yes; then
5085                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5086 echo "configure:5087: checking types of arguments for select()" >&5
5087  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5088   echo $ac_n "(cached) $ac_c" 1>&6
5089 else
5090    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5091   echo $ac_n "(cached) $ac_c" 1>&6
5092 else
5093     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5097      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5098       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5099        cat > conftest.$ac_ext <<EOF
5100 #line 5101 "configure"
5101 #include "confdefs.h"
5102 #ifdef HAVE_SYS_TYPES_H
5103 #include <sys/types.h>
5104 #endif
5105 #ifdef HAVE_SYS_TIME_H
5106 #include <sys/time.h>
5107 #endif
5108 #ifdef HAVE_SYS_SELECT_H
5109 #include <sys/select.h>
5110 #endif
5111 #ifdef HAVE_SYS_SOCKET_H
5112 #include <sys/socket.h>
5113 #endif
5114 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);
5115 int main() {
5116
5117 ; return 0; }
5118 EOF
5119 if { (eval echo configure:5120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5120   rm -rf conftest*
5121           ac_not_found=no ; break 3
5122 else
5123   echo "configure: failed program was:" >&5
5124   cat conftest.$ac_ext >&5
5125   rm -rf conftest*
5126   ac_not_found=yes
5127 fi
5128 rm -f conftest*
5129       done
5130      done
5131     done
5132    
5133 fi
5134   
5135 fi
5136  
5137 fi
5138  if test "$ac_not_found" = yes; then
5139   ac_cv_func_select_arg1=int 
5140   ac_cv_func_select_arg234='int *' 
5141   ac_cv_func_select_arg5='struct timeval *'
5142  fi
5143  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5144  cat >> confdefs.h <<EOF
5145 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5146 EOF
5147
5148  cat >> confdefs.h <<EOF
5149 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5150 EOF
5151
5152  cat >> confdefs.h <<EOF
5153 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5154 EOF
5155
5156
5157 fi
5158
5159
5160 for ac_hdr in regex.h 
5161 do
5162 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5163 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5164 echo "configure:5165: checking for $ac_hdr" >&5
5165 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5166   echo $ac_n "(cached) $ac_c" 1>&6
5167 else
5168   cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 #include <$ac_hdr>
5172 EOF
5173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5174 { (eval echo configure:5175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5176 if test -z "$ac_err"; then
5177   rm -rf conftest*
5178   eval "ac_cv_header_$ac_safe=yes"
5179 else
5180   echo "$ac_err" >&5
5181   echo "configure: failed program was:" >&5
5182   cat conftest.$ac_ext >&5
5183   rm -rf conftest*
5184   eval "ac_cv_header_$ac_safe=no"
5185 fi
5186 rm -f conftest*
5187 fi
5188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5189   echo "$ac_t""yes" 1>&6
5190     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5191   cat >> confdefs.h <<EOF
5192 #define $ac_tr_hdr 1
5193 EOF
5194  
5195 else
5196   echo "$ac_t""no" 1>&6
5197 fi
5198 done
5199
5200 if test "$ac_cv_header_regex_h" != yes ; then
5201         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5202 fi
5203 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5204 echo "configure:5205: checking for regfree" >&5
5205 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5206   echo $ac_n "(cached) $ac_c" 1>&6
5207 else
5208   cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211 /* System header to define __stub macros and hopefully few prototypes,
5212     which can conflict with char regfree(); below.  */
5213 #include <assert.h>
5214 /* Override any gcc2 internal prototype to avoid an error.  */
5215 /* We use char because int might match the return type of a gcc2
5216     builtin and then its argument prototype would still apply.  */
5217 char regfree();
5218 char (*f)();
5219
5220 int main() {
5221
5222 /* The GNU C library defines this for functions which it implements
5223     to always fail with ENOSYS.  Some functions are actually named
5224     something starting with __ and the normal name is an alias.  */
5225 #if defined (__stub_regfree) || defined (__stub___regfree)
5226 choke me
5227 #else
5228 f = regfree;
5229 #endif
5230
5231 ; return 0; }
5232 EOF
5233 if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5234   rm -rf conftest*
5235   eval "ac_cv_func_regfree=yes"
5236 else
5237   echo "configure: failed program was:" >&5
5238   cat conftest.$ac_ext >&5
5239   rm -rf conftest*
5240   eval "ac_cv_func_regfree=no"
5241 fi
5242 rm -f conftest*
5243 fi
5244
5245 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5246   echo "$ac_t""yes" 1>&6
5247   :
5248 else
5249   echo "$ac_t""no" 1>&6
5250 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5251 fi
5252
5253
5254
5255 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5256 echo "configure:5257: checking for compatible POSIX regex" >&5
5257 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5258   echo $ac_n "(cached) $ac_c" 1>&6
5259 else
5260   
5261         if test "$cross_compiling" = yes; then
5262   ol_cv_c_posix_regex=cross
5263 else
5264   cat > conftest.$ac_ext <<EOF
5265 #line 5266 "configure"
5266 #include "confdefs.h"
5267
5268 #include <sys/types.h>
5269 #include <regex.h>
5270 static char *pattern, *string;
5271 main()
5272 {
5273         int rc;
5274         regex_t re;
5275
5276         pattern = "^A";
5277
5278         if(regcomp(&re, pattern, 0)) {
5279                 return -1;
5280         }
5281         
5282         string = "ALL MATCH";
5283         
5284         rc = regexec(&re, string, 0, (void*)0, 0);
5285
5286         regfree(&re);
5287
5288         return rc;
5289 }
5290 EOF
5291 if { (eval echo configure:5292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5292 then
5293   ol_cv_c_posix_regex=yes
5294 else
5295   echo "configure: failed program was:" >&5
5296   cat conftest.$ac_ext >&5
5297   rm -fr conftest*
5298   ol_cv_c_posix_regex=no
5299 fi
5300 rm -fr conftest*
5301 fi
5302
5303 fi
5304
5305 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5306
5307 if test "$ol_cv_c_posix_regex" = no ; then
5308         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5309 fi
5310
5311 ol_link_dnssrv=no
5312 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5313 echo "configure:5314: checking for res_query" >&5
5314 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5315   echo $ac_n "(cached) $ac_c" 1>&6
5316 else
5317   cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320 /* System header to define __stub macros and hopefully few prototypes,
5321     which can conflict with char res_query(); below.  */
5322 #include <assert.h>
5323 /* Override any gcc2 internal prototype to avoid an error.  */
5324 /* We use char because int might match the return type of a gcc2
5325     builtin and then its argument prototype would still apply.  */
5326 char res_query();
5327 char (*f)();
5328
5329 int main() {
5330
5331 /* The GNU C library defines this for functions which it implements
5332     to always fail with ENOSYS.  Some functions are actually named
5333     something starting with __ and the normal name is an alias.  */
5334 #if defined (__stub_res_query) || defined (__stub___res_query)
5335 choke me
5336 #else
5337 f = res_query;
5338 #endif
5339
5340 ; return 0; }
5341 EOF
5342 if { (eval echo configure:5343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5343   rm -rf conftest*
5344   eval "ac_cv_func_res_query=yes"
5345 else
5346   echo "configure: failed program was:" >&5
5347   cat conftest.$ac_ext >&5
5348   rm -rf conftest*
5349   eval "ac_cv_func_res_query=no"
5350 fi
5351 rm -f conftest*
5352 fi
5353
5354 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5355   echo "$ac_t""yes" 1>&6
5356   :
5357 else
5358   echo "$ac_t""no" 1>&6
5359 fi
5360
5361 if test $ac_cv_func_res_query = no ; then 
5362         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5363 echo "configure:5364: checking for res_query in -lbind" >&5
5364 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5366   echo $ac_n "(cached) $ac_c" 1>&6
5367 else
5368   ac_save_LIBS="$LIBS"
5369 LIBS="-lbind  $LIBS"
5370 cat > conftest.$ac_ext <<EOF
5371 #line 5372 "configure"
5372 #include "confdefs.h"
5373 /* Override any gcc2 internal prototype to avoid an error.  */
5374 /* We use char because int might match the return type of a gcc2
5375     builtin and then its argument prototype would still apply.  */
5376 char res_query();
5377
5378 int main() {
5379 res_query()
5380 ; return 0; }
5381 EOF
5382 if { (eval echo configure:5383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5383   rm -rf conftest*
5384   eval "ac_cv_lib_$ac_lib_var=yes"
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388   rm -rf conftest*
5389   eval "ac_cv_lib_$ac_lib_var=no"
5390 fi
5391 rm -f conftest*
5392 LIBS="$ac_save_LIBS"
5393
5394 fi
5395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5396   echo "$ac_t""yes" 1>&6
5397     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5398     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5399   cat >> confdefs.h <<EOF
5400 #define $ac_tr_lib 1
5401 EOF
5402
5403   LIBS="-lbind $LIBS"
5404
5405 else
5406   echo "$ac_t""no" 1>&6
5407 fi
5408
5409         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5410 fi
5411
5412 if test $ac_cv_func_res_query = no ; then 
5413         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5414 echo "configure:5415: checking for __res_query in -lbind" >&5
5415 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5416 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5417   echo $ac_n "(cached) $ac_c" 1>&6
5418 else
5419   ac_save_LIBS="$LIBS"
5420 LIBS="-lbind  $LIBS"
5421 cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 /* Override any gcc2 internal prototype to avoid an error.  */
5425 /* We use char because int might match the return type of a gcc2
5426     builtin and then its argument prototype would still apply.  */
5427 char __res_query();
5428
5429 int main() {
5430 __res_query()
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434   rm -rf conftest*
5435   eval "ac_cv_lib_$ac_lib_var=yes"
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   eval "ac_cv_lib_$ac_lib_var=no"
5441 fi
5442 rm -f conftest*
5443 LIBS="$ac_save_LIBS"
5444
5445 fi
5446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5447   echo "$ac_t""yes" 1>&6
5448     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5449     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5450   cat >> confdefs.h <<EOF
5451 #define $ac_tr_lib 1
5452 EOF
5453
5454   LIBS="-lbind $LIBS"
5455
5456 else
5457   echo "$ac_t""no" 1>&6
5458 fi
5459
5460         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5461 fi
5462
5463 if test $ac_cv_func_res_query = no ; then 
5464         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5465 echo "configure:5466: checking for res_query in -lresolv" >&5
5466 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5468   echo $ac_n "(cached) $ac_c" 1>&6
5469 else
5470   ac_save_LIBS="$LIBS"
5471 LIBS="-lresolv  $LIBS"
5472 cat > conftest.$ac_ext <<EOF
5473 #line 5474 "configure"
5474 #include "confdefs.h"
5475 /* Override any gcc2 internal prototype to avoid an error.  */
5476 /* We use char because int might match the return type of a gcc2
5477     builtin and then its argument prototype would still apply.  */
5478 char res_query();
5479
5480 int main() {
5481 res_query()
5482 ; return 0; }
5483 EOF
5484 if { (eval echo configure:5485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5485   rm -rf conftest*
5486   eval "ac_cv_lib_$ac_lib_var=yes"
5487 else
5488   echo "configure: failed program was:" >&5
5489   cat conftest.$ac_ext >&5
5490   rm -rf conftest*
5491   eval "ac_cv_lib_$ac_lib_var=no"
5492 fi
5493 rm -f conftest*
5494 LIBS="$ac_save_LIBS"
5495
5496 fi
5497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5498   echo "$ac_t""yes" 1>&6
5499     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5500     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5501   cat >> confdefs.h <<EOF
5502 #define $ac_tr_lib 1
5503 EOF
5504
5505   LIBS="-lresolv $LIBS"
5506
5507 else
5508   echo "$ac_t""no" 1>&6
5509 fi
5510
5511         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5512 fi
5513
5514 if test "$ac_cv_func_res_query" = yes ; then
5515         cat >> confdefs.h <<\EOF
5516 #define HAVE_RES_QUERY 1
5517 EOF
5518
5519
5520         if test $ol_enable_dnssrv != no ; then
5521                 ol_link_dnssrv=yes
5522         fi
5523 fi
5524
5525 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5526         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5527 fi
5528
5529 ol_link_kbind=no
5530 ol_link_kpasswd=no
5531 ol_link_krb5=no
5532 ol_link_krb4=no
5533
5534 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5535         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5536
5537         for ac_hdr in krb5.h
5538 do
5539 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5540 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5541 echo "configure:5542: checking for $ac_hdr" >&5
5542 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5543   echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545   cat > conftest.$ac_ext <<EOF
5546 #line 5547 "configure"
5547 #include "confdefs.h"
5548 #include <$ac_hdr>
5549 EOF
5550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5551 { (eval echo configure:5552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5553 if test -z "$ac_err"; then
5554   rm -rf conftest*
5555   eval "ac_cv_header_$ac_safe=yes"
5556 else
5557   echo "$ac_err" >&5
5558   echo "configure: failed program was:" >&5
5559   cat conftest.$ac_ext >&5
5560   rm -rf conftest*
5561   eval "ac_cv_header_$ac_safe=no"
5562 fi
5563 rm -f conftest*
5564 fi
5565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5566   echo "$ac_t""yes" 1>&6
5567     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5568   cat >> confdefs.h <<EOF
5569 #define $ac_tr_hdr 1
5570 EOF
5571  
5572 else
5573   echo "$ac_t""no" 1>&6
5574 fi
5575 done
5576
5577
5578         if test $ac_cv_header_krb5_h = yes ; then
5579                                 for ac_hdr in heim_err.h
5580 do
5581 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5582 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5583 echo "configure:5584: checking for $ac_hdr" >&5
5584 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5585   echo $ac_n "(cached) $ac_c" 1>&6
5586 else
5587   cat > conftest.$ac_ext <<EOF
5588 #line 5589 "configure"
5589 #include "confdefs.h"
5590 #include <$ac_hdr>
5591 EOF
5592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5593 { (eval echo configure:5594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5595 if test -z "$ac_err"; then
5596   rm -rf conftest*
5597   eval "ac_cv_header_$ac_safe=yes"
5598 else
5599   echo "$ac_err" >&5
5600   echo "configure: failed program was:" >&5
5601   cat conftest.$ac_ext >&5
5602   rm -rf conftest*
5603   eval "ac_cv_header_$ac_safe=no"
5604 fi
5605 rm -f conftest*
5606 fi
5607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5608   echo "$ac_t""yes" 1>&6
5609     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5610   cat >> confdefs.h <<EOF
5611 #define $ac_tr_hdr 1
5612 EOF
5613  
5614 else
5615   echo "$ac_t""no" 1>&6
5616 fi
5617 done
5618
5619                 if test $ac_cv_header_heim_err_h = yes ; then
5620                         krb5_impl=heimdal
5621                 else
5622                         krb5_impl=mit
5623                 fi
5624
5625                 if test $krb5_impl = mit; then
5626                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5627 echo "configure:5628: checking for main in -lkrb5" >&5
5628 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5630   echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632   ac_save_LIBS="$LIBS"
5633 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637
5638 int main() {
5639 main()
5640 ; return 0; }
5641 EOF
5642 if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5643   rm -rf conftest*
5644   eval "ac_cv_lib_$ac_lib_var=yes"
5645 else
5646   echo "configure: failed program was:" >&5
5647   cat conftest.$ac_ext >&5
5648   rm -rf conftest*
5649   eval "ac_cv_lib_$ac_lib_var=no"
5650 fi
5651 rm -f conftest*
5652 LIBS="$ac_save_LIBS"
5653
5654 fi
5655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5656   echo "$ac_t""yes" 1>&6
5657   have_krb5=yes
5658                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5659 else
5660   echo "$ac_t""no" 1>&6
5661 have_krb5=no
5662 fi
5663
5664
5665                 elif test $krb5_impl = heimdal; then
5666                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5667 echo "configure:5668: checking for main in -lkrb5" >&5
5668 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5670   echo $ac_n "(cached) $ac_c" 1>&6
5671 else
5672   ac_save_LIBS="$LIBS"
5673 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5674 cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677
5678 int main() {
5679 main()
5680 ; return 0; }
5681 EOF
5682 if { (eval echo configure:5683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5683   rm -rf conftest*
5684   eval "ac_cv_lib_$ac_lib_var=yes"
5685 else
5686   echo "configure: failed program was:" >&5
5687   cat conftest.$ac_ext >&5
5688   rm -rf conftest*
5689   eval "ac_cv_lib_$ac_lib_var=no"
5690 fi
5691 rm -f conftest*
5692 LIBS="$ac_save_LIBS"
5693
5694 fi
5695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5696   echo "$ac_t""yes" 1>&6
5697   have_krb5=yes
5698                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5699 else
5700   echo "$ac_t""no" 1>&6
5701 have_krb5=no
5702 fi
5703
5704
5705                         cat >> confdefs.h <<\EOF
5706 #define HAVE_HEIMDAL_KERBEROS 1
5707 EOF
5708
5709                 else
5710                         have_krb5=no
5711                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5712                 fi
5713
5714                 if test $have_krb5 = yes ; then
5715                         ol_link_krb5=yes
5716
5717                         cat >> confdefs.h <<\EOF
5718 #define HAVE_KRB5 1
5719 EOF
5720
5721
5722                         if test $ol_enable_kpasswd != no ; then
5723                                 ol_link_kpasswd=yes;
5724                         fi
5725
5726                         if test $ol_with_kerberos = k5only ; then
5727                                 ol_with_kerberos=found
5728                         fi
5729
5730                 elif test $ol_with_kerberos != auto ; then
5731                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5732                 fi
5733
5734         fi
5735 fi
5736
5737 if test $ol_link_krb5 = yes -a \
5738         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5739
5740         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5741 do
5742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5743 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5744 echo "configure:5745: checking for $ac_hdr" >&5
5745 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5746   echo $ac_n "(cached) $ac_c" 1>&6
5747 else
5748   cat > conftest.$ac_ext <<EOF
5749 #line 5750 "configure"
5750 #include "confdefs.h"
5751 #include <$ac_hdr>
5752 EOF
5753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5754 { (eval echo configure:5755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5756 if test -z "$ac_err"; then
5757   rm -rf conftest*
5758   eval "ac_cv_header_$ac_safe=yes"
5759 else
5760   echo "$ac_err" >&5
5761   echo "configure: failed program was:" >&5
5762   cat conftest.$ac_ext >&5
5763   rm -rf conftest*
5764   eval "ac_cv_header_$ac_safe=no"
5765 fi
5766 rm -f conftest*
5767 fi
5768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5769   echo "$ac_t""yes" 1>&6
5770     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5771   cat >> confdefs.h <<EOF
5772 #define $ac_tr_hdr 1
5773 EOF
5774  
5775 else
5776   echo "$ac_t""no" 1>&6
5777 fi
5778 done
5779
5780
5781         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5782                 if test $krb5_impl = mit; then
5783                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5784 echo "configure:5785: checking for main in -lkrb4" >&5
5785 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5787   echo $ac_n "(cached) $ac_c" 1>&6
5788 else
5789   ac_save_LIBS="$LIBS"
5790 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5791 cat > conftest.$ac_ext <<EOF
5792 #line 5793 "configure"
5793 #include "confdefs.h"
5794
5795 int main() {
5796 main()
5797 ; return 0; }
5798 EOF
5799 if { (eval echo configure:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5800   rm -rf conftest*
5801   eval "ac_cv_lib_$ac_lib_var=yes"
5802 else
5803   echo "configure: failed program was:" >&5
5804   cat conftest.$ac_ext >&5
5805   rm -rf conftest*
5806   eval "ac_cv_lib_$ac_lib_var=no"
5807 fi
5808 rm -f conftest*
5809 LIBS="$ac_save_LIBS"
5810
5811 fi
5812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5813   echo "$ac_t""yes" 1>&6
5814   have_k425=yes
5815                                 KRB4_LIBS="-lkrb4 -ldes425"
5816 else
5817   echo "$ac_t""no" 1>&6
5818 have_k425=no
5819 fi
5820
5821
5822                 elif test $krb5_impl = heimdal; then
5823                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5824 echo "configure:5825: checking for main in -lkrb4" >&5
5825 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5827   echo $ac_n "(cached) $ac_c" 1>&6
5828 else
5829   ac_save_LIBS="$LIBS"
5830 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5831 cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834
5835 int main() {
5836 main()
5837 ; return 0; }
5838 EOF
5839 if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5840   rm -rf conftest*
5841   eval "ac_cv_lib_$ac_lib_var=yes"
5842 else
5843   echo "configure: failed program was:" >&5
5844   cat conftest.$ac_ext >&5
5845   rm -rf conftest*
5846   eval "ac_cv_lib_$ac_lib_var=no"
5847 fi
5848 rm -f conftest*
5849 LIBS="$ac_save_LIBS"
5850
5851 fi
5852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5853   echo "$ac_t""yes" 1>&6
5854   have_k425=yes
5855                                 KRB4_LIBS="-lkrb4"
5856 else
5857   echo "$ac_t""no" 1>&6
5858 have_k425=no
5859 fi
5860
5861
5862                 else
5863                         have_425=no
5864                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5865                 fi
5866
5867                 if test $have_k425 = yes ; then
5868                         ol_with_kerberos=found
5869                         ol_link_krb4=yes
5870
5871                         cat >> confdefs.h <<\EOF
5872 #define HAVE_KRB425 1
5873 EOF
5874
5875                         cat >> confdefs.h <<\EOF
5876 #define HAVE_KRB4 1
5877 EOF
5878
5879
5880                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5881 echo "configure:5882: checking for des_debug in Kerberos libraries" >&5
5882 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5883   echo $ac_n "(cached) $ac_c" 1>&6
5884 else
5885   
5886                                                                 save_LIBS="$LIBS"
5887                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
5888                                 cat > conftest.$ac_ext <<EOF
5889 #line 5890 "configure"
5890 #include "confdefs.h"
5891
5892 #include <kerberosIV/krb.h>
5893 #include <kerberosIV/des.h>
5894 extern int des_debug;
5895
5896 int main() {
5897
5898 des_debug = 1;
5899
5900 ; return 0; }
5901 EOF
5902 if { (eval echo configure:5903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5903   rm -rf conftest*
5904   ol_cv_var_des_debug=yes
5905 else
5906   echo "configure: failed program was:" >&5
5907   cat conftest.$ac_ext >&5
5908   rm -rf conftest*
5909   ol_cv_var_des_debug=no
5910 fi
5911 rm -f conftest*
5912                                                                 LIBS="$save_LIBS"
5913                         
5914 fi
5915
5916 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5917
5918                         if test $ol_cv_var_des_debug = yes ; then
5919                                 cat >> confdefs.h <<\EOF
5920 #define HAVE_DES_DEBUG 1
5921 EOF
5922
5923                         fi
5924
5925                         LIBS="$save_LIBS"
5926                 fi
5927         fi
5928 fi
5929
5930 if test $ol_link_krb5 = yes ; then
5931         ol_with_kerberos=found
5932 fi
5933
5934 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
5935         -o $ol_with_kerberos = kth ; then
5936
5937         for ac_hdr in krb.h des.h krb-archaeology.h 
5938 do
5939 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5940 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5941 echo "configure:5942: checking for $ac_hdr" >&5
5942 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5943   echo $ac_n "(cached) $ac_c" 1>&6
5944 else
5945   cat > conftest.$ac_ext <<EOF
5946 #line 5947 "configure"
5947 #include "confdefs.h"
5948 #include <$ac_hdr>
5949 EOF
5950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5951 { (eval echo configure:5952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5953 if test -z "$ac_err"; then
5954   rm -rf conftest*
5955   eval "ac_cv_header_$ac_safe=yes"
5956 else
5957   echo "$ac_err" >&5
5958   echo "configure: failed program was:" >&5
5959   cat conftest.$ac_ext >&5
5960   rm -rf conftest*
5961   eval "ac_cv_header_$ac_safe=no"
5962 fi
5963 rm -f conftest*
5964 fi
5965 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5966   echo "$ac_t""yes" 1>&6
5967     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5968   cat >> confdefs.h <<EOF
5969 #define $ac_tr_hdr 1
5970 EOF
5971  
5972 else
5973   echo "$ac_t""no" 1>&6
5974 fi
5975 done
5976
5977
5978         if test $ac_cv_header_krb_h = yes ; then
5979                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5980 echo "configure:5981: checking for main in -lkrb" >&5
5981 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5982 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5983   echo $ac_n "(cached) $ac_c" 1>&6
5984 else
5985   ac_save_LIBS="$LIBS"
5986 LIBS="-lkrb -ldes $LIBS"
5987 cat > conftest.$ac_ext <<EOF
5988 #line 5989 "configure"
5989 #include "confdefs.h"
5990
5991 int main() {
5992 main()
5993 ; return 0; }
5994 EOF
5995 if { (eval echo configure:5996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5996   rm -rf conftest*
5997   eval "ac_cv_lib_$ac_lib_var=yes"
5998 else
5999   echo "configure: failed program was:" >&5
6000   cat conftest.$ac_ext >&5
6001   rm -rf conftest*
6002   eval "ac_cv_lib_$ac_lib_var=no"
6003 fi
6004 rm -f conftest*
6005 LIBS="$ac_save_LIBS"
6006
6007 fi
6008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6009   echo "$ac_t""yes" 1>&6
6010   have_k4=yes
6011 else
6012   echo "$ac_t""no" 1>&6
6013 have_k4=no
6014 fi
6015
6016
6017                 if test $have_k4 = yes ; then
6018                         ol_with_kerberos=found
6019                         ol_link_krb4=yes
6020
6021                         cat >> confdefs.h <<\EOF
6022 #define HAVE_KRB4 1
6023 EOF
6024
6025
6026                         KRB4_LIBS="-lkrb -ldes"
6027
6028                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6029                                 cat >> confdefs.h <<\EOF
6030 #define HAVE_KTH_KERBEROS 1
6031 EOF
6032
6033                         fi
6034                 fi
6035         fi
6036 fi
6037
6038 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6039         ol_link_kpasswd=yes;
6040 fi
6041
6042 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6043         cat >> confdefs.h <<\EOF
6044 #define HAVE_KERBEROS 1
6045 EOF
6046
6047
6048 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6049         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6050 fi
6051
6052 ol_link_tls=no
6053 if test $ol_with_tls != no ; then
6054         
6055         for ac_hdr in openssl/ssl.h ssl.h
6056 do
6057 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6058 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6059 echo "configure:6060: checking for $ac_hdr" >&5
6060 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6061   echo $ac_n "(cached) $ac_c" 1>&6
6062 else
6063   cat > conftest.$ac_ext <<EOF
6064 #line 6065 "configure"
6065 #include "confdefs.h"
6066 #include <$ac_hdr>
6067 EOF
6068 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6069 { (eval echo configure:6070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6070 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6071 if test -z "$ac_err"; then
6072   rm -rf conftest*
6073   eval "ac_cv_header_$ac_safe=yes"
6074 else
6075   echo "$ac_err" >&5
6076   echo "configure: failed program was:" >&5
6077   cat conftest.$ac_ext >&5
6078   rm -rf conftest*
6079   eval "ac_cv_header_$ac_safe=no"
6080 fi
6081 rm -f conftest*
6082 fi
6083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6084   echo "$ac_t""yes" 1>&6
6085     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6086   cat >> confdefs.h <<EOF
6087 #define $ac_tr_hdr 1
6088 EOF
6089  
6090 else
6091   echo "$ac_t""no" 1>&6
6092 fi
6093 done
6094
6095         
6096         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6097                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6098 echo "configure:6099: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6099 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6101   echo $ac_n "(cached) $ac_c" 1>&6
6102 else
6103   ac_save_LIBS="$LIBS"
6104 LIBS="-lssl -lcrypto $LIBS"
6105 cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108 /* Override any gcc2 internal prototype to avoid an error.  */
6109 /* We use char because int might match the return type of a gcc2
6110     builtin and then its argument prototype would still apply.  */
6111 char SSLeay_add_ssl_algorithms();
6112
6113 int main() {
6114 SSLeay_add_ssl_algorithms()
6115 ; return 0; }
6116 EOF
6117 if { (eval echo configure:6118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6118   rm -rf conftest*
6119   eval "ac_cv_lib_$ac_lib_var=yes"
6120 else
6121   echo "configure: failed program was:" >&5
6122   cat conftest.$ac_ext >&5
6123   rm -rf conftest*
6124   eval "ac_cv_lib_$ac_lib_var=no"
6125 fi
6126 rm -f conftest*
6127 LIBS="$ac_save_LIBS"
6128
6129 fi
6130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6131   echo "$ac_t""yes" 1>&6
6132   have_ssleay=yes
6133                         need_rsaref=no
6134 else
6135   echo "$ac_t""no" 1>&6
6136 have_ssleay=no
6137 fi
6138
6139                         
6140                 if test $have_ssleay = no ; then
6141                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6142 echo "configure:6143: checking for SSL_library_init in -lssl" >&5
6143 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6145   echo $ac_n "(cached) $ac_c" 1>&6
6146 else
6147   ac_save_LIBS="$LIBS"
6148 LIBS="-lssl -lcrypto $LIBS"
6149 cat > conftest.$ac_ext <<EOF
6150 #line 6151 "configure"
6151 #include "confdefs.h"
6152 /* Override any gcc2 internal prototype to avoid an error.  */
6153 /* We use char because int might match the return type of a gcc2
6154     builtin and then its argument prototype would still apply.  */
6155 char SSL_library_init();
6156
6157 int main() {
6158 SSL_library_init()
6159 ; return 0; }
6160 EOF
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6162   rm -rf conftest*
6163   eval "ac_cv_lib_$ac_lib_var=yes"
6164 else
6165   echo "configure: failed program was:" >&5
6166   cat conftest.$ac_ext >&5
6167   rm -rf conftest*
6168   eval "ac_cv_lib_$ac_lib_var=no"
6169 fi
6170 rm -f conftest*
6171 LIBS="$ac_save_LIBS"
6172
6173 fi
6174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6175   echo "$ac_t""yes" 1>&6
6176   have_ssleay=yes
6177                                 need_rsaref=no
6178 else
6179   echo "$ac_t""no" 1>&6
6180 have_ssleay=no
6181 fi
6182
6183                 fi
6184
6185                 if test $have_ssleay = no ; then
6186                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6187 echo "configure:6188: checking for ssl3_accept in -lssl" >&5
6188 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6190   echo $ac_n "(cached) $ac_c" 1>&6
6191 else
6192   ac_save_LIBS="$LIBS"
6193 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6194 cat > conftest.$ac_ext <<EOF
6195 #line 6196 "configure"
6196 #include "confdefs.h"
6197 /* Override any gcc2 internal prototype to avoid an error.  */
6198 /* We use char because int might match the return type of a gcc2
6199     builtin and then its argument prototype would still apply.  */
6200 char ssl3_accept();
6201
6202 int main() {
6203 ssl3_accept()
6204 ; return 0; }
6205 EOF
6206 if { (eval echo configure:6207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6207   rm -rf conftest*
6208   eval "ac_cv_lib_$ac_lib_var=yes"
6209 else
6210   echo "configure: failed program was:" >&5
6211   cat conftest.$ac_ext >&5
6212   rm -rf conftest*
6213   eval "ac_cv_lib_$ac_lib_var=no"
6214 fi
6215 rm -f conftest*
6216 LIBS="$ac_save_LIBS"
6217
6218 fi
6219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6220   echo "$ac_t""yes" 1>&6
6221   have_ssleay=yes
6222                                 need_rsaref=yes
6223 else
6224   echo "$ac_t""no" 1>&6
6225 have_ssleay=no
6226 fi
6227
6228                 fi
6229
6230                 if test $have_ssleay = yes ; then
6231                         ol_with_tls=found
6232                         ol_link_tls=yes
6233
6234                         cat >> confdefs.h <<\EOF
6235 #define HAVE_SSLEAY 1
6236 EOF
6237
6238
6239                         if test $need_rsaref = yes; then
6240                                 cat >> confdefs.h <<\EOF
6241 #define HAVE_RSAREF 1
6242 EOF
6243
6244
6245                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6246                         else
6247                                 TLS_LIBS="-lssl -lcrypto"
6248                         fi
6249                 fi
6250         fi
6251 fi
6252
6253 if test $ol_link_tls = yes ; then
6254         cat >> confdefs.h <<\EOF
6255 #define HAVE_TLS 1
6256 EOF
6257
6258 fi      
6259
6260 for ac_func in \
6261         ctime_r                 \
6262         gethostbyname_r gethostbyaddr_r \
6263
6264 do
6265 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6266 echo "configure:6267: checking for $ac_func" >&5
6267 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6268   echo $ac_n "(cached) $ac_c" 1>&6
6269 else
6270   cat > conftest.$ac_ext <<EOF
6271 #line 6272 "configure"
6272 #include "confdefs.h"
6273 /* System header to define __stub macros and hopefully few prototypes,
6274     which can conflict with char $ac_func(); below.  */
6275 #include <assert.h>
6276 /* Override any gcc2 internal prototype to avoid an error.  */
6277 /* We use char because int might match the return type of a gcc2
6278     builtin and then its argument prototype would still apply.  */
6279 char $ac_func();
6280 char (*f)();
6281
6282 int main() {
6283
6284 /* The GNU C library defines this for functions which it implements
6285     to always fail with ENOSYS.  Some functions are actually named
6286     something starting with __ and the normal name is an alias.  */
6287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6288 choke me
6289 #else
6290 f = $ac_func;
6291 #endif
6292
6293 ; return 0; }
6294 EOF
6295 if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6296   rm -rf conftest*
6297   eval "ac_cv_func_$ac_func=yes"
6298 else
6299   echo "configure: failed program was:" >&5
6300   cat conftest.$ac_ext >&5
6301   rm -rf conftest*
6302   eval "ac_cv_func_$ac_func=no"
6303 fi
6304 rm -f conftest*
6305 fi
6306
6307 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6308   echo "$ac_t""yes" 1>&6
6309     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6310   cat >> confdefs.h <<EOF
6311 #define $ac_tr_func 1
6312 EOF
6313  
6314 else
6315   echo "$ac_t""no" 1>&6
6316 fi
6317 done
6318
6319
6320 if test "$ac_cv_func_ctime_r" = no ; then
6321         ol_cv_func_ctime_r_nargs=0
6322 else
6323         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6324 echo "configure:6325: checking number of arguments of ctime_r" >&5
6325 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6326   echo $ac_n "(cached) $ac_c" 1>&6
6327 else
6328   cat > conftest.$ac_ext <<EOF
6329 #line 6330 "configure"
6330 #include "confdefs.h"
6331 #include <time.h>
6332 int main() {
6333 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6334 ; return 0; }
6335 EOF
6336 if { (eval echo configure:6337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6337   rm -rf conftest*
6338   ol_cv_func_ctime_r_nargs3=yes
6339 else
6340   echo "configure: failed program was:" >&5
6341   cat conftest.$ac_ext >&5
6342   rm -rf conftest*
6343   ol_cv_func_ctime_r_nargs3=no
6344 fi
6345 rm -f conftest*
6346
6347         cat > conftest.$ac_ext <<EOF
6348 #line 6349 "configure"
6349 #include "confdefs.h"
6350 #include <time.h>
6351 int main() {
6352 time_t ti; char *buffer; ctime_r(&ti,buffer);
6353 ; return 0; }
6354 EOF
6355 if { (eval echo configure:6356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6356   rm -rf conftest*
6357   ol_cv_func_ctime_r_nargs2=yes
6358 else
6359   echo "configure: failed program was:" >&5
6360   cat conftest.$ac_ext >&5
6361   rm -rf conftest*
6362   ol_cv_func_ctime_r_nargs2=no
6363 fi
6364 rm -f conftest*
6365
6366         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6367                 $ol_cv_func_ctime_r_nargs2 = no ; then
6368
6369                 ol_cv_func_ctime_r_nargs=3
6370
6371         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6372                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6373
6374                 ol_cv_func_ctime_r_nargs=2
6375
6376         else
6377                 ol_cv_func_ctime_r_nargs=0
6378         fi
6379   
6380 fi
6381
6382 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6383
6384   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6385         cat >> confdefs.h <<EOF
6386 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6387 EOF
6388
6389   fi
6390
6391 fi
6392
6393 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6394         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6395 echo "configure:6396: checking number of arguments of gethostbyname_r" >&5
6396 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6397   echo $ac_n "(cached) $ac_c" 1>&6
6398 else
6399   cat > conftest.$ac_ext <<EOF
6400 #line 6401 "configure"
6401 #include "confdefs.h"
6402 #include <sys/types.h>
6403 #include <sys/socket.h>
6404 #include <netinet/in.h>
6405 #include <netdb.h>
6406 #define BUFSIZE (sizeof(struct hostent)+10)
6407 int main() {
6408 struct hostent hent; char buffer[BUFSIZE];
6409                 int bufsize=BUFSIZE;int h_errno;
6410                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6411                         buffer, bufsize, &h_errno);
6412 ; return 0; }
6413 EOF
6414 if { (eval echo configure:6415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6415   rm -rf conftest*
6416   ol_cv_func_gethostbyname_r_nargs5=yes
6417 else
6418   echo "configure: failed program was:" >&5
6419   cat conftest.$ac_ext >&5
6420   rm -rf conftest*
6421   ol_cv_func_gethostbyname_r_nargs5=no
6422 fi
6423 rm -f conftest*
6424
6425         cat > conftest.$ac_ext <<EOF
6426 #line 6427 "configure"
6427 #include "confdefs.h"
6428 #include <sys/types.h>
6429 #include <sys/socket.h>
6430 #include <netinet/in.h>
6431 #include <netdb.h>
6432 #define BUFSIZE (sizeof(struct hostent)+10)
6433 int main() {
6434 struct hostent hent;struct hostent *rhent;
6435                 char buffer[BUFSIZE];
6436                 int bufsize=BUFSIZE;int h_errno;
6437                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6438                         &rhent, &h_errno);
6439 ; return 0; }
6440 EOF
6441 if { (eval echo configure:6442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6442   rm -rf conftest*
6443   ol_cv_func_gethostbyname_r_nargs6=yes
6444 else
6445   echo "configure: failed program was:" >&5
6446   cat conftest.$ac_ext >&5
6447   rm -rf conftest*
6448   ol_cv_func_gethostbyname_r_nargs6=no
6449 fi
6450 rm -f conftest*
6451
6452         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6453                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6454
6455                 ol_cv_func_gethostbyname_r_nargs=5
6456
6457         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6458                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6459
6460                 ol_cv_func_gethostbyname_r_nargs=6
6461
6462         else
6463                 ol_cv_func_gethostbyname_r_nargs=0
6464         fi
6465   
6466 fi
6467
6468 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6469   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6470         cat >> confdefs.h <<EOF
6471 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6472 EOF
6473
6474   fi
6475
6476 else
6477         ol_cv_func_gethostbyname_r_nargs=0
6478 fi
6479  
6480 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6481         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6482 echo "configure:6483: checking number of arguments of gethostbyaddr_r" >&5
6483 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6484   echo $ac_n "(cached) $ac_c" 1>&6
6485 else
6486   cat > conftest.$ac_ext <<EOF
6487 #line 6488 "configure"
6488 #include "confdefs.h"
6489 #include <sys/types.h>
6490 #include <sys/socket.h>
6491 #include <netinet/in.h>
6492 #include <netdb.h>
6493 #define BUFSIZE (sizeof(struct hostent)+10)
6494 int main() {
6495 struct hostent hent; char buffer[BUFSIZE]; 
6496             struct in_addr add;
6497             size_t alen=sizeof(struct in_addr);
6498             int bufsize=BUFSIZE;int h_errno;
6499                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6500                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6501 ; return 0; }
6502 EOF
6503 if { (eval echo configure:6504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6504   rm -rf conftest*
6505   ol_cv_func_gethostbyaddr_r_nargs7=yes
6506 else
6507   echo "configure: failed program was:" >&5
6508   cat conftest.$ac_ext >&5
6509   rm -rf conftest*
6510   ol_cv_func_gethostbyaddr_r_nargs7=no
6511 fi
6512 rm -f conftest*
6513
6514         cat > conftest.$ac_ext <<EOF
6515 #line 6516 "configure"
6516 #include "confdefs.h"
6517 #include <sys/types.h>
6518 #include <sys/socket.h>
6519 #include <netinet/in.h>
6520 #include <netdb.h>
6521 #define BUFSIZE (sizeof(struct hostent)+10)
6522 int main() {
6523 struct hostent hent;
6524                 struct hostent *rhent; char buffer[BUFSIZE]; 
6525                 struct in_addr add;
6526                 size_t alen=sizeof(struct in_addr);
6527                 int bufsize=BUFSIZE;int h_errno;
6528                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6529                         alen, AF_INET, &hent, buffer, bufsize, 
6530                         &rhent, &h_errno);
6531 ; return 0; }
6532 EOF
6533 if { (eval echo configure:6534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6534   rm -rf conftest*
6535   ol_cv_func_gethostbyaddr_r_nargs8=yes
6536 else
6537   echo "configure: failed program was:" >&5
6538   cat conftest.$ac_ext >&5
6539   rm -rf conftest*
6540   ol_cv_func_gethostbyaddr_r_nargs8=no
6541 fi
6542 rm -f conftest*
6543
6544         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6545                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6546
6547                 ol_cv_func_gethostbyaddr_r_nargs=7
6548
6549         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6550                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6551
6552                 ol_cv_func_gethostbyaddr_r_nargs=8
6553
6554         else
6555                 ol_cv_func_gethostbyaddr_r_nargs=0
6556         fi
6557   
6558 fi
6559
6560 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6561   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6562     cat >> confdefs.h <<EOF
6563 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6564 EOF
6565
6566   fi
6567
6568 else
6569         ol_cv_func_gethostbyaddr_r_nargs=0
6570 fi
6571
6572 if test "$ac_cv_func_ctime_r" = yes \
6573         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6574         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6575         -a "$ac_cv_func_gethostbyname_r" = yes \
6576         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6577         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6578         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6579         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6580         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6581         ; then
6582  
6583         cat >> confdefs.h <<\EOF
6584 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6585 EOF
6586
6587 fi
6588
6589 ol_link_threads=no
6590
6591 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6592         -o $ol_with_threads = nt ; then
6593
6594         
6595         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6596 echo "configure:6597: checking for NT Threads" >&5
6597 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6598   echo $ac_n "(cached) $ac_c" 1>&6
6599 else
6600   
6601                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6602 echo "configure:6603: checking for _beginthread" >&5
6603 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6604   echo $ac_n "(cached) $ac_c" 1>&6
6605 else
6606   cat > conftest.$ac_ext <<EOF
6607 #line 6608 "configure"
6608 #include "confdefs.h"
6609 /* System header to define __stub macros and hopefully few prototypes,
6610     which can conflict with char _beginthread(); below.  */
6611 #include <assert.h>
6612 /* Override any gcc2 internal prototype to avoid an error.  */
6613 /* We use char because int might match the return type of a gcc2
6614     builtin and then its argument prototype would still apply.  */
6615 char _beginthread();
6616 char (*f)();
6617
6618 int main() {
6619
6620 /* The GNU C library defines this for functions which it implements
6621     to always fail with ENOSYS.  Some functions are actually named
6622     something starting with __ and the normal name is an alias.  */
6623 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6624 choke me
6625 #else
6626 f = _beginthread;
6627 #endif
6628
6629 ; return 0; }
6630 EOF
6631 if { (eval echo configure:6632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6632   rm -rf conftest*
6633   eval "ac_cv_func__beginthread=yes"
6634 else
6635   echo "configure: failed program was:" >&5
6636   cat conftest.$ac_ext >&5
6637   rm -rf conftest*
6638   eval "ac_cv_func__beginthread=no"
6639 fi
6640 rm -f conftest*
6641 fi
6642
6643 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6644   echo "$ac_t""yes" 1>&6
6645   ol_cv_nt_threads=yes
6646 else
6647   echo "$ac_t""no" 1>&6
6648 ol_cv_nt_threads=no
6649 fi
6650
6651         
6652 fi
6653
6654 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6655
6656         if test $ol_cv_nt_threads = yes ; then
6657                 cat >> confdefs.h <<\EOF
6658 #define HAVE_NT_THREADS 1
6659 EOF
6660
6661         fi
6662
6663
6664         if test "$ol_cv_nt_threads" = yes ; then
6665         ol_link_threads=nt
6666         ol_with_threads=found
6667         ol_with_yielding_select=yes
6668
6669                 cat >> confdefs.h <<\EOF
6670 #define HAVE_NT_SERVICE_MANAGER 1
6671 EOF
6672
6673                 cat >> confdefs.h <<\EOF
6674 #define HAVE_NT_EVENT_LOG 1
6675 EOF
6676
6677         fi
6678
6679         if test $ol_with_threads = nt ; then
6680                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6681         fi
6682 fi
6683
6684 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6685         -o $ol_with_threads = posix ; then
6686
6687         for ac_hdr in pthread.h
6688 do
6689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6690 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6691 echo "configure:6692: checking for $ac_hdr" >&5
6692 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6693   echo $ac_n "(cached) $ac_c" 1>&6
6694 else
6695   cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 #include <$ac_hdr>
6699 EOF
6700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6701 { (eval echo configure:6702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6703 if test -z "$ac_err"; then
6704   rm -rf conftest*
6705   eval "ac_cv_header_$ac_safe=yes"
6706 else
6707   echo "$ac_err" >&5
6708   echo "configure: failed program was:" >&5
6709   cat conftest.$ac_ext >&5
6710   rm -rf conftest*
6711   eval "ac_cv_header_$ac_safe=no"
6712 fi
6713 rm -f conftest*
6714 fi
6715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6716   echo "$ac_t""yes" 1>&6
6717     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6718   cat >> confdefs.h <<EOF
6719 #define $ac_tr_hdr 1
6720 EOF
6721  
6722 else
6723   echo "$ac_t""no" 1>&6
6724 fi
6725 done
6726
6727
6728         if test $ac_cv_header_pthread_h = yes ; then
6729                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6730 echo "configure:6731: checking POSIX thread version" >&5
6731 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6732   echo $ac_n "(cached) $ac_c" 1>&6
6733 else
6734   
6735         cat > conftest.$ac_ext <<EOF
6736 #line 6737 "configure"
6737 #include "confdefs.h"
6738
6739 #               include <pthread.h>
6740                 /* this check could be improved */
6741 #               ifdef PTHREAD_ONCE_INIT
6742                         pthread_version_final;
6743 #               endif
6744         
6745 EOF
6746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6747   egrep "pthread_version_final" >/dev/null 2>&1; then
6748   rm -rf conftest*
6749   ol_pthread_final=yes
6750 else
6751   rm -rf conftest*
6752   ol_pthread_final=no
6753 fi
6754 rm -f conftest*
6755
6756
6757         cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760
6761 #               include <pthread.h>
6762                 /* this check could be improved */
6763 #               ifdef pthread_once_init
6764                         pthread_version_draft4;
6765 #               endif
6766         
6767 EOF
6768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6769   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6770   rm -rf conftest*
6771   ol_pthread_draft4=yes
6772 else
6773   rm -rf conftest*
6774   ol_pthread_draft4=no
6775 fi
6776 rm -f conftest*
6777
6778
6779         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6780                 ol_cv_pthread_version=final
6781         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6782                 ol_cv_pthread_version=draft4
6783         else
6784                 ol_cv_pthread_version=unknown
6785         fi
6786
6787 fi
6788
6789 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6790
6791
6792                 if test $ol_cv_pthread_version = final ; then
6793                         cat >> confdefs.h <<\EOF
6794 #define HAVE_PTHREADS_FINAL 1
6795 EOF
6796
6797                 elif test $ol_cv_pthread_version = draft4 ; then
6798                         cat >> confdefs.h <<\EOF
6799 #define HAVE_PTHREADS_D4 1
6800 EOF
6801
6802                 else
6803                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6804                 fi
6805
6806                 # consider threads found
6807                 ol_with_threads=found
6808
6809                 
6810         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6811 echo "configure:6812: checking for LinuxThreads pthread.h" >&5
6812 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6813   echo $ac_n "(cached) $ac_c" 1>&6
6814 else
6815   cat > conftest.$ac_ext <<EOF
6816 #line 6817 "configure"
6817 #include "confdefs.h"
6818 #include <pthread.h>
6819 EOF
6820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6821   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6822   rm -rf conftest*
6823   ol_cv_header_linux_threads=yes
6824 else
6825   rm -rf conftest*
6826   ol_cv_header_linux_threads=no
6827 fi
6828 rm -f conftest*
6829
6830                 
6831 fi
6832
6833 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6834         if test $ol_cv_header_linux_threads = yes; then
6835                 cat >> confdefs.h <<\EOF
6836 #define HAVE_LINUX_THREADS 1
6837 EOF
6838
6839         fi
6840
6841                 
6842         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6843 echo "configure:6844: checking for GNU Pth pthread.h" >&5
6844 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6845   echo $ac_n "(cached) $ac_c" 1>&6
6846 else
6847   cat > conftest.$ac_ext <<EOF
6848 #line 6849 "configure"
6849 #include "confdefs.h"
6850 #include <pthread.h>
6851 #ifdef _POSIX_THREAD_IS_GNU_PTH
6852         __gnu_pth__;
6853 #endif
6854
6855 EOF
6856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6857   egrep "__gnu_pth__" >/dev/null 2>&1; then
6858   rm -rf conftest*
6859   ol_cv_header_gnu_pth_pthread_h=yes
6860 else
6861   rm -rf conftest*
6862   ol_cv_header_gnu_pth_pthread_h=no
6863 fi
6864 rm -f conftest*
6865
6866                 
6867 fi
6868
6869 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6870
6871
6872                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6873                         for ac_hdr in sched.h
6874 do
6875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6877 echo "configure:6878: checking for $ac_hdr" >&5
6878 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6879   echo $ac_n "(cached) $ac_c" 1>&6
6880 else
6881   cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884 #include <$ac_hdr>
6885 EOF
6886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6887 { (eval echo configure:6888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6889 if test -z "$ac_err"; then
6890   rm -rf conftest*
6891   eval "ac_cv_header_$ac_safe=yes"
6892 else
6893   echo "$ac_err" >&5
6894   echo "configure: failed program was:" >&5
6895   cat conftest.$ac_ext >&5
6896   rm -rf conftest*
6897   eval "ac_cv_header_$ac_safe=no"
6898 fi
6899 rm -f conftest*
6900 fi
6901 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6902   echo "$ac_t""yes" 1>&6
6903     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6904   cat >> confdefs.h <<EOF
6905 #define $ac_tr_hdr 1
6906 EOF
6907  
6908 else
6909   echo "$ac_t""no" 1>&6
6910 fi
6911 done
6912
6913                 fi
6914
6915                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6916                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6917 echo "configure:6918: checking for pthread_create in default libraries" >&5
6918 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6919   echo $ac_n "(cached) $ac_c" 1>&6
6920 else
6921   
6922                 if test "$cross_compiling" = yes; then
6923   cat > conftest.$ac_ext <<EOF
6924 #line 6925 "configure"
6925 #include "confdefs.h"
6926 /* pthread test headers */
6927 #include <pthread.h>
6928 #ifndef NULL
6929 #define NULL (void*)0
6930 #endif
6931
6932 static void *task(p)
6933         void *p;
6934 {
6935         return (void *) (p == NULL);
6936 }
6937
6938 int main() {
6939
6940         /* pthread test function */
6941         pthread_t t;
6942         int status;
6943 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
6944         /* This system (e.g. AIX) defaults detached; must override */
6945         pthread_attr_t attr;
6946
6947         status = pthread_attr_init(&attr);
6948         if( status ) exit( status );
6949
6950         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
6951         if( status ) exit( status );
6952
6953 #define ATTR    &attr
6954 #else
6955 #if HAVE_PTHREADS_D4
6956 #define ATTR    pthread_attr_default
6957 #else
6958 #define ATTR    NULL
6959 #endif
6960 #endif
6961         /* make sure pthread_create() isn't just a stub */
6962         status = pthread_create(&t, ATTR, task, NULL);
6963         if( status ) exit( status );
6964
6965         /* make sure pthread_detach() isn't just a stub */
6966 #if HAVE_PTHREADS_D4
6967         status = pthread_detach( &t );
6968 #else
6969         status = pthread_detach( t );
6970 #endif
6971
6972 #ifdef HAVE_LINUX_THREADS
6973         pthread_kill_other_threads_np();
6974 #endif
6975
6976         exit( status );
6977
6978 ; return 0; }
6979 EOF
6980 if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981   rm -rf conftest*
6982   ol_cv_pthread_create=yes
6983 else
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   ol_cv_pthread_create=no
6988 fi
6989 rm -f conftest*
6990 else
6991   cat > conftest.$ac_ext <<EOF
6992 #line 6993 "configure"
6993 #include "confdefs.h"
6994 /* pthread test headers */
6995 #include <pthread.h>
6996 #ifndef NULL
6997 #define NULL (void*)0
6998 #endif
6999
7000 static void *task(p)
7001         void *p;
7002 {
7003         return (void *) (p == NULL);
7004 }
7005
7006
7007 int main(argc, argv)
7008         int argc;
7009         char **argv;
7010 {
7011
7012         /* pthread test function */
7013         pthread_t t;
7014         int status;
7015 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7016         /* This system (e.g. AIX) defaults detached; must override */
7017         pthread_attr_t attr;
7018
7019         status = pthread_attr_init(&attr);
7020         if( status ) exit( status );
7021
7022         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7023         if( status ) exit( status );
7024
7025 #define ATTR    &attr
7026 #else
7027 #if HAVE_PTHREADS_D4
7028 #define ATTR    pthread_attr_default
7029 #else
7030 #define ATTR    NULL
7031 #endif
7032 #endif
7033         /* make sure pthread_create() isn't just a stub */
7034         status = pthread_create(&t, ATTR, task, NULL);
7035         if( status ) exit( status );
7036
7037         /* make sure pthread_detach() isn't just a stub */
7038 #if HAVE_PTHREADS_D4
7039         status = pthread_detach( &t );
7040 #else
7041         status = pthread_detach( t );
7042 #endif
7043
7044 #ifdef HAVE_LINUX_THREADS
7045         pthread_kill_other_threads_np();
7046 #endif
7047
7048         exit( status );
7049
7050 }
7051
7052 EOF
7053 if { (eval echo configure:7054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7054 then
7055   ol_cv_pthread_create=yes
7056 else
7057   echo "configure: failed program was:" >&5
7058   cat conftest.$ac_ext >&5
7059   rm -fr conftest*
7060   ol_cv_pthread_create=no
7061 fi
7062 rm -fr conftest*
7063 fi
7064
7065 fi
7066
7067 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7068
7069                 if test $ol_cv_pthread_create != no ; then
7070                         ol_link_threads=posix
7071                         ol_link_pthreads=""
7072                 fi
7073                 
7074                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7075 if test "$ol_link_threads" = no ; then
7076         # try -kthread
7077         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7078 echo "configure:7079: checking for pthread link with -kthread" >&5
7079 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7080   echo $ac_n "(cached) $ac_c" 1>&6
7081 else
7082   
7083                 # save the flags
7084                 ol_LIBS="$LIBS"
7085                 LIBS="-kthread $LIBS"
7086
7087                 if test "$cross_compiling" = yes; then
7088   cat > conftest.$ac_ext <<EOF
7089 #line 7090 "configure"
7090 #include "confdefs.h"
7091 /* pthread test headers */
7092 #include <pthread.h>
7093 #ifndef NULL
7094 #define NULL (void*)0
7095 #endif
7096
7097 static void *task(p)
7098         void *p;
7099 {
7100         return (void *) (p == NULL);
7101 }
7102
7103 int main() {
7104
7105         /* pthread test function */
7106         pthread_t t;
7107         int status;
7108 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7109         /* This system (e.g. AIX) defaults detached; must override */
7110         pthread_attr_t attr;
7111
7112         status = pthread_attr_init(&attr);
7113         if( status ) exit( status );
7114
7115         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7116         if( status ) exit( status );
7117
7118 #define ATTR    &attr
7119 #else
7120 #if HAVE_PTHREADS_D4
7121 #define ATTR    pthread_attr_default
7122 #else
7123 #define ATTR    NULL
7124 #endif
7125 #endif
7126         /* make sure pthread_create() isn't just a stub */
7127         status = pthread_create(&t, ATTR, task, NULL);
7128         if( status ) exit( status );
7129
7130         /* make sure pthread_detach() isn't just a stub */
7131 #if HAVE_PTHREADS_D4
7132         status = pthread_detach( &t );
7133 #else
7134         status = pthread_detach( t );
7135 #endif
7136
7137 #ifdef HAVE_LINUX_THREADS
7138         pthread_kill_other_threads_np();
7139 #endif
7140
7141         exit( status );
7142
7143 ; return 0; }
7144 EOF
7145 if { (eval echo configure:7146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7146   rm -rf conftest*
7147   ol_cv_pthread_kthread=yes
7148 else
7149   echo "configure: failed program was:" >&5
7150   cat conftest.$ac_ext >&5
7151   rm -rf conftest*
7152   ol_cv_pthread_kthread=no
7153 fi
7154 rm -f conftest*
7155 else
7156   cat > conftest.$ac_ext <<EOF
7157 #line 7158 "configure"
7158 #include "confdefs.h"
7159 /* pthread test headers */
7160 #include <pthread.h>
7161 #ifndef NULL
7162 #define NULL (void*)0
7163 #endif
7164
7165 static void *task(p)
7166         void *p;
7167 {
7168         return (void *) (p == NULL);
7169 }
7170
7171
7172 int main(argc, argv)
7173         int argc;
7174         char **argv;
7175 {
7176
7177         /* pthread test function */
7178         pthread_t t;
7179         int status;
7180 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7181         /* This system (e.g. AIX) defaults detached; must override */
7182         pthread_attr_t attr;
7183
7184         status = pthread_attr_init(&attr);
7185         if( status ) exit( status );
7186
7187         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7188         if( status ) exit( status );
7189
7190 #define ATTR    &attr
7191 #else
7192 #if HAVE_PTHREADS_D4
7193 #define ATTR    pthread_attr_default
7194 #else
7195 #define ATTR    NULL
7196 #endif
7197 #endif
7198         /* make sure pthread_create() isn't just a stub */
7199         status = pthread_create(&t, ATTR, task, NULL);
7200         if( status ) exit( status );
7201
7202         /* make sure pthread_detach() isn't just a stub */
7203 #if HAVE_PTHREADS_D4
7204         status = pthread_detach( &t );
7205 #else
7206         status = pthread_detach( t );
7207 #endif
7208
7209 #ifdef HAVE_LINUX_THREADS
7210         pthread_kill_other_threads_np();
7211 #endif
7212
7213         exit( status );
7214
7215 }
7216
7217 EOF
7218 if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7219 then
7220   ol_cv_pthread_kthread=yes
7221 else
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -fr conftest*
7225   ol_cv_pthread_kthread=no
7226 fi
7227 rm -fr conftest*
7228 fi
7229
7230
7231                 # restore the LIBS
7232                 LIBS="$ol_LIBS"
7233         
7234 fi
7235
7236 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7237
7238         if test $ol_cv_pthread_kthread = yes ; then
7239                 ol_link_pthreads="-kthread"
7240                 ol_link_threads=posix
7241         fi
7242 fi
7243
7244                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7245 if test "$ol_link_threads" = no ; then
7246         # try -pthread
7247         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7248 echo "configure:7249: checking for pthread link with -pthread" >&5
7249 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7250   echo $ac_n "(cached) $ac_c" 1>&6
7251 else
7252   
7253                 # save the flags
7254                 ol_LIBS="$LIBS"
7255                 LIBS="-pthread $LIBS"
7256
7257                 if test "$cross_compiling" = yes; then
7258   cat > conftest.$ac_ext <<EOF
7259 #line 7260 "configure"
7260 #include "confdefs.h"
7261 /* pthread test headers */
7262 #include <pthread.h>
7263 #ifndef NULL
7264 #define NULL (void*)0
7265 #endif
7266
7267 static void *task(p)
7268         void *p;
7269 {
7270         return (void *) (p == NULL);
7271 }
7272
7273 int main() {
7274
7275         /* pthread test function */
7276         pthread_t t;
7277         int status;
7278 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7279         /* This system (e.g. AIX) defaults detached; must override */
7280         pthread_attr_t attr;
7281
7282         status = pthread_attr_init(&attr);
7283         if( status ) exit( status );
7284
7285         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7286         if( status ) exit( status );
7287
7288 #define ATTR    &attr
7289 #else
7290 #if HAVE_PTHREADS_D4
7291 #define ATTR    pthread_attr_default
7292 #else
7293 #define ATTR    NULL
7294 #endif
7295 #endif
7296         /* make sure pthread_create() isn't just a stub */
7297         status = pthread_create(&t, ATTR, task, NULL);
7298         if( status ) exit( status );
7299
7300         /* make sure pthread_detach() isn't just a stub */
7301 #if HAVE_PTHREADS_D4
7302         status = pthread_detach( &t );
7303 #else
7304         status = pthread_detach( t );
7305 #endif
7306
7307 #ifdef HAVE_LINUX_THREADS
7308         pthread_kill_other_threads_np();
7309 #endif
7310
7311         exit( status );
7312
7313 ; return 0; }
7314 EOF
7315 if { (eval echo configure:7316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7316   rm -rf conftest*
7317   ol_cv_pthread_pthread=yes
7318 else
7319   echo "configure: failed program was:" >&5
7320   cat conftest.$ac_ext >&5
7321   rm -rf conftest*
7322   ol_cv_pthread_pthread=no
7323 fi
7324 rm -f conftest*
7325 else
7326   cat > conftest.$ac_ext <<EOF
7327 #line 7328 "configure"
7328 #include "confdefs.h"
7329 /* pthread test headers */
7330 #include <pthread.h>
7331 #ifndef NULL
7332 #define NULL (void*)0
7333 #endif
7334
7335 static void *task(p)
7336         void *p;
7337 {
7338         return (void *) (p == NULL);
7339 }
7340
7341
7342 int main(argc, argv)
7343         int argc;
7344         char **argv;
7345 {
7346
7347         /* pthread test function */
7348         pthread_t t;
7349         int status;
7350 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7351         /* This system (e.g. AIX) defaults detached; must override */
7352         pthread_attr_t attr;
7353
7354         status = pthread_attr_init(&attr);
7355         if( status ) exit( status );
7356
7357         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7358         if( status ) exit( status );
7359
7360 #define ATTR    &attr
7361 #else
7362 #if HAVE_PTHREADS_D4
7363 #define ATTR    pthread_attr_default
7364 #else
7365 #define ATTR    NULL
7366 #endif
7367 #endif
7368         /* make sure pthread_create() isn't just a stub */
7369         status = pthread_create(&t, ATTR, task, NULL);
7370         if( status ) exit( status );
7371
7372         /* make sure pthread_detach() isn't just a stub */
7373 #if HAVE_PTHREADS_D4
7374         status = pthread_detach( &t );
7375 #else
7376         status = pthread_detach( t );
7377 #endif
7378
7379 #ifdef HAVE_LINUX_THREADS
7380         pthread_kill_other_threads_np();
7381 #endif
7382
7383         exit( status );
7384
7385 }
7386
7387 EOF
7388 if { (eval echo configure:7389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7389 then
7390   ol_cv_pthread_pthread=yes
7391 else
7392   echo "configure: failed program was:" >&5
7393   cat conftest.$ac_ext >&5
7394   rm -fr conftest*
7395   ol_cv_pthread_pthread=no
7396 fi
7397 rm -fr conftest*
7398 fi
7399
7400
7401                 # restore the LIBS
7402                 LIBS="$ol_LIBS"
7403         
7404 fi
7405
7406 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7407
7408         if test $ol_cv_pthread_pthread = yes ; then
7409                 ol_link_pthreads="-pthread"
7410                 ol_link_threads=posix
7411         fi
7412 fi
7413
7414                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7415 if test "$ol_link_threads" = no ; then
7416         # try -pthreads
7417         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7418 echo "configure:7419: checking for pthread link with -pthreads" >&5
7419 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7420   echo $ac_n "(cached) $ac_c" 1>&6
7421 else
7422   
7423                 # save the flags
7424                 ol_LIBS="$LIBS"
7425                 LIBS="-pthreads $LIBS"
7426
7427                 if test "$cross_compiling" = yes; then
7428   cat > conftest.$ac_ext <<EOF
7429 #line 7430 "configure"
7430 #include "confdefs.h"
7431 /* pthread test headers */
7432 #include <pthread.h>
7433 #ifndef NULL
7434 #define NULL (void*)0
7435 #endif
7436
7437 static void *task(p)
7438         void *p;
7439 {
7440         return (void *) (p == NULL);
7441 }
7442
7443 int main() {
7444
7445         /* pthread test function */
7446         pthread_t t;
7447         int status;
7448 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7449         /* This system (e.g. AIX) defaults detached; must override */
7450         pthread_attr_t attr;
7451
7452         status = pthread_attr_init(&attr);
7453         if( status ) exit( status );
7454
7455         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7456         if( status ) exit( status );
7457
7458 #define ATTR    &attr
7459 #else
7460 #if HAVE_PTHREADS_D4
7461 #define ATTR    pthread_attr_default
7462 #else
7463 #define ATTR    NULL
7464 #endif
7465 #endif
7466         /* make sure pthread_create() isn't just a stub */
7467         status = pthread_create(&t, ATTR, task, NULL);
7468         if( status ) exit( status );
7469
7470         /* make sure pthread_detach() isn't just a stub */
7471 #if HAVE_PTHREADS_D4
7472         status = pthread_detach( &t );
7473 #else
7474         status = pthread_detach( t );
7475 #endif
7476
7477 #ifdef HAVE_LINUX_THREADS
7478         pthread_kill_other_threads_np();
7479 #endif
7480
7481         exit( status );
7482
7483 ; return 0; }
7484 EOF
7485 if { (eval echo configure:7486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7486   rm -rf conftest*
7487   ol_cv_pthread_pthreads=yes
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492   ol_cv_pthread_pthreads=no
7493 fi
7494 rm -f conftest*
7495 else
7496   cat > conftest.$ac_ext <<EOF
7497 #line 7498 "configure"
7498 #include "confdefs.h"
7499 /* pthread test headers */
7500 #include <pthread.h>
7501 #ifndef NULL
7502 #define NULL (void*)0
7503 #endif
7504
7505 static void *task(p)
7506         void *p;
7507 {
7508         return (void *) (p == NULL);
7509 }
7510
7511
7512 int main(argc, argv)
7513         int argc;
7514         char **argv;
7515 {
7516
7517         /* pthread test function */
7518         pthread_t t;
7519         int status;
7520 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7521         /* This system (e.g. AIX) defaults detached; must override */
7522         pthread_attr_t attr;
7523
7524         status = pthread_attr_init(&attr);
7525         if( status ) exit( status );
7526
7527         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7528         if( status ) exit( status );
7529
7530 #define ATTR    &attr
7531 #else
7532 #if HAVE_PTHREADS_D4
7533 #define ATTR    pthread_attr_default
7534 #else
7535 #define ATTR    NULL
7536 #endif
7537 #endif
7538         /* make sure pthread_create() isn't just a stub */
7539         status = pthread_create(&t, ATTR, task, NULL);
7540         if( status ) exit( status );
7541
7542         /* make sure pthread_detach() isn't just a stub */
7543 #if HAVE_PTHREADS_D4
7544         status = pthread_detach( &t );
7545 #else
7546         status = pthread_detach( t );
7547 #endif
7548
7549 #ifdef HAVE_LINUX_THREADS
7550         pthread_kill_other_threads_np();
7551 #endif
7552
7553         exit( status );
7554
7555 }
7556
7557 EOF
7558 if { (eval echo configure:7559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7559 then
7560   ol_cv_pthread_pthreads=yes
7561 else
7562   echo "configure: failed program was:" >&5
7563   cat conftest.$ac_ext >&5
7564   rm -fr conftest*
7565   ol_cv_pthread_pthreads=no
7566 fi
7567 rm -fr conftest*
7568 fi
7569
7570
7571                 # restore the LIBS
7572                 LIBS="$ol_LIBS"
7573         
7574 fi
7575
7576 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7577
7578         if test $ol_cv_pthread_pthreads = yes ; then
7579                 ol_link_pthreads="-pthreads"
7580                 ol_link_threads=posix
7581         fi
7582 fi
7583
7584                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7585 if test "$ol_link_threads" = no ; then
7586         # try -mthreads
7587         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7588 echo "configure:7589: checking for pthread link with -mthreads" >&5
7589 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7590   echo $ac_n "(cached) $ac_c" 1>&6
7591 else
7592   
7593                 # save the flags
7594                 ol_LIBS="$LIBS"
7595                 LIBS="-mthreads $LIBS"
7596
7597                 if test "$cross_compiling" = yes; then
7598   cat > conftest.$ac_ext <<EOF
7599 #line 7600 "configure"
7600 #include "confdefs.h"
7601 /* pthread test headers */
7602 #include <pthread.h>
7603 #ifndef NULL
7604 #define NULL (void*)0
7605 #endif
7606
7607 static void *task(p)
7608         void *p;
7609 {
7610         return (void *) (p == NULL);
7611 }
7612
7613 int main() {
7614
7615         /* pthread test function */
7616         pthread_t t;
7617         int status;
7618 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7619         /* This system (e.g. AIX) defaults detached; must override */
7620         pthread_attr_t attr;
7621
7622         status = pthread_attr_init(&attr);
7623         if( status ) exit( status );
7624
7625         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7626         if( status ) exit( status );
7627
7628 #define ATTR    &attr
7629 #else
7630 #if HAVE_PTHREADS_D4
7631 #define ATTR    pthread_attr_default
7632 #else
7633 #define ATTR    NULL
7634 #endif
7635 #endif
7636         /* make sure pthread_create() isn't just a stub */
7637         status = pthread_create(&t, ATTR, task, NULL);
7638         if( status ) exit( status );
7639
7640         /* make sure pthread_detach() isn't just a stub */
7641 #if HAVE_PTHREADS_D4
7642         status = pthread_detach( &t );
7643 #else
7644         status = pthread_detach( t );
7645 #endif
7646
7647 #ifdef HAVE_LINUX_THREADS
7648         pthread_kill_other_threads_np();
7649 #endif
7650
7651         exit( status );
7652
7653 ; return 0; }
7654 EOF
7655 if { (eval echo configure:7656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7656   rm -rf conftest*
7657   ol_cv_pthread_mthreads=yes
7658 else
7659   echo "configure: failed program was:" >&5
7660   cat conftest.$ac_ext >&5
7661   rm -rf conftest*
7662   ol_cv_pthread_mthreads=no
7663 fi
7664 rm -f conftest*
7665 else
7666   cat > conftest.$ac_ext <<EOF
7667 #line 7668 "configure"
7668 #include "confdefs.h"
7669 /* pthread test headers */
7670 #include <pthread.h>
7671 #ifndef NULL
7672 #define NULL (void*)0
7673 #endif
7674
7675 static void *task(p)
7676         void *p;
7677 {
7678         return (void *) (p == NULL);
7679 }
7680
7681
7682 int main(argc, argv)
7683         int argc;
7684         char **argv;
7685 {
7686
7687         /* pthread test function */
7688         pthread_t t;
7689         int status;
7690 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7691         /* This system (e.g. AIX) defaults detached; must override */
7692         pthread_attr_t attr;
7693
7694         status = pthread_attr_init(&attr);
7695         if( status ) exit( status );
7696
7697         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7698         if( status ) exit( status );
7699
7700 #define ATTR    &attr
7701 #else
7702 #if HAVE_PTHREADS_D4
7703 #define ATTR    pthread_attr_default
7704 #else
7705 #define ATTR    NULL
7706 #endif
7707 #endif
7708         /* make sure pthread_create() isn't just a stub */
7709         status = pthread_create(&t, ATTR, task, NULL);
7710         if( status ) exit( status );
7711
7712         /* make sure pthread_detach() isn't just a stub */
7713 #if HAVE_PTHREADS_D4
7714         status = pthread_detach( &t );
7715 #else
7716         status = pthread_detach( t );
7717 #endif
7718
7719 #ifdef HAVE_LINUX_THREADS
7720         pthread_kill_other_threads_np();
7721 #endif
7722
7723         exit( status );
7724
7725 }
7726
7727 EOF
7728 if { (eval echo configure:7729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7729 then
7730   ol_cv_pthread_mthreads=yes
7731 else
7732   echo "configure: failed program was:" >&5
7733   cat conftest.$ac_ext >&5
7734   rm -fr conftest*
7735   ol_cv_pthread_mthreads=no
7736 fi
7737 rm -fr conftest*
7738 fi
7739
7740
7741                 # restore the LIBS
7742                 LIBS="$ol_LIBS"
7743         
7744 fi
7745
7746 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7747
7748         if test $ol_cv_pthread_mthreads = yes ; then
7749                 ol_link_pthreads="-mthreads"
7750                 ol_link_threads=posix
7751         fi
7752 fi
7753
7754                 # Pthread try link: -thread (ol_cv_pthread_thread)
7755 if test "$ol_link_threads" = no ; then
7756         # try -thread
7757         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7758 echo "configure:7759: checking for pthread link with -thread" >&5
7759 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7760   echo $ac_n "(cached) $ac_c" 1>&6
7761 else
7762   
7763                 # save the flags
7764                 ol_LIBS="$LIBS"
7765                 LIBS="-thread $LIBS"
7766
7767                 if test "$cross_compiling" = yes; then
7768   cat > conftest.$ac_ext <<EOF
7769 #line 7770 "configure"
7770 #include "confdefs.h"
7771 /* pthread test headers */
7772 #include <pthread.h>
7773 #ifndef NULL
7774 #define NULL (void*)0
7775 #endif
7776
7777 static void *task(p)
7778         void *p;
7779 {
7780         return (void *) (p == NULL);
7781 }
7782
7783 int main() {
7784
7785         /* pthread test function */
7786         pthread_t t;
7787         int status;
7788 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7789         /* This system (e.g. AIX) defaults detached; must override */
7790         pthread_attr_t attr;
7791
7792         status = pthread_attr_init(&attr);
7793         if( status ) exit( status );
7794
7795         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7796         if( status ) exit( status );
7797
7798 #define ATTR    &attr
7799 #else
7800 #if HAVE_PTHREADS_D4
7801 #define ATTR    pthread_attr_default
7802 #else
7803 #define ATTR    NULL
7804 #endif
7805 #endif
7806         /* make sure pthread_create() isn't just a stub */
7807         status = pthread_create(&t, ATTR, task, NULL);
7808         if( status ) exit( status );
7809
7810         /* make sure pthread_detach() isn't just a stub */
7811 #if HAVE_PTHREADS_D4
7812         status = pthread_detach( &t );
7813 #else
7814         status = pthread_detach( t );
7815 #endif
7816
7817 #ifdef HAVE_LINUX_THREADS
7818         pthread_kill_other_threads_np();
7819 #endif
7820
7821         exit( status );
7822
7823 ; return 0; }
7824 EOF
7825 if { (eval echo configure:7826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7826   rm -rf conftest*
7827   ol_cv_pthread_thread=yes
7828 else
7829   echo "configure: failed program was:" >&5
7830   cat conftest.$ac_ext >&5
7831   rm -rf conftest*
7832   ol_cv_pthread_thread=no
7833 fi
7834 rm -f conftest*
7835 else
7836   cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 /* pthread test headers */
7840 #include <pthread.h>
7841 #ifndef NULL
7842 #define NULL (void*)0
7843 #endif
7844
7845 static void *task(p)
7846         void *p;
7847 {
7848         return (void *) (p == NULL);
7849 }
7850
7851
7852 int main(argc, argv)
7853         int argc;
7854         char **argv;
7855 {
7856
7857         /* pthread test function */
7858         pthread_t t;
7859         int status;
7860 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7861         /* This system (e.g. AIX) defaults detached; must override */
7862         pthread_attr_t attr;
7863
7864         status = pthread_attr_init(&attr);
7865         if( status ) exit( status );
7866
7867         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7868         if( status ) exit( status );
7869
7870 #define ATTR    &attr
7871 #else
7872 #if HAVE_PTHREADS_D4
7873 #define ATTR    pthread_attr_default
7874 #else
7875 #define ATTR    NULL
7876 #endif
7877 #endif
7878         /* make sure pthread_create() isn't just a stub */
7879         status = pthread_create(&t, ATTR, task, NULL);
7880         if( status ) exit( status );
7881
7882         /* make sure pthread_detach() isn't just a stub */
7883 #if HAVE_PTHREADS_D4
7884         status = pthread_detach( &t );
7885 #else
7886         status = pthread_detach( t );
7887 #endif
7888
7889 #ifdef HAVE_LINUX_THREADS
7890         pthread_kill_other_threads_np();
7891 #endif
7892
7893         exit( status );
7894
7895 }
7896
7897 EOF
7898 if { (eval echo configure:7899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7899 then
7900   ol_cv_pthread_thread=yes
7901 else
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -fr conftest*
7905   ol_cv_pthread_thread=no
7906 fi
7907 rm -fr conftest*
7908 fi
7909
7910
7911                 # restore the LIBS
7912                 LIBS="$ol_LIBS"
7913         
7914 fi
7915
7916 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7917
7918         if test $ol_cv_pthread_thread = yes ; then
7919                 ol_link_pthreads="-thread"
7920                 ol_link_threads=posix
7921         fi
7922 fi
7923
7924
7925                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7926 if test "$ol_link_threads" = no ; then
7927         # try -lpthread -lmach -lexc -lc_r
7928         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7929 echo "configure:7930: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7930 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7931   echo $ac_n "(cached) $ac_c" 1>&6
7932 else
7933   
7934                 # save the flags
7935                 ol_LIBS="$LIBS"
7936                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7937
7938                 if test "$cross_compiling" = yes; then
7939   cat > conftest.$ac_ext <<EOF
7940 #line 7941 "configure"
7941 #include "confdefs.h"
7942 /* pthread test headers */
7943 #include <pthread.h>
7944 #ifndef NULL
7945 #define NULL (void*)0
7946 #endif
7947
7948 static void *task(p)
7949         void *p;
7950 {
7951         return (void *) (p == NULL);
7952 }
7953
7954 int main() {
7955
7956         /* pthread test function */
7957         pthread_t t;
7958         int status;
7959 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7960         /* This system (e.g. AIX) defaults detached; must override */
7961         pthread_attr_t attr;
7962
7963         status = pthread_attr_init(&attr);
7964         if( status ) exit( status );
7965
7966         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7967         if( status ) exit( status );
7968
7969 #define ATTR    &attr
7970 #else
7971 #if HAVE_PTHREADS_D4
7972 #define ATTR    pthread_attr_default
7973 #else
7974 #define ATTR    NULL
7975 #endif
7976 #endif
7977         /* make sure pthread_create() isn't just a stub */
7978         status = pthread_create(&t, ATTR, task, NULL);
7979         if( status ) exit( status );
7980
7981         /* make sure pthread_detach() isn't just a stub */
7982 #if HAVE_PTHREADS_D4
7983         status = pthread_detach( &t );
7984 #else
7985         status = pthread_detach( t );
7986 #endif
7987
7988 #ifdef HAVE_LINUX_THREADS
7989         pthread_kill_other_threads_np();
7990 #endif
7991
7992         exit( status );
7993
7994 ; return 0; }
7995 EOF
7996 if { (eval echo configure:7997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7997   rm -rf conftest*
7998   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7999 else
8000   echo "configure: failed program was:" >&5
8001   cat conftest.$ac_ext >&5
8002   rm -rf conftest*
8003   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8004 fi
8005 rm -f conftest*
8006 else
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 /* pthread test headers */
8011 #include <pthread.h>
8012 #ifndef NULL
8013 #define NULL (void*)0
8014 #endif
8015
8016 static void *task(p)
8017         void *p;
8018 {
8019         return (void *) (p == NULL);
8020 }
8021
8022
8023 int main(argc, argv)
8024         int argc;
8025         char **argv;
8026 {
8027
8028         /* pthread test function */
8029         pthread_t t;
8030         int status;
8031 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8032         /* This system (e.g. AIX) defaults detached; must override */
8033         pthread_attr_t attr;
8034
8035         status = pthread_attr_init(&attr);
8036         if( status ) exit( status );
8037
8038         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8039         if( status ) exit( status );
8040
8041 #define ATTR    &attr
8042 #else
8043 #if HAVE_PTHREADS_D4
8044 #define ATTR    pthread_attr_default
8045 #else
8046 #define ATTR    NULL
8047 #endif
8048 #endif
8049         /* make sure pthread_create() isn't just a stub */
8050         status = pthread_create(&t, ATTR, task, NULL);
8051         if( status ) exit( status );
8052
8053         /* make sure pthread_detach() isn't just a stub */
8054 #if HAVE_PTHREADS_D4
8055         status = pthread_detach( &t );
8056 #else
8057         status = pthread_detach( t );
8058 #endif
8059
8060 #ifdef HAVE_LINUX_THREADS
8061         pthread_kill_other_threads_np();
8062 #endif
8063
8064         exit( status );
8065
8066 }
8067
8068 EOF
8069 if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8070 then
8071   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8072 else
8073   echo "configure: failed program was:" >&5
8074   cat conftest.$ac_ext >&5
8075   rm -fr conftest*
8076   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8077 fi
8078 rm -fr conftest*
8079 fi
8080
8081
8082                 # restore the LIBS
8083                 LIBS="$ol_LIBS"
8084         
8085 fi
8086
8087 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8088
8089         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8090                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8091                 ol_link_threads=posix
8092         fi
8093 fi
8094
8095                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8096 if test "$ol_link_threads" = no ; then
8097         # try -lpthread -lmach -lexc
8098         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8099 echo "configure:8100: checking for pthread link with -lpthread -lmach -lexc" >&5
8100 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8101   echo $ac_n "(cached) $ac_c" 1>&6
8102 else
8103   
8104                 # save the flags
8105                 ol_LIBS="$LIBS"
8106                 LIBS="-lpthread -lmach -lexc $LIBS"
8107
8108                 if test "$cross_compiling" = yes; then
8109   cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 /* pthread test headers */
8113 #include <pthread.h>
8114 #ifndef NULL
8115 #define NULL (void*)0
8116 #endif
8117
8118 static void *task(p)
8119         void *p;
8120 {
8121         return (void *) (p == NULL);
8122 }
8123
8124 int main() {
8125
8126         /* pthread test function */
8127         pthread_t t;
8128         int status;
8129 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8130         /* This system (e.g. AIX) defaults detached; must override */
8131         pthread_attr_t attr;
8132
8133         status = pthread_attr_init(&attr);
8134         if( status ) exit( status );
8135
8136         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8137         if( status ) exit( status );
8138
8139 #define ATTR    &attr
8140 #else
8141 #if HAVE_PTHREADS_D4
8142 #define ATTR    pthread_attr_default
8143 #else
8144 #define ATTR    NULL
8145 #endif
8146 #endif
8147         /* make sure pthread_create() isn't just a stub */
8148         status = pthread_create(&t, ATTR, task, NULL);
8149         if( status ) exit( status );
8150
8151         /* make sure pthread_detach() isn't just a stub */
8152 #if HAVE_PTHREADS_D4
8153         status = pthread_detach( &t );
8154 #else
8155         status = pthread_detach( t );
8156 #endif
8157
8158 #ifdef HAVE_LINUX_THREADS
8159         pthread_kill_other_threads_np();
8160 #endif
8161
8162         exit( status );
8163
8164 ; return 0; }
8165 EOF
8166 if { (eval echo configure:8167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8167   rm -rf conftest*
8168   ol_cv_pthread_lpthread_lmach_lexc=yes
8169 else
8170   echo "configure: failed program was:" >&5
8171   cat conftest.$ac_ext >&5
8172   rm -rf conftest*
8173   ol_cv_pthread_lpthread_lmach_lexc=no
8174 fi
8175 rm -f conftest*
8176 else
8177   cat > conftest.$ac_ext <<EOF
8178 #line 8179 "configure"
8179 #include "confdefs.h"
8180 /* pthread test headers */
8181 #include <pthread.h>
8182 #ifndef NULL
8183 #define NULL (void*)0
8184 #endif
8185
8186 static void *task(p)
8187         void *p;
8188 {
8189         return (void *) (p == NULL);
8190 }
8191
8192
8193 int main(argc, argv)
8194         int argc;
8195         char **argv;
8196 {
8197
8198         /* pthread test function */
8199         pthread_t t;
8200         int status;
8201 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8202         /* This system (e.g. AIX) defaults detached; must override */
8203         pthread_attr_t attr;
8204
8205         status = pthread_attr_init(&attr);
8206         if( status ) exit( status );
8207
8208         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8209         if( status ) exit( status );
8210
8211 #define ATTR    &attr
8212 #else
8213 #if HAVE_PTHREADS_D4
8214 #define ATTR    pthread_attr_default
8215 #else
8216 #define ATTR    NULL
8217 #endif
8218 #endif
8219         /* make sure pthread_create() isn't just a stub */
8220         status = pthread_create(&t, ATTR, task, NULL);
8221         if( status ) exit( status );
8222
8223         /* make sure pthread_detach() isn't just a stub */
8224 #if HAVE_PTHREADS_D4
8225         status = pthread_detach( &t );
8226 #else
8227         status = pthread_detach( t );
8228 #endif
8229
8230 #ifdef HAVE_LINUX_THREADS
8231         pthread_kill_other_threads_np();
8232 #endif
8233
8234         exit( status );
8235
8236 }
8237
8238 EOF
8239 if { (eval echo configure:8240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8240 then
8241   ol_cv_pthread_lpthread_lmach_lexc=yes
8242 else
8243   echo "configure: failed program was:" >&5
8244   cat conftest.$ac_ext >&5
8245   rm -fr conftest*
8246   ol_cv_pthread_lpthread_lmach_lexc=no
8247 fi
8248 rm -fr conftest*
8249 fi
8250
8251
8252                 # restore the LIBS
8253                 LIBS="$ol_LIBS"
8254         
8255 fi
8256
8257 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8258
8259         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8260                 ol_link_pthreads="-lpthread -lmach -lexc"
8261                 ol_link_threads=posix
8262         fi
8263 fi
8264
8265
8266                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8267 if test "$ol_link_threads" = no ; then
8268         # try -lpthread -Wl,-woff,85
8269         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8270 echo "configure:8271: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8271 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8272   echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274   
8275                 # save the flags
8276                 ol_LIBS="$LIBS"
8277                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8278
8279                 if test "$cross_compiling" = yes; then
8280   cat > conftest.$ac_ext <<EOF
8281 #line 8282 "configure"
8282 #include "confdefs.h"
8283 /* pthread test headers */
8284 #include <pthread.h>
8285 #ifndef NULL
8286 #define NULL (void*)0
8287 #endif
8288
8289 static void *task(p)
8290         void *p;
8291 {
8292         return (void *) (p == NULL);
8293 }
8294
8295 int main() {
8296
8297         /* pthread test function */
8298         pthread_t t;
8299         int status;
8300 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8301         /* This system (e.g. AIX) defaults detached; must override */
8302         pthread_attr_t attr;
8303
8304         status = pthread_attr_init(&attr);
8305         if( status ) exit( status );
8306
8307         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8308         if( status ) exit( status );
8309
8310 #define ATTR    &attr
8311 #else
8312 #if HAVE_PTHREADS_D4
8313 #define ATTR    pthread_attr_default
8314 #else
8315 #define ATTR    NULL
8316 #endif
8317 #endif
8318         /* make sure pthread_create() isn't just a stub */
8319         status = pthread_create(&t, ATTR, task, NULL);
8320         if( status ) exit( status );
8321
8322         /* make sure pthread_detach() isn't just a stub */
8323 #if HAVE_PTHREADS_D4
8324         status = pthread_detach( &t );
8325 #else
8326         status = pthread_detach( t );
8327 #endif
8328
8329 #ifdef HAVE_LINUX_THREADS
8330         pthread_kill_other_threads_np();
8331 #endif
8332
8333         exit( status );
8334
8335 ; return 0; }
8336 EOF
8337 if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8338   rm -rf conftest*
8339   ol_cv_pthread_lib_lpthread_woff=yes
8340 else
8341   echo "configure: failed program was:" >&5
8342   cat conftest.$ac_ext >&5
8343   rm -rf conftest*
8344   ol_cv_pthread_lib_lpthread_woff=no
8345 fi
8346 rm -f conftest*
8347 else
8348   cat > conftest.$ac_ext <<EOF
8349 #line 8350 "configure"
8350 #include "confdefs.h"
8351 /* pthread test headers */
8352 #include <pthread.h>
8353 #ifndef NULL
8354 #define NULL (void*)0
8355 #endif
8356
8357 static void *task(p)
8358         void *p;
8359 {
8360         return (void *) (p == NULL);
8361 }
8362
8363
8364 int main(argc, argv)
8365         int argc;
8366         char **argv;
8367 {
8368
8369         /* pthread test function */
8370         pthread_t t;
8371         int status;
8372 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8373         /* This system (e.g. AIX) defaults detached; must override */
8374         pthread_attr_t attr;
8375
8376         status = pthread_attr_init(&attr);
8377         if( status ) exit( status );
8378
8379         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8380         if( status ) exit( status );
8381
8382 #define ATTR    &attr
8383 #else
8384 #if HAVE_PTHREADS_D4
8385 #define ATTR    pthread_attr_default
8386 #else
8387 #define ATTR    NULL
8388 #endif
8389 #endif
8390         /* make sure pthread_create() isn't just a stub */
8391         status = pthread_create(&t, ATTR, task, NULL);
8392         if( status ) exit( status );
8393
8394         /* make sure pthread_detach() isn't just a stub */
8395 #if HAVE_PTHREADS_D4
8396         status = pthread_detach( &t );
8397 #else
8398         status = pthread_detach( t );
8399 #endif
8400
8401 #ifdef HAVE_LINUX_THREADS
8402         pthread_kill_other_threads_np();
8403 #endif
8404
8405         exit( status );
8406
8407 }
8408
8409 EOF
8410 if { (eval echo configure:8411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8411 then
8412   ol_cv_pthread_lib_lpthread_woff=yes
8413 else
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -fr conftest*
8417   ol_cv_pthread_lib_lpthread_woff=no
8418 fi
8419 rm -fr conftest*
8420 fi
8421
8422
8423                 # restore the LIBS
8424                 LIBS="$ol_LIBS"
8425         
8426 fi
8427
8428 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8429
8430         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8431                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8432                 ol_link_threads=posix
8433         fi
8434 fi
8435
8436
8437                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8438 if test "$ol_link_threads" = no ; then
8439         # try -lpthread
8440         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8441 echo "configure:8442: checking for pthread link with -lpthread" >&5
8442 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8443   echo $ac_n "(cached) $ac_c" 1>&6
8444 else
8445   
8446                 # save the flags
8447                 ol_LIBS="$LIBS"
8448                 LIBS="-lpthread $LIBS"
8449
8450                 if test "$cross_compiling" = yes; then
8451   cat > conftest.$ac_ext <<EOF
8452 #line 8453 "configure"
8453 #include "confdefs.h"
8454 /* pthread test headers */
8455 #include <pthread.h>
8456 #ifndef NULL
8457 #define NULL (void*)0
8458 #endif
8459
8460 static void *task(p)
8461         void *p;
8462 {
8463         return (void *) (p == NULL);
8464 }
8465
8466 int main() {
8467
8468         /* pthread test function */
8469         pthread_t t;
8470         int status;
8471 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8472         /* This system (e.g. AIX) defaults detached; must override */
8473         pthread_attr_t attr;
8474
8475         status = pthread_attr_init(&attr);
8476         if( status ) exit( status );
8477
8478         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8479         if( status ) exit( status );
8480
8481 #define ATTR    &attr
8482 #else
8483 #if HAVE_PTHREADS_D4
8484 #define ATTR    pthread_attr_default
8485 #else
8486 #define ATTR    NULL
8487 #endif
8488 #endif
8489         /* make sure pthread_create() isn't just a stub */
8490         status = pthread_create(&t, ATTR, task, NULL);
8491         if( status ) exit( status );
8492
8493         /* make sure pthread_detach() isn't just a stub */
8494 #if HAVE_PTHREADS_D4
8495         status = pthread_detach( &t );
8496 #else
8497         status = pthread_detach( t );
8498 #endif
8499
8500 #ifdef HAVE_LINUX_THREADS
8501         pthread_kill_other_threads_np();
8502 #endif
8503
8504         exit( status );
8505
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   ol_cv_pthread_lpthread=yes
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   ol_cv_pthread_lpthread=no
8516 fi
8517 rm -f conftest*
8518 else
8519   cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 /* pthread test headers */
8523 #include <pthread.h>
8524 #ifndef NULL
8525 #define NULL (void*)0
8526 #endif
8527
8528 static void *task(p)
8529         void *p;
8530 {
8531         return (void *) (p == NULL);
8532 }
8533
8534
8535 int main(argc, argv)
8536         int argc;
8537         char **argv;
8538 {
8539
8540         /* pthread test function */
8541         pthread_t t;
8542         int status;
8543 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8544         /* This system (e.g. AIX) defaults detached; must override */
8545         pthread_attr_t attr;
8546
8547         status = pthread_attr_init(&attr);
8548         if( status ) exit( status );
8549
8550         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8551         if( status ) exit( status );
8552
8553 #define ATTR    &attr
8554 #else
8555 #if HAVE_PTHREADS_D4
8556 #define ATTR    pthread_attr_default
8557 #else
8558 #define ATTR    NULL
8559 #endif
8560 #endif
8561         /* make sure pthread_create() isn't just a stub */
8562         status = pthread_create(&t, ATTR, task, NULL);
8563         if( status ) exit( status );
8564
8565         /* make sure pthread_detach() isn't just a stub */
8566 #if HAVE_PTHREADS_D4
8567         status = pthread_detach( &t );
8568 #else
8569         status = pthread_detach( t );
8570 #endif
8571
8572 #ifdef HAVE_LINUX_THREADS
8573         pthread_kill_other_threads_np();
8574 #endif
8575
8576         exit( status );
8577
8578 }
8579
8580 EOF
8581 if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8582 then
8583   ol_cv_pthread_lpthread=yes
8584 else
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -fr conftest*
8588   ol_cv_pthread_lpthread=no
8589 fi
8590 rm -fr conftest*
8591 fi
8592
8593
8594                 # restore the LIBS
8595                 LIBS="$ol_LIBS"
8596         
8597 fi
8598
8599 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8600
8601         if test $ol_cv_pthread_lpthread = yes ; then
8602                 ol_link_pthreads="-lpthread"
8603                 ol_link_threads=posix
8604         fi
8605 fi
8606
8607                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8608 if test "$ol_link_threads" = no ; then
8609         # try -lc_r
8610         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8611 echo "configure:8612: checking for pthread link with -lc_r" >&5
8612 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8613   echo $ac_n "(cached) $ac_c" 1>&6
8614 else
8615   
8616                 # save the flags
8617                 ol_LIBS="$LIBS"
8618                 LIBS="-lc_r $LIBS"
8619
8620                 if test "$cross_compiling" = yes; then
8621   cat > conftest.$ac_ext <<EOF
8622 #line 8623 "configure"
8623 #include "confdefs.h"
8624 /* pthread test headers */
8625 #include <pthread.h>
8626 #ifndef NULL
8627 #define NULL (void*)0
8628 #endif
8629
8630 static void *task(p)
8631         void *p;
8632 {
8633         return (void *) (p == NULL);
8634 }
8635
8636 int main() {
8637
8638         /* pthread test function */
8639         pthread_t t;
8640         int status;
8641 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8642         /* This system (e.g. AIX) defaults detached; must override */
8643         pthread_attr_t attr;
8644
8645         status = pthread_attr_init(&attr);
8646         if( status ) exit( status );
8647
8648         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8649         if( status ) exit( status );
8650
8651 #define ATTR    &attr
8652 #else
8653 #if HAVE_PTHREADS_D4
8654 #define ATTR    pthread_attr_default
8655 #else
8656 #define ATTR    NULL
8657 #endif
8658 #endif
8659         /* make sure pthread_create() isn't just a stub */
8660         status = pthread_create(&t, ATTR, task, NULL);
8661         if( status ) exit( status );
8662
8663         /* make sure pthread_detach() isn't just a stub */
8664 #if HAVE_PTHREADS_D4
8665         status = pthread_detach( &t );
8666 #else
8667         status = pthread_detach( t );
8668 #endif
8669
8670 #ifdef HAVE_LINUX_THREADS
8671         pthread_kill_other_threads_np();
8672 #endif
8673
8674         exit( status );
8675
8676 ; return 0; }
8677 EOF
8678 if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8679   rm -rf conftest*
8680   ol_cv_pthread_lc_r=yes
8681 else
8682   echo "configure: failed program was:" >&5
8683   cat conftest.$ac_ext >&5
8684   rm -rf conftest*
8685   ol_cv_pthread_lc_r=no
8686 fi
8687 rm -f conftest*
8688 else
8689   cat > conftest.$ac_ext <<EOF
8690 #line 8691 "configure"
8691 #include "confdefs.h"
8692 /* pthread test headers */
8693 #include <pthread.h>
8694 #ifndef NULL
8695 #define NULL (void*)0
8696 #endif
8697
8698 static void *task(p)
8699         void *p;
8700 {
8701         return (void *) (p == NULL);
8702 }
8703
8704
8705 int main(argc, argv)
8706         int argc;
8707         char **argv;
8708 {
8709
8710         /* pthread test function */
8711         pthread_t t;
8712         int status;
8713 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8714         /* This system (e.g. AIX) defaults detached; must override */
8715         pthread_attr_t attr;
8716
8717         status = pthread_attr_init(&attr);
8718         if( status ) exit( status );
8719
8720         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8721         if( status ) exit( status );
8722
8723 #define ATTR    &attr
8724 #else
8725 #if HAVE_PTHREADS_D4
8726 #define ATTR    pthread_attr_default
8727 #else
8728 #define ATTR    NULL
8729 #endif
8730 #endif
8731         /* make sure pthread_create() isn't just a stub */
8732         status = pthread_create(&t, ATTR, task, NULL);
8733         if( status ) exit( status );
8734
8735         /* make sure pthread_detach() isn't just a stub */
8736 #if HAVE_PTHREADS_D4
8737         status = pthread_detach( &t );
8738 #else
8739         status = pthread_detach( t );
8740 #endif
8741
8742 #ifdef HAVE_LINUX_THREADS
8743         pthread_kill_other_threads_np();
8744 #endif
8745
8746         exit( status );
8747
8748 }
8749
8750 EOF
8751 if { (eval echo configure:8752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8752 then
8753   ol_cv_pthread_lc_r=yes
8754 else
8755   echo "configure: failed program was:" >&5
8756   cat conftest.$ac_ext >&5
8757   rm -fr conftest*
8758   ol_cv_pthread_lc_r=no
8759 fi
8760 rm -fr conftest*
8761 fi
8762
8763
8764                 # restore the LIBS
8765                 LIBS="$ol_LIBS"
8766         
8767 fi
8768
8769 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8770
8771         if test $ol_cv_pthread_lc_r = yes ; then
8772                 ol_link_pthreads="-lc_r"
8773                 ol_link_threads=posix
8774         fi
8775 fi
8776
8777
8778                 # Pthread try link: -threads (ol_cv_pthread_threads)
8779 if test "$ol_link_threads" = no ; then
8780         # try -threads
8781         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8782 echo "configure:8783: checking for pthread link with -threads" >&5
8783 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8784   echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786   
8787                 # save the flags
8788                 ol_LIBS="$LIBS"
8789                 LIBS="-threads $LIBS"
8790
8791                 if test "$cross_compiling" = yes; then
8792   cat > conftest.$ac_ext <<EOF
8793 #line 8794 "configure"
8794 #include "confdefs.h"
8795 /* pthread test headers */
8796 #include <pthread.h>
8797 #ifndef NULL
8798 #define NULL (void*)0
8799 #endif
8800
8801 static void *task(p)
8802         void *p;
8803 {
8804         return (void *) (p == NULL);
8805 }
8806
8807 int main() {
8808
8809         /* pthread test function */
8810         pthread_t t;
8811         int status;
8812 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8813         /* This system (e.g. AIX) defaults detached; must override */
8814         pthread_attr_t attr;
8815
8816         status = pthread_attr_init(&attr);
8817         if( status ) exit( status );
8818
8819         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8820         if( status ) exit( status );
8821
8822 #define ATTR    &attr
8823 #else
8824 #if HAVE_PTHREADS_D4
8825 #define ATTR    pthread_attr_default
8826 #else
8827 #define ATTR    NULL
8828 #endif
8829 #endif
8830         /* make sure pthread_create() isn't just a stub */
8831         status = pthread_create(&t, ATTR, task, NULL);
8832         if( status ) exit( status );
8833
8834         /* make sure pthread_detach() isn't just a stub */
8835 #if HAVE_PTHREADS_D4
8836         status = pthread_detach( &t );
8837 #else
8838         status = pthread_detach( t );
8839 #endif
8840
8841 #ifdef HAVE_LINUX_THREADS
8842         pthread_kill_other_threads_np();
8843 #endif
8844
8845         exit( status );
8846
8847 ; return 0; }
8848 EOF
8849 if { (eval echo configure:8850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8850   rm -rf conftest*
8851   ol_cv_pthread_threads=yes
8852 else
8853   echo "configure: failed program was:" >&5
8854   cat conftest.$ac_ext >&5
8855   rm -rf conftest*
8856   ol_cv_pthread_threads=no
8857 fi
8858 rm -f conftest*
8859 else
8860   cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863 /* pthread test headers */
8864 #include <pthread.h>
8865 #ifndef NULL
8866 #define NULL (void*)0
8867 #endif
8868
8869 static void *task(p)
8870         void *p;
8871 {
8872         return (void *) (p == NULL);
8873 }
8874
8875
8876 int main(argc, argv)
8877         int argc;
8878         char **argv;
8879 {
8880
8881         /* pthread test function */
8882         pthread_t t;
8883         int status;
8884 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8885         /* This system (e.g. AIX) defaults detached; must override */
8886         pthread_attr_t attr;
8887
8888         status = pthread_attr_init(&attr);
8889         if( status ) exit( status );
8890
8891         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8892         if( status ) exit( status );
8893
8894 #define ATTR    &attr
8895 #else
8896 #if HAVE_PTHREADS_D4
8897 #define ATTR    pthread_attr_default
8898 #else
8899 #define ATTR    NULL
8900 #endif
8901 #endif
8902         /* make sure pthread_create() isn't just a stub */
8903         status = pthread_create(&t, ATTR, task, NULL);
8904         if( status ) exit( status );
8905
8906         /* make sure pthread_detach() isn't just a stub */
8907 #if HAVE_PTHREADS_D4
8908         status = pthread_detach( &t );
8909 #else
8910         status = pthread_detach( t );
8911 #endif
8912
8913 #ifdef HAVE_LINUX_THREADS
8914         pthread_kill_other_threads_np();
8915 #endif
8916
8917         exit( status );
8918
8919 }
8920
8921 EOF
8922 if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8923 then
8924   ol_cv_pthread_threads=yes
8925 else
8926   echo "configure: failed program was:" >&5
8927   cat conftest.$ac_ext >&5
8928   rm -fr conftest*
8929   ol_cv_pthread_threads=no
8930 fi
8931 rm -fr conftest*
8932 fi
8933
8934
8935                 # restore the LIBS
8936                 LIBS="$ol_LIBS"
8937         
8938 fi
8939
8940 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8941
8942         if test $ol_cv_pthread_threads = yes ; then
8943                 ol_link_pthreads="-threads"
8944                 ol_link_threads=posix
8945         fi
8946 fi
8947
8948
8949                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8950 if test "$ol_link_threads" = no ; then
8951         # try -lpthreads -lmach -lexc -lc_r
8952         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8953 echo "configure:8954: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8954 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8955   echo $ac_n "(cached) $ac_c" 1>&6
8956 else
8957   
8958                 # save the flags
8959                 ol_LIBS="$LIBS"
8960                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8961
8962                 if test "$cross_compiling" = yes; then
8963   cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 /* pthread test headers */
8967 #include <pthread.h>
8968 #ifndef NULL
8969 #define NULL (void*)0
8970 #endif
8971
8972 static void *task(p)
8973         void *p;
8974 {
8975         return (void *) (p == NULL);
8976 }
8977
8978 int main() {
8979
8980         /* pthread test function */
8981         pthread_t t;
8982         int status;
8983 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8984         /* This system (e.g. AIX) defaults detached; must override */
8985         pthread_attr_t attr;
8986
8987         status = pthread_attr_init(&attr);
8988         if( status ) exit( status );
8989
8990         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8991         if( status ) exit( status );
8992
8993 #define ATTR    &attr
8994 #else
8995 #if HAVE_PTHREADS_D4
8996 #define ATTR    pthread_attr_default
8997 #else
8998 #define ATTR    NULL
8999 #endif
9000 #endif
9001         /* make sure pthread_create() isn't just a stub */
9002         status = pthread_create(&t, ATTR, task, NULL);
9003         if( status ) exit( status );
9004
9005         /* make sure pthread_detach() isn't just a stub */
9006 #if HAVE_PTHREADS_D4
9007         status = pthread_detach( &t );
9008 #else
9009         status = pthread_detach( t );
9010 #endif
9011
9012 #ifdef HAVE_LINUX_THREADS
9013         pthread_kill_other_threads_np();
9014 #endif
9015
9016         exit( status );
9017
9018 ; return 0; }
9019 EOF
9020 if { (eval echo configure:9021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9021   rm -rf conftest*
9022   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9023 else
9024   echo "configure: failed program was:" >&5
9025   cat conftest.$ac_ext >&5
9026   rm -rf conftest*
9027   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9028 fi
9029 rm -f conftest*
9030 else
9031   cat > conftest.$ac_ext <<EOF
9032 #line 9033 "configure"
9033 #include "confdefs.h"
9034 /* pthread test headers */
9035 #include <pthread.h>
9036 #ifndef NULL
9037 #define NULL (void*)0
9038 #endif
9039
9040 static void *task(p)
9041         void *p;
9042 {
9043         return (void *) (p == NULL);
9044 }
9045
9046
9047 int main(argc, argv)
9048         int argc;
9049         char **argv;
9050 {
9051
9052         /* pthread test function */
9053         pthread_t t;
9054         int status;
9055 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9056         /* This system (e.g. AIX) defaults detached; must override */
9057         pthread_attr_t attr;
9058
9059         status = pthread_attr_init(&attr);
9060         if( status ) exit( status );
9061
9062         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9063         if( status ) exit( status );
9064
9065 #define ATTR    &attr
9066 #else
9067 #if HAVE_PTHREADS_D4
9068 #define ATTR    pthread_attr_default
9069 #else
9070 #define ATTR    NULL
9071 #endif
9072 #endif
9073         /* make sure pthread_create() isn't just a stub */
9074         status = pthread_create(&t, ATTR, task, NULL);
9075         if( status ) exit( status );
9076
9077         /* make sure pthread_detach() isn't just a stub */
9078 #if HAVE_PTHREADS_D4
9079         status = pthread_detach( &t );
9080 #else
9081         status = pthread_detach( t );
9082 #endif
9083
9084 #ifdef HAVE_LINUX_THREADS
9085         pthread_kill_other_threads_np();
9086 #endif
9087
9088         exit( status );
9089
9090 }
9091
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9094 then
9095   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -fr conftest*
9100   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9101 fi
9102 rm -fr conftest*
9103 fi
9104
9105
9106                 # restore the LIBS
9107                 LIBS="$ol_LIBS"
9108         
9109 fi
9110
9111 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9112
9113         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9114                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9115                 ol_link_threads=posix
9116         fi
9117 fi
9118
9119                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9120 if test "$ol_link_threads" = no ; then
9121         # try -lpthreads -lmach -lexc
9122         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9123 echo "configure:9124: checking for pthread link with -lpthreads -lmach -lexc" >&5
9124 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9125   echo $ac_n "(cached) $ac_c" 1>&6
9126 else
9127   
9128                 # save the flags
9129                 ol_LIBS="$LIBS"
9130                 LIBS="-lpthreads -lmach -lexc $LIBS"
9131
9132                 if test "$cross_compiling" = yes; then
9133   cat > conftest.$ac_ext <<EOF
9134 #line 9135 "configure"
9135 #include "confdefs.h"
9136 /* pthread test headers */
9137 #include <pthread.h>
9138 #ifndef NULL
9139 #define NULL (void*)0
9140 #endif
9141
9142 static void *task(p)
9143         void *p;
9144 {
9145         return (void *) (p == NULL);
9146 }
9147
9148 int main() {
9149
9150         /* pthread test function */
9151         pthread_t t;
9152         int status;
9153 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9154         /* This system (e.g. AIX) defaults detached; must override */
9155         pthread_attr_t attr;
9156
9157         status = pthread_attr_init(&attr);
9158         if( status ) exit( status );
9159
9160         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9161         if( status ) exit( status );
9162
9163 #define ATTR    &attr
9164 #else
9165 #if HAVE_PTHREADS_D4
9166 #define ATTR    pthread_attr_default
9167 #else
9168 #define ATTR    NULL
9169 #endif
9170 #endif
9171         /* make sure pthread_create() isn't just a stub */
9172         status = pthread_create(&t, ATTR, task, NULL);
9173         if( status ) exit( status );
9174
9175         /* make sure pthread_detach() isn't just a stub */
9176 #if HAVE_PTHREADS_D4
9177         status = pthread_detach( &t );
9178 #else
9179         status = pthread_detach( t );
9180 #endif
9181
9182 #ifdef HAVE_LINUX_THREADS
9183         pthread_kill_other_threads_np();
9184 #endif
9185
9186         exit( status );
9187
9188 ; return 0; }
9189 EOF
9190 if { (eval echo configure:9191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9191   rm -rf conftest*
9192   ol_cv_pthread_lpthreads_lmach_lexc=yes
9193 else
9194   echo "configure: failed program was:" >&5
9195   cat conftest.$ac_ext >&5
9196   rm -rf conftest*
9197   ol_cv_pthread_lpthreads_lmach_lexc=no
9198 fi
9199 rm -f conftest*
9200 else
9201   cat > conftest.$ac_ext <<EOF
9202 #line 9203 "configure"
9203 #include "confdefs.h"
9204 /* pthread test headers */
9205 #include <pthread.h>
9206 #ifndef NULL
9207 #define NULL (void*)0
9208 #endif
9209
9210 static void *task(p)
9211         void *p;
9212 {
9213         return (void *) (p == NULL);
9214 }
9215
9216
9217 int main(argc, argv)
9218         int argc;
9219         char **argv;
9220 {
9221
9222         /* pthread test function */
9223         pthread_t t;
9224         int status;
9225 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9226         /* This system (e.g. AIX) defaults detached; must override */
9227         pthread_attr_t attr;
9228
9229         status = pthread_attr_init(&attr);
9230         if( status ) exit( status );
9231
9232         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9233         if( status ) exit( status );
9234
9235 #define ATTR    &attr
9236 #else
9237 #if HAVE_PTHREADS_D4
9238 #define ATTR    pthread_attr_default
9239 #else
9240 #define ATTR    NULL
9241 #endif
9242 #endif
9243         /* make sure pthread_create() isn't just a stub */
9244         status = pthread_create(&t, ATTR, task, NULL);
9245         if( status ) exit( status );
9246
9247         /* make sure pthread_detach() isn't just a stub */
9248 #if HAVE_PTHREADS_D4
9249         status = pthread_detach( &t );
9250 #else
9251         status = pthread_detach( t );
9252 #endif
9253
9254 #ifdef HAVE_LINUX_THREADS
9255         pthread_kill_other_threads_np();
9256 #endif
9257
9258         exit( status );
9259
9260 }
9261
9262 EOF
9263 if { (eval echo configure:9264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9264 then
9265   ol_cv_pthread_lpthreads_lmach_lexc=yes
9266 else
9267   echo "configure: failed program was:" >&5
9268   cat conftest.$ac_ext >&5
9269   rm -fr conftest*
9270   ol_cv_pthread_lpthreads_lmach_lexc=no
9271 fi
9272 rm -fr conftest*
9273 fi
9274
9275
9276                 # restore the LIBS
9277                 LIBS="$ol_LIBS"
9278         
9279 fi
9280
9281 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9282
9283         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9284                 ol_link_pthreads="-lpthreads -lmach -lexc"
9285                 ol_link_threads=posix
9286         fi
9287 fi
9288
9289                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9290 if test "$ol_link_threads" = no ; then
9291         # try -lpthreads -lexc
9292         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9293 echo "configure:9294: checking for pthread link with -lpthreads -lexc" >&5
9294 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9295   echo $ac_n "(cached) $ac_c" 1>&6
9296 else
9297   
9298                 # save the flags
9299                 ol_LIBS="$LIBS"
9300                 LIBS="-lpthreads -lexc $LIBS"
9301
9302                 if test "$cross_compiling" = yes; then
9303   cat > conftest.$ac_ext <<EOF
9304 #line 9305 "configure"
9305 #include "confdefs.h"
9306 /* pthread test headers */
9307 #include <pthread.h>
9308 #ifndef NULL
9309 #define NULL (void*)0
9310 #endif
9311
9312 static void *task(p)
9313         void *p;
9314 {
9315         return (void *) (p == NULL);
9316 }
9317
9318 int main() {
9319
9320         /* pthread test function */
9321         pthread_t t;
9322         int status;
9323 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9324         /* This system (e.g. AIX) defaults detached; must override */
9325         pthread_attr_t attr;
9326
9327         status = pthread_attr_init(&attr);
9328         if( status ) exit( status );
9329
9330         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9331         if( status ) exit( status );
9332
9333 #define ATTR    &attr
9334 #else
9335 #if HAVE_PTHREADS_D4
9336 #define ATTR    pthread_attr_default
9337 #else
9338 #define ATTR    NULL
9339 #endif
9340 #endif
9341         /* make sure pthread_create() isn't just a stub */
9342         status = pthread_create(&t, ATTR, task, NULL);
9343         if( status ) exit( status );
9344
9345         /* make sure pthread_detach() isn't just a stub */
9346 #if HAVE_PTHREADS_D4
9347         status = pthread_detach( &t );
9348 #else
9349         status = pthread_detach( t );
9350 #endif
9351
9352 #ifdef HAVE_LINUX_THREADS
9353         pthread_kill_other_threads_np();
9354 #endif
9355
9356         exit( status );
9357
9358 ; return 0; }
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9361   rm -rf conftest*
9362   ol_cv_pthread_lpthreads_lexc=yes
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -rf conftest*
9367   ol_cv_pthread_lpthreads_lexc=no
9368 fi
9369 rm -f conftest*
9370 else
9371   cat > conftest.$ac_ext <<EOF
9372 #line 9373 "configure"
9373 #include "confdefs.h"
9374 /* pthread test headers */
9375 #include <pthread.h>
9376 #ifndef NULL
9377 #define NULL (void*)0
9378 #endif
9379
9380 static void *task(p)
9381         void *p;
9382 {
9383         return (void *) (p == NULL);
9384 }
9385
9386
9387 int main(argc, argv)
9388         int argc;
9389         char **argv;
9390 {
9391
9392         /* pthread test function */
9393         pthread_t t;
9394         int status;
9395 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9396         /* This system (e.g. AIX) defaults detached; must override */
9397         pthread_attr_t attr;
9398
9399         status = pthread_attr_init(&attr);
9400         if( status ) exit( status );
9401
9402         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9403         if( status ) exit( status );
9404
9405 #define ATTR    &attr
9406 #else
9407 #if HAVE_PTHREADS_D4
9408 #define ATTR    pthread_attr_default
9409 #else
9410 #define ATTR    NULL
9411 #endif
9412 #endif
9413         /* make sure pthread_create() isn't just a stub */
9414         status = pthread_create(&t, ATTR, task, NULL);
9415         if( status ) exit( status );
9416
9417         /* make sure pthread_detach() isn't just a stub */
9418 #if HAVE_PTHREADS_D4
9419         status = pthread_detach( &t );
9420 #else
9421         status = pthread_detach( t );
9422 #endif
9423
9424 #ifdef HAVE_LINUX_THREADS
9425         pthread_kill_other_threads_np();
9426 #endif
9427
9428         exit( status );
9429
9430 }
9431
9432 EOF
9433 if { (eval echo configure:9434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9434 then
9435   ol_cv_pthread_lpthreads_lexc=yes
9436 else
9437   echo "configure: failed program was:" >&5
9438   cat conftest.$ac_ext >&5
9439   rm -fr conftest*
9440   ol_cv_pthread_lpthreads_lexc=no
9441 fi
9442 rm -fr conftest*
9443 fi
9444
9445
9446                 # restore the LIBS
9447                 LIBS="$ol_LIBS"
9448         
9449 fi
9450
9451 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9452
9453         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9454                 ol_link_pthreads="-lpthreads -lexc"
9455                 ol_link_threads=posix
9456         fi
9457 fi
9458
9459
9460                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9461 if test "$ol_link_threads" = no ; then
9462         # try -lpthreads
9463         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9464 echo "configure:9465: checking for pthread link with -lpthreads" >&5
9465 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9466   echo $ac_n "(cached) $ac_c" 1>&6
9467 else
9468   
9469                 # save the flags
9470                 ol_LIBS="$LIBS"
9471                 LIBS="-lpthreads $LIBS"
9472
9473                 if test "$cross_compiling" = yes; then
9474   cat > conftest.$ac_ext <<EOF
9475 #line 9476 "configure"
9476 #include "confdefs.h"
9477 /* pthread test headers */
9478 #include <pthread.h>
9479 #ifndef NULL
9480 #define NULL (void*)0
9481 #endif
9482
9483 static void *task(p)
9484         void *p;
9485 {
9486         return (void *) (p == NULL);
9487 }
9488
9489 int main() {
9490
9491         /* pthread test function */
9492         pthread_t t;
9493         int status;
9494 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9495         /* This system (e.g. AIX) defaults detached; must override */
9496         pthread_attr_t attr;
9497
9498         status = pthread_attr_init(&attr);
9499         if( status ) exit( status );
9500
9501         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9502         if( status ) exit( status );
9503
9504 #define ATTR    &attr
9505 #else
9506 #if HAVE_PTHREADS_D4
9507 #define ATTR    pthread_attr_default
9508 #else
9509 #define ATTR    NULL
9510 #endif
9511 #endif
9512         /* make sure pthread_create() isn't just a stub */
9513         status = pthread_create(&t, ATTR, task, NULL);
9514         if( status ) exit( status );
9515
9516         /* make sure pthread_detach() isn't just a stub */
9517 #if HAVE_PTHREADS_D4
9518         status = pthread_detach( &t );
9519 #else
9520         status = pthread_detach( t );
9521 #endif
9522
9523 #ifdef HAVE_LINUX_THREADS
9524         pthread_kill_other_threads_np();
9525 #endif
9526
9527         exit( status );
9528
9529 ; return 0; }
9530 EOF
9531 if { (eval echo configure:9532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9532   rm -rf conftest*
9533   ol_cv_pthread_lib_lpthreads=yes
9534 else
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   ol_cv_pthread_lib_lpthreads=no
9539 fi
9540 rm -f conftest*
9541 else
9542   cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 /* pthread test headers */
9546 #include <pthread.h>
9547 #ifndef NULL
9548 #define NULL (void*)0
9549 #endif
9550
9551 static void *task(p)
9552         void *p;
9553 {
9554         return (void *) (p == NULL);
9555 }
9556
9557
9558 int main(argc, argv)
9559         int argc;
9560         char **argv;
9561 {
9562
9563         /* pthread test function */
9564         pthread_t t;
9565         int status;
9566 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9567         /* This system (e.g. AIX) defaults detached; must override */
9568         pthread_attr_t attr;
9569
9570         status = pthread_attr_init(&attr);
9571         if( status ) exit( status );
9572
9573         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9574         if( status ) exit( status );
9575
9576 #define ATTR    &attr
9577 #else
9578 #if HAVE_PTHREADS_D4
9579 #define ATTR    pthread_attr_default
9580 #else
9581 #define ATTR    NULL
9582 #endif
9583 #endif
9584         /* make sure pthread_create() isn't just a stub */
9585         status = pthread_create(&t, ATTR, task, NULL);
9586         if( status ) exit( status );
9587
9588         /* make sure pthread_detach() isn't just a stub */
9589 #if HAVE_PTHREADS_D4
9590         status = pthread_detach( &t );
9591 #else
9592         status = pthread_detach( t );
9593 #endif
9594
9595 #ifdef HAVE_LINUX_THREADS
9596         pthread_kill_other_threads_np();
9597 #endif
9598
9599         exit( status );
9600
9601 }
9602
9603 EOF
9604 if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9605 then
9606   ol_cv_pthread_lib_lpthreads=yes
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -fr conftest*
9611   ol_cv_pthread_lib_lpthreads=no
9612 fi
9613 rm -fr conftest*
9614 fi
9615
9616
9617                 # restore the LIBS
9618                 LIBS="$ol_LIBS"
9619         
9620 fi
9621
9622 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9623
9624         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9625                 ol_link_pthreads="-lpthreads"
9626                 ol_link_threads=posix
9627         fi
9628 fi
9629
9630
9631                 if test $ol_link_threads != no ; then
9632                         cat >> confdefs.h <<\EOF
9633 #define HAVE_PTHREADS 1
9634 EOF
9635
9636
9637                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9638
9639                                                 save_CPPFLAGS="$CPPFLAGS"
9640                         save_LIBS="$LIBS"
9641                         LIBS="$LTHREAD_LIBS $LIBS"
9642
9643                                                                                                 for ac_func in sched_yield pthread_yield
9644 do
9645 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9646 echo "configure:9647: checking for $ac_func" >&5
9647 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9648   echo $ac_n "(cached) $ac_c" 1>&6
9649 else
9650   cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 /* System header to define __stub macros and hopefully few prototypes,
9654     which can conflict with char $ac_func(); below.  */
9655 #include <assert.h>
9656 /* Override any gcc2 internal prototype to avoid an error.  */
9657 /* We use char because int might match the return type of a gcc2
9658     builtin and then its argument prototype would still apply.  */
9659 char $ac_func();
9660 char (*f)();
9661
9662 int main() {
9663
9664 /* The GNU C library defines this for functions which it implements
9665     to always fail with ENOSYS.  Some functions are actually named
9666     something starting with __ and the normal name is an alias.  */
9667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9668 choke me
9669 #else
9670 f = $ac_func;
9671 #endif
9672
9673 ; return 0; }
9674 EOF
9675 if { (eval echo configure:9676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9676   rm -rf conftest*
9677   eval "ac_cv_func_$ac_func=yes"
9678 else
9679   echo "configure: failed program was:" >&5
9680   cat conftest.$ac_ext >&5
9681   rm -rf conftest*
9682   eval "ac_cv_func_$ac_func=no"
9683 fi
9684 rm -f conftest*
9685 fi
9686
9687 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9688   echo "$ac_t""yes" 1>&6
9689     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9690   cat >> confdefs.h <<EOF
9691 #define $ac_tr_func 1
9692 EOF
9693  
9694 else
9695   echo "$ac_t""no" 1>&6
9696 fi
9697 done
9698
9699
9700                         if test $ac_cv_func_sched_yield = no -a \
9701                                 $ac_cv_func_pthread_yield = no ; then
9702                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9703 echo "configure:9704: checking for sched_yield in -lrt" >&5
9704 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9705 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9706   echo $ac_n "(cached) $ac_c" 1>&6
9707 else
9708   ac_save_LIBS="$LIBS"
9709 LIBS="-lrt  $LIBS"
9710 cat > conftest.$ac_ext <<EOF
9711 #line 9712 "configure"
9712 #include "confdefs.h"
9713 /* Override any gcc2 internal prototype to avoid an error.  */
9714 /* We use char because int might match the return type of a gcc2
9715     builtin and then its argument prototype would still apply.  */
9716 char sched_yield();
9717
9718 int main() {
9719 sched_yield()
9720 ; return 0; }
9721 EOF
9722 if { (eval echo configure:9723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9723   rm -rf conftest*
9724   eval "ac_cv_lib_$ac_lib_var=yes"
9725 else
9726   echo "configure: failed program was:" >&5
9727   cat conftest.$ac_ext >&5
9728   rm -rf conftest*
9729   eval "ac_cv_lib_$ac_lib_var=no"
9730 fi
9731 rm -f conftest*
9732 LIBS="$ac_save_LIBS"
9733
9734 fi
9735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9736   echo "$ac_t""yes" 1>&6
9737   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9738                                         cat >> confdefs.h <<\EOF
9739 #define HAVE_SCHED_YIELD 1
9740 EOF
9741
9742                                         ac_cv_func_sched_yield=yes
9743 else
9744   echo "$ac_t""no" 1>&6
9745 ac_cv_func_sched_yield=no
9746 fi
9747
9748                         fi
9749                         if test $ac_cv_func_sched_yield = no -a \
9750                                 $ac_cv_func_pthread_yield = no ; then
9751                                                                                                 for ac_func in thr_yield
9752 do
9753 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9754 echo "configure:9755: checking for $ac_func" >&5
9755 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9756   echo $ac_n "(cached) $ac_c" 1>&6
9757 else
9758   cat > conftest.$ac_ext <<EOF
9759 #line 9760 "configure"
9760 #include "confdefs.h"
9761 /* System header to define __stub macros and hopefully few prototypes,
9762     which can conflict with char $ac_func(); below.  */
9763 #include <assert.h>
9764 /* Override any gcc2 internal prototype to avoid an error.  */
9765 /* We use char because int might match the return type of a gcc2
9766     builtin and then its argument prototype would still apply.  */
9767 char $ac_func();
9768 char (*f)();
9769
9770 int main() {
9771
9772 /* The GNU C library defines this for functions which it implements
9773     to always fail with ENOSYS.  Some functions are actually named
9774     something starting with __ and the normal name is an alias.  */
9775 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9776 choke me
9777 #else
9778 f = $ac_func;
9779 #endif
9780
9781 ; return 0; }
9782 EOF
9783 if { (eval echo configure:9784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9784   rm -rf conftest*
9785   eval "ac_cv_func_$ac_func=yes"
9786 else
9787   echo "configure: failed program was:" >&5
9788   cat conftest.$ac_ext >&5
9789   rm -rf conftest*
9790   eval "ac_cv_func_$ac_func=no"
9791 fi
9792 rm -f conftest*
9793 fi
9794
9795 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9796   echo "$ac_t""yes" 1>&6
9797     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9798   cat >> confdefs.h <<EOF
9799 #define $ac_tr_func 1
9800 EOF
9801  
9802 else
9803   echo "$ac_t""no" 1>&6
9804 fi
9805 done
9806
9807                         fi
9808                         if test $ac_cv_func_sched_yield = no -a \
9809                                 $ac_cv_func_pthread_yield = no -a \
9810                                 "$ac_cv_func_thr_yield" = no ; then
9811                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9812                         fi
9813
9814                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9815 do
9816 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9817 echo "configure:9818: checking for $ac_func" >&5
9818 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9819   echo $ac_n "(cached) $ac_c" 1>&6
9820 else
9821   cat > conftest.$ac_ext <<EOF
9822 #line 9823 "configure"
9823 #include "confdefs.h"
9824 /* System header to define __stub macros and hopefully few prototypes,
9825     which can conflict with char $ac_func(); below.  */
9826 #include <assert.h>
9827 /* Override any gcc2 internal prototype to avoid an error.  */
9828 /* We use char because int might match the return type of a gcc2
9829     builtin and then its argument prototype would still apply.  */
9830 char $ac_func();
9831 char (*f)();
9832
9833 int main() {
9834
9835 /* The GNU C library defines this for functions which it implements
9836     to always fail with ENOSYS.  Some functions are actually named
9837     something starting with __ and the normal name is an alias.  */
9838 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9839 choke me
9840 #else
9841 f = $ac_func;
9842 #endif
9843
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_func_$ac_func=yes"
9849 else
9850   echo "configure: failed program was:" >&5
9851   cat conftest.$ac_ext >&5
9852   rm -rf conftest*
9853   eval "ac_cv_func_$ac_func=no"
9854 fi
9855 rm -f conftest*
9856 fi
9857
9858 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9859   echo "$ac_t""yes" 1>&6
9860     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9861   cat >> confdefs.h <<EOF
9862 #define $ac_tr_func 1
9863 EOF
9864  
9865 else
9866   echo "$ac_t""no" 1>&6
9867 fi
9868 done
9869
9870
9871                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9872 echo "configure:9873: checking for pthread_detach with <pthread.h>" >&5
9873 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   
9877                                                                 cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880
9881 #include <pthread.h>
9882 #ifndef NULL
9883 #define NULL (void*)0
9884 #endif
9885
9886 int main() {
9887 pthread_detach(NULL);
9888 ; return 0; }
9889 EOF
9890 if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9891   rm -rf conftest*
9892   ol_cv_func_pthread_detach=yes
9893 else
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -rf conftest*
9897   ol_cv_func_pthread_detach=no
9898 fi
9899 rm -f conftest*
9900                         
9901 fi
9902
9903 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9904
9905                         if test $ol_cv_func_pthread_detach = no ; then
9906                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9907                         fi
9908
9909                         cat >> confdefs.h <<\EOF
9910 #define HAVE_PTHREAD_DETACH 1
9911 EOF
9912
9913
9914                                                 for ac_func in \
9915                                 pthread_setconcurrency \
9916                                 pthread_getconcurrency \
9917                                 thr_setconcurrency \
9918                                 thr_getconcurrency \
9919                         
9920 do
9921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9922 echo "configure:9923: checking for $ac_func" >&5
9923 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9924   echo $ac_n "(cached) $ac_c" 1>&6
9925 else
9926   cat > conftest.$ac_ext <<EOF
9927 #line 9928 "configure"
9928 #include "confdefs.h"
9929 /* System header to define __stub macros and hopefully few prototypes,
9930     which can conflict with char $ac_func(); below.  */
9931 #include <assert.h>
9932 /* Override any gcc2 internal prototype to avoid an error.  */
9933 /* We use char because int might match the return type of a gcc2
9934     builtin and then its argument prototype would still apply.  */
9935 char $ac_func();
9936 char (*f)();
9937
9938 int main() {
9939
9940 /* The GNU C library defines this for functions which it implements
9941     to always fail with ENOSYS.  Some functions are actually named
9942     something starting with __ and the normal name is an alias.  */
9943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9944 choke me
9945 #else
9946 f = $ac_func;
9947 #endif
9948
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9952   rm -rf conftest*
9953   eval "ac_cv_func_$ac_func=yes"
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   eval "ac_cv_func_$ac_func=no"
9959 fi
9960 rm -f conftest*
9961 fi
9962
9963 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9964   echo "$ac_t""yes" 1>&6
9965     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9966   cat >> confdefs.h <<EOF
9967 #define $ac_tr_func 1
9968 EOF
9969  
9970 else
9971   echo "$ac_t""no" 1>&6
9972 fi
9973 done
9974
9975
9976                         
9977         for ac_func in pthread_kill_other_threads_np
9978 do
9979 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9980 echo "configure:9981: checking for $ac_func" >&5
9981 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9982   echo $ac_n "(cached) $ac_c" 1>&6
9983 else
9984   cat > conftest.$ac_ext <<EOF
9985 #line 9986 "configure"
9986 #include "confdefs.h"
9987 /* System header to define __stub macros and hopefully few prototypes,
9988     which can conflict with char $ac_func(); below.  */
9989 #include <assert.h>
9990 /* Override any gcc2 internal prototype to avoid an error.  */
9991 /* We use char because int might match the return type of a gcc2
9992     builtin and then its argument prototype would still apply.  */
9993 char $ac_func();
9994 char (*f)();
9995
9996 int main() {
9997
9998 /* The GNU C library defines this for functions which it implements
9999     to always fail with ENOSYS.  Some functions are actually named
10000     something starting with __ and the normal name is an alias.  */
10001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10002 choke me
10003 #else
10004 f = $ac_func;
10005 #endif
10006
10007 ; return 0; }
10008 EOF
10009 if { (eval echo configure:10010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10010   rm -rf conftest*
10011   eval "ac_cv_func_$ac_func=yes"
10012 else
10013   echo "configure: failed program was:" >&5
10014   cat conftest.$ac_ext >&5
10015   rm -rf conftest*
10016   eval "ac_cv_func_$ac_func=no"
10017 fi
10018 rm -f conftest*
10019 fi
10020
10021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10022   echo "$ac_t""yes" 1>&6
10023     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10024   cat >> confdefs.h <<EOF
10025 #define $ac_tr_func 1
10026 EOF
10027  
10028 else
10029   echo "$ac_t""no" 1>&6
10030 fi
10031 done
10032
10033         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10034 echo "configure:10035: checking for LinuxThreads implementation" >&5
10035 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10036   echo $ac_n "(cached) $ac_c" 1>&6
10037 else
10038   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10039 fi
10040
10041 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10042
10043                         
10044         
10045         
10046         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10047 echo "configure:10048: checking for LinuxThreads consistency" >&5
10048 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10049   echo $ac_n "(cached) $ac_c" 1>&6
10050 else
10051   
10052                 if test $ol_cv_header_linux_threads = yes -a \
10053                         $ol_cv_sys_linux_threads = yes; then
10054                         ol_cv_linux_threads=yes
10055                 elif test $ol_cv_header_linux_threads = no -a \
10056                         $ol_cv_sys_linux_threads = no; then
10057                         ol_cv_linux_threads=no
10058                 else
10059                         ol_cv_linux_threads=error
10060                 fi
10061         
10062 fi
10063
10064 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10065
10066
10067                         if test $ol_cv_linux_threads = error; then
10068                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10069                         fi
10070
10071                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10072 echo "configure:10073: checking if pthread_create() works" >&5
10073 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10074   echo $ac_n "(cached) $ac_c" 1>&6
10075 else
10076   
10077                         if test "$cross_compiling" = yes; then
10078                                 ol_cv_pthread_create_works=yes
10079 else
10080   cat > conftest.$ac_ext <<EOF
10081 #line 10082 "configure"
10082 #include "confdefs.h"
10083 /* pthread test headers */
10084 #include <pthread.h>
10085 #ifndef NULL
10086 #define NULL (void*)0
10087 #endif
10088
10089 static void *task(p)
10090         void *p;
10091 {
10092         return (void *) (p == NULL);
10093 }
10094
10095
10096 int main(argc, argv)
10097         int argc;
10098         char **argv;
10099 {
10100
10101         /* pthread test function */
10102         pthread_t t;
10103         int status;
10104 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10105         /* This system (e.g. AIX) defaults detached; must override */
10106         pthread_attr_t attr;
10107
10108         status = pthread_attr_init(&attr);
10109         if( status ) exit( status );
10110
10111         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10112         if( status ) exit( status );
10113
10114 #define ATTR    &attr
10115 #else
10116 #if HAVE_PTHREADS_D4
10117 #define ATTR    pthread_attr_default
10118 #else
10119 #define ATTR    NULL
10120 #endif
10121 #endif
10122         /* make sure pthread_create() isn't just a stub */
10123         status = pthread_create(&t, ATTR, task, NULL);
10124         if( status ) exit( status );
10125
10126         /* make sure pthread_detach() isn't just a stub */
10127 #if HAVE_PTHREADS_D4
10128         status = pthread_detach( &t );
10129 #else
10130         status = pthread_detach( t );
10131 #endif
10132
10133 #ifdef HAVE_LINUX_THREADS
10134         pthread_kill_other_threads_np();
10135 #endif
10136
10137         exit( status );
10138
10139 }
10140
10141 EOF
10142 if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10143 then
10144   ol_cv_pthread_create_works=yes
10145 else
10146   echo "configure: failed program was:" >&5
10147   cat conftest.$ac_ext >&5
10148   rm -fr conftest*
10149   ol_cv_pthread_create_works=no
10150 fi
10151 rm -fr conftest*
10152 fi
10153
10154 fi
10155
10156 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10157
10158                         if test $ol_cv_pthread_create_works = no ; then
10159                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10160                         fi
10161
10162                                                 if test $ol_with_yielding_select = auto ; then
10163                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10164 echo "configure:10165: checking if select yields when using pthreads" >&5
10165 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10166   echo $ac_n "(cached) $ac_c" 1>&6
10167 else
10168   
10169                                 if test "$cross_compiling" = yes; then
10170   ol_cv_pthread_select_yields=cross
10171 else
10172   cat > conftest.$ac_ext <<EOF
10173 #line 10174 "configure"
10174 #include "confdefs.h"
10175
10176 #include <sys/types.h>
10177 #include <sys/time.h>
10178 #include <unistd.h>
10179 #include <pthread.h>
10180 #ifndef NULL
10181 #define NULL (void*) 0
10182 #endif
10183
10184 static int fildes[2];
10185
10186 static void *task(p)
10187         void *p;
10188 {
10189         int i;
10190         struct timeval tv;
10191
10192         fd_set rfds;
10193
10194         tv.tv_sec=10;
10195         tv.tv_usec=0;
10196
10197         FD_ZERO(&rfds);
10198         FD_SET(fildes[0], &rfds);
10199
10200         /* we're not interested in any fds */
10201         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10202
10203         if(i < 0) {
10204                 perror("select");
10205                 exit(10);
10206         }
10207
10208         exit(0); /* if we exit here, the select blocked the whole process */
10209 }
10210
10211 int main(argc, argv)
10212         int argc;
10213         char **argv;
10214 {
10215         pthread_t t;
10216
10217         /* create a pipe to select */
10218         if(pipe(&fildes[0])) {
10219                 perror("select");
10220                 exit(1);
10221         }
10222
10223 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10224         (void) pthread_setconcurrency(2);
10225 #else
10226 #ifdef HAVE_THR_SETCONCURRENCY
10227         /* Set Solaris LWP concurrency to 2 */
10228         thr_setconcurrency(2);
10229 #endif
10230 #endif
10231
10232 #if HAVE_PTHREADS_D4
10233         pthread_create(&t, pthread_attr_default, task, NULL);
10234 #else
10235         pthread_create(&t, NULL, task, NULL);
10236 #endif
10237
10238 #if HAVE_SCHED_YIELD
10239         sched_yield();  /* make sure task runs first */
10240 #else
10241 #ifdef HAVE_PTHREAD_YIELD
10242         pthread_yield();        /* make sure task runs first */
10243 #endif
10244 #endif
10245
10246         exit(2);
10247 }
10248 EOF
10249 if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10250 then
10251   ol_cv_pthread_select_yields=no
10252 else
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -fr conftest*
10256   ol_cv_pthread_select_yields=yes
10257 fi
10258 rm -fr conftest*
10259 fi
10260
10261 fi
10262
10263 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10264
10265                                 if test $ol_cv_pthread_select_yields = cross ; then
10266                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10267                                 fi
10268
10269                                 if test $ol_cv_pthread_select_yields = yes ; then
10270                                         ol_with_yielding_select=yes
10271                                 fi
10272                         fi
10273
10274                                                 CPPFLAGS="$save_CPPFLAGS"
10275                         LIBS="$save_LIBS"
10276                 else
10277                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10278                 fi
10279         fi
10280
10281         if test $ol_with_threads = posix ; then
10282                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10283         fi
10284 fi
10285
10286 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10287         -o $ol_with_threads = mach ; then
10288
10289                 for ac_hdr in mach/cthreads.h
10290 do
10291 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10292 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10293 echo "configure:10294: checking for $ac_hdr" >&5
10294 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10295   echo $ac_n "(cached) $ac_c" 1>&6
10296 else
10297   cat > conftest.$ac_ext <<EOF
10298 #line 10299 "configure"
10299 #include "confdefs.h"
10300 #include <$ac_hdr>
10301 EOF
10302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10303 { (eval echo configure:10304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10305 if test -z "$ac_err"; then
10306   rm -rf conftest*
10307   eval "ac_cv_header_$ac_safe=yes"
10308 else
10309   echo "$ac_err" >&5
10310   echo "configure: failed program was:" >&5
10311   cat conftest.$ac_ext >&5
10312   rm -rf conftest*
10313   eval "ac_cv_header_$ac_safe=no"
10314 fi
10315 rm -f conftest*
10316 fi
10317 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10318   echo "$ac_t""yes" 1>&6
10319     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10320   cat >> confdefs.h <<EOF
10321 #define $ac_tr_hdr 1
10322 EOF
10323  
10324 else
10325   echo "$ac_t""no" 1>&6
10326 fi
10327 done
10328
10329         if test $ac_cv_header_mach_cthreads_h = yes ; then
10330                 ol_with_threads=found
10331
10332                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10333 echo "configure:10334: checking for cthread_fork" >&5
10334 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   cat > conftest.$ac_ext <<EOF
10338 #line 10339 "configure"
10339 #include "confdefs.h"
10340 /* System header to define __stub macros and hopefully few prototypes,
10341     which can conflict with char cthread_fork(); below.  */
10342 #include <assert.h>
10343 /* Override any gcc2 internal prototype to avoid an error.  */
10344 /* We use char because int might match the return type of a gcc2
10345     builtin and then its argument prototype would still apply.  */
10346 char cthread_fork();
10347 char (*f)();
10348
10349 int main() {
10350
10351 /* The GNU C library defines this for functions which it implements
10352     to always fail with ENOSYS.  Some functions are actually named
10353     something starting with __ and the normal name is an alias.  */
10354 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10355 choke me
10356 #else
10357 f = cthread_fork;
10358 #endif
10359
10360 ; return 0; }
10361 EOF
10362 if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10363   rm -rf conftest*
10364   eval "ac_cv_func_cthread_fork=yes"
10365 else
10366   echo "configure: failed program was:" >&5
10367   cat conftest.$ac_ext >&5
10368   rm -rf conftest*
10369   eval "ac_cv_func_cthread_fork=no"
10370 fi
10371 rm -f conftest*
10372 fi
10373
10374 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10375   echo "$ac_t""yes" 1>&6
10376   ol_link_threads=yes
10377 else
10378   echo "$ac_t""no" 1>&6
10379 fi
10380
10381
10382                 if test $ol_link_threads = no ; then
10383                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10384 echo "configure:10385: checking for cthread_fork with -all_load" >&5
10385 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   
10389                                                                 save_LIBS="$LIBS"
10390                                 LIBS="-all_load $LIBS"
10391                                 cat > conftest.$ac_ext <<EOF
10392 #line 10393 "configure"
10393 #include "confdefs.h"
10394 #include <mach/cthreads.h>
10395 int main() {
10396
10397                                         cthread_fork((void *)0, (void *)0);
10398                                         
10399 ; return 0; }
10400 EOF
10401 if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10402   rm -rf conftest*
10403   ol_cv_cthread_all_load=yes
10404 else
10405   echo "configure: failed program was:" >&5
10406   cat conftest.$ac_ext >&5
10407   rm -rf conftest*
10408   ol_cv_cthread_all_load=no
10409 fi
10410 rm -f conftest*
10411                                                                 LIBS="$save_LIBS"
10412                         
10413 fi
10414
10415 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10416
10417                         if test $ol_cv_cthread_all_load = yes ; then
10418                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10419                                 ol_link_threads=mach
10420                         fi
10421                 fi
10422
10423                 if test $ol_link_threads != no ; then
10424                         : check for cthread specific functionality here
10425                         cat >> confdefs.h <<\EOF
10426 #define HAVE_MACH_CTHREADS 1
10427 EOF
10428
10429                 else
10430                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10431                 fi
10432         fi
10433
10434         if test $ol_with_threads = mach ; then
10435                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10436         fi
10437 fi
10438
10439 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10440         -o $ol_with_threads = pth ; then
10441
10442         for ac_hdr in pth.h
10443 do
10444 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10445 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10446 echo "configure:10447: checking for $ac_hdr" >&5
10447 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10448   echo $ac_n "(cached) $ac_c" 1>&6
10449 else
10450   cat > conftest.$ac_ext <<EOF
10451 #line 10452 "configure"
10452 #include "confdefs.h"
10453 #include <$ac_hdr>
10454 EOF
10455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10456 { (eval echo configure:10457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10458 if test -z "$ac_err"; then
10459   rm -rf conftest*
10460   eval "ac_cv_header_$ac_safe=yes"
10461 else
10462   echo "$ac_err" >&5
10463   echo "configure: failed program was:" >&5
10464   cat conftest.$ac_ext >&5
10465   rm -rf conftest*
10466   eval "ac_cv_header_$ac_safe=no"
10467 fi
10468 rm -f conftest*
10469 fi
10470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10471   echo "$ac_t""yes" 1>&6
10472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10473   cat >> confdefs.h <<EOF
10474 #define $ac_tr_hdr 1
10475 EOF
10476  
10477 else
10478   echo "$ac_t""no" 1>&6
10479 fi
10480 done
10481
10482
10483         if test $ac_cv_header_pth_h = yes ; then
10484                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10485 echo "configure:10486: checking for pth_version in -lpth" >&5
10486 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10487 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10488   echo $ac_n "(cached) $ac_c" 1>&6
10489 else
10490   ac_save_LIBS="$LIBS"
10491 LIBS="-lpth  $LIBS"
10492 cat > conftest.$ac_ext <<EOF
10493 #line 10494 "configure"
10494 #include "confdefs.h"
10495 /* Override any gcc2 internal prototype to avoid an error.  */
10496 /* We use char because int might match the return type of a gcc2
10497     builtin and then its argument prototype would still apply.  */
10498 char pth_version();
10499
10500 int main() {
10501 pth_version()
10502 ; return 0; }
10503 EOF
10504 if { (eval echo configure:10505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10505   rm -rf conftest*
10506   eval "ac_cv_lib_$ac_lib_var=yes"
10507 else
10508   echo "configure: failed program was:" >&5
10509   cat conftest.$ac_ext >&5
10510   rm -rf conftest*
10511   eval "ac_cv_lib_$ac_lib_var=no"
10512 fi
10513 rm -f conftest*
10514 LIBS="$ac_save_LIBS"
10515
10516 fi
10517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10518   echo "$ac_t""yes" 1>&6
10519   have_pth=yes
10520 else
10521   echo "$ac_t""no" 1>&6
10522 have_pth=no
10523 fi
10524
10525
10526                 if test $have_pth = yes ; then
10527                         cat >> confdefs.h <<\EOF
10528 #define HAVE_GNU_PTH 1
10529 EOF
10530
10531                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10532                         ol_link_threads=pth
10533
10534                         if test $ol_with_yielding_select = auto ; then
10535                                 ol_with_yielding_select=yes
10536                         fi
10537                 fi
10538         fi
10539 fi
10540
10541 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10542         -o $ol_with_threads = lwp ; then
10543
10544                 for ac_hdr in thread.h synch.h
10545 do
10546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10548 echo "configure:10549: checking for $ac_hdr" >&5
10549 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10550   echo $ac_n "(cached) $ac_c" 1>&6
10551 else
10552   cat > conftest.$ac_ext <<EOF
10553 #line 10554 "configure"
10554 #include "confdefs.h"
10555 #include <$ac_hdr>
10556 EOF
10557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10558 { (eval echo configure:10559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10560 if test -z "$ac_err"; then
10561   rm -rf conftest*
10562   eval "ac_cv_header_$ac_safe=yes"
10563 else
10564   echo "$ac_err" >&5
10565   echo "configure: failed program was:" >&5
10566   cat conftest.$ac_ext >&5
10567   rm -rf conftest*
10568   eval "ac_cv_header_$ac_safe=no"
10569 fi
10570 rm -f conftest*
10571 fi
10572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10573   echo "$ac_t""yes" 1>&6
10574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10575   cat >> confdefs.h <<EOF
10576 #define $ac_tr_hdr 1
10577 EOF
10578  
10579 else
10580   echo "$ac_t""no" 1>&6
10581 fi
10582 done
10583
10584         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10585                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10586 echo "configure:10587: checking for thr_create in -lthread" >&5
10587 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   ac_save_LIBS="$LIBS"
10592 LIBS="-lthread  $LIBS"
10593 cat > conftest.$ac_ext <<EOF
10594 #line 10595 "configure"
10595 #include "confdefs.h"
10596 /* Override any gcc2 internal prototype to avoid an error.  */
10597 /* We use char because int might match the return type of a gcc2
10598     builtin and then its argument prototype would still apply.  */
10599 char thr_create();
10600
10601 int main() {
10602 thr_create()
10603 ; return 0; }
10604 EOF
10605 if { (eval echo configure:10606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10606   rm -rf conftest*
10607   eval "ac_cv_lib_$ac_lib_var=yes"
10608 else
10609   echo "configure: failed program was:" >&5
10610   cat conftest.$ac_ext >&5
10611   rm -rf conftest*
10612   eval "ac_cv_lib_$ac_lib_var=no"
10613 fi
10614 rm -f conftest*
10615 LIBS="$ac_save_LIBS"
10616
10617 fi
10618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10619   echo "$ac_t""yes" 1>&6
10620   have_thr=yes
10621 else
10622   echo "$ac_t""no" 1>&6
10623 have_thr=no
10624 fi
10625
10626
10627                 if test $have_thr = yes ; then
10628                         cat >> confdefs.h <<\EOF
10629 #define HAVE_THR 1
10630 EOF
10631
10632                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10633                         ol_link_threads=thr
10634
10635                         if test $ol_with_yielding_select = auto ; then
10636                                 ol_with_yielding_select=yes
10637                         fi
10638
10639                                                 for ac_func in \
10640                                 thr_setconcurrency \
10641                                 thr_getconcurrency \
10642                         
10643 do
10644 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10645 echo "configure:10646: checking for $ac_func" >&5
10646 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10647   echo $ac_n "(cached) $ac_c" 1>&6
10648 else
10649   cat > conftest.$ac_ext <<EOF
10650 #line 10651 "configure"
10651 #include "confdefs.h"
10652 /* System header to define __stub macros and hopefully few prototypes,
10653     which can conflict with char $ac_func(); below.  */
10654 #include <assert.h>
10655 /* Override any gcc2 internal prototype to avoid an error.  */
10656 /* We use char because int might match the return type of a gcc2
10657     builtin and then its argument prototype would still apply.  */
10658 char $ac_func();
10659 char (*f)();
10660
10661 int main() {
10662
10663 /* The GNU C library defines this for functions which it implements
10664     to always fail with ENOSYS.  Some functions are actually named
10665     something starting with __ and the normal name is an alias.  */
10666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10667 choke me
10668 #else
10669 f = $ac_func;
10670 #endif
10671
10672 ; return 0; }
10673 EOF
10674 if { (eval echo configure:10675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10675   rm -rf conftest*
10676   eval "ac_cv_func_$ac_func=yes"
10677 else
10678   echo "configure: failed program was:" >&5
10679   cat conftest.$ac_ext >&5
10680   rm -rf conftest*
10681   eval "ac_cv_func_$ac_func=no"
10682 fi
10683 rm -f conftest*
10684 fi
10685
10686 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10687   echo "$ac_t""yes" 1>&6
10688     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10689   cat >> confdefs.h <<EOF
10690 #define $ac_tr_func 1
10691 EOF
10692  
10693 else
10694   echo "$ac_t""no" 1>&6
10695 fi
10696 done
10697
10698                 fi
10699         fi
10700
10701                 for ac_hdr in lwp/lwp.h
10702 do
10703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10705 echo "configure:10706: checking for $ac_hdr" >&5
10706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10707   echo $ac_n "(cached) $ac_c" 1>&6
10708 else
10709   cat > conftest.$ac_ext <<EOF
10710 #line 10711 "configure"
10711 #include "confdefs.h"
10712 #include <$ac_hdr>
10713 EOF
10714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10715 { (eval echo configure:10716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10717 if test -z "$ac_err"; then
10718   rm -rf conftest*
10719   eval "ac_cv_header_$ac_safe=yes"
10720 else
10721   echo "$ac_err" >&5
10722   echo "configure: failed program was:" >&5
10723   cat conftest.$ac_ext >&5
10724   rm -rf conftest*
10725   eval "ac_cv_header_$ac_safe=no"
10726 fi
10727 rm -f conftest*
10728 fi
10729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10730   echo "$ac_t""yes" 1>&6
10731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10732   cat >> confdefs.h <<EOF
10733 #define $ac_tr_hdr 1
10734 EOF
10735  
10736 else
10737   echo "$ac_t""no" 1>&6
10738 fi
10739 done
10740
10741         if test $ac_cv_header_lwp_lwp_h = yes ; then
10742                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10743 echo "configure:10744: checking for lwp_create in -llwp" >&5
10744 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10746   echo $ac_n "(cached) $ac_c" 1>&6
10747 else
10748   ac_save_LIBS="$LIBS"
10749 LIBS="-llwp  $LIBS"
10750 cat > conftest.$ac_ext <<EOF
10751 #line 10752 "configure"
10752 #include "confdefs.h"
10753 /* Override any gcc2 internal prototype to avoid an error.  */
10754 /* We use char because int might match the return type of a gcc2
10755     builtin and then its argument prototype would still apply.  */
10756 char lwp_create();
10757
10758 int main() {
10759 lwp_create()
10760 ; return 0; }
10761 EOF
10762 if { (eval echo configure:10763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10763   rm -rf conftest*
10764   eval "ac_cv_lib_$ac_lib_var=yes"
10765 else
10766   echo "configure: failed program was:" >&5
10767   cat conftest.$ac_ext >&5
10768   rm -rf conftest*
10769   eval "ac_cv_lib_$ac_lib_var=no"
10770 fi
10771 rm -f conftest*
10772 LIBS="$ac_save_LIBS"
10773
10774 fi
10775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10776   echo "$ac_t""yes" 1>&6
10777   have_lwp=yes
10778 else
10779   echo "$ac_t""no" 1>&6
10780 have_lwp=no
10781 fi
10782
10783
10784                 if test $have_lwp = yes ; then
10785                         cat >> confdefs.h <<\EOF
10786 #define HAVE_LWP 1
10787 EOF
10788
10789                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10790                         ol_link_threads=lwp
10791
10792                         if test $ol_with_yielding_select = auto ; then
10793                                 ol_with_yielding_select=no
10794                         fi
10795                 fi
10796         fi
10797 fi
10798
10799 if test $ol_with_yielding_select = yes ; then
10800         cat >> confdefs.h <<\EOF
10801 #define HAVE_YIELDING_SELECT 1
10802 EOF
10803
10804 fi
10805
10806 if test $ol_with_threads = manual ; then
10807                 ol_link_threads=yes
10808
10809         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10810
10811         for ac_hdr in pthread.h sched.h
10812 do
10813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10815 echo "configure:10816: checking for $ac_hdr" >&5
10816 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10817   echo $ac_n "(cached) $ac_c" 1>&6
10818 else
10819   cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822 #include <$ac_hdr>
10823 EOF
10824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10825 { (eval echo configure:10826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10827 if test -z "$ac_err"; then
10828   rm -rf conftest*
10829   eval "ac_cv_header_$ac_safe=yes"
10830 else
10831   echo "$ac_err" >&5
10832   echo "configure: failed program was:" >&5
10833   cat conftest.$ac_ext >&5
10834   rm -rf conftest*
10835   eval "ac_cv_header_$ac_safe=no"
10836 fi
10837 rm -f conftest*
10838 fi
10839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10840   echo "$ac_t""yes" 1>&6
10841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10842   cat >> confdefs.h <<EOF
10843 #define $ac_tr_hdr 1
10844 EOF
10845  
10846 else
10847   echo "$ac_t""no" 1>&6
10848 fi
10849 done
10850
10851         for ac_func in sched_yield pthread_yield
10852 do
10853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10854 echo "configure:10855: checking for $ac_func" >&5
10855 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10856   echo $ac_n "(cached) $ac_c" 1>&6
10857 else
10858   cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861 /* System header to define __stub macros and hopefully few prototypes,
10862     which can conflict with char $ac_func(); below.  */
10863 #include <assert.h>
10864 /* Override any gcc2 internal prototype to avoid an error.  */
10865 /* We use char because int might match the return type of a gcc2
10866     builtin and then its argument prototype would still apply.  */
10867 char $ac_func();
10868 char (*f)();
10869
10870 int main() {
10871
10872 /* The GNU C library defines this for functions which it implements
10873     to always fail with ENOSYS.  Some functions are actually named
10874     something starting with __ and the normal name is an alias.  */
10875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10876 choke me
10877 #else
10878 f = $ac_func;
10879 #endif
10880
10881 ; return 0; }
10882 EOF
10883 if { (eval echo configure:10884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10884   rm -rf conftest*
10885   eval "ac_cv_func_$ac_func=yes"
10886 else
10887   echo "configure: failed program was:" >&5
10888   cat conftest.$ac_ext >&5
10889   rm -rf conftest*
10890   eval "ac_cv_func_$ac_func=no"
10891 fi
10892 rm -f conftest*
10893 fi
10894
10895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10896   echo "$ac_t""yes" 1>&6
10897     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10898   cat >> confdefs.h <<EOF
10899 #define $ac_tr_func 1
10900 EOF
10901  
10902 else
10903   echo "$ac_t""no" 1>&6
10904 fi
10905 done
10906
10907         
10908         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10909 echo "configure:10910: checking for LinuxThreads pthread.h" >&5
10910 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10911   echo $ac_n "(cached) $ac_c" 1>&6
10912 else
10913   cat > conftest.$ac_ext <<EOF
10914 #line 10915 "configure"
10915 #include "confdefs.h"
10916 #include <pthread.h>
10917 EOF
10918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10919   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10920   rm -rf conftest*
10921   ol_cv_header_linux_threads=yes
10922 else
10923   rm -rf conftest*
10924   ol_cv_header_linux_threads=no
10925 fi
10926 rm -f conftest*
10927
10928                 
10929 fi
10930
10931 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10932         if test $ol_cv_header_linux_threads = yes; then
10933                 cat >> confdefs.h <<\EOF
10934 #define HAVE_LINUX_THREADS 1
10935 EOF
10936
10937         fi
10938
10939
10940         for ac_hdr in mach/cthreads.h
10941 do
10942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10944 echo "configure:10945: checking for $ac_hdr" >&5
10945 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10946   echo $ac_n "(cached) $ac_c" 1>&6
10947 else
10948   cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951 #include <$ac_hdr>
10952 EOF
10953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10954 { (eval echo configure:10955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10956 if test -z "$ac_err"; then
10957   rm -rf conftest*
10958   eval "ac_cv_header_$ac_safe=yes"
10959 else
10960   echo "$ac_err" >&5
10961   echo "configure: failed program was:" >&5
10962   cat conftest.$ac_ext >&5
10963   rm -rf conftest*
10964   eval "ac_cv_header_$ac_safe=no"
10965 fi
10966 rm -f conftest*
10967 fi
10968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10969   echo "$ac_t""yes" 1>&6
10970     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10971   cat >> confdefs.h <<EOF
10972 #define $ac_tr_hdr 1
10973 EOF
10974  
10975 else
10976   echo "$ac_t""no" 1>&6
10977 fi
10978 done
10979
10980         for ac_hdr in lwp/lwp.h
10981 do
10982 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10983 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10984 echo "configure:10985: checking for $ac_hdr" >&5
10985 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10986   echo $ac_n "(cached) $ac_c" 1>&6
10987 else
10988   cat > conftest.$ac_ext <<EOF
10989 #line 10990 "configure"
10990 #include "confdefs.h"
10991 #include <$ac_hdr>
10992 EOF
10993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10994 { (eval echo configure:10995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10996 if test -z "$ac_err"; then
10997   rm -rf conftest*
10998   eval "ac_cv_header_$ac_safe=yes"
10999 else
11000   echo "$ac_err" >&5
11001   echo "configure: failed program was:" >&5
11002   cat conftest.$ac_ext >&5
11003   rm -rf conftest*
11004   eval "ac_cv_header_$ac_safe=no"
11005 fi
11006 rm -f conftest*
11007 fi
11008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11009   echo "$ac_t""yes" 1>&6
11010     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11011   cat >> confdefs.h <<EOF
11012 #define $ac_tr_hdr 1
11013 EOF
11014  
11015 else
11016   echo "$ac_t""no" 1>&6
11017 fi
11018 done
11019
11020         for ac_hdr in thread.h synch.h
11021 do
11022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11024 echo "configure:11025: checking for $ac_hdr" >&5
11025 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11026   echo $ac_n "(cached) $ac_c" 1>&6
11027 else
11028   cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031 #include <$ac_hdr>
11032 EOF
11033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11034 { (eval echo configure:11035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11036 if test -z "$ac_err"; then
11037   rm -rf conftest*
11038   eval "ac_cv_header_$ac_safe=yes"
11039 else
11040   echo "$ac_err" >&5
11041   echo "configure: failed program was:" >&5
11042   cat conftest.$ac_ext >&5
11043   rm -rf conftest*
11044   eval "ac_cv_header_$ac_safe=no"
11045 fi
11046 rm -f conftest*
11047 fi
11048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11049   echo "$ac_t""yes" 1>&6
11050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11051   cat >> confdefs.h <<EOF
11052 #define $ac_tr_hdr 1
11053 EOF
11054  
11055 else
11056   echo "$ac_t""no" 1>&6
11057 fi
11058 done
11059
11060 fi
11061
11062 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11063                         cat >> confdefs.h <<\EOF
11064 #define REENTRANT 1
11065 EOF
11066
11067         cat >> confdefs.h <<\EOF
11068 #define _REENTRANT 1
11069 EOF
11070
11071         cat >> confdefs.h <<\EOF
11072 #define THREAD_SAFE 1
11073 EOF
11074
11075         cat >> confdefs.h <<\EOF
11076 #define _THREAD_SAFE 1
11077 EOF
11078
11079         cat >> confdefs.h <<\EOF
11080 #define THREADSAFE 1
11081 EOF
11082
11083         cat >> confdefs.h <<\EOF
11084 #define _THREADSAFE 1
11085 EOF
11086
11087         cat >> confdefs.h <<\EOF
11088 #define _SGI_MP_SOURCE 1
11089 EOF
11090
11091
11092                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11093 echo "configure:11094: checking for thread specific errno" >&5
11094 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11095   echo $ac_n "(cached) $ac_c" 1>&6
11096 else
11097   
11098                 cat > conftest.$ac_ext <<EOF
11099 #line 11100 "configure"
11100 #include "confdefs.h"
11101 #include <errno.h>
11102 int main() {
11103 errno = 0;
11104 ; return 0; }
11105 EOF
11106 if { (eval echo configure:11107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11107   rm -rf conftest*
11108   ol_cv_errno_thread_specific=yes
11109 else
11110   echo "configure: failed program was:" >&5
11111   cat conftest.$ac_ext >&5
11112   rm -rf conftest*
11113   ol_cv_errno_thread_specific=no
11114 fi
11115 rm -f conftest*
11116         
11117 fi
11118
11119 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11120
11121                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11122 echo "configure:11123: checking for thread specific h_errno" >&5
11123 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11124   echo $ac_n "(cached) $ac_c" 1>&6
11125 else
11126   
11127                 cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 #include <netdb.h>
11131 int main() {
11132 h_errno = 0;
11133 ; return 0; }
11134 EOF
11135 if { (eval echo configure:11136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11136   rm -rf conftest*
11137   ol_cv_h_errno_thread_specific=yes
11138 else
11139   echo "configure: failed program was:" >&5
11140   cat conftest.$ac_ext >&5
11141   rm -rf conftest*
11142   ol_cv_h_errno_thread_specific=no
11143 fi
11144 rm -f conftest*
11145         
11146 fi
11147
11148 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11149
11150         if test $ol_cv_errno_thread_specific != yes \
11151                 -o $ol_cv_h_errno_thread_specific != yes ; then
11152                 LIBS="$LTHREAD_LIBS $LIBS"
11153                 LTHREAD_LIBS=""
11154         fi
11155
11156 fi  
11157
11158 if test $ol_link_threads = no ; then
11159         if test $ol_with_threads = yes ; then
11160                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11161         fi
11162
11163         if test $ol_with_threads = auto ; then
11164                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11165                 ol_with_threads=no
11166         fi
11167
11168         cat >> confdefs.h <<\EOF
11169 #define NO_THREADS 1
11170 EOF
11171
11172         LTHREAD_LIBS=""
11173 fi
11174
11175 if test $ol_link_threads != no ; then
11176         cat >> confdefs.h <<\EOF
11177 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11178 EOF
11179
11180 fi
11181
11182 ol_link_ldbm=no 
11183
11184 if test $ol_with_ldbm_api = auto \
11185         -o $ol_with_ldbm_api = berkeley \
11186         -o $ol_with_ldbm_api = bcompat ; then
11187
11188         if test $ol_with_ldbm_api = bcompat; then \
11189                 ol_cv_berkeley_db=no
11190 for ac_hdr in db_185.h db.h
11191 do
11192 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11193 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11194 echo "configure:11195: checking for $ac_hdr" >&5
11195 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11196   echo $ac_n "(cached) $ac_c" 1>&6
11197 else
11198   cat > conftest.$ac_ext <<EOF
11199 #line 11200 "configure"
11200 #include "confdefs.h"
11201 #include <$ac_hdr>
11202 EOF
11203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11204 { (eval echo configure:11205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11206 if test -z "$ac_err"; then
11207   rm -rf conftest*
11208   eval "ac_cv_header_$ac_safe=yes"
11209 else
11210   echo "$ac_err" >&5
11211   echo "configure: failed program was:" >&5
11212   cat conftest.$ac_ext >&5
11213   rm -rf conftest*
11214   eval "ac_cv_header_$ac_safe=no"
11215 fi
11216 rm -f conftest*
11217 fi
11218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11219   echo "$ac_t""yes" 1>&6
11220     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11221   cat >> confdefs.h <<EOF
11222 #define $ac_tr_hdr 1
11223 EOF
11224  
11225 else
11226   echo "$ac_t""no" 1>&6
11227 fi
11228 done
11229
11230 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11231         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11232 echo "configure:11233: checking if Berkeley DB header compatibility" >&5
11233 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11234   echo $ac_n "(cached) $ac_c" 1>&6
11235 else
11236   
11237                 cat > conftest.$ac_ext <<EOF
11238 #line 11239 "configure"
11239 #include "confdefs.h"
11240
11241 #if HAVE_DB_185_H
11242 #       include <db_185.h>
11243 #else
11244 #       include <db.h>
11245 #endif
11246
11247  /* this check could be improved */
11248 #ifndef DB_VERSION_MAJOR
11249 #       define DB_VERSION_MAJOR 1
11250 #endif
11251
11252 #if DB_VERSION_MAJOR == 1 
11253         __db_version_1
11254 #endif
11255
11256 EOF
11257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11258   egrep "__db_version_1" >/dev/null 2>&1; then
11259   rm -rf conftest*
11260   ol_cv_header_db1=yes
11261 else
11262   rm -rf conftest*
11263   ol_cv_header_db1=no
11264 fi
11265 rm -f conftest*
11266
11267 fi
11268
11269 echo "$ac_t""$ol_cv_header_db1" 1>&6
11270
11271         if test ol_cv_header_db1=yes ; then
11272                 ol_cv_lib_db=no
11273 if test $ol_cv_lib_db = no ; then
11274         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11275 echo "configure:11276: checking for Berkeley DB link (default)" >&5
11276 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11277   echo $ac_n "(cached) $ac_c" 1>&6
11278 else
11279   
11280         ol_DB_LIB=
11281         ol_LIBS=$LIBS
11282         LIBS="$ol_DB_LIB $LIBS"
11283
11284         cat > conftest.$ac_ext <<EOF
11285 #line 11286 "configure"
11286 #include "confdefs.h"
11287
11288 #ifdef HAVE_DB_185_H
11289 # include <db_185.h>
11290 #else
11291 # include <db.h>
11292 #endif
11293
11294 #ifndef DB_VERSION_MAJOR
11295 # define DB_VERSION_MAJOR 1
11296 #endif
11297
11298 #ifndef NULL
11299 #define NULL ((void*)0)
11300 #endif
11301
11302 int main() {
11303
11304 #if DB_VERSION_MAJOR > 2
11305         db_env_create( NULL, 0 );
11306 #elif DB_VERSION_MAJOR > 1
11307         db_appexit( NULL );
11308 #else
11309         (void) dbopen( NULL, 0, 0, 0, NULL);
11310 #endif
11311
11312 ; return 0; }
11313 EOF
11314 if { (eval echo configure:11315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11315   rm -rf conftest*
11316   ol_cv_db_none=yes
11317 else
11318   echo "configure: failed program was:" >&5
11319   cat conftest.$ac_ext >&5
11320   rm -rf conftest*
11321   ol_cv_db_none=no
11322 fi
11323 rm -f conftest*
11324
11325         LIBS="$ol_LIBS"
11326
11327 fi
11328
11329 echo "$ac_t""$ol_cv_db_none" 1>&6
11330
11331         if test $ol_cv_db_none = yes ; then
11332                 ol_cv_lib_db=yes
11333         fi
11334 fi
11335
11336 if test $ol_cv_lib_db = no ; then
11337         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11338 echo "configure:11339: checking for Berkeley DB link (-ldb)" >&5
11339 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11340   echo $ac_n "(cached) $ac_c" 1>&6
11341 else
11342   
11343         ol_DB_LIB=-ldb
11344         ol_LIBS=$LIBS
11345         LIBS="$ol_DB_LIB $LIBS"
11346
11347         cat > conftest.$ac_ext <<EOF
11348 #line 11349 "configure"
11349 #include "confdefs.h"
11350
11351 #ifdef HAVE_DB_185_H
11352 # include <db_185.h>
11353 #else
11354 # include <db.h>
11355 #endif
11356
11357 #ifndef DB_VERSION_MAJOR
11358 # define DB_VERSION_MAJOR 1
11359 #endif
11360
11361 #ifndef NULL
11362 #define NULL ((void*)0)
11363 #endif
11364
11365 int main() {
11366
11367 #if DB_VERSION_MAJOR > 2
11368         db_env_create( NULL, 0 );
11369 #elif DB_VERSION_MAJOR > 1
11370         db_appexit( NULL );
11371 #else
11372         (void) dbopen( NULL, 0, 0, 0, NULL);
11373 #endif
11374
11375 ; return 0; }
11376 EOF
11377 if { (eval echo configure:11378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11378   rm -rf conftest*
11379   ol_cv_db_db=yes
11380 else
11381   echo "configure: failed program was:" >&5
11382   cat conftest.$ac_ext >&5
11383   rm -rf conftest*
11384   ol_cv_db_db=no
11385 fi
11386 rm -f conftest*
11387
11388         LIBS="$ol_LIBS"
11389
11390 fi
11391
11392 echo "$ac_t""$ol_cv_db_db" 1>&6
11393
11394         if test $ol_cv_db_db = yes ; then
11395                 ol_cv_lib_db=-ldb
11396         fi
11397 fi
11398
11399 if test $ol_cv_lib_db = no ; then
11400         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11401 echo "configure:11402: checking for Berkeley DB link (-ldb3)" >&5
11402 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11403   echo $ac_n "(cached) $ac_c" 1>&6
11404 else
11405   
11406         ol_DB_LIB=-ldb3
11407         ol_LIBS=$LIBS
11408         LIBS="$ol_DB_LIB $LIBS"
11409
11410         cat > conftest.$ac_ext <<EOF
11411 #line 11412 "configure"
11412 #include "confdefs.h"
11413
11414 #ifdef HAVE_DB_185_H
11415 # include <db_185.h>
11416 #else
11417 # include <db.h>
11418 #endif
11419
11420 #ifndef DB_VERSION_MAJOR
11421 # define DB_VERSION_MAJOR 1
11422 #endif
11423
11424 #ifndef NULL
11425 #define NULL ((void*)0)
11426 #endif
11427
11428 int main() {
11429
11430 #if DB_VERSION_MAJOR > 2
11431         db_env_create( NULL, 0 );
11432 #elif DB_VERSION_MAJOR > 1
11433         db_appexit( NULL );
11434 #else
11435         (void) dbopen( NULL, 0, 0, 0, NULL);
11436 #endif
11437
11438 ; return 0; }
11439 EOF
11440 if { (eval echo configure:11441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11441   rm -rf conftest*
11442   ol_cv_db_db3=yes
11443 else
11444   echo "configure: failed program was:" >&5
11445   cat conftest.$ac_ext >&5
11446   rm -rf conftest*
11447   ol_cv_db_db3=no
11448 fi
11449 rm -f conftest*
11450
11451         LIBS="$ol_LIBS"
11452
11453 fi
11454
11455 echo "$ac_t""$ol_cv_db_db3" 1>&6
11456
11457         if test $ol_cv_db_db3 = yes ; then
11458                 ol_cv_lib_db=-ldb3
11459         fi
11460 fi
11461
11462 if test $ol_cv_lib_db = no ; then
11463         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11464 echo "configure:11465: checking for Berkeley DB link (-ldb2)" >&5
11465 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11466   echo $ac_n "(cached) $ac_c" 1>&6
11467 else
11468   
11469         ol_DB_LIB=-ldb2
11470         ol_LIBS=$LIBS
11471         LIBS="$ol_DB_LIB $LIBS"
11472
11473         cat > conftest.$ac_ext <<EOF
11474 #line 11475 "configure"
11475 #include "confdefs.h"
11476
11477 #ifdef HAVE_DB_185_H
11478 # include <db_185.h>
11479 #else
11480 # include <db.h>
11481 #endif
11482
11483 #ifndef DB_VERSION_MAJOR
11484 # define DB_VERSION_MAJOR 1
11485 #endif
11486
11487 #ifndef NULL
11488 #define NULL ((void*)0)
11489 #endif
11490
11491 int main() {
11492
11493 #if DB_VERSION_MAJOR > 2
11494         db_env_create( NULL, 0 );
11495 #elif DB_VERSION_MAJOR > 1
11496         db_appexit( NULL );
11497 #else
11498         (void) dbopen( NULL, 0, 0, 0, NULL);
11499 #endif
11500
11501 ; return 0; }
11502 EOF
11503 if { (eval echo configure:11504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11504   rm -rf conftest*
11505   ol_cv_db_db2=yes
11506 else
11507   echo "configure: failed program was:" >&5
11508   cat conftest.$ac_ext >&5
11509   rm -rf conftest*
11510   ol_cv_db_db2=no
11511 fi
11512 rm -f conftest*
11513
11514         LIBS="$ol_LIBS"
11515
11516 fi
11517
11518 echo "$ac_t""$ol_cv_db_db2" 1>&6
11519
11520         if test $ol_cv_db_db2 = yes ; then
11521                 ol_cv_lib_db=-ldb2
11522         fi
11523 fi
11524
11525 if test $ol_cv_lib_db = no ; then
11526         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11527 echo "configure:11528: checking for Berkeley DB link (-ldb1)" >&5
11528 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11529   echo $ac_n "(cached) $ac_c" 1>&6
11530 else
11531   
11532         ol_DB_LIB=-ldb1
11533         ol_LIBS=$LIBS
11534         LIBS="$ol_DB_LIB $LIBS"
11535
11536         cat > conftest.$ac_ext <<EOF
11537 #line 11538 "configure"
11538 #include "confdefs.h"
11539
11540 #ifdef HAVE_DB_185_H
11541 # include <db_185.h>
11542 #else
11543 # include <db.h>
11544 #endif
11545
11546 #ifndef DB_VERSION_MAJOR
11547 # define DB_VERSION_MAJOR 1
11548 #endif
11549
11550 #ifndef NULL
11551 #define NULL ((void*)0)
11552 #endif
11553
11554 int main() {
11555
11556 #if DB_VERSION_MAJOR > 2
11557         db_env_create( NULL, 0 );
11558 #elif DB_VERSION_MAJOR > 1
11559         db_appexit( NULL );
11560 #else
11561         (void) dbopen( NULL, 0, 0, 0, NULL);
11562 #endif
11563
11564 ; return 0; }
11565 EOF
11566 if { (eval echo configure:11567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11567   rm -rf conftest*
11568   ol_cv_db_db1=yes
11569 else
11570   echo "configure: failed program was:" >&5
11571   cat conftest.$ac_ext >&5
11572   rm -rf conftest*
11573   ol_cv_db_db1=no
11574 fi
11575 rm -f conftest*
11576
11577         LIBS="$ol_LIBS"
11578
11579 fi
11580
11581 echo "$ac_t""$ol_cv_db_db1" 1>&6
11582
11583         if test $ol_cv_db_db1 = yes ; then
11584                 ol_cv_lib_db=-ldb1
11585         fi
11586 fi
11587
11588
11589                 if test "$ol_cv_lib_db" != no ; then
11590                         ol_cv_berkeley_db=yes
11591                 fi
11592         fi
11593 fi
11594
11595         else
11596                 ol_cv_berkeley_db=no
11597 for ac_hdr in db.h
11598 do
11599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11601 echo "configure:11602: checking for $ac_hdr" >&5
11602 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 #include <$ac_hdr>
11609 EOF
11610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11611 { (eval echo configure:11612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11613 if test -z "$ac_err"; then
11614   rm -rf conftest*
11615   eval "ac_cv_header_$ac_safe=yes"
11616 else
11617   echo "$ac_err" >&5
11618   echo "configure: failed program was:" >&5
11619   cat conftest.$ac_ext >&5
11620   rm -rf conftest*
11621   eval "ac_cv_header_$ac_safe=no"
11622 fi
11623 rm -f conftest*
11624 fi
11625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11626   echo "$ac_t""yes" 1>&6
11627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11628   cat >> confdefs.h <<EOF
11629 #define $ac_tr_hdr 1
11630 EOF
11631  
11632 else
11633   echo "$ac_t""no" 1>&6
11634 fi
11635 done
11636
11637 if test $ac_cv_header_db_h = yes; then
11638         ol_cv_lib_db=no
11639 if test $ol_cv_lib_db = no ; then
11640         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11641 echo "configure:11642: checking for Berkeley DB link (default)" >&5
11642 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11643   echo $ac_n "(cached) $ac_c" 1>&6
11644 else
11645   
11646         ol_DB_LIB=
11647         ol_LIBS=$LIBS
11648         LIBS="$ol_DB_LIB $LIBS"
11649
11650         cat > conftest.$ac_ext <<EOF
11651 #line 11652 "configure"
11652 #include "confdefs.h"
11653
11654 #ifdef HAVE_DB_185_H
11655 # include <db_185.h>
11656 #else
11657 # include <db.h>
11658 #endif
11659
11660 #ifndef DB_VERSION_MAJOR
11661 # define DB_VERSION_MAJOR 1
11662 #endif
11663
11664 #ifndef NULL
11665 #define NULL ((void*)0)
11666 #endif
11667
11668 int main() {
11669
11670 #if DB_VERSION_MAJOR > 2
11671         db_env_create( NULL, 0 );
11672 #elif DB_VERSION_MAJOR > 1
11673         db_appexit( NULL );
11674 #else
11675         (void) dbopen( NULL, 0, 0, 0, NULL);
11676 #endif
11677
11678 ; return 0; }
11679 EOF
11680 if { (eval echo configure:11681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11681   rm -rf conftest*
11682   ol_cv_db_none=yes
11683 else
11684   echo "configure: failed program was:" >&5
11685   cat conftest.$ac_ext >&5
11686   rm -rf conftest*
11687   ol_cv_db_none=no
11688 fi
11689 rm -f conftest*
11690
11691         LIBS="$ol_LIBS"
11692
11693 fi
11694
11695 echo "$ac_t""$ol_cv_db_none" 1>&6
11696
11697         if test $ol_cv_db_none = yes ; then
11698                 ol_cv_lib_db=yes
11699         fi
11700 fi
11701
11702 if test $ol_cv_lib_db = no ; then
11703         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11704 echo "configure:11705: checking for Berkeley DB link (-ldb)" >&5
11705 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11706   echo $ac_n "(cached) $ac_c" 1>&6
11707 else
11708   
11709         ol_DB_LIB=-ldb
11710         ol_LIBS=$LIBS
11711         LIBS="$ol_DB_LIB $LIBS"
11712
11713         cat > conftest.$ac_ext <<EOF
11714 #line 11715 "configure"
11715 #include "confdefs.h"
11716
11717 #ifdef HAVE_DB_185_H
11718 # include <db_185.h>
11719 #else
11720 # include <db.h>
11721 #endif
11722
11723 #ifndef DB_VERSION_MAJOR
11724 # define DB_VERSION_MAJOR 1
11725 #endif
11726
11727 #ifndef NULL
11728 #define NULL ((void*)0)
11729 #endif
11730
11731 int main() {
11732
11733 #if DB_VERSION_MAJOR > 2
11734         db_env_create( NULL, 0 );
11735 #elif DB_VERSION_MAJOR > 1
11736         db_appexit( NULL );
11737 #else
11738         (void) dbopen( NULL, 0, 0, 0, NULL);
11739 #endif
11740
11741 ; return 0; }
11742 EOF
11743 if { (eval echo configure:11744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11744   rm -rf conftest*
11745   ol_cv_db_db=yes
11746 else
11747   echo "configure: failed program was:" >&5
11748   cat conftest.$ac_ext >&5
11749   rm -rf conftest*
11750   ol_cv_db_db=no
11751 fi
11752 rm -f conftest*
11753
11754         LIBS="$ol_LIBS"
11755
11756 fi
11757
11758 echo "$ac_t""$ol_cv_db_db" 1>&6
11759
11760         if test $ol_cv_db_db = yes ; then
11761                 ol_cv_lib_db=-ldb
11762         fi
11763 fi
11764
11765 if test $ol_cv_lib_db = no ; then
11766         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11767 echo "configure:11768: checking for Berkeley DB link (-ldb3)" >&5
11768 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11769   echo $ac_n "(cached) $ac_c" 1>&6
11770 else
11771   
11772         ol_DB_LIB=-ldb3
11773         ol_LIBS=$LIBS
11774         LIBS="$ol_DB_LIB $LIBS"
11775
11776         cat > conftest.$ac_ext <<EOF
11777 #line 11778 "configure"
11778 #include "confdefs.h"
11779
11780 #ifdef HAVE_DB_185_H
11781 # include <db_185.h>
11782 #else
11783 # include <db.h>
11784 #endif
11785
11786 #ifndef DB_VERSION_MAJOR
11787 # define DB_VERSION_MAJOR 1
11788 #endif
11789
11790 #ifndef NULL
11791 #define NULL ((void*)0)
11792 #endif
11793
11794 int main() {
11795
11796 #if DB_VERSION_MAJOR > 2
11797         db_env_create( NULL, 0 );
11798 #elif DB_VERSION_MAJOR > 1
11799         db_appexit( NULL );
11800 #else
11801         (void) dbopen( NULL, 0, 0, 0, NULL);
11802 #endif
11803
11804 ; return 0; }
11805 EOF
11806 if { (eval echo configure:11807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11807   rm -rf conftest*
11808   ol_cv_db_db3=yes
11809 else
11810   echo "configure: failed program was:" >&5
11811   cat conftest.$ac_ext >&5
11812   rm -rf conftest*
11813   ol_cv_db_db3=no
11814 fi
11815 rm -f conftest*
11816
11817         LIBS="$ol_LIBS"
11818
11819 fi
11820
11821 echo "$ac_t""$ol_cv_db_db3" 1>&6
11822
11823         if test $ol_cv_db_db3 = yes ; then
11824                 ol_cv_lib_db=-ldb3
11825         fi
11826 fi
11827
11828 if test $ol_cv_lib_db = no ; then
11829         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11830 echo "configure:11831: checking for Berkeley DB link (-ldb2)" >&5
11831 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11832   echo $ac_n "(cached) $ac_c" 1>&6
11833 else
11834   
11835         ol_DB_LIB=-ldb2
11836         ol_LIBS=$LIBS
11837         LIBS="$ol_DB_LIB $LIBS"
11838
11839         cat > conftest.$ac_ext <<EOF
11840 #line 11841 "configure"
11841 #include "confdefs.h"
11842
11843 #ifdef HAVE_DB_185_H
11844 # include <db_185.h>
11845 #else
11846 # include <db.h>
11847 #endif
11848
11849 #ifndef DB_VERSION_MAJOR
11850 # define DB_VERSION_MAJOR 1
11851 #endif
11852
11853 #ifndef NULL
11854 #define NULL ((void*)0)
11855 #endif
11856
11857 int main() {
11858
11859 #if DB_VERSION_MAJOR > 2
11860         db_env_create( NULL, 0 );
11861 #elif DB_VERSION_MAJOR > 1
11862         db_appexit( NULL );
11863 #else
11864         (void) dbopen( NULL, 0, 0, 0, NULL);
11865 #endif
11866
11867 ; return 0; }
11868 EOF
11869 if { (eval echo configure:11870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11870   rm -rf conftest*
11871   ol_cv_db_db2=yes
11872 else
11873   echo "configure: failed program was:" >&5
11874   cat conftest.$ac_ext >&5
11875   rm -rf conftest*
11876   ol_cv_db_db2=no
11877 fi
11878 rm -f conftest*
11879
11880         LIBS="$ol_LIBS"
11881
11882 fi
11883
11884 echo "$ac_t""$ol_cv_db_db2" 1>&6
11885
11886         if test $ol_cv_db_db2 = yes ; then
11887                 ol_cv_lib_db=-ldb2
11888         fi
11889 fi
11890
11891 if test $ol_cv_lib_db = no ; then
11892         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11893 echo "configure:11894: checking for Berkeley DB link (-ldb1)" >&5
11894 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11895   echo $ac_n "(cached) $ac_c" 1>&6
11896 else
11897   
11898         ol_DB_LIB=-ldb1
11899         ol_LIBS=$LIBS
11900         LIBS="$ol_DB_LIB $LIBS"
11901
11902         cat > conftest.$ac_ext <<EOF
11903 #line 11904 "configure"
11904 #include "confdefs.h"
11905
11906 #ifdef HAVE_DB_185_H
11907 # include <db_185.h>
11908 #else
11909 # include <db.h>
11910 #endif
11911
11912 #ifndef DB_VERSION_MAJOR
11913 # define DB_VERSION_MAJOR 1
11914 #endif
11915
11916 #ifndef NULL
11917 #define NULL ((void*)0)
11918 #endif
11919
11920 int main() {
11921
11922 #if DB_VERSION_MAJOR > 2
11923         db_env_create( NULL, 0 );
11924 #elif DB_VERSION_MAJOR > 1
11925         db_appexit( NULL );
11926 #else
11927         (void) dbopen( NULL, 0, 0, 0, NULL);
11928 #endif
11929
11930 ; return 0; }
11931 EOF
11932 if { (eval echo configure:11933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11933   rm -rf conftest*
11934   ol_cv_db_db1=yes
11935 else
11936   echo "configure: failed program was:" >&5
11937   cat conftest.$ac_ext >&5
11938   rm -rf conftest*
11939   ol_cv_db_db1=no
11940 fi
11941 rm -f conftest*
11942
11943         LIBS="$ol_LIBS"
11944
11945 fi
11946
11947 echo "$ac_t""$ol_cv_db_db1" 1>&6
11948
11949         if test $ol_cv_db_db1 = yes ; then
11950                 ol_cv_lib_db=-ldb1
11951         fi
11952 fi
11953
11954
11955         if test "$ol_cv_lib_db" != no ; then
11956                 ol_cv_berkeley_db=yes
11957                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
11958 echo "configure:11959: checking for Berkeley DB thread support" >&5
11959 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
11960   echo $ac_n "(cached) $ac_c" 1>&6
11961 else
11962   
11963         ol_LIBS="$LIBS"
11964         if test $ol_cv_lib_db != yes ; then
11965                 LIBS="$ol_cv_lib_db"
11966         fi
11967
11968         if test "$cross_compiling" = yes; then
11969   ol_cv_berkeley_db_thread=cross
11970 else
11971   cat > conftest.$ac_ext <<EOF
11972 #line 11973 "configure"
11973 #include "confdefs.h"
11974
11975 #ifdef HAVE_DB_185_H
11976         choke me;
11977 #else
11978 #include <db.h>
11979 #endif
11980 #ifndef NULL
11981 #define NULL ((void *)0)
11982 #endif
11983 main()
11984 {
11985         int rc;
11986         u_int32_t flags = DB_CREATE | DB_THREAD;
11987
11988
11989 #if DB_VERSION_MAJOR > 2
11990         DB_ENV *env = NULL;
11991
11992         rc = db_env_create( &env, 0 );
11993
11994         if( rc == 0 ) {
11995                 rc = env->open( env, NULL, NULL, flags, 0 );
11996         }
11997
11998 #else
11999         DB_ENV env;
12000         memset( &env, '\0', sizeof(env) );
12001
12002         rc = db_appinit( NULL, NULL, &env, flags );
12003
12004         if( rc == 0 ) {
12005                 db_appexit( &env );
12006         }
12007 #endif
12008
12009         return rc;
12010 }
12011 EOF
12012 if { (eval echo configure:12013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12013 then
12014   ol_cv_berkeley_db_thread=yes
12015 else
12016   echo "configure: failed program was:" >&5
12017   cat conftest.$ac_ext >&5
12018   rm -fr conftest*
12019   ol_cv_berkeley_db_thread=no
12020 fi
12021 rm -fr conftest*
12022 fi
12023
12024
12025         LIBS="$ol_LIBS"
12026
12027         if test $ol_cv_berkeley_db_thread != no ; then
12028                 cat >> confdefs.h <<\EOF
12029 #define HAVE_BERKELEY_DB_THREAD 1
12030 EOF
12031
12032         fi
12033
12034 fi
12035
12036 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12037         fi
12038 fi
12039
12040         fi
12041
12042         if test $ol_cv_berkeley_db != no ; then
12043                 cat >> confdefs.h <<\EOF
12044 #define HAVE_BERKELEY_DB 1
12045 EOF
12046
12047
12048                 ol_link_ldbm=berkeley
12049                 ol_with_ldbm_api=db
12050
12051                 if test $ol_with_ldbm_type = hash ; then
12052                         cat >> confdefs.h <<\EOF
12053 #define LDBM_USE_DBHASH 1
12054 EOF
12055
12056                 else
12057                         cat >> confdefs.h <<\EOF
12058 #define LDBM_USE_DBBTREE 1
12059 EOF
12060
12061                 fi
12062
12063                                                 if test $ol_cv_lib_db != yes ; then
12064                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12065                 fi
12066         fi
12067 fi
12068
12069 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12070         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12071         ol_with_ldbm_api=none
12072 fi
12073
12074 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12075         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12076 echo "configure:12077: checking for MDBM library" >&5
12077 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12078   echo $ac_n "(cached) $ac_c" 1>&6
12079 else
12080         ol_LIBS="$LIBS"
12081         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12082 echo "configure:12083: checking for mdbm_set_chain" >&5
12083 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12084   echo $ac_n "(cached) $ac_c" 1>&6
12085 else
12086   cat > conftest.$ac_ext <<EOF
12087 #line 12088 "configure"
12088 #include "confdefs.h"
12089 /* System header to define __stub macros and hopefully few prototypes,
12090     which can conflict with char mdbm_set_chain(); below.  */
12091 #include <assert.h>
12092 /* Override any gcc2 internal prototype to avoid an error.  */
12093 /* We use char because int might match the return type of a gcc2
12094     builtin and then its argument prototype would still apply.  */
12095 char mdbm_set_chain();
12096 char (*f)();
12097
12098 int main() {
12099
12100 /* The GNU C library defines this for functions which it implements
12101     to always fail with ENOSYS.  Some functions are actually named
12102     something starting with __ and the normal name is an alias.  */
12103 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12104 choke me
12105 #else
12106 f = mdbm_set_chain;
12107 #endif
12108
12109 ; return 0; }
12110 EOF
12111 if { (eval echo configure:12112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12112   rm -rf conftest*
12113   eval "ac_cv_func_mdbm_set_chain=yes"
12114 else
12115   echo "configure: failed program was:" >&5
12116   cat conftest.$ac_ext >&5
12117   rm -rf conftest*
12118   eval "ac_cv_func_mdbm_set_chain=no"
12119 fi
12120 rm -f conftest*
12121 fi
12122
12123 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12124   echo "$ac_t""yes" 1>&6
12125   ol_cv_lib_mdbm=yes
12126 else
12127   echo "$ac_t""no" 1>&6
12128
12129                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12130 echo "configure:12131: checking for mdbm_set_chain in -lmdbm" >&5
12131 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12133   echo $ac_n "(cached) $ac_c" 1>&6
12134 else
12135   ac_save_LIBS="$LIBS"
12136 LIBS="-lmdbm  $LIBS"
12137 cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140 /* Override any gcc2 internal prototype to avoid an error.  */
12141 /* We use char because int might match the return type of a gcc2
12142     builtin and then its argument prototype would still apply.  */
12143 char mdbm_set_chain();
12144
12145 int main() {
12146 mdbm_set_chain()
12147 ; return 0; }
12148 EOF
12149 if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12150   rm -rf conftest*
12151   eval "ac_cv_lib_$ac_lib_var=yes"
12152 else
12153   echo "configure: failed program was:" >&5
12154   cat conftest.$ac_ext >&5
12155   rm -rf conftest*
12156   eval "ac_cv_lib_$ac_lib_var=no"
12157 fi
12158 rm -f conftest*
12159 LIBS="$ac_save_LIBS"
12160
12161 fi
12162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12163   echo "$ac_t""yes" 1>&6
12164   ol_cv_lib_mdbm=-lmdbm
12165 else
12166   echo "$ac_t""no" 1>&6
12167 ol_cv_lib_mdbm=no
12168 fi
12169
12170         
12171 fi
12172
12173         LIBS="$ol_LIBS"
12174
12175 fi
12176
12177 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12178
12179
12180  for ac_hdr in mdbm.h
12181 do
12182 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12183 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12184 echo "configure:12185: checking for $ac_hdr" >&5
12185 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12186   echo $ac_n "(cached) $ac_c" 1>&6
12187 else
12188   cat > conftest.$ac_ext <<EOF
12189 #line 12190 "configure"
12190 #include "confdefs.h"
12191 #include <$ac_hdr>
12192 EOF
12193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12194 { (eval echo configure:12195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12196 if test -z "$ac_err"; then
12197   rm -rf conftest*
12198   eval "ac_cv_header_$ac_safe=yes"
12199 else
12200   echo "$ac_err" >&5
12201   echo "configure: failed program was:" >&5
12202   cat conftest.$ac_ext >&5
12203   rm -rf conftest*
12204   eval "ac_cv_header_$ac_safe=no"
12205 fi
12206 rm -f conftest*
12207 fi
12208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12209   echo "$ac_t""yes" 1>&6
12210     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12211   cat >> confdefs.h <<EOF
12212 #define $ac_tr_hdr 1
12213 EOF
12214  
12215 else
12216   echo "$ac_t""no" 1>&6
12217 fi
12218 done
12219
12220  echo $ac_n "checking for db""... $ac_c" 1>&6
12221 echo "configure:12222: checking for db" >&5
12222 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12223   echo $ac_n "(cached) $ac_c" 1>&6
12224 else
12225   
12226         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12227                 ol_cv_mdbm=no
12228         else
12229                 ol_cv_mdbm=yes
12230         fi
12231
12232 fi
12233
12234 echo "$ac_t""$ol_cv_mdbm" 1>&6
12235  if test $ol_cv_mdbm = yes ; then
12236         cat >> confdefs.h <<\EOF
12237 #define HAVE_MDBM 1
12238 EOF
12239
12240  fi
12241
12242
12243         if test $ol_cv_mdbm = yes ; then
12244                 ol_link_ldbm=mdbm
12245                 ol_with_ldbm_api=mdbm
12246                 if test $ol_cv_lib_mdbm != yes ; then
12247                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12248                 fi
12249         fi
12250 fi
12251
12252 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12253         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12254 echo "configure:12255: checking for GDBM library" >&5
12255 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12256   echo $ac_n "(cached) $ac_c" 1>&6
12257 else
12258         ol_LIBS="$LIBS"
12259         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12260 echo "configure:12261: checking for gdbm_open" >&5
12261 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12262   echo $ac_n "(cached) $ac_c" 1>&6
12263 else
12264   cat > conftest.$ac_ext <<EOF
12265 #line 12266 "configure"
12266 #include "confdefs.h"
12267 /* System header to define __stub macros and hopefully few prototypes,
12268     which can conflict with char gdbm_open(); below.  */
12269 #include <assert.h>
12270 /* Override any gcc2 internal prototype to avoid an error.  */
12271 /* We use char because int might match the return type of a gcc2
12272     builtin and then its argument prototype would still apply.  */
12273 char gdbm_open();
12274 char (*f)();
12275
12276 int main() {
12277
12278 /* The GNU C library defines this for functions which it implements
12279     to always fail with ENOSYS.  Some functions are actually named
12280     something starting with __ and the normal name is an alias.  */
12281 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12282 choke me
12283 #else
12284 f = gdbm_open;
12285 #endif
12286
12287 ; return 0; }
12288 EOF
12289 if { (eval echo configure:12290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12290   rm -rf conftest*
12291   eval "ac_cv_func_gdbm_open=yes"
12292 else
12293   echo "configure: failed program was:" >&5
12294   cat conftest.$ac_ext >&5
12295   rm -rf conftest*
12296   eval "ac_cv_func_gdbm_open=no"
12297 fi
12298 rm -f conftest*
12299 fi
12300
12301 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12302   echo "$ac_t""yes" 1>&6
12303   ol_cv_lib_gdbm=yes
12304 else
12305   echo "$ac_t""no" 1>&6
12306
12307                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12308 echo "configure:12309: checking for gdbm_open in -lgdbm" >&5
12309 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12311   echo $ac_n "(cached) $ac_c" 1>&6
12312 else
12313   ac_save_LIBS="$LIBS"
12314 LIBS="-lgdbm  $LIBS"
12315 cat > conftest.$ac_ext <<EOF
12316 #line 12317 "configure"
12317 #include "confdefs.h"
12318 /* Override any gcc2 internal prototype to avoid an error.  */
12319 /* We use char because int might match the return type of a gcc2
12320     builtin and then its argument prototype would still apply.  */
12321 char gdbm_open();
12322
12323 int main() {
12324 gdbm_open()
12325 ; return 0; }
12326 EOF
12327 if { (eval echo configure:12328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12328   rm -rf conftest*
12329   eval "ac_cv_lib_$ac_lib_var=yes"
12330 else
12331   echo "configure: failed program was:" >&5
12332   cat conftest.$ac_ext >&5
12333   rm -rf conftest*
12334   eval "ac_cv_lib_$ac_lib_var=no"
12335 fi
12336 rm -f conftest*
12337 LIBS="$ac_save_LIBS"
12338
12339 fi
12340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12341   echo "$ac_t""yes" 1>&6
12342   ol_cv_lib_gdbm=-lgdbm
12343 else
12344   echo "$ac_t""no" 1>&6
12345 ol_cv_lib_gdbm=no
12346 fi
12347
12348         
12349 fi
12350
12351         LIBS="$ol_LIBS"
12352
12353 fi
12354
12355 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12356
12357
12358  for ac_hdr in gdbm.h
12359 do
12360 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12361 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12362 echo "configure:12363: checking for $ac_hdr" >&5
12363 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12364   echo $ac_n "(cached) $ac_c" 1>&6
12365 else
12366   cat > conftest.$ac_ext <<EOF
12367 #line 12368 "configure"
12368 #include "confdefs.h"
12369 #include <$ac_hdr>
12370 EOF
12371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12372 { (eval echo configure:12373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12374 if test -z "$ac_err"; then
12375   rm -rf conftest*
12376   eval "ac_cv_header_$ac_safe=yes"
12377 else
12378   echo "$ac_err" >&5
12379   echo "configure: failed program was:" >&5
12380   cat conftest.$ac_ext >&5
12381   rm -rf conftest*
12382   eval "ac_cv_header_$ac_safe=no"
12383 fi
12384 rm -f conftest*
12385 fi
12386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12387   echo "$ac_t""yes" 1>&6
12388     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12389   cat >> confdefs.h <<EOF
12390 #define $ac_tr_hdr 1
12391 EOF
12392  
12393 else
12394   echo "$ac_t""no" 1>&6
12395 fi
12396 done
12397
12398  echo $ac_n "checking for db""... $ac_c" 1>&6
12399 echo "configure:12400: checking for db" >&5
12400 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12401   echo $ac_n "(cached) $ac_c" 1>&6
12402 else
12403   
12404         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12405                 ol_cv_gdbm=no
12406         else
12407                 ol_cv_gdbm=yes
12408         fi
12409
12410 fi
12411
12412 echo "$ac_t""$ol_cv_gdbm" 1>&6
12413  if test $ol_cv_gdbm = yes ; then
12414         cat >> confdefs.h <<\EOF
12415 #define HAVE_GDBM 1
12416 EOF
12417
12418  fi
12419
12420
12421         if test $ol_cv_gdbm = yes ; then
12422                 ol_link_ldbm=gdbm
12423                 ol_with_ldbm_api=gdbm
12424
12425                 if test $ol_cv_lib_gdbm != yes ; then
12426                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12427                 fi
12428         fi
12429 fi
12430
12431 if test $ol_with_ldbm_api = ndbm ; then
12432         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12433 echo "configure:12434: checking for NDBM library" >&5
12434 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12435   echo $ac_n "(cached) $ac_c" 1>&6
12436 else
12437         ol_LIBS="$LIBS"
12438         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12439 echo "configure:12440: checking for dbm_open" >&5
12440 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12441   echo $ac_n "(cached) $ac_c" 1>&6
12442 else
12443   cat > conftest.$ac_ext <<EOF
12444 #line 12445 "configure"
12445 #include "confdefs.h"
12446 /* System header to define __stub macros and hopefully few prototypes,
12447     which can conflict with char dbm_open(); below.  */
12448 #include <assert.h>
12449 /* Override any gcc2 internal prototype to avoid an error.  */
12450 /* We use char because int might match the return type of a gcc2
12451     builtin and then its argument prototype would still apply.  */
12452 char dbm_open();
12453 char (*f)();
12454
12455 int main() {
12456
12457 /* The GNU C library defines this for functions which it implements
12458     to always fail with ENOSYS.  Some functions are actually named
12459     something starting with __ and the normal name is an alias.  */
12460 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12461 choke me
12462 #else
12463 f = dbm_open;
12464 #endif
12465
12466 ; return 0; }
12467 EOF
12468 if { (eval echo configure:12469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12469   rm -rf conftest*
12470   eval "ac_cv_func_dbm_open=yes"
12471 else
12472   echo "configure: failed program was:" >&5
12473   cat conftest.$ac_ext >&5
12474   rm -rf conftest*
12475   eval "ac_cv_func_dbm_open=no"
12476 fi
12477 rm -f conftest*
12478 fi
12479
12480 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12481   echo "$ac_t""yes" 1>&6
12482   ol_cv_lib_ndbm=yes
12483 else
12484   echo "$ac_t""no" 1>&6
12485
12486                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12487 echo "configure:12488: checking for dbm_open in -lndbm" >&5
12488 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12490   echo $ac_n "(cached) $ac_c" 1>&6
12491 else
12492   ac_save_LIBS="$LIBS"
12493 LIBS="-lndbm  $LIBS"
12494 cat > conftest.$ac_ext <<EOF
12495 #line 12496 "configure"
12496 #include "confdefs.h"
12497 /* Override any gcc2 internal prototype to avoid an error.  */
12498 /* We use char because int might match the return type of a gcc2
12499     builtin and then its argument prototype would still apply.  */
12500 char dbm_open();
12501
12502 int main() {
12503 dbm_open()
12504 ; return 0; }
12505 EOF
12506 if { (eval echo configure:12507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12507   rm -rf conftest*
12508   eval "ac_cv_lib_$ac_lib_var=yes"
12509 else
12510   echo "configure: failed program was:" >&5
12511   cat conftest.$ac_ext >&5
12512   rm -rf conftest*
12513   eval "ac_cv_lib_$ac_lib_var=no"
12514 fi
12515 rm -f conftest*
12516 LIBS="$ac_save_LIBS"
12517
12518 fi
12519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12520   echo "$ac_t""yes" 1>&6
12521   ol_cv_lib_ndbm=-lndbm
12522 else
12523   echo "$ac_t""no" 1>&6
12524
12525                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12526 echo "configure:12527: checking for dbm_open in -ldbm" >&5
12527 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12528 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12529   echo $ac_n "(cached) $ac_c" 1>&6
12530 else
12531   ac_save_LIBS="$LIBS"
12532 LIBS="-ldbm  $LIBS"
12533 cat > conftest.$ac_ext <<EOF
12534 #line 12535 "configure"
12535 #include "confdefs.h"
12536 /* Override any gcc2 internal prototype to avoid an error.  */
12537 /* We use char because int might match the return type of a gcc2
12538     builtin and then its argument prototype would still apply.  */
12539 char dbm_open();
12540
12541 int main() {
12542 dbm_open()
12543 ; return 0; }
12544 EOF
12545 if { (eval echo configure:12546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12546   rm -rf conftest*
12547   eval "ac_cv_lib_$ac_lib_var=yes"
12548 else
12549   echo "configure: failed program was:" >&5
12550   cat conftest.$ac_ext >&5
12551   rm -rf conftest*
12552   eval "ac_cv_lib_$ac_lib_var=no"
12553 fi
12554 rm -f conftest*
12555 LIBS="$ac_save_LIBS"
12556
12557 fi
12558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12559   echo "$ac_t""yes" 1>&6
12560   ol_cv_lib_ndbm=-ldbm
12561 else
12562   echo "$ac_t""no" 1>&6
12563 ol_cv_lib_ndbm=no
12564 fi
12565                 
12566 fi
12567
12568         
12569 fi
12570
12571         LIBS="$ol_LIBS"
12572
12573 fi
12574
12575 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12576
12577
12578  for ac_hdr in ndbm.h
12579 do
12580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12582 echo "configure:12583: checking for $ac_hdr" >&5
12583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12584   echo $ac_n "(cached) $ac_c" 1>&6
12585 else
12586   cat > conftest.$ac_ext <<EOF
12587 #line 12588 "configure"
12588 #include "confdefs.h"
12589 #include <$ac_hdr>
12590 EOF
12591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12592 { (eval echo configure:12593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12594 if test -z "$ac_err"; then
12595   rm -rf conftest*
12596   eval "ac_cv_header_$ac_safe=yes"
12597 else
12598   echo "$ac_err" >&5
12599   echo "configure: failed program was:" >&5
12600   cat conftest.$ac_ext >&5
12601   rm -rf conftest*
12602   eval "ac_cv_header_$ac_safe=no"
12603 fi
12604 rm -f conftest*
12605 fi
12606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12607   echo "$ac_t""yes" 1>&6
12608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12609   cat >> confdefs.h <<EOF
12610 #define $ac_tr_hdr 1
12611 EOF
12612  
12613 else
12614   echo "$ac_t""no" 1>&6
12615 fi
12616 done
12617
12618  echo $ac_n "checking for db""... $ac_c" 1>&6
12619 echo "configure:12620: checking for db" >&5
12620 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12621   echo $ac_n "(cached) $ac_c" 1>&6
12622 else
12623   
12624         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12625                 ol_cv_ndbm=no
12626         else
12627                 ol_cv_ndbm=yes
12628         fi
12629
12630 fi
12631
12632 echo "$ac_t""$ol_cv_ndbm" 1>&6
12633  if test $ol_cv_ndbm = yes ; then
12634         cat >> confdefs.h <<\EOF
12635 #define HAVE_NDBM 1
12636 EOF
12637
12638  fi
12639
12640
12641         if test $ol_cv_ndbm = yes ; then
12642                 ol_link_ldbm=ndbm
12643                 ol_with_ldbm_api=ndbm
12644
12645                 if test $ol_cv_lib_ndbm != yes ; then
12646                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12647                 fi
12648         fi
12649 fi
12650
12651 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12652         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12653         if test $ol_enable_ldbm = yes ; then
12654                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12655         fi
12656
12657         echo "configure: warning: disabling LDBM" 1>&2
12658         ol_enable_ldbm=no
12659 fi
12660
12661 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12662         LINK_BINS_DYNAMIC="yes"
12663 else
12664         LINK_BINS_DYNAMIC="no"
12665 fi
12666
12667 if test $ol_enable_wrappers != no ; then
12668         for ac_hdr in tcpd.h
12669 do
12670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12672 echo "configure:12673: checking for $ac_hdr" >&5
12673 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12674   echo $ac_n "(cached) $ac_c" 1>&6
12675 else
12676   cat > conftest.$ac_ext <<EOF
12677 #line 12678 "configure"
12678 #include "confdefs.h"
12679 #include <$ac_hdr>
12680 EOF
12681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12682 { (eval echo configure:12683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12684 if test -z "$ac_err"; then
12685   rm -rf conftest*
12686   eval "ac_cv_header_$ac_safe=yes"
12687 else
12688   echo "$ac_err" >&5
12689   echo "configure: failed program was:" >&5
12690   cat conftest.$ac_ext >&5
12691   rm -rf conftest*
12692   eval "ac_cv_header_$ac_safe=no"
12693 fi
12694 rm -f conftest*
12695 fi
12696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12697   echo "$ac_t""yes" 1>&6
12698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12699   cat >> confdefs.h <<EOF
12700 #define $ac_tr_hdr 1
12701 EOF
12702  
12703 else
12704   echo "$ac_t""no" 1>&6
12705 fi
12706 done
12707
12708
12709         if test $ac_cv_header_tcpd_h != yes ; then
12710                 have_wrappers=no
12711         else
12712                 cat > conftest.$ac_ext <<EOF
12713 #line 12714 "configure"
12714 #include "confdefs.h"
12715
12716 int allow_severity = 0;
12717 int deny_severity  = 0;
12718                 
12719 int main() {
12720 hosts_access()
12721 ; return 0; }
12722 EOF
12723 if { (eval echo configure:12724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12724   rm -rf conftest*
12725   have_wrappers=yes
12726 else
12727   echo "configure: failed program was:" >&5
12728   cat conftest.$ac_ext >&5
12729   rm -rf conftest*
12730   have_wrappers=no
12731 fi
12732 rm -f conftest*
12733         fi
12734
12735         if test $have_wrappers = yes ; then
12736                 cat >> confdefs.h <<\EOF
12737 #define HAVE_TCPD 1
12738 EOF
12739
12740                 WRAP_LIBS="-lwrap"
12741
12742                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12743 echo "configure:12744: checking for main in -lnsl" >&5
12744 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12746   echo $ac_n "(cached) $ac_c" 1>&6
12747 else
12748   ac_save_LIBS="$LIBS"
12749 LIBS="-lnsl  $LIBS"
12750 cat > conftest.$ac_ext <<EOF
12751 #line 12752 "configure"
12752 #include "confdefs.h"
12753
12754 int main() {
12755 main()
12756 ; return 0; }
12757 EOF
12758 if { (eval echo configure:12759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12759   rm -rf conftest*
12760   eval "ac_cv_lib_$ac_lib_var=yes"
12761 else
12762   echo "configure: failed program was:" >&5
12763   cat conftest.$ac_ext >&5
12764   rm -rf conftest*
12765   eval "ac_cv_lib_$ac_lib_var=no"
12766 fi
12767 rm -f conftest*
12768 LIBS="$ac_save_LIBS"
12769
12770 fi
12771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12772   echo "$ac_t""yes" 1>&6
12773     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12774     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12775   cat >> confdefs.h <<EOF
12776 #define $ac_tr_lib 1
12777 EOF
12778
12779   LIBS="-lnsl $LIBS"
12780
12781 else
12782   echo "$ac_t""no" 1>&6
12783 fi
12784
12785         else
12786                 echo "configure: warning: could not find -lwrap" 1>&2
12787                 if test $ol_enable_wrappers = yes ; then
12788                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12789                 fi
12790
12791                 echo "configure: warning: disabling wrappers support" 1>&2
12792                 ol_enable_wrappers=no
12793                 WRAP_LIBS=""
12794         fi
12795 fi
12796
12797 if test $ol_enable_syslog != no ; then
12798         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12799 echo "configure:12800: checking for openlog" >&5
12800 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12801   echo $ac_n "(cached) $ac_c" 1>&6
12802 else
12803   cat > conftest.$ac_ext <<EOF
12804 #line 12805 "configure"
12805 #include "confdefs.h"
12806 /* System header to define __stub macros and hopefully few prototypes,
12807     which can conflict with char openlog(); below.  */
12808 #include <assert.h>
12809 /* Override any gcc2 internal prototype to avoid an error.  */
12810 /* We use char because int might match the return type of a gcc2
12811     builtin and then its argument prototype would still apply.  */
12812 char openlog();
12813 char (*f)();
12814
12815 int main() {
12816
12817 /* The GNU C library defines this for functions which it implements
12818     to always fail with ENOSYS.  Some functions are actually named
12819     something starting with __ and the normal name is an alias.  */
12820 #if defined (__stub_openlog) || defined (__stub___openlog)
12821 choke me
12822 #else
12823 f = openlog;
12824 #endif
12825
12826 ; return 0; }
12827 EOF
12828 if { (eval echo configure:12829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12829   rm -rf conftest*
12830   eval "ac_cv_func_openlog=yes"
12831 else
12832   echo "configure: failed program was:" >&5
12833   cat conftest.$ac_ext >&5
12834   rm -rf conftest*
12835   eval "ac_cv_func_openlog=no"
12836 fi
12837 rm -f conftest*
12838 fi
12839
12840 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12841   echo "$ac_t""yes" 1>&6
12842   :
12843 else
12844   echo "$ac_t""no" 1>&6
12845 fi
12846
12847         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12848                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12849         fi
12850         ol_enable_syslog=$ac_cv_func_openlog
12851 fi
12852
12853 ol_link_termcap=no
12854 for ac_hdr in termcap.h ncurses.h
12855 do
12856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12858 echo "configure:12859: checking for $ac_hdr" >&5
12859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12860   echo $ac_n "(cached) $ac_c" 1>&6
12861 else
12862   cat > conftest.$ac_ext <<EOF
12863 #line 12864 "configure"
12864 #include "confdefs.h"
12865 #include <$ac_hdr>
12866 EOF
12867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12868 { (eval echo configure:12869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12870 if test -z "$ac_err"; then
12871   rm -rf conftest*
12872   eval "ac_cv_header_$ac_safe=yes"
12873 else
12874   echo "$ac_err" >&5
12875   echo "configure: failed program was:" >&5
12876   cat conftest.$ac_ext >&5
12877   rm -rf conftest*
12878   eval "ac_cv_header_$ac_safe=no"
12879 fi
12880 rm -f conftest*
12881 fi
12882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12883   echo "$ac_t""yes" 1>&6
12884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12885   cat >> confdefs.h <<EOF
12886 #define $ac_tr_hdr 1
12887 EOF
12888  
12889 else
12890   echo "$ac_t""no" 1>&6
12891 fi
12892 done
12893
12894
12895 if test $ol_link_termcap = no ; then
12896         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12897 echo "configure:12898: checking for tputs in -ltermcap" >&5
12898 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12900   echo $ac_n "(cached) $ac_c" 1>&6
12901 else
12902   ac_save_LIBS="$LIBS"
12903 LIBS="-ltermcap  $LIBS"
12904 cat > conftest.$ac_ext <<EOF
12905 #line 12906 "configure"
12906 #include "confdefs.h"
12907 /* Override any gcc2 internal prototype to avoid an error.  */
12908 /* We use char because int might match the return type of a gcc2
12909     builtin and then its argument prototype would still apply.  */
12910 char tputs();
12911
12912 int main() {
12913 tputs()
12914 ; return 0; }
12915 EOF
12916 if { (eval echo configure:12917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12917   rm -rf conftest*
12918   eval "ac_cv_lib_$ac_lib_var=yes"
12919 else
12920   echo "configure: failed program was:" >&5
12921   cat conftest.$ac_ext >&5
12922   rm -rf conftest*
12923   eval "ac_cv_lib_$ac_lib_var=no"
12924 fi
12925 rm -f conftest*
12926 LIBS="$ac_save_LIBS"
12927
12928 fi
12929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12930   echo "$ac_t""yes" 1>&6
12931   have_termcap=yes
12932 else
12933   echo "$ac_t""no" 1>&6
12934 have_termcap=no
12935 fi
12936
12937         if test $have_termcap = yes ; then
12938                 cat >> confdefs.h <<\EOF
12939 #define HAVE_TERMCAP 1
12940 EOF
12941
12942                 ol_link_termcap=yes
12943                 TERMCAP_LIBS=-ltermcap
12944         fi
12945 fi
12946
12947 if test $ol_link_termcap = no ; then
12948         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12949 echo "configure:12950: checking for initscr in -lncurses" >&5
12950 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12951 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12952   echo $ac_n "(cached) $ac_c" 1>&6
12953 else
12954   ac_save_LIBS="$LIBS"
12955 LIBS="-lncurses  $LIBS"
12956 cat > conftest.$ac_ext <<EOF
12957 #line 12958 "configure"
12958 #include "confdefs.h"
12959 /* Override any gcc2 internal prototype to avoid an error.  */
12960 /* We use char because int might match the return type of a gcc2
12961     builtin and then its argument prototype would still apply.  */
12962 char initscr();
12963
12964 int main() {
12965 initscr()
12966 ; return 0; }
12967 EOF
12968 if { (eval echo configure:12969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12969   rm -rf conftest*
12970   eval "ac_cv_lib_$ac_lib_var=yes"
12971 else
12972   echo "configure: failed program was:" >&5
12973   cat conftest.$ac_ext >&5
12974   rm -rf conftest*
12975   eval "ac_cv_lib_$ac_lib_var=no"
12976 fi
12977 rm -f conftest*
12978 LIBS="$ac_save_LIBS"
12979
12980 fi
12981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12982   echo "$ac_t""yes" 1>&6
12983   have_ncurses=yes
12984 else
12985   echo "$ac_t""no" 1>&6
12986 have_ncurses=no
12987 fi
12988
12989         if test $have_ncurses = yes ; then
12990                 cat >> confdefs.h <<\EOF
12991 #define HAVE_NCURSES 1
12992 EOF
12993
12994                 ol_link_termcap=yes
12995                 TERMCAP_LIBS=-lncurses
12996         fi
12997 fi
12998
12999 if test $ol_link_termcap = no ; then
13000         cat >> confdefs.h <<\EOF
13001 #define NO_TERMCAP 1
13002 EOF
13003
13004         TERMCAP_LIBS=
13005 fi
13006
13007 ol_link_sasl=no
13008 ol_link_spasswd=no
13009 if test $ol_with_cyrus_sasl != no ; then
13010         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13011 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13012 echo "configure:13013: checking for sasl.h" >&5
13013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13014   echo $ac_n "(cached) $ac_c" 1>&6
13015 else
13016   cat > conftest.$ac_ext <<EOF
13017 #line 13018 "configure"
13018 #include "confdefs.h"
13019 #include <sasl.h>
13020 EOF
13021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13022 { (eval echo configure:13023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13024 if test -z "$ac_err"; then
13025   rm -rf conftest*
13026   eval "ac_cv_header_$ac_safe=yes"
13027 else
13028   echo "$ac_err" >&5
13029   echo "configure: failed program was:" >&5
13030   cat conftest.$ac_ext >&5
13031   rm -rf conftest*
13032   eval "ac_cv_header_$ac_safe=no"
13033 fi
13034 rm -f conftest*
13035 fi
13036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13037   echo "$ac_t""yes" 1>&6
13038   :
13039 else
13040   echo "$ac_t""no" 1>&6
13041 fi
13042
13043
13044         if test $ac_cv_header_sasl_h = yes ; then
13045                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13046 echo "configure:13047: checking for sasl_client_init in -lsasl" >&5
13047 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13049   echo $ac_n "(cached) $ac_c" 1>&6
13050 else
13051   ac_save_LIBS="$LIBS"
13052 LIBS="-lsasl  $LIBS"
13053 cat > conftest.$ac_ext <<EOF
13054 #line 13055 "configure"
13055 #include "confdefs.h"
13056 /* Override any gcc2 internal prototype to avoid an error.  */
13057 /* We use char because int might match the return type of a gcc2
13058     builtin and then its argument prototype would still apply.  */
13059 char sasl_client_init();
13060
13061 int main() {
13062 sasl_client_init()
13063 ; return 0; }
13064 EOF
13065 if { (eval echo configure:13066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13066   rm -rf conftest*
13067   eval "ac_cv_lib_$ac_lib_var=yes"
13068 else
13069   echo "configure: failed program was:" >&5
13070   cat conftest.$ac_ext >&5
13071   rm -rf conftest*
13072   eval "ac_cv_lib_$ac_lib_var=no"
13073 fi
13074 rm -f conftest*
13075 LIBS="$ac_save_LIBS"
13076
13077 fi
13078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13079   echo "$ac_t""yes" 1>&6
13080   have_cyrus_sasl=yes
13081 else
13082   echo "$ac_t""no" 1>&6
13083 have_cyrus_sasl=no
13084 fi
13085
13086
13087                 if test $have_cyrus_sasl != no ; then
13088                         SASL_LIBS="-lsasl"
13089                         cat >> confdefs.h <<\EOF
13090 #define HAVE_CYRUS_SASL 1
13091 EOF
13092
13093                         ol_link_sasl=yes
13094                 fi
13095         fi
13096
13097         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13098                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13099         fi
13100 fi
13101
13102 if test $cross_compiling != yes ; then
13103         dev=no
13104         if test -r /dev/urandom ; then
13105                 dev="/dev/urandom";
13106         elif test -r /idev/urandom ; then
13107                 dev="/idev/urandom";
13108         elif test -r /dev/srandom ; then
13109                 dev="/dev/srandom";
13110         elif test -r /dev/random ; then
13111                 dev="/dev/random";
13112         elif test -r /idev/random ; then
13113                 dev="/idev/random";
13114         fi
13115
13116         if test $dev != no ; then
13117                 cat >> confdefs.h <<EOF
13118 #define URANDOM_DEVICE "$dev"
13119 EOF
13120
13121         fi
13122 fi
13123
13124 ol_link_fetch=no
13125 if test $ol_with_fetch != no ; then
13126         ol_LIBS=$LIBS
13127 LIBS="-lfetch -lcom_err $LIBS"
13128 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13129 echo "configure:13130: checking fetch(3) library" >&5
13130 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13131   echo $ac_n "(cached) $ac_c" 1>&6
13132 else
13133   
13134         cat > conftest.$ac_ext <<EOF
13135 #line 13136 "configure"
13136 #include "confdefs.h"
13137
13138 #include <sys/param.h>
13139 #include <stdio.h>
13140 #include <fetch.h>
13141 int main() {
13142 struct url *u = fetchParseURL("file:///"); 
13143 ; return 0; }
13144 EOF
13145 if { (eval echo configure:13146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13146   rm -rf conftest*
13147   ol_cv_lib_fetch=yes
13148 else
13149   echo "configure: failed program was:" >&5
13150   cat conftest.$ac_ext >&5
13151   rm -rf conftest*
13152   ol_cv_lib_fetch=no
13153 fi
13154 rm -f conftest*
13155 fi
13156
13157 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13158 LIBS=$ol_LIBS
13159 if test $ol_cv_lib_fetch != no ; then
13160         ol_link_fetch="-lfetch -lcom_err"
13161         cat >> confdefs.h <<\EOF
13162 #define HAVE_FETCH 1
13163 EOF
13164
13165 fi
13166
13167
13168         if test $ol_cv_lib_fetch != no ; then
13169                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13170                 ol_link_fetch=freebsd
13171
13172         elif test $ol_with_fetch != auto ; then
13173                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13174         fi 
13175 fi
13176
13177 ol_link_readline=no
13178 if test $ol_with_readline != no ; then
13179         for ac_hdr in readline/readline.h readline/history.h
13180 do
13181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13183 echo "configure:13184: checking for $ac_hdr" >&5
13184 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13185   echo $ac_n "(cached) $ac_c" 1>&6
13186 else
13187   cat > conftest.$ac_ext <<EOF
13188 #line 13189 "configure"
13189 #include "confdefs.h"
13190 #include <$ac_hdr>
13191 EOF
13192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13193 { (eval echo configure:13194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13195 if test -z "$ac_err"; then
13196   rm -rf conftest*
13197   eval "ac_cv_header_$ac_safe=yes"
13198 else
13199   echo "$ac_err" >&5
13200   echo "configure: failed program was:" >&5
13201   cat conftest.$ac_ext >&5
13202   rm -rf conftest*
13203   eval "ac_cv_header_$ac_safe=no"
13204 fi
13205 rm -f conftest*
13206 fi
13207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13208   echo "$ac_t""yes" 1>&6
13209     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13210   cat >> confdefs.h <<EOF
13211 #define $ac_tr_hdr 1
13212 EOF
13213  
13214 else
13215   echo "$ac_t""no" 1>&6
13216 fi
13217 done
13218
13219
13220         if test $ac_cv_header_readline_readline_h = yes ; then
13221                 save_LIBS="$LIBS"
13222                 LIBS="$TERMCAP_LIBS $LIBS"
13223                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13224 echo "configure:13225: checking for readline in -lreadline" >&5
13225 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13226 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13227   echo $ac_n "(cached) $ac_c" 1>&6
13228 else
13229   ac_save_LIBS="$LIBS"
13230 LIBS="-lreadline  $LIBS"
13231 cat > conftest.$ac_ext <<EOF
13232 #line 13233 "configure"
13233 #include "confdefs.h"
13234 /* Override any gcc2 internal prototype to avoid an error.  */
13235 /* We use char because int might match the return type of a gcc2
13236     builtin and then its argument prototype would still apply.  */
13237 char readline();
13238
13239 int main() {
13240 readline()
13241 ; return 0; }
13242 EOF
13243 if { (eval echo configure:13244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13244   rm -rf conftest*
13245   eval "ac_cv_lib_$ac_lib_var=yes"
13246 else
13247   echo "configure: failed program was:" >&5
13248   cat conftest.$ac_ext >&5
13249   rm -rf conftest*
13250   eval "ac_cv_lib_$ac_lib_var=no"
13251 fi
13252 rm -f conftest*
13253 LIBS="$ac_save_LIBS"
13254
13255 fi
13256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13257   echo "$ac_t""yes" 1>&6
13258   have_readline=yes
13259 else
13260   echo "$ac_t""no" 1>&6
13261 have_readline=no
13262 fi
13263
13264                 LIBS="$save_LIBS"
13265                         
13266                 if test $have_readline = yes ; then
13267                         ol_with_readline=found
13268                         ol_link_readline=yes
13269
13270                         READLINE_LIBS="-lreadline"
13271                 fi
13272         fi
13273 fi
13274
13275 if test $ol_link_readline = yes ; then
13276         cat >> confdefs.h <<\EOF
13277 #define HAVE_READLINE 1
13278 EOF
13279
13280 fi
13281
13282
13283 if test $ol_enable_crypt != no ; then
13284         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13285 echo "configure:13286: checking for crypt" >&5
13286 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13287   echo $ac_n "(cached) $ac_c" 1>&6
13288 else
13289   cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292 /* System header to define __stub macros and hopefully few prototypes,
13293     which can conflict with char crypt(); below.  */
13294 #include <assert.h>
13295 /* Override any gcc2 internal prototype to avoid an error.  */
13296 /* We use char because int might match the return type of a gcc2
13297     builtin and then its argument prototype would still apply.  */
13298 char crypt();
13299 char (*f)();
13300
13301 int main() {
13302
13303 /* The GNU C library defines this for functions which it implements
13304     to always fail with ENOSYS.  Some functions are actually named
13305     something starting with __ and the normal name is an alias.  */
13306 #if defined (__stub_crypt) || defined (__stub___crypt)
13307 choke me
13308 #else
13309 f = crypt;
13310 #endif
13311
13312 ; return 0; }
13313 EOF
13314 if { (eval echo configure:13315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13315   rm -rf conftest*
13316   eval "ac_cv_func_crypt=yes"
13317 else
13318   echo "configure: failed program was:" >&5
13319   cat conftest.$ac_ext >&5
13320   rm -rf conftest*
13321   eval "ac_cv_func_crypt=no"
13322 fi
13323 rm -f conftest*
13324 fi
13325
13326 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13327   echo "$ac_t""yes" 1>&6
13328   have_crypt=yes
13329 else
13330   echo "$ac_t""no" 1>&6
13331
13332                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13333 echo "configure:13334: checking for crypt in -lcrypt" >&5
13334 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13336   echo $ac_n "(cached) $ac_c" 1>&6
13337 else
13338   ac_save_LIBS="$LIBS"
13339 LIBS="-lcrypt  $LIBS"
13340 cat > conftest.$ac_ext <<EOF
13341 #line 13342 "configure"
13342 #include "confdefs.h"
13343 /* Override any gcc2 internal prototype to avoid an error.  */
13344 /* We use char because int might match the return type of a gcc2
13345     builtin and then its argument prototype would still apply.  */
13346 char crypt();
13347
13348 int main() {
13349 crypt()
13350 ; return 0; }
13351 EOF
13352 if { (eval echo configure:13353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13353   rm -rf conftest*
13354   eval "ac_cv_lib_$ac_lib_var=yes"
13355 else
13356   echo "configure: failed program was:" >&5
13357   cat conftest.$ac_ext >&5
13358   rm -rf conftest*
13359   eval "ac_cv_lib_$ac_lib_var=no"
13360 fi
13361 rm -f conftest*
13362 LIBS="$ac_save_LIBS"
13363
13364 fi
13365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13366   echo "$ac_t""yes" 1>&6
13367   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13368                         have_crypt=yes
13369 else
13370   echo "$ac_t""no" 1>&6
13371 have_crypt=no
13372 fi
13373
13374 fi
13375
13376
13377         if test $have_crypt = yes ; then
13378                 cat >> confdefs.h <<\EOF
13379 #define HAVE_CRYPT 1
13380 EOF
13381
13382         else
13383                 echo "configure: warning: could not find crypt" 1>&2
13384                 if test $ol_enable_crypt = yes ; then
13385                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13386                 fi
13387
13388                 echo "configure: warning: disabling crypt support" 1>&2
13389                 ol_enable_crypt=no
13390         fi
13391 fi
13392
13393 if test $ol_enable_proctitle != no ; then
13394         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13395 echo "configure:13396: checking for setproctitle" >&5
13396 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13397   echo $ac_n "(cached) $ac_c" 1>&6
13398 else
13399   cat > conftest.$ac_ext <<EOF
13400 #line 13401 "configure"
13401 #include "confdefs.h"
13402 /* System header to define __stub macros and hopefully few prototypes,
13403     which can conflict with char setproctitle(); below.  */
13404 #include <assert.h>
13405 /* Override any gcc2 internal prototype to avoid an error.  */
13406 /* We use char because int might match the return type of a gcc2
13407     builtin and then its argument prototype would still apply.  */
13408 char setproctitle();
13409 char (*f)();
13410
13411 int main() {
13412
13413 /* The GNU C library defines this for functions which it implements
13414     to always fail with ENOSYS.  Some functions are actually named
13415     something starting with __ and the normal name is an alias.  */
13416 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13417 choke me
13418 #else
13419 f = setproctitle;
13420 #endif
13421
13422 ; return 0; }
13423 EOF
13424 if { (eval echo configure:13425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13425   rm -rf conftest*
13426   eval "ac_cv_func_setproctitle=yes"
13427 else
13428   echo "configure: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   rm -rf conftest*
13431   eval "ac_cv_func_setproctitle=no"
13432 fi
13433 rm -f conftest*
13434 fi
13435
13436 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13437   echo "$ac_t""yes" 1>&6
13438   have_setproctitle=yes
13439 else
13440   echo "$ac_t""no" 1>&6
13441
13442                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13443 echo "configure:13444: checking for setproctitle in -lutil" >&5
13444 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13445 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13446   echo $ac_n "(cached) $ac_c" 1>&6
13447 else
13448   ac_save_LIBS="$LIBS"
13449 LIBS="-lutil  $LIBS"
13450 cat > conftest.$ac_ext <<EOF
13451 #line 13452 "configure"
13452 #include "confdefs.h"
13453 /* Override any gcc2 internal prototype to avoid an error.  */
13454 /* We use char because int might match the return type of a gcc2
13455     builtin and then its argument prototype would still apply.  */
13456 char setproctitle();
13457
13458 int main() {
13459 setproctitle()
13460 ; return 0; }
13461 EOF
13462 if { (eval echo configure:13463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13463   rm -rf conftest*
13464   eval "ac_cv_lib_$ac_lib_var=yes"
13465 else
13466   echo "configure: failed program was:" >&5
13467   cat conftest.$ac_ext >&5
13468   rm -rf conftest*
13469   eval "ac_cv_lib_$ac_lib_var=no"
13470 fi
13471 rm -f conftest*
13472 LIBS="$ac_save_LIBS"
13473
13474 fi
13475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13476   echo "$ac_t""yes" 1>&6
13477   have_setproctitle=yes
13478                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13479 else
13480   echo "$ac_t""no" 1>&6
13481 have_setproctitle=no
13482                         LIBOBJS="$LIBOBJS setproctitle.o"
13483                         LIBSRCS="$LIBSRCS setproctitle.c"
13484 fi
13485
13486 fi
13487
13488
13489         if test $have_setproctitle = yes ; then
13490                 cat >> confdefs.h <<\EOF
13491 #define HAVE_SETPROCTITLE 1
13492 EOF
13493
13494         fi
13495 fi
13496
13497 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13498 echo "configure:13499: checking for ANSI C header files" >&5
13499 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13500   echo $ac_n "(cached) $ac_c" 1>&6
13501 else
13502   cat > conftest.$ac_ext <<EOF
13503 #line 13504 "configure"
13504 #include "confdefs.h"
13505 #include <stdlib.h>
13506 #include <stdarg.h>
13507 #include <string.h>
13508 #include <float.h>
13509 EOF
13510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13511 { (eval echo configure:13512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13513 if test -z "$ac_err"; then
13514   rm -rf conftest*
13515   ac_cv_header_stdc=yes
13516 else
13517   echo "$ac_err" >&5
13518   echo "configure: failed program was:" >&5
13519   cat conftest.$ac_ext >&5
13520   rm -rf conftest*
13521   ac_cv_header_stdc=no
13522 fi
13523 rm -f conftest*
13524
13525 if test $ac_cv_header_stdc = yes; then
13526   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13527 cat > conftest.$ac_ext <<EOF
13528 #line 13529 "configure"
13529 #include "confdefs.h"
13530 #include <string.h>
13531 EOF
13532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13533   egrep "memchr" >/dev/null 2>&1; then
13534   :
13535 else
13536   rm -rf conftest*
13537   ac_cv_header_stdc=no
13538 fi
13539 rm -f conftest*
13540
13541 fi
13542
13543 if test $ac_cv_header_stdc = yes; then
13544   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13545 cat > conftest.$ac_ext <<EOF
13546 #line 13547 "configure"
13547 #include "confdefs.h"
13548 #include <stdlib.h>
13549 EOF
13550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13551   egrep "free" >/dev/null 2>&1; then
13552   :
13553 else
13554   rm -rf conftest*
13555   ac_cv_header_stdc=no
13556 fi
13557 rm -f conftest*
13558
13559 fi
13560
13561 if test $ac_cv_header_stdc = yes; then
13562   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13563 if test "$cross_compiling" = yes; then
13564   :
13565 else
13566   cat > conftest.$ac_ext <<EOF
13567 #line 13568 "configure"
13568 #include "confdefs.h"
13569 #include <ctype.h>
13570 #if ((' ' & 0x0FF) == 0x020)
13571 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13572 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13573 #else
13574 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13575  || ('j' <= (c) && (c) <= 'r') \
13576  || ('s' <= (c) && (c) <= 'z'))
13577 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13578 #endif
13579 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13580 int main () { int i; for (i = 0; i < 256; i++)
13581 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13582 exit (0); }
13583
13584 EOF
13585 if { (eval echo configure:13586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13586 then
13587   :
13588 else
13589   echo "configure: failed program was:" >&5
13590   cat conftest.$ac_ext >&5
13591   rm -fr conftest*
13592   ac_cv_header_stdc=no
13593 fi
13594 rm -fr conftest*
13595 fi
13596
13597 fi
13598 fi
13599
13600 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13601 if test $ac_cv_header_stdc = yes; then
13602   cat >> confdefs.h <<\EOF
13603 #define STDC_HEADERS 1
13604 EOF
13605
13606 fi
13607
13608 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13609 echo "configure:13610: checking for mode_t" >&5
13610 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13611   echo $ac_n "(cached) $ac_c" 1>&6
13612 else
13613   cat > conftest.$ac_ext <<EOF
13614 #line 13615 "configure"
13615 #include "confdefs.h"
13616 #include <sys/types.h>
13617 #if STDC_HEADERS
13618 #include <stdlib.h>
13619 #include <stddef.h>
13620 #endif
13621
13622 EOF
13623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13624   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13625   rm -rf conftest*
13626   eval "ac_cv_type_mode_t=yes"
13627 else
13628   rm -rf conftest*
13629   eval "ac_cv_type_mode_t=no"
13630 fi
13631 rm -f conftest*
13632
13633 fi
13634 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13635   echo "$ac_t""yes" 1>&6
13636 else
13637   echo "$ac_t""no" 1>&6
13638   cat >> confdefs.h <<EOF
13639 #define mode_t int
13640 EOF
13641
13642 fi
13643
13644 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13645 echo "configure:13646: checking for off_t" >&5
13646 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13647   echo $ac_n "(cached) $ac_c" 1>&6
13648 else
13649   cat > conftest.$ac_ext <<EOF
13650 #line 13651 "configure"
13651 #include "confdefs.h"
13652 #include <sys/types.h>
13653 #if STDC_HEADERS
13654 #include <stdlib.h>
13655 #include <stddef.h>
13656 #endif
13657
13658 EOF
13659 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13660   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13661   rm -rf conftest*
13662   eval "ac_cv_type_off_t=yes"
13663 else
13664   rm -rf conftest*
13665   eval "ac_cv_type_off_t=no"
13666 fi
13667 rm -f conftest*
13668
13669 fi
13670 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13671   echo "$ac_t""yes" 1>&6
13672 else
13673   echo "$ac_t""no" 1>&6
13674   cat >> confdefs.h <<EOF
13675 #define off_t long
13676 EOF
13677
13678 fi
13679
13680 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13681 echo "configure:13682: checking for pid_t" >&5
13682 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13683   echo $ac_n "(cached) $ac_c" 1>&6
13684 else
13685   cat > conftest.$ac_ext <<EOF
13686 #line 13687 "configure"
13687 #include "confdefs.h"
13688 #include <sys/types.h>
13689 #if STDC_HEADERS
13690 #include <stdlib.h>
13691 #include <stddef.h>
13692 #endif
13693
13694 EOF
13695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13696   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13697   rm -rf conftest*
13698   eval "ac_cv_type_pid_t=yes"
13699 else
13700   rm -rf conftest*
13701   eval "ac_cv_type_pid_t=no"
13702 fi
13703 rm -f conftest*
13704
13705 fi
13706 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13707   echo "$ac_t""yes" 1>&6
13708 else
13709   echo "$ac_t""no" 1>&6
13710   cat >> confdefs.h <<EOF
13711 #define pid_t int
13712 EOF
13713
13714 fi
13715
13716 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13717 echo "configure:13718: checking for ptrdiff_t" >&5
13718 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13719   echo $ac_n "(cached) $ac_c" 1>&6
13720 else
13721   cat > conftest.$ac_ext <<EOF
13722 #line 13723 "configure"
13723 #include "confdefs.h"
13724 #include <stddef.h>
13725 int main() {
13726 ptrdiff_t p
13727 ; return 0; }
13728 EOF
13729 if { (eval echo configure:13730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13730   rm -rf conftest*
13731   am_cv_type_ptrdiff_t=yes
13732 else
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -rf conftest*
13736   am_cv_type_ptrdiff_t=no
13737 fi
13738 rm -f conftest*
13739 fi
13740
13741 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13742    if test $am_cv_type_ptrdiff_t = yes; then
13743      cat >> confdefs.h <<\EOF
13744 #define HAVE_PTRDIFF_T 1
13745 EOF
13746
13747    fi
13748
13749 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13750 echo "configure:13751: checking return type of signal handlers" >&5
13751 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13752   echo $ac_n "(cached) $ac_c" 1>&6
13753 else
13754   cat > conftest.$ac_ext <<EOF
13755 #line 13756 "configure"
13756 #include "confdefs.h"
13757 #include <sys/types.h>
13758 #include <signal.h>
13759 #ifdef signal
13760 #undef signal
13761 #endif
13762 #ifdef __cplusplus
13763 extern "C" void (*signal (int, void (*)(int)))(int);
13764 #else
13765 void (*signal ()) ();
13766 #endif
13767
13768 int main() {
13769 int i;
13770 ; return 0; }
13771 EOF
13772 if { (eval echo configure:13773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13773   rm -rf conftest*
13774   ac_cv_type_signal=void
13775 else
13776   echo "configure: failed program was:" >&5
13777   cat conftest.$ac_ext >&5
13778   rm -rf conftest*
13779   ac_cv_type_signal=int
13780 fi
13781 rm -f conftest*
13782 fi
13783
13784 echo "$ac_t""$ac_cv_type_signal" 1>&6
13785 cat >> confdefs.h <<EOF
13786 #define RETSIGTYPE $ac_cv_type_signal
13787 EOF
13788
13789
13790 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13791 echo "configure:13792: checking for size_t" >&5
13792 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13793   echo $ac_n "(cached) $ac_c" 1>&6
13794 else
13795   cat > conftest.$ac_ext <<EOF
13796 #line 13797 "configure"
13797 #include "confdefs.h"
13798 #include <sys/types.h>
13799 #if STDC_HEADERS
13800 #include <stdlib.h>
13801 #include <stddef.h>
13802 #endif
13803
13804 EOF
13805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13806   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13807   rm -rf conftest*
13808   eval "ac_cv_type_size_t=yes"
13809 else
13810   rm -rf conftest*
13811   eval "ac_cv_type_size_t=no"
13812 fi
13813 rm -f conftest*
13814
13815 fi
13816 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13817   echo "$ac_t""yes" 1>&6
13818 else
13819   echo "$ac_t""no" 1>&6
13820   cat >> confdefs.h <<EOF
13821 #define size_t unsigned
13822 EOF
13823
13824 fi
13825
13826
13827 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13828 echo "configure:13829: checking for ssize_t" >&5
13829 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13830   echo $ac_n "(cached) $ac_c" 1>&6
13831 else
13832   cat > conftest.$ac_ext <<EOF
13833 #line 13834 "configure"
13834 #include "confdefs.h"
13835 #include <sys/types.h>
13836 #if STDC_HEADERS
13837 #include <stdlib.h>
13838 #include <stddef.h>
13839 #endif
13840
13841 EOF
13842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13843   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13844   rm -rf conftest*
13845   eval "ac_cv_type_ssize_t=yes"
13846 else
13847   rm -rf conftest*
13848   eval "ac_cv_type_ssize_t=no"
13849 fi
13850 rm -f conftest*
13851
13852 fi
13853 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13854   echo "$ac_t""yes" 1>&6
13855 else
13856   echo "$ac_t""no" 1>&6
13857   cat >> confdefs.h <<EOF
13858 #define ssize_t signed int
13859 EOF
13860
13861 fi
13862
13863 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13864 echo "configure:13865: checking for caddr_t" >&5
13865 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13866   echo $ac_n "(cached) $ac_c" 1>&6
13867 else
13868   cat > conftest.$ac_ext <<EOF
13869 #line 13870 "configure"
13870 #include "confdefs.h"
13871 #include <sys/types.h>
13872 #if STDC_HEADERS
13873 #include <stdlib.h>
13874 #include <stddef.h>
13875 #endif
13876
13877 EOF
13878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13879   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13880   rm -rf conftest*
13881   eval "ac_cv_type_caddr_t=yes"
13882 else
13883   rm -rf conftest*
13884   eval "ac_cv_type_caddr_t=no"
13885 fi
13886 rm -f conftest*
13887
13888 fi
13889 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13890   echo "$ac_t""yes" 1>&6
13891 else
13892   echo "$ac_t""no" 1>&6
13893   cat >> confdefs.h <<EOF
13894 #define caddr_t char *
13895 EOF
13896
13897 fi
13898
13899
13900 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13901 echo "configure:13902: checking for socklen_t" >&5
13902 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13903   echo $ac_n "(cached) $ac_c" 1>&6
13904 else
13905   cat > conftest.$ac_ext <<EOF
13906 #line 13907 "configure"
13907 #include "confdefs.h"
13908
13909 #ifdef HAVE_SYS_TYPES_H
13910 #include <sys/types.h>
13911 #endif
13912 #ifdef HAVE_SYS_SOCKET_H
13913 #include <sys/socket.h>
13914 #endif
13915
13916 int main() {
13917 socklen_t len;
13918 ; return 0; }
13919 EOF
13920 if { (eval echo configure:13921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13921   rm -rf conftest*
13922   ol_cv_type_socklen_t=yes
13923 else
13924   echo "configure: failed program was:" >&5
13925   cat conftest.$ac_ext >&5
13926   rm -rf conftest*
13927   ol_cv_type_socklen_t=no
13928 fi
13929 rm -f conftest*
13930 fi
13931
13932 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13933   if test $ol_cv_type_socklen_t = no; then
13934     cat >> confdefs.h <<\EOF
13935 #define socklen_t int
13936 EOF
13937
13938   fi
13939  
13940 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13941 echo "configure:13942: checking for member st_blksize in aggregate type struct stat" >&5
13942 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13943   echo $ac_n "(cached) $ac_c" 1>&6
13944 else
13945   cat > conftest.$ac_ext <<EOF
13946 #line 13947 "configure"
13947 #include "confdefs.h"
13948 #include <sys/types.h>
13949 #include <sys/stat.h>
13950 int main() {
13951 struct stat foo; foo.st_blksize;
13952 ; return 0; }
13953 EOF
13954 if { (eval echo configure:13955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13955   rm -rf conftest*
13956   ac_cv_c_struct_member_st_blksize=yes
13957 else
13958   echo "configure: failed program was:" >&5
13959   cat conftest.$ac_ext >&5
13960   rm -rf conftest*
13961   ac_cv_c_struct_member_st_blksize=no
13962 fi
13963 rm -f conftest*
13964 fi
13965
13966 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13967 st_blksize="$ac_cv_c_struct_member_st_blksize"
13968 if test $ac_cv_c_struct_member_st_blksize = yes; then
13969   cat >> confdefs.h <<\EOF
13970 #define HAVE_ST_BLKSIZE 1
13971 EOF
13972
13973 fi
13974
13975 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13976 echo "configure:13977: checking whether time.h and sys/time.h may both be included" >&5
13977 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13978   echo $ac_n "(cached) $ac_c" 1>&6
13979 else
13980   cat > conftest.$ac_ext <<EOF
13981 #line 13982 "configure"
13982 #include "confdefs.h"
13983 #include <sys/types.h>
13984 #include <sys/time.h>
13985 #include <time.h>
13986 int main() {
13987 struct tm *tp;
13988 ; return 0; }
13989 EOF
13990 if { (eval echo configure:13991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13991   rm -rf conftest*
13992   ac_cv_header_time=yes
13993 else
13994   echo "configure: failed program was:" >&5
13995   cat conftest.$ac_ext >&5
13996   rm -rf conftest*
13997   ac_cv_header_time=no
13998 fi
13999 rm -f conftest*
14000 fi
14001
14002 echo "$ac_t""$ac_cv_header_time" 1>&6
14003 if test $ac_cv_header_time = yes; then
14004   cat >> confdefs.h <<\EOF
14005 #define TIME_WITH_SYS_TIME 1
14006 EOF
14007
14008 fi
14009
14010 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14011 echo "configure:14012: checking whether struct tm is in sys/time.h or time.h" >&5
14012 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14013   echo $ac_n "(cached) $ac_c" 1>&6
14014 else
14015   cat > conftest.$ac_ext <<EOF
14016 #line 14017 "configure"
14017 #include "confdefs.h"
14018 #include <sys/types.h>
14019 #include <time.h>
14020 int main() {
14021 struct tm *tp; tp->tm_sec;
14022 ; return 0; }
14023 EOF
14024 if { (eval echo configure:14025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14025   rm -rf conftest*
14026   ac_cv_struct_tm=time.h
14027 else
14028   echo "configure: failed program was:" >&5
14029   cat conftest.$ac_ext >&5
14030   rm -rf conftest*
14031   ac_cv_struct_tm=sys/time.h
14032 fi
14033 rm -f conftest*
14034 fi
14035
14036 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14037 if test $ac_cv_struct_tm = sys/time.h; then
14038   cat >> confdefs.h <<\EOF
14039 #define TM_IN_SYS_TIME 1
14040 EOF
14041
14042 fi
14043
14044 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14045 echo "configure:14046: checking for uid_t in sys/types.h" >&5
14046 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14047   echo $ac_n "(cached) $ac_c" 1>&6
14048 else
14049   cat > conftest.$ac_ext <<EOF
14050 #line 14051 "configure"
14051 #include "confdefs.h"
14052 #include <sys/types.h>
14053 EOF
14054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14055   egrep "uid_t" >/dev/null 2>&1; then
14056   rm -rf conftest*
14057   ac_cv_type_uid_t=yes
14058 else
14059   rm -rf conftest*
14060   ac_cv_type_uid_t=no
14061 fi
14062 rm -f conftest*
14063
14064 fi
14065
14066 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14067 if test $ac_cv_type_uid_t = no; then
14068   cat >> confdefs.h <<\EOF
14069 #define uid_t int
14070 EOF
14071
14072   cat >> confdefs.h <<\EOF
14073 #define gid_t int
14074 EOF
14075
14076 fi
14077
14078 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14079 echo "configure:14080: checking for sig_atomic_t" >&5
14080 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14081   echo $ac_n "(cached) $ac_c" 1>&6
14082 else
14083   cat > conftest.$ac_ext <<EOF
14084 #line 14085 "configure"
14085 #include "confdefs.h"
14086 #include <signal.h>
14087 int main() {
14088 sig_atomic_t atomic;
14089 ; return 0; }
14090 EOF
14091 if { (eval echo configure:14092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14092   rm -rf conftest*
14093   ol_cv_type_sig_atomic_t=yes
14094 else
14095   echo "configure: failed program was:" >&5
14096   cat conftest.$ac_ext >&5
14097   rm -rf conftest*
14098   ol_cv_type_sig_atomic_t=no
14099 fi
14100 rm -f conftest*
14101 fi
14102
14103 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14104   if test $ol_cv_type_sig_atomic_t = no; then
14105     cat >> confdefs.h <<\EOF
14106 #define sig_atomic_t int
14107 EOF
14108
14109   fi
14110  
14111
14112
14113 # test for pw_gecos in struct passwd
14114 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14115 echo "configure:14116: checking struct passwd for pw_gecos" >&5
14116 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14117   echo $ac_n "(cached) $ac_c" 1>&6
14118 else
14119   
14120         cat > conftest.$ac_ext <<EOF
14121 #line 14122 "configure"
14122 #include "confdefs.h"
14123 #include <pwd.h>
14124 int main() {
14125
14126         struct passwd pwd;
14127         pwd.pw_gecos = pwd.pw_name;
14128
14129 ; return 0; }
14130 EOF
14131 if { (eval echo configure:14132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14132   rm -rf conftest*
14133   ol_cv_struct_passwd_pw_gecos=yes
14134 else
14135   echo "configure: failed program was:" >&5
14136   cat conftest.$ac_ext >&5
14137   rm -rf conftest*
14138   ol_cv_struct_passwd_pw_gecos=no
14139 fi
14140 rm -f conftest*
14141 fi
14142
14143 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14144 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14145         cat >> confdefs.h <<\EOF
14146 #define HAVE_PW_GECOS 1
14147 EOF
14148
14149 fi
14150
14151 # test for pw_passwd in struct passwd
14152 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14153 echo "configure:14154: checking struct passwd for pw_passwd" >&5
14154 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14155   echo $ac_n "(cached) $ac_c" 1>&6
14156 else
14157   
14158         cat > conftest.$ac_ext <<EOF
14159 #line 14160 "configure"
14160 #include "confdefs.h"
14161 #include <pwd.h>
14162 int main() {
14163
14164         struct passwd pwd;
14165         pwd.pw_passwd = pwd.pw_name;
14166
14167 ; return 0; }
14168 EOF
14169 if { (eval echo configure:14170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14170   rm -rf conftest*
14171   ol_cv_struct_passwd_pw_passwd=yes
14172 else
14173   echo "configure: failed program was:" >&5
14174   cat conftest.$ac_ext >&5
14175   rm -rf conftest*
14176   ol_cv_struct_passwd_pw_passwd=no
14177 fi
14178 rm -f conftest*
14179 fi
14180
14181 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14182 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14183         cat >> confdefs.h <<\EOF
14184 #define HAVE_PW_PASSWD 1
14185 EOF
14186
14187 fi
14188
14189
14190 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14191 echo "configure:14192: checking if toupper() requires islower()" >&5
14192 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14193   echo $ac_n "(cached) $ac_c" 1>&6
14194 else
14195   
14196         if test "$cross_compiling" = yes; then
14197   ol_cv_c_upper_lower=safe
14198 else
14199   cat > conftest.$ac_ext <<EOF
14200 #line 14201 "configure"
14201 #include "confdefs.h"
14202
14203 #include <ctype.h>
14204 main()
14205 {
14206         if ('C' == toupper('C'))
14207                 exit(0);
14208         else
14209                 exit(1);
14210 }
14211 EOF
14212 if { (eval echo configure:14213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14213 then
14214   ol_cv_c_upper_lower=no
14215 else
14216   echo "configure: failed program was:" >&5
14217   cat conftest.$ac_ext >&5
14218   rm -fr conftest*
14219   ol_cv_c_upper_lower=yes
14220 fi
14221 rm -fr conftest*
14222 fi
14223
14224 fi
14225
14226 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14227 if test $ol_cv_c_upper_lower != no ; then
14228         cat >> confdefs.h <<\EOF
14229 #define C_UPPER_LOWER 1
14230 EOF
14231
14232 fi
14233
14234 echo $ac_n "checking for working const""... $ac_c" 1>&6
14235 echo "configure:14236: checking for working const" >&5
14236 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14237   echo $ac_n "(cached) $ac_c" 1>&6
14238 else
14239   cat > conftest.$ac_ext <<EOF
14240 #line 14241 "configure"
14241 #include "confdefs.h"
14242
14243 int main() {
14244
14245 /* Ultrix mips cc rejects this.  */
14246 typedef int charset[2]; const charset x;
14247 /* SunOS 4.1.1 cc rejects this.  */
14248 char const *const *ccp;
14249 char **p;
14250 /* NEC SVR4.0.2 mips cc rejects this.  */
14251 struct point {int x, y;};
14252 static struct point const zero = {0,0};
14253 /* AIX XL C 1.02.0.0 rejects this.
14254    It does not let you subtract one const X* pointer from another in an arm
14255    of an if-expression whose if-part is not a constant expression */
14256 const char *g = "string";
14257 ccp = &g + (g ? g-g : 0);
14258 /* HPUX 7.0 cc rejects these. */
14259 ++ccp;
14260 p = (char**) ccp;
14261 ccp = (char const *const *) p;
14262 { /* SCO 3.2v4 cc rejects this.  */
14263   char *t;
14264   char const *s = 0 ? (char *) 0 : (char const *) 0;
14265
14266   *t++ = 0;
14267 }
14268 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14269   int x[] = {25, 17};
14270   const int *foo = &x[0];
14271   ++foo;
14272 }
14273 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14274   typedef const int *iptr;
14275   iptr p = 0;
14276   ++p;
14277 }
14278 { /* AIX XL C 1.02.0.0 rejects this saying
14279      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14280   struct s { int j; const int *ap[3]; };
14281   struct s *b; b->j = 5;
14282 }
14283 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14284   const int foo = 10;
14285 }
14286
14287 ; return 0; }
14288 EOF
14289 if { (eval echo configure:14290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14290   rm -rf conftest*
14291   ac_cv_c_const=yes
14292 else
14293   echo "configure: failed program was:" >&5
14294   cat conftest.$ac_ext >&5
14295   rm -rf conftest*
14296   ac_cv_c_const=no
14297 fi
14298 rm -f conftest*
14299 fi
14300
14301 echo "$ac_t""$ac_cv_c_const" 1>&6
14302 if test $ac_cv_c_const = no; then
14303   cat >> confdefs.h <<\EOF
14304 #define const 
14305 EOF
14306
14307 fi
14308
14309 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14310 echo "configure:14311: checking if compiler understands volatile" >&5
14311 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14312   echo $ac_n "(cached) $ac_c" 1>&6
14313 else
14314   cat > conftest.$ac_ext <<EOF
14315 #line 14316 "configure"
14316 #include "confdefs.h"
14317 int x, y, z;
14318 int main() {
14319 volatile int a; int * volatile b = x ? &y : &z;
14320       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14321       *b = 0;
14322 ; return 0; }
14323 EOF
14324 if { (eval echo configure:14325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14325   rm -rf conftest*
14326   ol_cv_c_volatile=yes
14327 else
14328   echo "configure: failed program was:" >&5
14329   cat conftest.$ac_ext >&5
14330   rm -rf conftest*
14331   ol_cv_c_volatile=no
14332 fi
14333 rm -f conftest*
14334 fi
14335
14336 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14337   if test $ol_cv_c_volatile = yes; then
14338     : 
14339   else
14340     cat >> confdefs.h <<\EOF
14341 #define volatile 
14342 EOF
14343
14344   fi
14345  
14346
14347 if test $cross_compiling = yes ; then
14348         cat >> confdefs.h <<\EOF
14349 #define CROSS_COMPILING 1
14350 EOF
14351
14352 else
14353         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14354 echo "configure:14355: checking whether byte ordering is bigendian" >&5
14355 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14356   echo $ac_n "(cached) $ac_c" 1>&6
14357 else
14358   ac_cv_c_bigendian=unknown
14359 # See if sys/param.h defines the BYTE_ORDER macro.
14360 cat > conftest.$ac_ext <<EOF
14361 #line 14362 "configure"
14362 #include "confdefs.h"
14363 #include <sys/types.h>
14364 #include <sys/param.h>
14365 int main() {
14366
14367 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14368  bogus endian macros
14369 #endif
14370 ; return 0; }
14371 EOF
14372 if { (eval echo configure:14373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14373   rm -rf conftest*
14374   # It does; now see whether it defined to BIG_ENDIAN or not.
14375 cat > conftest.$ac_ext <<EOF
14376 #line 14377 "configure"
14377 #include "confdefs.h"
14378 #include <sys/types.h>
14379 #include <sys/param.h>
14380 int main() {
14381
14382 #if BYTE_ORDER != BIG_ENDIAN
14383  not big endian
14384 #endif
14385 ; return 0; }
14386 EOF
14387 if { (eval echo configure:14388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14388   rm -rf conftest*
14389   ac_cv_c_bigendian=yes
14390 else
14391   echo "configure: failed program was:" >&5
14392   cat conftest.$ac_ext >&5
14393   rm -rf conftest*
14394   ac_cv_c_bigendian=no
14395 fi
14396 rm -f conftest*
14397 else
14398   echo "configure: failed program was:" >&5
14399   cat conftest.$ac_ext >&5
14400 fi
14401 rm -f conftest*
14402 if test $ac_cv_c_bigendian = unknown; then
14403 if test "$cross_compiling" = yes; then
14404     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14405 else
14406   cat > conftest.$ac_ext <<EOF
14407 #line 14408 "configure"
14408 #include "confdefs.h"
14409 main () {
14410   /* Are we little or big endian?  From Harbison&Steele.  */
14411   union
14412   {
14413     long l;
14414     char c[sizeof (long)];
14415   } u;
14416   u.l = 1;
14417   exit (u.c[sizeof (long) - 1] == 1);
14418 }
14419 EOF
14420 if { (eval echo configure:14421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14421 then
14422   ac_cv_c_bigendian=no
14423 else
14424   echo "configure: failed program was:" >&5
14425   cat conftest.$ac_ext >&5
14426   rm -fr conftest*
14427   ac_cv_c_bigendian=yes
14428 fi
14429 rm -fr conftest*
14430 fi
14431
14432 fi
14433 fi
14434
14435 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14436 if test $ac_cv_c_bigendian = yes; then
14437   cat >> confdefs.h <<\EOF
14438 #define WORDS_BIGENDIAN 1
14439 EOF
14440
14441 fi
14442
14443 fi
14444
14445 echo $ac_n "checking size of short""... $ac_c" 1>&6
14446 echo "configure:14447: checking size of short" >&5 
14447 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14448   echo $ac_n "(cached) $ac_c" 1>&6
14449 else
14450   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14451   cat > conftest.$ac_ext <<EOF
14452 #line 14453 "configure"
14453 #include "confdefs.h"
14454 #include "confdefs.h" 
14455 #include <sys/types.h> 
14456  
14457
14458 int main() {
14459 switch (0) case 0: case (sizeof (short) == $ac_size):;
14460 ; return 0; }
14461 EOF
14462 if { (eval echo configure:14463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14463   rm -rf conftest*
14464   ac_cv_sizeof_short=$ac_size
14465 else
14466   echo "configure: failed program was:" >&5
14467   cat conftest.$ac_ext >&5
14468 fi
14469 rm -f conftest* 
14470   if test x$ac_cv_sizeof_short != x ; then break; fi 
14471 done 
14472
14473 fi
14474  
14475 if test x$ac_cv_sizeof_short = x ; then 
14476   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14477 fi 
14478 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14479 cat >> confdefs.h <<EOF
14480 #define SIZEOF_SHORT $ac_cv_sizeof_short
14481 EOF
14482  
14483  
14484 echo $ac_n "checking size of int""... $ac_c" 1>&6
14485 echo "configure:14486: checking size of int" >&5 
14486 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14487   echo $ac_n "(cached) $ac_c" 1>&6
14488 else
14489   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14490   cat > conftest.$ac_ext <<EOF
14491 #line 14492 "configure"
14492 #include "confdefs.h"
14493 #include "confdefs.h" 
14494 #include <sys/types.h> 
14495  
14496
14497 int main() {
14498 switch (0) case 0: case (sizeof (int) == $ac_size):;
14499 ; return 0; }
14500 EOF
14501 if { (eval echo configure:14502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14502   rm -rf conftest*
14503   ac_cv_sizeof_int=$ac_size
14504 else
14505   echo "configure: failed program was:" >&5
14506   cat conftest.$ac_ext >&5
14507 fi
14508 rm -f conftest* 
14509   if test x$ac_cv_sizeof_int != x ; then break; fi 
14510 done 
14511
14512 fi
14513  
14514 if test x$ac_cv_sizeof_int = x ; then 
14515   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14516 fi 
14517 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14518 cat >> confdefs.h <<EOF
14519 #define SIZEOF_INT $ac_cv_sizeof_int
14520 EOF
14521  
14522  
14523 echo $ac_n "checking size of long""... $ac_c" 1>&6
14524 echo "configure:14525: checking size of long" >&5 
14525 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14526   echo $ac_n "(cached) $ac_c" 1>&6
14527 else
14528   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14529   cat > conftest.$ac_ext <<EOF
14530 #line 14531 "configure"
14531 #include "confdefs.h"
14532 #include "confdefs.h" 
14533 #include <sys/types.h> 
14534  
14535
14536 int main() {
14537 switch (0) case 0: case (sizeof (long) == $ac_size):;
14538 ; return 0; }
14539 EOF
14540 if { (eval echo configure:14541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14541   rm -rf conftest*
14542   ac_cv_sizeof_long=$ac_size
14543 else
14544   echo "configure: failed program was:" >&5
14545   cat conftest.$ac_ext >&5
14546 fi
14547 rm -f conftest* 
14548   if test x$ac_cv_sizeof_long != x ; then break; fi 
14549 done 
14550
14551 fi
14552  
14553 if test x$ac_cv_sizeof_long = x ; then 
14554   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14555 fi 
14556 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14557 cat >> confdefs.h <<EOF
14558 #define SIZEOF_LONG $ac_cv_sizeof_long
14559 EOF
14560  
14561
14562
14563 if test "$ac_cv_sizeof_int" -lt 4 ; then
14564         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14565
14566         cat >> confdefs.h <<\EOF
14567 #define LBER_INT_T long
14568 EOF
14569
14570 else
14571         cat >> confdefs.h <<\EOF
14572 #define LBER_INT_T int
14573 EOF
14574
14575 fi
14576
14577 cat >> confdefs.h <<\EOF
14578 #define LBER_LEN_T long
14579 EOF
14580
14581 cat >> confdefs.h <<\EOF
14582 #define LBER_SOCKET_T int
14583 EOF
14584
14585 cat >> confdefs.h <<\EOF
14586 #define LBER_TAG_T long
14587 EOF
14588
14589
14590 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14591 echo "configure:14592: checking for 8-bit clean memcmp" >&5
14592 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14593   echo $ac_n "(cached) $ac_c" 1>&6
14594 else
14595   if test "$cross_compiling" = yes; then
14596   ac_cv_func_memcmp_clean=no
14597 else
14598   cat > conftest.$ac_ext <<EOF
14599 #line 14600 "configure"
14600 #include "confdefs.h"
14601
14602 main()
14603 {
14604   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14605   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14606 }
14607
14608 EOF
14609 if { (eval echo configure:14610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14610 then
14611   ac_cv_func_memcmp_clean=yes
14612 else
14613   echo "configure: failed program was:" >&5
14614   cat conftest.$ac_ext >&5
14615   rm -fr conftest*
14616   ac_cv_func_memcmp_clean=no
14617 fi
14618 rm -fr conftest*
14619 fi
14620
14621 fi
14622
14623 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14624 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14625
14626 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14627 echo "configure:14628: checking for strftime" >&5
14628 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14629   echo $ac_n "(cached) $ac_c" 1>&6
14630 else
14631   cat > conftest.$ac_ext <<EOF
14632 #line 14633 "configure"
14633 #include "confdefs.h"
14634 /* System header to define __stub macros and hopefully few prototypes,
14635     which can conflict with char strftime(); below.  */
14636 #include <assert.h>
14637 /* Override any gcc2 internal prototype to avoid an error.  */
14638 /* We use char because int might match the return type of a gcc2
14639     builtin and then its argument prototype would still apply.  */
14640 char strftime();
14641 char (*f)();
14642
14643 int main() {
14644
14645 /* The GNU C library defines this for functions which it implements
14646     to always fail with ENOSYS.  Some functions are actually named
14647     something starting with __ and the normal name is an alias.  */
14648 #if defined (__stub_strftime) || defined (__stub___strftime)
14649 choke me
14650 #else
14651 f = strftime;
14652 #endif
14653
14654 ; return 0; }
14655 EOF
14656 if { (eval echo configure:14657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14657   rm -rf conftest*
14658   eval "ac_cv_func_strftime=yes"
14659 else
14660   echo "configure: failed program was:" >&5
14661   cat conftest.$ac_ext >&5
14662   rm -rf conftest*
14663   eval "ac_cv_func_strftime=no"
14664 fi
14665 rm -f conftest*
14666 fi
14667
14668 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14669   echo "$ac_t""yes" 1>&6
14670   cat >> confdefs.h <<\EOF
14671 #define HAVE_STRFTIME 1
14672 EOF
14673
14674 else
14675   echo "$ac_t""no" 1>&6
14676 # strftime is in -lintl on SCO UNIX.
14677 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14678 echo "configure:14679: checking for strftime in -lintl" >&5
14679 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14681   echo $ac_n "(cached) $ac_c" 1>&6
14682 else
14683   ac_save_LIBS="$LIBS"
14684 LIBS="-lintl  $LIBS"
14685 cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14688 /* Override any gcc2 internal prototype to avoid an error.  */
14689 /* We use char because int might match the return type of a gcc2
14690     builtin and then its argument prototype would still apply.  */
14691 char strftime();
14692
14693 int main() {
14694 strftime()
14695 ; return 0; }
14696 EOF
14697 if { (eval echo configure:14698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14698   rm -rf conftest*
14699   eval "ac_cv_lib_$ac_lib_var=yes"
14700 else
14701   echo "configure: failed program was:" >&5
14702   cat conftest.$ac_ext >&5
14703   rm -rf conftest*
14704   eval "ac_cv_lib_$ac_lib_var=no"
14705 fi
14706 rm -f conftest*
14707 LIBS="$ac_save_LIBS"
14708
14709 fi
14710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14711   echo "$ac_t""yes" 1>&6
14712   cat >> confdefs.h <<\EOF
14713 #define HAVE_STRFTIME 1
14714 EOF
14715
14716 LIBS="-lintl $LIBS"
14717 else
14718   echo "$ac_t""no" 1>&6
14719 fi
14720
14721 fi
14722
14723
14724 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14725 echo "configure:14726: checking for inet_aton()" >&5
14726 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14727   echo $ac_n "(cached) $ac_c" 1>&6
14728 else
14729   cat > conftest.$ac_ext <<EOF
14730 #line 14731 "configure"
14731 #include "confdefs.h"
14732
14733 #ifdef HAVE_SYS_TYPES_H
14734 #       include <sys/types.h>
14735 #endif
14736 #ifdef HAVE_SYS_SOCKET_H
14737 #       include <sys/socket.h>
14738 #       ifdef HAVE_SYS_SELECT_H
14739 #               include <sys/select.h>
14740 #       endif
14741 #       include <netinet/in.h>
14742 #       ifdef HAVE_ARPA_INET_H
14743 #               include <arpa/inet.h>
14744 #       endif
14745 #endif
14746
14747 int main() {
14748 struct in_addr in;
14749 int rc = inet_aton( "255.255.255.255", &in );
14750 ; return 0; }
14751 EOF
14752 if { (eval echo configure:14753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14753   rm -rf conftest*
14754   ol_cv_func_inet_aton=yes
14755 else
14756   echo "configure: failed program was:" >&5
14757   cat conftest.$ac_ext >&5
14758   rm -rf conftest*
14759   ol_cv_func_inet_aton=no
14760 fi
14761 rm -f conftest*
14762 fi
14763
14764 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14765   if test $ol_cv_func_inet_aton != no; then
14766     cat >> confdefs.h <<\EOF
14767 #define HAVE_INET_ATON 1
14768 EOF
14769
14770   fi
14771  
14772
14773 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14774 echo "configure:14775: checking for _spawnlp" >&5
14775 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14776   echo $ac_n "(cached) $ac_c" 1>&6
14777 else
14778   cat > conftest.$ac_ext <<EOF
14779 #line 14780 "configure"
14780 #include "confdefs.h"
14781 /* System header to define __stub macros and hopefully few prototypes,
14782     which can conflict with char _spawnlp(); below.  */
14783 #include <assert.h>
14784 /* Override any gcc2 internal prototype to avoid an error.  */
14785 /* We use char because int might match the return type of a gcc2
14786     builtin and then its argument prototype would still apply.  */
14787 char _spawnlp();
14788 char (*f)();
14789
14790 int main() {
14791
14792 /* The GNU C library defines this for functions which it implements
14793     to always fail with ENOSYS.  Some functions are actually named
14794     something starting with __ and the normal name is an alias.  */
14795 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14796 choke me
14797 #else
14798 f = _spawnlp;
14799 #endif
14800
14801 ; return 0; }
14802 EOF
14803 if { (eval echo configure:14804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14804   rm -rf conftest*
14805   eval "ac_cv_func__spawnlp=yes"
14806 else
14807   echo "configure: failed program was:" >&5
14808   cat conftest.$ac_ext >&5
14809   rm -rf conftest*
14810   eval "ac_cv_func__spawnlp=no"
14811 fi
14812 rm -f conftest*
14813 fi
14814
14815 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14816   echo "$ac_t""yes" 1>&6
14817   cat >> confdefs.h <<\EOF
14818 #define HAVE_SPAWNLP 1
14819 EOF
14820
14821 else
14822   echo "$ac_t""no" 1>&6
14823 fi
14824
14825
14826 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14827 echo "configure:14828: checking for _snprintf" >&5
14828 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14829   echo $ac_n "(cached) $ac_c" 1>&6
14830 else
14831   cat > conftest.$ac_ext <<EOF
14832 #line 14833 "configure"
14833 #include "confdefs.h"
14834 /* System header to define __stub macros and hopefully few prototypes,
14835     which can conflict with char _snprintf(); below.  */
14836 #include <assert.h>
14837 /* Override any gcc2 internal prototype to avoid an error.  */
14838 /* We use char because int might match the return type of a gcc2
14839     builtin and then its argument prototype would still apply.  */
14840 char _snprintf();
14841 char (*f)();
14842
14843 int main() {
14844
14845 /* The GNU C library defines this for functions which it implements
14846     to always fail with ENOSYS.  Some functions are actually named
14847     something starting with __ and the normal name is an alias.  */
14848 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14849 choke me
14850 #else
14851 f = _snprintf;
14852 #endif
14853
14854 ; return 0; }
14855 EOF
14856 if { (eval echo configure:14857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14857   rm -rf conftest*
14858   eval "ac_cv_func__snprintf=yes"
14859 else
14860   echo "configure: failed program was:" >&5
14861   cat conftest.$ac_ext >&5
14862   rm -rf conftest*
14863   eval "ac_cv_func__snprintf=no"
14864 fi
14865 rm -f conftest*
14866 fi
14867
14868 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14869   echo "$ac_t""yes" 1>&6
14870   ac_cv_func_snprintf=yes
14871         cat >> confdefs.h <<\EOF
14872 #define snprintf _snprintf
14873 EOF
14874
14875
14876 else
14877   echo "$ac_t""no" 1>&6
14878 fi
14879
14880
14881 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14882 echo "configure:14883: checking for _vsnprintf" >&5
14883 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14884   echo $ac_n "(cached) $ac_c" 1>&6
14885 else
14886   cat > conftest.$ac_ext <<EOF
14887 #line 14888 "configure"
14888 #include "confdefs.h"
14889 /* System header to define __stub macros and hopefully few prototypes,
14890     which can conflict with char _vsnprintf(); below.  */
14891 #include <assert.h>
14892 /* Override any gcc2 internal prototype to avoid an error.  */
14893 /* We use char because int might match the return type of a gcc2
14894     builtin and then its argument prototype would still apply.  */
14895 char _vsnprintf();
14896 char (*f)();
14897
14898 int main() {
14899
14900 /* The GNU C library defines this for functions which it implements
14901     to always fail with ENOSYS.  Some functions are actually named
14902     something starting with __ and the normal name is an alias.  */
14903 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14904 choke me
14905 #else
14906 f = _vsnprintf;
14907 #endif
14908
14909 ; return 0; }
14910 EOF
14911 if { (eval echo configure:14912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14912   rm -rf conftest*
14913   eval "ac_cv_func__vsnprintf=yes"
14914 else
14915   echo "configure: failed program was:" >&5
14916   cat conftest.$ac_ext >&5
14917   rm -rf conftest*
14918   eval "ac_cv_func__vsnprintf=no"
14919 fi
14920 rm -f conftest*
14921 fi
14922
14923 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14924   echo "$ac_t""yes" 1>&6
14925   ac_cv_func_vsnprintf=yes
14926         cat >> confdefs.h <<\EOF
14927 #define vsnprintf _vsnprintf
14928 EOF
14929
14930
14931 else
14932   echo "$ac_t""no" 1>&6
14933 fi
14934
14935
14936 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14937 echo "configure:14938: checking for vprintf" >&5
14938 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14939   echo $ac_n "(cached) $ac_c" 1>&6
14940 else
14941   cat > conftest.$ac_ext <<EOF
14942 #line 14943 "configure"
14943 #include "confdefs.h"
14944 /* System header to define __stub macros and hopefully few prototypes,
14945     which can conflict with char vprintf(); below.  */
14946 #include <assert.h>
14947 /* Override any gcc2 internal prototype to avoid an error.  */
14948 /* We use char because int might match the return type of a gcc2
14949     builtin and then its argument prototype would still apply.  */
14950 char vprintf();
14951 char (*f)();
14952
14953 int main() {
14954
14955 /* The GNU C library defines this for functions which it implements
14956     to always fail with ENOSYS.  Some functions are actually named
14957     something starting with __ and the normal name is an alias.  */
14958 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14959 choke me
14960 #else
14961 f = vprintf;
14962 #endif
14963
14964 ; return 0; }
14965 EOF
14966 if { (eval echo configure:14967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14967   rm -rf conftest*
14968   eval "ac_cv_func_vprintf=yes"
14969 else
14970   echo "configure: failed program was:" >&5
14971   cat conftest.$ac_ext >&5
14972   rm -rf conftest*
14973   eval "ac_cv_func_vprintf=no"
14974 fi
14975 rm -f conftest*
14976 fi
14977
14978 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14979   echo "$ac_t""yes" 1>&6
14980   cat >> confdefs.h <<\EOF
14981 #define HAVE_VPRINTF 1
14982 EOF
14983
14984 else
14985   echo "$ac_t""no" 1>&6
14986 fi
14987
14988 if test "$ac_cv_func_vprintf" != yes; then
14989 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14990 echo "configure:14991: checking for _doprnt" >&5
14991 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14992   echo $ac_n "(cached) $ac_c" 1>&6
14993 else
14994   cat > conftest.$ac_ext <<EOF
14995 #line 14996 "configure"
14996 #include "confdefs.h"
14997 /* System header to define __stub macros and hopefully few prototypes,
14998     which can conflict with char _doprnt(); below.  */
14999 #include <assert.h>
15000 /* Override any gcc2 internal prototype to avoid an error.  */
15001 /* We use char because int might match the return type of a gcc2
15002     builtin and then its argument prototype would still apply.  */
15003 char _doprnt();
15004 char (*f)();
15005
15006 int main() {
15007
15008 /* The GNU C library defines this for functions which it implements
15009     to always fail with ENOSYS.  Some functions are actually named
15010     something starting with __ and the normal name is an alias.  */
15011 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15012 choke me
15013 #else
15014 f = _doprnt;
15015 #endif
15016
15017 ; return 0; }
15018 EOF
15019 if { (eval echo configure:15020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15020   rm -rf conftest*
15021   eval "ac_cv_func__doprnt=yes"
15022 else
15023   echo "configure: failed program was:" >&5
15024   cat conftest.$ac_ext >&5
15025   rm -rf conftest*
15026   eval "ac_cv_func__doprnt=no"
15027 fi
15028 rm -f conftest*
15029 fi
15030
15031 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15032   echo "$ac_t""yes" 1>&6
15033   cat >> confdefs.h <<\EOF
15034 #define HAVE_DOPRNT 1
15035 EOF
15036
15037 else
15038   echo "$ac_t""no" 1>&6
15039 fi
15040
15041 fi
15042
15043
15044 if test $ac_cv_func_vprintf = yes ; then
15045                 for ac_func in vsnprintf vsprintf
15046 do
15047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15048 echo "configure:15049: checking for $ac_func" >&5
15049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15050   echo $ac_n "(cached) $ac_c" 1>&6
15051 else
15052   cat > conftest.$ac_ext <<EOF
15053 #line 15054 "configure"
15054 #include "confdefs.h"
15055 /* System header to define __stub macros and hopefully few prototypes,
15056     which can conflict with char $ac_func(); below.  */
15057 #include <assert.h>
15058 /* Override any gcc2 internal prototype to avoid an error.  */
15059 /* We use char because int might match the return type of a gcc2
15060     builtin and then its argument prototype would still apply.  */
15061 char $ac_func();
15062 char (*f)();
15063
15064 int main() {
15065
15066 /* The GNU C library defines this for functions which it implements
15067     to always fail with ENOSYS.  Some functions are actually named
15068     something starting with __ and the normal name is an alias.  */
15069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15070 choke me
15071 #else
15072 f = $ac_func;
15073 #endif
15074
15075 ; return 0; }
15076 EOF
15077 if { (eval echo configure:15078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15078   rm -rf conftest*
15079   eval "ac_cv_func_$ac_func=yes"
15080 else
15081   echo "configure: failed program was:" >&5
15082   cat conftest.$ac_ext >&5
15083   rm -rf conftest*
15084   eval "ac_cv_func_$ac_func=no"
15085 fi
15086 rm -f conftest*
15087 fi
15088
15089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15090   echo "$ac_t""yes" 1>&6
15091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15092   cat >> confdefs.h <<EOF
15093 #define $ac_tr_func 1
15094 EOF
15095  
15096 else
15097   echo "$ac_t""no" 1>&6
15098 fi
15099 done
15100
15101 fi
15102
15103 for ac_func in \
15104         bcopy                   \
15105         closesocket             \
15106         chroot                  \
15107         endgrent                \
15108         endpwent                \
15109         flock                   \
15110         getdtablesize   \
15111         getgrgid                \
15112         gethostname             \
15113         getpass                 \
15114         getpassphrase   \
15115         getpwuid                \
15116         getpwnam                \
15117         getspnam                \
15118         gettimeofday    \
15119         initgroups              \
15120         lockf                   \
15121         memcpy                  \
15122         memmove                 \
15123         mkstemp                 \
15124         pipe                    \
15125         read                    \
15126         recv                    \
15127         recvfrom                \
15128         setpwfile               \
15129         setgid                  \
15130         setegid                 \
15131         setsid                  \
15132         setuid                  \
15133         seteuid                 \
15134         sigaction               \
15135         signal                  \
15136         sigset                  \
15137         snprintf                \
15138         strdup                  \
15139         strerror                \
15140         strpbrk                 \
15141         strrchr                 \
15142         strsep                  \
15143         strstr                  \
15144         strtol                  \
15145         strtoul                 \
15146         strspn                  \
15147         sysconf                 \
15148         waitpid                 \
15149         wait4                   \
15150         write                   \
15151         send                    \
15152         sendto                  \
15153
15154 do
15155 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15156 echo "configure:15157: checking for $ac_func" >&5
15157 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15158   echo $ac_n "(cached) $ac_c" 1>&6
15159 else
15160   cat > conftest.$ac_ext <<EOF
15161 #line 15162 "configure"
15162 #include "confdefs.h"
15163 /* System header to define __stub macros and hopefully few prototypes,
15164     which can conflict with char $ac_func(); below.  */
15165 #include <assert.h>
15166 /* Override any gcc2 internal prototype to avoid an error.  */
15167 /* We use char because int might match the return type of a gcc2
15168     builtin and then its argument prototype would still apply.  */
15169 char $ac_func();
15170 char (*f)();
15171
15172 int main() {
15173
15174 /* The GNU C library defines this for functions which it implements
15175     to always fail with ENOSYS.  Some functions are actually named
15176     something starting with __ and the normal name is an alias.  */
15177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15178 choke me
15179 #else
15180 f = $ac_func;
15181 #endif
15182
15183 ; return 0; }
15184 EOF
15185 if { (eval echo configure:15186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15186   rm -rf conftest*
15187   eval "ac_cv_func_$ac_func=yes"
15188 else
15189   echo "configure: failed program was:" >&5
15190   cat conftest.$ac_ext >&5
15191   rm -rf conftest*
15192   eval "ac_cv_func_$ac_func=no"
15193 fi
15194 rm -f conftest*
15195 fi
15196
15197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15198   echo "$ac_t""yes" 1>&6
15199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15200   cat >> confdefs.h <<EOF
15201 #define $ac_tr_func 1
15202 EOF
15203  
15204 else
15205   echo "$ac_t""no" 1>&6
15206 fi
15207 done
15208
15209
15210 for ac_func in getopt tempnam
15211 do
15212 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15213 echo "configure:15214: checking for $ac_func" >&5
15214 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15215   echo $ac_n "(cached) $ac_c" 1>&6
15216 else
15217   cat > conftest.$ac_ext <<EOF
15218 #line 15219 "configure"
15219 #include "confdefs.h"
15220 /* System header to define __stub macros and hopefully few prototypes,
15221     which can conflict with char $ac_func(); below.  */
15222 #include <assert.h>
15223 /* Override any gcc2 internal prototype to avoid an error.  */
15224 /* We use char because int might match the return type of a gcc2
15225     builtin and then its argument prototype would still apply.  */
15226 char $ac_func();
15227 char (*f)();
15228
15229 int main() {
15230
15231 /* The GNU C library defines this for functions which it implements
15232     to always fail with ENOSYS.  Some functions are actually named
15233     something starting with __ and the normal name is an alias.  */
15234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15235 choke me
15236 #else
15237 f = $ac_func;
15238 #endif
15239
15240 ; return 0; }
15241 EOF
15242 if { (eval echo configure:15243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15243   rm -rf conftest*
15244   eval "ac_cv_func_$ac_func=yes"
15245 else
15246   echo "configure: failed program was:" >&5
15247   cat conftest.$ac_ext >&5
15248   rm -rf conftest*
15249   eval "ac_cv_func_$ac_func=no"
15250 fi
15251 rm -f conftest*
15252 fi
15253
15254 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15255   echo "$ac_t""yes" 1>&6
15256     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15257   cat >> confdefs.h <<EOF
15258 #define $ac_tr_func 1
15259 EOF
15260  
15261 else
15262   echo "$ac_t""no" 1>&6
15263 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15264 fi
15265 done
15266
15267
15268
15269 if test "$ac_cv_func_getopt" != yes; then
15270     LIBSRCS="$LIBSRCS getopt.c"
15271 fi
15272
15273 if test "$ac_cv_func_tempnam" != yes; then
15274     LIBSRCS="$LIBSRCS tempnam.c"
15275 fi
15276
15277 # Check Configuration
15278 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15279 echo "configure:15280: checking declaration of sys_errlist" >&5
15280 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15281   echo $ac_n "(cached) $ac_c" 1>&6
15282 else
15283   
15284         cat > conftest.$ac_ext <<EOF
15285 #line 15286 "configure"
15286 #include "confdefs.h"
15287
15288 #include <stdio.h>
15289 #include <sys/types.h>
15290 #include <errno.h>
15291 #ifdef WINNT
15292 #include <stdlib.h>
15293 #endif 
15294 int main() {
15295 char *c = (char *) *sys_errlist
15296 ; return 0; }
15297 EOF
15298 if { (eval echo configure:15299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15299   rm -rf conftest*
15300   ol_cv_dcl_sys_errlist=yes
15301         ol_cv_have_sys_errlist=yes
15302 else
15303   echo "configure: failed program was:" >&5
15304   cat conftest.$ac_ext >&5
15305   rm -rf conftest*
15306   ol_cv_dcl_sys_errlist=no
15307 fi
15308 rm -f conftest*
15309 fi
15310
15311 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15312 #
15313 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15314 if test $ol_cv_dcl_sys_errlist = no ; then
15315         cat >> confdefs.h <<\EOF
15316 #define DECL_SYS_ERRLIST 1
15317 EOF
15318
15319
15320         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15321 echo "configure:15322: checking existence of sys_errlist" >&5
15322 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15323   echo $ac_n "(cached) $ac_c" 1>&6
15324 else
15325   
15326                 cat > conftest.$ac_ext <<EOF
15327 #line 15328 "configure"
15328 #include "confdefs.h"
15329 #include <errno.h>
15330 int main() {
15331 char *c = (char *) *sys_errlist
15332 ; return 0; }
15333 EOF
15334 if { (eval echo configure:15335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15335   rm -rf conftest*
15336   ol_cv_have_sys_errlist=yes
15337 else
15338   echo "configure: failed program was:" >&5
15339   cat conftest.$ac_ext >&5
15340   rm -rf conftest*
15341   ol_cv_have_sys_errlist=no
15342 fi
15343 rm -f conftest*
15344 fi
15345
15346 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15347 fi
15348 if test $ol_cv_have_sys_errlist = yes ; then
15349         cat >> confdefs.h <<\EOF
15350 #define HAVE_SYS_ERRLIST 1
15351 EOF
15352
15353 fi
15354
15355
15356
15357 if test "$ol_enable_debug" != no ; then
15358         cat >> confdefs.h <<\EOF
15359 #define LDAP_DEBUG 1
15360 EOF
15361
15362 fi
15363 if test "$ol_enable_syslog" = yes ; then
15364         cat >> confdefs.h <<\EOF
15365 #define LDAP_SYSLOG 1
15366 EOF
15367
15368 fi
15369 if test "$ol_enable_libui" = yes ; then
15370         cat >> confdefs.h <<\EOF
15371 #define LDAP_LIBUI 1
15372 EOF
15373
15374 fi
15375 if test "$ol_enable_cache" = no ; then
15376         cat >> confdefs.h <<\EOF
15377 #define LDAP_NOCACHE 1
15378 EOF
15379
15380 fi
15381 if test "$ol_link_kbind" != no ; then
15382         cat >> confdefs.h <<\EOF
15383 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15384 EOF
15385
15386 fi
15387 if test "$ol_enable_proctitle" != no ; then
15388         cat >> confdefs.h <<\EOF
15389 #define LDAP_PROCTITLE 1
15390 EOF
15391
15392 fi
15393 if test "$ol_enable_referrals" != no ; then
15394         cat >> confdefs.h <<\EOF
15395 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15396 EOF
15397
15398 fi
15399 if test "$ol_enable_cldap" != no ; then
15400         cat >> confdefs.h <<\EOF
15401 #define LDAP_CONNECTIONLESS 1
15402 EOF
15403
15404 fi
15405 if test "$ol_enable_unix" != no; then
15406         cat >> confdefs.h <<\EOF
15407 #define LDAP_PF_UNIX 1
15408 EOF
15409
15410 fi
15411 if test "$ol_enable_ipv6" != no; then
15412         cat >> confdefs.h <<\EOF
15413 #define LDAP_PF_INET6 1
15414 EOF
15415
15416 fi
15417 if test "$ol_enable_cleartext" != no ; then
15418         cat >> confdefs.h <<\EOF
15419 #define SLAPD_CLEARTEXT 1
15420 EOF
15421
15422 fi
15423 if test "$ol_enable_crypt" != no ; then
15424         cat >> confdefs.h <<\EOF
15425 #define SLAPD_CRYPT 1
15426 EOF
15427
15428 fi
15429 if test "$ol_link_kpasswd" != no ; then
15430         cat >> confdefs.h <<\EOF
15431 #define SLAPD_KPASSWD 1
15432 EOF
15433
15434 fi
15435 if test "$ol_link_spasswd" != no ; then
15436         cat >> confdefs.h <<\EOF
15437 #define SLAPD_SPASSWD 1
15438 EOF
15439
15440 fi
15441 if test "$ol_enable_multimaster" != no ; then
15442         cat >> confdefs.h <<\EOF
15443 #define SLAPD_MULTIMASTER 1
15444 EOF
15445
15446 fi
15447 if test "$ol_enable_phonetic" != no ; then
15448         cat >> confdefs.h <<\EOF
15449 #define SLAPD_PHONETIC 1
15450 EOF
15451
15452 fi
15453 if test "$ol_enable_rlookups" != no ; then
15454         cat >> confdefs.h <<\EOF
15455 #define SLAPD_RLOOKUPS 1
15456 EOF
15457
15458 fi
15459 if test "$ol_enable_aci" != no ; then
15460         cat >> confdefs.h <<\EOF
15461 #define SLAPD_ACI_ENABLED 1
15462 EOF
15463
15464 fi
15465
15466 if test "$ol_link_modules" != no ; then
15467         cat >> confdefs.h <<\EOF
15468 #define SLAPD_MODULES 1
15469 EOF
15470
15471         BUILD_SLAPD=yes
15472         SLAPD_MODULES_LDFLAGS="-dlopen self"
15473 fi
15474
15475 if test "$ol_link_dnssrv" != no ; then
15476         cat >> confdefs.h <<\EOF
15477 #define SLAPD_DNSSRV 1
15478 EOF
15479
15480         BUILD_SLAPD=yes
15481         BUILD_DNSSRV=yes
15482         if test "$ol_with_dnssrv_module" != static ; then
15483                 cat >> confdefs.h <<\EOF
15484 #define SLAPD_DNSSRV_DYNAMIC 1
15485 EOF
15486
15487                 BUILD_DNSSRV=mod
15488                 BUILD_DNSSRV_DYNAMIC=shared
15489                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15490         fi
15491 fi
15492
15493 if test "$ol_enable_ldap" != no ; then
15494         cat >> confdefs.h <<\EOF
15495 #define SLAPD_LDAP 1
15496 EOF
15497
15498         BUILD_SLAPD=yes
15499         BUILD_LDAP=yes
15500         if test "$ol_with_ldap_module" != static ; then
15501                 cat >> confdefs.h <<\EOF
15502 #define SLAPD_LDAP_DYNAMIC 1
15503 EOF
15504
15505                 BUILD_LDAP=mod
15506                 BUILD_LDAP_DYNAMIC=shared
15507                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15508         fi
15509 fi
15510
15511 if test "$ol_link_ldbm" != no ; then
15512         cat >> confdefs.h <<\EOF
15513 #define SLAPD_LDBM 1
15514 EOF
15515
15516         BUILD_SLAPD=yes
15517         BUILD_LDBM=yes
15518         if test "$ol_with_ldbm_module" != static ; then
15519                 cat >> confdefs.h <<\EOF
15520 #define SLAPD_LDBM_DYNAMIC 1
15521 EOF
15522
15523                 BUILD_LDBM=mod
15524                 BUILD_LDBM_DYNAMIC=shared
15525                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15526         fi
15527 fi
15528
15529 if test "$ol_enable_passwd" != no ; then
15530         cat >> confdefs.h <<\EOF
15531 #define SLAPD_PASSWD 1
15532 EOF
15533
15534         BUILD_SLAPD=yes
15535         BUILD_PASSWD=yes
15536         if test "$ol_with_passwd_module" != static ; then
15537                 cat >> confdefs.h <<\EOF
15538 #define SLAPD_PASSWD_DYNAMIC 1
15539 EOF
15540
15541                 BUILD_PASSWD=mod
15542                 BUILD_PASSWD_DYNAMIC=shared
15543                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15544         fi
15545 fi
15546
15547 if test "$ol_enable_shell" != no ; then
15548         cat >> confdefs.h <<\EOF
15549 #define SLAPD_SHELL 1
15550 EOF
15551
15552         BUILD_SLAPD=yes
15553         BUILD_SHELL=yes
15554         if test "$ol_with_shell_module" != static ; then
15555                 cat >> confdefs.h <<\EOF
15556 #define SLAPD_SHELL_DYNAMIC 1
15557 EOF
15558
15559                 BUILD_SHELL=mod
15560                 BUILD_SHELL_DYNAMIC=shared
15561                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15562         fi
15563 fi
15564
15565 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15566         $BUILD_SLAPD = yes ; then
15567         BUILD_SLURPD=yes
15568 fi
15569
15570
15571 if test "$LINK_BINS_DYNAMIC" = yes; then
15572     LIB_LINKAGE=DYN
15573     LT_LIB_LINKAGE=shared
15574 else
15575     LIB_LINKAGE=STAT
15576     LT_LIB_LINKAGE=static
15577 fi
15578
15579 if test "$ac_cv_mingw32" = yes ; then
15580     PLAT=NT
15581     DYN_EXT=dll
15582 else
15583     PLAT=UNIX
15584     DYN_EXT=so
15585 fi
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595   
15596   
15597   
15598   
15599   
15600   
15601   
15602   
15603   
15604   
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631 trap '' 1 2 15
15632
15633 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15634
15635 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15636 # Let make expand exec_prefix.
15637 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15638
15639 # Any assignment to VPATH causes Sun make to only execute
15640 # the first set of double-colon rules, so remove it if not needed.
15641 # If there is a colon in the path, we need to keep it.
15642 if test "x$srcdir" = x.; then
15643   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15644 fi
15645
15646 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15647
15648 DEFS=-DHAVE_CONFIG_H
15649
15650 # Without the "./", some shells look in PATH for config.status.
15651 : ${CONFIG_STATUS=./config.status}
15652
15653 echo creating $CONFIG_STATUS
15654 rm -f $CONFIG_STATUS
15655 cat > $CONFIG_STATUS <<EOF
15656 #! /bin/sh
15657 # Generated automatically by configure.
15658 # Run this file to recreate the current configuration.
15659 # This directory was configured as follows,
15660 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15661 #
15662 # $0 $ac_configure_args
15663 #
15664 # Compiler output produced by configure, useful for debugging
15665 # configure, is in ./config.log if it exists.
15666
15667 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15668 for ac_option
15669 do
15670   case "\$ac_option" in
15671   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15672     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15673     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15674   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15675     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15676     exit 0 ;;
15677   -help | --help | --hel | --he | --h)
15678     echo "\$ac_cs_usage"; exit 0 ;;
15679   *) echo "\$ac_cs_usage"; exit 1 ;;
15680   esac
15681 done
15682
15683 ac_given_srcdir=$srcdir
15684 ac_given_INSTALL="$INSTALL"
15685
15686 trap 'rm -fr `echo "\
15687 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15688 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15689 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15690 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15691 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15692 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15693 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15694 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15695 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15696 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15697 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15698 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15699 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15700 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15701 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15702 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15703 include/Makefile:build/top.mk:include/Makefile.in \
15704 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15705 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15706 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15707 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15708 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15709 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15710 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15711 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15712 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15713 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15714 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15715 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15716 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15717 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15718 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15719 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15720 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15721 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15722 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15723 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15724 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15725 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15726 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15727 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15728  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15729 EOF
15730 cat >> $CONFIG_STATUS <<EOF
15731
15732 # Protect against being on the right side of a sed subst in config.status.
15733 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15734  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15735 $ac_vpsub
15736 $extrasub
15737 s%@SHELL@%$SHELL%g
15738 s%@CFLAGS@%$CFLAGS%g
15739 s%@CPPFLAGS@%$CPPFLAGS%g
15740 s%@CXXFLAGS@%$CXXFLAGS%g
15741 s%@FFLAGS@%$FFLAGS%g
15742 s%@DEFS@%$DEFS%g
15743 s%@LDFLAGS@%$LDFLAGS%g
15744 s%@LIBS@%$LIBS%g
15745 s%@exec_prefix@%$exec_prefix%g
15746 s%@prefix@%$prefix%g
15747 s%@program_transform_name@%$program_transform_name%g
15748 s%@bindir@%$bindir%g
15749 s%@sbindir@%$sbindir%g
15750 s%@libexecdir@%$libexecdir%g
15751 s%@datadir@%$datadir%g
15752 s%@sysconfdir@%$sysconfdir%g
15753 s%@sharedstatedir@%$sharedstatedir%g
15754 s%@localstatedir@%$localstatedir%g
15755 s%@libdir@%$libdir%g
15756 s%@includedir@%$includedir%g
15757 s%@oldincludedir@%$oldincludedir%g
15758 s%@infodir@%$infodir%g
15759 s%@mandir@%$mandir%g
15760 s%@host@%$host%g
15761 s%@host_alias@%$host_alias%g
15762 s%@host_cpu@%$host_cpu%g
15763 s%@host_vendor@%$host_vendor%g
15764 s%@host_os@%$host_os%g
15765 s%@target@%$target%g
15766 s%@target_alias@%$target_alias%g
15767 s%@target_cpu@%$target_cpu%g
15768 s%@target_vendor@%$target_vendor%g
15769 s%@target_os@%$target_os%g
15770 s%@build@%$build%g
15771 s%@build_alias@%$build_alias%g
15772 s%@build_cpu@%$build_cpu%g
15773 s%@build_vendor@%$build_vendor%g
15774 s%@build_os@%$build_os%g
15775 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15776 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15777 s%@INSTALL_DATA@%$INSTALL_DATA%g
15778 s%@PACKAGE@%$PACKAGE%g
15779 s%@VERSION@%$VERSION%g
15780 s%@ACLOCAL@%$ACLOCAL%g
15781 s%@AUTOCONF@%$AUTOCONF%g
15782 s%@AUTOMAKE@%$AUTOMAKE%g
15783 s%@AUTOHEADER@%$AUTOHEADER%g
15784 s%@MAKEINFO@%$MAKEINFO%g
15785 s%@install_sh@%$install_sh%g
15786 s%@AMTAR@%$AMTAR%g
15787 s%@AWK@%$AWK%g
15788 s%@AMTARFLAGS@%$AMTARFLAGS%g
15789 s%@SET_MAKE@%$SET_MAKE%g
15790 s%@top_builddir@%$top_builddir%g
15791 s%@ldap_subdir@%$ldap_subdir%g
15792 s%@CC@%$CC%g
15793 s%@RANLIB@%$RANLIB%g
15794 s%@LN_S@%$LN_S%g
15795 s%@DLLTOOL@%$DLLTOOL%g
15796 s%@AS@%$AS%g
15797 s%@OBJDUMP@%$OBJDUMP%g
15798 s%@LIBTOOL@%$LIBTOOL%g
15799 s%@LN_H@%$LN_H%g
15800 s%@SENDMAIL@%$SENDMAIL%g
15801 s%@EDITOR@%$EDITOR%g
15802 s%@FINGER@%$FINGER%g
15803 s%@CPP@%$CPP%g
15804 s%@EXEEXT@%$EXEEXT%g
15805 s%@OBJEXT@%$OBJEXT%g
15806 s%@OL_MKDEP@%$OL_MKDEP%g
15807 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15808 s%@LIBOBJS@%$LIBOBJS%g
15809 s%@LIBSRCS@%$LIBSRCS%g
15810 s%@PLAT@%$PLAT%g
15811 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15812 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15813 s%@DYN_EXT@%$DYN_EXT%g
15814 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15815 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
15816 s%@BUILD_LDAP@%$BUILD_LDAP%g
15817 s%@BUILD_LDBM@%$BUILD_LDBM%g
15818 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15819 s%@BUILD_SHELL@%$BUILD_SHELL%g
15820 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
15821 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15822 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15823 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15824 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15825 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15826 s%@LDAP_LIBS@%$LDAP_LIBS%g
15827 s%@LDIF_LIBS@%$LDIF_LIBS%g
15828 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15829 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15830 s%@LDBM_LIBS@%$LDBM_LIBS%g
15831 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15832 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15833 s%@WRAP_LIBS@%$WRAP_LIBS%g
15834 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15835 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15836 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15837 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15838 s%@KRB4_LIBS@%$KRB4_LIBS%g
15839 s%@KRB5_LIBS@%$KRB5_LIBS%g
15840 s%@READLINE_LIBS@%$READLINE_LIBS%g
15841 s%@SASL_LIBS@%$SASL_LIBS%g
15842 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15843 s%@TLS_LIBS@%$TLS_LIBS%g
15844 s%@MODULES_LIBS@%$MODULES_LIBS%g
15845 s%@AUTH_LIBS@%$AUTH_LIBS%g
15846
15847 CEOF
15848 EOF
15849
15850 cat >> $CONFIG_STATUS <<\EOF
15851
15852 # Split the substitutions into bite-sized pieces for seds with
15853 # small command number limits, like on Digital OSF/1 and HP-UX.
15854 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15855 ac_file=1 # Number of current file.
15856 ac_beg=1 # First line for current file.
15857 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15858 ac_more_lines=:
15859 ac_sed_cmds=""
15860 while $ac_more_lines; do
15861   if test $ac_beg -gt 1; then
15862     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15863   else
15864     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15865   fi
15866   if test ! -s conftest.s$ac_file; then
15867     ac_more_lines=false
15868     rm -f conftest.s$ac_file
15869   else
15870     if test -z "$ac_sed_cmds"; then
15871       ac_sed_cmds="sed -f conftest.s$ac_file"
15872     else
15873       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15874     fi
15875     ac_file=`expr $ac_file + 1`
15876     ac_beg=$ac_end
15877     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15878   fi
15879 done
15880 if test -z "$ac_sed_cmds"; then
15881   ac_sed_cmds=cat
15882 fi
15883 EOF
15884
15885 cat >> $CONFIG_STATUS <<EOF
15886
15887 CONFIG_FILES=\${CONFIG_FILES-"\
15888 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15889 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15890 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15891 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15892 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15893 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15894 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15895 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15896 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15897 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15898 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15899 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15900 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15901 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15902 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15903 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15904 include/Makefile:build/top.mk:include/Makefile.in \
15905 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15906 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15907 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15908 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15909 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15910 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15911 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15912 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15913 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15914 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15915 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15916 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15917 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15918 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15919 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15920 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15921 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15922 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15923 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15924 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15925 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15926 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15927 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15928 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15929 "}
15930 EOF
15931 cat >> $CONFIG_STATUS <<\EOF
15932 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15933   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15934   case "$ac_file" in
15935   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15936        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15937   *) ac_file_in="${ac_file}.in" ;;
15938   esac
15939
15940   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15941
15942   # Remove last slash and all that follows it.  Not all systems have dirname.
15943   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15944   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15945     # The file is in a subdirectory.
15946     test ! -d "$ac_dir" && mkdir "$ac_dir"
15947     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15948     # A "../" for each directory in $ac_dir_suffix.
15949     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15950   else
15951     ac_dir_suffix= ac_dots=
15952   fi
15953
15954   case "$ac_given_srcdir" in
15955   .)  srcdir=.
15956       if test -z "$ac_dots"; then top_srcdir=.
15957       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15958   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15959   *) # Relative path.
15960     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15961     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15962   esac
15963
15964   case "$ac_given_INSTALL" in
15965   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15966   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15967   esac
15968
15969   echo creating "$ac_file"
15970   rm -f "$ac_file"
15971   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15972   case "$ac_file" in
15973   *[Mm]akefile*) ac_comsub="1i\\
15974 # $configure_input" ;;
15975   *) ac_comsub= ;;
15976   esac
15977
15978   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15979   sed -e "$ac_comsub
15980 s%@configure_input@%$configure_input%g
15981 s%@srcdir@%$srcdir%g
15982 s%@top_srcdir@%$top_srcdir%g
15983 s%@INSTALL@%$INSTALL%g
15984 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15985 fi; done
15986 rm -f conftest.s*
15987
15988 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15989 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15990 #
15991 # ac_d sets the value in "#define NAME VALUE" lines.
15992 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15993 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15994 ac_dC='\3'
15995 ac_dD='%g'
15996 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15997 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15998 ac_uB='\([      ]\)%\1#\2define\3'
15999 ac_uC=' '
16000 ac_uD='\4%g'
16001 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16002 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16003 ac_eB='$%\1#\2define\3'
16004 ac_eC=' '
16005 ac_eD='%g'
16006
16007 if test "${CONFIG_HEADERS+set}" != set; then
16008 EOF
16009 cat >> $CONFIG_STATUS <<EOF
16010   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16011 EOF
16012 cat >> $CONFIG_STATUS <<\EOF
16013 fi
16014 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16015   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16016   case "$ac_file" in
16017   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16018        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16019   *) ac_file_in="${ac_file}.in" ;;
16020   esac
16021
16022   echo creating $ac_file
16023
16024   rm -f conftest.frag conftest.in conftest.out
16025   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16026   cat $ac_file_inputs > conftest.in
16027
16028 EOF
16029
16030 # Transform confdefs.h into a sed script conftest.vals that substitutes
16031 # the proper values into config.h.in to produce config.h.  And first:
16032 # Protect against being on the right side of a sed subst in config.status.
16033 # Protect against being in an unquoted here document in config.status.
16034 rm -f conftest.vals
16035 cat > conftest.hdr <<\EOF
16036 s/[\\&%]/\\&/g
16037 s%[\\$`]%\\&%g
16038 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16039 s%ac_d%ac_u%gp
16040 s%ac_u%ac_e%gp
16041 EOF
16042 sed -n -f conftest.hdr confdefs.h > conftest.vals
16043 rm -f conftest.hdr
16044
16045 # This sed command replaces #undef with comments.  This is necessary, for
16046 # example, in the case of _POSIX_SOURCE, which is predefined and required
16047 # on some systems where configure will not decide to define it.
16048 cat >> conftest.vals <<\EOF
16049 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16050 EOF
16051
16052 # Break up conftest.vals because some shells have a limit on
16053 # the size of here documents, and old seds have small limits too.
16054
16055 rm -f conftest.tail
16056 while :
16057 do
16058   ac_lines=`grep -c . conftest.vals`
16059   # grep -c gives empty output for an empty file on some AIX systems.
16060   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16061   # Write a limited-size here document to conftest.frag.
16062   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16063   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16064   echo 'CEOF
16065   sed -f conftest.frag conftest.in > conftest.out
16066   rm -f conftest.in
16067   mv conftest.out conftest.in
16068 ' >> $CONFIG_STATUS
16069   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16070   rm -f conftest.vals
16071   mv conftest.tail conftest.vals
16072 done
16073 rm -f conftest.vals
16074
16075 cat >> $CONFIG_STATUS <<\EOF
16076   rm -f conftest.frag conftest.h
16077   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16078   cat conftest.in >> conftest.h
16079   rm -f conftest.in
16080   if cmp -s $ac_file conftest.h 2>/dev/null; then
16081     echo "$ac_file is unchanged"
16082     rm -f conftest.h
16083   else
16084     # Remove last slash and all that follows it.  Not all systems have dirname.
16085       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16086       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16087       # The file is in a subdirectory.
16088       test ! -d "$ac_dir" && mkdir "$ac_dir"
16089     fi
16090     rm -f $ac_file
16091     mv conftest.h $ac_file
16092   fi
16093 fi; done
16094
16095 EOF
16096 cat >> $CONFIG_STATUS <<EOF
16097
16098 EOF
16099 cat >> $CONFIG_STATUS <<\EOF
16100
16101 date > stamp-h
16102 echo Please \"make depend\" to build dependencies
16103
16104 exit 0
16105 EOF
16106 chmod +x $CONFIG_STATUS
16107 rm -fr confdefs* $ac_clean_files
16108 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16109