]> git.sur5r.net Git - openldap/blob - configure
Import latest from devel
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.223.2.7 2000/07/06 16:45:22 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-local          enable AF_LOCAL (AF_UNIX) 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          with 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       with LDBM API (auto)"
101 ac_help="$ac_help
102     --with-ldbm-module    module type (static)"
103 ac_help="$ac_help
104     --with-ldbm-type      use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd       enable passwd backend (no)"
107 ac_help="$ac_help
108     --with-passwd-module  module type (static)"
109 ac_help="$ac_help
110     --enable-shell        enable shell backend (no)"
111 ac_help="$ac_help
112     --with-shell-module   module type (static)"
113 ac_help="$ac_help
114     --enable-sql          enable sql backend (no)"
115 ac_help="$ac_help
116     --with-sql-module     module type (static)"
117 ac_help="$ac_help
118 SLURPD (Replication Daemon) Options:"
119 ac_help="$ac_help
120   --enable-slurpd         enable building slurpd (auto)"
121 ac_help="$ac_help
122 Library Generation & Linking Options"
123 ac_help="$ac_help
124   --enable-static[=PKGS]  build static libraries [default=yes]"
125 ac_help="$ac_help
126   --enable-shared[=PKGS]  build shared libraries [default=yes]"
127 ac_help="$ac_help
128   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
129 ac_help="$ac_help
130   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
131 ac_help="$ac_help
132   --disable-libtool-lock  avoid locking (might break parallel builds)"
133
134 # Initialize some variables set by options.
135 # The variables have the same names as the options, with
136 # dashes changed to underlines.
137 build=NONE
138 cache_file=./config.cache
139 exec_prefix=NONE
140 host=NONE
141 no_create=
142 nonopt=NONE
143 no_recursion=
144 prefix=NONE
145 program_prefix=NONE
146 program_suffix=NONE
147 program_transform_name=s,x,x,
148 silent=
149 site=
150 srcdir=
151 target=NONE
152 verbose=
153 x_includes=NONE
154 x_libraries=NONE
155 bindir='${exec_prefix}/bin'
156 sbindir='${exec_prefix}/sbin'
157 libexecdir='${exec_prefix}/libexec'
158 datadir='${prefix}/share'
159 sysconfdir='${prefix}/etc'
160 sharedstatedir='${prefix}/com'
161 localstatedir='${prefix}/var'
162 libdir='${exec_prefix}/lib'
163 includedir='${prefix}/include'
164 oldincludedir='/usr/include'
165 infodir='${prefix}/info'
166 mandir='${prefix}/man'
167
168 # Initialize some other variables.
169 subdirs=
170 MFLAGS= MAKEFLAGS=
171 SHELL=${CONFIG_SHELL-/bin/sh}
172 # Maximum number of lines to put in a shell here document.
173 ac_max_here_lines=12
174
175 ac_prev=
176 for ac_option
177 do
178
179   # If the previous option needs an argument, assign it.
180   if test -n "$ac_prev"; then
181     eval "$ac_prev=\$ac_option"
182     ac_prev=
183     continue
184   fi
185
186   case "$ac_option" in
187   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
188   *) ac_optarg= ;;
189   esac
190
191   # Accept the important Cygnus configure options, so we can diagnose typos.
192
193   case "$ac_option" in
194
195   -bindir | --bindir | --bindi | --bind | --bin | --bi)
196     ac_prev=bindir ;;
197   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
198     bindir="$ac_optarg" ;;
199
200   -build | --build | --buil | --bui | --bu)
201     ac_prev=build ;;
202   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
203     build="$ac_optarg" ;;
204
205   -cache-file | --cache-file | --cache-fil | --cache-fi \
206   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
207     ac_prev=cache_file ;;
208   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
209   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
210     cache_file="$ac_optarg" ;;
211
212   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
213     ac_prev=datadir ;;
214   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
215   | --da=*)
216     datadir="$ac_optarg" ;;
217
218   -disable-* | --disable-*)
219     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
220     # Reject names that are not valid shell variable names.
221     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
222       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
223     fi
224     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
225     eval "enable_${ac_feature}=no" ;;
226
227   -enable-* | --enable-*)
228     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
229     # Reject names that are not valid shell variable names.
230     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
231       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
232     fi
233     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
234     case "$ac_option" in
235       *=*) ;;
236       *) ac_optarg=yes ;;
237     esac
238     eval "enable_${ac_feature}='$ac_optarg'" ;;
239
240   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
241   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
242   | --exec | --exe | --ex)
243     ac_prev=exec_prefix ;;
244   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
245   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
246   | --exec=* | --exe=* | --ex=*)
247     exec_prefix="$ac_optarg" ;;
248
249   -gas | --gas | --ga | --g)
250     # Obsolete; use --with-gas.
251     with_gas=yes ;;
252
253   -help | --help | --hel | --he)
254     # Omit some internal or obsolete options to make the list less imposing.
255     # This message is too long to be a string in the A/UX 3.1 sh.
256     cat << EOF
257 Usage: configure [options] [host]
258 Options: [defaults in brackets after descriptions]
259 Configuration:
260   --cache-file=FILE       cache test results in FILE
261   --help                  print this message
262   --no-create             do not create output files
263   --quiet, --silent       do not print \`checking...' messages
264   --version               print the version of autoconf that created configure
265 Directory and file names:
266   --prefix=PREFIX         install architecture-independent files in PREFIX
267                           [$ac_default_prefix]
268   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
269                           [same as prefix]
270   --bindir=DIR            user executables in DIR [EPREFIX/bin]
271   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
272   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
273   --datadir=DIR           read-only architecture-independent data in DIR
274                           [PREFIX/share]
275   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
276   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
277                           [PREFIX/com]
278   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
279   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
280   --includedir=DIR        C header files in DIR [PREFIX/include]
281   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
282   --infodir=DIR           info documentation in DIR [PREFIX/info]
283   --mandir=DIR            man documentation in DIR [PREFIX/man]
284   --srcdir=DIR            find the sources in DIR [configure dir or ..]
285   --program-prefix=PREFIX prepend PREFIX to installed program names
286   --program-suffix=SUFFIX append SUFFIX to installed program names
287   --program-transform-name=PROGRAM
288                           run sed PROGRAM on installed program names
289 EOF
290     cat << EOF
291 Host type:
292   --build=BUILD           configure for building on BUILD [BUILD=HOST]
293   --host=HOST             configure for HOST [guessed]
294   --target=TARGET         configure for TARGET [TARGET=HOST]
295 Features and packages:
296   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
297   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
298   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
299   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
300   --x-includes=DIR        X include files are in DIR
301   --x-libraries=DIR       X library files are in DIR
302 EOF
303     if test -n "$ac_help"; then
304       echo "--enable and --with options recognized:$ac_help"
305     fi
306     exit 0 ;;
307
308   -host | --host | --hos | --ho)
309     ac_prev=host ;;
310   -host=* | --host=* | --hos=* | --ho=*)
311     host="$ac_optarg" ;;
312
313   -includedir | --includedir | --includedi | --included | --include \
314   | --includ | --inclu | --incl | --inc)
315     ac_prev=includedir ;;
316   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
317   | --includ=* | --inclu=* | --incl=* | --inc=*)
318     includedir="$ac_optarg" ;;
319
320   -infodir | --infodir | --infodi | --infod | --info | --inf)
321     ac_prev=infodir ;;
322   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
323     infodir="$ac_optarg" ;;
324
325   -libdir | --libdir | --libdi | --libd)
326     ac_prev=libdir ;;
327   -libdir=* | --libdir=* | --libdi=* | --libd=*)
328     libdir="$ac_optarg" ;;
329
330   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
331   | --libexe | --libex | --libe)
332     ac_prev=libexecdir ;;
333   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
334   | --libexe=* | --libex=* | --libe=*)
335     libexecdir="$ac_optarg" ;;
336
337   -localstatedir | --localstatedir | --localstatedi | --localstated \
338   | --localstate | --localstat | --localsta | --localst \
339   | --locals | --local | --loca | --loc | --lo)
340     ac_prev=localstatedir ;;
341   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
342   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
343   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
344     localstatedir="$ac_optarg" ;;
345
346   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
347     ac_prev=mandir ;;
348   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
349     mandir="$ac_optarg" ;;
350
351   -nfp | --nfp | --nf)
352     # Obsolete; use --without-fp.
353     with_fp=no ;;
354
355   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
356   | --no-cr | --no-c)
357     no_create=yes ;;
358
359   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
360   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
361     no_recursion=yes ;;
362
363   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
364   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
365   | --oldin | --oldi | --old | --ol | --o)
366     ac_prev=oldincludedir ;;
367   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
368   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
369   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
370     oldincludedir="$ac_optarg" ;;
371
372   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
373     ac_prev=prefix ;;
374   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
375     prefix="$ac_optarg" ;;
376
377   -program-prefix | --program-prefix | --program-prefi | --program-pref \
378   | --program-pre | --program-pr | --program-p)
379     ac_prev=program_prefix ;;
380   -program-prefix=* | --program-prefix=* | --program-prefi=* \
381   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
382     program_prefix="$ac_optarg" ;;
383
384   -program-suffix | --program-suffix | --program-suffi | --program-suff \
385   | --program-suf | --program-su | --program-s)
386     ac_prev=program_suffix ;;
387   -program-suffix=* | --program-suffix=* | --program-suffi=* \
388   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
389     program_suffix="$ac_optarg" ;;
390
391   -program-transform-name | --program-transform-name \
392   | --program-transform-nam | --program-transform-na \
393   | --program-transform-n | --program-transform- \
394   | --program-transform | --program-transfor \
395   | --program-transfo | --program-transf \
396   | --program-trans | --program-tran \
397   | --progr-tra | --program-tr | --program-t)
398     ac_prev=program_transform_name ;;
399   -program-transform-name=* | --program-transform-name=* \
400   | --program-transform-nam=* | --program-transform-na=* \
401   | --program-transform-n=* | --program-transform-=* \
402   | --program-transform=* | --program-transfor=* \
403   | --program-transfo=* | --program-transf=* \
404   | --program-trans=* | --program-tran=* \
405   | --progr-tra=* | --program-tr=* | --program-t=*)
406     program_transform_name="$ac_optarg" ;;
407
408   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
409   | -silent | --silent | --silen | --sile | --sil)
410     silent=yes ;;
411
412   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
413     ac_prev=sbindir ;;
414   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
415   | --sbi=* | --sb=*)
416     sbindir="$ac_optarg" ;;
417
418   -sharedstatedir | --sharedstatedir | --sharedstatedi \
419   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
420   | --sharedst | --shareds | --shared | --share | --shar \
421   | --sha | --sh)
422     ac_prev=sharedstatedir ;;
423   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
424   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
425   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
426   | --sha=* | --sh=*)
427     sharedstatedir="$ac_optarg" ;;
428
429   -site | --site | --sit)
430     ac_prev=site ;;
431   -site=* | --site=* | --sit=*)
432     site="$ac_optarg" ;;
433
434   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
435     ac_prev=srcdir ;;
436   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
437     srcdir="$ac_optarg" ;;
438
439   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
440   | --syscon | --sysco | --sysc | --sys | --sy)
441     ac_prev=sysconfdir ;;
442   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
443   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
444     sysconfdir="$ac_optarg" ;;
445
446   -target | --target | --targe | --targ | --tar | --ta | --t)
447     ac_prev=target ;;
448   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
449     target="$ac_optarg" ;;
450
451   -v | -verbose | --verbose | --verbos | --verbo | --verb)
452     verbose=yes ;;
453
454   -version | --version | --versio | --versi | --vers)
455     echo "configure generated by autoconf version 2.13.1"
456     exit 0 ;;
457
458   -with-* | --with-*)
459     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
460     # Reject names that are not valid shell variable names.
461     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
462       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
463     fi
464     ac_package=`echo $ac_package| sed 's/-/_/g'`
465     case "$ac_option" in
466       *=*) ;;
467       *) ac_optarg=yes ;;
468     esac
469     eval "with_${ac_package}='$ac_optarg'" ;;
470
471   -without-* | --without-*)
472     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
473     # Reject names that are not valid shell variable names.
474     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
475       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
476     fi
477     ac_package=`echo $ac_package| sed 's/-/_/g'`
478     eval "with_${ac_package}=no" ;;
479
480   --x)
481     # Obsolete; use --with-x.
482     with_x=yes ;;
483
484   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
485   | --x-incl | --x-inc | --x-in | --x-i)
486     ac_prev=x_includes ;;
487   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
488   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
489     x_includes="$ac_optarg" ;;
490
491   -x-libraries | --x-libraries | --x-librarie | --x-librari \
492   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
493     ac_prev=x_libraries ;;
494   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
495   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
496     x_libraries="$ac_optarg" ;;
497
498   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
499     ;;
500
501   *)
502     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
503       echo "configure: warning: $ac_option: invalid host type" 1>&2
504     fi
505     if test "x$nonopt" != xNONE; then
506       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
507     fi
508     nonopt="$ac_option"
509     ;;
510
511   esac
512 done
513
514 if test -n "$ac_prev"; then
515   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
516 fi
517
518 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
519
520 # File descriptor usage:
521 # 0 standard input
522 # 1 file creation
523 # 2 errors and warnings
524 # 3 some systems may open it to /dev/tty
525 # 4 used on the Kubota Titan
526 # 6 checking for... messages and results
527 # 5 compiler messages saved in config.log
528 if test "$silent" = yes; then
529   exec 6>/dev/null
530 else
531   exec 6>&1
532 fi
533 exec 5>./config.log
534
535 echo "\
536 This file contains any messages produced by compilers while
537 running configure, to aid debugging if configure makes a mistake.
538 " 1>&5
539
540 # Strip out --no-create and --no-recursion so they do not pile up.
541 # Also quote any args containing shell metacharacters.
542 ac_configure_args=
543 for ac_arg
544 do
545   case "$ac_arg" in
546   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
547   | --no-cr | --no-c) ;;
548   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
549   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
550   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
551   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
552   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
553   esac
554 done
555
556 # NLS nuisances.
557 # Only set these to C if already set.  These must not be set unconditionally
558 # because not all systems understand e.g. LANG=C (notably SCO).
559 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
560 # Non-C LC_CTYPE values break the ctype check.
561 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
562 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
563 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
564 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
565
566 # confdefs.h avoids OS command line length limits that DEFS can exceed.
567 rm -rf conftest* confdefs.h
568 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
569 echo > confdefs.h
570
571 # A filename unique to this package, relative to the directory that
572 # configure is in, which we can look for to find out if srcdir is correct.
573 ac_unique_file=build/version
574
575 # Find the source files, if location was not specified.
576 if test -z "$srcdir"; then
577   ac_srcdir_defaulted=yes
578   # Try the directory containing this script, then its parent.
579   ac_prog=$0
580   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
581   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
582   srcdir=$ac_confdir
583   if test ! -r $srcdir/$ac_unique_file; then
584     srcdir=..
585   fi
586 else
587   ac_srcdir_defaulted=no
588 fi
589 if test ! -r $srcdir/$ac_unique_file; then
590   if test "$ac_srcdir_defaulted" = yes; then
591     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
592   else
593     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
594   fi
595 fi
596 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
597
598 # Prefer explicitly selected file to automatically selected ones.
599 if test -z "$CONFIG_SITE"; then
600   if test "x$prefix" != xNONE; then
601     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
602   else
603     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
604   fi
605 fi
606 for ac_site_file in $CONFIG_SITE; do
607   if test -r "$ac_site_file"; then
608     echo "loading site script $ac_site_file"
609     . "$ac_site_file"
610   fi
611 done
612
613
614 ac_ext=c
615 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
616 ac_cpp='$CPP $CPPFLAGS'
617 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
618 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
619 cross_compiling=$ac_cv_prog_cc_cross
620
621 ac_exeext=
622 ac_objext=o
623 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
624   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
625   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
626     ac_n= ac_c='
627 ' ac_t='        '
628   else
629     ac_n=-n ac_c= ac_t=
630   fi
631 else
632   ac_n= ac_c='\c' ac_t=
633 fi
634
635
636 # set unset (borrowed from autoconf 2.14a)
637 if (unset FOO) >/dev/null 2>&1; then
638   ol_unset=unset
639 else
640   ol_unset=false
641 fi
642 # unset CDPATH
643 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
644
645 ac_aux_dir=
646 for ac_dir in build $srcdir/build; do
647   if 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/install.sh; then
652     ac_aux_dir=$ac_dir
653     ac_install_sh="$ac_aux_dir/install.sh -c"
654     break
655   elif test -f $ac_dir/shtool; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/shtool install -c"
658     break
659   fi
660 done
661 if test -z "$ac_aux_dir"; then
662   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
663 fi
664 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
665 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
666 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
667
668 OL_VERSION=`cat $ac_aux_dir/version`
669 if test -z "$OL_VERSION"; then
670         { echo "configure: error: could not determine version" 1>&2; exit 1; }
671 fi
672
673 echo "Configuring OpenLDAP $OL_VERSION ..."
674
675
676 echo $ac_n "checking host system type""... $ac_c" 1>&6
677 echo "configure:678: checking host system type" >&5
678 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
679
680 # Make sure we can run config.sub.
681   if $ac_config_sub sun4 >/dev/null 2>&1; then :
682     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
683   fi
684
685   ac_cv_host_alias=$host
686   case "$ac_cv_host_alias" in
687   NONE)
688     case $nonopt in
689     NONE)
690       if ac_cv_host_alias=`$ac_config_guess`; then :
691       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
692       fi ;;
693     *) ac_cv_host_alias=$nonopt ;;
694     esac ;;
695   esac
696
697   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
698   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
699   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
700   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
701 else
702   echo $ac_n "(cached) $ac_c" 1>&6
703 fi
704
705 echo "$ac_t""$ac_cv_host" 1>&6
706
707 host=$ac_cv_host
708 host_alias=$ac_cv_host_alias
709 host_cpu=$ac_cv_host_cpu
710 host_vendor=$ac_cv_host_vendor
711 host_os=$ac_cv_host_os
712
713
714
715
716
717 echo $ac_n "checking target system type""... $ac_c" 1>&6
718 echo "configure:719: checking target system type" >&5
719 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
720
721 # Make sure we can run config.sub.
722   if $ac_config_sub sun4 >/dev/null 2>&1; then :
723     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
724   fi
725
726   ac_cv_target_alias=$target
727   case "$ac_cv_target_alias" in
728   NONE)
729     case $nonopt in
730     NONE)
731       ac_cv_target_alias=$host_alias ;;
732
733     *) ac_cv_target_alias=$nonopt ;;
734     esac ;;
735   esac
736
737   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
738   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
739   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
740   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
741 else
742   echo $ac_n "(cached) $ac_c" 1>&6
743 fi
744
745 echo "$ac_t""$ac_cv_target" 1>&6
746
747 target=$ac_cv_target
748 target_alias=$ac_cv_target_alias
749 target_cpu=$ac_cv_target_cpu
750 target_vendor=$ac_cv_target_vendor
751 target_os=$ac_cv_target_os
752
753
754
755
756
757 echo $ac_n "checking build system type""... $ac_c" 1>&6
758 echo "configure:759: checking build system type" >&5
759 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
760
761 # Make sure we can run config.sub.
762   if $ac_config_sub sun4 >/dev/null 2>&1; then :
763     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
764   fi
765
766   ac_cv_build_alias=$build
767   case "$ac_cv_build_alias" in
768   NONE)
769     case $nonopt in
770     NONE)
771       ac_cv_build_alias=$host_alias ;;
772
773     *) ac_cv_build_alias=$nonopt ;;
774     esac ;;
775   esac
776
777   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
778   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
779   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
780   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
781 else
782   echo $ac_n "(cached) $ac_c" 1>&6
783 fi
784
785 echo "$ac_t""$ac_cv_build" 1>&6
786
787 build=$ac_cv_build
788 build_alias=$ac_cv_build_alias
789 build_cpu=$ac_cv_build_cpu
790 build_vendor=$ac_cv_build_vendor
791 build_os=$ac_cv_build_os
792
793
794
795
796
797 # Do some error checking and defaulting for the host and target type.
798 # The inputs are:
799 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
800 #
801 # The rules are:
802 # 1. You are not allowed to specify --host, --target, and nonopt at the
803 #    same time.
804 # 2. Host defaults to nonopt.
805 # 3. If nonopt is not specified, then host defaults to the current host,
806 #    as determined by config.guess.
807 # 4. Target and build default to nonopt.
808 # 5. If nonopt is not specified, then target and build default to host.
809
810 # The aliases save the names the user supplied, while $host etc.
811 # will get canonicalized.
812 case $host---$target---$nonopt in
813 NONE---*---* | *---NONE---* | *---*---NONE) ;;
814 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
815 esac
816
817 test "$host_alias" != "$target_alias" &&
818   test "$program_prefix$program_suffix$program_transform_name" = \
819     NONENONEs,x,x, &&
820   program_prefix=${target_alias}-
821
822
823 # Find a good install program.  We prefer a C program (faster),
824 # so one script is as good as another.  But avoid the broken or
825 # incompatible versions:
826 # SysV /etc/install, /usr/sbin/install
827 # SunOS /usr/etc/install
828 # IRIX /sbin/install
829 # AIX /bin/install
830 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
831 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
832 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
833 # ./install, which can be erroneously created by make from ./install.sh.
834 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
835 echo "configure:836: checking for a BSD compatible install" >&5
836 if test -z "$INSTALL"; then
837 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
838   echo $ac_n "(cached) $ac_c" 1>&6
839 else
840     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
841   for ac_dir in $PATH; do
842     # Account for people who put trailing slashes in PATH elements.
843     case "$ac_dir/" in
844     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
845     *)
846       # OSF1 and SCO ODT 3.0 have their own names for install.
847       # Don't use installbsd from OSF since it installs stuff as root
848       # by default.
849       for ac_prog in ginstall scoinst install; do
850         if test -f $ac_dir/$ac_prog; then
851           if test $ac_prog = install &&
852             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
853             # AIX install.  It has an incompatible calling convention.
854             :
855           elif test $ac_prog = install &&
856             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
857             # program-specific install script used by HP pwplus--don't use.
858             :
859           else
860             ac_cv_path_install="$ac_dir/$ac_prog -c"
861             break 2
862           fi
863         fi
864       done
865       ;;
866     esac
867   done
868   IFS="$ac_save_IFS"
869
870 fi
871   if test "${ac_cv_path_install+set}" = set; then
872     INSTALL="$ac_cv_path_install"
873   else
874     # As a last resort, use the slow shell script.  We don't cache a
875     # path for INSTALL within a source directory, because that will
876     # break other packages using the cache if that directory is
877     # removed, or if the path is relative.
878     INSTALL="$ac_install_sh"
879   fi
880 fi
881 echo "$ac_t""$INSTALL" 1>&6
882
883 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
884 # It thinks the first close brace ends the variable substitution.
885 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
886
887 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
888
889 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
890
891 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
892 echo "configure:893: checking whether build environment is sane" >&5
893 # Just in case
894 sleep 1
895 echo timestamp > conftestfile
896 # Do `set' in a subshell so we don't clobber the current shell's
897 # arguments.  Must try -L first in case configure is actually a
898 # symlink; some systems play weird games with the mod time of symlinks
899 # (eg FreeBSD returns the mod time of the symlink's containing
900 # directory).
901 if (
902    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
903    if test "$*" = "X"; then
904       # -L didn't work.
905       set X `ls -t $srcdir/configure conftestfile`
906    fi
907    if test "$*" != "X $srcdir/configure conftestfile" \
908       && test "$*" != "X conftestfile $srcdir/configure"; then
909
910       # If neither matched, then we have a broken ls.  This can happen
911       # if, for instance, CONFIG_SHELL is bash and it inherits a
912       # broken ls alias from the environment.  This has actually
913       # happened.  Such a system could not be considered "sane".
914       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
915 alias in your environment" 1>&2; exit 1; }
916    fi
917
918    test "$2" = conftestfile
919    )
920 then
921    # Ok.
922    :
923 else
924    { echo "configure: error: newly created file is older than distributed files!
925 Check your system clock" 1>&2; exit 1; }
926 fi
927 rm -f conftest*
928 echo "$ac_t""yes" 1>&6
929 if test "$program_transform_name" = s,x,x,; then
930   program_transform_name=
931 else
932   # Double any \ or $.  echo might interpret backslashes.
933   cat <<\EOF_SED > conftestsed
934 s,\\,\\\\,g; s,\$,$$,g
935 EOF_SED
936   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
937   rm -f conftestsed
938 fi
939 test "$program_prefix" != NONE &&
940   program_transform_name="s,^,${program_prefix},;$program_transform_name"
941 # Use a double $ so make ignores it.
942 test "$program_suffix" != NONE &&
943   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
944
945 # sed with no file args requires a program.
946 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
947
948 for ac_prog in mawk gawk nawk awk
949 do
950 # Extract the first word of "$ac_prog", so it can be a program name with args.
951 set dummy $ac_prog; ac_word=$2
952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
953 echo "configure:954: checking for $ac_word" >&5
954 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
955   echo $ac_n "(cached) $ac_c" 1>&6
956 else
957   if test -n "$AWK"; then
958   ac_cv_prog_AWK="$AWK" # Let the user override the test.
959 else
960   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
961   ac_dummy="$PATH"
962   for ac_dir in $ac_dummy; do
963     test -z "$ac_dir" && ac_dir=.
964     if test -f $ac_dir/$ac_word; then
965       ac_cv_prog_AWK="$ac_prog"
966       break
967     fi
968   done
969   IFS="$ac_save_ifs"
970 fi
971 fi
972 AWK="$ac_cv_prog_AWK"
973 if test -n "$AWK"; then
974   echo "$ac_t""$AWK" 1>&6
975 else
976   echo "$ac_t""no" 1>&6
977 fi
978
979 test -n "$AWK" && break
980 done
981
982 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
983 echo "configure:984: checking whether ${MAKE-make} sets \${MAKE}" >&5
984 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
985 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
986   echo $ac_n "(cached) $ac_c" 1>&6
987 else
988   cat > conftestmake <<\EOF
989 all:
990         @echo 'ac_maketemp="${MAKE}"'
991 EOF
992 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
993 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
994 if test -n "$ac_maketemp"; then
995   eval ac_cv_prog_make_${ac_make}_set=yes
996 else
997   eval ac_cv_prog_make_${ac_make}_set=no
998 fi
999 rm -f conftestmake
1000 fi
1001 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1002   echo "$ac_t""yes" 1>&6
1003   SET_MAKE=
1004 else
1005   echo "$ac_t""no" 1>&6
1006   SET_MAKE="MAKE=${MAKE-make}"
1007 fi
1008
1009
1010
1011 PACKAGE=OpenLDAP
1012
1013 VERSION=$OL_VERSION
1014
1015 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1016   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1017 fi
1018
1019
1020
1021 missing_dir=`cd $ac_aux_dir && pwd`
1022 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1023 echo "configure:1024: checking for working aclocal" >&5
1024 # Run test in a subshell; some versions of sh will print an error if
1025 # an executable is not found, even if stderr is redirected.
1026 # Redirect stdin to placate older versions of autoconf.  Sigh.
1027 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1028    ACLOCAL=aclocal
1029    echo "$ac_t""found" 1>&6
1030 else
1031    ACLOCAL="$missing_dir/missing aclocal"
1032    echo "$ac_t""missing" 1>&6
1033 fi
1034
1035 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1036 echo "configure:1037: checking for working autoconf" >&5
1037 # Run test in a subshell; some versions of sh will print an error if
1038 # an executable is not found, even if stderr is redirected.
1039 # Redirect stdin to placate older versions of autoconf.  Sigh.
1040 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1041    AUTOCONF=autoconf
1042    echo "$ac_t""found" 1>&6
1043 else
1044    AUTOCONF="$missing_dir/missing autoconf"
1045    echo "$ac_t""missing" 1>&6
1046 fi
1047
1048 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1049 echo "configure:1050: checking for working automake" >&5
1050 # Run test in a subshell; some versions of sh will print an error if
1051 # an executable is not found, even if stderr is redirected.
1052 # Redirect stdin to placate older versions of autoconf.  Sigh.
1053 if (automake --version) < /dev/null > /dev/null 2>&1; then
1054    AUTOMAKE=automake
1055    echo "$ac_t""found" 1>&6
1056 else
1057    AUTOMAKE="$missing_dir/missing automake"
1058    echo "$ac_t""missing" 1>&6
1059 fi
1060
1061 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1062 echo "configure:1063: checking for working autoheader" >&5
1063 # Run test in a subshell; some versions of sh will print an error if
1064 # an executable is not found, even if stderr is redirected.
1065 # Redirect stdin to placate older versions of autoconf.  Sigh.
1066 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1067    AUTOHEADER=autoheader
1068    echo "$ac_t""found" 1>&6
1069 else
1070    AUTOHEADER="$missing_dir/missing autoheader"
1071    echo "$ac_t""missing" 1>&6
1072 fi
1073
1074 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1075 echo "configure:1076: checking for working makeinfo" >&5
1076 # Run test in a subshell; some versions of sh will print an error if
1077 # an executable is not found, even if stderr is redirected.
1078 # Redirect stdin to placate older versions of autoconf.  Sigh.
1079 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1080    MAKEINFO=makeinfo
1081    echo "$ac_t""found" 1>&6
1082 else
1083    MAKEINFO="$missing_dir/missing makeinfo"
1084    echo "$ac_t""missing" 1>&6
1085 fi
1086
1087 install_sh="$missing_dir/install-sh"
1088 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1089
1090 for ac_prog in gnutar gtar tar
1091 do
1092 # Extract the first word of "$ac_prog", so it can be a program name with args.
1093 set dummy $ac_prog; ac_word=$2
1094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1095 echo "configure:1096: checking for $ac_word" >&5
1096 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1097   echo $ac_n "(cached) $ac_c" 1>&6
1098 else
1099   if test -n "$AMTAR"; then
1100   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1101 else
1102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1103   ac_dummy="$PATH"
1104   for ac_dir in $ac_dummy; do
1105     test -z "$ac_dir" && ac_dir=.
1106     if test -f $ac_dir/$ac_word; then
1107       ac_cv_prog_AMTAR="$ac_prog"
1108       break
1109     fi
1110   done
1111   IFS="$ac_save_ifs"
1112 fi
1113 fi
1114 AMTAR="$ac_cv_prog_AMTAR"
1115 if test -n "$AMTAR"; then
1116   echo "$ac_t""$AMTAR" 1>&6
1117 else
1118   echo "$ac_t""no" 1>&6
1119 fi
1120
1121 test -n "$AMTAR" && break
1122 done
1123
1124
1125 AMTARFLAGS=
1126 if test -n "$AMTAR"; then
1127   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1128         AMTARFLAGS=o
1129   fi
1130 fi
1131
1132
1133
1134 cat >> confdefs.h <<EOF
1135 #define OPENLDAP_PACKAGE "$PACKAGE"
1136 EOF
1137
1138 cat >> confdefs.h <<EOF
1139 #define OPENLDAP_VERSION "$VERSION"
1140 EOF
1141
1142
1143
1144
1145 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1146 echo "configure:1147: checking configure arguments" >&5
1147
1148
1149 top_builddir=`pwd`
1150
1151 ldap_subdir="/openldap"
1152
1153 # Check whether --with-subdir or --without-subdir was given.
1154 if test "${with_subdir+set}" = set; then
1155   withval="$with_subdir"
1156   case "$withval" in
1157         no) ldap_subdir=""
1158                 ;;
1159         yes)
1160                 ;;
1161         /*|\\*)
1162                 ldap_subdir="$withval"
1163                 ;;
1164         *)
1165                 ldap_subdir="/$withval"
1166                 ;;
1167 esac
1168
1169 fi
1170
1171
1172 # OpenLDAP --enable-debug
1173         # Check whether --enable-debug or --disable-debug was given.
1174 if test "${enable_debug+set}" = set; then
1175   enableval="$enable_debug"
1176   
1177         ol_arg=invalid
1178         for ol_val in auto yes no ; do
1179                 if test "$enableval" = "$ol_val" ; then
1180                         ol_arg="$ol_val"
1181                 fi
1182         done
1183         if test "$ol_arg" = "invalid" ; then
1184                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1185         fi
1186         ol_enable_debug="$ol_arg"
1187
1188 else
1189         ol_enable_debug="yes"
1190 fi
1191 # end --enable-debug
1192 # OpenLDAP --enable-syslog
1193         # Check whether --enable-syslog or --disable-syslog was given.
1194 if test "${enable_syslog+set}" = set; then
1195   enableval="$enable_syslog"
1196   
1197         ol_arg=invalid
1198         for ol_val in auto yes no ; do
1199                 if test "$enableval" = "$ol_val" ; then
1200                         ol_arg="$ol_val"
1201                 fi
1202         done
1203         if test "$ol_arg" = "invalid" ; then
1204                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1205         fi
1206         ol_enable_syslog="$ol_arg"
1207
1208 else
1209         ol_enable_syslog="auto"
1210 fi
1211 # end --enable-syslog
1212 # OpenLDAP --enable-proctitle
1213         # Check whether --enable-proctitle or --disable-proctitle was given.
1214 if test "${enable_proctitle+set}" = set; then
1215   enableval="$enable_proctitle"
1216   
1217         ol_arg=invalid
1218         for ol_val in auto yes no ; do
1219                 if test "$enableval" = "$ol_val" ; then
1220                         ol_arg="$ol_val"
1221                 fi
1222         done
1223         if test "$ol_arg" = "invalid" ; then
1224                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1225         fi
1226         ol_enable_proctitle="$ol_arg"
1227
1228 else
1229         ol_enable_proctitle="yes"
1230 fi
1231 # end --enable-proctitle
1232 # OpenLDAP --enable-cache
1233         # Check whether --enable-cache or --disable-cache was given.
1234 if test "${enable_cache+set}" = set; then
1235   enableval="$enable_cache"
1236   
1237         ol_arg=invalid
1238         for ol_val in auto yes no ; do
1239                 if test "$enableval" = "$ol_val" ; then
1240                         ol_arg="$ol_val"
1241                 fi
1242         done
1243         if test "$ol_arg" = "invalid" ; then
1244                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1245         fi
1246         ol_enable_cache="$ol_arg"
1247
1248 else
1249         ol_enable_cache="yes"
1250 fi
1251 # end --enable-cache
1252 # OpenLDAP --enable-referrals
1253         # Check whether --enable-referrals or --disable-referrals was given.
1254 if test "${enable_referrals+set}" = set; then
1255   enableval="$enable_referrals"
1256   
1257         ol_arg=invalid
1258         for ol_val in auto yes no ; do
1259                 if test "$enableval" = "$ol_val" ; then
1260                         ol_arg="$ol_val"
1261                 fi
1262         done
1263         if test "$ol_arg" = "invalid" ; then
1264                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1265         fi
1266         ol_enable_referrals="$ol_arg"
1267
1268 else
1269         ol_enable_referrals="yes"
1270 fi
1271 # end --enable-referrals
1272 # OpenLDAP --enable-kbind
1273         # Check whether --enable-kbind or --disable-kbind was given.
1274 if test "${enable_kbind+set}" = set; then
1275   enableval="$enable_kbind"
1276   
1277         ol_arg=invalid
1278         for ol_val in auto yes no ; do
1279                 if test "$enableval" = "$ol_val" ; then
1280                         ol_arg="$ol_val"
1281                 fi
1282         done
1283         if test "$ol_arg" = "invalid" ; then
1284                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1285         fi
1286         ol_enable_kbind="$ol_arg"
1287
1288 else
1289         ol_enable_kbind="auto"
1290 fi
1291 # end --enable-kbind
1292 # OpenLDAP --enable-cldap
1293         # Check whether --enable-cldap or --disable-cldap was given.
1294 if test "${enable_cldap+set}" = set; then
1295   enableval="$enable_cldap"
1296   
1297         ol_arg=invalid
1298         for ol_val in auto yes no ; do
1299                 if test "$enableval" = "$ol_val" ; then
1300                         ol_arg="$ol_val"
1301                 fi
1302         done
1303         if test "$ol_arg" = "invalid" ; then
1304                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1305         fi
1306         ol_enable_cldap="$ol_arg"
1307
1308 else
1309         ol_enable_cldap="no"
1310 fi
1311 # end --enable-cldap
1312 # OpenLDAP --enable-ipv6
1313         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1314 if test "${enable_ipv6+set}" = set; then
1315   enableval="$enable_ipv6"
1316   
1317         ol_arg=invalid
1318         for ol_val in auto yes no ; do
1319                 if test "$enableval" = "$ol_val" ; then
1320                         ol_arg="$ol_val"
1321                 fi
1322         done
1323         if test "$ol_arg" = "invalid" ; then
1324                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1325         fi
1326         ol_enable_ipv6="$ol_arg"
1327
1328 else
1329         ol_enable_ipv6="auto"
1330 fi
1331 # end --enable-ipv6
1332 # OpenLDAP --enable-local
1333         # Check whether --enable-local or --disable-local was given.
1334 if test "${enable_local+set}" = set; then
1335   enableval="$enable_local"
1336   
1337         ol_arg=invalid
1338         for ol_val in auto yes no ; do
1339                 if test "$enableval" = "$ol_val" ; then
1340                         ol_arg="$ol_val"
1341                 fi
1342         done
1343         if test "$ol_arg" = "invalid" ; then
1344                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1345         fi
1346         ol_enable_local="$ol_arg"
1347
1348 else
1349         ol_enable_local="auto"
1350 fi
1351 # end --enable-local
1352 # OpenLDAP --enable-x_compile
1353         # Check whether --enable-x_compile or --disable-x_compile was given.
1354 if test "${enable_x_compile+set}" = set; then
1355   enableval="$enable_x_compile"
1356   
1357         ol_arg=invalid
1358         for ol_val in yes no ; do
1359                 if test "$enableval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1365         fi
1366         ol_enable_x_compile="$ol_arg"
1367
1368 else
1369         ol_enable_x_compile="no"
1370 fi
1371 # end --enable-x_compile
1372
1373
1374 # OpenLDAP --with-cyrus_sasl
1375         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1376 if test "${with_cyrus_sasl+set}" = set; then
1377   withval="$with_cyrus_sasl"
1378   
1379         ol_arg=invalid
1380         for ol_val in auto yes no  ; do
1381                 if test "$withval" = "$ol_val" ; then
1382                         ol_arg="$ol_val"
1383                 fi
1384         done
1385         if test "$ol_arg" = "invalid" ; then
1386                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1387         fi
1388         ol_with_cyrus_sasl="$ol_arg"
1389
1390 else
1391         ol_with_cyrus_sasl="auto"
1392 fi
1393 # end --with-cyrus_sasl
1394
1395 # OpenLDAP --with-fetch
1396         # Check whether --with-fetch or --without-fetch was given.
1397 if test "${with_fetch+set}" = set; then
1398   withval="$with_fetch"
1399   
1400         ol_arg=invalid
1401         for ol_val in auto yes no  ; do
1402                 if test "$withval" = "$ol_val" ; then
1403                         ol_arg="$ol_val"
1404                 fi
1405         done
1406         if test "$ol_arg" = "invalid" ; then
1407                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1408         fi
1409         ol_with_fetch="$ol_arg"
1410
1411 else
1412         ol_with_fetch="auto"
1413 fi
1414 # end --with-fetch
1415
1416 # OpenLDAP --with-kerberos
1417         # Check whether --with-kerberos or --without-kerberos was given.
1418 if test "${with_kerberos+set}" = set; then
1419   withval="$with_kerberos"
1420   
1421         ol_arg=invalid
1422         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1423                 if test "$withval" = "$ol_val" ; then
1424                         ol_arg="$ol_val"
1425                 fi
1426         done
1427         if test "$ol_arg" = "invalid" ; then
1428                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1429         fi
1430         ol_with_kerberos="$ol_arg"
1431
1432 else
1433         ol_with_kerberos="auto"
1434 fi
1435 # end --with-kerberos
1436
1437 # OpenLDAP --with-readline
1438         # Check whether --with-readline or --without-readline was given.
1439 if test "${with_readline+set}" = set; then
1440   withval="$with_readline"
1441   
1442         ol_arg=invalid
1443         for ol_val in auto yes no  ; do
1444                 if test "$withval" = "$ol_val" ; then
1445                         ol_arg="$ol_val"
1446                 fi
1447         done
1448         if test "$ol_arg" = "invalid" ; then
1449                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1450         fi
1451         ol_with_readline="$ol_arg"
1452
1453 else
1454         ol_with_readline="auto"
1455 fi
1456 # end --with-readline
1457
1458 # OpenLDAP --with-threads
1459         # Check whether --with-threads or --without-threads was given.
1460 if test "${with_threads+set}" = set; then
1461   withval="$with_threads"
1462   
1463         ol_arg=invalid
1464         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1465                 if test "$withval" = "$ol_val" ; then
1466                         ol_arg="$ol_val"
1467                 fi
1468         done
1469         if test "$ol_arg" = "invalid" ; then
1470                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1471         fi
1472         ol_with_threads="$ol_arg"
1473
1474 else
1475         ol_with_threads="auto"
1476 fi
1477 # end --with-threads
1478
1479 # OpenLDAP --with-tls
1480         # Check whether --with-tls or --without-tls was given.
1481 if test "${with_tls+set}" = set; then
1482   withval="$with_tls"
1483   
1484         ol_arg=invalid
1485         for ol_val in auto ssleay openssl yes no  ; do
1486                 if test "$withval" = "$ol_val" ; then
1487                         ol_arg="$ol_val"
1488                 fi
1489         done
1490         if test "$ol_arg" = "invalid" ; then
1491                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1492         fi
1493         ol_with_tls="$ol_arg"
1494
1495 else
1496         ol_with_tls="auto"
1497 fi
1498 # end --with-tls
1499
1500 # OpenLDAP --with-yielding_select
1501         # Check whether --with-yielding_select or --without-yielding_select was given.
1502 if test "${with_yielding_select+set}" = set; then
1503   withval="$with_yielding_select"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no manual  ; do
1507                 if test "$withval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1513         fi
1514         ol_with_yielding_select="$ol_arg"
1515
1516 else
1517         ol_with_yielding_select="auto"
1518 fi
1519 # end --with-yielding_select
1520
1521
1522
1523 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1524 if test "${with_xxslapdoptions+set}" = set; then
1525   withval="$with_xxslapdoptions"
1526   :
1527 fi
1528
1529 # OpenLDAP --enable-slapd
1530         # Check whether --enable-slapd or --disable-slapd was given.
1531 if test "${enable_slapd+set}" = set; then
1532   enableval="$enable_slapd"
1533   
1534         ol_arg=invalid
1535         for ol_val in auto yes no ; do
1536                 if test "$enableval" = "$ol_val" ; then
1537                         ol_arg="$ol_val"
1538                 fi
1539         done
1540         if test "$ol_arg" = "invalid" ; then
1541                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1542         fi
1543         ol_enable_slapd="$ol_arg"
1544
1545 else
1546         ol_enable_slapd="yes"
1547 fi
1548 # end --enable-slapd
1549 # OpenLDAP --enable-cleartext
1550         # Check whether --enable-cleartext or --disable-cleartext was given.
1551 if test "${enable_cleartext+set}" = set; then
1552   enableval="$enable_cleartext"
1553   
1554         ol_arg=invalid
1555         for ol_val in auto yes no ; do
1556                 if test "$enableval" = "$ol_val" ; then
1557                         ol_arg="$ol_val"
1558                 fi
1559         done
1560         if test "$ol_arg" = "invalid" ; then
1561                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1562         fi
1563         ol_enable_cleartext="$ol_arg"
1564
1565 else
1566         ol_enable_cleartext="yes"
1567 fi
1568 # end --enable-cleartext
1569 # OpenLDAP --enable-crypt
1570         # Check whether --enable-crypt or --disable-crypt was given.
1571 if test "${enable_crypt+set}" = set; then
1572   enableval="$enable_crypt"
1573   
1574         ol_arg=invalid
1575         for ol_val in auto yes no ; do
1576                 if test "$enableval" = "$ol_val" ; then
1577                         ol_arg="$ol_val"
1578                 fi
1579         done
1580         if test "$ol_arg" = "invalid" ; then
1581                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1582         fi
1583         ol_enable_crypt="$ol_arg"
1584
1585 else
1586         ol_enable_crypt="auto"
1587 fi
1588 # end --enable-crypt
1589 # OpenLDAP --enable-kpasswd
1590         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1591 if test "${enable_kpasswd+set}" = set; then
1592   enableval="$enable_kpasswd"
1593   
1594         ol_arg=invalid
1595         for ol_val in auto yes no ; do
1596                 if test "$enableval" = "$ol_val" ; then
1597                         ol_arg="$ol_val"
1598                 fi
1599         done
1600         if test "$ol_arg" = "invalid" ; then
1601                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1602         fi
1603         ol_enable_kpasswd="$ol_arg"
1604
1605 else
1606         ol_enable_kpasswd="no"
1607 fi
1608 # end --enable-kpasswd
1609 # OpenLDAP --enable-spasswd
1610         # Check whether --enable-spasswd or --disable-spasswd was given.
1611 if test "${enable_spasswd+set}" = set; then
1612   enableval="$enable_spasswd"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no ; do
1616                 if test "$enableval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1622         fi
1623         ol_enable_spasswd="$ol_arg"
1624
1625 else
1626         ol_enable_spasswd="no"
1627 fi
1628 # end --enable-spasswd
1629 # OpenLDAP --enable-modules
1630         # Check whether --enable-modules or --disable-modules was given.
1631 if test "${enable_modules+set}" = set; then
1632   enableval="$enable_modules"
1633   
1634         ol_arg=invalid
1635         for ol_val in auto yes no ; do
1636                 if test "$enableval" = "$ol_val" ; then
1637                         ol_arg="$ol_val"
1638                 fi
1639         done
1640         if test "$ol_arg" = "invalid" ; then
1641                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1642         fi
1643         ol_enable_modules="$ol_arg"
1644
1645 else
1646         ol_enable_modules="no"
1647 fi
1648 # end --enable-modules
1649 # OpenLDAP --enable-multimaster
1650         # Check whether --enable-multimaster or --disable-multimaster was given.
1651 if test "${enable_multimaster+set}" = set; then
1652   enableval="$enable_multimaster"
1653   
1654         ol_arg=invalid
1655         for ol_val in auto yes no ; do
1656                 if test "$enableval" = "$ol_val" ; then
1657                         ol_arg="$ol_val"
1658                 fi
1659         done
1660         if test "$ol_arg" = "invalid" ; then
1661                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1662         fi
1663         ol_enable_multimaster="$ol_arg"
1664
1665 else
1666         ol_enable_multimaster="no"
1667 fi
1668 # end --enable-multimaster
1669 # OpenLDAP --enable-phonetic
1670         # Check whether --enable-phonetic or --disable-phonetic was given.
1671 if test "${enable_phonetic+set}" = set; then
1672   enableval="$enable_phonetic"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1682         fi
1683         ol_enable_phonetic="$ol_arg"
1684
1685 else
1686         ol_enable_phonetic="no"
1687 fi
1688 # end --enable-phonetic
1689 # OpenLDAP --enable-rlookups
1690         # Check whether --enable-rlookups or --disable-rlookups was given.
1691 if test "${enable_rlookups+set}" = set; then
1692   enableval="$enable_rlookups"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1702         fi
1703         ol_enable_rlookups="$ol_arg"
1704
1705 else
1706         ol_enable_rlookups="auto"
1707 fi
1708 # end --enable-rlookups
1709 # OpenLDAP --enable-aci
1710         # Check whether --enable-aci or --disable-aci was given.
1711 if test "${enable_aci+set}" = set; then
1712   enableval="$enable_aci"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1722         fi
1723         ol_enable_aci="$ol_arg"
1724
1725 else
1726         ol_enable_aci="no"
1727 fi
1728 # end --enable-aci
1729 # OpenLDAP --enable-wrappers
1730         # Check whether --enable-wrappers or --disable-wrappers was given.
1731 if test "${enable_wrappers+set}" = set; then
1732   enableval="$enable_wrappers"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1742         fi
1743         ol_enable_wrappers="$ol_arg"
1744
1745 else
1746         ol_enable_wrappers="no"
1747 fi
1748 # end --enable-wrappers
1749 # OpenLDAP --enable-dynamic
1750         # Check whether --enable-dynamic or --disable-dynamic was given.
1751 if test "${enable_dynamic+set}" = set; then
1752   enableval="$enable_dynamic"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1762         fi
1763         ol_enable_dynamic="$ol_arg"
1764
1765 else
1766         ol_enable_dynamic="no"
1767 fi
1768 # end --enable-dynamic
1769
1770 # OpenLDAP --enable-dnssrv
1771         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1772 if test "${enable_dnssrv+set}" = set; then
1773   enableval="$enable_dnssrv"
1774   
1775         ol_arg=invalid
1776         for ol_val in auto yes no ; do
1777                 if test "$enableval" = "$ol_val" ; then
1778                         ol_arg="$ol_val"
1779                 fi
1780         done
1781         if test "$ol_arg" = "invalid" ; then
1782                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1783         fi
1784         ol_enable_dnssrv="$ol_arg"
1785
1786 else
1787         ol_enable_dnssrv="no"
1788 fi
1789 # end --enable-dnssrv
1790 # OpenLDAP --with-dnssrv_module
1791         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1792 if test "${with_dnssrv_module+set}" = set; then
1793   withval="$with_dnssrv_module"
1794   
1795         ol_arg=invalid
1796         for ol_val in static dynamic ; do
1797                 if test "$withval" = "$ol_val" ; then
1798                         ol_arg="$ol_val"
1799                 fi
1800         done
1801         if test "$ol_arg" = "invalid" ; then
1802                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1803         fi
1804         ol_with_dnssrv_module="$ol_arg"
1805
1806 else
1807         ol_with_dnssrv_module="static"
1808 fi
1809 # end --with-dnssrv_module
1810
1811 # OpenLDAP --enable-ldap
1812         # Check whether --enable-ldap or --disable-ldap was given.
1813 if test "${enable_ldap+set}" = set; then
1814   enableval="$enable_ldap"
1815   
1816         ol_arg=invalid
1817         for ol_val in auto yes no ; do
1818                 if test "$enableval" = "$ol_val" ; then
1819                         ol_arg="$ol_val"
1820                 fi
1821         done
1822         if test "$ol_arg" = "invalid" ; then
1823                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1824         fi
1825         ol_enable_ldap="$ol_arg"
1826
1827 else
1828         ol_enable_ldap="no"
1829 fi
1830 # end --enable-ldap
1831 # OpenLDAP --with-ldap_module
1832         # Check whether --with-ldap_module or --without-ldap_module was given.
1833 if test "${with_ldap_module+set}" = set; then
1834   withval="$with_ldap_module"
1835   
1836         ol_arg=invalid
1837         for ol_val in static dynamic ; do
1838                 if test "$withval" = "$ol_val" ; then
1839                         ol_arg="$ol_val"
1840                 fi
1841         done
1842         if test "$ol_arg" = "invalid" ; then
1843                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1844         fi
1845         ol_with_ldap_module="$ol_arg"
1846
1847 else
1848         ol_with_ldap_module="static"
1849 fi
1850 # end --with-ldap_module
1851
1852 # OpenLDAP --enable-ldbm
1853         # Check whether --enable-ldbm or --disable-ldbm was given.
1854 if test "${enable_ldbm+set}" = set; then
1855   enableval="$enable_ldbm"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1865         fi
1866         ol_enable_ldbm="$ol_arg"
1867
1868 else
1869         ol_enable_ldbm="yes"
1870 fi
1871 # end --enable-ldbm
1872 # OpenLDAP --with-ldbm_api
1873         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1874 if test "${with_ldbm_api+set}" = set; then
1875   withval="$with_ldbm_api"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1879                 if test "$withval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1885         fi
1886         ol_with_ldbm_api="$ol_arg"
1887
1888 else
1889         ol_with_ldbm_api="auto"
1890 fi
1891 # end --with-ldbm_api
1892
1893 # OpenLDAP --with-ldbm_module
1894         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1895 if test "${with_ldbm_module+set}" = set; then
1896   withval="$with_ldbm_module"
1897   
1898         ol_arg=invalid
1899         for ol_val in static dynamic ; do
1900                 if test "$withval" = "$ol_val" ; then
1901                         ol_arg="$ol_val"
1902                 fi
1903         done
1904         if test "$ol_arg" = "invalid" ; then
1905                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1906         fi
1907         ol_with_ldbm_module="$ol_arg"
1908
1909 else
1910         ol_with_ldbm_module="static"
1911 fi
1912 # end --with-ldbm_module
1913
1914 # OpenLDAP --with-ldbm_type
1915         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1916 if test "${with_ldbm_type+set}" = set; then
1917   withval="$with_ldbm_type"
1918   
1919         ol_arg=invalid
1920         for ol_val in auto btree hash ; do
1921                 if test "$withval" = "$ol_val" ; then
1922                         ol_arg="$ol_val"
1923                 fi
1924         done
1925         if test "$ol_arg" = "invalid" ; then
1926                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1927         fi
1928         ol_with_ldbm_type="$ol_arg"
1929
1930 else
1931         ol_with_ldbm_type="auto"
1932 fi
1933 # end --with-ldbm_type
1934
1935 # OpenLDAP --enable-passwd
1936         # Check whether --enable-passwd or --disable-passwd was given.
1937 if test "${enable_passwd+set}" = set; then
1938   enableval="$enable_passwd"
1939   
1940         ol_arg=invalid
1941         for ol_val in auto yes no ; do
1942                 if test "$enableval" = "$ol_val" ; then
1943                         ol_arg="$ol_val"
1944                 fi
1945         done
1946         if test "$ol_arg" = "invalid" ; then
1947                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1948         fi
1949         ol_enable_passwd="$ol_arg"
1950
1951 else
1952         ol_enable_passwd="no"
1953 fi
1954 # end --enable-passwd
1955 # OpenLDAP --with-passwd_module
1956         # Check whether --with-passwd_module or --without-passwd_module was given.
1957 if test "${with_passwd_module+set}" = set; then
1958   withval="$with_passwd_module"
1959   
1960         ol_arg=invalid
1961         for ol_val in static dynamic ; do
1962                 if test "$withval" = "$ol_val" ; then
1963                         ol_arg="$ol_val"
1964                 fi
1965         done
1966         if test "$ol_arg" = "invalid" ; then
1967                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1968         fi
1969         ol_with_passwd_module="$ol_arg"
1970
1971 else
1972         ol_with_passwd_module="static"
1973 fi
1974 # end --with-passwd_module
1975
1976 # OpenLDAP --enable-shell
1977         # Check whether --enable-shell or --disable-shell was given.
1978 if test "${enable_shell+set}" = set; then
1979   enableval="$enable_shell"
1980   
1981         ol_arg=invalid
1982         for ol_val in auto yes no ; do
1983                 if test "$enableval" = "$ol_val" ; then
1984                         ol_arg="$ol_val"
1985                 fi
1986         done
1987         if test "$ol_arg" = "invalid" ; then
1988                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1989         fi
1990         ol_enable_shell="$ol_arg"
1991
1992 else
1993         ol_enable_shell="no"
1994 fi
1995 # end --enable-shell
1996 # OpenLDAP --with-shell_module
1997         # Check whether --with-shell_module or --without-shell_module was given.
1998 if test "${with_shell_module+set}" = set; then
1999   withval="$with_shell_module"
2000   
2001         ol_arg=invalid
2002         for ol_val in static dynamic ; do
2003                 if test "$withval" = "$ol_val" ; then
2004                         ol_arg="$ol_val"
2005                 fi
2006         done
2007         if test "$ol_arg" = "invalid" ; then
2008                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2009         fi
2010         ol_with_shell_module="$ol_arg"
2011
2012 else
2013         ol_with_shell_module="static"
2014 fi
2015 # end --with-shell_module
2016
2017 # OpenLDAP --enable-sql
2018         # Check whether --enable-sql or --disable-sql was given.
2019 if test "${enable_sql+set}" = set; then
2020   enableval="$enable_sql"
2021   
2022         ol_arg=invalid
2023         for ol_val in auto yes no ; do
2024                 if test "$enableval" = "$ol_val" ; then
2025                         ol_arg="$ol_val"
2026                 fi
2027         done
2028         if test "$ol_arg" = "invalid" ; then
2029                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2030         fi
2031         ol_enable_sql="$ol_arg"
2032
2033 else
2034         ol_enable_sql="no"
2035 fi
2036 # end --enable-sql
2037 # OpenLDAP --with-sql_module
2038         # Check whether --with-sql_module or --without-sql_module was given.
2039 if test "${with_sql_module+set}" = set; then
2040   withval="$with_sql_module"
2041   
2042         ol_arg=invalid
2043         for ol_val in static dynamic ; do
2044                 if test "$withval" = "$ol_val" ; then
2045                         ol_arg="$ol_val"
2046                 fi
2047         done
2048         if test "$ol_arg" = "invalid" ; then
2049                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2050         fi
2051         ol_with_sql_module="$ol_arg"
2052
2053 else
2054         ol_with_sql_module="static"
2055 fi
2056 # end --with-sql_module
2057
2058
2059 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2060 if test "${with_xxslurpdoptions+set}" = set; then
2061   withval="$with_xxslurpdoptions"
2062   :
2063 fi
2064
2065 # OpenLDAP --enable-slurpd
2066         # Check whether --enable-slurpd or --disable-slurpd was given.
2067 if test "${enable_slurpd+set}" = set; then
2068   enableval="$enable_slurpd"
2069   
2070         ol_arg=invalid
2071         for ol_val in auto yes no ; do
2072                 if test "$enableval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2078         fi
2079         ol_enable_slurpd="$ol_arg"
2080
2081 else
2082         ol_enable_slurpd="auto"
2083 fi
2084 # end --enable-slurpd
2085
2086 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2087 if test "${with_xxliboptions+set}" = set; then
2088   withval="$with_xxliboptions"
2089   :
2090 fi
2091
2092 # Check whether --enable-static or --disable-static was given.
2093 if test "${enable_static+set}" = set; then
2094   enableval="$enable_static"
2095   p=${PACKAGE-default}
2096 case "$enableval" in
2097 yes) enable_static=yes ;;
2098 no) enable_static=no ;;
2099 *)
2100   enable_static=no
2101   # Look at the argument we got.  We use all the common list separators.
2102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2103   for pkg in $enableval; do
2104     if test "X$pkg" = "X$p"; then
2105       enable_static=yes
2106     fi
2107   done
2108   IFS="$ac_save_ifs"
2109   ;;
2110 esac
2111 else
2112   enable_static=yes
2113 fi
2114
2115 # Check whether --enable-shared or --disable-shared was given.
2116 if test "${enable_shared+set}" = set; then
2117   enableval="$enable_shared"
2118   p=${PACKAGE-default}
2119 case "$enableval" in
2120 yes) enable_shared=yes ;;
2121 no) enable_shared=no ;;
2122 *)
2123   enable_shared=no
2124   # Look at the argument we got.  We use all the common list separators.
2125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2126   for pkg in $enableval; do
2127     if test "X$pkg" = "X$p"; then
2128       enable_shared=yes
2129     fi
2130   done
2131   IFS="$ac_save_ifs"
2132   ;;
2133 esac
2134 else
2135   enable_shared=yes
2136 fi
2137
2138
2139
2140 # validate options
2141 if test $ol_enable_slapd = no ; then
2142                 if test $ol_enable_dnssrv = yes ; then
2143                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2144         fi
2145         if test $ol_enable_ldap = yes ; then
2146                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2147         fi
2148         if test $ol_enable_ldbm = yes ; then
2149                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2150         fi
2151         if test $ol_enable_passwd = yes ; then
2152                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2153         fi
2154         if test $ol_enable_shell = yes ; then
2155                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2156         fi
2157         if test $ol_enable_sql = yes ; then
2158                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2159         fi
2160         if test $ol_enable_modules = yes ; then
2161                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2162         fi
2163         if test $ol_enable_multimaster = yes ; then
2164                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2165         fi
2166         if test $ol_enable_wrappers = yes ; then
2167                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2168         fi
2169         if test $ol_enable_phonetic = yes ; then
2170                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2171         fi
2172         if test $ol_enable_rlookups = yes ; then
2173                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2174         fi
2175         if test $ol_enable_aci = yes ; then
2176                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2177         fi
2178         if test $ol_with_ldbm_api != auto ; then
2179                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2180         fi
2181         if test $ol_with_ldbm_type != auto ; then
2182                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2183         fi
2184         if test $ol_with_dnssrv_module != static ; then
2185                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2186         fi
2187         if test $ol_with_ldap_module != static ; then
2188                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2189         fi
2190         if test $ol_with_ldbm_module != static ; then
2191                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2192         fi
2193         if test $ol_with_passwd_module != static ; then
2194                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2195         fi
2196         if test $ol_with_shell_module != static ; then
2197                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2198         fi
2199         if test $ol_with_sql_module != static ; then
2200                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2201         fi
2202         if test $ol_enable_slurpd = yes ; then
2203                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2204         fi
2205
2206         # force settings to no
2207         ol_enable_dnssrv=no
2208         ol_enable_ldap=no
2209         ol_enable_ldbm=no
2210         ol_enable_passwd=no
2211         ol_enable_shell=no
2212         ol_enable_sql=no
2213
2214         ol_enable_modules=no
2215         ol_enable_multimaster=no
2216         ol_enable_phonetic=no
2217         ol_enable_rlookups=no
2218         ol_enable_aci=no
2219         ol_enable_wrappers=no
2220         ol_enable_dynamic=no
2221
2222         ol_with_ldbm_api=no
2223         ol_with_ldbm_type=no
2224
2225         ol_with_dnssrv_module=static
2226         ol_with_ldap_module=static
2227         ol_with_ldbm_module=static
2228         ol_with_passwd_module=static
2229         ol_with_shell_module=static
2230         ol_with_sql_module=static
2231
2232         ol_enable_slurpd=no
2233
2234 elif test $ol_enable_ldbm = no ; then
2235         
2236         if test $ol_with_ldbm_api != auto ; then
2237                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2238         fi
2239
2240         if test $ol_with_ldbm_type != auto ; then
2241                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2242         fi
2243
2244         if test $ol_with_ldbm_module != static ; then
2245                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2246         fi
2247
2248         if test $ol_enable_modules != yes -a \
2249                 $ol_enable_dnssrv = no -a \
2250                 $ol_enable_ldap = no -a \
2251                 $ol_enable_passwd = no -a \
2252                 $ol_enable_shell = no -a \
2253                 $ol_enable_sql = no ; then
2254                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2255         fi
2256
2257         ol_with_ldbm_api=no
2258         ol_with_ldbm_type=no
2259         ol_with_ldbm_module=static
2260
2261 else
2262                 if test $ol_with_ldbm_api = gdbm -a \
2263                 $ol_with_ldbm_type = btree ; then
2264                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2265         fi
2266         if test $ol_with_ldbm_api = mdbm -a \
2267                 $ol_with_ldbm_type = btree ; then
2268                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2269         fi
2270         if test $ol_with_ldbm_api = ndbm -a \
2271                 $ol_with_ldbm_type = btree ; then
2272                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2273         fi
2274 fi
2275
2276 if test $ol_enable_slurpd = yes ; then
2277                 if test $ol_with_threads = no ; then
2278                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2279         fi
2280 fi
2281
2282 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2283         if test $ol_with_kerberos = no ; then
2284                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2285         fi
2286 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2287         if test $ol_with_kerberos != auto ; then
2288                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2289         else
2290                 ol_with_kerberos=no
2291         fi
2292 fi
2293
2294 if test $ol_enable_spasswd = yes ; then
2295         if test $ol_with_cyrus_sasl = no ; then
2296                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2297         fi
2298         ol_link_spasswd=yes
2299 fi
2300
2301 echo "$ac_t""done" 1>&6
2302
2303 LDAP_LIBS=
2304 LDIF_LIBS=
2305 LDBM_LIBS=
2306 LTHREAD_LIBS=
2307 LUTIL_LIBS=
2308
2309 SLAPD_LIBS=
2310 SLURPD_LIBS=
2311
2312 BUILD_SLAPD=no
2313 BUILD_SLURPD=no
2314
2315 BUILD_THREAD=no
2316
2317 BUILD_DNSSRV=no
2318 BUILD_LDAP=no
2319 BUILD_LDBM=no
2320 BUILD_PASSWD=no
2321 BUILD_SHELL=no
2322 BUILD_SQL=no
2323
2324 BUILD_DNSSRV_DYNAMIC=static
2325 BUILD_LDAP_DYNAMIC=static
2326 BUILD_LDBM_DYNAMIC=static
2327 BUILD_PASSWD_DYNAMIC=static
2328 BUILD_SHELL_DYNAMIC=static
2329 BUILD_SQL_DYNAMIC=static
2330
2331 SLAPD_MODULES_LDFLAGS=
2332 SLAPD_MODULES_CPPFLAGS=
2333 SLAPD_MODULES_LIST=
2334
2335 SLAPD_SQL_LDFLAGS=
2336 SLAPD_SQL_LIBS=
2337 SLAPD_SQL_INCLUDES=
2338
2339 KRB4_LIBS=
2340 KRB5_LIBS=
2341 READLINE_LIBS=
2342 SASL_LIBS=
2343 TERMCAP_LIBS=
2344 TLS_LIBS=
2345 MODULES_LIBS=
2346 AUTH_LIBS=
2347
2348
2349
2350 cat >> confdefs.h <<\EOF
2351 #define HAVE_MKVERSION 1
2352 EOF
2353
2354
2355
2356
2357 ol_aix_threads=no
2358 case "$target" in
2359 *-*-aix*)       if test -z "$CC" ; then
2360                 case "$ol_with_threads" in
2361                 auto | yes |  posix) ol_aix_threads=yes ;;
2362                 esac
2363         fi
2364 ;;
2365 esac
2366
2367 if test $ol_aix_threads = yes ; then
2368         if test -z "${CC}" ; then
2369                 for ac_prog in cc_r xlc_r cc
2370 do
2371 # Extract the first word of "$ac_prog", so it can be a program name with args.
2372 set dummy $ac_prog; ac_word=$2
2373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2374 echo "configure:2375: checking for $ac_word" >&5
2375 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2376   echo $ac_n "(cached) $ac_c" 1>&6
2377 else
2378   if test -n "$CC"; then
2379   ac_cv_prog_CC="$CC" # Let the user override the test.
2380 else
2381   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2382   ac_dummy="$PATH"
2383   for ac_dir in $ac_dummy; do
2384     test -z "$ac_dir" && ac_dir=.
2385     if test -f $ac_dir/$ac_word; then
2386       ac_cv_prog_CC="$ac_prog"
2387       break
2388     fi
2389   done
2390   IFS="$ac_save_ifs"
2391 fi
2392 fi
2393 CC="$ac_cv_prog_CC"
2394 if test -n "$CC"; then
2395   echo "$ac_t""$CC" 1>&6
2396 else
2397   echo "$ac_t""no" 1>&6
2398 fi
2399
2400 test -n "$CC" && break
2401 done
2402
2403
2404                 if test "$CC" = cc ; then
2405                                                 if test $ol_with_threads != auto ; then
2406                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2407                         else
2408                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2409                         fi
2410                         ol_with_threads=no
2411                 fi
2412         fi
2413
2414         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2415                 ol_with_threads=posix
2416                 ol_cv_pthread_create=yes
2417         fi
2418 fi
2419
2420 if test -z "${CC}"; then
2421         for ac_prog in cc
2422 do
2423 # Extract the first word of "$ac_prog", so it can be a program name with args.
2424 set dummy $ac_prog; 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_CC+set}\" = set"; then
2428   echo $ac_n "(cached) $ac_c" 1>&6
2429 else
2430   if test -n "$CC"; then
2431   ac_cv_prog_CC="$CC" # 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_CC="$ac_prog"
2439       break
2440     fi
2441   done
2442   IFS="$ac_save_ifs"
2443 fi
2444 fi
2445 CC="$ac_cv_prog_CC"
2446 if test -n "$CC"; then
2447   echo "$ac_t""$CC" 1>&6
2448 else
2449   echo "$ac_t""no" 1>&6
2450 fi
2451
2452 test -n "$CC" && break
2453 done
2454
2455 fi
2456
2457
2458
2459
2460 # Check whether --enable-fast-install or --disable-fast-install was given.
2461 if test "${enable_fast_install+set}" = set; then
2462   enableval="$enable_fast_install"
2463   p=${PACKAGE-default}
2464 case "$enableval" in
2465 yes) enable_fast_install=yes ;;
2466 no) enable_fast_install=no ;;
2467 *)
2468   enable_fast_install=no
2469   # Look at the argument we got.  We use all the common list separators.
2470   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2471   for pkg in $enableval; do
2472     if test "X$pkg" = "X$p"; then
2473       enable_fast_install=yes
2474     fi
2475   done
2476   IFS="$ac_save_ifs"
2477   ;;
2478 esac
2479 else
2480   enable_fast_install=yes
2481 fi
2482
2483 # Extract the first word of "ranlib", so it can be a program name with args.
2484 set dummy ranlib; 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_RANLIB+set}\" = set"; then
2488   echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490   if test -n "$RANLIB"; then
2491   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2492 else
2493   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2494   ac_dummy="$PATH"
2495   for ac_dir in $ac_dummy; do
2496     test -z "$ac_dir" && ac_dir=.
2497     if test -f $ac_dir/$ac_word; then
2498       ac_cv_prog_RANLIB="ranlib"
2499       break
2500     fi
2501   done
2502   IFS="$ac_save_ifs"
2503   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2504 fi
2505 fi
2506 RANLIB="$ac_cv_prog_RANLIB"
2507 if test -n "$RANLIB"; then
2508   echo "$ac_t""$RANLIB" 1>&6
2509 else
2510   echo "$ac_t""no" 1>&6
2511 fi
2512
2513 # Extract the first word of "gcc", so it can be a program name with args.
2514 set dummy gcc; ac_word=$2
2515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2516 echo "configure:2517: checking for $ac_word" >&5
2517 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2518   echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520   if test -n "$CC"; then
2521   ac_cv_prog_CC="$CC" # Let the user override the test.
2522 else
2523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2524   ac_dummy="$PATH"
2525   for ac_dir in $ac_dummy; do
2526     test -z "$ac_dir" && ac_dir=.
2527     if test -f $ac_dir/$ac_word; then
2528       ac_cv_prog_CC="gcc"
2529       break
2530     fi
2531   done
2532   IFS="$ac_save_ifs"
2533 fi
2534 fi
2535 CC="$ac_cv_prog_CC"
2536 if test -n "$CC"; then
2537   echo "$ac_t""$CC" 1>&6
2538 else
2539   echo "$ac_t""no" 1>&6
2540 fi
2541
2542 if test -z "$CC"; then
2543   # Extract the first word of "cc", so it can be a program name with args.
2544 set dummy cc; ac_word=$2
2545 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2546 echo "configure:2547: checking for $ac_word" >&5
2547 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2548   echo $ac_n "(cached) $ac_c" 1>&6
2549 else
2550   if test -n "$CC"; then
2551   ac_cv_prog_CC="$CC" # Let the user override the test.
2552 else
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2554   ac_prog_rejected=no
2555   ac_dummy="$PATH"
2556   for ac_dir in $ac_dummy; do
2557     test -z "$ac_dir" && ac_dir=.
2558     if test -f $ac_dir/$ac_word; then
2559       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2560         ac_prog_rejected=yes
2561         continue
2562       fi
2563       ac_cv_prog_CC="cc"
2564       break
2565     fi
2566   done
2567   IFS="$ac_save_ifs"
2568 if test $ac_prog_rejected = yes; then
2569   # We found a bogon in the path, so make sure we never use it.
2570   set dummy $ac_cv_prog_CC
2571   shift
2572   if test $# -gt 0; then
2573     # We chose a different compiler from the bogus one.
2574     # However, it has the same basename, so the bogon will be chosen
2575     # first if we set CC to just the basename; use the full file name.
2576     shift
2577     set dummy "$ac_dir/$ac_word" "$@"
2578     shift
2579     ac_cv_prog_CC="$@"
2580   fi
2581 fi
2582 fi
2583 fi
2584 CC="$ac_cv_prog_CC"
2585 if test -n "$CC"; then
2586   echo "$ac_t""$CC" 1>&6
2587 else
2588   echo "$ac_t""no" 1>&6
2589 fi
2590
2591   if test -z "$CC"; then
2592     case "`uname -s`" in
2593     *win32* | *WIN32* | *CYGWIN*)
2594       # Extract the first word of "cl", so it can be a program name with args.
2595 set dummy cl; ac_word=$2
2596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2597 echo "configure:2598: checking for $ac_word" >&5
2598 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   if test -n "$CC"; then
2602   ac_cv_prog_CC="$CC" # Let the user override the test.
2603 else
2604   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2605   ac_dummy="$PATH"
2606   for ac_dir in $ac_dummy; do
2607     test -z "$ac_dir" && ac_dir=.
2608     if test -f $ac_dir/$ac_word; then
2609       ac_cv_prog_CC="cl"
2610       break
2611     fi
2612   done
2613   IFS="$ac_save_ifs"
2614 fi
2615 fi
2616 CC="$ac_cv_prog_CC"
2617 if test -n "$CC"; then
2618   echo "$ac_t""$CC" 1>&6
2619 else
2620   echo "$ac_t""no" 1>&6
2621 fi
2622  ;;
2623     esac
2624   fi
2625   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2626 fi
2627
2628 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2629 echo "configure:2630: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2630
2631 ac_ext=c
2632 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2633 ac_cpp='$CPP $CPPFLAGS'
2634 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2635 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2636 cross_compiling=$ac_cv_prog_cc_cross
2637
2638 cat > conftest.$ac_ext << EOF
2639
2640 #line 2641 "configure"
2641 #include "confdefs.h"
2642
2643 main(){return(0);}
2644 EOF
2645 if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2646   ac_cv_prog_cc_works=yes
2647   # If we can't run a trivial program, we are probably using a cross compiler.
2648   if (./conftest; exit) 2>/dev/null; then
2649     ac_cv_prog_cc_cross=no
2650   else
2651     ac_cv_prog_cc_cross=yes
2652   fi
2653 else
2654   echo "configure: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   ac_cv_prog_cc_works=no
2657 fi
2658 rm -fr conftest*
2659 ac_ext=c
2660 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2661 ac_cpp='$CPP $CPPFLAGS'
2662 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2663 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2664 cross_compiling=$ac_cv_prog_cc_cross
2665
2666 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2667 if test $ac_cv_prog_cc_works = no; then
2668   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2669 fi
2670 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2671 echo "configure:2672: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2672 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2673 cross_compiling=$ac_cv_prog_cc_cross
2674
2675 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2676 echo "configure:2677: checking whether we are using GNU C" >&5
2677 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2678   echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680   cat > conftest.c <<EOF
2681 #ifdef __GNUC__
2682   yes;
2683 #endif
2684 EOF
2685 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2686   ac_cv_prog_gcc=yes
2687 else
2688   ac_cv_prog_gcc=no
2689 fi
2690 fi
2691
2692 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2693
2694 if test $ac_cv_prog_gcc = yes; then
2695   GCC=yes
2696 else
2697   GCC=
2698 fi
2699
2700 ac_test_CFLAGS="${CFLAGS+set}"
2701 ac_save_CFLAGS="$CFLAGS"
2702 CFLAGS=
2703 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2704 echo "configure:2705: checking whether ${CC-cc} accepts -g" >&5
2705 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2706   echo $ac_n "(cached) $ac_c" 1>&6
2707 else
2708   echo 'void f(){}' > conftest.c
2709 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2710   ac_cv_prog_cc_g=yes
2711 else
2712   ac_cv_prog_cc_g=no
2713 fi
2714 rm -f conftest*
2715
2716 fi
2717
2718 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2719 if test "$ac_test_CFLAGS" = set; then
2720   CFLAGS="$ac_save_CFLAGS"
2721 elif test $ac_cv_prog_cc_g = yes; then
2722   if test "$GCC" = yes; then
2723     CFLAGS="-g -O2"
2724   else
2725     CFLAGS="-g"
2726   fi
2727 else
2728   if test "$GCC" = yes; then
2729     CFLAGS="-O2"
2730   else
2731     CFLAGS=
2732   fi
2733 fi
2734
2735 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2736 if test "${with_gnu_ld+set}" = set; then
2737   withval="$with_gnu_ld"
2738   test "$withval" = no || with_gnu_ld=yes
2739 else
2740   with_gnu_ld=no
2741 fi
2742
2743 ac_prog=ld
2744 if test "$ac_cv_prog_gcc" = yes; then
2745   # Check if gcc -print-prog-name=ld gives a path.
2746   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2747 echo "configure:2748: checking for ld used by GCC" >&5
2748   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2749   case "$ac_prog" in
2750     # Accept absolute paths.
2751     [\\/]* | [A-Za-z]:[\\/]*)
2752       re_direlt='/[^/][^/]*/\.\./'
2753       # Canonicalize the path of ld
2754       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2755       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2756         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2757       done
2758       test -z "$LD" && LD="$ac_prog"
2759       ;;
2760   "")
2761     # If it fails, then pretend we aren't using GCC.
2762     ac_prog=ld
2763     ;;
2764   *)
2765     # If it is relative, then search for the first ld in PATH.
2766     with_gnu_ld=unknown
2767     ;;
2768   esac
2769 elif test "$with_gnu_ld" = yes; then
2770   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2771 echo "configure:2772: checking for GNU ld" >&5
2772 else
2773   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2774 echo "configure:2775: checking for non-GNU ld" >&5
2775 fi
2776 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   if test -z "$LD"; then
2780   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2781   for ac_dir in $PATH; do
2782     test -z "$ac_dir" && ac_dir=.
2783     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2784       ac_cv_path_LD="$ac_dir/$ac_prog"
2785       # Check to see if the program is GNU ld.  I'd rather use --version,
2786       # but apparently some GNU ld's only accept -v.
2787       # Break only if it was the GNU/non-GNU ld that we prefer.
2788       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2789         test "$with_gnu_ld" != no && break
2790       else
2791         test "$with_gnu_ld" != yes && break
2792       fi
2793     fi
2794   done
2795   IFS="$ac_save_ifs"
2796 else
2797   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2798 fi
2799 fi
2800
2801 LD="$ac_cv_path_LD"
2802 if test -n "$LD"; then
2803   echo "$ac_t""$LD" 1>&6
2804 else
2805   echo "$ac_t""no" 1>&6
2806 fi
2807 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2808 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2809 echo "configure:2810: checking if the linker ($LD) is GNU ld" >&5
2810 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2811   echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2814 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2815   ac_cv_prog_gnu_ld=yes
2816 else
2817   ac_cv_prog_gnu_ld=no
2818 fi
2819 fi
2820
2821 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2822
2823
2824 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2825 echo "configure:2826: checking for BSD-compatible nm" >&5
2826 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2827   echo $ac_n "(cached) $ac_c" 1>&6
2828 else
2829   if test -n "$NM"; then
2830   # Let the user override the test.
2831   ac_cv_path_NM="$NM"
2832 else
2833   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2834   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2835     test -z "$ac_dir" && ac_dir=.
2836     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2837       # Check to see if the nm accepts a BSD-compat flag.
2838       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2839       #   nm: unknown option "B" ignored
2840       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2841         ac_cv_path_NM="$ac_dir/nm -B"
2842         break
2843       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2844         ac_cv_path_NM="$ac_dir/nm -p"
2845         break
2846       else
2847         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2848         continue # so that we can try to find one that supports BSD flags
2849       fi
2850     fi
2851   done
2852   IFS="$ac_save_ifs"
2853   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2854 fi
2855 fi
2856
2857 NM="$ac_cv_path_NM"
2858 echo "$ac_t""$NM" 1>&6
2859
2860 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2861 echo "configure:2862: checking whether ln -s works" >&5
2862 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2863   echo $ac_n "(cached) $ac_c" 1>&6
2864 else
2865   rm -f conftestdata
2866 if ln -s X conftestdata 2>/dev/null
2867 then
2868   rm -f conftestdata
2869   ac_cv_prog_LN_S="ln -s"
2870 else
2871   ac_cv_prog_LN_S=ln
2872 fi
2873 fi
2874 LN_S="$ac_cv_prog_LN_S"
2875 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2876   echo "$ac_t""yes" 1>&6
2877 else
2878   echo "$ac_t""no" 1>&6
2879 fi
2880
2881 if test $host != $build; then
2882   ac_tool_prefix=${host_alias}-
2883 else
2884   ac_tool_prefix=
2885 fi
2886
2887
2888 case "$target" in
2889 NONE) lt_target="$host" ;;
2890 *) lt_target="$target" ;;
2891 esac
2892
2893 # Check for any special flags to pass to ltconfig.
2894 libtool_flags="--cache-file=$cache_file"
2895 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2896 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2897 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2898 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2899 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2900 libtool_flags="$libtool_flags --enable-dlopen"
2901 libtool_flags="$libtool_flags --enable-win32-dll"
2902 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2903 if test "${enable_libtool_lock+set}" = set; then
2904   enableval="$enable_libtool_lock"
2905   :
2906 fi
2907
2908 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2909 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2910
2911 # Some flags need to be propagated to the compiler or linker for good
2912 # libtool support.
2913 case "$lt_target" in
2914 *-*-irix6*)
2915   # Find out which ABI we are using.
2916   echo '#line 2917 "configure"' > conftest.$ac_ext
2917   if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2918     case "`/usr/bin/file conftest.o`" in
2919     *32-bit*)
2920       LD="${LD-ld} -32"
2921       ;;
2922     *N32*)
2923       LD="${LD-ld} -n32"
2924       ;;
2925     *64-bit*)
2926       LD="${LD-ld} -64"
2927       ;;
2928     esac
2929   fi
2930   rm -rf conftest*
2931   ;;
2932
2933 *-*-sco3.2v5*)
2934   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2935   SAVE_CFLAGS="$CFLAGS"
2936   CFLAGS="$CFLAGS -belf"
2937   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2938 echo "configure:2939: checking whether the C compiler needs -belf" >&5
2939 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2940   echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942   cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2945
2946 int main() {
2947
2948 ; return 0; }
2949 EOF
2950 if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2951   rm -rf conftest*
2952   lt_cv_cc_needs_belf=yes
2953 else
2954   echo "configure: failed program was:" >&5
2955   cat conftest.$ac_ext >&5
2956   rm -rf conftest*
2957   lt_cv_cc_needs_belf=no
2958 fi
2959 rm -f conftest*
2960 fi
2961
2962 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2963   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2964     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2965     CFLAGS="$SAVE_CFLAGS"
2966   fi
2967   ;;
2968
2969 *-*-cygwin* | *-*-mingw*)
2970   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2971 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2972 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2973 echo "configure:2974: checking for $ac_word" >&5
2974 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2975   echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977   if test -n "$DLLTOOL"; then
2978   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2979 else
2980   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2981   ac_dummy="$PATH"
2982   for ac_dir in $ac_dummy; do
2983     test -z "$ac_dir" && ac_dir=.
2984     if test -f $ac_dir/$ac_word; then
2985       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2986       break
2987     fi
2988   done
2989   IFS="$ac_save_ifs"
2990 fi
2991 fi
2992 DLLTOOL="$ac_cv_prog_DLLTOOL"
2993 if test -n "$DLLTOOL"; then
2994   echo "$ac_t""$DLLTOOL" 1>&6
2995 else
2996   echo "$ac_t""no" 1>&6
2997 fi
2998
2999
3000 if test -z "$ac_cv_prog_DLLTOOL"; then
3001 if test -n "$ac_tool_prefix"; then
3002   # Extract the first word of "dlltool", so it can be a program name with args.
3003 set dummy dlltool; ac_word=$2
3004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3005 echo "configure:3006: checking for $ac_word" >&5
3006 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3007   echo $ac_n "(cached) $ac_c" 1>&6
3008 else
3009   if test -n "$DLLTOOL"; then
3010   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3011 else
3012   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3013   ac_dummy="$PATH"
3014   for ac_dir in $ac_dummy; do
3015     test -z "$ac_dir" && ac_dir=.
3016     if test -f $ac_dir/$ac_word; then
3017       ac_cv_prog_DLLTOOL="dlltool"
3018       break
3019     fi
3020   done
3021   IFS="$ac_save_ifs"
3022   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3023 fi
3024 fi
3025 DLLTOOL="$ac_cv_prog_DLLTOOL"
3026 if test -n "$DLLTOOL"; then
3027   echo "$ac_t""$DLLTOOL" 1>&6
3028 else
3029   echo "$ac_t""no" 1>&6
3030 fi
3031
3032 else
3033   DLLTOOL="false"
3034 fi
3035 fi
3036
3037   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3038 set dummy ${ac_tool_prefix}as; ac_word=$2
3039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3040 echo "configure:3041: checking for $ac_word" >&5
3041 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3042   echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044   if test -n "$AS"; then
3045   ac_cv_prog_AS="$AS" # Let the user override the test.
3046 else
3047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3048   ac_dummy="$PATH"
3049   for ac_dir in $ac_dummy; do
3050     test -z "$ac_dir" && ac_dir=.
3051     if test -f $ac_dir/$ac_word; then
3052       ac_cv_prog_AS="${ac_tool_prefix}as"
3053       break
3054     fi
3055   done
3056   IFS="$ac_save_ifs"
3057 fi
3058 fi
3059 AS="$ac_cv_prog_AS"
3060 if test -n "$AS"; then
3061   echo "$ac_t""$AS" 1>&6
3062 else
3063   echo "$ac_t""no" 1>&6
3064 fi
3065
3066
3067 if test -z "$ac_cv_prog_AS"; then
3068 if test -n "$ac_tool_prefix"; then
3069   # Extract the first word of "as", so it can be a program name with args.
3070 set dummy as; ac_word=$2
3071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3072 echo "configure:3073: checking for $ac_word" >&5
3073 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   if test -n "$AS"; then
3077   ac_cv_prog_AS="$AS" # Let the user override the test.
3078 else
3079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3080   ac_dummy="$PATH"
3081   for ac_dir in $ac_dummy; do
3082     test -z "$ac_dir" && ac_dir=.
3083     if test -f $ac_dir/$ac_word; then
3084       ac_cv_prog_AS="as"
3085       break
3086     fi
3087   done
3088   IFS="$ac_save_ifs"
3089   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3090 fi
3091 fi
3092 AS="$ac_cv_prog_AS"
3093 if test -n "$AS"; then
3094   echo "$ac_t""$AS" 1>&6
3095 else
3096   echo "$ac_t""no" 1>&6
3097 fi
3098
3099 else
3100   AS="false"
3101 fi
3102 fi
3103
3104   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3105 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3106 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3107 echo "configure:3108: checking for $ac_word" >&5
3108 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3109   echo $ac_n "(cached) $ac_c" 1>&6
3110 else
3111   if test -n "$OBJDUMP"; then
3112   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3113 else
3114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3115   ac_dummy="$PATH"
3116   for ac_dir in $ac_dummy; do
3117     test -z "$ac_dir" && ac_dir=.
3118     if test -f $ac_dir/$ac_word; then
3119       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3120       break
3121     fi
3122   done
3123   IFS="$ac_save_ifs"
3124 fi
3125 fi
3126 OBJDUMP="$ac_cv_prog_OBJDUMP"
3127 if test -n "$OBJDUMP"; then
3128   echo "$ac_t""$OBJDUMP" 1>&6
3129 else
3130   echo "$ac_t""no" 1>&6
3131 fi
3132
3133
3134 if test -z "$ac_cv_prog_OBJDUMP"; then
3135 if test -n "$ac_tool_prefix"; then
3136   # Extract the first word of "objdump", so it can be a program name with args.
3137 set dummy objdump; ac_word=$2
3138 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3139 echo "configure:3140: checking for $ac_word" >&5
3140 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3141   echo $ac_n "(cached) $ac_c" 1>&6
3142 else
3143   if test -n "$OBJDUMP"; then
3144   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3145 else
3146   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3147   ac_dummy="$PATH"
3148   for ac_dir in $ac_dummy; do
3149     test -z "$ac_dir" && ac_dir=.
3150     if test -f $ac_dir/$ac_word; then
3151       ac_cv_prog_OBJDUMP="objdump"
3152       break
3153     fi
3154   done
3155   IFS="$ac_save_ifs"
3156   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3157 fi
3158 fi
3159 OBJDUMP="$ac_cv_prog_OBJDUMP"
3160 if test -n "$OBJDUMP"; then
3161   echo "$ac_t""$OBJDUMP" 1>&6
3162 else
3163   echo "$ac_t""no" 1>&6
3164 fi
3165
3166 else
3167   OBJDUMP="false"
3168 fi
3169 fi
3170
3171   ;;
3172
3173 esac
3174
3175
3176 # Save cache, so that ltconfig can load it
3177
3178
3179 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3180 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3181 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3182 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3183 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3184 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3185 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3186 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3187
3188 # Reload cache, that may have been modified by ltconfig
3189
3190
3191 # This can be used to rebuild libtool when needed
3192 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3193
3194 # Always use our own libtool.
3195 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3196
3197 # Redirect the config.log output again, so that the ltconfig log is not
3198 # clobbered by the next message.
3199 exec 5>>./config.log
3200
3201
3202 for ac_prog in mawk gawk nawk awk
3203 do
3204 # Extract the first word of "$ac_prog", so it can be a program name with args.
3205 set dummy $ac_prog; ac_word=$2
3206 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3207 echo "configure:3208: checking for $ac_word" >&5
3208 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211   if test -n "$AWK"; then
3212   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3213 else
3214   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3215   ac_dummy="$PATH"
3216   for ac_dir in $ac_dummy; do
3217     test -z "$ac_dir" && ac_dir=.
3218     if test -f $ac_dir/$ac_word; then
3219       ac_cv_prog_AWK="$ac_prog"
3220       break
3221     fi
3222   done
3223   IFS="$ac_save_ifs"
3224 fi
3225 fi
3226 AWK="$ac_cv_prog_AWK"
3227 if test -n "$AWK"; then
3228   echo "$ac_t""$AWK" 1>&6
3229 else
3230   echo "$ac_t""no" 1>&6
3231 fi
3232
3233 test -n "$AWK" && break
3234 done
3235
3236 # test for ln hardlink support
3237 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3238 echo "configure:3239: checking whether ln works" >&5
3239 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3240   echo $ac_n "(cached) $ac_c" 1>&6
3241 else
3242   rm -f conftest.src conftest.dst
3243 echo "conftest" > conftest.src
3244 if ln conftest.src conftest.dst 2>/dev/null
3245 then
3246   ol_cv_prog_LN_H="ln"
3247 else
3248   ol_cv_prog_LN_H="cp"
3249 fi
3250 rm -f conftest.src conftest.dst
3251
3252 fi
3253 LN_H="$ol_cv_prog_LN_H"
3254 if test "$ol_cv_prog_LN_H" = "ln"; then
3255         echo "$ac_t""yes" 1>&6
3256 else
3257         echo "$ac_t""no" 1>&6
3258 fi
3259
3260 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3261 echo "configure:3262: checking whether ln -s works" >&5
3262 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3263   echo $ac_n "(cached) $ac_c" 1>&6
3264 else
3265   rm -f conftestdata
3266 if ln -s X conftestdata 2>/dev/null
3267 then
3268   rm -f conftestdata
3269   ac_cv_prog_LN_S="ln -s"
3270 else
3271   ac_cv_prog_LN_S=ln
3272 fi
3273 fi
3274 LN_S="$ac_cv_prog_LN_S"
3275 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3276   echo "$ac_t""yes" 1>&6
3277 else
3278   echo "$ac_t""no" 1>&6
3279 fi
3280
3281
3282 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3283         LN_S="$LN_H"
3284 fi
3285
3286 # Extract the first word of "sendmail", so it can be a program name with args.
3287 set dummy sendmail; ac_word=$2
3288 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3289 echo "configure:3290: checking for $ac_word" >&5
3290 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   case "$SENDMAIL" in
3294   /*)
3295   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3296   ;;
3297   ?:/*)
3298   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3299   ;;
3300   *)
3301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3302   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3303   for ac_dir in $ac_dummy; do 
3304     test -z "$ac_dir" && ac_dir=.
3305     if test -f $ac_dir/$ac_word; then
3306       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3307       break
3308     fi
3309   done
3310   IFS="$ac_save_ifs"
3311   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3312   ;;
3313 esac
3314 fi
3315 SENDMAIL="$ac_cv_path_SENDMAIL"
3316 if test -n "$SENDMAIL"; then
3317   echo "$ac_t""$SENDMAIL" 1>&6
3318 else
3319   echo "$ac_t""no" 1>&6
3320 fi
3321
3322 # Extract the first word of "vi", so it can be a program name with args.
3323 set dummy vi; ac_word=$2
3324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_word" >&5
3326 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3327   echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329   case "$EDITOR" in
3330   /*)
3331   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3332   ;;
3333   ?:/*)
3334   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3335   ;;
3336   *)
3337   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3338   ac_dummy="$PATH:/usr/ucb"
3339   for ac_dir in $ac_dummy; do 
3340     test -z "$ac_dir" && ac_dir=.
3341     if test -f $ac_dir/$ac_word; then
3342       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3343       break
3344     fi
3345   done
3346   IFS="$ac_save_ifs"
3347   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3348   ;;
3349 esac
3350 fi
3351 EDITOR="$ac_cv_path_EDITOR"
3352 if test -n "$EDITOR"; then
3353   echo "$ac_t""$EDITOR" 1>&6
3354 else
3355   echo "$ac_t""no" 1>&6
3356 fi
3357
3358 # Extract the first word of "finger", so it can be a program name with args.
3359 set dummy finger; ac_word=$2
3360 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3361 echo "configure:3362: checking for $ac_word" >&5
3362 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3363   echo $ac_n "(cached) $ac_c" 1>&6
3364 else
3365   case "$FINGER" in
3366   /*)
3367   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3368   ;;
3369   ?:/*)
3370   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3371   ;;
3372   *)
3373   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3374   ac_dummy="$PATH:/usr/ucb"
3375   for ac_dir in $ac_dummy; do 
3376     test -z "$ac_dir" && ac_dir=.
3377     if test -f $ac_dir/$ac_word; then
3378       ac_cv_path_FINGER="$ac_dir/$ac_word"
3379       break
3380     fi
3381   done
3382   IFS="$ac_save_ifs"
3383   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3384   ;;
3385 esac
3386 fi
3387 FINGER="$ac_cv_path_FINGER"
3388 if test -n "$FINGER"; then
3389   echo "$ac_t""$FINGER" 1>&6
3390 else
3391   echo "$ac_t""no" 1>&6
3392 fi
3393
3394
3395 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3396 echo "configure:3397: checking how to run the C preprocessor" >&5
3397 # On Suns, sometimes $CPP names a directory.
3398 if test -n "$CPP" && test -d "$CPP"; then
3399   CPP=
3400 fi
3401 if test -z "$CPP"; then
3402 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405     # This must be in double quotes, not single quotes, because CPP may get
3406   # substituted into the Makefile and "${CC-cc}" will confuse make.
3407   CPP="${CC-cc} -E"
3408   # On the NeXT, cc -E runs the code through the compiler's parser,
3409   # not just through cpp.
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <assert.h>
3414 Syntax Error
3415 EOF
3416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3417 { (eval echo configure:3418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3419 if test -z "$ac_err"; then
3420   :
3421 else
3422   echo "$ac_err" >&5
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   CPP="${CC-cc} -E -traditional-cpp"
3427   cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 #include <assert.h>
3431 Syntax Error
3432 EOF
3433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3434 { (eval echo configure:3435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3436 if test -z "$ac_err"; then
3437   :
3438 else
3439   echo "$ac_err" >&5
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -rf conftest*
3443   CPP="${CC-cc} -nologo -E"
3444   cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 #include <assert.h>
3448 Syntax Error
3449 EOF
3450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3451 { (eval echo configure:3452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3453 if test -z "$ac_err"; then
3454   :
3455 else
3456   echo "$ac_err" >&5
3457   echo "configure: failed program was:" >&5
3458   cat conftest.$ac_ext >&5
3459   rm -rf conftest*
3460   CPP=/lib/cpp
3461 fi
3462 rm -f conftest*
3463 fi
3464 rm -f conftest*
3465 fi
3466 rm -f conftest*
3467   ac_cv_prog_CPP="$CPP"
3468 fi
3469   CPP="$ac_cv_prog_CPP"
3470 else
3471   ac_cv_prog_CPP="$CPP"
3472 fi
3473 echo "$ac_t""$CPP" 1>&6
3474
3475
3476 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3477         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3478
3479 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3480         echo "configure: warning: programs compiled here do run here..." 1>&2
3481         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3482
3483 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3484         echo "configure: warning: programs compiled here do not run here..." 1>&2
3485         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3486 fi
3487
3488 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3489 echo "configure:3490: checking for AIX" >&5
3490 cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 #ifdef _AIX
3494   yes
3495 #endif
3496
3497 EOF
3498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3499   egrep "yes" >/dev/null 2>&1; then
3500   rm -rf conftest*
3501   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3502 #define _ALL_SOURCE 1
3503 EOF
3504
3505 else
3506   rm -rf conftest*
3507   echo "$ac_t""no" 1>&6
3508 fi
3509 rm -f conftest*
3510
3511
3512 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3513 echo "configure:3514: checking for POSIXized ISC" >&5
3514 if test -d /etc/conf/kconfig.d &&
3515   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3516 then
3517   echo "$ac_t""yes" 1>&6
3518   ISC=yes # If later tests want to check for ISC.
3519   cat >> confdefs.h <<\EOF
3520 #define _POSIX_SOURCE 1
3521 EOF
3522
3523   if test "$GCC" = yes; then
3524     CC="$CC -posix"
3525   else
3526     CC="$CC -Xp"
3527   fi
3528 else
3529   echo "$ac_t""no" 1>&6
3530   ISC=
3531 fi
3532
3533 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3534 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3535 echo "configure:3536: checking for minix/config.h" >&5
3536 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539   cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <minix/config.h>
3543 EOF
3544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3545 { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3547 if test -z "$ac_err"; then
3548   rm -rf conftest*
3549   eval "ac_cv_header_$ac_safe=yes"
3550 else
3551   echo "$ac_err" >&5
3552   echo "configure: failed program was:" >&5
3553   cat conftest.$ac_ext >&5
3554   rm -rf conftest*
3555   eval "ac_cv_header_$ac_safe=no"
3556 fi
3557 rm -f conftest*
3558 fi
3559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3560   echo "$ac_t""yes" 1>&6
3561   MINIX=yes
3562 else
3563   echo "$ac_t""no" 1>&6
3564 MINIX=
3565 fi
3566
3567 if test "$MINIX" = yes; then
3568   cat >> confdefs.h <<\EOF
3569 #define _POSIX_SOURCE 1
3570 EOF
3571
3572   cat >> confdefs.h <<\EOF
3573 #define _POSIX_1_SOURCE 2
3574 EOF
3575
3576   cat >> confdefs.h <<\EOF
3577 #define _MINIX 1
3578 EOF
3579
3580 fi
3581
3582
3583 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3584 echo "configure:3585: checking for Cygwin environment" >&5
3585 if eval "test \"\${ac_cv_cygwin+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
3594 #ifndef __CYGWIN__
3595 #define __CYGWIN__ __CYGWIN32__
3596 #endif
3597 return __CYGWIN__;
3598 ; return 0; }
3599 EOF
3600 if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3601   rm -rf conftest*
3602   ac_cv_cygwin=yes
3603 else
3604   echo "configure: failed program was:" >&5
3605   cat conftest.$ac_ext >&5
3606   rm -rf conftest*
3607   ac_cv_cygwin=no
3608 fi
3609 rm -f conftest*
3610 fi
3611
3612 echo "$ac_t""$ac_cv_cygwin" 1>&6
3613 CYGWIN=
3614 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3615 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3616 echo "configure:3617: checking for mingw32 environment" >&5
3617 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3618   echo $ac_n "(cached) $ac_c" 1>&6
3619 else
3620   cat > conftest.$ac_ext <<EOF
3621 #line 3622 "configure"
3622 #include "confdefs.h"
3623
3624 int main() {
3625 return __MINGW32__;
3626 ; return 0; }
3627 EOF
3628 if { (eval echo configure:3629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3629   rm -rf conftest*
3630   ac_cv_mingw32=yes
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   ac_cv_mingw32=no
3636 fi
3637 rm -f conftest*
3638 fi
3639
3640 echo "$ac_t""$ac_cv_mingw32" 1>&6
3641 MINGW32=
3642 test "$ac_cv_mingw32" = yes && MINGW32=yes
3643 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3644 echo "configure:3645: checking for EMX OS/2 environment" >&5
3645 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3646   echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648   cat > conftest.$ac_ext <<EOF
3649 #line 3650 "configure"
3650 #include "confdefs.h"
3651
3652 int main() {
3653 return __EMX__;
3654 ; return 0; }
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3657   rm -rf conftest*
3658   ac_cv_emxos2=yes
3659 else
3660   echo "configure: failed program was:" >&5
3661   cat conftest.$ac_ext >&5
3662   rm -rf conftest*
3663   ac_cv_emxos2=no
3664 fi
3665 rm -f conftest*
3666 fi
3667
3668 echo "$ac_t""$ac_cv_emxos2" 1>&6
3669 EMXOS2=
3670 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3671
3672
3673
3674 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3675 echo "configure:3676: checking for executable suffix" >&5
3676 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3680   ac_cv_exeext=.exe
3681 else
3682   rm -f conftest*
3683   echo 'int main () { return 0; }' > conftest.$ac_ext
3684   ac_cv_exeext=
3685   if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3686     for file in conftest.*; do
3687       case $file in
3688       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3689       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3690       esac
3691     done
3692   else
3693     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3694   fi
3695   rm -f conftest*
3696   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3697 fi
3698 fi
3699
3700 EXEEXT=""
3701 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3702 echo "$ac_t""${ac_cv_exeext}" 1>&6
3703 ac_exeext=$EXEEXT
3704
3705 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3706 echo "configure:3707: checking for object suffix" >&5
3707 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3708   echo $ac_n "(cached) $ac_c" 1>&6
3709 else
3710   rm -f conftest*
3711 echo 'int i = 1;' > conftest.$ac_ext
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713   for ac_file in conftest.*; do
3714     case $ac_file in
3715     *.c) ;;
3716     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3717     esac
3718   done
3719 else
3720   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3721 fi
3722 rm -f conftest*
3723 fi
3724
3725 echo "$ac_t""$ac_cv_objext" 1>&6
3726 OBJEXT=$ac_cv_objext
3727 ac_objext=$ac_cv_objext
3728
3729
3730 cat >> confdefs.h <<EOF
3731 #define EXEEXT "${EXEEXT}"
3732 EOF
3733
3734
3735 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3736 echo "configure:3737: checking for be_app in -lbe" >&5
3737 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   ac_save_LIBS="$LIBS"
3742 LIBS="-lbe -lroot -lnet $LIBS"
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 /* Override any gcc2 internal prototype to avoid an error.  */
3747 /* We use char because int might match the return type of a gcc2
3748     builtin and then its argument prototype would still apply.  */
3749 char be_app();
3750
3751 int main() {
3752 be_app()
3753 ; return 0; }
3754 EOF
3755 if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3756   rm -rf conftest*
3757   eval "ac_cv_lib_$ac_lib_var=yes"
3758 else
3759   echo "configure: failed program was:" >&5
3760   cat conftest.$ac_ext >&5
3761   rm -rf conftest*
3762   eval "ac_cv_lib_$ac_lib_var=no"
3763 fi
3764 rm -f conftest*
3765 LIBS="$ac_save_LIBS"
3766
3767 fi
3768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3769   echo "$ac_t""yes" 1>&6
3770   LIBS="$LIBS -lbe -lroot -lnet"
3771 else
3772   echo "$ac_t""no" 1>&6
3773 :
3774 fi
3775
3776
3777
3778
3779
3780 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3781 echo "configure:3782: checking for ${CC-cc} option to accept ANSI C" >&5
3782 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   am_cv_prog_cc_stdc=no
3786 ac_save_CC="$CC"
3787 # Don't try gcc -ansi; that turns off useful extensions and
3788 # breaks some systems' header files.
3789 # AIX                   -qlanglvl=ansi
3790 # Ultrix and OSF/1      -std1
3791 # HP-UX 10.20 and later -Ae
3792 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3793 # SVR4                  -Xc -D__EXTENSIONS__
3794 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3795 do
3796   CC="$ac_save_CC $ac_arg"
3797   cat > conftest.$ac_ext <<EOF
3798 #line 3799 "configure"
3799 #include "confdefs.h"
3800 #include <stdarg.h>
3801 #include <stdio.h>
3802 #include <sys/types.h>
3803 #include <sys/stat.h>
3804 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3805 struct buf { int x; };
3806 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3807 static char *e (p, i)
3808      char **p;
3809      int i;
3810 {
3811   return p[i];
3812 }
3813 static char *f (char * (*g) (char **, int), char **p, ...)
3814 {
3815   char *s;
3816   va_list v;
3817   va_start (v,p);
3818   s = g (p, va_arg (v,int));
3819   va_end (v);
3820   return s;
3821 }
3822 int test (int i, double x);
3823 struct s1 {int (*f) (int a);};
3824 struct s2 {int (*f) (double a);};
3825 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3826 int argc;
3827 char **argv;
3828
3829 int main() {
3830
3831 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3832
3833 ; return 0; }
3834 EOF
3835 if { (eval echo configure:3836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3836   rm -rf conftest*
3837   am_cv_prog_cc_stdc="$ac_arg"; break
3838 else
3839   echo "configure: failed program was:" >&5
3840   cat conftest.$ac_ext >&5
3841 fi
3842 rm -f conftest*
3843 done
3844 CC="$ac_save_CC"
3845
3846 fi
3847
3848 if test -z "$am_cv_prog_cc_stdc"; then
3849   echo "$ac_t""none needed" 1>&6
3850 else
3851   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3852 fi
3853 case "x$am_cv_prog_cc_stdc" in
3854   x|xno) ;;
3855   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3856 esac
3857
3858 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3859         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3860 fi
3861
3862 # test for make depend flag
3863 OL_MKDEP=
3864 OL_MKDEP_FLAGS=
3865 if test -z "${MKDEP}"; then
3866         OL_MKDEP="${CC-cc}"
3867         if test -z "${MKDEP_FLAGS}"; then
3868                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3869 echo "configure:3870: checking for ${OL_MKDEP} depend flag" >&5
3870 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3871   echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873   
3874                         ol_cv_mkdep=no
3875                         for flag in "-M" "-xM"; do
3876                                 cat > conftest.c <<EOF
3877  noCode;
3878 EOF
3879                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3880                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3881                                 then
3882                                         if test ! -f conftest."${ac_object}" ; then
3883                                                 ol_cv_mkdep=$flag
3884                                                 OL_MKDEP_FLAGS="$flag"
3885                                                 break
3886                                         fi
3887                                 fi
3888                         done
3889                         rm -f conftest*
3890                 
3891 fi
3892
3893 echo "$ac_t""$ol_cv_mkdep" 1>&6
3894         else
3895                 cc_cv_mkdep=yes
3896                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3897         fi
3898 else
3899         cc_cv_mkdep=yes
3900         OL_MKDEP="${MKDEP}"
3901         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3902 fi
3903
3904
3905
3906 if test "${ol_cv_mkdep}" = no ; then
3907         # this will soon become an error
3908         echo "configure: warning: do not know how to generate dependencies" 1>&2
3909 fi
3910
3911 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3912 echo "configure:3913: checking for afopen in -ls" >&5
3913 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3914 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3915   echo $ac_n "(cached) $ac_c" 1>&6
3916 else
3917   ac_save_LIBS="$LIBS"
3918 LIBS="-ls  $LIBS"
3919 cat > conftest.$ac_ext <<EOF
3920 #line 3921 "configure"
3921 #include "confdefs.h"
3922 /* Override any gcc2 internal prototype to avoid an error.  */
3923 /* We use char because int might match the return type of a gcc2
3924     builtin and then its argument prototype would still apply.  */
3925 char afopen();
3926
3927 int main() {
3928 afopen()
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_lib_$ac_lib_var=yes"
3934 else
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -rf conftest*
3938   eval "ac_cv_lib_$ac_lib_var=no"
3939 fi
3940 rm -f conftest*
3941 LIBS="$ac_save_LIBS"
3942
3943 fi
3944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3945   echo "$ac_t""yes" 1>&6
3946   
3947         AUTH_LIBS=-ls
3948         cat >> confdefs.h <<\EOF
3949 #define HAVE_AIX_SECURITY 1
3950 EOF
3951
3952
3953 else
3954   echo "$ac_t""no" 1>&6
3955 fi
3956
3957
3958
3959 for ac_func in getaddrinfo 
3960 do
3961 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3962 echo "configure:3963: checking for $ac_func" >&5
3963 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3964   echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966   cat > conftest.$ac_ext <<EOF
3967 #line 3968 "configure"
3968 #include "confdefs.h"
3969 /* System header to define __stub macros and hopefully few prototypes,
3970     which can conflict with char $ac_func(); below.  */
3971 #include <assert.h>
3972 /* Override any gcc2 internal prototype to avoid an error.  */
3973 /* We use char because int might match the return type of a gcc2
3974     builtin and then its argument prototype would still apply.  */
3975 char $ac_func();
3976 char (*f)();
3977
3978 int main() {
3979
3980 /* The GNU C library defines this for functions which it implements
3981     to always fail with ENOSYS.  Some functions are actually named
3982     something starting with __ and the normal name is an alias.  */
3983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3984 choke me
3985 #else
3986 f = $ac_func;
3987 #endif
3988
3989 ; return 0; }
3990 EOF
3991 if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3992   rm -rf conftest*
3993   eval "ac_cv_func_$ac_func=yes"
3994 else
3995   echo "configure: failed program was:" >&5
3996   cat conftest.$ac_ext >&5
3997   rm -rf conftest*
3998   eval "ac_cv_func_$ac_func=no"
3999 fi
4000 rm -f conftest*
4001 fi
4002
4003 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4004   echo "$ac_t""yes" 1>&6
4005     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4006   cat >> confdefs.h <<EOF
4007 #define $ac_tr_func 1
4008 EOF
4009  
4010 else
4011   echo "$ac_t""no" 1>&6
4012 fi
4013 done
4014
4015
4016 if test $ac_cv_func_getaddrinfo = no ; then
4017         if test $ol_enable_ipv6 = yes ; then
4018                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4019         fi
4020         ol_enable_ipv6=no
4021 fi
4022
4023 if test $ol_enable_local != no ; then
4024         for ac_hdr in sys/un.h 
4025 do
4026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4028 echo "configure:4029: checking for $ac_hdr" >&5
4029 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4030   echo $ac_n "(cached) $ac_c" 1>&6
4031 else
4032   cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035 #include <$ac_hdr>
4036 EOF
4037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4038 { (eval echo configure:4039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4040 if test -z "$ac_err"; then
4041   rm -rf conftest*
4042   eval "ac_cv_header_$ac_safe=yes"
4043 else
4044   echo "$ac_err" >&5
4045   echo "configure: failed program was:" >&5
4046   cat conftest.$ac_ext >&5
4047   rm -rf conftest*
4048   eval "ac_cv_header_$ac_safe=no"
4049 fi
4050 rm -f conftest*
4051 fi
4052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4053   echo "$ac_t""yes" 1>&6
4054     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4055   cat >> confdefs.h <<EOF
4056 #define $ac_tr_hdr 1
4057 EOF
4058  
4059 else
4060   echo "$ac_t""no" 1>&6
4061 fi
4062 done
4063
4064
4065         if test $ol_enable_local = auto ; then
4066                 ol_enable_local=$ac_cv_header_sys_un_h
4067         elif test $ac_cv_header_sys_un_h = no ; then
4068                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
4069         fi
4070 fi
4071
4072 ol_link_modules=no
4073 if test $ol_enable_modules != no ; then
4074         for ac_hdr in ltdl.h
4075 do
4076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4078 echo "configure:4079: checking for $ac_hdr" >&5
4079 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4080   echo $ac_n "(cached) $ac_c" 1>&6
4081 else
4082   cat > conftest.$ac_ext <<EOF
4083 #line 4084 "configure"
4084 #include "confdefs.h"
4085 #include <$ac_hdr>
4086 EOF
4087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4088 { (eval echo configure:4089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4090 if test -z "$ac_err"; then
4091   rm -rf conftest*
4092   eval "ac_cv_header_$ac_safe=yes"
4093 else
4094   echo "$ac_err" >&5
4095   echo "configure: failed program was:" >&5
4096   cat conftest.$ac_ext >&5
4097   rm -rf conftest*
4098   eval "ac_cv_header_$ac_safe=no"
4099 fi
4100 rm -f conftest*
4101 fi
4102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4103   echo "$ac_t""yes" 1>&6
4104     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4105   cat >> confdefs.h <<EOF
4106 #define $ac_tr_hdr 1
4107 EOF
4108  
4109 else
4110   echo "$ac_t""no" 1>&6
4111 fi
4112 done
4113
4114
4115         if test $ac_cv_header_ltdl_h = no ; then
4116                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4117         fi
4118
4119         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4120 echo "configure:4121: checking for lt_dlinit in -lltdl" >&5
4121 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4123   echo $ac_n "(cached) $ac_c" 1>&6
4124 else
4125   ac_save_LIBS="$LIBS"
4126 LIBS="-lltdl  $LIBS"
4127 cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130 /* Override any gcc2 internal prototype to avoid an error.  */
4131 /* We use char because int might match the return type of a gcc2
4132     builtin and then its argument prototype would still apply.  */
4133 char lt_dlinit();
4134
4135 int main() {
4136 lt_dlinit()
4137 ; return 0; }
4138 EOF
4139 if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4140   rm -rf conftest*
4141   eval "ac_cv_lib_$ac_lib_var=yes"
4142 else
4143   echo "configure: failed program was:" >&5
4144   cat conftest.$ac_ext >&5
4145   rm -rf conftest*
4146   eval "ac_cv_lib_$ac_lib_var=no"
4147 fi
4148 rm -f conftest*
4149 LIBS="$ac_save_LIBS"
4150
4151 fi
4152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4153   echo "$ac_t""yes" 1>&6
4154   
4155             MODULES_LIBS=-lltdl
4156             cat >> confdefs.h <<\EOF
4157 #define HAVE_LIBLTDL 1
4158 EOF
4159
4160         
4161 else
4162   echo "$ac_t""no" 1>&6
4163 fi
4164
4165
4166         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4167                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4168         fi
4169         ol_link_modules=yes
4170 else
4171         ol_with_dnssrv_module=static
4172         ol_with_ldap_module=static
4173         ol_with_ldbm_module=static
4174         ol_with_passwd_module=static
4175         ol_with_shell_module=static
4176         ol_with_sql_module=static
4177 fi
4178
4179 # test for EBCDIC
4180 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4181 echo "configure:4182: checking for EBCDIC" >&5
4182 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4183   echo $ac_n "(cached) $ac_c" 1>&6
4184 else
4185   
4186         cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189
4190 #if !('M' == 0xd4)
4191 #include <__ASCII__/generate_error.h>
4192 #endif
4193
4194 EOF
4195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4196 { (eval echo configure:4197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4198 if test -z "$ac_err"; then
4199   rm -rf conftest*
4200   ol_cv_cpp_ebcdic=yes
4201 else
4202   echo "$ac_err" >&5
4203   echo "configure: failed program was:" >&5
4204   cat conftest.$ac_ext >&5
4205   rm -rf conftest*
4206   ol_cv_cpp_ebcdic=no
4207 fi
4208 rm -f conftest*
4209 fi
4210
4211 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4212 if test $ol_cv_cpp_ebcdic = yes ; then
4213         cat >> confdefs.h <<\EOF
4214 #define HAVE_EBCDIC 1
4215 EOF
4216
4217 fi
4218
4219 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4220 echo "configure:4221: checking for ANSI C header files" >&5
4221 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <stdlib.h>
4228 #include <stdarg.h>
4229 #include <string.h>
4230 #include <float.h>
4231 EOF
4232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4233 { (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4235 if test -z "$ac_err"; then
4236   rm -rf conftest*
4237   ol_cv_header_stdc=yes
4238 else
4239   echo "$ac_err" >&5
4240   echo "configure: failed program was:" >&5
4241   cat conftest.$ac_ext >&5
4242   rm -rf conftest*
4243   ol_cv_header_stdc=no
4244 fi
4245 rm -f conftest*
4246
4247 if test $ol_cv_header_stdc = yes; then
4248   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 #include <string.h>
4253 EOF
4254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4255   egrep "memchr" >/dev/null 2>&1; then
4256   :
4257 else
4258   rm -rf conftest*
4259   ol_cv_header_stdc=no
4260 fi
4261 rm -f conftest*
4262
4263 fi
4264
4265 if test $ol_cv_header_stdc = yes; then
4266   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4267 cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4270 #include <stdlib.h>
4271 EOF
4272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4273   egrep "free" >/dev/null 2>&1; then
4274   :
4275 else
4276   rm -rf conftest*
4277   ol_cv_header_stdc=no
4278 fi
4279 rm -f conftest*
4280
4281 fi
4282
4283 if test $ol_cv_header_stdc = yes; then
4284   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4285 if test "$cross_compiling" = yes; then
4286   :
4287 else
4288   cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <ctype.h>
4292 #ifndef HAVE_EBCDIC
4293 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4294 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4295 #else
4296 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4297                 || ('j' <= (c) && (c) <= 'r') \
4298                 || ('s' <= (c) && (c) <= 'z'))
4299 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4300 #endif
4301 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4302 int main () { int i; for (i = 0; i < 256; i++)
4303 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4304 exit (0); }
4305
4306 EOF
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4308 then
4309   :
4310 else
4311   echo "configure: failed program was:" >&5
4312   cat conftest.$ac_ext >&5
4313   rm -fr conftest*
4314   ol_cv_header_stdc=no
4315 fi
4316 rm -fr conftest*
4317 fi
4318
4319 fi
4320 fi
4321
4322 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4323 if test $ol_cv_header_stdc = yes; then
4324   cat >> confdefs.h <<\EOF
4325 #define STDC_HEADERS 1
4326 EOF
4327
4328 fi
4329 ac_cv_header_stdc=disable
4330
4331
4332 if test $ol_cv_header_stdc != yes; then
4333         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4334 fi
4335
4336 ac_header_dirent=no
4337 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4338 do
4339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4340 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4341 echo "configure:4342: checking for $ac_hdr that defines DIR" >&5
4342 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4343   echo $ac_n "(cached) $ac_c" 1>&6
4344 else
4345   cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 #include <sys/types.h>
4349 #include <$ac_hdr>
4350 int main() {
4351 DIR *dirp = 0;
4352 ; return 0; }
4353 EOF
4354 if { (eval echo configure:4355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4355   rm -rf conftest*
4356   eval "ac_cv_header_dirent_$ac_safe=yes"
4357 else
4358   echo "configure: failed program was:" >&5
4359   cat conftest.$ac_ext >&5
4360   rm -rf conftest*
4361   eval "ac_cv_header_dirent_$ac_safe=no"
4362 fi
4363 rm -f conftest*
4364 fi
4365 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4366   echo "$ac_t""yes" 1>&6
4367     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4368   cat >> confdefs.h <<EOF
4369 #define $ac_tr_hdr 1
4370 EOF
4371  ac_header_dirent=$ac_hdr; break
4372 else
4373   echo "$ac_t""no" 1>&6
4374 fi
4375 done
4376 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4377 if test $ac_header_dirent = dirent.h; then
4378 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4379 echo "configure:4380: checking for opendir in -ldir" >&5
4380 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4381 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   ac_save_LIBS="$LIBS"
4385 LIBS="-ldir  $LIBS"
4386 cat > conftest.$ac_ext <<EOF
4387 #line 4388 "configure"
4388 #include "confdefs.h"
4389 /* Override any gcc2 internal prototype to avoid an error.  */
4390 /* We use char because int might match the return type of a gcc2
4391     builtin and then its argument prototype would still apply.  */
4392 char opendir();
4393
4394 int main() {
4395 opendir()
4396 ; return 0; }
4397 EOF
4398 if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4399   rm -rf conftest*
4400   eval "ac_cv_lib_$ac_lib_var=yes"
4401 else
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -rf conftest*
4405   eval "ac_cv_lib_$ac_lib_var=no"
4406 fi
4407 rm -f conftest*
4408 LIBS="$ac_save_LIBS"
4409
4410 fi
4411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4412   echo "$ac_t""yes" 1>&6
4413   LIBS="$LIBS -ldir"
4414 else
4415   echo "$ac_t""no" 1>&6
4416 fi
4417
4418 else
4419 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4420 echo "configure:4421: checking for opendir in -lx" >&5
4421 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4423   echo $ac_n "(cached) $ac_c" 1>&6
4424 else
4425   ac_save_LIBS="$LIBS"
4426 LIBS="-lx  $LIBS"
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 /* Override any gcc2 internal prototype to avoid an error.  */
4431 /* We use char because int might match the return type of a gcc2
4432     builtin and then its argument prototype would still apply.  */
4433 char opendir();
4434
4435 int main() {
4436 opendir()
4437 ; return 0; }
4438 EOF
4439 if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4440   rm -rf conftest*
4441   eval "ac_cv_lib_$ac_lib_var=yes"
4442 else
4443   echo "configure: failed program was:" >&5
4444   cat conftest.$ac_ext >&5
4445   rm -rf conftest*
4446   eval "ac_cv_lib_$ac_lib_var=no"
4447 fi
4448 rm -f conftest*
4449 LIBS="$ac_save_LIBS"
4450
4451 fi
4452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4453   echo "$ac_t""yes" 1>&6
4454   LIBS="$LIBS -lx"
4455 else
4456   echo "$ac_t""no" 1>&6
4457 fi
4458
4459 fi
4460
4461 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4462 echo "configure:4463: checking for sys/wait.h that is POSIX.1 compatible" >&5
4463 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466   cat > conftest.$ac_ext <<EOF
4467 #line 4468 "configure"
4468 #include "confdefs.h"
4469 #include <sys/types.h>
4470 #include <sys/wait.h>
4471 #ifndef WEXITSTATUS
4472 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4473 #endif
4474 #ifndef WIFEXITED
4475 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4476 #endif
4477 int main() {
4478 int s;
4479 wait (&s);
4480 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4484   rm -rf conftest*
4485   ac_cv_header_sys_wait_h=yes
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   ac_cv_header_sys_wait_h=no
4491 fi
4492 rm -f conftest*
4493 fi
4494
4495 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4496 if test $ac_cv_header_sys_wait_h = yes; then
4497   cat >> confdefs.h <<\EOF
4498 #define HAVE_SYS_WAIT_H 1
4499 EOF
4500
4501 fi
4502
4503 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4504 echo "configure:4505: checking POSIX termios" >&5
4505 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4506   echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508   cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 #include <sys/types.h>
4512 #include <unistd.h>
4513 #include <termios.h>
4514 int main() {
4515 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4516    tcgetattr(0, 0);
4517 ; return 0; }
4518 EOF
4519 if { (eval echo configure:4520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4520   rm -rf conftest*
4521   am_cv_sys_posix_termios=yes
4522 else
4523   echo "configure: failed program was:" >&5
4524   cat conftest.$ac_ext >&5
4525   rm -rf conftest*
4526   am_cv_sys_posix_termios=no
4527 fi
4528 rm -f conftest*
4529 fi
4530
4531 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4532
4533
4534  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4535 echo "configure:4536: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4536 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4537   echo $ac_n "(cached) $ac_c" 1>&6
4538 else
4539   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4540
4541   gwinsz_in_termios_h=no
4542   if test $am_cv_sys_posix_termios = yes; then
4543     cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546 #include <sys/types.h>
4547 #     include <termios.h>
4548 #     ifdef TIOCGWINSZ
4549         yes
4550 #     endif
4551     
4552 EOF
4553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4554   egrep "yes" >/dev/null 2>&1; then
4555   rm -rf conftest*
4556   gwinsz_in_termios_h=yes
4557 fi
4558 rm -f conftest*
4559
4560   fi
4561
4562   if test $gwinsz_in_termios_h = no; then
4563     cat > conftest.$ac_ext <<EOF
4564 #line 4565 "configure"
4565 #include "confdefs.h"
4566 #include <sys/types.h>
4567 #     include <sys/ioctl.h>
4568 #     ifdef TIOCGWINSZ
4569         yes
4570 #     endif
4571     
4572 EOF
4573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4574   egrep "yes" >/dev/null 2>&1; then
4575   rm -rf conftest*
4576   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4577 fi
4578 rm -f conftest*
4579
4580   fi
4581   
4582 fi
4583
4584 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4585   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4586     cat >> confdefs.h <<\EOF
4587 #define GWINSZ_IN_SYS_IOCTL 1
4588 EOF
4589
4590   fi
4591
4592 if test $am_cv_sys_posix_termios = yes ; then
4593         cat >> confdefs.h <<\EOF
4594 #define HAVE_POSIX_TERMIOS 1
4595 EOF
4596
4597 fi
4598
4599 for ac_hdr in \
4600         arpa/inet.h             \
4601         arpa/nameser.h  \
4602         assert.h                \
4603         conio.h                 \
4604         crypt.h                 \
4605         direct.h                \
4606         errno.h                 \
4607         fcntl.h                 \
4608         filio.h                 \
4609         getopt.h                \
4610         grp.h                   \
4611         io.h                    \
4612         libutil.h               \
4613         limits.h                \
4614         locale.h                \
4615         netinet/tcp.h   \
4616         malloc.h                \
4617         memory.h                \
4618         psap.h                  \
4619         pwd.h                   \
4620         process.h               \
4621         resolv.h                \
4622         sgtty.h                 \
4623         shadow.h                \
4624         stddef.h                \
4625         string.h                \
4626         strings.h               \
4627         sysexits.h              \
4628         sys/file.h              \
4629         sys/filio.h             \
4630         sys/errno.h             \
4631         sys/ioctl.h             \
4632         sys/param.h             \
4633         sys/resource.h  \
4634         sys/select.h    \
4635         sys/socket.h    \
4636         sys/syslog.h    \
4637         sys/time.h              \
4638         sys/types.h             \
4639         syslog.h                \
4640         termios.h               \
4641         unistd.h                \
4642         winsock.h               \
4643
4644 do
4645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4647 echo "configure:4648: checking for $ac_hdr" >&5
4648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4649   echo $ac_n "(cached) $ac_c" 1>&6
4650 else
4651   cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4654 #include <$ac_hdr>
4655 EOF
4656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4657 { (eval echo configure:4658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4659 if test -z "$ac_err"; then
4660   rm -rf conftest*
4661   eval "ac_cv_header_$ac_safe=yes"
4662 else
4663   echo "$ac_err" >&5
4664   echo "configure: failed program was:" >&5
4665   cat conftest.$ac_ext >&5
4666   rm -rf conftest*
4667   eval "ac_cv_header_$ac_safe=no"
4668 fi
4669 rm -f conftest*
4670 fi
4671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4672   echo "$ac_t""yes" 1>&6
4673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4674   cat >> confdefs.h <<EOF
4675 #define $ac_tr_hdr 1
4676 EOF
4677  
4678 else
4679   echo "$ac_t""no" 1>&6
4680 fi
4681 done
4682
4683
4684
4685
4686 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4687 echo "configure:4688: checking for sigset in -lV3" >&5
4688 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4690   echo $ac_n "(cached) $ac_c" 1>&6
4691 else
4692   ac_save_LIBS="$LIBS"
4693 LIBS="-lV3  $LIBS"
4694 cat > conftest.$ac_ext <<EOF
4695 #line 4696 "configure"
4696 #include "confdefs.h"
4697 /* Override any gcc2 internal prototype to avoid an error.  */
4698 /* We use char because int might match the return type of a gcc2
4699     builtin and then its argument prototype would still apply.  */
4700 char sigset();
4701
4702 int main() {
4703 sigset()
4704 ; return 0; }
4705 EOF
4706 if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4707   rm -rf conftest*
4708   eval "ac_cv_lib_$ac_lib_var=yes"
4709 else
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   eval "ac_cv_lib_$ac_lib_var=no"
4714 fi
4715 rm -f conftest*
4716 LIBS="$ac_save_LIBS"
4717
4718 fi
4719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4720   echo "$ac_t""yes" 1>&6
4721     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4722     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4723   cat >> confdefs.h <<EOF
4724 #define $ac_tr_lib 1
4725 EOF
4726
4727   LIBS="-lV3 $LIBS"
4728
4729 else
4730   echo "$ac_t""no" 1>&6
4731 fi
4732
4733
4734 if test $ac_cv_header_winsock_h = yes; then
4735         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4736 echo "configure:4737: checking for winsock" >&5
4737 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   cat > conftest.$ac_ext <<EOF
4741 #line 4742 "configure"
4742 #include "confdefs.h"
4743 #include <winsock.h>
4744 int main() {
4745
4746                         socket(0,0,0);
4747                         select(0,NULL,NULL,NULL,NULL);
4748                         closesocket(0);
4749                         gethostname(NULL,0);
4750         
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754   rm -rf conftest*
4755   ol_cv_winsock=yes
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   ol_cv_winsock=no
4761 fi
4762 rm -f conftest*]
4763 fi
4764
4765 echo "$ac_t""$ol_cv_winsock" 1>&6
4766
4767         if test $ol_cv_winsock = yes ; then
4768                 cat >> confdefs.h <<\EOF
4769 #define HAVE_WINSOCK 1
4770 EOF
4771
4772                 ac_cv_func_socket=yes
4773                 ac_cv_func_select=yes
4774                 ac_cv_func_closesocket=yes
4775                 ac_cv_func_gethostname=yes
4776         fi
4777 fi
4778
4779
4780 echo $ac_n "checking for socket""... $ac_c" 1>&6
4781 echo "configure:4782: checking for socket" >&5
4782 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 /* System header to define __stub macros and hopefully few prototypes,
4789     which can conflict with char socket(); below.  */
4790 #include <assert.h>
4791 /* Override any gcc2 internal prototype to avoid an error.  */
4792 /* We use char because int might match the return type of a gcc2
4793     builtin and then its argument prototype would still apply.  */
4794 char socket();
4795 char (*f)();
4796
4797 int main() {
4798
4799 /* The GNU C library defines this for functions which it implements
4800     to always fail with ENOSYS.  Some functions are actually named
4801     something starting with __ and the normal name is an alias.  */
4802 #if defined (__stub_socket) || defined (__stub___socket)
4803 choke me
4804 #else
4805 f = socket;
4806 #endif
4807
4808 ; return 0; }
4809 EOF
4810 if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4811   rm -rf conftest*
4812   eval "ac_cv_func_socket=yes"
4813 else
4814   echo "configure: failed program was:" >&5
4815   cat conftest.$ac_ext >&5
4816   rm -rf conftest*
4817   eval "ac_cv_func_socket=no"
4818 fi
4819 rm -f conftest*
4820 fi
4821
4822 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4823   echo "$ac_t""yes" 1>&6
4824   :
4825 else
4826   echo "$ac_t""no" 1>&6
4827         
4828         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4829 echo "configure:4830: checking for main in -lsocket" >&5
4830 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4832   echo $ac_n "(cached) $ac_c" 1>&6
4833 else
4834   ac_save_LIBS="$LIBS"
4835 LIBS="-lsocket  $LIBS"
4836 cat > conftest.$ac_ext <<EOF
4837 #line 4838 "configure"
4838 #include "confdefs.h"
4839
4840 int main() {
4841 main()
4842 ; return 0; }
4843 EOF
4844 if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4845   rm -rf conftest*
4846   eval "ac_cv_lib_$ac_lib_var=yes"
4847 else
4848   echo "configure: failed program was:" >&5
4849   cat conftest.$ac_ext >&5
4850   rm -rf conftest*
4851   eval "ac_cv_lib_$ac_lib_var=no"
4852 fi
4853 rm -f conftest*
4854 LIBS="$ac_save_LIBS"
4855
4856 fi
4857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4858   echo "$ac_t""yes" 1>&6
4859     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4860     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4861   cat >> confdefs.h <<EOF
4862 #define $ac_tr_lib 1
4863 EOF
4864
4865   LIBS="-lsocket $LIBS"
4866
4867 else
4868   echo "$ac_t""no" 1>&6
4869 fi
4870
4871         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4872 echo "configure:4873: checking for main in -lnet" >&5
4873 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4874 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877   ac_save_LIBS="$LIBS"
4878 LIBS="-lnet  $LIBS"
4879 cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882
4883 int main() {
4884 main()
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888   rm -rf conftest*
4889   eval "ac_cv_lib_$ac_lib_var=yes"
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   eval "ac_cv_lib_$ac_lib_var=no"
4895 fi
4896 rm -f conftest*
4897 LIBS="$ac_save_LIBS"
4898
4899 fi
4900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4901   echo "$ac_t""yes" 1>&6
4902     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4903     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4904   cat >> confdefs.h <<EOF
4905 #define $ac_tr_lib 1
4906 EOF
4907
4908   LIBS="-lnet $LIBS"
4909
4910 else
4911   echo "$ac_t""no" 1>&6
4912 fi
4913
4914         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4915 echo "configure:4916: checking for main in -lnsl_s" >&5
4916 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4917 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4918   echo $ac_n "(cached) $ac_c" 1>&6
4919 else
4920   ac_save_LIBS="$LIBS"
4921 LIBS="-lnsl_s  $LIBS"
4922 cat > conftest.$ac_ext <<EOF
4923 #line 4924 "configure"
4924 #include "confdefs.h"
4925
4926 int main() {
4927 main()
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=yes"
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   eval "ac_cv_lib_$ac_lib_var=no"
4938 fi
4939 rm -f conftest*
4940 LIBS="$ac_save_LIBS"
4941
4942 fi
4943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4944   echo "$ac_t""yes" 1>&6
4945     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4946     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4947   cat >> confdefs.h <<EOF
4948 #define $ac_tr_lib 1
4949 EOF
4950
4951   LIBS="-lnsl_s $LIBS"
4952
4953 else
4954   echo "$ac_t""no" 1>&6
4955 fi
4956
4957         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4958 echo "configure:4959: checking for main in -lnsl" >&5
4959 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4961   echo $ac_n "(cached) $ac_c" 1>&6
4962 else
4963   ac_save_LIBS="$LIBS"
4964 LIBS="-lnsl  $LIBS"
4965 cat > conftest.$ac_ext <<EOF
4966 #line 4967 "configure"
4967 #include "confdefs.h"
4968
4969 int main() {
4970 main()
4971 ; return 0; }
4972 EOF
4973 if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4974   rm -rf conftest*
4975   eval "ac_cv_lib_$ac_lib_var=yes"
4976 else
4977   echo "configure: failed program was:" >&5
4978   cat conftest.$ac_ext >&5
4979   rm -rf conftest*
4980   eval "ac_cv_lib_$ac_lib_var=no"
4981 fi
4982 rm -f conftest*
4983 LIBS="$ac_save_LIBS"
4984
4985 fi
4986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4987   echo "$ac_t""yes" 1>&6
4988     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4990   cat >> confdefs.h <<EOF
4991 #define $ac_tr_lib 1
4992 EOF
4993
4994   LIBS="-lnsl $LIBS"
4995
4996 else
4997   echo "$ac_t""no" 1>&6
4998 fi
4999
5000         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5001 echo "configure:5002: checking for socket in -linet" >&5
5002 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5004   echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006   ac_save_LIBS="$LIBS"
5007 LIBS="-linet  $LIBS"
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011 /* Override any gcc2 internal prototype to avoid an error.  */
5012 /* We use char because int might match the return type of a gcc2
5013     builtin and then its argument prototype would still apply.  */
5014 char socket();
5015
5016 int main() {
5017 socket()
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=yes"
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=no"
5028 fi
5029 rm -f conftest*
5030 LIBS="$ac_save_LIBS"
5031
5032 fi
5033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5034   echo "$ac_t""yes" 1>&6
5035     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5036     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5037   cat >> confdefs.h <<EOF
5038 #define $ac_tr_lib 1
5039 EOF
5040
5041   LIBS="-linet $LIBS"
5042
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5048 echo "configure:5049: checking for main in -lgen" >&5
5049 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053   ac_save_LIBS="$LIBS"
5054 LIBS="-lgen  $LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058
5059 int main() {
5060 main()
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_lib_$ac_lib_var=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=no"
5071 fi
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5074
5075 fi
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5079     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5080   cat >> confdefs.h <<EOF
5081 #define $ac_tr_lib 1
5082 EOF
5083
5084   LIBS="-lgen $LIBS"
5085
5086 else
5087   echo "$ac_t""no" 1>&6
5088 fi
5089
5090
5091 fi
5092
5093
5094 echo $ac_n "checking for select""... $ac_c" 1>&6
5095 echo "configure:5096: checking for select" >&5
5096 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5097   echo $ac_n "(cached) $ac_c" 1>&6
5098 else
5099   cat > conftest.$ac_ext <<EOF
5100 #line 5101 "configure"
5101 #include "confdefs.h"
5102 /* System header to define __stub macros and hopefully few prototypes,
5103     which can conflict with char select(); below.  */
5104 #include <assert.h>
5105 /* Override any gcc2 internal prototype to avoid an error.  */
5106 /* We use char because int might match the return type of a gcc2
5107     builtin and then its argument prototype would still apply.  */
5108 char select();
5109 char (*f)();
5110
5111 int main() {
5112
5113 /* The GNU C library defines this for functions which it implements
5114     to always fail with ENOSYS.  Some functions are actually named
5115     something starting with __ and the normal name is an alias.  */
5116 #if defined (__stub_select) || defined (__stub___select)
5117 choke me
5118 #else
5119 f = select;
5120 #endif
5121
5122 ; return 0; }
5123 EOF
5124 if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5125   rm -rf conftest*
5126   eval "ac_cv_func_select=yes"
5127 else
5128   echo "configure: failed program was:" >&5
5129   cat conftest.$ac_ext >&5
5130   rm -rf conftest*
5131   eval "ac_cv_func_select=no"
5132 fi
5133 rm -f conftest*
5134 fi
5135
5136 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5137   echo "$ac_t""yes" 1>&6
5138   :
5139 else
5140   echo "$ac_t""no" 1>&6
5141 { echo "configure: error: select() required." 1>&2; exit 1; }
5142 fi
5143
5144
5145 if test "${ac_cv_header_winsock_h}" != yes; then
5146                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5147 echo "configure:5148: checking types of arguments for select()" >&5
5148  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5149   echo $ac_n "(cached) $ac_c" 1>&6
5150 else
5151    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5152   echo $ac_n "(cached) $ac_c" 1>&6
5153 else
5154     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5155   echo $ac_n "(cached) $ac_c" 1>&6
5156 else
5157      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5158      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5159       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5160        cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 #ifdef HAVE_SYS_TYPES_H
5164 #include <sys/types.h>
5165 #endif
5166 #ifdef HAVE_SYS_TIME_H
5167 #include <sys/time.h>
5168 #endif
5169 #ifdef HAVE_SYS_SELECT_H
5170 #include <sys/select.h>
5171 #endif
5172 #ifdef HAVE_SYS_SOCKET_H
5173 #include <sys/socket.h>
5174 #endif
5175 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);
5176 int main() {
5177
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5181   rm -rf conftest*
5182           ac_not_found=no ; break 3
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   ac_not_found=yes
5188 fi
5189 rm -f conftest*
5190       done
5191      done
5192     done
5193    
5194 fi
5195   
5196 fi
5197  
5198 fi
5199  if test "$ac_not_found" = yes; then
5200   ac_cv_func_select_arg1=int 
5201   ac_cv_func_select_arg234='int *' 
5202   ac_cv_func_select_arg5='struct timeval *'
5203  fi
5204  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5205  cat >> confdefs.h <<EOF
5206 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5207 EOF
5208
5209  cat >> confdefs.h <<EOF
5210 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5211 EOF
5212
5213  cat >> confdefs.h <<EOF
5214 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5215 EOF
5216
5217
5218 fi
5219
5220
5221 for ac_hdr in regex.h 
5222 do
5223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5225 echo "configure:5226: checking for $ac_hdr" >&5
5226 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5227   echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229   cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232 #include <$ac_hdr>
5233 EOF
5234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5235 { (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5237 if test -z "$ac_err"; then
5238   rm -rf conftest*
5239   eval "ac_cv_header_$ac_safe=yes"
5240 else
5241   echo "$ac_err" >&5
5242   echo "configure: failed program was:" >&5
5243   cat conftest.$ac_ext >&5
5244   rm -rf conftest*
5245   eval "ac_cv_header_$ac_safe=no"
5246 fi
5247 rm -f conftest*
5248 fi
5249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5250   echo "$ac_t""yes" 1>&6
5251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5252   cat >> confdefs.h <<EOF
5253 #define $ac_tr_hdr 1
5254 EOF
5255  
5256 else
5257   echo "$ac_t""no" 1>&6
5258 fi
5259 done
5260
5261 if test "$ac_cv_header_regex_h" != yes ; then
5262         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5263 fi
5264 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5265 echo "configure:5266: checking for regfree" >&5
5266 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 /* System header to define __stub macros and hopefully few prototypes,
5273     which can conflict with char regfree(); below.  */
5274 #include <assert.h>
5275 /* Override any gcc2 internal prototype to avoid an error.  */
5276 /* We use char because int might match the return type of a gcc2
5277     builtin and then its argument prototype would still apply.  */
5278 char regfree();
5279 char (*f)();
5280
5281 int main() {
5282
5283 /* The GNU C library defines this for functions which it implements
5284     to always fail with ENOSYS.  Some functions are actually named
5285     something starting with __ and the normal name is an alias.  */
5286 #if defined (__stub_regfree) || defined (__stub___regfree)
5287 choke me
5288 #else
5289 f = regfree;
5290 #endif
5291
5292 ; return 0; }
5293 EOF
5294 if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5295   rm -rf conftest*
5296   eval "ac_cv_func_regfree=yes"
5297 else
5298   echo "configure: failed program was:" >&5
5299   cat conftest.$ac_ext >&5
5300   rm -rf conftest*
5301   eval "ac_cv_func_regfree=no"
5302 fi
5303 rm -f conftest*
5304 fi
5305
5306 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5307   echo "$ac_t""yes" 1>&6
5308   :
5309 else
5310   echo "$ac_t""no" 1>&6
5311 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5312 fi
5313
5314
5315
5316 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5317 echo "configure:5318: checking for compatible POSIX regex" >&5
5318 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5319   echo $ac_n "(cached) $ac_c" 1>&6
5320 else
5321   
5322         if test "$cross_compiling" = yes; then
5323   ol_cv_c_posix_regex=cross
5324 else
5325   cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5328
5329 #include <sys/types.h>
5330 #include <regex.h>
5331 static char *pattern, *string;
5332 main()
5333 {
5334         int rc;
5335         regex_t re;
5336
5337         pattern = "^A";
5338
5339         if(regcomp(&re, pattern, 0)) {
5340                 return -1;
5341         }
5342         
5343         string = "ALL MATCH";
5344         
5345         rc = regexec(&re, string, 0, (void*)0, 0);
5346
5347         regfree(&re);
5348
5349         return rc;
5350 }
5351 EOF
5352 if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5353 then
5354   ol_cv_c_posix_regex=yes
5355 else
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358   rm -fr conftest*
5359   ol_cv_c_posix_regex=no
5360 fi
5361 rm -fr conftest*
5362 fi
5363
5364 fi
5365
5366 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5367
5368 if test "$ol_cv_c_posix_regex" = no ; then
5369         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5370 fi
5371
5372 ol_link_dnssrv=no
5373 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5374 echo "configure:5375: checking for res_query" >&5
5375 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5376   echo $ac_n "(cached) $ac_c" 1>&6
5377 else
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381 /* System header to define __stub macros and hopefully few prototypes,
5382     which can conflict with char res_query(); below.  */
5383 #include <assert.h>
5384 /* Override any gcc2 internal prototype to avoid an error.  */
5385 /* We use char because int might match the return type of a gcc2
5386     builtin and then its argument prototype would still apply.  */
5387 char res_query();
5388 char (*f)();
5389
5390 int main() {
5391
5392 /* The GNU C library defines this for functions which it implements
5393     to always fail with ENOSYS.  Some functions are actually named
5394     something starting with __ and the normal name is an alias.  */
5395 #if defined (__stub_res_query) || defined (__stub___res_query)
5396 choke me
5397 #else
5398 f = res_query;
5399 #endif
5400
5401 ; return 0; }
5402 EOF
5403 if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5404   rm -rf conftest*
5405   eval "ac_cv_func_res_query=yes"
5406 else
5407   echo "configure: failed program was:" >&5
5408   cat conftest.$ac_ext >&5
5409   rm -rf conftest*
5410   eval "ac_cv_func_res_query=no"
5411 fi
5412 rm -f conftest*
5413 fi
5414
5415 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5416   echo "$ac_t""yes" 1>&6
5417   :
5418 else
5419   echo "$ac_t""no" 1>&6
5420 fi
5421
5422 if test $ac_cv_func_res_query = no ; then 
5423         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5424 echo "configure:5425: checking for res_query in -lbind" >&5
5425 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5426 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5427   echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429   ac_save_LIBS="$LIBS"
5430 LIBS="-lbind  $LIBS"
5431 cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 /* Override any gcc2 internal prototype to avoid an error.  */
5435 /* We use char because int might match the return type of a gcc2
5436     builtin and then its argument prototype would still apply.  */
5437 char res_query();
5438
5439 int main() {
5440 res_query()
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   eval "ac_cv_lib_$ac_lib_var=yes"
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449   rm -rf conftest*
5450   eval "ac_cv_lib_$ac_lib_var=no"
5451 fi
5452 rm -f conftest*
5453 LIBS="$ac_save_LIBS"
5454
5455 fi
5456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5457   echo "$ac_t""yes" 1>&6
5458     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5459     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5460   cat >> confdefs.h <<EOF
5461 #define $ac_tr_lib 1
5462 EOF
5463
5464   LIBS="-lbind $LIBS"
5465
5466 else
5467   echo "$ac_t""no" 1>&6
5468 fi
5469
5470         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5471 fi
5472
5473 if test $ac_cv_func_res_query = no ; then 
5474         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5475 echo "configure:5476: checking for __res_query in -lbind" >&5
5476 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5478   echo $ac_n "(cached) $ac_c" 1>&6
5479 else
5480   ac_save_LIBS="$LIBS"
5481 LIBS="-lbind  $LIBS"
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 /* Override any gcc2 internal prototype to avoid an error.  */
5486 /* We use char because int might match the return type of a gcc2
5487     builtin and then its argument prototype would still apply.  */
5488 char __res_query();
5489
5490 int main() {
5491 __res_query()
5492 ; return 0; }
5493 EOF
5494 if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495   rm -rf conftest*
5496   eval "ac_cv_lib_$ac_lib_var=yes"
5497 else
5498   echo "configure: failed program was:" >&5
5499   cat conftest.$ac_ext >&5
5500   rm -rf conftest*
5501   eval "ac_cv_lib_$ac_lib_var=no"
5502 fi
5503 rm -f conftest*
5504 LIBS="$ac_save_LIBS"
5505
5506 fi
5507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5508   echo "$ac_t""yes" 1>&6
5509     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5510     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5511   cat >> confdefs.h <<EOF
5512 #define $ac_tr_lib 1
5513 EOF
5514
5515   LIBS="-lbind $LIBS"
5516
5517 else
5518   echo "$ac_t""no" 1>&6
5519 fi
5520
5521         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5522 fi
5523
5524 if test $ac_cv_func_res_query = no ; then 
5525         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5526 echo "configure:5527: checking for res_query in -lresolv" >&5
5527 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5528 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5529   echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531   ac_save_LIBS="$LIBS"
5532 LIBS="-lresolv  $LIBS"
5533 cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5536 /* Override any gcc2 internal prototype to avoid an error.  */
5537 /* We use char because int might match the return type of a gcc2
5538     builtin and then its argument prototype would still apply.  */
5539 char res_query();
5540
5541 int main() {
5542 res_query()
5543 ; return 0; }
5544 EOF
5545 if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5546   rm -rf conftest*
5547   eval "ac_cv_lib_$ac_lib_var=yes"
5548 else
5549   echo "configure: failed program was:" >&5
5550   cat conftest.$ac_ext >&5
5551   rm -rf conftest*
5552   eval "ac_cv_lib_$ac_lib_var=no"
5553 fi
5554 rm -f conftest*
5555 LIBS="$ac_save_LIBS"
5556
5557 fi
5558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5559   echo "$ac_t""yes" 1>&6
5560     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5561     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5562   cat >> confdefs.h <<EOF
5563 #define $ac_tr_lib 1
5564 EOF
5565
5566   LIBS="-lresolv $LIBS"
5567
5568 else
5569   echo "$ac_t""no" 1>&6
5570 fi
5571
5572         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5573 fi
5574
5575 if test "$ac_cv_func_res_query" = yes ; then
5576         cat >> confdefs.h <<\EOF
5577 #define HAVE_RES_QUERY 1
5578 EOF
5579
5580
5581         if test $ol_enable_dnssrv != no ; then
5582                 ol_link_dnssrv=yes
5583         fi
5584 fi
5585
5586 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5587         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5588 fi
5589
5590 ol_link_kbind=no
5591 ol_link_kpasswd=no
5592 ol_link_krb5=no
5593 ol_link_krb4=no
5594
5595 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5596         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5597
5598         for ac_hdr in krb5.h
5599 do
5600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5602 echo "configure:5603: checking for $ac_hdr" >&5
5603 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5604   echo $ac_n "(cached) $ac_c" 1>&6
5605 else
5606   cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609 #include <$ac_hdr>
5610 EOF
5611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5612 { (eval echo configure:5613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5614 if test -z "$ac_err"; then
5615   rm -rf conftest*
5616   eval "ac_cv_header_$ac_safe=yes"
5617 else
5618   echo "$ac_err" >&5
5619   echo "configure: failed program was:" >&5
5620   cat conftest.$ac_ext >&5
5621   rm -rf conftest*
5622   eval "ac_cv_header_$ac_safe=no"
5623 fi
5624 rm -f conftest*
5625 fi
5626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5627   echo "$ac_t""yes" 1>&6
5628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5629   cat >> confdefs.h <<EOF
5630 #define $ac_tr_hdr 1
5631 EOF
5632  
5633 else
5634   echo "$ac_t""no" 1>&6
5635 fi
5636 done
5637
5638
5639         if test $ac_cv_header_krb5_h = yes ; then
5640                                 for ac_hdr in heim_err.h
5641 do
5642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5644 echo "configure:5645: checking for $ac_hdr" >&5
5645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5646   echo $ac_n "(cached) $ac_c" 1>&6
5647 else
5648   cat > conftest.$ac_ext <<EOF
5649 #line 5650 "configure"
5650 #include "confdefs.h"
5651 #include <$ac_hdr>
5652 EOF
5653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5654 { (eval echo configure:5655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5656 if test -z "$ac_err"; then
5657   rm -rf conftest*
5658   eval "ac_cv_header_$ac_safe=yes"
5659 else
5660   echo "$ac_err" >&5
5661   echo "configure: failed program was:" >&5
5662   cat conftest.$ac_ext >&5
5663   rm -rf conftest*
5664   eval "ac_cv_header_$ac_safe=no"
5665 fi
5666 rm -f conftest*
5667 fi
5668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5669   echo "$ac_t""yes" 1>&6
5670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5671   cat >> confdefs.h <<EOF
5672 #define $ac_tr_hdr 1
5673 EOF
5674  
5675 else
5676   echo "$ac_t""no" 1>&6
5677 fi
5678 done
5679
5680                 if test $ac_cv_header_heim_err_h = yes ; then
5681                         krb5_impl=heimdal
5682                 else
5683                         krb5_impl=mit
5684                 fi
5685
5686                 if test $krb5_impl = mit; then
5687                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5688 echo "configure:5689: checking for main in -lkrb5" >&5
5689 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5691   echo $ac_n "(cached) $ac_c" 1>&6
5692 else
5693   ac_save_LIBS="$LIBS"
5694 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5695 cat > conftest.$ac_ext <<EOF
5696 #line 5697 "configure"
5697 #include "confdefs.h"
5698
5699 int main() {
5700 main()
5701 ; return 0; }
5702 EOF
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5704   rm -rf conftest*
5705   eval "ac_cv_lib_$ac_lib_var=yes"
5706 else
5707   echo "configure: failed program was:" >&5
5708   cat conftest.$ac_ext >&5
5709   rm -rf conftest*
5710   eval "ac_cv_lib_$ac_lib_var=no"
5711 fi
5712 rm -f conftest*
5713 LIBS="$ac_save_LIBS"
5714
5715 fi
5716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5717   echo "$ac_t""yes" 1>&6
5718   have_krb5=yes
5719                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5720 else
5721   echo "$ac_t""no" 1>&6
5722 have_krb5=no
5723 fi
5724
5725
5726                 elif test $krb5_impl = heimdal; then
5727                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5728 echo "configure:5729: checking for main in -lkrb5" >&5
5729 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5731   echo $ac_n "(cached) $ac_c" 1>&6
5732 else
5733   ac_save_LIBS="$LIBS"
5734 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5735 cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5738
5739 int main() {
5740 main()
5741 ; return 0; }
5742 EOF
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5744   rm -rf conftest*
5745   eval "ac_cv_lib_$ac_lib_var=yes"
5746 else
5747   echo "configure: failed program was:" >&5
5748   cat conftest.$ac_ext >&5
5749   rm -rf conftest*
5750   eval "ac_cv_lib_$ac_lib_var=no"
5751 fi
5752 rm -f conftest*
5753 LIBS="$ac_save_LIBS"
5754
5755 fi
5756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5757   echo "$ac_t""yes" 1>&6
5758   have_krb5=yes
5759                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5760 else
5761   echo "$ac_t""no" 1>&6
5762 have_krb5=no
5763 fi
5764
5765
5766                         cat >> confdefs.h <<\EOF
5767 #define HAVE_HEIMDAL_KERBEROS 1
5768 EOF
5769
5770                 else
5771                         have_krb5=no
5772                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5773                 fi
5774
5775                 if test $have_krb5 = yes ; then
5776                         ol_link_krb5=yes
5777
5778                         cat >> confdefs.h <<\EOF
5779 #define HAVE_KRB5 1
5780 EOF
5781
5782
5783                         if test $ol_enable_kpasswd != no ; then
5784                                 ol_link_kpasswd=yes;
5785                         fi
5786
5787                         if test $ol_with_kerberos = k5only ; then
5788                                 ol_with_kerberos=found
5789                         fi
5790
5791                 elif test $ol_with_kerberos != auto ; then
5792                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5793                 fi
5794
5795         fi
5796 fi
5797
5798 if test $ol_link_krb5 = yes -a \
5799         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5800
5801         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5802 do
5803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5805 echo "configure:5806: checking for $ac_hdr" >&5
5806 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5807   echo $ac_n "(cached) $ac_c" 1>&6
5808 else
5809   cat > conftest.$ac_ext <<EOF
5810 #line 5811 "configure"
5811 #include "confdefs.h"
5812 #include <$ac_hdr>
5813 EOF
5814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5815 { (eval echo configure:5816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5817 if test -z "$ac_err"; then
5818   rm -rf conftest*
5819   eval "ac_cv_header_$ac_safe=yes"
5820 else
5821   echo "$ac_err" >&5
5822   echo "configure: failed program was:" >&5
5823   cat conftest.$ac_ext >&5
5824   rm -rf conftest*
5825   eval "ac_cv_header_$ac_safe=no"
5826 fi
5827 rm -f conftest*
5828 fi
5829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5830   echo "$ac_t""yes" 1>&6
5831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5832   cat >> confdefs.h <<EOF
5833 #define $ac_tr_hdr 1
5834 EOF
5835  
5836 else
5837   echo "$ac_t""no" 1>&6
5838 fi
5839 done
5840
5841
5842         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5843                 if test $krb5_impl = mit; then
5844                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5845 echo "configure:5846: checking for main in -lkrb4" >&5
5846 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5848   echo $ac_n "(cached) $ac_c" 1>&6
5849 else
5850   ac_save_LIBS="$LIBS"
5851 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5852 cat > conftest.$ac_ext <<EOF
5853 #line 5854 "configure"
5854 #include "confdefs.h"
5855
5856 int main() {
5857 main()
5858 ; return 0; }
5859 EOF
5860 if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5861   rm -rf conftest*
5862   eval "ac_cv_lib_$ac_lib_var=yes"
5863 else
5864   echo "configure: failed program was:" >&5
5865   cat conftest.$ac_ext >&5
5866   rm -rf conftest*
5867   eval "ac_cv_lib_$ac_lib_var=no"
5868 fi
5869 rm -f conftest*
5870 LIBS="$ac_save_LIBS"
5871
5872 fi
5873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5874   echo "$ac_t""yes" 1>&6
5875   have_k425=yes
5876                                 KRB4_LIBS="-lkrb4 -ldes425"
5877 else
5878   echo "$ac_t""no" 1>&6
5879 have_k425=no
5880 fi
5881
5882
5883                 elif test $krb5_impl = heimdal; then
5884                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5885 echo "configure:5886: checking for main in -lkrb4" >&5
5886 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5888   echo $ac_n "(cached) $ac_c" 1>&6
5889 else
5890   ac_save_LIBS="$LIBS"
5891 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5892 cat > conftest.$ac_ext <<EOF
5893 #line 5894 "configure"
5894 #include "confdefs.h"
5895
5896 int main() {
5897 main()
5898 ; return 0; }
5899 EOF
5900 if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5901   rm -rf conftest*
5902   eval "ac_cv_lib_$ac_lib_var=yes"
5903 else
5904   echo "configure: failed program was:" >&5
5905   cat conftest.$ac_ext >&5
5906   rm -rf conftest*
5907   eval "ac_cv_lib_$ac_lib_var=no"
5908 fi
5909 rm -f conftest*
5910 LIBS="$ac_save_LIBS"
5911
5912 fi
5913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5914   echo "$ac_t""yes" 1>&6
5915   have_k425=yes
5916                                 KRB4_LIBS="-lkrb4"
5917 else
5918   echo "$ac_t""no" 1>&6
5919 have_k425=no
5920 fi
5921
5922
5923                 else
5924                         have_425=no
5925                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5926                 fi
5927
5928                 if test $have_k425 = yes ; then
5929                         ol_with_kerberos=found
5930                         ol_link_krb4=yes
5931
5932                         cat >> confdefs.h <<\EOF
5933 #define HAVE_KRB425 1
5934 EOF
5935
5936                         cat >> confdefs.h <<\EOF
5937 #define HAVE_KRB4 1
5938 EOF
5939
5940
5941                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5942 echo "configure:5943: checking for des_debug in Kerberos libraries" >&5
5943 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5944   echo $ac_n "(cached) $ac_c" 1>&6
5945 else
5946   
5947                                                                 save_LIBS="$LIBS"
5948                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
5949                                 cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5952
5953 #include <kerberosIV/krb.h>
5954 #include <kerberosIV/des.h>
5955 extern int des_debug;
5956
5957 int main() {
5958
5959 des_debug = 1;
5960
5961 ; return 0; }
5962 EOF
5963 if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5964   rm -rf conftest*
5965   ol_cv_var_des_debug=yes
5966 else
5967   echo "configure: failed program was:" >&5
5968   cat conftest.$ac_ext >&5
5969   rm -rf conftest*
5970   ol_cv_var_des_debug=no
5971 fi
5972 rm -f conftest*
5973                                                                 LIBS="$save_LIBS"
5974                         
5975 fi
5976
5977 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5978
5979                         if test $ol_cv_var_des_debug = yes ; then
5980                                 cat >> confdefs.h <<\EOF
5981 #define HAVE_DES_DEBUG 1
5982 EOF
5983
5984                         fi
5985
5986                         LIBS="$save_LIBS"
5987                 fi
5988         fi
5989 fi
5990
5991 if test $ol_link_krb5 = yes ; then
5992         ol_with_kerberos=found
5993 fi
5994
5995 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
5996         -o $ol_with_kerberos = kth ; then
5997
5998         for ac_hdr in krb.h des.h krb-archaeology.h 
5999 do
6000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6002 echo "configure:6003: checking for $ac_hdr" >&5
6003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6004   echo $ac_n "(cached) $ac_c" 1>&6
6005 else
6006   cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 #include <$ac_hdr>
6010 EOF
6011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6012 { (eval echo configure:6013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6014 if test -z "$ac_err"; then
6015   rm -rf conftest*
6016   eval "ac_cv_header_$ac_safe=yes"
6017 else
6018   echo "$ac_err" >&5
6019   echo "configure: failed program was:" >&5
6020   cat conftest.$ac_ext >&5
6021   rm -rf conftest*
6022   eval "ac_cv_header_$ac_safe=no"
6023 fi
6024 rm -f conftest*
6025 fi
6026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6027   echo "$ac_t""yes" 1>&6
6028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6029   cat >> confdefs.h <<EOF
6030 #define $ac_tr_hdr 1
6031 EOF
6032  
6033 else
6034   echo "$ac_t""no" 1>&6
6035 fi
6036 done
6037
6038
6039         if test $ac_cv_header_krb_h = yes ; then
6040                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6041 echo "configure:6042: checking for main in -lkrb" >&5
6042 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6044   echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046   ac_save_LIBS="$LIBS"
6047 LIBS="-lkrb -ldes $LIBS"
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051
6052 int main() {
6053 main()
6054 ; return 0; }
6055 EOF
6056 if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6057   rm -rf conftest*
6058   eval "ac_cv_lib_$ac_lib_var=yes"
6059 else
6060   echo "configure: failed program was:" >&5
6061   cat conftest.$ac_ext >&5
6062   rm -rf conftest*
6063   eval "ac_cv_lib_$ac_lib_var=no"
6064 fi
6065 rm -f conftest*
6066 LIBS="$ac_save_LIBS"
6067
6068 fi
6069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6070   echo "$ac_t""yes" 1>&6
6071   have_k4=yes
6072 else
6073   echo "$ac_t""no" 1>&6
6074 have_k4=no
6075 fi
6076
6077
6078                 if test $have_k4 = yes ; then
6079                         ol_with_kerberos=found
6080                         ol_link_krb4=yes
6081
6082                         cat >> confdefs.h <<\EOF
6083 #define HAVE_KRB4 1
6084 EOF
6085
6086
6087                         KRB4_LIBS="-lkrb -ldes"
6088
6089                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6090                                 cat >> confdefs.h <<\EOF
6091 #define HAVE_KTH_KERBEROS 1
6092 EOF
6093
6094                         fi
6095                 fi
6096         fi
6097 fi
6098
6099 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6100         ol_link_kpasswd=yes;
6101 fi
6102
6103 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6104         cat >> confdefs.h <<\EOF
6105 #define HAVE_KERBEROS 1
6106 EOF
6107
6108
6109 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6110         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6111 fi
6112
6113 ol_link_tls=no
6114 if test $ol_with_tls != no ; then
6115         for ac_hdr in openssl/ssl.h ssl.h
6116 do
6117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6119 echo "configure:6120: checking for $ac_hdr" >&5
6120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6121   echo $ac_n "(cached) $ac_c" 1>&6
6122 else
6123   cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126 #include <$ac_hdr>
6127 EOF
6128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6129 { (eval echo configure:6130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6131 if test -z "$ac_err"; then
6132   rm -rf conftest*
6133   eval "ac_cv_header_$ac_safe=yes"
6134 else
6135   echo "$ac_err" >&5
6136   echo "configure: failed program was:" >&5
6137   cat conftest.$ac_ext >&5
6138   rm -rf conftest*
6139   eval "ac_cv_header_$ac_safe=no"
6140 fi
6141 rm -f conftest*
6142 fi
6143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6144   echo "$ac_t""yes" 1>&6
6145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6146   cat >> confdefs.h <<EOF
6147 #define $ac_tr_hdr 1
6148 EOF
6149  
6150 else
6151   echo "$ac_t""no" 1>&6
6152 fi
6153 done
6154
6155         
6156         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6157                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6158 echo "configure:6159: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6159 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6161   echo $ac_n "(cached) $ac_c" 1>&6
6162 else
6163   ac_save_LIBS="$LIBS"
6164 LIBS="-lssl -lcrypto $LIBS"
6165 cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 /* Override any gcc2 internal prototype to avoid an error.  */
6169 /* We use char because int might match the return type of a gcc2
6170     builtin and then its argument prototype would still apply.  */
6171 char SSLeay_add_ssl_algorithms();
6172
6173 int main() {
6174 SSLeay_add_ssl_algorithms()
6175 ; return 0; }
6176 EOF
6177 if { (eval echo configure:6178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6178   rm -rf conftest*
6179   eval "ac_cv_lib_$ac_lib_var=yes"
6180 else
6181   echo "configure: failed program was:" >&5
6182   cat conftest.$ac_ext >&5
6183   rm -rf conftest*
6184   eval "ac_cv_lib_$ac_lib_var=no"
6185 fi
6186 rm -f conftest*
6187 LIBS="$ac_save_LIBS"
6188
6189 fi
6190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6191   echo "$ac_t""yes" 1>&6
6192   have_ssleay=yes
6193                         need_rsaref=no
6194 else
6195   echo "$ac_t""no" 1>&6
6196 have_ssleay=no
6197 fi
6198
6199                         
6200                 if test $have_ssleay = no ; then
6201                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6202 echo "configure:6203: checking for SSL_library_init in -lssl" >&5
6203 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6204 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6205   echo $ac_n "(cached) $ac_c" 1>&6
6206 else
6207   ac_save_LIBS="$LIBS"
6208 LIBS="-lssl -lcrypto $LIBS"
6209 cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 /* Override any gcc2 internal prototype to avoid an error.  */
6213 /* We use char because int might match the return type of a gcc2
6214     builtin and then its argument prototype would still apply.  */
6215 char SSL_library_init();
6216
6217 int main() {
6218 SSL_library_init()
6219 ; return 0; }
6220 EOF
6221 if { (eval echo configure:6222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6222   rm -rf conftest*
6223   eval "ac_cv_lib_$ac_lib_var=yes"
6224 else
6225   echo "configure: failed program was:" >&5
6226   cat conftest.$ac_ext >&5
6227   rm -rf conftest*
6228   eval "ac_cv_lib_$ac_lib_var=no"
6229 fi
6230 rm -f conftest*
6231 LIBS="$ac_save_LIBS"
6232
6233 fi
6234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6235   echo "$ac_t""yes" 1>&6
6236   have_ssleay=yes
6237                                 need_rsaref=no
6238 else
6239   echo "$ac_t""no" 1>&6
6240 have_ssleay=no
6241 fi
6242
6243                 fi
6244
6245                 if test $have_ssleay = no ; then
6246                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6247 echo "configure:6248: checking for ssl3_accept in -lssl" >&5
6248 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6249 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6250   echo $ac_n "(cached) $ac_c" 1>&6
6251 else
6252   ac_save_LIBS="$LIBS"
6253 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6254 cat > conftest.$ac_ext <<EOF
6255 #line 6256 "configure"
6256 #include "confdefs.h"
6257 /* Override any gcc2 internal prototype to avoid an error.  */
6258 /* We use char because int might match the return type of a gcc2
6259     builtin and then its argument prototype would still apply.  */
6260 char ssl3_accept();
6261
6262 int main() {
6263 ssl3_accept()
6264 ; return 0; }
6265 EOF
6266 if { (eval echo configure:6267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6267   rm -rf conftest*
6268   eval "ac_cv_lib_$ac_lib_var=yes"
6269 else
6270   echo "configure: failed program was:" >&5
6271   cat conftest.$ac_ext >&5
6272   rm -rf conftest*
6273   eval "ac_cv_lib_$ac_lib_var=no"
6274 fi
6275 rm -f conftest*
6276 LIBS="$ac_save_LIBS"
6277
6278 fi
6279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6280   echo "$ac_t""yes" 1>&6
6281   have_ssleay=yes
6282                                 need_rsaref=yes
6283 else
6284   echo "$ac_t""no" 1>&6
6285 have_ssleay=no
6286 fi
6287
6288                 fi
6289
6290                 if test $have_ssleay = yes ; then
6291                         ol_with_tls=found
6292                         ol_link_tls=yes
6293
6294                         cat >> confdefs.h <<\EOF
6295 #define HAVE_SSLEAY 1
6296 EOF
6297
6298
6299                         if test $need_rsaref = yes; then
6300                                 cat >> confdefs.h <<\EOF
6301 #define HAVE_RSAREF 1
6302 EOF
6303
6304
6305                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6306                         else
6307                                 TLS_LIBS="-lssl -lcrypto"
6308                         fi
6309                 fi
6310         fi
6311
6312 else
6313         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6314 fi
6315
6316 if test $ol_link_tls = yes ; then
6317         cat >> confdefs.h <<\EOF
6318 #define HAVE_TLS 1
6319 EOF
6320
6321
6322 elif test $ol_with_tls = auto ; then
6323         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6324         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6325
6326 elif test $ol_with_tls != no ; then
6327         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6328 fi
6329
6330 for ac_func in \
6331         ctime_r                 \
6332         gethostbyname_r gethostbyaddr_r \
6333
6334 do
6335 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6336 echo "configure:6337: checking for $ac_func" >&5
6337 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6338   echo $ac_n "(cached) $ac_c" 1>&6
6339 else
6340   cat > conftest.$ac_ext <<EOF
6341 #line 6342 "configure"
6342 #include "confdefs.h"
6343 /* System header to define __stub macros and hopefully few prototypes,
6344     which can conflict with char $ac_func(); below.  */
6345 #include <assert.h>
6346 /* Override any gcc2 internal prototype to avoid an error.  */
6347 /* We use char because int might match the return type of a gcc2
6348     builtin and then its argument prototype would still apply.  */
6349 char $ac_func();
6350 char (*f)();
6351
6352 int main() {
6353
6354 /* The GNU C library defines this for functions which it implements
6355     to always fail with ENOSYS.  Some functions are actually named
6356     something starting with __ and the normal name is an alias.  */
6357 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6358 choke me
6359 #else
6360 f = $ac_func;
6361 #endif
6362
6363 ; return 0; }
6364 EOF
6365 if { (eval echo configure:6366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6366   rm -rf conftest*
6367   eval "ac_cv_func_$ac_func=yes"
6368 else
6369   echo "configure: failed program was:" >&5
6370   cat conftest.$ac_ext >&5
6371   rm -rf conftest*
6372   eval "ac_cv_func_$ac_func=no"
6373 fi
6374 rm -f conftest*
6375 fi
6376
6377 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6378   echo "$ac_t""yes" 1>&6
6379     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6380   cat >> confdefs.h <<EOF
6381 #define $ac_tr_func 1
6382 EOF
6383  
6384 else
6385   echo "$ac_t""no" 1>&6
6386 fi
6387 done
6388
6389
6390 if test "$ac_cv_func_ctime_r" = no ; then
6391         ol_cv_func_ctime_r_nargs=0
6392 else
6393         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6394 echo "configure:6395: checking number of arguments of ctime_r" >&5
6395 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6396   echo $ac_n "(cached) $ac_c" 1>&6
6397 else
6398   cat > conftest.$ac_ext <<EOF
6399 #line 6400 "configure"
6400 #include "confdefs.h"
6401 #include <time.h>
6402 int main() {
6403 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6404 ; return 0; }
6405 EOF
6406 if { (eval echo configure:6407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6407   rm -rf conftest*
6408   ol_cv_func_ctime_r_nargs3=yes
6409 else
6410   echo "configure: failed program was:" >&5
6411   cat conftest.$ac_ext >&5
6412   rm -rf conftest*
6413   ol_cv_func_ctime_r_nargs3=no
6414 fi
6415 rm -f conftest*
6416
6417         cat > conftest.$ac_ext <<EOF
6418 #line 6419 "configure"
6419 #include "confdefs.h"
6420 #include <time.h>
6421 int main() {
6422 time_t ti; char *buffer; ctime_r(&ti,buffer);
6423 ; return 0; }
6424 EOF
6425 if { (eval echo configure:6426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6426   rm -rf conftest*
6427   ol_cv_func_ctime_r_nargs2=yes
6428 else
6429   echo "configure: failed program was:" >&5
6430   cat conftest.$ac_ext >&5
6431   rm -rf conftest*
6432   ol_cv_func_ctime_r_nargs2=no
6433 fi
6434 rm -f conftest*
6435
6436         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6437                 $ol_cv_func_ctime_r_nargs2 = no ; then
6438
6439                 ol_cv_func_ctime_r_nargs=3
6440
6441         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6442                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6443
6444                 ol_cv_func_ctime_r_nargs=2
6445
6446         else
6447                 ol_cv_func_ctime_r_nargs=0
6448         fi
6449   
6450 fi
6451
6452 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6453
6454   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6455         cat >> confdefs.h <<EOF
6456 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6457 EOF
6458
6459   fi
6460
6461 fi
6462
6463 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6464         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6465 echo "configure:6466: checking number of arguments of gethostbyname_r" >&5
6466 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6467   echo $ac_n "(cached) $ac_c" 1>&6
6468 else
6469   cat > conftest.$ac_ext <<EOF
6470 #line 6471 "configure"
6471 #include "confdefs.h"
6472 #include <sys/types.h>
6473 #include <sys/socket.h>
6474 #include <netinet/in.h>
6475 #include <netdb.h>
6476 #define BUFSIZE (sizeof(struct hostent)+10)
6477 int main() {
6478 struct hostent hent; char buffer[BUFSIZE];
6479                 int bufsize=BUFSIZE;int h_errno;
6480                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6481                         buffer, bufsize, &h_errno);
6482 ; return 0; }
6483 EOF
6484 if { (eval echo configure:6485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6485   rm -rf conftest*
6486   ol_cv_func_gethostbyname_r_nargs5=yes
6487 else
6488   echo "configure: failed program was:" >&5
6489   cat conftest.$ac_ext >&5
6490   rm -rf conftest*
6491   ol_cv_func_gethostbyname_r_nargs5=no
6492 fi
6493 rm -f conftest*
6494
6495         cat > conftest.$ac_ext <<EOF
6496 #line 6497 "configure"
6497 #include "confdefs.h"
6498 #include <sys/types.h>
6499 #include <sys/socket.h>
6500 #include <netinet/in.h>
6501 #include <netdb.h>
6502 #define BUFSIZE (sizeof(struct hostent)+10)
6503 int main() {
6504 struct hostent hent;struct hostent *rhent;
6505                 char buffer[BUFSIZE];
6506                 int bufsize=BUFSIZE;int h_errno;
6507                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6508                         &rhent, &h_errno);
6509 ; return 0; }
6510 EOF
6511 if { (eval echo configure:6512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6512   rm -rf conftest*
6513   ol_cv_func_gethostbyname_r_nargs6=yes
6514 else
6515   echo "configure: failed program was:" >&5
6516   cat conftest.$ac_ext >&5
6517   rm -rf conftest*
6518   ol_cv_func_gethostbyname_r_nargs6=no
6519 fi
6520 rm -f conftest*
6521
6522         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6523                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6524
6525                 ol_cv_func_gethostbyname_r_nargs=5
6526
6527         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6528                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6529
6530                 ol_cv_func_gethostbyname_r_nargs=6
6531
6532         else
6533                 ol_cv_func_gethostbyname_r_nargs=0
6534         fi
6535   
6536 fi
6537
6538 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6539   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6540         cat >> confdefs.h <<EOF
6541 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6542 EOF
6543
6544   fi
6545
6546 else
6547         ol_cv_func_gethostbyname_r_nargs=0
6548 fi
6549  
6550 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6551         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6552 echo "configure:6553: checking number of arguments of gethostbyaddr_r" >&5
6553 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6554   echo $ac_n "(cached) $ac_c" 1>&6
6555 else
6556   cat > conftest.$ac_ext <<EOF
6557 #line 6558 "configure"
6558 #include "confdefs.h"
6559 #include <sys/types.h>
6560 #include <sys/socket.h>
6561 #include <netinet/in.h>
6562 #include <netdb.h>
6563 #define BUFSIZE (sizeof(struct hostent)+10)
6564 int main() {
6565 struct hostent hent; char buffer[BUFSIZE]; 
6566             struct in_addr add;
6567             size_t alen=sizeof(struct in_addr);
6568             int bufsize=BUFSIZE;int h_errno;
6569                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6570                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6571 ; return 0; }
6572 EOF
6573 if { (eval echo configure:6574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6574   rm -rf conftest*
6575   ol_cv_func_gethostbyaddr_r_nargs7=yes
6576 else
6577   echo "configure: failed program was:" >&5
6578   cat conftest.$ac_ext >&5
6579   rm -rf conftest*
6580   ol_cv_func_gethostbyaddr_r_nargs7=no
6581 fi
6582 rm -f conftest*
6583
6584         cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587 #include <sys/types.h>
6588 #include <sys/socket.h>
6589 #include <netinet/in.h>
6590 #include <netdb.h>
6591 #define BUFSIZE (sizeof(struct hostent)+10)
6592 int main() {
6593 struct hostent hent;
6594                 struct hostent *rhent; char buffer[BUFSIZE]; 
6595                 struct in_addr add;
6596                 size_t alen=sizeof(struct in_addr);
6597                 int bufsize=BUFSIZE;int h_errno;
6598                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6599                         alen, AF_INET, &hent, buffer, bufsize, 
6600                         &rhent, &h_errno);
6601 ; return 0; }
6602 EOF
6603 if { (eval echo configure:6604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6604   rm -rf conftest*
6605   ol_cv_func_gethostbyaddr_r_nargs8=yes
6606 else
6607   echo "configure: failed program was:" >&5
6608   cat conftest.$ac_ext >&5
6609   rm -rf conftest*
6610   ol_cv_func_gethostbyaddr_r_nargs8=no
6611 fi
6612 rm -f conftest*
6613
6614         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6615                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6616
6617                 ol_cv_func_gethostbyaddr_r_nargs=7
6618
6619         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6620                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6621
6622                 ol_cv_func_gethostbyaddr_r_nargs=8
6623
6624         else
6625                 ol_cv_func_gethostbyaddr_r_nargs=0
6626         fi
6627   
6628 fi
6629
6630 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6631   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6632     cat >> confdefs.h <<EOF
6633 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6634 EOF
6635
6636   fi
6637
6638 else
6639         ol_cv_func_gethostbyaddr_r_nargs=0
6640 fi
6641
6642 if test "$ac_cv_func_ctime_r" = yes \
6643         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6644         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6645         -a "$ac_cv_func_gethostbyname_r" = yes \
6646         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6647         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6648         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6649         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6650         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6651         ; then
6652  
6653         cat >> confdefs.h <<\EOF
6654 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6655 EOF
6656
6657 fi
6658
6659 ol_link_threads=no
6660
6661 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6662         -o $ol_with_threads = nt ; then
6663
6664         
6665         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6666 echo "configure:6667: checking for NT Threads" >&5
6667 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6668   echo $ac_n "(cached) $ac_c" 1>&6
6669 else
6670   
6671                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6672 echo "configure:6673: checking for _beginthread" >&5
6673 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6674   echo $ac_n "(cached) $ac_c" 1>&6
6675 else
6676   cat > conftest.$ac_ext <<EOF
6677 #line 6678 "configure"
6678 #include "confdefs.h"
6679 /* System header to define __stub macros and hopefully few prototypes,
6680     which can conflict with char _beginthread(); below.  */
6681 #include <assert.h>
6682 /* Override any gcc2 internal prototype to avoid an error.  */
6683 /* We use char because int might match the return type of a gcc2
6684     builtin and then its argument prototype would still apply.  */
6685 char _beginthread();
6686 char (*f)();
6687
6688 int main() {
6689
6690 /* The GNU C library defines this for functions which it implements
6691     to always fail with ENOSYS.  Some functions are actually named
6692     something starting with __ and the normal name is an alias.  */
6693 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6694 choke me
6695 #else
6696 f = _beginthread;
6697 #endif
6698
6699 ; return 0; }
6700 EOF
6701 if { (eval echo configure:6702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6702   rm -rf conftest*
6703   eval "ac_cv_func__beginthread=yes"
6704 else
6705   echo "configure: failed program was:" >&5
6706   cat conftest.$ac_ext >&5
6707   rm -rf conftest*
6708   eval "ac_cv_func__beginthread=no"
6709 fi
6710 rm -f conftest*
6711 fi
6712
6713 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6714   echo "$ac_t""yes" 1>&6
6715   ol_cv_nt_threads=yes
6716 else
6717   echo "$ac_t""no" 1>&6
6718 ol_cv_nt_threads=no
6719 fi
6720
6721         
6722 fi
6723
6724 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6725
6726         if test $ol_cv_nt_threads = yes ; then
6727                 cat >> confdefs.h <<\EOF
6728 #define HAVE_NT_THREADS 1
6729 EOF
6730
6731         fi
6732
6733
6734         if test "$ol_cv_nt_threads" = yes ; then
6735         ol_link_threads=nt
6736         ol_with_threads=found
6737         ol_with_yielding_select=yes
6738
6739                 cat >> confdefs.h <<\EOF
6740 #define HAVE_NT_SERVICE_MANAGER 1
6741 EOF
6742
6743                 cat >> confdefs.h <<\EOF
6744 #define HAVE_NT_EVENT_LOG 1
6745 EOF
6746
6747         fi
6748
6749         if test $ol_with_threads = nt ; then
6750                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6751         fi
6752 fi
6753
6754 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6755         -o $ol_with_threads = posix ; then
6756
6757         for ac_hdr in pthread.h
6758 do
6759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6761 echo "configure:6762: checking for $ac_hdr" >&5
6762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6763   echo $ac_n "(cached) $ac_c" 1>&6
6764 else
6765   cat > conftest.$ac_ext <<EOF
6766 #line 6767 "configure"
6767 #include "confdefs.h"
6768 #include <$ac_hdr>
6769 EOF
6770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6771 { (eval echo configure:6772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6773 if test -z "$ac_err"; then
6774   rm -rf conftest*
6775   eval "ac_cv_header_$ac_safe=yes"
6776 else
6777   echo "$ac_err" >&5
6778   echo "configure: failed program was:" >&5
6779   cat conftest.$ac_ext >&5
6780   rm -rf conftest*
6781   eval "ac_cv_header_$ac_safe=no"
6782 fi
6783 rm -f conftest*
6784 fi
6785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6786   echo "$ac_t""yes" 1>&6
6787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6788   cat >> confdefs.h <<EOF
6789 #define $ac_tr_hdr 1
6790 EOF
6791  
6792 else
6793   echo "$ac_t""no" 1>&6
6794 fi
6795 done
6796
6797
6798         if test $ac_cv_header_pthread_h = yes ; then
6799                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6800 echo "configure:6801: checking POSIX thread version" >&5
6801 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6802   echo $ac_n "(cached) $ac_c" 1>&6
6803 else
6804   
6805         cat > conftest.$ac_ext <<EOF
6806 #line 6807 "configure"
6807 #include "confdefs.h"
6808
6809 #               include <pthread.h>
6810                 /* this check could be improved */
6811 #               ifdef PTHREAD_ONCE_INIT
6812                         pthread_version_final;
6813 #               endif
6814         
6815 EOF
6816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6817   egrep "pthread_version_final" >/dev/null 2>&1; then
6818   rm -rf conftest*
6819   ol_pthread_final=yes
6820 else
6821   rm -rf conftest*
6822   ol_pthread_final=no
6823 fi
6824 rm -f conftest*
6825
6826
6827         cat > conftest.$ac_ext <<EOF
6828 #line 6829 "configure"
6829 #include "confdefs.h"
6830
6831 #               include <pthread.h>
6832                 /* this check could be improved */
6833 #               ifdef pthread_once_init
6834                         pthread_version_draft4;
6835 #               endif
6836         
6837 EOF
6838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6839   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6840   rm -rf conftest*
6841   ol_pthread_draft4=yes
6842 else
6843   rm -rf conftest*
6844   ol_pthread_draft4=no
6845 fi
6846 rm -f conftest*
6847
6848
6849         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6850                 ol_cv_pthread_version=final
6851         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6852                 ol_cv_pthread_version=draft4
6853         else
6854                 ol_cv_pthread_version=unknown
6855         fi
6856
6857 fi
6858
6859 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6860
6861
6862                 if test $ol_cv_pthread_version = final ; then
6863                         cat >> confdefs.h <<\EOF
6864 #define HAVE_PTHREADS_FINAL 1
6865 EOF
6866
6867                 elif test $ol_cv_pthread_version = draft4 ; then
6868                         cat >> confdefs.h <<\EOF
6869 #define HAVE_PTHREADS_D4 1
6870 EOF
6871
6872                 else
6873                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6874                 fi
6875
6876                 # consider threads found
6877                 ol_with_threads=found
6878
6879                 
6880         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6881 echo "configure:6882: checking for LinuxThreads pthread.h" >&5
6882 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6883   echo $ac_n "(cached) $ac_c" 1>&6
6884 else
6885   cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 #include <pthread.h>
6889 EOF
6890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6891   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6892   rm -rf conftest*
6893   ol_cv_header_linux_threads=yes
6894 else
6895   rm -rf conftest*
6896   ol_cv_header_linux_threads=no
6897 fi
6898 rm -f conftest*
6899
6900                 
6901 fi
6902
6903 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6904         if test $ol_cv_header_linux_threads = yes; then
6905                 cat >> confdefs.h <<\EOF
6906 #define HAVE_LINUX_THREADS 1
6907 EOF
6908
6909         fi
6910
6911                 
6912         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6913 echo "configure:6914: checking for GNU Pth pthread.h" >&5
6914 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6915   echo $ac_n "(cached) $ac_c" 1>&6
6916 else
6917   cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6920 #include <pthread.h>
6921 #ifdef _POSIX_THREAD_IS_GNU_PTH
6922         __gnu_pth__;
6923 #endif
6924
6925 EOF
6926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6927   egrep "__gnu_pth__" >/dev/null 2>&1; then
6928   rm -rf conftest*
6929   ol_cv_header_gnu_pth_pthread_h=yes
6930 else
6931   rm -rf conftest*
6932   ol_cv_header_gnu_pth_pthread_h=no
6933 fi
6934 rm -f conftest*
6935
6936                 
6937 fi
6938
6939 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6940
6941
6942                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6943                         for ac_hdr in sched.h
6944 do
6945 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6946 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6947 echo "configure:6948: checking for $ac_hdr" >&5
6948 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6949   echo $ac_n "(cached) $ac_c" 1>&6
6950 else
6951   cat > conftest.$ac_ext <<EOF
6952 #line 6953 "configure"
6953 #include "confdefs.h"
6954 #include <$ac_hdr>
6955 EOF
6956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6957 { (eval echo configure:6958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6959 if test -z "$ac_err"; then
6960   rm -rf conftest*
6961   eval "ac_cv_header_$ac_safe=yes"
6962 else
6963   echo "$ac_err" >&5
6964   echo "configure: failed program was:" >&5
6965   cat conftest.$ac_ext >&5
6966   rm -rf conftest*
6967   eval "ac_cv_header_$ac_safe=no"
6968 fi
6969 rm -f conftest*
6970 fi
6971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6972   echo "$ac_t""yes" 1>&6
6973     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6974   cat >> confdefs.h <<EOF
6975 #define $ac_tr_hdr 1
6976 EOF
6977  
6978 else
6979   echo "$ac_t""no" 1>&6
6980 fi
6981 done
6982
6983                 fi
6984
6985                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6986                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6987 echo "configure:6988: checking for pthread_create in default libraries" >&5
6988 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6989   echo $ac_n "(cached) $ac_c" 1>&6
6990 else
6991   
6992                 if test "$cross_compiling" = yes; then
6993   cat > conftest.$ac_ext <<EOF
6994 #line 6995 "configure"
6995 #include "confdefs.h"
6996 /* pthread test headers */
6997 #include <pthread.h>
6998 #ifndef NULL
6999 #define NULL (void*)0
7000 #endif
7001
7002 static void *task(p)
7003         void *p;
7004 {
7005         return (void *) (p == NULL);
7006 }
7007
7008 int main() {
7009
7010         /* pthread test function */
7011         pthread_t t;
7012         int status;
7013 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7014         /* This system (e.g. AIX) defaults detached; must override */
7015         pthread_attr_t attr;
7016
7017         status = pthread_attr_init(&attr);
7018         if( status ) exit( status );
7019
7020         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7021         if( status ) exit( status );
7022
7023 #define ATTR    &attr
7024 #else
7025 #if HAVE_PTHREADS_D4
7026 #define ATTR    pthread_attr_default
7027 #else
7028 #define ATTR    NULL
7029 #endif
7030 #endif
7031         /* make sure pthread_create() isn't just a stub */
7032         status = pthread_create(&t, ATTR, task, NULL);
7033         if( status ) exit( status );
7034
7035         /* make sure pthread_detach() isn't just a stub */
7036 #if HAVE_PTHREADS_D4
7037         status = pthread_detach( &t );
7038 #else
7039         status = pthread_detach( t );
7040 #endif
7041
7042 #ifdef HAVE_LINUX_THREADS
7043         pthread_kill_other_threads_np();
7044 #endif
7045
7046         exit( status );
7047
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   ol_cv_pthread_create=yes
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   ol_cv_pthread_create=no
7058 fi
7059 rm -f conftest*
7060 else
7061   cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064 /* pthread test headers */
7065 #include <pthread.h>
7066 #ifndef NULL
7067 #define NULL (void*)0
7068 #endif
7069
7070 static void *task(p)
7071         void *p;
7072 {
7073         return (void *) (p == NULL);
7074 }
7075
7076
7077 int main(argc, argv)
7078         int argc;
7079         char **argv;
7080 {
7081
7082         /* pthread test function */
7083         pthread_t t;
7084         int status;
7085 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7086         /* This system (e.g. AIX) defaults detached; must override */
7087         pthread_attr_t attr;
7088
7089         status = pthread_attr_init(&attr);
7090         if( status ) exit( status );
7091
7092         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7093         if( status ) exit( status );
7094
7095 #define ATTR    &attr
7096 #else
7097 #if HAVE_PTHREADS_D4
7098 #define ATTR    pthread_attr_default
7099 #else
7100 #define ATTR    NULL
7101 #endif
7102 #endif
7103         /* make sure pthread_create() isn't just a stub */
7104         status = pthread_create(&t, ATTR, task, NULL);
7105         if( status ) exit( status );
7106
7107         /* make sure pthread_detach() isn't just a stub */
7108 #if HAVE_PTHREADS_D4
7109         status = pthread_detach( &t );
7110 #else
7111         status = pthread_detach( t );
7112 #endif
7113
7114 #ifdef HAVE_LINUX_THREADS
7115         pthread_kill_other_threads_np();
7116 #endif
7117
7118         exit( status );
7119
7120 }
7121
7122 EOF
7123 if { (eval echo configure:7124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7124 then
7125   ol_cv_pthread_create=yes
7126 else
7127   echo "configure: failed program was:" >&5
7128   cat conftest.$ac_ext >&5
7129   rm -fr conftest*
7130   ol_cv_pthread_create=no
7131 fi
7132 rm -fr conftest*
7133 fi
7134
7135 fi
7136
7137 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7138
7139                 if test $ol_cv_pthread_create != no ; then
7140                         ol_link_threads=posix
7141                         ol_link_pthreads=""
7142                 fi
7143                 
7144                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7145 if test "$ol_link_threads" = no ; then
7146         # try -kthread
7147         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7148 echo "configure:7149: checking for pthread link with -kthread" >&5
7149 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7150   echo $ac_n "(cached) $ac_c" 1>&6
7151 else
7152   
7153                 # save the flags
7154                 ol_LIBS="$LIBS"
7155                 LIBS="-kthread $LIBS"
7156
7157                 if test "$cross_compiling" = yes; then
7158   cat > conftest.$ac_ext <<EOF
7159 #line 7160 "configure"
7160 #include "confdefs.h"
7161 /* pthread test headers */
7162 #include <pthread.h>
7163 #ifndef NULL
7164 #define NULL (void*)0
7165 #endif
7166
7167 static void *task(p)
7168         void *p;
7169 {
7170         return (void *) (p == NULL);
7171 }
7172
7173 int main() {
7174
7175         /* pthread test function */
7176         pthread_t t;
7177         int status;
7178 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7179         /* This system (e.g. AIX) defaults detached; must override */
7180         pthread_attr_t attr;
7181
7182         status = pthread_attr_init(&attr);
7183         if( status ) exit( status );
7184
7185         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7186         if( status ) exit( status );
7187
7188 #define ATTR    &attr
7189 #else
7190 #if HAVE_PTHREADS_D4
7191 #define ATTR    pthread_attr_default
7192 #else
7193 #define ATTR    NULL
7194 #endif
7195 #endif
7196         /* make sure pthread_create() isn't just a stub */
7197         status = pthread_create(&t, ATTR, task, NULL);
7198         if( status ) exit( status );
7199
7200         /* make sure pthread_detach() isn't just a stub */
7201 #if HAVE_PTHREADS_D4
7202         status = pthread_detach( &t );
7203 #else
7204         status = pthread_detach( t );
7205 #endif
7206
7207 #ifdef HAVE_LINUX_THREADS
7208         pthread_kill_other_threads_np();
7209 #endif
7210
7211         exit( status );
7212
7213 ; return 0; }
7214 EOF
7215 if { (eval echo configure:7216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7216   rm -rf conftest*
7217   ol_cv_pthread_kthread=yes
7218 else
7219   echo "configure: failed program was:" >&5
7220   cat conftest.$ac_ext >&5
7221   rm -rf conftest*
7222   ol_cv_pthread_kthread=no
7223 fi
7224 rm -f conftest*
7225 else
7226   cat > conftest.$ac_ext <<EOF
7227 #line 7228 "configure"
7228 #include "confdefs.h"
7229 /* pthread test headers */
7230 #include <pthread.h>
7231 #ifndef NULL
7232 #define NULL (void*)0
7233 #endif
7234
7235 static void *task(p)
7236         void *p;
7237 {
7238         return (void *) (p == NULL);
7239 }
7240
7241
7242 int main(argc, argv)
7243         int argc;
7244         char **argv;
7245 {
7246
7247         /* pthread test function */
7248         pthread_t t;
7249         int status;
7250 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7251         /* This system (e.g. AIX) defaults detached; must override */
7252         pthread_attr_t attr;
7253
7254         status = pthread_attr_init(&attr);
7255         if( status ) exit( status );
7256
7257         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7258         if( status ) exit( status );
7259
7260 #define ATTR    &attr
7261 #else
7262 #if HAVE_PTHREADS_D4
7263 #define ATTR    pthread_attr_default
7264 #else
7265 #define ATTR    NULL
7266 #endif
7267 #endif
7268         /* make sure pthread_create() isn't just a stub */
7269         status = pthread_create(&t, ATTR, task, NULL);
7270         if( status ) exit( status );
7271
7272         /* make sure pthread_detach() isn't just a stub */
7273 #if HAVE_PTHREADS_D4
7274         status = pthread_detach( &t );
7275 #else
7276         status = pthread_detach( t );
7277 #endif
7278
7279 #ifdef HAVE_LINUX_THREADS
7280         pthread_kill_other_threads_np();
7281 #endif
7282
7283         exit( status );
7284
7285 }
7286
7287 EOF
7288 if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7289 then
7290   ol_cv_pthread_kthread=yes
7291 else
7292   echo "configure: failed program was:" >&5
7293   cat conftest.$ac_ext >&5
7294   rm -fr conftest*
7295   ol_cv_pthread_kthread=no
7296 fi
7297 rm -fr conftest*
7298 fi
7299
7300
7301                 # restore the LIBS
7302                 LIBS="$ol_LIBS"
7303         
7304 fi
7305
7306 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7307
7308         if test $ol_cv_pthread_kthread = yes ; then
7309                 ol_link_pthreads="-kthread"
7310                 ol_link_threads=posix
7311         fi
7312 fi
7313
7314                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7315 if test "$ol_link_threads" = no ; then
7316         # try -pthread
7317         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7318 echo "configure:7319: checking for pthread link with -pthread" >&5
7319 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7320   echo $ac_n "(cached) $ac_c" 1>&6
7321 else
7322   
7323                 # save the flags
7324                 ol_LIBS="$LIBS"
7325                 LIBS="-pthread $LIBS"
7326
7327                 if test "$cross_compiling" = yes; then
7328   cat > conftest.$ac_ext <<EOF
7329 #line 7330 "configure"
7330 #include "confdefs.h"
7331 /* pthread test headers */
7332 #include <pthread.h>
7333 #ifndef NULL
7334 #define NULL (void*)0
7335 #endif
7336
7337 static void *task(p)
7338         void *p;
7339 {
7340         return (void *) (p == NULL);
7341 }
7342
7343 int main() {
7344
7345         /* pthread test function */
7346         pthread_t t;
7347         int status;
7348 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7349         /* This system (e.g. AIX) defaults detached; must override */
7350         pthread_attr_t attr;
7351
7352         status = pthread_attr_init(&attr);
7353         if( status ) exit( status );
7354
7355         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7356         if( status ) exit( status );
7357
7358 #define ATTR    &attr
7359 #else
7360 #if HAVE_PTHREADS_D4
7361 #define ATTR    pthread_attr_default
7362 #else
7363 #define ATTR    NULL
7364 #endif
7365 #endif
7366         /* make sure pthread_create() isn't just a stub */
7367         status = pthread_create(&t, ATTR, task, NULL);
7368         if( status ) exit( status );
7369
7370         /* make sure pthread_detach() isn't just a stub */
7371 #if HAVE_PTHREADS_D4
7372         status = pthread_detach( &t );
7373 #else
7374         status = pthread_detach( t );
7375 #endif
7376
7377 #ifdef HAVE_LINUX_THREADS
7378         pthread_kill_other_threads_np();
7379 #endif
7380
7381         exit( status );
7382
7383 ; return 0; }
7384 EOF
7385 if { (eval echo configure:7386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7386   rm -rf conftest*
7387   ol_cv_pthread_pthread=yes
7388 else
7389   echo "configure: failed program was:" >&5
7390   cat conftest.$ac_ext >&5
7391   rm -rf conftest*
7392   ol_cv_pthread_pthread=no
7393 fi
7394 rm -f conftest*
7395 else
7396   cat > conftest.$ac_ext <<EOF
7397 #line 7398 "configure"
7398 #include "confdefs.h"
7399 /* pthread test headers */
7400 #include <pthread.h>
7401 #ifndef NULL
7402 #define NULL (void*)0
7403 #endif
7404
7405 static void *task(p)
7406         void *p;
7407 {
7408         return (void *) (p == NULL);
7409 }
7410
7411
7412 int main(argc, argv)
7413         int argc;
7414         char **argv;
7415 {
7416
7417         /* pthread test function */
7418         pthread_t t;
7419         int status;
7420 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7421         /* This system (e.g. AIX) defaults detached; must override */
7422         pthread_attr_t attr;
7423
7424         status = pthread_attr_init(&attr);
7425         if( status ) exit( status );
7426
7427         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7428         if( status ) exit( status );
7429
7430 #define ATTR    &attr
7431 #else
7432 #if HAVE_PTHREADS_D4
7433 #define ATTR    pthread_attr_default
7434 #else
7435 #define ATTR    NULL
7436 #endif
7437 #endif
7438         /* make sure pthread_create() isn't just a stub */
7439         status = pthread_create(&t, ATTR, task, NULL);
7440         if( status ) exit( status );
7441
7442         /* make sure pthread_detach() isn't just a stub */
7443 #if HAVE_PTHREADS_D4
7444         status = pthread_detach( &t );
7445 #else
7446         status = pthread_detach( t );
7447 #endif
7448
7449 #ifdef HAVE_LINUX_THREADS
7450         pthread_kill_other_threads_np();
7451 #endif
7452
7453         exit( status );
7454
7455 }
7456
7457 EOF
7458 if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7459 then
7460   ol_cv_pthread_pthread=yes
7461 else
7462   echo "configure: failed program was:" >&5
7463   cat conftest.$ac_ext >&5
7464   rm -fr conftest*
7465   ol_cv_pthread_pthread=no
7466 fi
7467 rm -fr conftest*
7468 fi
7469
7470
7471                 # restore the LIBS
7472                 LIBS="$ol_LIBS"
7473         
7474 fi
7475
7476 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7477
7478         if test $ol_cv_pthread_pthread = yes ; then
7479                 ol_link_pthreads="-pthread"
7480                 ol_link_threads=posix
7481         fi
7482 fi
7483
7484                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7485 if test "$ol_link_threads" = no ; then
7486         # try -pthreads
7487         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7488 echo "configure:7489: checking for pthread link with -pthreads" >&5
7489 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7490   echo $ac_n "(cached) $ac_c" 1>&6
7491 else
7492   
7493                 # save the flags
7494                 ol_LIBS="$LIBS"
7495                 LIBS="-pthreads $LIBS"
7496
7497                 if test "$cross_compiling" = yes; then
7498   cat > conftest.$ac_ext <<EOF
7499 #line 7500 "configure"
7500 #include "confdefs.h"
7501 /* pthread test headers */
7502 #include <pthread.h>
7503 #ifndef NULL
7504 #define NULL (void*)0
7505 #endif
7506
7507 static void *task(p)
7508         void *p;
7509 {
7510         return (void *) (p == NULL);
7511 }
7512
7513 int main() {
7514
7515         /* pthread test function */
7516         pthread_t t;
7517         int status;
7518 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7519         /* This system (e.g. AIX) defaults detached; must override */
7520         pthread_attr_t attr;
7521
7522         status = pthread_attr_init(&attr);
7523         if( status ) exit( status );
7524
7525         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7526         if( status ) exit( status );
7527
7528 #define ATTR    &attr
7529 #else
7530 #if HAVE_PTHREADS_D4
7531 #define ATTR    pthread_attr_default
7532 #else
7533 #define ATTR    NULL
7534 #endif
7535 #endif
7536         /* make sure pthread_create() isn't just a stub */
7537         status = pthread_create(&t, ATTR, task, NULL);
7538         if( status ) exit( status );
7539
7540         /* make sure pthread_detach() isn't just a stub */
7541 #if HAVE_PTHREADS_D4
7542         status = pthread_detach( &t );
7543 #else
7544         status = pthread_detach( t );
7545 #endif
7546
7547 #ifdef HAVE_LINUX_THREADS
7548         pthread_kill_other_threads_np();
7549 #endif
7550
7551         exit( status );
7552
7553 ; return 0; }
7554 EOF
7555 if { (eval echo configure:7556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7556   rm -rf conftest*
7557   ol_cv_pthread_pthreads=yes
7558 else
7559   echo "configure: failed program was:" >&5
7560   cat conftest.$ac_ext >&5
7561   rm -rf conftest*
7562   ol_cv_pthread_pthreads=no
7563 fi
7564 rm -f conftest*
7565 else
7566   cat > conftest.$ac_ext <<EOF
7567 #line 7568 "configure"
7568 #include "confdefs.h"
7569 /* pthread test headers */
7570 #include <pthread.h>
7571 #ifndef NULL
7572 #define NULL (void*)0
7573 #endif
7574
7575 static void *task(p)
7576         void *p;
7577 {
7578         return (void *) (p == NULL);
7579 }
7580
7581
7582 int main(argc, argv)
7583         int argc;
7584         char **argv;
7585 {
7586
7587         /* pthread test function */
7588         pthread_t t;
7589         int status;
7590 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7591         /* This system (e.g. AIX) defaults detached; must override */
7592         pthread_attr_t attr;
7593
7594         status = pthread_attr_init(&attr);
7595         if( status ) exit( status );
7596
7597         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7598         if( status ) exit( status );
7599
7600 #define ATTR    &attr
7601 #else
7602 #if HAVE_PTHREADS_D4
7603 #define ATTR    pthread_attr_default
7604 #else
7605 #define ATTR    NULL
7606 #endif
7607 #endif
7608         /* make sure pthread_create() isn't just a stub */
7609         status = pthread_create(&t, ATTR, task, NULL);
7610         if( status ) exit( status );
7611
7612         /* make sure pthread_detach() isn't just a stub */
7613 #if HAVE_PTHREADS_D4
7614         status = pthread_detach( &t );
7615 #else
7616         status = pthread_detach( t );
7617 #endif
7618
7619 #ifdef HAVE_LINUX_THREADS
7620         pthread_kill_other_threads_np();
7621 #endif
7622
7623         exit( status );
7624
7625 }
7626
7627 EOF
7628 if { (eval echo configure:7629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7629 then
7630   ol_cv_pthread_pthreads=yes
7631 else
7632   echo "configure: failed program was:" >&5
7633   cat conftest.$ac_ext >&5
7634   rm -fr conftest*
7635   ol_cv_pthread_pthreads=no
7636 fi
7637 rm -fr conftest*
7638 fi
7639
7640
7641                 # restore the LIBS
7642                 LIBS="$ol_LIBS"
7643         
7644 fi
7645
7646 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7647
7648         if test $ol_cv_pthread_pthreads = yes ; then
7649                 ol_link_pthreads="-pthreads"
7650                 ol_link_threads=posix
7651         fi
7652 fi
7653
7654                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7655 if test "$ol_link_threads" = no ; then
7656         # try -mthreads
7657         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7658 echo "configure:7659: checking for pthread link with -mthreads" >&5
7659 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7660   echo $ac_n "(cached) $ac_c" 1>&6
7661 else
7662   
7663                 # save the flags
7664                 ol_LIBS="$LIBS"
7665                 LIBS="-mthreads $LIBS"
7666
7667                 if test "$cross_compiling" = yes; then
7668   cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671 /* pthread test headers */
7672 #include <pthread.h>
7673 #ifndef NULL
7674 #define NULL (void*)0
7675 #endif
7676
7677 static void *task(p)
7678         void *p;
7679 {
7680         return (void *) (p == NULL);
7681 }
7682
7683 int main() {
7684
7685         /* pthread test function */
7686         pthread_t t;
7687         int status;
7688 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7689         /* This system (e.g. AIX) defaults detached; must override */
7690         pthread_attr_t attr;
7691
7692         status = pthread_attr_init(&attr);
7693         if( status ) exit( status );
7694
7695         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7696         if( status ) exit( status );
7697
7698 #define ATTR    &attr
7699 #else
7700 #if HAVE_PTHREADS_D4
7701 #define ATTR    pthread_attr_default
7702 #else
7703 #define ATTR    NULL
7704 #endif
7705 #endif
7706         /* make sure pthread_create() isn't just a stub */
7707         status = pthread_create(&t, ATTR, task, NULL);
7708         if( status ) exit( status );
7709
7710         /* make sure pthread_detach() isn't just a stub */
7711 #if HAVE_PTHREADS_D4
7712         status = pthread_detach( &t );
7713 #else
7714         status = pthread_detach( t );
7715 #endif
7716
7717 #ifdef HAVE_LINUX_THREADS
7718         pthread_kill_other_threads_np();
7719 #endif
7720
7721         exit( status );
7722
7723 ; return 0; }
7724 EOF
7725 if { (eval echo configure:7726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7726   rm -rf conftest*
7727   ol_cv_pthread_mthreads=yes
7728 else
7729   echo "configure: failed program was:" >&5
7730   cat conftest.$ac_ext >&5
7731   rm -rf conftest*
7732   ol_cv_pthread_mthreads=no
7733 fi
7734 rm -f conftest*
7735 else
7736   cat > conftest.$ac_ext <<EOF
7737 #line 7738 "configure"
7738 #include "confdefs.h"
7739 /* pthread test headers */
7740 #include <pthread.h>
7741 #ifndef NULL
7742 #define NULL (void*)0
7743 #endif
7744
7745 static void *task(p)
7746         void *p;
7747 {
7748         return (void *) (p == NULL);
7749 }
7750
7751
7752 int main(argc, argv)
7753         int argc;
7754         char **argv;
7755 {
7756
7757         /* pthread test function */
7758         pthread_t t;
7759         int status;
7760 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7761         /* This system (e.g. AIX) defaults detached; must override */
7762         pthread_attr_t attr;
7763
7764         status = pthread_attr_init(&attr);
7765         if( status ) exit( status );
7766
7767         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7768         if( status ) exit( status );
7769
7770 #define ATTR    &attr
7771 #else
7772 #if HAVE_PTHREADS_D4
7773 #define ATTR    pthread_attr_default
7774 #else
7775 #define ATTR    NULL
7776 #endif
7777 #endif
7778         /* make sure pthread_create() isn't just a stub */
7779         status = pthread_create(&t, ATTR, task, NULL);
7780         if( status ) exit( status );
7781
7782         /* make sure pthread_detach() isn't just a stub */
7783 #if HAVE_PTHREADS_D4
7784         status = pthread_detach( &t );
7785 #else
7786         status = pthread_detach( t );
7787 #endif
7788
7789 #ifdef HAVE_LINUX_THREADS
7790         pthread_kill_other_threads_np();
7791 #endif
7792
7793         exit( status );
7794
7795 }
7796
7797 EOF
7798 if { (eval echo configure:7799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7799 then
7800   ol_cv_pthread_mthreads=yes
7801 else
7802   echo "configure: failed program was:" >&5
7803   cat conftest.$ac_ext >&5
7804   rm -fr conftest*
7805   ol_cv_pthread_mthreads=no
7806 fi
7807 rm -fr conftest*
7808 fi
7809
7810
7811                 # restore the LIBS
7812                 LIBS="$ol_LIBS"
7813         
7814 fi
7815
7816 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7817
7818         if test $ol_cv_pthread_mthreads = yes ; then
7819                 ol_link_pthreads="-mthreads"
7820                 ol_link_threads=posix
7821         fi
7822 fi
7823
7824                 # Pthread try link: -thread (ol_cv_pthread_thread)
7825 if test "$ol_link_threads" = no ; then
7826         # try -thread
7827         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7828 echo "configure:7829: checking for pthread link with -thread" >&5
7829 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7830   echo $ac_n "(cached) $ac_c" 1>&6
7831 else
7832   
7833                 # save the flags
7834                 ol_LIBS="$LIBS"
7835                 LIBS="-thread $LIBS"
7836
7837                 if test "$cross_compiling" = yes; then
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 /* pthread test headers */
7842 #include <pthread.h>
7843 #ifndef NULL
7844 #define NULL (void*)0
7845 #endif
7846
7847 static void *task(p)
7848         void *p;
7849 {
7850         return (void *) (p == NULL);
7851 }
7852
7853 int main() {
7854
7855         /* pthread test function */
7856         pthread_t t;
7857         int status;
7858 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7859         /* This system (e.g. AIX) defaults detached; must override */
7860         pthread_attr_t attr;
7861
7862         status = pthread_attr_init(&attr);
7863         if( status ) exit( status );
7864
7865         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7866         if( status ) exit( status );
7867
7868 #define ATTR    &attr
7869 #else
7870 #if HAVE_PTHREADS_D4
7871 #define ATTR    pthread_attr_default
7872 #else
7873 #define ATTR    NULL
7874 #endif
7875 #endif
7876         /* make sure pthread_create() isn't just a stub */
7877         status = pthread_create(&t, ATTR, task, NULL);
7878         if( status ) exit( status );
7879
7880         /* make sure pthread_detach() isn't just a stub */
7881 #if HAVE_PTHREADS_D4
7882         status = pthread_detach( &t );
7883 #else
7884         status = pthread_detach( t );
7885 #endif
7886
7887 #ifdef HAVE_LINUX_THREADS
7888         pthread_kill_other_threads_np();
7889 #endif
7890
7891         exit( status );
7892
7893 ; return 0; }
7894 EOF
7895 if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7896   rm -rf conftest*
7897   ol_cv_pthread_thread=yes
7898 else
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -rf conftest*
7902   ol_cv_pthread_thread=no
7903 fi
7904 rm -f conftest*
7905 else
7906   cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909 /* pthread test headers */
7910 #include <pthread.h>
7911 #ifndef NULL
7912 #define NULL (void*)0
7913 #endif
7914
7915 static void *task(p)
7916         void *p;
7917 {
7918         return (void *) (p == NULL);
7919 }
7920
7921
7922 int main(argc, argv)
7923         int argc;
7924         char **argv;
7925 {
7926
7927         /* pthread test function */
7928         pthread_t t;
7929         int status;
7930 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7931         /* This system (e.g. AIX) defaults detached; must override */
7932         pthread_attr_t attr;
7933
7934         status = pthread_attr_init(&attr);
7935         if( status ) exit( status );
7936
7937         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7938         if( status ) exit( status );
7939
7940 #define ATTR    &attr
7941 #else
7942 #if HAVE_PTHREADS_D4
7943 #define ATTR    pthread_attr_default
7944 #else
7945 #define ATTR    NULL
7946 #endif
7947 #endif
7948         /* make sure pthread_create() isn't just a stub */
7949         status = pthread_create(&t, ATTR, task, NULL);
7950         if( status ) exit( status );
7951
7952         /* make sure pthread_detach() isn't just a stub */
7953 #if HAVE_PTHREADS_D4
7954         status = pthread_detach( &t );
7955 #else
7956         status = pthread_detach( t );
7957 #endif
7958
7959 #ifdef HAVE_LINUX_THREADS
7960         pthread_kill_other_threads_np();
7961 #endif
7962
7963         exit( status );
7964
7965 }
7966
7967 EOF
7968 if { (eval echo configure:7969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7969 then
7970   ol_cv_pthread_thread=yes
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -fr conftest*
7975   ol_cv_pthread_thread=no
7976 fi
7977 rm -fr conftest*
7978 fi
7979
7980
7981                 # restore the LIBS
7982                 LIBS="$ol_LIBS"
7983         
7984 fi
7985
7986 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7987
7988         if test $ol_cv_pthread_thread = yes ; then
7989                 ol_link_pthreads="-thread"
7990                 ol_link_threads=posix
7991         fi
7992 fi
7993
7994
7995                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7996 if test "$ol_link_threads" = no ; then
7997         # try -lpthread -lmach -lexc -lc_r
7998         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7999 echo "configure:8000: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8000 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8001   echo $ac_n "(cached) $ac_c" 1>&6
8002 else
8003   
8004                 # save the flags
8005                 ol_LIBS="$LIBS"
8006                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8007
8008                 if test "$cross_compiling" = yes; then
8009   cat > conftest.$ac_ext <<EOF
8010 #line 8011 "configure"
8011 #include "confdefs.h"
8012 /* pthread test headers */
8013 #include <pthread.h>
8014 #ifndef NULL
8015 #define NULL (void*)0
8016 #endif
8017
8018 static void *task(p)
8019         void *p;
8020 {
8021         return (void *) (p == NULL);
8022 }
8023
8024 int main() {
8025
8026         /* pthread test function */
8027         pthread_t t;
8028         int status;
8029 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8030         /* This system (e.g. AIX) defaults detached; must override */
8031         pthread_attr_t attr;
8032
8033         status = pthread_attr_init(&attr);
8034         if( status ) exit( status );
8035
8036         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8037         if( status ) exit( status );
8038
8039 #define ATTR    &attr
8040 #else
8041 #if HAVE_PTHREADS_D4
8042 #define ATTR    pthread_attr_default
8043 #else
8044 #define ATTR    NULL
8045 #endif
8046 #endif
8047         /* make sure pthread_create() isn't just a stub */
8048         status = pthread_create(&t, ATTR, task, NULL);
8049         if( status ) exit( status );
8050
8051         /* make sure pthread_detach() isn't just a stub */
8052 #if HAVE_PTHREADS_D4
8053         status = pthread_detach( &t );
8054 #else
8055         status = pthread_detach( t );
8056 #endif
8057
8058 #ifdef HAVE_LINUX_THREADS
8059         pthread_kill_other_threads_np();
8060 #endif
8061
8062         exit( status );
8063
8064 ; return 0; }
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8067   rm -rf conftest*
8068   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -rf conftest*
8073   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8074 fi
8075 rm -f conftest*
8076 else
8077   cat > conftest.$ac_ext <<EOF
8078 #line 8079 "configure"
8079 #include "confdefs.h"
8080 /* pthread test headers */
8081 #include <pthread.h>
8082 #ifndef NULL
8083 #define NULL (void*)0
8084 #endif
8085
8086 static void *task(p)
8087         void *p;
8088 {
8089         return (void *) (p == NULL);
8090 }
8091
8092
8093 int main(argc, argv)
8094         int argc;
8095         char **argv;
8096 {
8097
8098         /* pthread test function */
8099         pthread_t t;
8100         int status;
8101 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8102         /* This system (e.g. AIX) defaults detached; must override */
8103         pthread_attr_t attr;
8104
8105         status = pthread_attr_init(&attr);
8106         if( status ) exit( status );
8107
8108         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8109         if( status ) exit( status );
8110
8111 #define ATTR    &attr
8112 #else
8113 #if HAVE_PTHREADS_D4
8114 #define ATTR    pthread_attr_default
8115 #else
8116 #define ATTR    NULL
8117 #endif
8118 #endif
8119         /* make sure pthread_create() isn't just a stub */
8120         status = pthread_create(&t, ATTR, task, NULL);
8121         if( status ) exit( status );
8122
8123         /* make sure pthread_detach() isn't just a stub */
8124 #if HAVE_PTHREADS_D4
8125         status = pthread_detach( &t );
8126 #else
8127         status = pthread_detach( t );
8128 #endif
8129
8130 #ifdef HAVE_LINUX_THREADS
8131         pthread_kill_other_threads_np();
8132 #endif
8133
8134         exit( status );
8135
8136 }
8137
8138 EOF
8139 if { (eval echo configure:8140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8140 then
8141   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8142 else
8143   echo "configure: failed program was:" >&5
8144   cat conftest.$ac_ext >&5
8145   rm -fr conftest*
8146   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8147 fi
8148 rm -fr conftest*
8149 fi
8150
8151
8152                 # restore the LIBS
8153                 LIBS="$ol_LIBS"
8154         
8155 fi
8156
8157 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8158
8159         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8160                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8161                 ol_link_threads=posix
8162         fi
8163 fi
8164
8165                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8166 if test "$ol_link_threads" = no ; then
8167         # try -lpthread -lmach -lexc
8168         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8169 echo "configure:8170: checking for pthread link with -lpthread -lmach -lexc" >&5
8170 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8171   echo $ac_n "(cached) $ac_c" 1>&6
8172 else
8173   
8174                 # save the flags
8175                 ol_LIBS="$LIBS"
8176                 LIBS="-lpthread -lmach -lexc $LIBS"
8177
8178                 if test "$cross_compiling" = yes; then
8179   cat > conftest.$ac_ext <<EOF
8180 #line 8181 "configure"
8181 #include "confdefs.h"
8182 /* pthread test headers */
8183 #include <pthread.h>
8184 #ifndef NULL
8185 #define NULL (void*)0
8186 #endif
8187
8188 static void *task(p)
8189         void *p;
8190 {
8191         return (void *) (p == NULL);
8192 }
8193
8194 int main() {
8195
8196         /* pthread test function */
8197         pthread_t t;
8198         int status;
8199 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8200         /* This system (e.g. AIX) defaults detached; must override */
8201         pthread_attr_t attr;
8202
8203         status = pthread_attr_init(&attr);
8204         if( status ) exit( status );
8205
8206         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8207         if( status ) exit( status );
8208
8209 #define ATTR    &attr
8210 #else
8211 #if HAVE_PTHREADS_D4
8212 #define ATTR    pthread_attr_default
8213 #else
8214 #define ATTR    NULL
8215 #endif
8216 #endif
8217         /* make sure pthread_create() isn't just a stub */
8218         status = pthread_create(&t, ATTR, task, NULL);
8219         if( status ) exit( status );
8220
8221         /* make sure pthread_detach() isn't just a stub */
8222 #if HAVE_PTHREADS_D4
8223         status = pthread_detach( &t );
8224 #else
8225         status = pthread_detach( t );
8226 #endif
8227
8228 #ifdef HAVE_LINUX_THREADS
8229         pthread_kill_other_threads_np();
8230 #endif
8231
8232         exit( status );
8233
8234 ; return 0; }
8235 EOF
8236 if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8237   rm -rf conftest*
8238   ol_cv_pthread_lpthread_lmach_lexc=yes
8239 else
8240   echo "configure: failed program was:" >&5
8241   cat conftest.$ac_ext >&5
8242   rm -rf conftest*
8243   ol_cv_pthread_lpthread_lmach_lexc=no
8244 fi
8245 rm -f conftest*
8246 else
8247   cat > conftest.$ac_ext <<EOF
8248 #line 8249 "configure"
8249 #include "confdefs.h"
8250 /* pthread test headers */
8251 #include <pthread.h>
8252 #ifndef NULL
8253 #define NULL (void*)0
8254 #endif
8255
8256 static void *task(p)
8257         void *p;
8258 {
8259         return (void *) (p == NULL);
8260 }
8261
8262
8263 int main(argc, argv)
8264         int argc;
8265         char **argv;
8266 {
8267
8268         /* pthread test function */
8269         pthread_t t;
8270         int status;
8271 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8272         /* This system (e.g. AIX) defaults detached; must override */
8273         pthread_attr_t attr;
8274
8275         status = pthread_attr_init(&attr);
8276         if( status ) exit( status );
8277
8278         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8279         if( status ) exit( status );
8280
8281 #define ATTR    &attr
8282 #else
8283 #if HAVE_PTHREADS_D4
8284 #define ATTR    pthread_attr_default
8285 #else
8286 #define ATTR    NULL
8287 #endif
8288 #endif
8289         /* make sure pthread_create() isn't just a stub */
8290         status = pthread_create(&t, ATTR, task, NULL);
8291         if( status ) exit( status );
8292
8293         /* make sure pthread_detach() isn't just a stub */
8294 #if HAVE_PTHREADS_D4
8295         status = pthread_detach( &t );
8296 #else
8297         status = pthread_detach( t );
8298 #endif
8299
8300 #ifdef HAVE_LINUX_THREADS
8301         pthread_kill_other_threads_np();
8302 #endif
8303
8304         exit( status );
8305
8306 }
8307
8308 EOF
8309 if { (eval echo configure:8310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8310 then
8311   ol_cv_pthread_lpthread_lmach_lexc=yes
8312 else
8313   echo "configure: failed program was:" >&5
8314   cat conftest.$ac_ext >&5
8315   rm -fr conftest*
8316   ol_cv_pthread_lpthread_lmach_lexc=no
8317 fi
8318 rm -fr conftest*
8319 fi
8320
8321
8322                 # restore the LIBS
8323                 LIBS="$ol_LIBS"
8324         
8325 fi
8326
8327 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8328
8329         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8330                 ol_link_pthreads="-lpthread -lmach -lexc"
8331                 ol_link_threads=posix
8332         fi
8333 fi
8334
8335
8336                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8337 if test "$ol_link_threads" = no ; then
8338         # try -lpthread -Wl,-woff,85
8339         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8340 echo "configure:8341: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8341 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8342   echo $ac_n "(cached) $ac_c" 1>&6
8343 else
8344   
8345                 # save the flags
8346                 ol_LIBS="$LIBS"
8347                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8348
8349                 if test "$cross_compiling" = yes; then
8350   cat > conftest.$ac_ext <<EOF
8351 #line 8352 "configure"
8352 #include "confdefs.h"
8353 /* pthread test headers */
8354 #include <pthread.h>
8355 #ifndef NULL
8356 #define NULL (void*)0
8357 #endif
8358
8359 static void *task(p)
8360         void *p;
8361 {
8362         return (void *) (p == NULL);
8363 }
8364
8365 int main() {
8366
8367         /* pthread test function */
8368         pthread_t t;
8369         int status;
8370 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8371         /* This system (e.g. AIX) defaults detached; must override */
8372         pthread_attr_t attr;
8373
8374         status = pthread_attr_init(&attr);
8375         if( status ) exit( status );
8376
8377         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8378         if( status ) exit( status );
8379
8380 #define ATTR    &attr
8381 #else
8382 #if HAVE_PTHREADS_D4
8383 #define ATTR    pthread_attr_default
8384 #else
8385 #define ATTR    NULL
8386 #endif
8387 #endif
8388         /* make sure pthread_create() isn't just a stub */
8389         status = pthread_create(&t, ATTR, task, NULL);
8390         if( status ) exit( status );
8391
8392         /* make sure pthread_detach() isn't just a stub */
8393 #if HAVE_PTHREADS_D4
8394         status = pthread_detach( &t );
8395 #else
8396         status = pthread_detach( t );
8397 #endif
8398
8399 #ifdef HAVE_LINUX_THREADS
8400         pthread_kill_other_threads_np();
8401 #endif
8402
8403         exit( status );
8404
8405 ; return 0; }
8406 EOF
8407 if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8408   rm -rf conftest*
8409   ol_cv_pthread_lib_lpthread_woff=yes
8410 else
8411   echo "configure: failed program was:" >&5
8412   cat conftest.$ac_ext >&5
8413   rm -rf conftest*
8414   ol_cv_pthread_lib_lpthread_woff=no
8415 fi
8416 rm -f conftest*
8417 else
8418   cat > conftest.$ac_ext <<EOF
8419 #line 8420 "configure"
8420 #include "confdefs.h"
8421 /* pthread test headers */
8422 #include <pthread.h>
8423 #ifndef NULL
8424 #define NULL (void*)0
8425 #endif
8426
8427 static void *task(p)
8428         void *p;
8429 {
8430         return (void *) (p == NULL);
8431 }
8432
8433
8434 int main(argc, argv)
8435         int argc;
8436         char **argv;
8437 {
8438
8439         /* pthread test function */
8440         pthread_t t;
8441         int status;
8442 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8443         /* This system (e.g. AIX) defaults detached; must override */
8444         pthread_attr_t attr;
8445
8446         status = pthread_attr_init(&attr);
8447         if( status ) exit( status );
8448
8449         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8450         if( status ) exit( status );
8451
8452 #define ATTR    &attr
8453 #else
8454 #if HAVE_PTHREADS_D4
8455 #define ATTR    pthread_attr_default
8456 #else
8457 #define ATTR    NULL
8458 #endif
8459 #endif
8460         /* make sure pthread_create() isn't just a stub */
8461         status = pthread_create(&t, ATTR, task, NULL);
8462         if( status ) exit( status );
8463
8464         /* make sure pthread_detach() isn't just a stub */
8465 #if HAVE_PTHREADS_D4
8466         status = pthread_detach( &t );
8467 #else
8468         status = pthread_detach( t );
8469 #endif
8470
8471 #ifdef HAVE_LINUX_THREADS
8472         pthread_kill_other_threads_np();
8473 #endif
8474
8475         exit( status );
8476
8477 }
8478
8479 EOF
8480 if { (eval echo configure:8481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8481 then
8482   ol_cv_pthread_lib_lpthread_woff=yes
8483 else
8484   echo "configure: failed program was:" >&5
8485   cat conftest.$ac_ext >&5
8486   rm -fr conftest*
8487   ol_cv_pthread_lib_lpthread_woff=no
8488 fi
8489 rm -fr conftest*
8490 fi
8491
8492
8493                 # restore the LIBS
8494                 LIBS="$ol_LIBS"
8495         
8496 fi
8497
8498 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8499
8500         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8501                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8502                 ol_link_threads=posix
8503         fi
8504 fi
8505
8506
8507                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8508 if test "$ol_link_threads" = no ; then
8509         # try -lpthread
8510         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8511 echo "configure:8512: checking for pthread link with -lpthread" >&5
8512 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8513   echo $ac_n "(cached) $ac_c" 1>&6
8514 else
8515   
8516                 # save the flags
8517                 ol_LIBS="$LIBS"
8518                 LIBS="-lpthread $LIBS"
8519
8520                 if test "$cross_compiling" = yes; then
8521   cat > conftest.$ac_ext <<EOF
8522 #line 8523 "configure"
8523 #include "confdefs.h"
8524 /* pthread test headers */
8525 #include <pthread.h>
8526 #ifndef NULL
8527 #define NULL (void*)0
8528 #endif
8529
8530 static void *task(p)
8531         void *p;
8532 {
8533         return (void *) (p == NULL);
8534 }
8535
8536 int main() {
8537
8538         /* pthread test function */
8539         pthread_t t;
8540         int status;
8541 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8542         /* This system (e.g. AIX) defaults detached; must override */
8543         pthread_attr_t attr;
8544
8545         status = pthread_attr_init(&attr);
8546         if( status ) exit( status );
8547
8548         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8549         if( status ) exit( status );
8550
8551 #define ATTR    &attr
8552 #else
8553 #if HAVE_PTHREADS_D4
8554 #define ATTR    pthread_attr_default
8555 #else
8556 #define ATTR    NULL
8557 #endif
8558 #endif
8559         /* make sure pthread_create() isn't just a stub */
8560         status = pthread_create(&t, ATTR, task, NULL);
8561         if( status ) exit( status );
8562
8563         /* make sure pthread_detach() isn't just a stub */
8564 #if HAVE_PTHREADS_D4
8565         status = pthread_detach( &t );
8566 #else
8567         status = pthread_detach( t );
8568 #endif
8569
8570 #ifdef HAVE_LINUX_THREADS
8571         pthread_kill_other_threads_np();
8572 #endif
8573
8574         exit( status );
8575
8576 ; return 0; }
8577 EOF
8578 if { (eval echo configure:8579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8579   rm -rf conftest*
8580   ol_cv_pthread_lpthread=yes
8581 else
8582   echo "configure: failed program was:" >&5
8583   cat conftest.$ac_ext >&5
8584   rm -rf conftest*
8585   ol_cv_pthread_lpthread=no
8586 fi
8587 rm -f conftest*
8588 else
8589   cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 /* pthread test headers */
8593 #include <pthread.h>
8594 #ifndef NULL
8595 #define NULL (void*)0
8596 #endif
8597
8598 static void *task(p)
8599         void *p;
8600 {
8601         return (void *) (p == NULL);
8602 }
8603
8604
8605 int main(argc, argv)
8606         int argc;
8607         char **argv;
8608 {
8609
8610         /* pthread test function */
8611         pthread_t t;
8612         int status;
8613 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8614         /* This system (e.g. AIX) defaults detached; must override */
8615         pthread_attr_t attr;
8616
8617         status = pthread_attr_init(&attr);
8618         if( status ) exit( status );
8619
8620         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8621         if( status ) exit( status );
8622
8623 #define ATTR    &attr
8624 #else
8625 #if HAVE_PTHREADS_D4
8626 #define ATTR    pthread_attr_default
8627 #else
8628 #define ATTR    NULL
8629 #endif
8630 #endif
8631         /* make sure pthread_create() isn't just a stub */
8632         status = pthread_create(&t, ATTR, task, NULL);
8633         if( status ) exit( status );
8634
8635         /* make sure pthread_detach() isn't just a stub */
8636 #if HAVE_PTHREADS_D4
8637         status = pthread_detach( &t );
8638 #else
8639         status = pthread_detach( t );
8640 #endif
8641
8642 #ifdef HAVE_LINUX_THREADS
8643         pthread_kill_other_threads_np();
8644 #endif
8645
8646         exit( status );
8647
8648 }
8649
8650 EOF
8651 if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8652 then
8653   ol_cv_pthread_lpthread=yes
8654 else
8655   echo "configure: failed program was:" >&5
8656   cat conftest.$ac_ext >&5
8657   rm -fr conftest*
8658   ol_cv_pthread_lpthread=no
8659 fi
8660 rm -fr conftest*
8661 fi
8662
8663
8664                 # restore the LIBS
8665                 LIBS="$ol_LIBS"
8666         
8667 fi
8668
8669 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8670
8671         if test $ol_cv_pthread_lpthread = yes ; then
8672                 ol_link_pthreads="-lpthread"
8673                 ol_link_threads=posix
8674         fi
8675 fi
8676
8677                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8678 if test "$ol_link_threads" = no ; then
8679         # try -lc_r
8680         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8681 echo "configure:8682: checking for pthread link with -lc_r" >&5
8682 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8683   echo $ac_n "(cached) $ac_c" 1>&6
8684 else
8685   
8686                 # save the flags
8687                 ol_LIBS="$LIBS"
8688                 LIBS="-lc_r $LIBS"
8689
8690                 if test "$cross_compiling" = yes; then
8691   cat > conftest.$ac_ext <<EOF
8692 #line 8693 "configure"
8693 #include "confdefs.h"
8694 /* pthread test headers */
8695 #include <pthread.h>
8696 #ifndef NULL
8697 #define NULL (void*)0
8698 #endif
8699
8700 static void *task(p)
8701         void *p;
8702 {
8703         return (void *) (p == NULL);
8704 }
8705
8706 int main() {
8707
8708         /* pthread test function */
8709         pthread_t t;
8710         int status;
8711 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8712         /* This system (e.g. AIX) defaults detached; must override */
8713         pthread_attr_t attr;
8714
8715         status = pthread_attr_init(&attr);
8716         if( status ) exit( status );
8717
8718         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8719         if( status ) exit( status );
8720
8721 #define ATTR    &attr
8722 #else
8723 #if HAVE_PTHREADS_D4
8724 #define ATTR    pthread_attr_default
8725 #else
8726 #define ATTR    NULL
8727 #endif
8728 #endif
8729         /* make sure pthread_create() isn't just a stub */
8730         status = pthread_create(&t, ATTR, task, NULL);
8731         if( status ) exit( status );
8732
8733         /* make sure pthread_detach() isn't just a stub */
8734 #if HAVE_PTHREADS_D4
8735         status = pthread_detach( &t );
8736 #else
8737         status = pthread_detach( t );
8738 #endif
8739
8740 #ifdef HAVE_LINUX_THREADS
8741         pthread_kill_other_threads_np();
8742 #endif
8743
8744         exit( status );
8745
8746 ; return 0; }
8747 EOF
8748 if { (eval echo configure:8749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8749   rm -rf conftest*
8750   ol_cv_pthread_lc_r=yes
8751 else
8752   echo "configure: failed program was:" >&5
8753   cat conftest.$ac_ext >&5
8754   rm -rf conftest*
8755   ol_cv_pthread_lc_r=no
8756 fi
8757 rm -f conftest*
8758 else
8759   cat > conftest.$ac_ext <<EOF
8760 #line 8761 "configure"
8761 #include "confdefs.h"
8762 /* pthread test headers */
8763 #include <pthread.h>
8764 #ifndef NULL
8765 #define NULL (void*)0
8766 #endif
8767
8768 static void *task(p)
8769         void *p;
8770 {
8771         return (void *) (p == NULL);
8772 }
8773
8774
8775 int main(argc, argv)
8776         int argc;
8777         char **argv;
8778 {
8779
8780         /* pthread test function */
8781         pthread_t t;
8782         int status;
8783 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8784         /* This system (e.g. AIX) defaults detached; must override */
8785         pthread_attr_t attr;
8786
8787         status = pthread_attr_init(&attr);
8788         if( status ) exit( status );
8789
8790         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8791         if( status ) exit( status );
8792
8793 #define ATTR    &attr
8794 #else
8795 #if HAVE_PTHREADS_D4
8796 #define ATTR    pthread_attr_default
8797 #else
8798 #define ATTR    NULL
8799 #endif
8800 #endif
8801         /* make sure pthread_create() isn't just a stub */
8802         status = pthread_create(&t, ATTR, task, NULL);
8803         if( status ) exit( status );
8804
8805         /* make sure pthread_detach() isn't just a stub */
8806 #if HAVE_PTHREADS_D4
8807         status = pthread_detach( &t );
8808 #else
8809         status = pthread_detach( t );
8810 #endif
8811
8812 #ifdef HAVE_LINUX_THREADS
8813         pthread_kill_other_threads_np();
8814 #endif
8815
8816         exit( status );
8817
8818 }
8819
8820 EOF
8821 if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8822 then
8823   ol_cv_pthread_lc_r=yes
8824 else
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -fr conftest*
8828   ol_cv_pthread_lc_r=no
8829 fi
8830 rm -fr conftest*
8831 fi
8832
8833
8834                 # restore the LIBS
8835                 LIBS="$ol_LIBS"
8836         
8837 fi
8838
8839 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8840
8841         if test $ol_cv_pthread_lc_r = yes ; then
8842                 ol_link_pthreads="-lc_r"
8843                 ol_link_threads=posix
8844         fi
8845 fi
8846
8847
8848                 # Pthread try link: -threads (ol_cv_pthread_threads)
8849 if test "$ol_link_threads" = no ; then
8850         # try -threads
8851         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8852 echo "configure:8853: checking for pthread link with -threads" >&5
8853 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8854   echo $ac_n "(cached) $ac_c" 1>&6
8855 else
8856   
8857                 # save the flags
8858                 ol_LIBS="$LIBS"
8859                 LIBS="-threads $LIBS"
8860
8861                 if test "$cross_compiling" = yes; then
8862   cat > conftest.$ac_ext <<EOF
8863 #line 8864 "configure"
8864 #include "confdefs.h"
8865 /* pthread test headers */
8866 #include <pthread.h>
8867 #ifndef NULL
8868 #define NULL (void*)0
8869 #endif
8870
8871 static void *task(p)
8872         void *p;
8873 {
8874         return (void *) (p == NULL);
8875 }
8876
8877 int main() {
8878
8879         /* pthread test function */
8880         pthread_t t;
8881         int status;
8882 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8883         /* This system (e.g. AIX) defaults detached; must override */
8884         pthread_attr_t attr;
8885
8886         status = pthread_attr_init(&attr);
8887         if( status ) exit( status );
8888
8889         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8890         if( status ) exit( status );
8891
8892 #define ATTR    &attr
8893 #else
8894 #if HAVE_PTHREADS_D4
8895 #define ATTR    pthread_attr_default
8896 #else
8897 #define ATTR    NULL
8898 #endif
8899 #endif
8900         /* make sure pthread_create() isn't just a stub */
8901         status = pthread_create(&t, ATTR, task, NULL);
8902         if( status ) exit( status );
8903
8904         /* make sure pthread_detach() isn't just a stub */
8905 #if HAVE_PTHREADS_D4
8906         status = pthread_detach( &t );
8907 #else
8908         status = pthread_detach( t );
8909 #endif
8910
8911 #ifdef HAVE_LINUX_THREADS
8912         pthread_kill_other_threads_np();
8913 #endif
8914
8915         exit( status );
8916
8917 ; return 0; }
8918 EOF
8919 if { (eval echo configure:8920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8920   rm -rf conftest*
8921   ol_cv_pthread_threads=yes
8922 else
8923   echo "configure: failed program was:" >&5
8924   cat conftest.$ac_ext >&5
8925   rm -rf conftest*
8926   ol_cv_pthread_threads=no
8927 fi
8928 rm -f conftest*
8929 else
8930   cat > conftest.$ac_ext <<EOF
8931 #line 8932 "configure"
8932 #include "confdefs.h"
8933 /* pthread test headers */
8934 #include <pthread.h>
8935 #ifndef NULL
8936 #define NULL (void*)0
8937 #endif
8938
8939 static void *task(p)
8940         void *p;
8941 {
8942         return (void *) (p == NULL);
8943 }
8944
8945
8946 int main(argc, argv)
8947         int argc;
8948         char **argv;
8949 {
8950
8951         /* pthread test function */
8952         pthread_t t;
8953         int status;
8954 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8955         /* This system (e.g. AIX) defaults detached; must override */
8956         pthread_attr_t attr;
8957
8958         status = pthread_attr_init(&attr);
8959         if( status ) exit( status );
8960
8961         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8962         if( status ) exit( status );
8963
8964 #define ATTR    &attr
8965 #else
8966 #if HAVE_PTHREADS_D4
8967 #define ATTR    pthread_attr_default
8968 #else
8969 #define ATTR    NULL
8970 #endif
8971 #endif
8972         /* make sure pthread_create() isn't just a stub */
8973         status = pthread_create(&t, ATTR, task, NULL);
8974         if( status ) exit( status );
8975
8976         /* make sure pthread_detach() isn't just a stub */
8977 #if HAVE_PTHREADS_D4
8978         status = pthread_detach( &t );
8979 #else
8980         status = pthread_detach( t );
8981 #endif
8982
8983 #ifdef HAVE_LINUX_THREADS
8984         pthread_kill_other_threads_np();
8985 #endif
8986
8987         exit( status );
8988
8989 }
8990
8991 EOF
8992 if { (eval echo configure:8993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8993 then
8994   ol_cv_pthread_threads=yes
8995 else
8996   echo "configure: failed program was:" >&5
8997   cat conftest.$ac_ext >&5
8998   rm -fr conftest*
8999   ol_cv_pthread_threads=no
9000 fi
9001 rm -fr conftest*
9002 fi
9003
9004
9005                 # restore the LIBS
9006                 LIBS="$ol_LIBS"
9007         
9008 fi
9009
9010 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9011
9012         if test $ol_cv_pthread_threads = yes ; then
9013                 ol_link_pthreads="-threads"
9014                 ol_link_threads=posix
9015         fi
9016 fi
9017
9018
9019                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9020 if test "$ol_link_threads" = no ; then
9021         # try -lpthreads -lmach -lexc -lc_r
9022         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9023 echo "configure:9024: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9024 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9025   echo $ac_n "(cached) $ac_c" 1>&6
9026 else
9027   
9028                 # save the flags
9029                 ol_LIBS="$LIBS"
9030                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9031
9032                 if test "$cross_compiling" = yes; then
9033   cat > conftest.$ac_ext <<EOF
9034 #line 9035 "configure"
9035 #include "confdefs.h"
9036 /* pthread test headers */
9037 #include <pthread.h>
9038 #ifndef NULL
9039 #define NULL (void*)0
9040 #endif
9041
9042 static void *task(p)
9043         void *p;
9044 {
9045         return (void *) (p == NULL);
9046 }
9047
9048 int main() {
9049
9050         /* pthread test function */
9051         pthread_t t;
9052         int status;
9053 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9054         /* This system (e.g. AIX) defaults detached; must override */
9055         pthread_attr_t attr;
9056
9057         status = pthread_attr_init(&attr);
9058         if( status ) exit( status );
9059
9060         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9061         if( status ) exit( status );
9062
9063 #define ATTR    &attr
9064 #else
9065 #if HAVE_PTHREADS_D4
9066 #define ATTR    pthread_attr_default
9067 #else
9068 #define ATTR    NULL
9069 #endif
9070 #endif
9071         /* make sure pthread_create() isn't just a stub */
9072         status = pthread_create(&t, ATTR, task, NULL);
9073         if( status ) exit( status );
9074
9075         /* make sure pthread_detach() isn't just a stub */
9076 #if HAVE_PTHREADS_D4
9077         status = pthread_detach( &t );
9078 #else
9079         status = pthread_detach( t );
9080 #endif
9081
9082 #ifdef HAVE_LINUX_THREADS
9083         pthread_kill_other_threads_np();
9084 #endif
9085
9086         exit( status );
9087
9088 ; return 0; }
9089 EOF
9090 if { (eval echo configure:9091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9091   rm -rf conftest*
9092   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9093 else
9094   echo "configure: failed program was:" >&5
9095   cat conftest.$ac_ext >&5
9096   rm -rf conftest*
9097   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9098 fi
9099 rm -f conftest*
9100 else
9101   cat > conftest.$ac_ext <<EOF
9102 #line 9103 "configure"
9103 #include "confdefs.h"
9104 /* pthread test headers */
9105 #include <pthread.h>
9106 #ifndef NULL
9107 #define NULL (void*)0
9108 #endif
9109
9110 static void *task(p)
9111         void *p;
9112 {
9113         return (void *) (p == NULL);
9114 }
9115
9116
9117 int main(argc, argv)
9118         int argc;
9119         char **argv;
9120 {
9121
9122         /* pthread test function */
9123         pthread_t t;
9124         int status;
9125 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9126         /* This system (e.g. AIX) defaults detached; must override */
9127         pthread_attr_t attr;
9128
9129         status = pthread_attr_init(&attr);
9130         if( status ) exit( status );
9131
9132         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9133         if( status ) exit( status );
9134
9135 #define ATTR    &attr
9136 #else
9137 #if HAVE_PTHREADS_D4
9138 #define ATTR    pthread_attr_default
9139 #else
9140 #define ATTR    NULL
9141 #endif
9142 #endif
9143         /* make sure pthread_create() isn't just a stub */
9144         status = pthread_create(&t, ATTR, task, NULL);
9145         if( status ) exit( status );
9146
9147         /* make sure pthread_detach() isn't just a stub */
9148 #if HAVE_PTHREADS_D4
9149         status = pthread_detach( &t );
9150 #else
9151         status = pthread_detach( t );
9152 #endif
9153
9154 #ifdef HAVE_LINUX_THREADS
9155         pthread_kill_other_threads_np();
9156 #endif
9157
9158         exit( status );
9159
9160 }
9161
9162 EOF
9163 if { (eval echo configure:9164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9164 then
9165   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9166 else
9167   echo "configure: failed program was:" >&5
9168   cat conftest.$ac_ext >&5
9169   rm -fr conftest*
9170   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9171 fi
9172 rm -fr conftest*
9173 fi
9174
9175
9176                 # restore the LIBS
9177                 LIBS="$ol_LIBS"
9178         
9179 fi
9180
9181 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9182
9183         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9184                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9185                 ol_link_threads=posix
9186         fi
9187 fi
9188
9189                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9190 if test "$ol_link_threads" = no ; then
9191         # try -lpthreads -lmach -lexc
9192         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9193 echo "configure:9194: checking for pthread link with -lpthreads -lmach -lexc" >&5
9194 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9195   echo $ac_n "(cached) $ac_c" 1>&6
9196 else
9197   
9198                 # save the flags
9199                 ol_LIBS="$LIBS"
9200                 LIBS="-lpthreads -lmach -lexc $LIBS"
9201
9202                 if test "$cross_compiling" = yes; then
9203   cat > conftest.$ac_ext <<EOF
9204 #line 9205 "configure"
9205 #include "confdefs.h"
9206 /* pthread test headers */
9207 #include <pthread.h>
9208 #ifndef NULL
9209 #define NULL (void*)0
9210 #endif
9211
9212 static void *task(p)
9213         void *p;
9214 {
9215         return (void *) (p == NULL);
9216 }
9217
9218 int main() {
9219
9220         /* pthread test function */
9221         pthread_t t;
9222         int status;
9223 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9224         /* This system (e.g. AIX) defaults detached; must override */
9225         pthread_attr_t attr;
9226
9227         status = pthread_attr_init(&attr);
9228         if( status ) exit( status );
9229
9230         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9231         if( status ) exit( status );
9232
9233 #define ATTR    &attr
9234 #else
9235 #if HAVE_PTHREADS_D4
9236 #define ATTR    pthread_attr_default
9237 #else
9238 #define ATTR    NULL
9239 #endif
9240 #endif
9241         /* make sure pthread_create() isn't just a stub */
9242         status = pthread_create(&t, ATTR, task, NULL);
9243         if( status ) exit( status );
9244
9245         /* make sure pthread_detach() isn't just a stub */
9246 #if HAVE_PTHREADS_D4
9247         status = pthread_detach( &t );
9248 #else
9249         status = pthread_detach( t );
9250 #endif
9251
9252 #ifdef HAVE_LINUX_THREADS
9253         pthread_kill_other_threads_np();
9254 #endif
9255
9256         exit( status );
9257
9258 ; return 0; }
9259 EOF
9260 if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9261   rm -rf conftest*
9262   ol_cv_pthread_lpthreads_lmach_lexc=yes
9263 else
9264   echo "configure: failed program was:" >&5
9265   cat conftest.$ac_ext >&5
9266   rm -rf conftest*
9267   ol_cv_pthread_lpthreads_lmach_lexc=no
9268 fi
9269 rm -f conftest*
9270 else
9271   cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274 /* pthread test headers */
9275 #include <pthread.h>
9276 #ifndef NULL
9277 #define NULL (void*)0
9278 #endif
9279
9280 static void *task(p)
9281         void *p;
9282 {
9283         return (void *) (p == NULL);
9284 }
9285
9286
9287 int main(argc, argv)
9288         int argc;
9289         char **argv;
9290 {
9291
9292         /* pthread test function */
9293         pthread_t t;
9294         int status;
9295 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9296         /* This system (e.g. AIX) defaults detached; must override */
9297         pthread_attr_t attr;
9298
9299         status = pthread_attr_init(&attr);
9300         if( status ) exit( status );
9301
9302         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9303         if( status ) exit( status );
9304
9305 #define ATTR    &attr
9306 #else
9307 #if HAVE_PTHREADS_D4
9308 #define ATTR    pthread_attr_default
9309 #else
9310 #define ATTR    NULL
9311 #endif
9312 #endif
9313         /* make sure pthread_create() isn't just a stub */
9314         status = pthread_create(&t, ATTR, task, NULL);
9315         if( status ) exit( status );
9316
9317         /* make sure pthread_detach() isn't just a stub */
9318 #if HAVE_PTHREADS_D4
9319         status = pthread_detach( &t );
9320 #else
9321         status = pthread_detach( t );
9322 #endif
9323
9324 #ifdef HAVE_LINUX_THREADS
9325         pthread_kill_other_threads_np();
9326 #endif
9327
9328         exit( status );
9329
9330 }
9331
9332 EOF
9333 if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9334 then
9335   ol_cv_pthread_lpthreads_lmach_lexc=yes
9336 else
9337   echo "configure: failed program was:" >&5
9338   cat conftest.$ac_ext >&5
9339   rm -fr conftest*
9340   ol_cv_pthread_lpthreads_lmach_lexc=no
9341 fi
9342 rm -fr conftest*
9343 fi
9344
9345
9346                 # restore the LIBS
9347                 LIBS="$ol_LIBS"
9348         
9349 fi
9350
9351 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9352
9353         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9354                 ol_link_pthreads="-lpthreads -lmach -lexc"
9355                 ol_link_threads=posix
9356         fi
9357 fi
9358
9359                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9360 if test "$ol_link_threads" = no ; then
9361         # try -lpthreads -lexc
9362         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9363 echo "configure:9364: checking for pthread link with -lpthreads -lexc" >&5
9364 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367   
9368                 # save the flags
9369                 ol_LIBS="$LIBS"
9370                 LIBS="-lpthreads -lexc $LIBS"
9371
9372                 if test "$cross_compiling" = yes; then
9373   cat > conftest.$ac_ext <<EOF
9374 #line 9375 "configure"
9375 #include "confdefs.h"
9376 /* pthread test headers */
9377 #include <pthread.h>
9378 #ifndef NULL
9379 #define NULL (void*)0
9380 #endif
9381
9382 static void *task(p)
9383         void *p;
9384 {
9385         return (void *) (p == NULL);
9386 }
9387
9388 int main() {
9389
9390         /* pthread test function */
9391         pthread_t t;
9392         int status;
9393 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9394         /* This system (e.g. AIX) defaults detached; must override */
9395         pthread_attr_t attr;
9396
9397         status = pthread_attr_init(&attr);
9398         if( status ) exit( status );
9399
9400         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9401         if( status ) exit( status );
9402
9403 #define ATTR    &attr
9404 #else
9405 #if HAVE_PTHREADS_D4
9406 #define ATTR    pthread_attr_default
9407 #else
9408 #define ATTR    NULL
9409 #endif
9410 #endif
9411         /* make sure pthread_create() isn't just a stub */
9412         status = pthread_create(&t, ATTR, task, NULL);
9413         if( status ) exit( status );
9414
9415         /* make sure pthread_detach() isn't just a stub */
9416 #if HAVE_PTHREADS_D4
9417         status = pthread_detach( &t );
9418 #else
9419         status = pthread_detach( t );
9420 #endif
9421
9422 #ifdef HAVE_LINUX_THREADS
9423         pthread_kill_other_threads_np();
9424 #endif
9425
9426         exit( status );
9427
9428 ; return 0; }
9429 EOF
9430 if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9431   rm -rf conftest*
9432   ol_cv_pthread_lpthreads_lexc=yes
9433 else
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -rf conftest*
9437   ol_cv_pthread_lpthreads_lexc=no
9438 fi
9439 rm -f conftest*
9440 else
9441   cat > conftest.$ac_ext <<EOF
9442 #line 9443 "configure"
9443 #include "confdefs.h"
9444 /* pthread test headers */
9445 #include <pthread.h>
9446 #ifndef NULL
9447 #define NULL (void*)0
9448 #endif
9449
9450 static void *task(p)
9451         void *p;
9452 {
9453         return (void *) (p == NULL);
9454 }
9455
9456
9457 int main(argc, argv)
9458         int argc;
9459         char **argv;
9460 {
9461
9462         /* pthread test function */
9463         pthread_t t;
9464         int status;
9465 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9466         /* This system (e.g. AIX) defaults detached; must override */
9467         pthread_attr_t attr;
9468
9469         status = pthread_attr_init(&attr);
9470         if( status ) exit( status );
9471
9472         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9473         if( status ) exit( status );
9474
9475 #define ATTR    &attr
9476 #else
9477 #if HAVE_PTHREADS_D4
9478 #define ATTR    pthread_attr_default
9479 #else
9480 #define ATTR    NULL
9481 #endif
9482 #endif
9483         /* make sure pthread_create() isn't just a stub */
9484         status = pthread_create(&t, ATTR, task, NULL);
9485         if( status ) exit( status );
9486
9487         /* make sure pthread_detach() isn't just a stub */
9488 #if HAVE_PTHREADS_D4
9489         status = pthread_detach( &t );
9490 #else
9491         status = pthread_detach( t );
9492 #endif
9493
9494 #ifdef HAVE_LINUX_THREADS
9495         pthread_kill_other_threads_np();
9496 #endif
9497
9498         exit( status );
9499
9500 }
9501
9502 EOF
9503 if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9504 then
9505   ol_cv_pthread_lpthreads_lexc=yes
9506 else
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -fr conftest*
9510   ol_cv_pthread_lpthreads_lexc=no
9511 fi
9512 rm -fr conftest*
9513 fi
9514
9515
9516                 # restore the LIBS
9517                 LIBS="$ol_LIBS"
9518         
9519 fi
9520
9521 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9522
9523         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9524                 ol_link_pthreads="-lpthreads -lexc"
9525                 ol_link_threads=posix
9526         fi
9527 fi
9528
9529
9530                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9531 if test "$ol_link_threads" = no ; then
9532         # try -lpthreads
9533         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9534 echo "configure:9535: checking for pthread link with -lpthreads" >&5
9535 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9536   echo $ac_n "(cached) $ac_c" 1>&6
9537 else
9538   
9539                 # save the flags
9540                 ol_LIBS="$LIBS"
9541                 LIBS="-lpthreads $LIBS"
9542
9543                 if test "$cross_compiling" = yes; then
9544   cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 /* pthread test headers */
9548 #include <pthread.h>
9549 #ifndef NULL
9550 #define NULL (void*)0
9551 #endif
9552
9553 static void *task(p)
9554         void *p;
9555 {
9556         return (void *) (p == NULL);
9557 }
9558
9559 int main() {
9560
9561         /* pthread test function */
9562         pthread_t t;
9563         int status;
9564 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9565         /* This system (e.g. AIX) defaults detached; must override */
9566         pthread_attr_t attr;
9567
9568         status = pthread_attr_init(&attr);
9569         if( status ) exit( status );
9570
9571         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9572         if( status ) exit( status );
9573
9574 #define ATTR    &attr
9575 #else
9576 #if HAVE_PTHREADS_D4
9577 #define ATTR    pthread_attr_default
9578 #else
9579 #define ATTR    NULL
9580 #endif
9581 #endif
9582         /* make sure pthread_create() isn't just a stub */
9583         status = pthread_create(&t, ATTR, task, NULL);
9584         if( status ) exit( status );
9585
9586         /* make sure pthread_detach() isn't just a stub */
9587 #if HAVE_PTHREADS_D4
9588         status = pthread_detach( &t );
9589 #else
9590         status = pthread_detach( t );
9591 #endif
9592
9593 #ifdef HAVE_LINUX_THREADS
9594         pthread_kill_other_threads_np();
9595 #endif
9596
9597         exit( status );
9598
9599 ; return 0; }
9600 EOF
9601 if { (eval echo configure:9602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9602   rm -rf conftest*
9603   ol_cv_pthread_lib_lpthreads=yes
9604 else
9605   echo "configure: failed program was:" >&5
9606   cat conftest.$ac_ext >&5
9607   rm -rf conftest*
9608   ol_cv_pthread_lib_lpthreads=no
9609 fi
9610 rm -f conftest*
9611 else
9612   cat > conftest.$ac_ext <<EOF
9613 #line 9614 "configure"
9614 #include "confdefs.h"
9615 /* pthread test headers */
9616 #include <pthread.h>
9617 #ifndef NULL
9618 #define NULL (void*)0
9619 #endif
9620
9621 static void *task(p)
9622         void *p;
9623 {
9624         return (void *) (p == NULL);
9625 }
9626
9627
9628 int main(argc, argv)
9629         int argc;
9630         char **argv;
9631 {
9632
9633         /* pthread test function */
9634         pthread_t t;
9635         int status;
9636 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9637         /* This system (e.g. AIX) defaults detached; must override */
9638         pthread_attr_t attr;
9639
9640         status = pthread_attr_init(&attr);
9641         if( status ) exit( status );
9642
9643         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9644         if( status ) exit( status );
9645
9646 #define ATTR    &attr
9647 #else
9648 #if HAVE_PTHREADS_D4
9649 #define ATTR    pthread_attr_default
9650 #else
9651 #define ATTR    NULL
9652 #endif
9653 #endif
9654         /* make sure pthread_create() isn't just a stub */
9655         status = pthread_create(&t, ATTR, task, NULL);
9656         if( status ) exit( status );
9657
9658         /* make sure pthread_detach() isn't just a stub */
9659 #if HAVE_PTHREADS_D4
9660         status = pthread_detach( &t );
9661 #else
9662         status = pthread_detach( t );
9663 #endif
9664
9665 #ifdef HAVE_LINUX_THREADS
9666         pthread_kill_other_threads_np();
9667 #endif
9668
9669         exit( status );
9670
9671 }
9672
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9675 then
9676   ol_cv_pthread_lib_lpthreads=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -fr conftest*
9681   ol_cv_pthread_lib_lpthreads=no
9682 fi
9683 rm -fr conftest*
9684 fi
9685
9686
9687                 # restore the LIBS
9688                 LIBS="$ol_LIBS"
9689         
9690 fi
9691
9692 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9693
9694         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9695                 ol_link_pthreads="-lpthreads"
9696                 ol_link_threads=posix
9697         fi
9698 fi
9699
9700
9701                 if test $ol_link_threads != no ; then
9702                         cat >> confdefs.h <<\EOF
9703 #define HAVE_PTHREADS 1
9704 EOF
9705
9706
9707                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9708
9709                                                 save_CPPFLAGS="$CPPFLAGS"
9710                         save_LIBS="$LIBS"
9711                         LIBS="$LTHREAD_LIBS $LIBS"
9712
9713                                                                                                 for ac_func in sched_yield pthread_yield
9714 do
9715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9716 echo "configure:9717: checking for $ac_func" >&5
9717 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9718   echo $ac_n "(cached) $ac_c" 1>&6
9719 else
9720   cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 /* System header to define __stub macros and hopefully few prototypes,
9724     which can conflict with char $ac_func(); below.  */
9725 #include <assert.h>
9726 /* Override any gcc2 internal prototype to avoid an error.  */
9727 /* We use char because int might match the return type of a gcc2
9728     builtin and then its argument prototype would still apply.  */
9729 char $ac_func();
9730 char (*f)();
9731
9732 int main() {
9733
9734 /* The GNU C library defines this for functions which it implements
9735     to always fail with ENOSYS.  Some functions are actually named
9736     something starting with __ and the normal name is an alias.  */
9737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9738 choke me
9739 #else
9740 f = $ac_func;
9741 #endif
9742
9743 ; return 0; }
9744 EOF
9745 if { (eval echo configure:9746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9746   rm -rf conftest*
9747   eval "ac_cv_func_$ac_func=yes"
9748 else
9749   echo "configure: failed program was:" >&5
9750   cat conftest.$ac_ext >&5
9751   rm -rf conftest*
9752   eval "ac_cv_func_$ac_func=no"
9753 fi
9754 rm -f conftest*
9755 fi
9756
9757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9758   echo "$ac_t""yes" 1>&6
9759     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9760   cat >> confdefs.h <<EOF
9761 #define $ac_tr_func 1
9762 EOF
9763  
9764 else
9765   echo "$ac_t""no" 1>&6
9766 fi
9767 done
9768
9769
9770                         if test $ac_cv_func_sched_yield = no -a \
9771                                 $ac_cv_func_pthread_yield = no ; then
9772                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9773 echo "configure:9774: checking for sched_yield in -lrt" >&5
9774 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9775 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9776   echo $ac_n "(cached) $ac_c" 1>&6
9777 else
9778   ac_save_LIBS="$LIBS"
9779 LIBS="-lrt  $LIBS"
9780 cat > conftest.$ac_ext <<EOF
9781 #line 9782 "configure"
9782 #include "confdefs.h"
9783 /* Override any gcc2 internal prototype to avoid an error.  */
9784 /* We use char because int might match the return type of a gcc2
9785     builtin and then its argument prototype would still apply.  */
9786 char sched_yield();
9787
9788 int main() {
9789 sched_yield()
9790 ; return 0; }
9791 EOF
9792 if { (eval echo configure:9793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9793   rm -rf conftest*
9794   eval "ac_cv_lib_$ac_lib_var=yes"
9795 else
9796   echo "configure: failed program was:" >&5
9797   cat conftest.$ac_ext >&5
9798   rm -rf conftest*
9799   eval "ac_cv_lib_$ac_lib_var=no"
9800 fi
9801 rm -f conftest*
9802 LIBS="$ac_save_LIBS"
9803
9804 fi
9805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9806   echo "$ac_t""yes" 1>&6
9807   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9808                                         cat >> confdefs.h <<\EOF
9809 #define HAVE_SCHED_YIELD 1
9810 EOF
9811
9812                                         ac_cv_func_sched_yield=yes
9813 else
9814   echo "$ac_t""no" 1>&6
9815 ac_cv_func_sched_yield=no
9816 fi
9817
9818                         fi
9819                         if test $ac_cv_func_sched_yield = no -a \
9820                                 $ac_cv_func_pthread_yield = no ; then
9821                                                                                                 for ac_func in thr_yield
9822 do
9823 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9824 echo "configure:9825: checking for $ac_func" >&5
9825 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9826   echo $ac_n "(cached) $ac_c" 1>&6
9827 else
9828   cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 /* System header to define __stub macros and hopefully few prototypes,
9832     which can conflict with char $ac_func(); below.  */
9833 #include <assert.h>
9834 /* Override any gcc2 internal prototype to avoid an error.  */
9835 /* We use char because int might match the return type of a gcc2
9836     builtin and then its argument prototype would still apply.  */
9837 char $ac_func();
9838 char (*f)();
9839
9840 int main() {
9841
9842 /* The GNU C library defines this for functions which it implements
9843     to always fail with ENOSYS.  Some functions are actually named
9844     something starting with __ and the normal name is an alias.  */
9845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9846 choke me
9847 #else
9848 f = $ac_func;
9849 #endif
9850
9851 ; return 0; }
9852 EOF
9853 if { (eval echo configure:9854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9854   rm -rf conftest*
9855   eval "ac_cv_func_$ac_func=yes"
9856 else
9857   echo "configure: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859   rm -rf conftest*
9860   eval "ac_cv_func_$ac_func=no"
9861 fi
9862 rm -f conftest*
9863 fi
9864
9865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9866   echo "$ac_t""yes" 1>&6
9867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9868   cat >> confdefs.h <<EOF
9869 #define $ac_tr_func 1
9870 EOF
9871  
9872 else
9873   echo "$ac_t""no" 1>&6
9874 fi
9875 done
9876
9877                         fi
9878                         if test $ac_cv_func_sched_yield = no -a \
9879                                 $ac_cv_func_pthread_yield = no -a \
9880                                 "$ac_cv_func_thr_yield" = no ; then
9881                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9882                         fi
9883
9884                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9885 do
9886 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9887 echo "configure:9888: checking for $ac_func" >&5
9888 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9889   echo $ac_n "(cached) $ac_c" 1>&6
9890 else
9891   cat > conftest.$ac_ext <<EOF
9892 #line 9893 "configure"
9893 #include "confdefs.h"
9894 /* System header to define __stub macros and hopefully few prototypes,
9895     which can conflict with char $ac_func(); below.  */
9896 #include <assert.h>
9897 /* Override any gcc2 internal prototype to avoid an error.  */
9898 /* We use char because int might match the return type of a gcc2
9899     builtin and then its argument prototype would still apply.  */
9900 char $ac_func();
9901 char (*f)();
9902
9903 int main() {
9904
9905 /* The GNU C library defines this for functions which it implements
9906     to always fail with ENOSYS.  Some functions are actually named
9907     something starting with __ and the normal name is an alias.  */
9908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9909 choke me
9910 #else
9911 f = $ac_func;
9912 #endif
9913
9914 ; return 0; }
9915 EOF
9916 if { (eval echo configure:9917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9917   rm -rf conftest*
9918   eval "ac_cv_func_$ac_func=yes"
9919 else
9920   echo "configure: failed program was:" >&5
9921   cat conftest.$ac_ext >&5
9922   rm -rf conftest*
9923   eval "ac_cv_func_$ac_func=no"
9924 fi
9925 rm -f conftest*
9926 fi
9927
9928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9929   echo "$ac_t""yes" 1>&6
9930     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9931   cat >> confdefs.h <<EOF
9932 #define $ac_tr_func 1
9933 EOF
9934  
9935 else
9936   echo "$ac_t""no" 1>&6
9937 fi
9938 done
9939
9940
9941                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9942 echo "configure:9943: checking for pthread_detach with <pthread.h>" >&5
9943 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9944   echo $ac_n "(cached) $ac_c" 1>&6
9945 else
9946   
9947                                                                 cat > conftest.$ac_ext <<EOF
9948 #line 9949 "configure"
9949 #include "confdefs.h"
9950
9951 #include <pthread.h>
9952 #ifndef NULL
9953 #define NULL (void*)0
9954 #endif
9955
9956 int main() {
9957 pthread_detach(NULL);
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9961   rm -rf conftest*
9962   ol_cv_func_pthread_detach=yes
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -rf conftest*
9967   ol_cv_func_pthread_detach=no
9968 fi
9969 rm -f conftest*
9970                         
9971 fi
9972
9973 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9974
9975                         if test $ol_cv_func_pthread_detach = no ; then
9976                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9977                         fi
9978
9979                         cat >> confdefs.h <<\EOF
9980 #define HAVE_PTHREAD_DETACH 1
9981 EOF
9982
9983
9984                                                 for ac_func in \
9985                                 pthread_setconcurrency \
9986                                 pthread_getconcurrency \
9987                                 thr_setconcurrency \
9988                                 thr_getconcurrency \
9989                         
9990 do
9991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9992 echo "configure:9993: checking for $ac_func" >&5
9993 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9994   echo $ac_n "(cached) $ac_c" 1>&6
9995 else
9996   cat > conftest.$ac_ext <<EOF
9997 #line 9998 "configure"
9998 #include "confdefs.h"
9999 /* System header to define __stub macros and hopefully few prototypes,
10000     which can conflict with char $ac_func(); below.  */
10001 #include <assert.h>
10002 /* Override any gcc2 internal prototype to avoid an error.  */
10003 /* We use char because int might match the return type of a gcc2
10004     builtin and then its argument prototype would still apply.  */
10005 char $ac_func();
10006 char (*f)();
10007
10008 int main() {
10009
10010 /* The GNU C library defines this for functions which it implements
10011     to always fail with ENOSYS.  Some functions are actually named
10012     something starting with __ and the normal name is an alias.  */
10013 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10014 choke me
10015 #else
10016 f = $ac_func;
10017 #endif
10018
10019 ; return 0; }
10020 EOF
10021 if { (eval echo configure:10022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10022   rm -rf conftest*
10023   eval "ac_cv_func_$ac_func=yes"
10024 else
10025   echo "configure: failed program was:" >&5
10026   cat conftest.$ac_ext >&5
10027   rm -rf conftest*
10028   eval "ac_cv_func_$ac_func=no"
10029 fi
10030 rm -f conftest*
10031 fi
10032
10033 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10034   echo "$ac_t""yes" 1>&6
10035     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10036   cat >> confdefs.h <<EOF
10037 #define $ac_tr_func 1
10038 EOF
10039  
10040 else
10041   echo "$ac_t""no" 1>&6
10042 fi
10043 done
10044
10045
10046                         
10047         for ac_func in pthread_kill_other_threads_np
10048 do
10049 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10050 echo "configure:10051: checking for $ac_func" >&5
10051 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10052   echo $ac_n "(cached) $ac_c" 1>&6
10053 else
10054   cat > conftest.$ac_ext <<EOF
10055 #line 10056 "configure"
10056 #include "confdefs.h"
10057 /* System header to define __stub macros and hopefully few prototypes,
10058     which can conflict with char $ac_func(); below.  */
10059 #include <assert.h>
10060 /* Override any gcc2 internal prototype to avoid an error.  */
10061 /* We use char because int might match the return type of a gcc2
10062     builtin and then its argument prototype would still apply.  */
10063 char $ac_func();
10064 char (*f)();
10065
10066 int main() {
10067
10068 /* The GNU C library defines this for functions which it implements
10069     to always fail with ENOSYS.  Some functions are actually named
10070     something starting with __ and the normal name is an alias.  */
10071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10072 choke me
10073 #else
10074 f = $ac_func;
10075 #endif
10076
10077 ; return 0; }
10078 EOF
10079 if { (eval echo configure:10080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10080   rm -rf conftest*
10081   eval "ac_cv_func_$ac_func=yes"
10082 else
10083   echo "configure: failed program was:" >&5
10084   cat conftest.$ac_ext >&5
10085   rm -rf conftest*
10086   eval "ac_cv_func_$ac_func=no"
10087 fi
10088 rm -f conftest*
10089 fi
10090
10091 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10092   echo "$ac_t""yes" 1>&6
10093     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10094   cat >> confdefs.h <<EOF
10095 #define $ac_tr_func 1
10096 EOF
10097  
10098 else
10099   echo "$ac_t""no" 1>&6
10100 fi
10101 done
10102
10103         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10104 echo "configure:10105: checking for LinuxThreads implementation" >&5
10105 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10109 fi
10110
10111 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10112
10113                         
10114         
10115         
10116         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10117 echo "configure:10118: checking for LinuxThreads consistency" >&5
10118 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10119   echo $ac_n "(cached) $ac_c" 1>&6
10120 else
10121   
10122                 if test $ol_cv_header_linux_threads = yes -a \
10123                         $ol_cv_sys_linux_threads = yes; then
10124                         ol_cv_linux_threads=yes
10125                 elif test $ol_cv_header_linux_threads = no -a \
10126                         $ol_cv_sys_linux_threads = no; then
10127                         ol_cv_linux_threads=no
10128                 else
10129                         ol_cv_linux_threads=error
10130                 fi
10131         
10132 fi
10133
10134 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10135
10136
10137                         if test $ol_cv_linux_threads = error; then
10138                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10139                         fi
10140
10141                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10142 echo "configure:10143: checking if pthread_create() works" >&5
10143 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10144   echo $ac_n "(cached) $ac_c" 1>&6
10145 else
10146   
10147                         if test "$cross_compiling" = yes; then
10148                                 ol_cv_pthread_create_works=yes
10149 else
10150   cat > conftest.$ac_ext <<EOF
10151 #line 10152 "configure"
10152 #include "confdefs.h"
10153 /* pthread test headers */
10154 #include <pthread.h>
10155 #ifndef NULL
10156 #define NULL (void*)0
10157 #endif
10158
10159 static void *task(p)
10160         void *p;
10161 {
10162         return (void *) (p == NULL);
10163 }
10164
10165
10166 int main(argc, argv)
10167         int argc;
10168         char **argv;
10169 {
10170
10171         /* pthread test function */
10172         pthread_t t;
10173         int status;
10174 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10175         /* This system (e.g. AIX) defaults detached; must override */
10176         pthread_attr_t attr;
10177
10178         status = pthread_attr_init(&attr);
10179         if( status ) exit( status );
10180
10181         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10182         if( status ) exit( status );
10183
10184 #define ATTR    &attr
10185 #else
10186 #if HAVE_PTHREADS_D4
10187 #define ATTR    pthread_attr_default
10188 #else
10189 #define ATTR    NULL
10190 #endif
10191 #endif
10192         /* make sure pthread_create() isn't just a stub */
10193         status = pthread_create(&t, ATTR, task, NULL);
10194         if( status ) exit( status );
10195
10196         /* make sure pthread_detach() isn't just a stub */
10197 #if HAVE_PTHREADS_D4
10198         status = pthread_detach( &t );
10199 #else
10200         status = pthread_detach( t );
10201 #endif
10202
10203 #ifdef HAVE_LINUX_THREADS
10204         pthread_kill_other_threads_np();
10205 #endif
10206
10207         exit( status );
10208
10209 }
10210
10211 EOF
10212 if { (eval echo configure:10213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10213 then
10214   ol_cv_pthread_create_works=yes
10215 else
10216   echo "configure: failed program was:" >&5
10217   cat conftest.$ac_ext >&5
10218   rm -fr conftest*
10219   ol_cv_pthread_create_works=no
10220 fi
10221 rm -fr conftest*
10222 fi
10223
10224 fi
10225
10226 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10227
10228                         if test $ol_cv_pthread_create_works = no ; then
10229                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10230                         fi
10231
10232                                                 if test $ol_with_yielding_select = auto ; then
10233                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10234 echo "configure:10235: checking if select yields when using pthreads" >&5
10235 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10236   echo $ac_n "(cached) $ac_c" 1>&6
10237 else
10238   
10239                                 if test "$cross_compiling" = yes; then
10240   ol_cv_pthread_select_yields=cross
10241 else
10242   cat > conftest.$ac_ext <<EOF
10243 #line 10244 "configure"
10244 #include "confdefs.h"
10245
10246 #include <sys/types.h>
10247 #include <sys/time.h>
10248 #include <unistd.h>
10249 #include <pthread.h>
10250 #ifndef NULL
10251 #define NULL (void*) 0
10252 #endif
10253
10254 static int fildes[2];
10255
10256 static void *task(p)
10257         void *p;
10258 {
10259         int i;
10260         struct timeval tv;
10261
10262         fd_set rfds;
10263
10264         tv.tv_sec=10;
10265         tv.tv_usec=0;
10266
10267         FD_ZERO(&rfds);
10268         FD_SET(fildes[0], &rfds);
10269
10270         /* we're not interested in any fds */
10271         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10272
10273         if(i < 0) {
10274                 perror("select");
10275                 exit(10);
10276         }
10277
10278         exit(0); /* if we exit here, the select blocked the whole process */
10279 }
10280
10281 int main(argc, argv)
10282         int argc;
10283         char **argv;
10284 {
10285         pthread_t t;
10286
10287         /* create a pipe to select */
10288         if(pipe(&fildes[0])) {
10289                 perror("select");
10290                 exit(1);
10291         }
10292
10293 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10294         (void) pthread_setconcurrency(2);
10295 #else
10296 #ifdef HAVE_THR_SETCONCURRENCY
10297         /* Set Solaris LWP concurrency to 2 */
10298         thr_setconcurrency(2);
10299 #endif
10300 #endif
10301
10302 #if HAVE_PTHREADS_D4
10303         pthread_create(&t, pthread_attr_default, task, NULL);
10304 #else
10305         pthread_create(&t, NULL, task, NULL);
10306 #endif
10307
10308 #if HAVE_SCHED_YIELD
10309         sched_yield();  /* make sure task runs first */
10310 #else
10311 #ifdef HAVE_PTHREAD_YIELD
10312         pthread_yield();        /* make sure task runs first */
10313 #endif
10314 #endif
10315
10316         exit(2);
10317 }
10318 EOF
10319 if { (eval echo configure:10320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10320 then
10321   ol_cv_pthread_select_yields=no
10322 else
10323   echo "configure: failed program was:" >&5
10324   cat conftest.$ac_ext >&5
10325   rm -fr conftest*
10326   ol_cv_pthread_select_yields=yes
10327 fi
10328 rm -fr conftest*
10329 fi
10330
10331 fi
10332
10333 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10334
10335                                 if test $ol_cv_pthread_select_yields = cross ; then
10336                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10337                                 fi
10338
10339                                 if test $ol_cv_pthread_select_yields = yes ; then
10340                                         ol_with_yielding_select=yes
10341                                 fi
10342                         fi
10343
10344                                                 CPPFLAGS="$save_CPPFLAGS"
10345                         LIBS="$save_LIBS"
10346                 else
10347                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10348                 fi
10349         fi
10350
10351         if test $ol_with_threads = posix ; then
10352                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10353         fi
10354 fi
10355
10356 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10357         -o $ol_with_threads = mach ; then
10358
10359                 for ac_hdr in mach/cthreads.h
10360 do
10361 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10362 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10363 echo "configure:10364: checking for $ac_hdr" >&5
10364 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10365   echo $ac_n "(cached) $ac_c" 1>&6
10366 else
10367   cat > conftest.$ac_ext <<EOF
10368 #line 10369 "configure"
10369 #include "confdefs.h"
10370 #include <$ac_hdr>
10371 EOF
10372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10373 { (eval echo configure:10374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10375 if test -z "$ac_err"; then
10376   rm -rf conftest*
10377   eval "ac_cv_header_$ac_safe=yes"
10378 else
10379   echo "$ac_err" >&5
10380   echo "configure: failed program was:" >&5
10381   cat conftest.$ac_ext >&5
10382   rm -rf conftest*
10383   eval "ac_cv_header_$ac_safe=no"
10384 fi
10385 rm -f conftest*
10386 fi
10387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10388   echo "$ac_t""yes" 1>&6
10389     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10390   cat >> confdefs.h <<EOF
10391 #define $ac_tr_hdr 1
10392 EOF
10393  
10394 else
10395   echo "$ac_t""no" 1>&6
10396 fi
10397 done
10398
10399         if test $ac_cv_header_mach_cthreads_h = yes ; then
10400                 ol_with_threads=found
10401
10402                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10403 echo "configure:10404: checking for cthread_fork" >&5
10404 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10405   echo $ac_n "(cached) $ac_c" 1>&6
10406 else
10407   cat > conftest.$ac_ext <<EOF
10408 #line 10409 "configure"
10409 #include "confdefs.h"
10410 /* System header to define __stub macros and hopefully few prototypes,
10411     which can conflict with char cthread_fork(); below.  */
10412 #include <assert.h>
10413 /* Override any gcc2 internal prototype to avoid an error.  */
10414 /* We use char because int might match the return type of a gcc2
10415     builtin and then its argument prototype would still apply.  */
10416 char cthread_fork();
10417 char (*f)();
10418
10419 int main() {
10420
10421 /* The GNU C library defines this for functions which it implements
10422     to always fail with ENOSYS.  Some functions are actually named
10423     something starting with __ and the normal name is an alias.  */
10424 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10425 choke me
10426 #else
10427 f = cthread_fork;
10428 #endif
10429
10430 ; return 0; }
10431 EOF
10432 if { (eval echo configure:10433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10433   rm -rf conftest*
10434   eval "ac_cv_func_cthread_fork=yes"
10435 else
10436   echo "configure: failed program was:" >&5
10437   cat conftest.$ac_ext >&5
10438   rm -rf conftest*
10439   eval "ac_cv_func_cthread_fork=no"
10440 fi
10441 rm -f conftest*
10442 fi
10443
10444 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10445   echo "$ac_t""yes" 1>&6
10446   ol_link_threads=yes
10447 else
10448   echo "$ac_t""no" 1>&6
10449 fi
10450
10451
10452                 if test $ol_link_threads = no ; then
10453                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10454 echo "configure:10455: checking for cthread_fork with -all_load" >&5
10455 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10456   echo $ac_n "(cached) $ac_c" 1>&6
10457 else
10458   
10459                                                                 save_LIBS="$LIBS"
10460                                 LIBS="-all_load $LIBS"
10461                                 cat > conftest.$ac_ext <<EOF
10462 #line 10463 "configure"
10463 #include "confdefs.h"
10464 #include <mach/cthreads.h>
10465 int main() {
10466
10467                                         cthread_fork((void *)0, (void *)0);
10468                                         
10469 ; return 0; }
10470 EOF
10471 if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10472   rm -rf conftest*
10473   ol_cv_cthread_all_load=yes
10474 else
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -rf conftest*
10478   ol_cv_cthread_all_load=no
10479 fi
10480 rm -f conftest*
10481                                                                 LIBS="$save_LIBS"
10482                         
10483 fi
10484
10485 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10486
10487                         if test $ol_cv_cthread_all_load = yes ; then
10488                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10489                                 ol_link_threads=mach
10490                         fi
10491                 fi
10492
10493                 if test $ol_link_threads != no ; then
10494                         : check for cthread specific functionality here
10495                         cat >> confdefs.h <<\EOF
10496 #define HAVE_MACH_CTHREADS 1
10497 EOF
10498
10499                 else
10500                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10501                 fi
10502         fi
10503
10504         if test $ol_with_threads = mach ; then
10505                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10506         fi
10507 fi
10508
10509 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10510         -o $ol_with_threads = pth ; then
10511
10512         for ac_hdr in pth.h
10513 do
10514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10516 echo "configure:10517: checking for $ac_hdr" >&5
10517 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10518   echo $ac_n "(cached) $ac_c" 1>&6
10519 else
10520   cat > conftest.$ac_ext <<EOF
10521 #line 10522 "configure"
10522 #include "confdefs.h"
10523 #include <$ac_hdr>
10524 EOF
10525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10526 { (eval echo configure:10527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10528 if test -z "$ac_err"; then
10529   rm -rf conftest*
10530   eval "ac_cv_header_$ac_safe=yes"
10531 else
10532   echo "$ac_err" >&5
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -rf conftest*
10536   eval "ac_cv_header_$ac_safe=no"
10537 fi
10538 rm -f conftest*
10539 fi
10540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10541   echo "$ac_t""yes" 1>&6
10542     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10543   cat >> confdefs.h <<EOF
10544 #define $ac_tr_hdr 1
10545 EOF
10546  
10547 else
10548   echo "$ac_t""no" 1>&6
10549 fi
10550 done
10551
10552
10553         if test $ac_cv_header_pth_h = yes ; then
10554                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10555 echo "configure:10556: checking for pth_version in -lpth" >&5
10556 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10558   echo $ac_n "(cached) $ac_c" 1>&6
10559 else
10560   ac_save_LIBS="$LIBS"
10561 LIBS="-lpth  $LIBS"
10562 cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565 /* Override any gcc2 internal prototype to avoid an error.  */
10566 /* We use char because int might match the return type of a gcc2
10567     builtin and then its argument prototype would still apply.  */
10568 char pth_version();
10569
10570 int main() {
10571 pth_version()
10572 ; return 0; }
10573 EOF
10574 if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10575   rm -rf conftest*
10576   eval "ac_cv_lib_$ac_lib_var=yes"
10577 else
10578   echo "configure: failed program was:" >&5
10579   cat conftest.$ac_ext >&5
10580   rm -rf conftest*
10581   eval "ac_cv_lib_$ac_lib_var=no"
10582 fi
10583 rm -f conftest*
10584 LIBS="$ac_save_LIBS"
10585
10586 fi
10587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10588   echo "$ac_t""yes" 1>&6
10589   have_pth=yes
10590 else
10591   echo "$ac_t""no" 1>&6
10592 have_pth=no
10593 fi
10594
10595
10596                 if test $have_pth = yes ; then
10597                         cat >> confdefs.h <<\EOF
10598 #define HAVE_GNU_PTH 1
10599 EOF
10600
10601                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10602                         ol_link_threads=pth
10603
10604                         if test $ol_with_yielding_select = auto ; then
10605                                 ol_with_yielding_select=yes
10606                         fi
10607                 fi
10608         fi
10609 fi
10610
10611 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10612         -o $ol_with_threads = lwp ; then
10613
10614                 for ac_hdr in thread.h synch.h
10615 do
10616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10618 echo "configure:10619: checking for $ac_hdr" >&5
10619 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10620   echo $ac_n "(cached) $ac_c" 1>&6
10621 else
10622   cat > conftest.$ac_ext <<EOF
10623 #line 10624 "configure"
10624 #include "confdefs.h"
10625 #include <$ac_hdr>
10626 EOF
10627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10628 { (eval echo configure:10629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10630 if test -z "$ac_err"; then
10631   rm -rf conftest*
10632   eval "ac_cv_header_$ac_safe=yes"
10633 else
10634   echo "$ac_err" >&5
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -rf conftest*
10638   eval "ac_cv_header_$ac_safe=no"
10639 fi
10640 rm -f conftest*
10641 fi
10642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10643   echo "$ac_t""yes" 1>&6
10644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10645   cat >> confdefs.h <<EOF
10646 #define $ac_tr_hdr 1
10647 EOF
10648  
10649 else
10650   echo "$ac_t""no" 1>&6
10651 fi
10652 done
10653
10654         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10655                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10656 echo "configure:10657: checking for thr_create in -lthread" >&5
10657 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10658 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10659   echo $ac_n "(cached) $ac_c" 1>&6
10660 else
10661   ac_save_LIBS="$LIBS"
10662 LIBS="-lthread  $LIBS"
10663 cat > conftest.$ac_ext <<EOF
10664 #line 10665 "configure"
10665 #include "confdefs.h"
10666 /* Override any gcc2 internal prototype to avoid an error.  */
10667 /* We use char because int might match the return type of a gcc2
10668     builtin and then its argument prototype would still apply.  */
10669 char thr_create();
10670
10671 int main() {
10672 thr_create()
10673 ; return 0; }
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10676   rm -rf conftest*
10677   eval "ac_cv_lib_$ac_lib_var=yes"
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -rf conftest*
10682   eval "ac_cv_lib_$ac_lib_var=no"
10683 fi
10684 rm -f conftest*
10685 LIBS="$ac_save_LIBS"
10686
10687 fi
10688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10689   echo "$ac_t""yes" 1>&6
10690   have_thr=yes
10691 else
10692   echo "$ac_t""no" 1>&6
10693 have_thr=no
10694 fi
10695
10696
10697                 if test $have_thr = yes ; then
10698                         cat >> confdefs.h <<\EOF
10699 #define HAVE_THR 1
10700 EOF
10701
10702                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10703                         ol_link_threads=thr
10704
10705                         if test $ol_with_yielding_select = auto ; then
10706                                 ol_with_yielding_select=yes
10707                         fi
10708
10709                                                 for ac_func in \
10710                                 thr_setconcurrency \
10711                                 thr_getconcurrency \
10712                         
10713 do
10714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10715 echo "configure:10716: checking for $ac_func" >&5
10716 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10717   echo $ac_n "(cached) $ac_c" 1>&6
10718 else
10719   cat > conftest.$ac_ext <<EOF
10720 #line 10721 "configure"
10721 #include "confdefs.h"
10722 /* System header to define __stub macros and hopefully few prototypes,
10723     which can conflict with char $ac_func(); below.  */
10724 #include <assert.h>
10725 /* Override any gcc2 internal prototype to avoid an error.  */
10726 /* We use char because int might match the return type of a gcc2
10727     builtin and then its argument prototype would still apply.  */
10728 char $ac_func();
10729 char (*f)();
10730
10731 int main() {
10732
10733 /* The GNU C library defines this for functions which it implements
10734     to always fail with ENOSYS.  Some functions are actually named
10735     something starting with __ and the normal name is an alias.  */
10736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10737 choke me
10738 #else
10739 f = $ac_func;
10740 #endif
10741
10742 ; return 0; }
10743 EOF
10744 if { (eval echo configure:10745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10745   rm -rf conftest*
10746   eval "ac_cv_func_$ac_func=yes"
10747 else
10748   echo "configure: failed program was:" >&5
10749   cat conftest.$ac_ext >&5
10750   rm -rf conftest*
10751   eval "ac_cv_func_$ac_func=no"
10752 fi
10753 rm -f conftest*
10754 fi
10755
10756 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10757   echo "$ac_t""yes" 1>&6
10758     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10759   cat >> confdefs.h <<EOF
10760 #define $ac_tr_func 1
10761 EOF
10762  
10763 else
10764   echo "$ac_t""no" 1>&6
10765 fi
10766 done
10767
10768                 fi
10769         fi
10770
10771                 for ac_hdr in lwp/lwp.h
10772 do
10773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10775 echo "configure:10776: checking for $ac_hdr" >&5
10776 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10777   echo $ac_n "(cached) $ac_c" 1>&6
10778 else
10779   cat > conftest.$ac_ext <<EOF
10780 #line 10781 "configure"
10781 #include "confdefs.h"
10782 #include <$ac_hdr>
10783 EOF
10784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10785 { (eval echo configure:10786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10787 if test -z "$ac_err"; then
10788   rm -rf conftest*
10789   eval "ac_cv_header_$ac_safe=yes"
10790 else
10791   echo "$ac_err" >&5
10792   echo "configure: failed program was:" >&5
10793   cat conftest.$ac_ext >&5
10794   rm -rf conftest*
10795   eval "ac_cv_header_$ac_safe=no"
10796 fi
10797 rm -f conftest*
10798 fi
10799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10800   echo "$ac_t""yes" 1>&6
10801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10802   cat >> confdefs.h <<EOF
10803 #define $ac_tr_hdr 1
10804 EOF
10805  
10806 else
10807   echo "$ac_t""no" 1>&6
10808 fi
10809 done
10810
10811         if test $ac_cv_header_lwp_lwp_h = yes ; then
10812                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10813 echo "configure:10814: checking for lwp_create in -llwp" >&5
10814 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10815 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10816   echo $ac_n "(cached) $ac_c" 1>&6
10817 else
10818   ac_save_LIBS="$LIBS"
10819 LIBS="-llwp  $LIBS"
10820 cat > conftest.$ac_ext <<EOF
10821 #line 10822 "configure"
10822 #include "confdefs.h"
10823 /* Override any gcc2 internal prototype to avoid an error.  */
10824 /* We use char because int might match the return type of a gcc2
10825     builtin and then its argument prototype would still apply.  */
10826 char lwp_create();
10827
10828 int main() {
10829 lwp_create()
10830 ; return 0; }
10831 EOF
10832 if { (eval echo configure:10833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10833   rm -rf conftest*
10834   eval "ac_cv_lib_$ac_lib_var=yes"
10835 else
10836   echo "configure: failed program was:" >&5
10837   cat conftest.$ac_ext >&5
10838   rm -rf conftest*
10839   eval "ac_cv_lib_$ac_lib_var=no"
10840 fi
10841 rm -f conftest*
10842 LIBS="$ac_save_LIBS"
10843
10844 fi
10845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10846   echo "$ac_t""yes" 1>&6
10847   have_lwp=yes
10848 else
10849   echo "$ac_t""no" 1>&6
10850 have_lwp=no
10851 fi
10852
10853
10854                 if test $have_lwp = yes ; then
10855                         cat >> confdefs.h <<\EOF
10856 #define HAVE_LWP 1
10857 EOF
10858
10859                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10860                         ol_link_threads=lwp
10861
10862                         if test $ol_with_yielding_select = auto ; then
10863                                 ol_with_yielding_select=no
10864                         fi
10865                 fi
10866         fi
10867 fi
10868
10869 if test $ol_with_yielding_select = yes ; then
10870         cat >> confdefs.h <<\EOF
10871 #define HAVE_YIELDING_SELECT 1
10872 EOF
10873
10874 fi
10875
10876 if test $ol_with_threads = manual ; then
10877                 ol_link_threads=yes
10878
10879         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10880
10881         for ac_hdr in pthread.h sched.h
10882 do
10883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10885 echo "configure:10886: checking for $ac_hdr" >&5
10886 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10887   echo $ac_n "(cached) $ac_c" 1>&6
10888 else
10889   cat > conftest.$ac_ext <<EOF
10890 #line 10891 "configure"
10891 #include "confdefs.h"
10892 #include <$ac_hdr>
10893 EOF
10894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10895 { (eval echo configure:10896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10897 if test -z "$ac_err"; then
10898   rm -rf conftest*
10899   eval "ac_cv_header_$ac_safe=yes"
10900 else
10901   echo "$ac_err" >&5
10902   echo "configure: failed program was:" >&5
10903   cat conftest.$ac_ext >&5
10904   rm -rf conftest*
10905   eval "ac_cv_header_$ac_safe=no"
10906 fi
10907 rm -f conftest*
10908 fi
10909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10910   echo "$ac_t""yes" 1>&6
10911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10912   cat >> confdefs.h <<EOF
10913 #define $ac_tr_hdr 1
10914 EOF
10915  
10916 else
10917   echo "$ac_t""no" 1>&6
10918 fi
10919 done
10920
10921         for ac_func in sched_yield pthread_yield
10922 do
10923 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10924 echo "configure:10925: checking for $ac_func" >&5
10925 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10926   echo $ac_n "(cached) $ac_c" 1>&6
10927 else
10928   cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931 /* System header to define __stub macros and hopefully few prototypes,
10932     which can conflict with char $ac_func(); below.  */
10933 #include <assert.h>
10934 /* Override any gcc2 internal prototype to avoid an error.  */
10935 /* We use char because int might match the return type of a gcc2
10936     builtin and then its argument prototype would still apply.  */
10937 char $ac_func();
10938 char (*f)();
10939
10940 int main() {
10941
10942 /* The GNU C library defines this for functions which it implements
10943     to always fail with ENOSYS.  Some functions are actually named
10944     something starting with __ and the normal name is an alias.  */
10945 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10946 choke me
10947 #else
10948 f = $ac_func;
10949 #endif
10950
10951 ; return 0; }
10952 EOF
10953 if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10954   rm -rf conftest*
10955   eval "ac_cv_func_$ac_func=yes"
10956 else
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -rf conftest*
10960   eval "ac_cv_func_$ac_func=no"
10961 fi
10962 rm -f conftest*
10963 fi
10964
10965 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10966   echo "$ac_t""yes" 1>&6
10967     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10968   cat >> confdefs.h <<EOF
10969 #define $ac_tr_func 1
10970 EOF
10971  
10972 else
10973   echo "$ac_t""no" 1>&6
10974 fi
10975 done
10976
10977         
10978         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10979 echo "configure:10980: checking for LinuxThreads pthread.h" >&5
10980 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10981   echo $ac_n "(cached) $ac_c" 1>&6
10982 else
10983   cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 #include <pthread.h>
10987 EOF
10988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10989   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10990   rm -rf conftest*
10991   ol_cv_header_linux_threads=yes
10992 else
10993   rm -rf conftest*
10994   ol_cv_header_linux_threads=no
10995 fi
10996 rm -f conftest*
10997
10998                 
10999 fi
11000
11001 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11002         if test $ol_cv_header_linux_threads = yes; then
11003                 cat >> confdefs.h <<\EOF
11004 #define HAVE_LINUX_THREADS 1
11005 EOF
11006
11007         fi
11008
11009
11010         for ac_hdr in mach/cthreads.h
11011 do
11012 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11013 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11014 echo "configure:11015: checking for $ac_hdr" >&5
11015 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11016   echo $ac_n "(cached) $ac_c" 1>&6
11017 else
11018   cat > conftest.$ac_ext <<EOF
11019 #line 11020 "configure"
11020 #include "confdefs.h"
11021 #include <$ac_hdr>
11022 EOF
11023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11024 { (eval echo configure:11025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11026 if test -z "$ac_err"; then
11027   rm -rf conftest*
11028   eval "ac_cv_header_$ac_safe=yes"
11029 else
11030   echo "$ac_err" >&5
11031   echo "configure: failed program was:" >&5
11032   cat conftest.$ac_ext >&5
11033   rm -rf conftest*
11034   eval "ac_cv_header_$ac_safe=no"
11035 fi
11036 rm -f conftest*
11037 fi
11038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11039   echo "$ac_t""yes" 1>&6
11040     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11041   cat >> confdefs.h <<EOF
11042 #define $ac_tr_hdr 1
11043 EOF
11044  
11045 else
11046   echo "$ac_t""no" 1>&6
11047 fi
11048 done
11049
11050         for ac_hdr in lwp/lwp.h
11051 do
11052 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11053 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11054 echo "configure:11055: checking for $ac_hdr" >&5
11055 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   cat > conftest.$ac_ext <<EOF
11059 #line 11060 "configure"
11060 #include "confdefs.h"
11061 #include <$ac_hdr>
11062 EOF
11063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11064 { (eval echo configure:11065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11066 if test -z "$ac_err"; then
11067   rm -rf conftest*
11068   eval "ac_cv_header_$ac_safe=yes"
11069 else
11070   echo "$ac_err" >&5
11071   echo "configure: failed program was:" >&5
11072   cat conftest.$ac_ext >&5
11073   rm -rf conftest*
11074   eval "ac_cv_header_$ac_safe=no"
11075 fi
11076 rm -f conftest*
11077 fi
11078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11079   echo "$ac_t""yes" 1>&6
11080     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11081   cat >> confdefs.h <<EOF
11082 #define $ac_tr_hdr 1
11083 EOF
11084  
11085 else
11086   echo "$ac_t""no" 1>&6
11087 fi
11088 done
11089
11090         for ac_hdr in thread.h synch.h
11091 do
11092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11094 echo "configure:11095: checking for $ac_hdr" >&5
11095 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11096   echo $ac_n "(cached) $ac_c" 1>&6
11097 else
11098   cat > conftest.$ac_ext <<EOF
11099 #line 11100 "configure"
11100 #include "confdefs.h"
11101 #include <$ac_hdr>
11102 EOF
11103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11104 { (eval echo configure:11105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11106 if test -z "$ac_err"; then
11107   rm -rf conftest*
11108   eval "ac_cv_header_$ac_safe=yes"
11109 else
11110   echo "$ac_err" >&5
11111   echo "configure: failed program was:" >&5
11112   cat conftest.$ac_ext >&5
11113   rm -rf conftest*
11114   eval "ac_cv_header_$ac_safe=no"
11115 fi
11116 rm -f conftest*
11117 fi
11118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11119   echo "$ac_t""yes" 1>&6
11120     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11121   cat >> confdefs.h <<EOF
11122 #define $ac_tr_hdr 1
11123 EOF
11124  
11125 else
11126   echo "$ac_t""no" 1>&6
11127 fi
11128 done
11129
11130 fi
11131
11132 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11133                         cat >> confdefs.h <<\EOF
11134 #define REENTRANT 1
11135 EOF
11136
11137         cat >> confdefs.h <<\EOF
11138 #define _REENTRANT 1
11139 EOF
11140
11141         cat >> confdefs.h <<\EOF
11142 #define THREAD_SAFE 1
11143 EOF
11144
11145         cat >> confdefs.h <<\EOF
11146 #define _THREAD_SAFE 1
11147 EOF
11148
11149         cat >> confdefs.h <<\EOF
11150 #define THREADSAFE 1
11151 EOF
11152
11153         cat >> confdefs.h <<\EOF
11154 #define _THREADSAFE 1
11155 EOF
11156
11157         cat >> confdefs.h <<\EOF
11158 #define _SGI_MP_SOURCE 1
11159 EOF
11160
11161
11162                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11163 echo "configure:11164: checking for thread specific errno" >&5
11164 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11165   echo $ac_n "(cached) $ac_c" 1>&6
11166 else
11167   
11168                 cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 #include <errno.h>
11172 int main() {
11173 errno = 0;
11174 ; return 0; }
11175 EOF
11176 if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11177   rm -rf conftest*
11178   ol_cv_errno_thread_specific=yes
11179 else
11180   echo "configure: failed program was:" >&5
11181   cat conftest.$ac_ext >&5
11182   rm -rf conftest*
11183   ol_cv_errno_thread_specific=no
11184 fi
11185 rm -f conftest*
11186         
11187 fi
11188
11189 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11190
11191                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11192 echo "configure:11193: checking for thread specific h_errno" >&5
11193 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11194   echo $ac_n "(cached) $ac_c" 1>&6
11195 else
11196   
11197                 cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 #include <netdb.h>
11201 int main() {
11202 h_errno = 0;
11203 ; return 0; }
11204 EOF
11205 if { (eval echo configure:11206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11206   rm -rf conftest*
11207   ol_cv_h_errno_thread_specific=yes
11208 else
11209   echo "configure: failed program was:" >&5
11210   cat conftest.$ac_ext >&5
11211   rm -rf conftest*
11212   ol_cv_h_errno_thread_specific=no
11213 fi
11214 rm -f conftest*
11215         
11216 fi
11217
11218 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11219
11220         if test $ol_cv_errno_thread_specific != yes \
11221                 -o $ol_cv_h_errno_thread_specific != yes ; then
11222                 LIBS="$LTHREAD_LIBS $LIBS"
11223                 LTHREAD_LIBS=""
11224         fi
11225
11226 fi  
11227
11228 if test $ol_link_threads = no ; then
11229         if test $ol_with_threads = yes ; then
11230                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11231         fi
11232
11233         if test $ol_with_threads = auto ; then
11234                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11235                 ol_with_threads=no
11236         fi
11237
11238         cat >> confdefs.h <<\EOF
11239 #define NO_THREADS 1
11240 EOF
11241
11242         LTHREAD_LIBS=""
11243 fi
11244
11245 if test $ol_link_threads != no ; then
11246         cat >> confdefs.h <<\EOF
11247 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11248 EOF
11249
11250 fi
11251
11252 ol_link_ldbm=no 
11253
11254 if test $ol_with_ldbm_api = auto \
11255         -o $ol_with_ldbm_api = berkeley \
11256         -o $ol_with_ldbm_api = bcompat ; then
11257
11258         if test $ol_with_ldbm_api = bcompat; then \
11259                 ol_cv_berkeley_db=no
11260 for ac_hdr in db_185.h db.h
11261 do
11262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11264 echo "configure:11265: checking for $ac_hdr" >&5
11265 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11266   echo $ac_n "(cached) $ac_c" 1>&6
11267 else
11268   cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 #include <$ac_hdr>
11272 EOF
11273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11274 { (eval echo configure:11275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11276 if test -z "$ac_err"; then
11277   rm -rf conftest*
11278   eval "ac_cv_header_$ac_safe=yes"
11279 else
11280   echo "$ac_err" >&5
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   eval "ac_cv_header_$ac_safe=no"
11285 fi
11286 rm -f conftest*
11287 fi
11288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11289   echo "$ac_t""yes" 1>&6
11290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11291   cat >> confdefs.h <<EOF
11292 #define $ac_tr_hdr 1
11293 EOF
11294  
11295 else
11296   echo "$ac_t""no" 1>&6
11297 fi
11298 done
11299
11300 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11301         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11302 echo "configure:11303: checking if Berkeley DB header compatibility" >&5
11303 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11304   echo $ac_n "(cached) $ac_c" 1>&6
11305 else
11306   
11307                 cat > conftest.$ac_ext <<EOF
11308 #line 11309 "configure"
11309 #include "confdefs.h"
11310
11311 #if HAVE_DB_185_H
11312 #       include <db_185.h>
11313 #else
11314 #       include <db.h>
11315 #endif
11316
11317  /* this check could be improved */
11318 #ifndef DB_VERSION_MAJOR
11319 #       define DB_VERSION_MAJOR 1
11320 #endif
11321
11322 #if DB_VERSION_MAJOR == 1 
11323         __db_version_1
11324 #endif
11325
11326 EOF
11327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11328   egrep "__db_version_1" >/dev/null 2>&1; then
11329   rm -rf conftest*
11330   ol_cv_header_db1=yes
11331 else
11332   rm -rf conftest*
11333   ol_cv_header_db1=no
11334 fi
11335 rm -f conftest*
11336
11337 fi
11338
11339 echo "$ac_t""$ol_cv_header_db1" 1>&6
11340
11341         if test ol_cv_header_db1=yes ; then
11342                 ol_cv_lib_db=no
11343 if test $ol_cv_lib_db = no ; then
11344         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11345 echo "configure:11346: checking for Berkeley DB link (default)" >&5
11346 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11347   echo $ac_n "(cached) $ac_c" 1>&6
11348 else
11349   
11350         ol_DB_LIB=
11351         ol_LIBS=$LIBS
11352         LIBS="$ol_DB_LIB $LIBS"
11353
11354         cat > conftest.$ac_ext <<EOF
11355 #line 11356 "configure"
11356 #include "confdefs.h"
11357
11358 #ifdef HAVE_DB_185_H
11359 # include <db_185.h>
11360 #else
11361 # include <db.h>
11362 #endif
11363
11364 #ifndef DB_VERSION_MAJOR
11365 # define DB_VERSION_MAJOR 1
11366 #endif
11367
11368 #ifndef NULL
11369 #define NULL ((void*)0)
11370 #endif
11371
11372 int main() {
11373
11374 #if DB_VERSION_MAJOR > 2
11375         db_env_create( NULL, 0 );
11376 #elif DB_VERSION_MAJOR > 1
11377         db_appexit( NULL );
11378 #else
11379         (void) dbopen( NULL, 0, 0, 0, NULL);
11380 #endif
11381
11382 ; return 0; }
11383 EOF
11384 if { (eval echo configure:11385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11385   rm -rf conftest*
11386   ol_cv_db_none=yes
11387 else
11388   echo "configure: failed program was:" >&5
11389   cat conftest.$ac_ext >&5
11390   rm -rf conftest*
11391   ol_cv_db_none=no
11392 fi
11393 rm -f conftest*
11394
11395         LIBS="$ol_LIBS"
11396
11397 fi
11398
11399 echo "$ac_t""$ol_cv_db_none" 1>&6
11400
11401         if test $ol_cv_db_none = yes ; then
11402                 ol_cv_lib_db=yes
11403         fi
11404 fi
11405
11406 if test $ol_cv_lib_db = no ; then
11407         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11408 echo "configure:11409: checking for Berkeley DB link (-ldb)" >&5
11409 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11410   echo $ac_n "(cached) $ac_c" 1>&6
11411 else
11412   
11413         ol_DB_LIB=-ldb
11414         ol_LIBS=$LIBS
11415         LIBS="$ol_DB_LIB $LIBS"
11416
11417         cat > conftest.$ac_ext <<EOF
11418 #line 11419 "configure"
11419 #include "confdefs.h"
11420
11421 #ifdef HAVE_DB_185_H
11422 # include <db_185.h>
11423 #else
11424 # include <db.h>
11425 #endif
11426
11427 #ifndef DB_VERSION_MAJOR
11428 # define DB_VERSION_MAJOR 1
11429 #endif
11430
11431 #ifndef NULL
11432 #define NULL ((void*)0)
11433 #endif
11434
11435 int main() {
11436
11437 #if DB_VERSION_MAJOR > 2
11438         db_env_create( NULL, 0 );
11439 #elif DB_VERSION_MAJOR > 1
11440         db_appexit( NULL );
11441 #else
11442         (void) dbopen( NULL, 0, 0, 0, NULL);
11443 #endif
11444
11445 ; return 0; }
11446 EOF
11447 if { (eval echo configure:11448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11448   rm -rf conftest*
11449   ol_cv_db_db=yes
11450 else
11451   echo "configure: failed program was:" >&5
11452   cat conftest.$ac_ext >&5
11453   rm -rf conftest*
11454   ol_cv_db_db=no
11455 fi
11456 rm -f conftest*
11457
11458         LIBS="$ol_LIBS"
11459
11460 fi
11461
11462 echo "$ac_t""$ol_cv_db_db" 1>&6
11463
11464         if test $ol_cv_db_db = yes ; then
11465                 ol_cv_lib_db=-ldb
11466         fi
11467 fi
11468
11469 if test $ol_cv_lib_db = no ; then
11470         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11471 echo "configure:11472: checking for Berkeley DB link (-ldb3)" >&5
11472 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11473   echo $ac_n "(cached) $ac_c" 1>&6
11474 else
11475   
11476         ol_DB_LIB=-ldb3
11477         ol_LIBS=$LIBS
11478         LIBS="$ol_DB_LIB $LIBS"
11479
11480         cat > conftest.$ac_ext <<EOF
11481 #line 11482 "configure"
11482 #include "confdefs.h"
11483
11484 #ifdef HAVE_DB_185_H
11485 # include <db_185.h>
11486 #else
11487 # include <db.h>
11488 #endif
11489
11490 #ifndef DB_VERSION_MAJOR
11491 # define DB_VERSION_MAJOR 1
11492 #endif
11493
11494 #ifndef NULL
11495 #define NULL ((void*)0)
11496 #endif
11497
11498 int main() {
11499
11500 #if DB_VERSION_MAJOR > 2
11501         db_env_create( NULL, 0 );
11502 #elif DB_VERSION_MAJOR > 1
11503         db_appexit( NULL );
11504 #else
11505         (void) dbopen( NULL, 0, 0, 0, NULL);
11506 #endif
11507
11508 ; return 0; }
11509 EOF
11510 if { (eval echo configure:11511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11511   rm -rf conftest*
11512   ol_cv_db_db3=yes
11513 else
11514   echo "configure: failed program was:" >&5
11515   cat conftest.$ac_ext >&5
11516   rm -rf conftest*
11517   ol_cv_db_db3=no
11518 fi
11519 rm -f conftest*
11520
11521         LIBS="$ol_LIBS"
11522
11523 fi
11524
11525 echo "$ac_t""$ol_cv_db_db3" 1>&6
11526
11527         if test $ol_cv_db_db3 = yes ; then
11528                 ol_cv_lib_db=-ldb3
11529         fi
11530 fi
11531
11532 if test $ol_cv_lib_db = no ; then
11533         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11534 echo "configure:11535: checking for Berkeley DB link (-ldb2)" >&5
11535 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11536   echo $ac_n "(cached) $ac_c" 1>&6
11537 else
11538   
11539         ol_DB_LIB=-ldb2
11540         ol_LIBS=$LIBS
11541         LIBS="$ol_DB_LIB $LIBS"
11542
11543         cat > conftest.$ac_ext <<EOF
11544 #line 11545 "configure"
11545 #include "confdefs.h"
11546
11547 #ifdef HAVE_DB_185_H
11548 # include <db_185.h>
11549 #else
11550 # include <db.h>
11551 #endif
11552
11553 #ifndef DB_VERSION_MAJOR
11554 # define DB_VERSION_MAJOR 1
11555 #endif
11556
11557 #ifndef NULL
11558 #define NULL ((void*)0)
11559 #endif
11560
11561 int main() {
11562
11563 #if DB_VERSION_MAJOR > 2
11564         db_env_create( NULL, 0 );
11565 #elif DB_VERSION_MAJOR > 1
11566         db_appexit( NULL );
11567 #else
11568         (void) dbopen( NULL, 0, 0, 0, NULL);
11569 #endif
11570
11571 ; return 0; }
11572 EOF
11573 if { (eval echo configure:11574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11574   rm -rf conftest*
11575   ol_cv_db_db2=yes
11576 else
11577   echo "configure: failed program was:" >&5
11578   cat conftest.$ac_ext >&5
11579   rm -rf conftest*
11580   ol_cv_db_db2=no
11581 fi
11582 rm -f conftest*
11583
11584         LIBS="$ol_LIBS"
11585
11586 fi
11587
11588 echo "$ac_t""$ol_cv_db_db2" 1>&6
11589
11590         if test $ol_cv_db_db2 = yes ; then
11591                 ol_cv_lib_db=-ldb2
11592         fi
11593 fi
11594
11595 if test $ol_cv_lib_db = no ; then
11596         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11597 echo "configure:11598: checking for Berkeley DB link (-ldb1)" >&5
11598 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11599   echo $ac_n "(cached) $ac_c" 1>&6
11600 else
11601   
11602         ol_DB_LIB=-ldb1
11603         ol_LIBS=$LIBS
11604         LIBS="$ol_DB_LIB $LIBS"
11605
11606         cat > conftest.$ac_ext <<EOF
11607 #line 11608 "configure"
11608 #include "confdefs.h"
11609
11610 #ifdef HAVE_DB_185_H
11611 # include <db_185.h>
11612 #else
11613 # include <db.h>
11614 #endif
11615
11616 #ifndef DB_VERSION_MAJOR
11617 # define DB_VERSION_MAJOR 1
11618 #endif
11619
11620 #ifndef NULL
11621 #define NULL ((void*)0)
11622 #endif
11623
11624 int main() {
11625
11626 #if DB_VERSION_MAJOR > 2
11627         db_env_create( NULL, 0 );
11628 #elif DB_VERSION_MAJOR > 1
11629         db_appexit( NULL );
11630 #else
11631         (void) dbopen( NULL, 0, 0, 0, NULL);
11632 #endif
11633
11634 ; return 0; }
11635 EOF
11636 if { (eval echo configure:11637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11637   rm -rf conftest*
11638   ol_cv_db_db1=yes
11639 else
11640   echo "configure: failed program was:" >&5
11641   cat conftest.$ac_ext >&5
11642   rm -rf conftest*
11643   ol_cv_db_db1=no
11644 fi
11645 rm -f conftest*
11646
11647         LIBS="$ol_LIBS"
11648
11649 fi
11650
11651 echo "$ac_t""$ol_cv_db_db1" 1>&6
11652
11653         if test $ol_cv_db_db1 = yes ; then
11654                 ol_cv_lib_db=-ldb1
11655         fi
11656 fi
11657
11658
11659                 if test "$ol_cv_lib_db" != no ; then
11660                         ol_cv_berkeley_db=yes
11661                 fi
11662         fi
11663 fi
11664
11665         else
11666                 ol_cv_berkeley_db=no
11667 for ac_hdr in db.h
11668 do
11669 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11670 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11671 echo "configure:11672: checking for $ac_hdr" >&5
11672 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11673   echo $ac_n "(cached) $ac_c" 1>&6
11674 else
11675   cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678 #include <$ac_hdr>
11679 EOF
11680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11681 { (eval echo configure:11682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11683 if test -z "$ac_err"; then
11684   rm -rf conftest*
11685   eval "ac_cv_header_$ac_safe=yes"
11686 else
11687   echo "$ac_err" >&5
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -rf conftest*
11691   eval "ac_cv_header_$ac_safe=no"
11692 fi
11693 rm -f conftest*
11694 fi
11695 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11696   echo "$ac_t""yes" 1>&6
11697     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11698   cat >> confdefs.h <<EOF
11699 #define $ac_tr_hdr 1
11700 EOF
11701  
11702 else
11703   echo "$ac_t""no" 1>&6
11704 fi
11705 done
11706
11707 if test $ac_cv_header_db_h = yes; then
11708         ol_cv_lib_db=no
11709 if test $ol_cv_lib_db = no ; then
11710         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11711 echo "configure:11712: checking for Berkeley DB link (default)" >&5
11712 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11713   echo $ac_n "(cached) $ac_c" 1>&6
11714 else
11715   
11716         ol_DB_LIB=
11717         ol_LIBS=$LIBS
11718         LIBS="$ol_DB_LIB $LIBS"
11719
11720         cat > conftest.$ac_ext <<EOF
11721 #line 11722 "configure"
11722 #include "confdefs.h"
11723
11724 #ifdef HAVE_DB_185_H
11725 # include <db_185.h>
11726 #else
11727 # include <db.h>
11728 #endif
11729
11730 #ifndef DB_VERSION_MAJOR
11731 # define DB_VERSION_MAJOR 1
11732 #endif
11733
11734 #ifndef NULL
11735 #define NULL ((void*)0)
11736 #endif
11737
11738 int main() {
11739
11740 #if DB_VERSION_MAJOR > 2
11741         db_env_create( NULL, 0 );
11742 #elif DB_VERSION_MAJOR > 1
11743         db_appexit( NULL );
11744 #else
11745         (void) dbopen( NULL, 0, 0, 0, NULL);
11746 #endif
11747
11748 ; return 0; }
11749 EOF
11750 if { (eval echo configure:11751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11751   rm -rf conftest*
11752   ol_cv_db_none=yes
11753 else
11754   echo "configure: failed program was:" >&5
11755   cat conftest.$ac_ext >&5
11756   rm -rf conftest*
11757   ol_cv_db_none=no
11758 fi
11759 rm -f conftest*
11760
11761         LIBS="$ol_LIBS"
11762
11763 fi
11764
11765 echo "$ac_t""$ol_cv_db_none" 1>&6
11766
11767         if test $ol_cv_db_none = yes ; then
11768                 ol_cv_lib_db=yes
11769         fi
11770 fi
11771
11772 if test $ol_cv_lib_db = no ; then
11773         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11774 echo "configure:11775: checking for Berkeley DB link (-ldb)" >&5
11775 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11776   echo $ac_n "(cached) $ac_c" 1>&6
11777 else
11778   
11779         ol_DB_LIB=-ldb
11780         ol_LIBS=$LIBS
11781         LIBS="$ol_DB_LIB $LIBS"
11782
11783         cat > conftest.$ac_ext <<EOF
11784 #line 11785 "configure"
11785 #include "confdefs.h"
11786
11787 #ifdef HAVE_DB_185_H
11788 # include <db_185.h>
11789 #else
11790 # include <db.h>
11791 #endif
11792
11793 #ifndef DB_VERSION_MAJOR
11794 # define DB_VERSION_MAJOR 1
11795 #endif
11796
11797 #ifndef NULL
11798 #define NULL ((void*)0)
11799 #endif
11800
11801 int main() {
11802
11803 #if DB_VERSION_MAJOR > 2
11804         db_env_create( NULL, 0 );
11805 #elif DB_VERSION_MAJOR > 1
11806         db_appexit( NULL );
11807 #else
11808         (void) dbopen( NULL, 0, 0, 0, NULL);
11809 #endif
11810
11811 ; return 0; }
11812 EOF
11813 if { (eval echo configure:11814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11814   rm -rf conftest*
11815   ol_cv_db_db=yes
11816 else
11817   echo "configure: failed program was:" >&5
11818   cat conftest.$ac_ext >&5
11819   rm -rf conftest*
11820   ol_cv_db_db=no
11821 fi
11822 rm -f conftest*
11823
11824         LIBS="$ol_LIBS"
11825
11826 fi
11827
11828 echo "$ac_t""$ol_cv_db_db" 1>&6
11829
11830         if test $ol_cv_db_db = yes ; then
11831                 ol_cv_lib_db=-ldb
11832         fi
11833 fi
11834
11835 if test $ol_cv_lib_db = no ; then
11836         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11837 echo "configure:11838: checking for Berkeley DB link (-ldb3)" >&5
11838 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11839   echo $ac_n "(cached) $ac_c" 1>&6
11840 else
11841   
11842         ol_DB_LIB=-ldb3
11843         ol_LIBS=$LIBS
11844         LIBS="$ol_DB_LIB $LIBS"
11845
11846         cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849
11850 #ifdef HAVE_DB_185_H
11851 # include <db_185.h>
11852 #else
11853 # include <db.h>
11854 #endif
11855
11856 #ifndef DB_VERSION_MAJOR
11857 # define DB_VERSION_MAJOR 1
11858 #endif
11859
11860 #ifndef NULL
11861 #define NULL ((void*)0)
11862 #endif
11863
11864 int main() {
11865
11866 #if DB_VERSION_MAJOR > 2
11867         db_env_create( NULL, 0 );
11868 #elif DB_VERSION_MAJOR > 1
11869         db_appexit( NULL );
11870 #else
11871         (void) dbopen( NULL, 0, 0, 0, NULL);
11872 #endif
11873
11874 ; return 0; }
11875 EOF
11876 if { (eval echo configure:11877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11877   rm -rf conftest*
11878   ol_cv_db_db3=yes
11879 else
11880   echo "configure: failed program was:" >&5
11881   cat conftest.$ac_ext >&5
11882   rm -rf conftest*
11883   ol_cv_db_db3=no
11884 fi
11885 rm -f conftest*
11886
11887         LIBS="$ol_LIBS"
11888
11889 fi
11890
11891 echo "$ac_t""$ol_cv_db_db3" 1>&6
11892
11893         if test $ol_cv_db_db3 = yes ; then
11894                 ol_cv_lib_db=-ldb3
11895         fi
11896 fi
11897
11898 if test $ol_cv_lib_db = no ; then
11899         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11900 echo "configure:11901: checking for Berkeley DB link (-ldb2)" >&5
11901 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11902   echo $ac_n "(cached) $ac_c" 1>&6
11903 else
11904   
11905         ol_DB_LIB=-ldb2
11906         ol_LIBS=$LIBS
11907         LIBS="$ol_DB_LIB $LIBS"
11908
11909         cat > conftest.$ac_ext <<EOF
11910 #line 11911 "configure"
11911 #include "confdefs.h"
11912
11913 #ifdef HAVE_DB_185_H
11914 # include <db_185.h>
11915 #else
11916 # include <db.h>
11917 #endif
11918
11919 #ifndef DB_VERSION_MAJOR
11920 # define DB_VERSION_MAJOR 1
11921 #endif
11922
11923 #ifndef NULL
11924 #define NULL ((void*)0)
11925 #endif
11926
11927 int main() {
11928
11929 #if DB_VERSION_MAJOR > 2
11930         db_env_create( NULL, 0 );
11931 #elif DB_VERSION_MAJOR > 1
11932         db_appexit( NULL );
11933 #else
11934         (void) dbopen( NULL, 0, 0, 0, NULL);
11935 #endif
11936
11937 ; return 0; }
11938 EOF
11939 if { (eval echo configure:11940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11940   rm -rf conftest*
11941   ol_cv_db_db2=yes
11942 else
11943   echo "configure: failed program was:" >&5
11944   cat conftest.$ac_ext >&5
11945   rm -rf conftest*
11946   ol_cv_db_db2=no
11947 fi
11948 rm -f conftest*
11949
11950         LIBS="$ol_LIBS"
11951
11952 fi
11953
11954 echo "$ac_t""$ol_cv_db_db2" 1>&6
11955
11956         if test $ol_cv_db_db2 = yes ; then
11957                 ol_cv_lib_db=-ldb2
11958         fi
11959 fi
11960
11961 if test $ol_cv_lib_db = no ; then
11962         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11963 echo "configure:11964: checking for Berkeley DB link (-ldb1)" >&5
11964 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11965   echo $ac_n "(cached) $ac_c" 1>&6
11966 else
11967   
11968         ol_DB_LIB=-ldb1
11969         ol_LIBS=$LIBS
11970         LIBS="$ol_DB_LIB $LIBS"
11971
11972         cat > conftest.$ac_ext <<EOF
11973 #line 11974 "configure"
11974 #include "confdefs.h"
11975
11976 #ifdef HAVE_DB_185_H
11977 # include <db_185.h>
11978 #else
11979 # include <db.h>
11980 #endif
11981
11982 #ifndef DB_VERSION_MAJOR
11983 # define DB_VERSION_MAJOR 1
11984 #endif
11985
11986 #ifndef NULL
11987 #define NULL ((void*)0)
11988 #endif
11989
11990 int main() {
11991
11992 #if DB_VERSION_MAJOR > 2
11993         db_env_create( NULL, 0 );
11994 #elif DB_VERSION_MAJOR > 1
11995         db_appexit( NULL );
11996 #else
11997         (void) dbopen( NULL, 0, 0, 0, NULL);
11998 #endif
11999
12000 ; return 0; }
12001 EOF
12002 if { (eval echo configure:12003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12003   rm -rf conftest*
12004   ol_cv_db_db1=yes
12005 else
12006   echo "configure: failed program was:" >&5
12007   cat conftest.$ac_ext >&5
12008   rm -rf conftest*
12009   ol_cv_db_db1=no
12010 fi
12011 rm -f conftest*
12012
12013         LIBS="$ol_LIBS"
12014
12015 fi
12016
12017 echo "$ac_t""$ol_cv_db_db1" 1>&6
12018
12019         if test $ol_cv_db_db1 = yes ; then
12020                 ol_cv_lib_db=-ldb1
12021         fi
12022 fi
12023
12024
12025         if test "$ol_cv_lib_db" != no ; then
12026                 ol_cv_berkeley_db=yes
12027                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12028 echo "configure:12029: checking for Berkeley DB thread support" >&5
12029 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12030   echo $ac_n "(cached) $ac_c" 1>&6
12031 else
12032   
12033         ol_LIBS="$LIBS"
12034         if test $ol_cv_lib_db != yes ; then
12035                 LIBS="$ol_cv_lib_db"
12036         fi
12037
12038         if test "$cross_compiling" = yes; then
12039   ol_cv_berkeley_db_thread=cross
12040 else
12041   cat > conftest.$ac_ext <<EOF
12042 #line 12043 "configure"
12043 #include "confdefs.h"
12044
12045 #ifdef HAVE_DB_185_H
12046         choke me;
12047 #else
12048 #include <db.h>
12049 #endif
12050 #ifndef NULL
12051 #define NULL ((void *)0)
12052 #endif
12053 main()
12054 {
12055         int rc;
12056         u_int32_t flags = DB_CREATE | DB_THREAD;
12057
12058
12059 #if DB_VERSION_MAJOR > 2
12060         DB_ENV *env = NULL;
12061
12062         rc = db_env_create( &env, 0 );
12063
12064         if( rc == 0 ) {
12065                 rc = env->open( env, NULL, NULL, flags, 0 );
12066         }
12067
12068 #else
12069         DB_ENV env;
12070         memset( &env, '\0', sizeof(env) );
12071
12072         rc = db_appinit( NULL, NULL, &env, flags );
12073
12074         if( rc == 0 ) {
12075                 db_appexit( &env );
12076         }
12077 #endif
12078
12079         return rc;
12080 }
12081 EOF
12082 if { (eval echo configure:12083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12083 then
12084   ol_cv_berkeley_db_thread=yes
12085 else
12086   echo "configure: failed program was:" >&5
12087   cat conftest.$ac_ext >&5
12088   rm -fr conftest*
12089   ol_cv_berkeley_db_thread=no
12090 fi
12091 rm -fr conftest*
12092 fi
12093
12094
12095         LIBS="$ol_LIBS"
12096
12097         if test $ol_cv_berkeley_db_thread != no ; then
12098                 cat >> confdefs.h <<\EOF
12099 #define HAVE_BERKELEY_DB_THREAD 1
12100 EOF
12101
12102         fi
12103
12104 fi
12105
12106 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12107         fi
12108 fi
12109
12110         fi
12111
12112         if test $ol_cv_berkeley_db != no ; then
12113                 cat >> confdefs.h <<\EOF
12114 #define HAVE_BERKELEY_DB 1
12115 EOF
12116
12117
12118                 ol_link_ldbm=berkeley
12119                 ol_with_ldbm_api=db
12120
12121                 if test $ol_with_ldbm_type = hash ; then
12122                         cat >> confdefs.h <<\EOF
12123 #define LDBM_USE_DBHASH 1
12124 EOF
12125
12126                 else
12127                         cat >> confdefs.h <<\EOF
12128 #define LDBM_USE_DBBTREE 1
12129 EOF
12130
12131                 fi
12132
12133                                                 if test $ol_cv_lib_db != yes ; then
12134                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12135                 fi
12136         fi
12137 fi
12138
12139 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12140         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12141         ol_with_ldbm_api=none
12142 fi
12143
12144 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12145         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12146 echo "configure:12147: checking for MDBM library" >&5
12147 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12148   echo $ac_n "(cached) $ac_c" 1>&6
12149 else
12150         ol_LIBS="$LIBS"
12151         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12152 echo "configure:12153: checking for mdbm_set_chain" >&5
12153 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12154   echo $ac_n "(cached) $ac_c" 1>&6
12155 else
12156   cat > conftest.$ac_ext <<EOF
12157 #line 12158 "configure"
12158 #include "confdefs.h"
12159 /* System header to define __stub macros and hopefully few prototypes,
12160     which can conflict with char mdbm_set_chain(); below.  */
12161 #include <assert.h>
12162 /* Override any gcc2 internal prototype to avoid an error.  */
12163 /* We use char because int might match the return type of a gcc2
12164     builtin and then its argument prototype would still apply.  */
12165 char mdbm_set_chain();
12166 char (*f)();
12167
12168 int main() {
12169
12170 /* The GNU C library defines this for functions which it implements
12171     to always fail with ENOSYS.  Some functions are actually named
12172     something starting with __ and the normal name is an alias.  */
12173 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12174 choke me
12175 #else
12176 f = mdbm_set_chain;
12177 #endif
12178
12179 ; return 0; }
12180 EOF
12181 if { (eval echo configure:12182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12182   rm -rf conftest*
12183   eval "ac_cv_func_mdbm_set_chain=yes"
12184 else
12185   echo "configure: failed program was:" >&5
12186   cat conftest.$ac_ext >&5
12187   rm -rf conftest*
12188   eval "ac_cv_func_mdbm_set_chain=no"
12189 fi
12190 rm -f conftest*
12191 fi
12192
12193 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12194   echo "$ac_t""yes" 1>&6
12195   ol_cv_lib_mdbm=yes
12196 else
12197   echo "$ac_t""no" 1>&6
12198
12199                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12200 echo "configure:12201: checking for mdbm_set_chain in -lmdbm" >&5
12201 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12203   echo $ac_n "(cached) $ac_c" 1>&6
12204 else
12205   ac_save_LIBS="$LIBS"
12206 LIBS="-lmdbm  $LIBS"
12207 cat > conftest.$ac_ext <<EOF
12208 #line 12209 "configure"
12209 #include "confdefs.h"
12210 /* Override any gcc2 internal prototype to avoid an error.  */
12211 /* We use char because int might match the return type of a gcc2
12212     builtin and then its argument prototype would still apply.  */
12213 char mdbm_set_chain();
12214
12215 int main() {
12216 mdbm_set_chain()
12217 ; return 0; }
12218 EOF
12219 if { (eval echo configure:12220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12220   rm -rf conftest*
12221   eval "ac_cv_lib_$ac_lib_var=yes"
12222 else
12223   echo "configure: failed program was:" >&5
12224   cat conftest.$ac_ext >&5
12225   rm -rf conftest*
12226   eval "ac_cv_lib_$ac_lib_var=no"
12227 fi
12228 rm -f conftest*
12229 LIBS="$ac_save_LIBS"
12230
12231 fi
12232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12233   echo "$ac_t""yes" 1>&6
12234   ol_cv_lib_mdbm=-lmdbm
12235 else
12236   echo "$ac_t""no" 1>&6
12237 ol_cv_lib_mdbm=no
12238 fi
12239
12240         
12241 fi
12242
12243         LIBS="$ol_LIBS"
12244
12245 fi
12246
12247 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12248
12249
12250  for ac_hdr in mdbm.h
12251 do
12252 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12253 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12254 echo "configure:12255: checking for $ac_hdr" >&5
12255 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12256   echo $ac_n "(cached) $ac_c" 1>&6
12257 else
12258   cat > conftest.$ac_ext <<EOF
12259 #line 12260 "configure"
12260 #include "confdefs.h"
12261 #include <$ac_hdr>
12262 EOF
12263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12264 { (eval echo configure:12265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12266 if test -z "$ac_err"; then
12267   rm -rf conftest*
12268   eval "ac_cv_header_$ac_safe=yes"
12269 else
12270   echo "$ac_err" >&5
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -rf conftest*
12274   eval "ac_cv_header_$ac_safe=no"
12275 fi
12276 rm -f conftest*
12277 fi
12278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12279   echo "$ac_t""yes" 1>&6
12280     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12281   cat >> confdefs.h <<EOF
12282 #define $ac_tr_hdr 1
12283 EOF
12284  
12285 else
12286   echo "$ac_t""no" 1>&6
12287 fi
12288 done
12289
12290  echo $ac_n "checking for db""... $ac_c" 1>&6
12291 echo "configure:12292: checking for db" >&5
12292 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12293   echo $ac_n "(cached) $ac_c" 1>&6
12294 else
12295   
12296         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12297                 ol_cv_mdbm=no
12298         else
12299                 ol_cv_mdbm=yes
12300         fi
12301
12302 fi
12303
12304 echo "$ac_t""$ol_cv_mdbm" 1>&6
12305  if test $ol_cv_mdbm = yes ; then
12306         cat >> confdefs.h <<\EOF
12307 #define HAVE_MDBM 1
12308 EOF
12309
12310  fi
12311
12312
12313         if test $ol_cv_mdbm = yes ; then
12314                 ol_link_ldbm=mdbm
12315                 ol_with_ldbm_api=mdbm
12316                 if test $ol_cv_lib_mdbm != yes ; then
12317                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12318                 fi
12319         fi
12320 fi
12321
12322 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12323         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12324 echo "configure:12325: checking for GDBM library" >&5
12325 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12326   echo $ac_n "(cached) $ac_c" 1>&6
12327 else
12328         ol_LIBS="$LIBS"
12329         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12330 echo "configure:12331: checking for gdbm_open" >&5
12331 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12332   echo $ac_n "(cached) $ac_c" 1>&6
12333 else
12334   cat > conftest.$ac_ext <<EOF
12335 #line 12336 "configure"
12336 #include "confdefs.h"
12337 /* System header to define __stub macros and hopefully few prototypes,
12338     which can conflict with char gdbm_open(); below.  */
12339 #include <assert.h>
12340 /* Override any gcc2 internal prototype to avoid an error.  */
12341 /* We use char because int might match the return type of a gcc2
12342     builtin and then its argument prototype would still apply.  */
12343 char gdbm_open();
12344 char (*f)();
12345
12346 int main() {
12347
12348 /* The GNU C library defines this for functions which it implements
12349     to always fail with ENOSYS.  Some functions are actually named
12350     something starting with __ and the normal name is an alias.  */
12351 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12352 choke me
12353 #else
12354 f = gdbm_open;
12355 #endif
12356
12357 ; return 0; }
12358 EOF
12359 if { (eval echo configure:12360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12360   rm -rf conftest*
12361   eval "ac_cv_func_gdbm_open=yes"
12362 else
12363   echo "configure: failed program was:" >&5
12364   cat conftest.$ac_ext >&5
12365   rm -rf conftest*
12366   eval "ac_cv_func_gdbm_open=no"
12367 fi
12368 rm -f conftest*
12369 fi
12370
12371 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12372   echo "$ac_t""yes" 1>&6
12373   ol_cv_lib_gdbm=yes
12374 else
12375   echo "$ac_t""no" 1>&6
12376
12377                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12378 echo "configure:12379: checking for gdbm_open in -lgdbm" >&5
12379 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12380 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12381   echo $ac_n "(cached) $ac_c" 1>&6
12382 else
12383   ac_save_LIBS="$LIBS"
12384 LIBS="-lgdbm  $LIBS"
12385 cat > conftest.$ac_ext <<EOF
12386 #line 12387 "configure"
12387 #include "confdefs.h"
12388 /* Override any gcc2 internal prototype to avoid an error.  */
12389 /* We use char because int might match the return type of a gcc2
12390     builtin and then its argument prototype would still apply.  */
12391 char gdbm_open();
12392
12393 int main() {
12394 gdbm_open()
12395 ; return 0; }
12396 EOF
12397 if { (eval echo configure:12398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12398   rm -rf conftest*
12399   eval "ac_cv_lib_$ac_lib_var=yes"
12400 else
12401   echo "configure: failed program was:" >&5
12402   cat conftest.$ac_ext >&5
12403   rm -rf conftest*
12404   eval "ac_cv_lib_$ac_lib_var=no"
12405 fi
12406 rm -f conftest*
12407 LIBS="$ac_save_LIBS"
12408
12409 fi
12410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12411   echo "$ac_t""yes" 1>&6
12412   ol_cv_lib_gdbm=-lgdbm
12413 else
12414   echo "$ac_t""no" 1>&6
12415 ol_cv_lib_gdbm=no
12416 fi
12417
12418         
12419 fi
12420
12421         LIBS="$ol_LIBS"
12422
12423 fi
12424
12425 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12426
12427
12428  for ac_hdr in gdbm.h
12429 do
12430 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12432 echo "configure:12433: checking for $ac_hdr" >&5
12433 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12434   echo $ac_n "(cached) $ac_c" 1>&6
12435 else
12436   cat > conftest.$ac_ext <<EOF
12437 #line 12438 "configure"
12438 #include "confdefs.h"
12439 #include <$ac_hdr>
12440 EOF
12441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12442 { (eval echo configure:12443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12444 if test -z "$ac_err"; then
12445   rm -rf conftest*
12446   eval "ac_cv_header_$ac_safe=yes"
12447 else
12448   echo "$ac_err" >&5
12449   echo "configure: failed program was:" >&5
12450   cat conftest.$ac_ext >&5
12451   rm -rf conftest*
12452   eval "ac_cv_header_$ac_safe=no"
12453 fi
12454 rm -f conftest*
12455 fi
12456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12457   echo "$ac_t""yes" 1>&6
12458     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12459   cat >> confdefs.h <<EOF
12460 #define $ac_tr_hdr 1
12461 EOF
12462  
12463 else
12464   echo "$ac_t""no" 1>&6
12465 fi
12466 done
12467
12468  echo $ac_n "checking for db""... $ac_c" 1>&6
12469 echo "configure:12470: checking for db" >&5
12470 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12471   echo $ac_n "(cached) $ac_c" 1>&6
12472 else
12473   
12474         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12475                 ol_cv_gdbm=no
12476         else
12477                 ol_cv_gdbm=yes
12478         fi
12479
12480 fi
12481
12482 echo "$ac_t""$ol_cv_gdbm" 1>&6
12483  if test $ol_cv_gdbm = yes ; then
12484         cat >> confdefs.h <<\EOF
12485 #define HAVE_GDBM 1
12486 EOF
12487
12488  fi
12489
12490
12491         if test $ol_cv_gdbm = yes ; then
12492                 ol_link_ldbm=gdbm
12493                 ol_with_ldbm_api=gdbm
12494
12495                 if test $ol_cv_lib_gdbm != yes ; then
12496                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12497                 fi
12498         fi
12499 fi
12500
12501 if test $ol_with_ldbm_api = ndbm ; then
12502         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12503 echo "configure:12504: checking for NDBM library" >&5
12504 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12505   echo $ac_n "(cached) $ac_c" 1>&6
12506 else
12507         ol_LIBS="$LIBS"
12508         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12509 echo "configure:12510: checking for dbm_open" >&5
12510 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12511   echo $ac_n "(cached) $ac_c" 1>&6
12512 else
12513   cat > conftest.$ac_ext <<EOF
12514 #line 12515 "configure"
12515 #include "confdefs.h"
12516 /* System header to define __stub macros and hopefully few prototypes,
12517     which can conflict with char dbm_open(); below.  */
12518 #include <assert.h>
12519 /* Override any gcc2 internal prototype to avoid an error.  */
12520 /* We use char because int might match the return type of a gcc2
12521     builtin and then its argument prototype would still apply.  */
12522 char dbm_open();
12523 char (*f)();
12524
12525 int main() {
12526
12527 /* The GNU C library defines this for functions which it implements
12528     to always fail with ENOSYS.  Some functions are actually named
12529     something starting with __ and the normal name is an alias.  */
12530 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12531 choke me
12532 #else
12533 f = dbm_open;
12534 #endif
12535
12536 ; return 0; }
12537 EOF
12538 if { (eval echo configure:12539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12539   rm -rf conftest*
12540   eval "ac_cv_func_dbm_open=yes"
12541 else
12542   echo "configure: failed program was:" >&5
12543   cat conftest.$ac_ext >&5
12544   rm -rf conftest*
12545   eval "ac_cv_func_dbm_open=no"
12546 fi
12547 rm -f conftest*
12548 fi
12549
12550 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12551   echo "$ac_t""yes" 1>&6
12552   ol_cv_lib_ndbm=yes
12553 else
12554   echo "$ac_t""no" 1>&6
12555
12556                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12557 echo "configure:12558: checking for dbm_open in -lndbm" >&5
12558 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12559 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12560   echo $ac_n "(cached) $ac_c" 1>&6
12561 else
12562   ac_save_LIBS="$LIBS"
12563 LIBS="-lndbm  $LIBS"
12564 cat > conftest.$ac_ext <<EOF
12565 #line 12566 "configure"
12566 #include "confdefs.h"
12567 /* Override any gcc2 internal prototype to avoid an error.  */
12568 /* We use char because int might match the return type of a gcc2
12569     builtin and then its argument prototype would still apply.  */
12570 char dbm_open();
12571
12572 int main() {
12573 dbm_open()
12574 ; return 0; }
12575 EOF
12576 if { (eval echo configure:12577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12577   rm -rf conftest*
12578   eval "ac_cv_lib_$ac_lib_var=yes"
12579 else
12580   echo "configure: failed program was:" >&5
12581   cat conftest.$ac_ext >&5
12582   rm -rf conftest*
12583   eval "ac_cv_lib_$ac_lib_var=no"
12584 fi
12585 rm -f conftest*
12586 LIBS="$ac_save_LIBS"
12587
12588 fi
12589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12590   echo "$ac_t""yes" 1>&6
12591   ol_cv_lib_ndbm=-lndbm
12592 else
12593   echo "$ac_t""no" 1>&6
12594
12595                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12596 echo "configure:12597: checking for dbm_open in -ldbm" >&5
12597 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12598 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12599   echo $ac_n "(cached) $ac_c" 1>&6
12600 else
12601   ac_save_LIBS="$LIBS"
12602 LIBS="-ldbm  $LIBS"
12603 cat > conftest.$ac_ext <<EOF
12604 #line 12605 "configure"
12605 #include "confdefs.h"
12606 /* Override any gcc2 internal prototype to avoid an error.  */
12607 /* We use char because int might match the return type of a gcc2
12608     builtin and then its argument prototype would still apply.  */
12609 char dbm_open();
12610
12611 int main() {
12612 dbm_open()
12613 ; return 0; }
12614 EOF
12615 if { (eval echo configure:12616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12616   rm -rf conftest*
12617   eval "ac_cv_lib_$ac_lib_var=yes"
12618 else
12619   echo "configure: failed program was:" >&5
12620   cat conftest.$ac_ext >&5
12621   rm -rf conftest*
12622   eval "ac_cv_lib_$ac_lib_var=no"
12623 fi
12624 rm -f conftest*
12625 LIBS="$ac_save_LIBS"
12626
12627 fi
12628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12629   echo "$ac_t""yes" 1>&6
12630   ol_cv_lib_ndbm=-ldbm
12631 else
12632   echo "$ac_t""no" 1>&6
12633 ol_cv_lib_ndbm=no
12634 fi
12635                 
12636 fi
12637
12638         
12639 fi
12640
12641         LIBS="$ol_LIBS"
12642
12643 fi
12644
12645 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12646
12647
12648  for ac_hdr in ndbm.h
12649 do
12650 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12651 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12652 echo "configure:12653: checking for $ac_hdr" >&5
12653 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12654   echo $ac_n "(cached) $ac_c" 1>&6
12655 else
12656   cat > conftest.$ac_ext <<EOF
12657 #line 12658 "configure"
12658 #include "confdefs.h"
12659 #include <$ac_hdr>
12660 EOF
12661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12662 { (eval echo configure:12663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12664 if test -z "$ac_err"; then
12665   rm -rf conftest*
12666   eval "ac_cv_header_$ac_safe=yes"
12667 else
12668   echo "$ac_err" >&5
12669   echo "configure: failed program was:" >&5
12670   cat conftest.$ac_ext >&5
12671   rm -rf conftest*
12672   eval "ac_cv_header_$ac_safe=no"
12673 fi
12674 rm -f conftest*
12675 fi
12676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12677   echo "$ac_t""yes" 1>&6
12678     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12679   cat >> confdefs.h <<EOF
12680 #define $ac_tr_hdr 1
12681 EOF
12682  
12683 else
12684   echo "$ac_t""no" 1>&6
12685 fi
12686 done
12687
12688  echo $ac_n "checking for db""... $ac_c" 1>&6
12689 echo "configure:12690: checking for db" >&5
12690 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12691   echo $ac_n "(cached) $ac_c" 1>&6
12692 else
12693   
12694         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12695                 ol_cv_ndbm=no
12696         else
12697                 ol_cv_ndbm=yes
12698         fi
12699
12700 fi
12701
12702 echo "$ac_t""$ol_cv_ndbm" 1>&6
12703  if test $ol_cv_ndbm = yes ; then
12704         cat >> confdefs.h <<\EOF
12705 #define HAVE_NDBM 1
12706 EOF
12707
12708  fi
12709
12710
12711         if test $ol_cv_ndbm = yes ; then
12712                 ol_link_ldbm=ndbm
12713                 ol_with_ldbm_api=ndbm
12714
12715                 if test $ol_cv_lib_ndbm != yes ; then
12716                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12717                 fi
12718         fi
12719 fi
12720
12721 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12722         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12723         if test $ol_enable_ldbm = yes ; then
12724                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12725         fi
12726
12727         echo "configure: warning: disabling LDBM" 1>&2
12728         ol_enable_ldbm=no
12729 fi
12730
12731 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12732         LINK_BINS_DYNAMIC="yes"
12733 else
12734         LINK_BINS_DYNAMIC="no"
12735 fi
12736
12737 if test $ol_enable_wrappers != no ; then
12738         for ac_hdr in tcpd.h
12739 do
12740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12742 echo "configure:12743: checking for $ac_hdr" >&5
12743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12744   echo $ac_n "(cached) $ac_c" 1>&6
12745 else
12746   cat > conftest.$ac_ext <<EOF
12747 #line 12748 "configure"
12748 #include "confdefs.h"
12749 #include <$ac_hdr>
12750 EOF
12751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12752 { (eval echo configure:12753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12754 if test -z "$ac_err"; then
12755   rm -rf conftest*
12756   eval "ac_cv_header_$ac_safe=yes"
12757 else
12758   echo "$ac_err" >&5
12759   echo "configure: failed program was:" >&5
12760   cat conftest.$ac_ext >&5
12761   rm -rf conftest*
12762   eval "ac_cv_header_$ac_safe=no"
12763 fi
12764 rm -f conftest*
12765 fi
12766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12767   echo "$ac_t""yes" 1>&6
12768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12769   cat >> confdefs.h <<EOF
12770 #define $ac_tr_hdr 1
12771 EOF
12772  
12773 else
12774   echo "$ac_t""no" 1>&6
12775 fi
12776 done
12777
12778
12779         if test $ac_cv_header_tcpd_h != yes ; then
12780                 have_wrappers=no
12781         else
12782                 cat > conftest.$ac_ext <<EOF
12783 #line 12784 "configure"
12784 #include "confdefs.h"
12785
12786 int allow_severity = 0;
12787 int deny_severity  = 0;
12788                 
12789 int main() {
12790 hosts_access()
12791 ; return 0; }
12792 EOF
12793 if { (eval echo configure:12794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12794   rm -rf conftest*
12795   have_wrappers=yes
12796 else
12797   echo "configure: failed program was:" >&5
12798   cat conftest.$ac_ext >&5
12799   rm -rf conftest*
12800   have_wrappers=no
12801 fi
12802 rm -f conftest*
12803         fi
12804
12805         if test $have_wrappers = yes ; then
12806                 cat >> confdefs.h <<\EOF
12807 #define HAVE_TCPD 1
12808 EOF
12809
12810                 WRAP_LIBS="-lwrap"
12811
12812                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12813 echo "configure:12814: checking for main in -lnsl" >&5
12814 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12815 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12816   echo $ac_n "(cached) $ac_c" 1>&6
12817 else
12818   ac_save_LIBS="$LIBS"
12819 LIBS="-lnsl  $LIBS"
12820 cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823
12824 int main() {
12825 main()
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_lib_$ac_lib_var=yes"
12831 else
12832   echo "configure: failed program was:" >&5
12833   cat conftest.$ac_ext >&5
12834   rm -rf conftest*
12835   eval "ac_cv_lib_$ac_lib_var=no"
12836 fi
12837 rm -f conftest*
12838 LIBS="$ac_save_LIBS"
12839
12840 fi
12841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12842   echo "$ac_t""yes" 1>&6
12843     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12844     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12845   cat >> confdefs.h <<EOF
12846 #define $ac_tr_lib 1
12847 EOF
12848
12849   LIBS="-lnsl $LIBS"
12850
12851 else
12852   echo "$ac_t""no" 1>&6
12853 fi
12854
12855         else
12856                 echo "configure: warning: could not find -lwrap" 1>&2
12857                 if test $ol_enable_wrappers = yes ; then
12858                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12859                 fi
12860
12861                 echo "configure: warning: disabling wrappers support" 1>&2
12862                 ol_enable_wrappers=no
12863                 WRAP_LIBS=""
12864         fi
12865 fi
12866
12867 if test $ol_enable_syslog != no ; then
12868         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12869 echo "configure:12870: checking for openlog" >&5
12870 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12871   echo $ac_n "(cached) $ac_c" 1>&6
12872 else
12873   cat > conftest.$ac_ext <<EOF
12874 #line 12875 "configure"
12875 #include "confdefs.h"
12876 /* System header to define __stub macros and hopefully few prototypes,
12877     which can conflict with char openlog(); below.  */
12878 #include <assert.h>
12879 /* Override any gcc2 internal prototype to avoid an error.  */
12880 /* We use char because int might match the return type of a gcc2
12881     builtin and then its argument prototype would still apply.  */
12882 char openlog();
12883 char (*f)();
12884
12885 int main() {
12886
12887 /* The GNU C library defines this for functions which it implements
12888     to always fail with ENOSYS.  Some functions are actually named
12889     something starting with __ and the normal name is an alias.  */
12890 #if defined (__stub_openlog) || defined (__stub___openlog)
12891 choke me
12892 #else
12893 f = openlog;
12894 #endif
12895
12896 ; return 0; }
12897 EOF
12898 if { (eval echo configure:12899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12899   rm -rf conftest*
12900   eval "ac_cv_func_openlog=yes"
12901 else
12902   echo "configure: failed program was:" >&5
12903   cat conftest.$ac_ext >&5
12904   rm -rf conftest*
12905   eval "ac_cv_func_openlog=no"
12906 fi
12907 rm -f conftest*
12908 fi
12909
12910 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12911   echo "$ac_t""yes" 1>&6
12912   :
12913 else
12914   echo "$ac_t""no" 1>&6
12915 fi
12916
12917         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12918                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12919         fi
12920         ol_enable_syslog=$ac_cv_func_openlog
12921 fi
12922
12923 ol_link_termcap=no
12924 for ac_hdr in termcap.h ncurses.h
12925 do
12926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12928 echo "configure:12929: checking for $ac_hdr" >&5
12929 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12930   echo $ac_n "(cached) $ac_c" 1>&6
12931 else
12932   cat > conftest.$ac_ext <<EOF
12933 #line 12934 "configure"
12934 #include "confdefs.h"
12935 #include <$ac_hdr>
12936 EOF
12937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12938 { (eval echo configure:12939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12940 if test -z "$ac_err"; then
12941   rm -rf conftest*
12942   eval "ac_cv_header_$ac_safe=yes"
12943 else
12944   echo "$ac_err" >&5
12945   echo "configure: failed program was:" >&5
12946   cat conftest.$ac_ext >&5
12947   rm -rf conftest*
12948   eval "ac_cv_header_$ac_safe=no"
12949 fi
12950 rm -f conftest*
12951 fi
12952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12953   echo "$ac_t""yes" 1>&6
12954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12955   cat >> confdefs.h <<EOF
12956 #define $ac_tr_hdr 1
12957 EOF
12958  
12959 else
12960   echo "$ac_t""no" 1>&6
12961 fi
12962 done
12963
12964
12965 if test $ol_link_termcap = no ; then
12966         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12967 echo "configure:12968: checking for tputs in -ltermcap" >&5
12968 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12969 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12970   echo $ac_n "(cached) $ac_c" 1>&6
12971 else
12972   ac_save_LIBS="$LIBS"
12973 LIBS="-ltermcap  $LIBS"
12974 cat > conftest.$ac_ext <<EOF
12975 #line 12976 "configure"
12976 #include "confdefs.h"
12977 /* Override any gcc2 internal prototype to avoid an error.  */
12978 /* We use char because int might match the return type of a gcc2
12979     builtin and then its argument prototype would still apply.  */
12980 char tputs();
12981
12982 int main() {
12983 tputs()
12984 ; return 0; }
12985 EOF
12986 if { (eval echo configure:12987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12987   rm -rf conftest*
12988   eval "ac_cv_lib_$ac_lib_var=yes"
12989 else
12990   echo "configure: failed program was:" >&5
12991   cat conftest.$ac_ext >&5
12992   rm -rf conftest*
12993   eval "ac_cv_lib_$ac_lib_var=no"
12994 fi
12995 rm -f conftest*
12996 LIBS="$ac_save_LIBS"
12997
12998 fi
12999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13000   echo "$ac_t""yes" 1>&6
13001   have_termcap=yes
13002 else
13003   echo "$ac_t""no" 1>&6
13004 have_termcap=no
13005 fi
13006
13007         if test $have_termcap = yes ; then
13008                 cat >> confdefs.h <<\EOF
13009 #define HAVE_TERMCAP 1
13010 EOF
13011
13012                 ol_link_termcap=yes
13013                 TERMCAP_LIBS=-ltermcap
13014         fi
13015 fi
13016
13017 if test $ol_link_termcap = no ; then
13018         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13019 echo "configure:13020: checking for initscr in -lncurses" >&5
13020 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13022   echo $ac_n "(cached) $ac_c" 1>&6
13023 else
13024   ac_save_LIBS="$LIBS"
13025 LIBS="-lncurses  $LIBS"
13026 cat > conftest.$ac_ext <<EOF
13027 #line 13028 "configure"
13028 #include "confdefs.h"
13029 /* Override any gcc2 internal prototype to avoid an error.  */
13030 /* We use char because int might match the return type of a gcc2
13031     builtin and then its argument prototype would still apply.  */
13032 char initscr();
13033
13034 int main() {
13035 initscr()
13036 ; return 0; }
13037 EOF
13038 if { (eval echo configure:13039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13039   rm -rf conftest*
13040   eval "ac_cv_lib_$ac_lib_var=yes"
13041 else
13042   echo "configure: failed program was:" >&5
13043   cat conftest.$ac_ext >&5
13044   rm -rf conftest*
13045   eval "ac_cv_lib_$ac_lib_var=no"
13046 fi
13047 rm -f conftest*
13048 LIBS="$ac_save_LIBS"
13049
13050 fi
13051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13052   echo "$ac_t""yes" 1>&6
13053   have_ncurses=yes
13054 else
13055   echo "$ac_t""no" 1>&6
13056 have_ncurses=no
13057 fi
13058
13059         if test $have_ncurses = yes ; then
13060                 cat >> confdefs.h <<\EOF
13061 #define HAVE_NCURSES 1
13062 EOF
13063
13064                 ol_link_termcap=yes
13065                 TERMCAP_LIBS=-lncurses
13066         fi
13067 fi
13068
13069 if test $ol_link_termcap = no ; then
13070         cat >> confdefs.h <<\EOF
13071 #define NO_TERMCAP 1
13072 EOF
13073
13074         TERMCAP_LIBS=
13075 fi
13076
13077 ol_link_sasl=no
13078 ol_link_spasswd=no
13079 if test $ol_with_cyrus_sasl != no ; then
13080         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13081 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13082 echo "configure:13083: checking for sasl.h" >&5
13083 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13084   echo $ac_n "(cached) $ac_c" 1>&6
13085 else
13086   cat > conftest.$ac_ext <<EOF
13087 #line 13088 "configure"
13088 #include "confdefs.h"
13089 #include <sasl.h>
13090 EOF
13091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13092 { (eval echo configure:13093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13094 if test -z "$ac_err"; then
13095   rm -rf conftest*
13096   eval "ac_cv_header_$ac_safe=yes"
13097 else
13098   echo "$ac_err" >&5
13099   echo "configure: failed program was:" >&5
13100   cat conftest.$ac_ext >&5
13101   rm -rf conftest*
13102   eval "ac_cv_header_$ac_safe=no"
13103 fi
13104 rm -f conftest*
13105 fi
13106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13107   echo "$ac_t""yes" 1>&6
13108   :
13109 else
13110   echo "$ac_t""no" 1>&6
13111 fi
13112
13113
13114         if test $ac_cv_header_sasl_h = yes ; then
13115                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13116 echo "configure:13117: checking for sasl_client_init in -lsasl" >&5
13117 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13118 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13119   echo $ac_n "(cached) $ac_c" 1>&6
13120 else
13121   ac_save_LIBS="$LIBS"
13122 LIBS="-lsasl  $LIBS"
13123 cat > conftest.$ac_ext <<EOF
13124 #line 13125 "configure"
13125 #include "confdefs.h"
13126 /* Override any gcc2 internal prototype to avoid an error.  */
13127 /* We use char because int might match the return type of a gcc2
13128     builtin and then its argument prototype would still apply.  */
13129 char sasl_client_init();
13130
13131 int main() {
13132 sasl_client_init()
13133 ; return 0; }
13134 EOF
13135 if { (eval echo configure:13136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13136   rm -rf conftest*
13137   eval "ac_cv_lib_$ac_lib_var=yes"
13138 else
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -rf conftest*
13142   eval "ac_cv_lib_$ac_lib_var=no"
13143 fi
13144 rm -f conftest*
13145 LIBS="$ac_save_LIBS"
13146
13147 fi
13148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13149   echo "$ac_t""yes" 1>&6
13150   have_cyrus_sasl=yes
13151 else
13152   echo "$ac_t""no" 1>&6
13153 have_cyrus_sasl=no
13154 fi
13155
13156
13157                 if test $have_cyrus_sasl != no ; then
13158                         SASL_LIBS="-lsasl"
13159                         cat >> confdefs.h <<\EOF
13160 #define HAVE_CYRUS_SASL 1
13161 EOF
13162
13163                         ol_link_sasl=yes
13164                 fi
13165         fi
13166
13167         if test $ol_link_sasl = no ; then
13168                 if test $ol_with_cyrus_sasl != auto ; then
13169                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13170                 else
13171                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13172                         echo "configure: warning: SASL authentication not supported!" 1>&2
13173                         if test $ol_link_tls = no ; then
13174                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13175                         fi
13176                 fi
13177         fi
13178 else
13179         echo "configure: warning: SASL authentication not supported!" 1>&2
13180         if test $ol_link_tls = no ; then
13181                 echo "configure: warning: Strong authentication not supported!" 1>&2
13182         fi
13183 fi
13184
13185 if test $cross_compiling != yes ; then
13186         dev=no
13187         if test -r /dev/urandom ; then
13188                 dev="/dev/urandom";
13189         elif test -r /idev/urandom ; then
13190                 dev="/idev/urandom";
13191         elif test -r /dev/srandom ; then
13192                 dev="/dev/srandom";
13193         elif test -r /dev/random ; then
13194                 dev="/dev/random";
13195         elif test -r /idev/random ; then
13196                 dev="/idev/random";
13197         fi
13198
13199         if test $dev != no ; then
13200                 cat >> confdefs.h <<EOF
13201 #define URANDOM_DEVICE "$dev"
13202 EOF
13203
13204         fi
13205 fi
13206
13207 ol_link_fetch=no
13208 if test $ol_with_fetch != no ; then
13209         ol_LIBS=$LIBS
13210 LIBS="-lfetch -lcom_err $LIBS"
13211 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13212 echo "configure:13213: checking fetch(3) library" >&5
13213 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13214   echo $ac_n "(cached) $ac_c" 1>&6
13215 else
13216   
13217         cat > conftest.$ac_ext <<EOF
13218 #line 13219 "configure"
13219 #include "confdefs.h"
13220
13221 #include <sys/param.h>
13222 #include <stdio.h>
13223 #include <fetch.h>
13224 int main() {
13225 struct url *u = fetchParseURL("file:///"); 
13226 ; return 0; }
13227 EOF
13228 if { (eval echo configure:13229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13229   rm -rf conftest*
13230   ol_cv_lib_fetch=yes
13231 else
13232   echo "configure: failed program was:" >&5
13233   cat conftest.$ac_ext >&5
13234   rm -rf conftest*
13235   ol_cv_lib_fetch=no
13236 fi
13237 rm -f conftest*
13238 fi
13239
13240 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13241 LIBS=$ol_LIBS
13242 if test $ol_cv_lib_fetch != no ; then
13243         ol_link_fetch="-lfetch -lcom_err"
13244         cat >> confdefs.h <<\EOF
13245 #define HAVE_FETCH 1
13246 EOF
13247
13248 fi
13249
13250
13251         if test $ol_cv_lib_fetch != no ; then
13252                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13253                 ol_link_fetch=freebsd
13254
13255         elif test $ol_with_fetch != auto ; then
13256                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13257         fi 
13258 fi
13259
13260 ol_link_readline=no
13261 if test $ol_with_readline != no ; then
13262         for ac_hdr in readline/readline.h readline/history.h
13263 do
13264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13266 echo "configure:13267: checking for $ac_hdr" >&5
13267 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13268   echo $ac_n "(cached) $ac_c" 1>&6
13269 else
13270   cat > conftest.$ac_ext <<EOF
13271 #line 13272 "configure"
13272 #include "confdefs.h"
13273 #include <$ac_hdr>
13274 EOF
13275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13276 { (eval echo configure:13277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13278 if test -z "$ac_err"; then
13279   rm -rf conftest*
13280   eval "ac_cv_header_$ac_safe=yes"
13281 else
13282   echo "$ac_err" >&5
13283   echo "configure: failed program was:" >&5
13284   cat conftest.$ac_ext >&5
13285   rm -rf conftest*
13286   eval "ac_cv_header_$ac_safe=no"
13287 fi
13288 rm -f conftest*
13289 fi
13290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13291   echo "$ac_t""yes" 1>&6
13292     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13293   cat >> confdefs.h <<EOF
13294 #define $ac_tr_hdr 1
13295 EOF
13296  
13297 else
13298   echo "$ac_t""no" 1>&6
13299 fi
13300 done
13301
13302
13303         if test $ac_cv_header_readline_readline_h = yes ; then
13304                 save_LIBS="$LIBS"
13305                 LIBS="$TERMCAP_LIBS $LIBS"
13306                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13307 echo "configure:13308: checking for readline in -lreadline" >&5
13308 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13310   echo $ac_n "(cached) $ac_c" 1>&6
13311 else
13312   ac_save_LIBS="$LIBS"
13313 LIBS="-lreadline  $LIBS"
13314 cat > conftest.$ac_ext <<EOF
13315 #line 13316 "configure"
13316 #include "confdefs.h"
13317 /* Override any gcc2 internal prototype to avoid an error.  */
13318 /* We use char because int might match the return type of a gcc2
13319     builtin and then its argument prototype would still apply.  */
13320 char readline();
13321
13322 int main() {
13323 readline()
13324 ; return 0; }
13325 EOF
13326 if { (eval echo configure:13327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13327   rm -rf conftest*
13328   eval "ac_cv_lib_$ac_lib_var=yes"
13329 else
13330   echo "configure: failed program was:" >&5
13331   cat conftest.$ac_ext >&5
13332   rm -rf conftest*
13333   eval "ac_cv_lib_$ac_lib_var=no"
13334 fi
13335 rm -f conftest*
13336 LIBS="$ac_save_LIBS"
13337
13338 fi
13339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13340   echo "$ac_t""yes" 1>&6
13341   have_readline=yes
13342 else
13343   echo "$ac_t""no" 1>&6
13344 have_readline=no
13345 fi
13346
13347                 LIBS="$save_LIBS"
13348                         
13349                 if test $have_readline = yes ; then
13350                         ol_with_readline=found
13351                         ol_link_readline=yes
13352
13353                         READLINE_LIBS="-lreadline"
13354                 fi
13355         fi
13356 fi
13357
13358 if test $ol_link_readline = yes ; then
13359         cat >> confdefs.h <<\EOF
13360 #define HAVE_READLINE 1
13361 EOF
13362
13363 fi
13364
13365
13366 if test $ol_enable_crypt != no ; then
13367         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13368 echo "configure:13369: checking for crypt" >&5
13369 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13370   echo $ac_n "(cached) $ac_c" 1>&6
13371 else
13372   cat > conftest.$ac_ext <<EOF
13373 #line 13374 "configure"
13374 #include "confdefs.h"
13375 /* System header to define __stub macros and hopefully few prototypes,
13376     which can conflict with char crypt(); below.  */
13377 #include <assert.h>
13378 /* Override any gcc2 internal prototype to avoid an error.  */
13379 /* We use char because int might match the return type of a gcc2
13380     builtin and then its argument prototype would still apply.  */
13381 char crypt();
13382 char (*f)();
13383
13384 int main() {
13385
13386 /* The GNU C library defines this for functions which it implements
13387     to always fail with ENOSYS.  Some functions are actually named
13388     something starting with __ and the normal name is an alias.  */
13389 #if defined (__stub_crypt) || defined (__stub___crypt)
13390 choke me
13391 #else
13392 f = crypt;
13393 #endif
13394
13395 ; return 0; }
13396 EOF
13397 if { (eval echo configure:13398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13398   rm -rf conftest*
13399   eval "ac_cv_func_crypt=yes"
13400 else
13401   echo "configure: failed program was:" >&5
13402   cat conftest.$ac_ext >&5
13403   rm -rf conftest*
13404   eval "ac_cv_func_crypt=no"
13405 fi
13406 rm -f conftest*
13407 fi
13408
13409 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13410   echo "$ac_t""yes" 1>&6
13411   have_crypt=yes
13412 else
13413   echo "$ac_t""no" 1>&6
13414
13415                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13416 echo "configure:13417: checking for crypt in -lcrypt" >&5
13417 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13419   echo $ac_n "(cached) $ac_c" 1>&6
13420 else
13421   ac_save_LIBS="$LIBS"
13422 LIBS="-lcrypt  $LIBS"
13423 cat > conftest.$ac_ext <<EOF
13424 #line 13425 "configure"
13425 #include "confdefs.h"
13426 /* Override any gcc2 internal prototype to avoid an error.  */
13427 /* We use char because int might match the return type of a gcc2
13428     builtin and then its argument prototype would still apply.  */
13429 char crypt();
13430
13431 int main() {
13432 crypt()
13433 ; return 0; }
13434 EOF
13435 if { (eval echo configure:13436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13436   rm -rf conftest*
13437   eval "ac_cv_lib_$ac_lib_var=yes"
13438 else
13439   echo "configure: failed program was:" >&5
13440   cat conftest.$ac_ext >&5
13441   rm -rf conftest*
13442   eval "ac_cv_lib_$ac_lib_var=no"
13443 fi
13444 rm -f conftest*
13445 LIBS="$ac_save_LIBS"
13446
13447 fi
13448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13449   echo "$ac_t""yes" 1>&6
13450   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13451                         have_crypt=yes
13452 else
13453   echo "$ac_t""no" 1>&6
13454 have_crypt=no
13455 fi
13456
13457 fi
13458
13459
13460         if test $have_crypt = yes ; then
13461                 cat >> confdefs.h <<\EOF
13462 #define HAVE_CRYPT 1
13463 EOF
13464
13465         else
13466                 echo "configure: warning: could not find crypt" 1>&2
13467                 if test $ol_enable_crypt = yes ; then
13468                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13469                 fi
13470
13471                 echo "configure: warning: disabling crypt support" 1>&2
13472                 ol_enable_crypt=no
13473         fi
13474 fi
13475
13476 if test $ol_enable_proctitle != no ; then
13477         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13478 echo "configure:13479: checking for setproctitle" >&5
13479 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13480   echo $ac_n "(cached) $ac_c" 1>&6
13481 else
13482   cat > conftest.$ac_ext <<EOF
13483 #line 13484 "configure"
13484 #include "confdefs.h"
13485 /* System header to define __stub macros and hopefully few prototypes,
13486     which can conflict with char setproctitle(); below.  */
13487 #include <assert.h>
13488 /* Override any gcc2 internal prototype to avoid an error.  */
13489 /* We use char because int might match the return type of a gcc2
13490     builtin and then its argument prototype would still apply.  */
13491 char setproctitle();
13492 char (*f)();
13493
13494 int main() {
13495
13496 /* The GNU C library defines this for functions which it implements
13497     to always fail with ENOSYS.  Some functions are actually named
13498     something starting with __ and the normal name is an alias.  */
13499 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13500 choke me
13501 #else
13502 f = setproctitle;
13503 #endif
13504
13505 ; return 0; }
13506 EOF
13507 if { (eval echo configure:13508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13508   rm -rf conftest*
13509   eval "ac_cv_func_setproctitle=yes"
13510 else
13511   echo "configure: failed program was:" >&5
13512   cat conftest.$ac_ext >&5
13513   rm -rf conftest*
13514   eval "ac_cv_func_setproctitle=no"
13515 fi
13516 rm -f conftest*
13517 fi
13518
13519 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13520   echo "$ac_t""yes" 1>&6
13521   have_setproctitle=yes
13522 else
13523   echo "$ac_t""no" 1>&6
13524
13525                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13526 echo "configure:13527: checking for setproctitle in -lutil" >&5
13527 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13528 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13529   echo $ac_n "(cached) $ac_c" 1>&6
13530 else
13531   ac_save_LIBS="$LIBS"
13532 LIBS="-lutil  $LIBS"
13533 cat > conftest.$ac_ext <<EOF
13534 #line 13535 "configure"
13535 #include "confdefs.h"
13536 /* Override any gcc2 internal prototype to avoid an error.  */
13537 /* We use char because int might match the return type of a gcc2
13538     builtin and then its argument prototype would still apply.  */
13539 char setproctitle();
13540
13541 int main() {
13542 setproctitle()
13543 ; return 0; }
13544 EOF
13545 if { (eval echo configure:13546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13546   rm -rf conftest*
13547   eval "ac_cv_lib_$ac_lib_var=yes"
13548 else
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -rf conftest*
13552   eval "ac_cv_lib_$ac_lib_var=no"
13553 fi
13554 rm -f conftest*
13555 LIBS="$ac_save_LIBS"
13556
13557 fi
13558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13559   echo "$ac_t""yes" 1>&6
13560   have_setproctitle=yes
13561                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13562 else
13563   echo "$ac_t""no" 1>&6
13564 have_setproctitle=no
13565                         LIBOBJS="$LIBOBJS setproctitle.o"
13566                         LIBSRCS="$LIBSRCS setproctitle.c"
13567 fi
13568
13569 fi
13570
13571
13572         if test $have_setproctitle = yes ; then
13573                 cat >> confdefs.h <<\EOF
13574 #define HAVE_SETPROCTITLE 1
13575 EOF
13576
13577         fi
13578 fi
13579
13580 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13581 echo "configure:13582: checking for ANSI C header files" >&5
13582 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13583   echo $ac_n "(cached) $ac_c" 1>&6
13584 else
13585   cat > conftest.$ac_ext <<EOF
13586 #line 13587 "configure"
13587 #include "confdefs.h"
13588 #include <stdlib.h>
13589 #include <stdarg.h>
13590 #include <string.h>
13591 #include <float.h>
13592 EOF
13593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13594 { (eval echo configure:13595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13596 if test -z "$ac_err"; then
13597   rm -rf conftest*
13598   ac_cv_header_stdc=yes
13599 else
13600   echo "$ac_err" >&5
13601   echo "configure: failed program was:" >&5
13602   cat conftest.$ac_ext >&5
13603   rm -rf conftest*
13604   ac_cv_header_stdc=no
13605 fi
13606 rm -f conftest*
13607
13608 if test $ac_cv_header_stdc = yes; then
13609   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13610 cat > conftest.$ac_ext <<EOF
13611 #line 13612 "configure"
13612 #include "confdefs.h"
13613 #include <string.h>
13614 EOF
13615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13616   egrep "memchr" >/dev/null 2>&1; then
13617   :
13618 else
13619   rm -rf conftest*
13620   ac_cv_header_stdc=no
13621 fi
13622 rm -f conftest*
13623
13624 fi
13625
13626 if test $ac_cv_header_stdc = yes; then
13627   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13628 cat > conftest.$ac_ext <<EOF
13629 #line 13630 "configure"
13630 #include "confdefs.h"
13631 #include <stdlib.h>
13632 EOF
13633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13634   egrep "free" >/dev/null 2>&1; then
13635   :
13636 else
13637   rm -rf conftest*
13638   ac_cv_header_stdc=no
13639 fi
13640 rm -f conftest*
13641
13642 fi
13643
13644 if test $ac_cv_header_stdc = yes; then
13645   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13646 if test "$cross_compiling" = yes; then
13647   :
13648 else
13649   cat > conftest.$ac_ext <<EOF
13650 #line 13651 "configure"
13651 #include "confdefs.h"
13652 #include <ctype.h>
13653 #if ((' ' & 0x0FF) == 0x020)
13654 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13655 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13656 #else
13657 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13658  || ('j' <= (c) && (c) <= 'r') \
13659  || ('s' <= (c) && (c) <= 'z'))
13660 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13661 #endif
13662 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13663 int main () { int i; for (i = 0; i < 256; i++)
13664 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13665 exit (0); }
13666
13667 EOF
13668 if { (eval echo configure:13669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13669 then
13670   :
13671 else
13672   echo "configure: failed program was:" >&5
13673   cat conftest.$ac_ext >&5
13674   rm -fr conftest*
13675   ac_cv_header_stdc=no
13676 fi
13677 rm -fr conftest*
13678 fi
13679
13680 fi
13681 fi
13682
13683 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13684 if test $ac_cv_header_stdc = yes; then
13685   cat >> confdefs.h <<\EOF
13686 #define STDC_HEADERS 1
13687 EOF
13688
13689 fi
13690
13691 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13692 echo "configure:13693: checking for mode_t" >&5
13693 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13694   echo $ac_n "(cached) $ac_c" 1>&6
13695 else
13696   cat > conftest.$ac_ext <<EOF
13697 #line 13698 "configure"
13698 #include "confdefs.h"
13699 #include <sys/types.h>
13700 #if STDC_HEADERS
13701 #include <stdlib.h>
13702 #include <stddef.h>
13703 #endif
13704
13705 EOF
13706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13707   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13708   rm -rf conftest*
13709   eval "ac_cv_type_mode_t=yes"
13710 else
13711   rm -rf conftest*
13712   eval "ac_cv_type_mode_t=no"
13713 fi
13714 rm -f conftest*
13715
13716 fi
13717 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13718   echo "$ac_t""yes" 1>&6
13719 else
13720   echo "$ac_t""no" 1>&6
13721   cat >> confdefs.h <<EOF
13722 #define mode_t int
13723 EOF
13724
13725 fi
13726
13727 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13728 echo "configure:13729: checking for off_t" >&5
13729 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13730   echo $ac_n "(cached) $ac_c" 1>&6
13731 else
13732   cat > conftest.$ac_ext <<EOF
13733 #line 13734 "configure"
13734 #include "confdefs.h"
13735 #include <sys/types.h>
13736 #if STDC_HEADERS
13737 #include <stdlib.h>
13738 #include <stddef.h>
13739 #endif
13740
13741 EOF
13742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13743   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13744   rm -rf conftest*
13745   eval "ac_cv_type_off_t=yes"
13746 else
13747   rm -rf conftest*
13748   eval "ac_cv_type_off_t=no"
13749 fi
13750 rm -f conftest*
13751
13752 fi
13753 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13754   echo "$ac_t""yes" 1>&6
13755 else
13756   echo "$ac_t""no" 1>&6
13757   cat >> confdefs.h <<EOF
13758 #define off_t long
13759 EOF
13760
13761 fi
13762
13763 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13764 echo "configure:13765: checking for pid_t" >&5
13765 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13766   echo $ac_n "(cached) $ac_c" 1>&6
13767 else
13768   cat > conftest.$ac_ext <<EOF
13769 #line 13770 "configure"
13770 #include "confdefs.h"
13771 #include <sys/types.h>
13772 #if STDC_HEADERS
13773 #include <stdlib.h>
13774 #include <stddef.h>
13775 #endif
13776
13777 EOF
13778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13779   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13780   rm -rf conftest*
13781   eval "ac_cv_type_pid_t=yes"
13782 else
13783   rm -rf conftest*
13784   eval "ac_cv_type_pid_t=no"
13785 fi
13786 rm -f conftest*
13787
13788 fi
13789 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13790   echo "$ac_t""yes" 1>&6
13791 else
13792   echo "$ac_t""no" 1>&6
13793   cat >> confdefs.h <<EOF
13794 #define pid_t int
13795 EOF
13796
13797 fi
13798
13799 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13800 echo "configure:13801: checking for ptrdiff_t" >&5
13801 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13802   echo $ac_n "(cached) $ac_c" 1>&6
13803 else
13804   cat > conftest.$ac_ext <<EOF
13805 #line 13806 "configure"
13806 #include "confdefs.h"
13807 #include <stddef.h>
13808 int main() {
13809 ptrdiff_t p
13810 ; return 0; }
13811 EOF
13812 if { (eval echo configure:13813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13813   rm -rf conftest*
13814   am_cv_type_ptrdiff_t=yes
13815 else
13816   echo "configure: failed program was:" >&5
13817   cat conftest.$ac_ext >&5
13818   rm -rf conftest*
13819   am_cv_type_ptrdiff_t=no
13820 fi
13821 rm -f conftest*
13822 fi
13823
13824 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13825    if test $am_cv_type_ptrdiff_t = yes; then
13826      cat >> confdefs.h <<\EOF
13827 #define HAVE_PTRDIFF_T 1
13828 EOF
13829
13830    fi
13831
13832 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13833 echo "configure:13834: checking return type of signal handlers" >&5
13834 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13835   echo $ac_n "(cached) $ac_c" 1>&6
13836 else
13837   cat > conftest.$ac_ext <<EOF
13838 #line 13839 "configure"
13839 #include "confdefs.h"
13840 #include <sys/types.h>
13841 #include <signal.h>
13842 #ifdef signal
13843 #undef signal
13844 #endif
13845 #ifdef __cplusplus
13846 extern "C" void (*signal (int, void (*)(int)))(int);
13847 #else
13848 void (*signal ()) ();
13849 #endif
13850
13851 int main() {
13852 int i;
13853 ; return 0; }
13854 EOF
13855 if { (eval echo configure:13856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13856   rm -rf conftest*
13857   ac_cv_type_signal=void
13858 else
13859   echo "configure: failed program was:" >&5
13860   cat conftest.$ac_ext >&5
13861   rm -rf conftest*
13862   ac_cv_type_signal=int
13863 fi
13864 rm -f conftest*
13865 fi
13866
13867 echo "$ac_t""$ac_cv_type_signal" 1>&6
13868 cat >> confdefs.h <<EOF
13869 #define RETSIGTYPE $ac_cv_type_signal
13870 EOF
13871
13872
13873 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13874 echo "configure:13875: checking for size_t" >&5
13875 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13876   echo $ac_n "(cached) $ac_c" 1>&6
13877 else
13878   cat > conftest.$ac_ext <<EOF
13879 #line 13880 "configure"
13880 #include "confdefs.h"
13881 #include <sys/types.h>
13882 #if STDC_HEADERS
13883 #include <stdlib.h>
13884 #include <stddef.h>
13885 #endif
13886
13887 EOF
13888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13889   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13890   rm -rf conftest*
13891   eval "ac_cv_type_size_t=yes"
13892 else
13893   rm -rf conftest*
13894   eval "ac_cv_type_size_t=no"
13895 fi
13896 rm -f conftest*
13897
13898 fi
13899 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13900   echo "$ac_t""yes" 1>&6
13901 else
13902   echo "$ac_t""no" 1>&6
13903   cat >> confdefs.h <<EOF
13904 #define size_t unsigned
13905 EOF
13906
13907 fi
13908
13909
13910 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13911 echo "configure:13912: checking for ssize_t" >&5
13912 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13913   echo $ac_n "(cached) $ac_c" 1>&6
13914 else
13915   cat > conftest.$ac_ext <<EOF
13916 #line 13917 "configure"
13917 #include "confdefs.h"
13918 #include <sys/types.h>
13919 #if STDC_HEADERS
13920 #include <stdlib.h>
13921 #include <stddef.h>
13922 #endif
13923
13924 EOF
13925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13926   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13927   rm -rf conftest*
13928   eval "ac_cv_type_ssize_t=yes"
13929 else
13930   rm -rf conftest*
13931   eval "ac_cv_type_ssize_t=no"
13932 fi
13933 rm -f conftest*
13934
13935 fi
13936 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13937   echo "$ac_t""yes" 1>&6
13938 else
13939   echo "$ac_t""no" 1>&6
13940   cat >> confdefs.h <<EOF
13941 #define ssize_t signed int
13942 EOF
13943
13944 fi
13945
13946 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13947 echo "configure:13948: checking for caddr_t" >&5
13948 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13949   echo $ac_n "(cached) $ac_c" 1>&6
13950 else
13951   cat > conftest.$ac_ext <<EOF
13952 #line 13953 "configure"
13953 #include "confdefs.h"
13954 #include <sys/types.h>
13955 #if STDC_HEADERS
13956 #include <stdlib.h>
13957 #include <stddef.h>
13958 #endif
13959
13960 EOF
13961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13962   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13963   rm -rf conftest*
13964   eval "ac_cv_type_caddr_t=yes"
13965 else
13966   rm -rf conftest*
13967   eval "ac_cv_type_caddr_t=no"
13968 fi
13969 rm -f conftest*
13970
13971 fi
13972 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13973   echo "$ac_t""yes" 1>&6
13974 else
13975   echo "$ac_t""no" 1>&6
13976   cat >> confdefs.h <<EOF
13977 #define caddr_t char *
13978 EOF
13979
13980 fi
13981
13982
13983 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13984 echo "configure:13985: checking for socklen_t" >&5
13985 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13986   echo $ac_n "(cached) $ac_c" 1>&6
13987 else
13988   cat > conftest.$ac_ext <<EOF
13989 #line 13990 "configure"
13990 #include "confdefs.h"
13991
13992 #ifdef HAVE_SYS_TYPES_H
13993 #include <sys/types.h>
13994 #endif
13995 #ifdef HAVE_SYS_SOCKET_H
13996 #include <sys/socket.h>
13997 #endif
13998
13999 int main() {
14000 socklen_t len;
14001 ; return 0; }
14002 EOF
14003 if { (eval echo configure:14004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14004   rm -rf conftest*
14005   ol_cv_type_socklen_t=yes
14006 else
14007   echo "configure: failed program was:" >&5
14008   cat conftest.$ac_ext >&5
14009   rm -rf conftest*
14010   ol_cv_type_socklen_t=no
14011 fi
14012 rm -f conftest*
14013 fi
14014
14015 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14016   if test $ol_cv_type_socklen_t = no; then
14017     cat >> confdefs.h <<\EOF
14018 #define socklen_t int
14019 EOF
14020
14021   fi
14022  
14023 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14024 echo "configure:14025: checking for member st_blksize in aggregate type struct stat" >&5
14025 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14026   echo $ac_n "(cached) $ac_c" 1>&6
14027 else
14028   cat > conftest.$ac_ext <<EOF
14029 #line 14030 "configure"
14030 #include "confdefs.h"
14031 #include <sys/types.h>
14032 #include <sys/stat.h>
14033 int main() {
14034 struct stat foo; foo.st_blksize;
14035 ; return 0; }
14036 EOF
14037 if { (eval echo configure:14038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14038   rm -rf conftest*
14039   ac_cv_c_struct_member_st_blksize=yes
14040 else
14041   echo "configure: failed program was:" >&5
14042   cat conftest.$ac_ext >&5
14043   rm -rf conftest*
14044   ac_cv_c_struct_member_st_blksize=no
14045 fi
14046 rm -f conftest*
14047 fi
14048
14049 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14050 st_blksize="$ac_cv_c_struct_member_st_blksize"
14051 if test $ac_cv_c_struct_member_st_blksize = yes; then
14052   cat >> confdefs.h <<\EOF
14053 #define HAVE_ST_BLKSIZE 1
14054 EOF
14055
14056 fi
14057
14058 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14059 echo "configure:14060: checking whether time.h and sys/time.h may both be included" >&5
14060 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14061   echo $ac_n "(cached) $ac_c" 1>&6
14062 else
14063   cat > conftest.$ac_ext <<EOF
14064 #line 14065 "configure"
14065 #include "confdefs.h"
14066 #include <sys/types.h>
14067 #include <sys/time.h>
14068 #include <time.h>
14069 int main() {
14070 struct tm *tp;
14071 ; return 0; }
14072 EOF
14073 if { (eval echo configure:14074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14074   rm -rf conftest*
14075   ac_cv_header_time=yes
14076 else
14077   echo "configure: failed program was:" >&5
14078   cat conftest.$ac_ext >&5
14079   rm -rf conftest*
14080   ac_cv_header_time=no
14081 fi
14082 rm -f conftest*
14083 fi
14084
14085 echo "$ac_t""$ac_cv_header_time" 1>&6
14086 if test $ac_cv_header_time = yes; then
14087   cat >> confdefs.h <<\EOF
14088 #define TIME_WITH_SYS_TIME 1
14089 EOF
14090
14091 fi
14092
14093 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14094 echo "configure:14095: checking whether struct tm is in sys/time.h or time.h" >&5
14095 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14096   echo $ac_n "(cached) $ac_c" 1>&6
14097 else
14098   cat > conftest.$ac_ext <<EOF
14099 #line 14100 "configure"
14100 #include "confdefs.h"
14101 #include <sys/types.h>
14102 #include <time.h>
14103 int main() {
14104 struct tm *tp; tp->tm_sec;
14105 ; return 0; }
14106 EOF
14107 if { (eval echo configure:14108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14108   rm -rf conftest*
14109   ac_cv_struct_tm=time.h
14110 else
14111   echo "configure: failed program was:" >&5
14112   cat conftest.$ac_ext >&5
14113   rm -rf conftest*
14114   ac_cv_struct_tm=sys/time.h
14115 fi
14116 rm -f conftest*
14117 fi
14118
14119 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14120 if test $ac_cv_struct_tm = sys/time.h; then
14121   cat >> confdefs.h <<\EOF
14122 #define TM_IN_SYS_TIME 1
14123 EOF
14124
14125 fi
14126
14127 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14128 echo "configure:14129: checking for uid_t in sys/types.h" >&5
14129 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14130   echo $ac_n "(cached) $ac_c" 1>&6
14131 else
14132   cat > conftest.$ac_ext <<EOF
14133 #line 14134 "configure"
14134 #include "confdefs.h"
14135 #include <sys/types.h>
14136 EOF
14137 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14138   egrep "uid_t" >/dev/null 2>&1; then
14139   rm -rf conftest*
14140   ac_cv_type_uid_t=yes
14141 else
14142   rm -rf conftest*
14143   ac_cv_type_uid_t=no
14144 fi
14145 rm -f conftest*
14146
14147 fi
14148
14149 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14150 if test $ac_cv_type_uid_t = no; then
14151   cat >> confdefs.h <<\EOF
14152 #define uid_t int
14153 EOF
14154
14155   cat >> confdefs.h <<\EOF
14156 #define gid_t int
14157 EOF
14158
14159 fi
14160
14161 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14162 echo "configure:14163: checking for sig_atomic_t" >&5
14163 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14164   echo $ac_n "(cached) $ac_c" 1>&6
14165 else
14166   cat > conftest.$ac_ext <<EOF
14167 #line 14168 "configure"
14168 #include "confdefs.h"
14169 #include <signal.h>
14170 int main() {
14171 sig_atomic_t atomic;
14172 ; return 0; }
14173 EOF
14174 if { (eval echo configure:14175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14175   rm -rf conftest*
14176   ol_cv_type_sig_atomic_t=yes
14177 else
14178   echo "configure: failed program was:" >&5
14179   cat conftest.$ac_ext >&5
14180   rm -rf conftest*
14181   ol_cv_type_sig_atomic_t=no
14182 fi
14183 rm -f conftest*
14184 fi
14185
14186 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14187   if test $ol_cv_type_sig_atomic_t = no; then
14188     cat >> confdefs.h <<\EOF
14189 #define sig_atomic_t int
14190 EOF
14191
14192   fi
14193  
14194
14195
14196 # test for pw_gecos in struct passwd
14197 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14198 echo "configure:14199: checking struct passwd for pw_gecos" >&5
14199 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14200   echo $ac_n "(cached) $ac_c" 1>&6
14201 else
14202   
14203         cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 #include <pwd.h>
14207 int main() {
14208
14209         struct passwd pwd;
14210         pwd.pw_gecos = pwd.pw_name;
14211
14212 ; return 0; }
14213 EOF
14214 if { (eval echo configure:14215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14215   rm -rf conftest*
14216   ol_cv_struct_passwd_pw_gecos=yes
14217 else
14218   echo "configure: failed program was:" >&5
14219   cat conftest.$ac_ext >&5
14220   rm -rf conftest*
14221   ol_cv_struct_passwd_pw_gecos=no
14222 fi
14223 rm -f conftest*
14224 fi
14225
14226 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14227 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14228         cat >> confdefs.h <<\EOF
14229 #define HAVE_PW_GECOS 1
14230 EOF
14231
14232 fi
14233
14234 # test for pw_passwd in struct passwd
14235 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14236 echo "configure:14237: checking struct passwd for pw_passwd" >&5
14237 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14238   echo $ac_n "(cached) $ac_c" 1>&6
14239 else
14240   
14241         cat > conftest.$ac_ext <<EOF
14242 #line 14243 "configure"
14243 #include "confdefs.h"
14244 #include <pwd.h>
14245 int main() {
14246
14247         struct passwd pwd;
14248         pwd.pw_passwd = pwd.pw_name;
14249
14250 ; return 0; }
14251 EOF
14252 if { (eval echo configure:14253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14253   rm -rf conftest*
14254   ol_cv_struct_passwd_pw_passwd=yes
14255 else
14256   echo "configure: failed program was:" >&5
14257   cat conftest.$ac_ext >&5
14258   rm -rf conftest*
14259   ol_cv_struct_passwd_pw_passwd=no
14260 fi
14261 rm -f conftest*
14262 fi
14263
14264 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14265 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14266         cat >> confdefs.h <<\EOF
14267 #define HAVE_PW_PASSWD 1
14268 EOF
14269
14270 fi
14271
14272
14273 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14274 echo "configure:14275: checking if toupper() requires islower()" >&5
14275 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14276   echo $ac_n "(cached) $ac_c" 1>&6
14277 else
14278   
14279         if test "$cross_compiling" = yes; then
14280   ol_cv_c_upper_lower=safe
14281 else
14282   cat > conftest.$ac_ext <<EOF
14283 #line 14284 "configure"
14284 #include "confdefs.h"
14285
14286 #include <ctype.h>
14287 main()
14288 {
14289         if ('C' == toupper('C'))
14290                 exit(0);
14291         else
14292                 exit(1);
14293 }
14294 EOF
14295 if { (eval echo configure:14296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14296 then
14297   ol_cv_c_upper_lower=no
14298 else
14299   echo "configure: failed program was:" >&5
14300   cat conftest.$ac_ext >&5
14301   rm -fr conftest*
14302   ol_cv_c_upper_lower=yes
14303 fi
14304 rm -fr conftest*
14305 fi
14306
14307 fi
14308
14309 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14310 if test $ol_cv_c_upper_lower != no ; then
14311         cat >> confdefs.h <<\EOF
14312 #define C_UPPER_LOWER 1
14313 EOF
14314
14315 fi
14316
14317 echo $ac_n "checking for working const""... $ac_c" 1>&6
14318 echo "configure:14319: checking for working const" >&5
14319 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14320   echo $ac_n "(cached) $ac_c" 1>&6
14321 else
14322   cat > conftest.$ac_ext <<EOF
14323 #line 14324 "configure"
14324 #include "confdefs.h"
14325
14326 int main() {
14327
14328 /* Ultrix mips cc rejects this.  */
14329 typedef int charset[2]; const charset x;
14330 /* SunOS 4.1.1 cc rejects this.  */
14331 char const *const *ccp;
14332 char **p;
14333 /* NEC SVR4.0.2 mips cc rejects this.  */
14334 struct point {int x, y;};
14335 static struct point const zero = {0,0};
14336 /* AIX XL C 1.02.0.0 rejects this.
14337    It does not let you subtract one const X* pointer from another in an arm
14338    of an if-expression whose if-part is not a constant expression */
14339 const char *g = "string";
14340 ccp = &g + (g ? g-g : 0);
14341 /* HPUX 7.0 cc rejects these. */
14342 ++ccp;
14343 p = (char**) ccp;
14344 ccp = (char const *const *) p;
14345 { /* SCO 3.2v4 cc rejects this.  */
14346   char *t;
14347   char const *s = 0 ? (char *) 0 : (char const *) 0;
14348
14349   *t++ = 0;
14350 }
14351 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14352   int x[] = {25, 17};
14353   const int *foo = &x[0];
14354   ++foo;
14355 }
14356 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14357   typedef const int *iptr;
14358   iptr p = 0;
14359   ++p;
14360 }
14361 { /* AIX XL C 1.02.0.0 rejects this saying
14362      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14363   struct s { int j; const int *ap[3]; };
14364   struct s *b; b->j = 5;
14365 }
14366 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14367   const int foo = 10;
14368 }
14369
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   ac_cv_c_const=yes
14375 else
14376   echo "configure: failed program was:" >&5
14377   cat conftest.$ac_ext >&5
14378   rm -rf conftest*
14379   ac_cv_c_const=no
14380 fi
14381 rm -f conftest*
14382 fi
14383
14384 echo "$ac_t""$ac_cv_c_const" 1>&6
14385 if test $ac_cv_c_const = no; then
14386   cat >> confdefs.h <<\EOF
14387 #define const 
14388 EOF
14389
14390 fi
14391
14392 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14393 echo "configure:14394: checking if compiler understands volatile" >&5
14394 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14395   echo $ac_n "(cached) $ac_c" 1>&6
14396 else
14397   cat > conftest.$ac_ext <<EOF
14398 #line 14399 "configure"
14399 #include "confdefs.h"
14400 int x, y, z;
14401 int main() {
14402 volatile int a; int * volatile b = x ? &y : &z;
14403       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14404       *b = 0;
14405 ; return 0; }
14406 EOF
14407 if { (eval echo configure:14408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14408   rm -rf conftest*
14409   ol_cv_c_volatile=yes
14410 else
14411   echo "configure: failed program was:" >&5
14412   cat conftest.$ac_ext >&5
14413   rm -rf conftest*
14414   ol_cv_c_volatile=no
14415 fi
14416 rm -f conftest*
14417 fi
14418
14419 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14420   if test $ol_cv_c_volatile = yes; then
14421     : 
14422   else
14423     cat >> confdefs.h <<\EOF
14424 #define volatile 
14425 EOF
14426
14427   fi
14428  
14429
14430 if test $cross_compiling = yes ; then
14431         cat >> confdefs.h <<\EOF
14432 #define CROSS_COMPILING 1
14433 EOF
14434
14435 else
14436         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14437 echo "configure:14438: checking whether byte ordering is bigendian" >&5
14438 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14439   echo $ac_n "(cached) $ac_c" 1>&6
14440 else
14441   ac_cv_c_bigendian=unknown
14442 # See if sys/param.h defines the BYTE_ORDER macro.
14443 cat > conftest.$ac_ext <<EOF
14444 #line 14445 "configure"
14445 #include "confdefs.h"
14446 #include <sys/types.h>
14447 #include <sys/param.h>
14448 int main() {
14449
14450 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14451  bogus endian macros
14452 #endif
14453 ; return 0; }
14454 EOF
14455 if { (eval echo configure:14456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14456   rm -rf conftest*
14457   # It does; now see whether it defined to BIG_ENDIAN or not.
14458 cat > conftest.$ac_ext <<EOF
14459 #line 14460 "configure"
14460 #include "confdefs.h"
14461 #include <sys/types.h>
14462 #include <sys/param.h>
14463 int main() {
14464
14465 #if BYTE_ORDER != BIG_ENDIAN
14466  not big endian
14467 #endif
14468 ; return 0; }
14469 EOF
14470 if { (eval echo configure:14471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14471   rm -rf conftest*
14472   ac_cv_c_bigendian=yes
14473 else
14474   echo "configure: failed program was:" >&5
14475   cat conftest.$ac_ext >&5
14476   rm -rf conftest*
14477   ac_cv_c_bigendian=no
14478 fi
14479 rm -f conftest*
14480 else
14481   echo "configure: failed program was:" >&5
14482   cat conftest.$ac_ext >&5
14483 fi
14484 rm -f conftest*
14485 if test $ac_cv_c_bigendian = unknown; then
14486 if test "$cross_compiling" = yes; then
14487     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14488 else
14489   cat > conftest.$ac_ext <<EOF
14490 #line 14491 "configure"
14491 #include "confdefs.h"
14492 main () {
14493   /* Are we little or big endian?  From Harbison&Steele.  */
14494   union
14495   {
14496     long l;
14497     char c[sizeof (long)];
14498   } u;
14499   u.l = 1;
14500   exit (u.c[sizeof (long) - 1] == 1);
14501 }
14502 EOF
14503 if { (eval echo configure:14504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14504 then
14505   ac_cv_c_bigendian=no
14506 else
14507   echo "configure: failed program was:" >&5
14508   cat conftest.$ac_ext >&5
14509   rm -fr conftest*
14510   ac_cv_c_bigendian=yes
14511 fi
14512 rm -fr conftest*
14513 fi
14514
14515 fi
14516 fi
14517
14518 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14519 if test $ac_cv_c_bigendian = yes; then
14520   cat >> confdefs.h <<\EOF
14521 #define WORDS_BIGENDIAN 1
14522 EOF
14523
14524 fi
14525
14526 fi
14527
14528 echo $ac_n "checking size of short""... $ac_c" 1>&6
14529 echo "configure:14530: checking size of short" >&5 
14530 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14531   echo $ac_n "(cached) $ac_c" 1>&6
14532 else
14533   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14534   cat > conftest.$ac_ext <<EOF
14535 #line 14536 "configure"
14536 #include "confdefs.h"
14537 #include "confdefs.h" 
14538 #include <sys/types.h> 
14539  
14540
14541 int main() {
14542 switch (0) case 0: case (sizeof (short) == $ac_size):;
14543 ; return 0; }
14544 EOF
14545 if { (eval echo configure:14546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14546   rm -rf conftest*
14547   ac_cv_sizeof_short=$ac_size
14548 else
14549   echo "configure: failed program was:" >&5
14550   cat conftest.$ac_ext >&5
14551 fi
14552 rm -f conftest* 
14553   if test x$ac_cv_sizeof_short != x ; then break; fi 
14554 done 
14555
14556 fi
14557  
14558 if test x$ac_cv_sizeof_short = x ; then 
14559   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14560 fi 
14561 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14562 cat >> confdefs.h <<EOF
14563 #define SIZEOF_SHORT $ac_cv_sizeof_short
14564 EOF
14565  
14566  
14567 echo $ac_n "checking size of int""... $ac_c" 1>&6
14568 echo "configure:14569: checking size of int" >&5 
14569 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14570   echo $ac_n "(cached) $ac_c" 1>&6
14571 else
14572   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14573   cat > conftest.$ac_ext <<EOF
14574 #line 14575 "configure"
14575 #include "confdefs.h"
14576 #include "confdefs.h" 
14577 #include <sys/types.h> 
14578  
14579
14580 int main() {
14581 switch (0) case 0: case (sizeof (int) == $ac_size):;
14582 ; return 0; }
14583 EOF
14584 if { (eval echo configure:14585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14585   rm -rf conftest*
14586   ac_cv_sizeof_int=$ac_size
14587 else
14588   echo "configure: failed program was:" >&5
14589   cat conftest.$ac_ext >&5
14590 fi
14591 rm -f conftest* 
14592   if test x$ac_cv_sizeof_int != x ; then break; fi 
14593 done 
14594
14595 fi
14596  
14597 if test x$ac_cv_sizeof_int = x ; then 
14598   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14599 fi 
14600 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14601 cat >> confdefs.h <<EOF
14602 #define SIZEOF_INT $ac_cv_sizeof_int
14603 EOF
14604  
14605  
14606 echo $ac_n "checking size of long""... $ac_c" 1>&6
14607 echo "configure:14608: checking size of long" >&5 
14608 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14609   echo $ac_n "(cached) $ac_c" 1>&6
14610 else
14611   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14612   cat > conftest.$ac_ext <<EOF
14613 #line 14614 "configure"
14614 #include "confdefs.h"
14615 #include "confdefs.h" 
14616 #include <sys/types.h> 
14617  
14618
14619 int main() {
14620 switch (0) case 0: case (sizeof (long) == $ac_size):;
14621 ; return 0; }
14622 EOF
14623 if { (eval echo configure:14624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14624   rm -rf conftest*
14625   ac_cv_sizeof_long=$ac_size
14626 else
14627   echo "configure: failed program was:" >&5
14628   cat conftest.$ac_ext >&5
14629 fi
14630 rm -f conftest* 
14631   if test x$ac_cv_sizeof_long != x ; then break; fi 
14632 done 
14633
14634 fi
14635  
14636 if test x$ac_cv_sizeof_long = x ; then 
14637   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14638 fi 
14639 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14640 cat >> confdefs.h <<EOF
14641 #define SIZEOF_LONG $ac_cv_sizeof_long
14642 EOF
14643  
14644
14645
14646 if test "$ac_cv_sizeof_int" -lt 4 ; then
14647         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14648
14649         cat >> confdefs.h <<\EOF
14650 #define LBER_INT_T long
14651 EOF
14652
14653 else
14654         cat >> confdefs.h <<\EOF
14655 #define LBER_INT_T int
14656 EOF
14657
14658 fi
14659
14660 cat >> confdefs.h <<\EOF
14661 #define LBER_LEN_T long
14662 EOF
14663
14664 cat >> confdefs.h <<\EOF
14665 #define LBER_SOCKET_T int
14666 EOF
14667
14668 cat >> confdefs.h <<\EOF
14669 #define LBER_TAG_T long
14670 EOF
14671
14672
14673 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14674 echo "configure:14675: checking for 8-bit clean memcmp" >&5
14675 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14676   echo $ac_n "(cached) $ac_c" 1>&6
14677 else
14678   if test "$cross_compiling" = yes; then
14679   ac_cv_func_memcmp_clean=no
14680 else
14681   cat > conftest.$ac_ext <<EOF
14682 #line 14683 "configure"
14683 #include "confdefs.h"
14684
14685 main()
14686 {
14687   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14688   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14689 }
14690
14691 EOF
14692 if { (eval echo configure:14693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14693 then
14694   ac_cv_func_memcmp_clean=yes
14695 else
14696   echo "configure: failed program was:" >&5
14697   cat conftest.$ac_ext >&5
14698   rm -fr conftest*
14699   ac_cv_func_memcmp_clean=no
14700 fi
14701 rm -fr conftest*
14702 fi
14703
14704 fi
14705
14706 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14707 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14708
14709 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14710 echo "configure:14711: checking for strftime" >&5
14711 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14712   echo $ac_n "(cached) $ac_c" 1>&6
14713 else
14714   cat > conftest.$ac_ext <<EOF
14715 #line 14716 "configure"
14716 #include "confdefs.h"
14717 /* System header to define __stub macros and hopefully few prototypes,
14718     which can conflict with char strftime(); below.  */
14719 #include <assert.h>
14720 /* Override any gcc2 internal prototype to avoid an error.  */
14721 /* We use char because int might match the return type of a gcc2
14722     builtin and then its argument prototype would still apply.  */
14723 char strftime();
14724 char (*f)();
14725
14726 int main() {
14727
14728 /* The GNU C library defines this for functions which it implements
14729     to always fail with ENOSYS.  Some functions are actually named
14730     something starting with __ and the normal name is an alias.  */
14731 #if defined (__stub_strftime) || defined (__stub___strftime)
14732 choke me
14733 #else
14734 f = strftime;
14735 #endif
14736
14737 ; return 0; }
14738 EOF
14739 if { (eval echo configure:14740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14740   rm -rf conftest*
14741   eval "ac_cv_func_strftime=yes"
14742 else
14743   echo "configure: failed program was:" >&5
14744   cat conftest.$ac_ext >&5
14745   rm -rf conftest*
14746   eval "ac_cv_func_strftime=no"
14747 fi
14748 rm -f conftest*
14749 fi
14750
14751 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14752   echo "$ac_t""yes" 1>&6
14753   cat >> confdefs.h <<\EOF
14754 #define HAVE_STRFTIME 1
14755 EOF
14756
14757 else
14758   echo "$ac_t""no" 1>&6
14759 # strftime is in -lintl on SCO UNIX.
14760 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14761 echo "configure:14762: checking for strftime in -lintl" >&5
14762 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14764   echo $ac_n "(cached) $ac_c" 1>&6
14765 else
14766   ac_save_LIBS="$LIBS"
14767 LIBS="-lintl  $LIBS"
14768 cat > conftest.$ac_ext <<EOF
14769 #line 14770 "configure"
14770 #include "confdefs.h"
14771 /* Override any gcc2 internal prototype to avoid an error.  */
14772 /* We use char because int might match the return type of a gcc2
14773     builtin and then its argument prototype would still apply.  */
14774 char strftime();
14775
14776 int main() {
14777 strftime()
14778 ; return 0; }
14779 EOF
14780 if { (eval echo configure:14781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14781   rm -rf conftest*
14782   eval "ac_cv_lib_$ac_lib_var=yes"
14783 else
14784   echo "configure: failed program was:" >&5
14785   cat conftest.$ac_ext >&5
14786   rm -rf conftest*
14787   eval "ac_cv_lib_$ac_lib_var=no"
14788 fi
14789 rm -f conftest*
14790 LIBS="$ac_save_LIBS"
14791
14792 fi
14793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14794   echo "$ac_t""yes" 1>&6
14795   cat >> confdefs.h <<\EOF
14796 #define HAVE_STRFTIME 1
14797 EOF
14798
14799 LIBS="-lintl $LIBS"
14800 else
14801   echo "$ac_t""no" 1>&6
14802 fi
14803
14804 fi
14805
14806
14807 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14808 echo "configure:14809: checking for inet_aton()" >&5
14809 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14810   echo $ac_n "(cached) $ac_c" 1>&6
14811 else
14812   cat > conftest.$ac_ext <<EOF
14813 #line 14814 "configure"
14814 #include "confdefs.h"
14815
14816 #ifdef HAVE_SYS_TYPES_H
14817 #       include <sys/types.h>
14818 #endif
14819 #ifdef HAVE_SYS_SOCKET_H
14820 #       include <sys/socket.h>
14821 #       ifdef HAVE_SYS_SELECT_H
14822 #               include <sys/select.h>
14823 #       endif
14824 #       include <netinet/in.h>
14825 #       ifdef HAVE_ARPA_INET_H
14826 #               include <arpa/inet.h>
14827 #       endif
14828 #endif
14829
14830 int main() {
14831 struct in_addr in;
14832 int rc = inet_aton( "255.255.255.255", &in );
14833 ; return 0; }
14834 EOF
14835 if { (eval echo configure:14836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14836   rm -rf conftest*
14837   ol_cv_func_inet_aton=yes
14838 else
14839   echo "configure: failed program was:" >&5
14840   cat conftest.$ac_ext >&5
14841   rm -rf conftest*
14842   ol_cv_func_inet_aton=no
14843 fi
14844 rm -f conftest*
14845 fi
14846
14847 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14848   if test $ol_cv_func_inet_aton != no; then
14849     cat >> confdefs.h <<\EOF
14850 #define HAVE_INET_ATON 1
14851 EOF
14852
14853   fi
14854  
14855
14856 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14857 echo "configure:14858: checking for _spawnlp" >&5
14858 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14859   echo $ac_n "(cached) $ac_c" 1>&6
14860 else
14861   cat > conftest.$ac_ext <<EOF
14862 #line 14863 "configure"
14863 #include "confdefs.h"
14864 /* System header to define __stub macros and hopefully few prototypes,
14865     which can conflict with char _spawnlp(); below.  */
14866 #include <assert.h>
14867 /* Override any gcc2 internal prototype to avoid an error.  */
14868 /* We use char because int might match the return type of a gcc2
14869     builtin and then its argument prototype would still apply.  */
14870 char _spawnlp();
14871 char (*f)();
14872
14873 int main() {
14874
14875 /* The GNU C library defines this for functions which it implements
14876     to always fail with ENOSYS.  Some functions are actually named
14877     something starting with __ and the normal name is an alias.  */
14878 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14879 choke me
14880 #else
14881 f = _spawnlp;
14882 #endif
14883
14884 ; return 0; }
14885 EOF
14886 if { (eval echo configure:14887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14887   rm -rf conftest*
14888   eval "ac_cv_func__spawnlp=yes"
14889 else
14890   echo "configure: failed program was:" >&5
14891   cat conftest.$ac_ext >&5
14892   rm -rf conftest*
14893   eval "ac_cv_func__spawnlp=no"
14894 fi
14895 rm -f conftest*
14896 fi
14897
14898 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14899   echo "$ac_t""yes" 1>&6
14900   cat >> confdefs.h <<\EOF
14901 #define HAVE_SPAWNLP 1
14902 EOF
14903
14904 else
14905   echo "$ac_t""no" 1>&6
14906 fi
14907
14908
14909 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14910 echo "configure:14911: checking for _snprintf" >&5
14911 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14912   echo $ac_n "(cached) $ac_c" 1>&6
14913 else
14914   cat > conftest.$ac_ext <<EOF
14915 #line 14916 "configure"
14916 #include "confdefs.h"
14917 /* System header to define __stub macros and hopefully few prototypes,
14918     which can conflict with char _snprintf(); below.  */
14919 #include <assert.h>
14920 /* Override any gcc2 internal prototype to avoid an error.  */
14921 /* We use char because int might match the return type of a gcc2
14922     builtin and then its argument prototype would still apply.  */
14923 char _snprintf();
14924 char (*f)();
14925
14926 int main() {
14927
14928 /* The GNU C library defines this for functions which it implements
14929     to always fail with ENOSYS.  Some functions are actually named
14930     something starting with __ and the normal name is an alias.  */
14931 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14932 choke me
14933 #else
14934 f = _snprintf;
14935 #endif
14936
14937 ; return 0; }
14938 EOF
14939 if { (eval echo configure:14940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14940   rm -rf conftest*
14941   eval "ac_cv_func__snprintf=yes"
14942 else
14943   echo "configure: failed program was:" >&5
14944   cat conftest.$ac_ext >&5
14945   rm -rf conftest*
14946   eval "ac_cv_func__snprintf=no"
14947 fi
14948 rm -f conftest*
14949 fi
14950
14951 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14952   echo "$ac_t""yes" 1>&6
14953   ac_cv_func_snprintf=yes
14954         cat >> confdefs.h <<\EOF
14955 #define snprintf _snprintf
14956 EOF
14957
14958
14959 else
14960   echo "$ac_t""no" 1>&6
14961 fi
14962
14963
14964 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14965 echo "configure:14966: checking for _vsnprintf" >&5
14966 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14967   echo $ac_n "(cached) $ac_c" 1>&6
14968 else
14969   cat > conftest.$ac_ext <<EOF
14970 #line 14971 "configure"
14971 #include "confdefs.h"
14972 /* System header to define __stub macros and hopefully few prototypes,
14973     which can conflict with char _vsnprintf(); below.  */
14974 #include <assert.h>
14975 /* Override any gcc2 internal prototype to avoid an error.  */
14976 /* We use char because int might match the return type of a gcc2
14977     builtin and then its argument prototype would still apply.  */
14978 char _vsnprintf();
14979 char (*f)();
14980
14981 int main() {
14982
14983 /* The GNU C library defines this for functions which it implements
14984     to always fail with ENOSYS.  Some functions are actually named
14985     something starting with __ and the normal name is an alias.  */
14986 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14987 choke me
14988 #else
14989 f = _vsnprintf;
14990 #endif
14991
14992 ; return 0; }
14993 EOF
14994 if { (eval echo configure:14995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14995   rm -rf conftest*
14996   eval "ac_cv_func__vsnprintf=yes"
14997 else
14998   echo "configure: failed program was:" >&5
14999   cat conftest.$ac_ext >&5
15000   rm -rf conftest*
15001   eval "ac_cv_func__vsnprintf=no"
15002 fi
15003 rm -f conftest*
15004 fi
15005
15006 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15007   echo "$ac_t""yes" 1>&6
15008   ac_cv_func_vsnprintf=yes
15009         cat >> confdefs.h <<\EOF
15010 #define vsnprintf _vsnprintf
15011 EOF
15012
15013
15014 else
15015   echo "$ac_t""no" 1>&6
15016 fi
15017
15018
15019 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15020 echo "configure:15021: checking for vprintf" >&5
15021 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15022   echo $ac_n "(cached) $ac_c" 1>&6
15023 else
15024   cat > conftest.$ac_ext <<EOF
15025 #line 15026 "configure"
15026 #include "confdefs.h"
15027 /* System header to define __stub macros and hopefully few prototypes,
15028     which can conflict with char vprintf(); below.  */
15029 #include <assert.h>
15030 /* Override any gcc2 internal prototype to avoid an error.  */
15031 /* We use char because int might match the return type of a gcc2
15032     builtin and then its argument prototype would still apply.  */
15033 char vprintf();
15034 char (*f)();
15035
15036 int main() {
15037
15038 /* The GNU C library defines this for functions which it implements
15039     to always fail with ENOSYS.  Some functions are actually named
15040     something starting with __ and the normal name is an alias.  */
15041 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15042 choke me
15043 #else
15044 f = vprintf;
15045 #endif
15046
15047 ; return 0; }
15048 EOF
15049 if { (eval echo configure:15050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15050   rm -rf conftest*
15051   eval "ac_cv_func_vprintf=yes"
15052 else
15053   echo "configure: failed program was:" >&5
15054   cat conftest.$ac_ext >&5
15055   rm -rf conftest*
15056   eval "ac_cv_func_vprintf=no"
15057 fi
15058 rm -f conftest*
15059 fi
15060
15061 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15062   echo "$ac_t""yes" 1>&6
15063   cat >> confdefs.h <<\EOF
15064 #define HAVE_VPRINTF 1
15065 EOF
15066
15067 else
15068   echo "$ac_t""no" 1>&6
15069 fi
15070
15071 if test "$ac_cv_func_vprintf" != yes; then
15072 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15073 echo "configure:15074: checking for _doprnt" >&5
15074 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15075   echo $ac_n "(cached) $ac_c" 1>&6
15076 else
15077   cat > conftest.$ac_ext <<EOF
15078 #line 15079 "configure"
15079 #include "confdefs.h"
15080 /* System header to define __stub macros and hopefully few prototypes,
15081     which can conflict with char _doprnt(); below.  */
15082 #include <assert.h>
15083 /* Override any gcc2 internal prototype to avoid an error.  */
15084 /* We use char because int might match the return type of a gcc2
15085     builtin and then its argument prototype would still apply.  */
15086 char _doprnt();
15087 char (*f)();
15088
15089 int main() {
15090
15091 /* The GNU C library defines this for functions which it implements
15092     to always fail with ENOSYS.  Some functions are actually named
15093     something starting with __ and the normal name is an alias.  */
15094 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15095 choke me
15096 #else
15097 f = _doprnt;
15098 #endif
15099
15100 ; return 0; }
15101 EOF
15102 if { (eval echo configure:15103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15103   rm -rf conftest*
15104   eval "ac_cv_func__doprnt=yes"
15105 else
15106   echo "configure: failed program was:" >&5
15107   cat conftest.$ac_ext >&5
15108   rm -rf conftest*
15109   eval "ac_cv_func__doprnt=no"
15110 fi
15111 rm -f conftest*
15112 fi
15113
15114 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15115   echo "$ac_t""yes" 1>&6
15116   cat >> confdefs.h <<\EOF
15117 #define HAVE_DOPRNT 1
15118 EOF
15119
15120 else
15121   echo "$ac_t""no" 1>&6
15122 fi
15123
15124 fi
15125
15126
15127 if test $ac_cv_func_vprintf = yes ; then
15128                 for ac_func in vsnprintf vsprintf
15129 do
15130 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15131 echo "configure:15132: checking for $ac_func" >&5
15132 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15133   echo $ac_n "(cached) $ac_c" 1>&6
15134 else
15135   cat > conftest.$ac_ext <<EOF
15136 #line 15137 "configure"
15137 #include "confdefs.h"
15138 /* System header to define __stub macros and hopefully few prototypes,
15139     which can conflict with char $ac_func(); below.  */
15140 #include <assert.h>
15141 /* Override any gcc2 internal prototype to avoid an error.  */
15142 /* We use char because int might match the return type of a gcc2
15143     builtin and then its argument prototype would still apply.  */
15144 char $ac_func();
15145 char (*f)();
15146
15147 int main() {
15148
15149 /* The GNU C library defines this for functions which it implements
15150     to always fail with ENOSYS.  Some functions are actually named
15151     something starting with __ and the normal name is an alias.  */
15152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15153 choke me
15154 #else
15155 f = $ac_func;
15156 #endif
15157
15158 ; return 0; }
15159 EOF
15160 if { (eval echo configure:15161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15161   rm -rf conftest*
15162   eval "ac_cv_func_$ac_func=yes"
15163 else
15164   echo "configure: failed program was:" >&5
15165   cat conftest.$ac_ext >&5
15166   rm -rf conftest*
15167   eval "ac_cv_func_$ac_func=no"
15168 fi
15169 rm -f conftest*
15170 fi
15171
15172 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15173   echo "$ac_t""yes" 1>&6
15174     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15175   cat >> confdefs.h <<EOF
15176 #define $ac_tr_func 1
15177 EOF
15178  
15179 else
15180   echo "$ac_t""no" 1>&6
15181 fi
15182 done
15183
15184 fi
15185
15186 for ac_func in \
15187         bcopy                   \
15188         closesocket             \
15189         chroot                  \
15190         endgrent                \
15191         endpwent                \
15192         flock                   \
15193         getdtablesize   \
15194         getgrgid                \
15195         gethostname             \
15196         getpass                 \
15197         getpassphrase   \
15198         getpwuid                \
15199         getpwnam                \
15200         getspnam                \
15201         gettimeofday    \
15202         initgroups              \
15203         lockf                   \
15204         memcpy                  \
15205         memmove                 \
15206         mkstemp                 \
15207         pipe                    \
15208         read                    \
15209         recv                    \
15210         recvfrom                \
15211         setpwfile               \
15212         setgid                  \
15213         setegid                 \
15214         setsid                  \
15215         setuid                  \
15216         seteuid                 \
15217         sigaction               \
15218         signal                  \
15219         sigset                  \
15220         snprintf                \
15221         strdup                  \
15222         strerror                \
15223         strpbrk                 \
15224         strrchr                 \
15225         strsep                  \
15226         strstr                  \
15227         strtol                  \
15228         strtoul                 \
15229         strspn                  \
15230         sysconf                 \
15231         waitpid                 \
15232         wait4                   \
15233         write                   \
15234         send                    \
15235         sendto                  \
15236
15237 do
15238 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15239 echo "configure:15240: checking for $ac_func" >&5
15240 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15241   echo $ac_n "(cached) $ac_c" 1>&6
15242 else
15243   cat > conftest.$ac_ext <<EOF
15244 #line 15245 "configure"
15245 #include "confdefs.h"
15246 /* System header to define __stub macros and hopefully few prototypes,
15247     which can conflict with char $ac_func(); below.  */
15248 #include <assert.h>
15249 /* Override any gcc2 internal prototype to avoid an error.  */
15250 /* We use char because int might match the return type of a gcc2
15251     builtin and then its argument prototype would still apply.  */
15252 char $ac_func();
15253 char (*f)();
15254
15255 int main() {
15256
15257 /* The GNU C library defines this for functions which it implements
15258     to always fail with ENOSYS.  Some functions are actually named
15259     something starting with __ and the normal name is an alias.  */
15260 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15261 choke me
15262 #else
15263 f = $ac_func;
15264 #endif
15265
15266 ; return 0; }
15267 EOF
15268 if { (eval echo configure:15269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15269   rm -rf conftest*
15270   eval "ac_cv_func_$ac_func=yes"
15271 else
15272   echo "configure: failed program was:" >&5
15273   cat conftest.$ac_ext >&5
15274   rm -rf conftest*
15275   eval "ac_cv_func_$ac_func=no"
15276 fi
15277 rm -f conftest*
15278 fi
15279
15280 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15281   echo "$ac_t""yes" 1>&6
15282     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15283   cat >> confdefs.h <<EOF
15284 #define $ac_tr_func 1
15285 EOF
15286  
15287 else
15288   echo "$ac_t""no" 1>&6
15289 fi
15290 done
15291
15292
15293 for ac_func in getopt tempnam
15294 do
15295 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15296 echo "configure:15297: checking for $ac_func" >&5
15297 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15298   echo $ac_n "(cached) $ac_c" 1>&6
15299 else
15300   cat > conftest.$ac_ext <<EOF
15301 #line 15302 "configure"
15302 #include "confdefs.h"
15303 /* System header to define __stub macros and hopefully few prototypes,
15304     which can conflict with char $ac_func(); below.  */
15305 #include <assert.h>
15306 /* Override any gcc2 internal prototype to avoid an error.  */
15307 /* We use char because int might match the return type of a gcc2
15308     builtin and then its argument prototype would still apply.  */
15309 char $ac_func();
15310 char (*f)();
15311
15312 int main() {
15313
15314 /* The GNU C library defines this for functions which it implements
15315     to always fail with ENOSYS.  Some functions are actually named
15316     something starting with __ and the normal name is an alias.  */
15317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15318 choke me
15319 #else
15320 f = $ac_func;
15321 #endif
15322
15323 ; return 0; }
15324 EOF
15325 if { (eval echo configure:15326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15326   rm -rf conftest*
15327   eval "ac_cv_func_$ac_func=yes"
15328 else
15329   echo "configure: failed program was:" >&5
15330   cat conftest.$ac_ext >&5
15331   rm -rf conftest*
15332   eval "ac_cv_func_$ac_func=no"
15333 fi
15334 rm -f conftest*
15335 fi
15336
15337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15338   echo "$ac_t""yes" 1>&6
15339     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15340   cat >> confdefs.h <<EOF
15341 #define $ac_tr_func 1
15342 EOF
15343  
15344 else
15345   echo "$ac_t""no" 1>&6
15346 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15347 fi
15348 done
15349
15350
15351
15352 if test "$ac_cv_func_getopt" != yes; then
15353     LIBSRCS="$LIBSRCS getopt.c"
15354 fi
15355
15356 if test "$ac_cv_func_tempnam" != yes; then
15357     LIBSRCS="$LIBSRCS tempnam.c"
15358 fi
15359
15360 # Check Configuration
15361 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15362 echo "configure:15363: checking declaration of sys_errlist" >&5
15363 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15364   echo $ac_n "(cached) $ac_c" 1>&6
15365 else
15366   
15367         cat > conftest.$ac_ext <<EOF
15368 #line 15369 "configure"
15369 #include "confdefs.h"
15370
15371 #include <stdio.h>
15372 #include <sys/types.h>
15373 #include <errno.h>
15374 #ifdef WINNT
15375 #include <stdlib.h>
15376 #endif 
15377 int main() {
15378 char *c = (char *) *sys_errlist
15379 ; return 0; }
15380 EOF
15381 if { (eval echo configure:15382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15382   rm -rf conftest*
15383   ol_cv_dcl_sys_errlist=yes
15384         ol_cv_have_sys_errlist=yes
15385 else
15386   echo "configure: failed program was:" >&5
15387   cat conftest.$ac_ext >&5
15388   rm -rf conftest*
15389   ol_cv_dcl_sys_errlist=no
15390 fi
15391 rm -f conftest*
15392 fi
15393
15394 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15395 #
15396 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15397 if test $ol_cv_dcl_sys_errlist = no ; then
15398         cat >> confdefs.h <<\EOF
15399 #define DECL_SYS_ERRLIST 1
15400 EOF
15401
15402
15403         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15404 echo "configure:15405: checking existence of sys_errlist" >&5
15405 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15406   echo $ac_n "(cached) $ac_c" 1>&6
15407 else
15408   
15409                 cat > conftest.$ac_ext <<EOF
15410 #line 15411 "configure"
15411 #include "confdefs.h"
15412 #include <errno.h>
15413 int main() {
15414 char *c = (char *) *sys_errlist
15415 ; return 0; }
15416 EOF
15417 if { (eval echo configure:15418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15418   rm -rf conftest*
15419   ol_cv_have_sys_errlist=yes
15420 else
15421   echo "configure: failed program was:" >&5
15422   cat conftest.$ac_ext >&5
15423   rm -rf conftest*
15424   ol_cv_have_sys_errlist=no
15425 fi
15426 rm -f conftest*
15427 fi
15428
15429 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15430 fi
15431 if test $ol_cv_have_sys_errlist = yes ; then
15432         cat >> confdefs.h <<\EOF
15433 #define HAVE_SYS_ERRLIST 1
15434 EOF
15435
15436 fi
15437
15438
15439
15440 if test "$ol_enable_debug" != no ; then
15441         cat >> confdefs.h <<\EOF
15442 #define LDAP_DEBUG 1
15443 EOF
15444
15445 fi
15446 if test "$ol_enable_syslog" = yes ; then
15447         cat >> confdefs.h <<\EOF
15448 #define LDAP_SYSLOG 1
15449 EOF
15450
15451 fi
15452 if test "$ol_enable_libui" = yes ; then
15453         cat >> confdefs.h <<\EOF
15454 #define LDAP_LIBUI 1
15455 EOF
15456
15457 fi
15458 if test "$ol_enable_cache" = no ; then
15459         cat >> confdefs.h <<\EOF
15460 #define LDAP_NOCACHE 1
15461 EOF
15462
15463 fi
15464 if test "$ol_link_kbind" != no ; then
15465         cat >> confdefs.h <<\EOF
15466 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15467 EOF
15468
15469 fi
15470 if test "$ol_enable_proctitle" != no ; then
15471         cat >> confdefs.h <<\EOF
15472 #define LDAP_PROCTITLE 1
15473 EOF
15474
15475 fi
15476 if test "$ol_enable_referrals" != no ; then
15477         cat >> confdefs.h <<\EOF
15478 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15479 EOF
15480
15481 fi
15482 if test "$ol_enable_cldap" != no ; then
15483         cat >> confdefs.h <<\EOF
15484 #define LDAP_CONNECTIONLESS 1
15485 EOF
15486
15487 fi
15488 if test "$ol_enable_local" != no; then
15489         cat >> confdefs.h <<\EOF
15490 #define LDAP_PF_LOCAL 1
15491 EOF
15492
15493 fi
15494 if test "$ol_enable_ipv6" != no; then
15495         cat >> confdefs.h <<\EOF
15496 #define LDAP_PF_INET6 1
15497 EOF
15498
15499 fi
15500 if test "$ol_enable_cleartext" != no ; then
15501         cat >> confdefs.h <<\EOF
15502 #define SLAPD_CLEARTEXT 1
15503 EOF
15504
15505 fi
15506 if test "$ol_enable_crypt" != no ; then
15507         cat >> confdefs.h <<\EOF
15508 #define SLAPD_CRYPT 1
15509 EOF
15510
15511 fi
15512 if test "$ol_link_kpasswd" != no ; then
15513         cat >> confdefs.h <<\EOF
15514 #define SLAPD_KPASSWD 1
15515 EOF
15516
15517 fi
15518 if test "$ol_link_spasswd" != no ; then
15519         cat >> confdefs.h <<\EOF
15520 #define SLAPD_SPASSWD 1
15521 EOF
15522
15523 fi
15524 if test "$ol_enable_multimaster" != no ; then
15525         cat >> confdefs.h <<\EOF
15526 #define SLAPD_MULTIMASTER 1
15527 EOF
15528
15529 fi
15530 if test "$ol_enable_phonetic" != no ; then
15531         cat >> confdefs.h <<\EOF
15532 #define SLAPD_PHONETIC 1
15533 EOF
15534
15535 fi
15536 if test "$ol_enable_rlookups" != no ; then
15537         cat >> confdefs.h <<\EOF
15538 #define SLAPD_RLOOKUPS 1
15539 EOF
15540
15541 fi
15542 if test "$ol_enable_aci" != no ; then
15543         cat >> confdefs.h <<\EOF
15544 #define SLAPD_ACI_ENABLED 1
15545 EOF
15546
15547 fi
15548
15549 if test "$ol_link_modules" != no ; then
15550         cat >> confdefs.h <<\EOF
15551 #define SLAPD_MODULES 1
15552 EOF
15553
15554         BUILD_SLAPD=yes
15555         SLAPD_MODULES_LDFLAGS="-dlopen self"
15556 fi
15557
15558 if test "$ol_link_dnssrv" != no ; then
15559         cat >> confdefs.h <<\EOF
15560 #define SLAPD_DNSSRV 1
15561 EOF
15562
15563         BUILD_SLAPD=yes
15564         BUILD_DNSSRV=yes
15565         if test "$ol_with_dnssrv_module" != static ; then
15566                 cat >> confdefs.h <<\EOF
15567 #define SLAPD_DNSSRV_DYNAMIC 1
15568 EOF
15569
15570                 BUILD_DNSSRV=mod
15571                 BUILD_DNSSRV_DYNAMIC=shared
15572                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15573         fi
15574 fi
15575
15576 if test "$ol_enable_ldap" != no ; then
15577         cat >> confdefs.h <<\EOF
15578 #define SLAPD_LDAP 1
15579 EOF
15580
15581         BUILD_SLAPD=yes
15582         BUILD_LDAP=yes
15583         if test "$ol_with_ldap_module" != static ; then
15584                 cat >> confdefs.h <<\EOF
15585 #define SLAPD_LDAP_DYNAMIC 1
15586 EOF
15587
15588                 BUILD_LDAP=mod
15589                 BUILD_LDAP_DYNAMIC=shared
15590                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15591         fi
15592 fi
15593
15594 if test "$ol_link_ldbm" != no ; then
15595         cat >> confdefs.h <<\EOF
15596 #define SLAPD_LDBM 1
15597 EOF
15598
15599         BUILD_SLAPD=yes
15600         BUILD_LDBM=yes
15601         if test "$ol_with_ldbm_module" != static ; then
15602                 cat >> confdefs.h <<\EOF
15603 #define SLAPD_LDBM_DYNAMIC 1
15604 EOF
15605
15606                 BUILD_LDBM=mod
15607                 BUILD_LDBM_DYNAMIC=shared
15608                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15609         fi
15610 fi
15611
15612 if test "$ol_enable_passwd" != no ; then
15613         cat >> confdefs.h <<\EOF
15614 #define SLAPD_PASSWD 1
15615 EOF
15616
15617         BUILD_SLAPD=yes
15618         BUILD_PASSWD=yes
15619         if test "$ol_with_passwd_module" != static ; then
15620                 cat >> confdefs.h <<\EOF
15621 #define SLAPD_PASSWD_DYNAMIC 1
15622 EOF
15623
15624                 BUILD_PASSWD=mod
15625                 BUILD_PASSWD_DYNAMIC=shared
15626                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15627         fi
15628 fi
15629
15630 if test "$ol_enable_shell" != no ; then
15631         cat >> confdefs.h <<\EOF
15632 #define SLAPD_SHELL 1
15633 EOF
15634
15635         BUILD_SLAPD=yes
15636         BUILD_SHELL=yes
15637         if test "$ol_with_shell_module" != static ; then
15638                 cat >> confdefs.h <<\EOF
15639 #define SLAPD_SHELL_DYNAMIC 1
15640 EOF
15641
15642                 BUILD_SHELL=mod
15643                 BUILD_SHELL_DYNAMIC=shared
15644                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15645         fi
15646 fi
15647
15648 if test "$ol_enable_sql" != no ; then
15649         cat >> confdefs.h <<\EOF
15650 #define SLAPD_SQL 1
15651 EOF
15652
15653         BUILD_SLAPD=yes
15654         BUILD_SQL=yes
15655         SLAPD_SQL_LIBS=-liodbc
15656         if test "$ol_with_sql_module" != static; then
15657                 cat >> confdefs.h <<\EOF
15658 #define SLAPD_SQL_DYNAMIC 1
15659 EOF
15660
15661                 BUILD_SQL=mod
15662                 BUILD_SQL_DYNAMIC=shared
15663                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15664         fi
15665 fi
15666
15667 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15668         $BUILD_SLAPD = yes ; then
15669         BUILD_SLURPD=yes
15670 fi
15671
15672
15673 if test "$LINK_BINS_DYNAMIC" = yes; then
15674     LIB_LINKAGE=DYN
15675     LT_LIB_LINKAGE=shared
15676 else
15677     LIB_LINKAGE=STAT
15678     LT_LIB_LINKAGE=static
15679 fi
15680
15681 if test "$ac_cv_mingw32" = yes ; then
15682     PLAT=NT
15683     DYN_EXT=dll
15684 else
15685     PLAT=UNIX
15686     DYN_EXT=so
15687 fi
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697   
15698   
15699   
15700   
15701   
15702   
15703   
15704   
15705   
15706   
15707   
15708   
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739 trap '' 1 2 15
15740
15741 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15742
15743 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15744 # Let make expand exec_prefix.
15745 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15746
15747 # Any assignment to VPATH causes Sun make to only execute
15748 # the first set of double-colon rules, so remove it if not needed.
15749 # If there is a colon in the path, we need to keep it.
15750 if test "x$srcdir" = x.; then
15751   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15752 fi
15753
15754 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15755
15756 DEFS=-DHAVE_CONFIG_H
15757
15758 # Without the "./", some shells look in PATH for config.status.
15759 : ${CONFIG_STATUS=./config.status}
15760
15761 echo creating $CONFIG_STATUS
15762 rm -f $CONFIG_STATUS
15763 cat > $CONFIG_STATUS <<EOF
15764 #! /bin/sh
15765 # Generated automatically by configure.
15766 # Run this file to recreate the current configuration.
15767 # This directory was configured as follows,
15768 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15769 #
15770 # $0 $ac_configure_args
15771 #
15772 # Compiler output produced by configure, useful for debugging
15773 # configure, is in ./config.log if it exists.
15774
15775 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15776 for ac_option
15777 do
15778   case "\$ac_option" in
15779   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15780     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15781     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15782   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15783     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15784     exit 0 ;;
15785   -help | --help | --hel | --he | --h)
15786     echo "\$ac_cs_usage"; exit 0 ;;
15787   *) echo "\$ac_cs_usage"; exit 1 ;;
15788   esac
15789 done
15790
15791 ac_given_srcdir=$srcdir
15792 ac_given_INSTALL="$INSTALL"
15793
15794 trap 'rm -fr `echo "\
15795 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15796 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15797 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15798 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15799 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15800 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15801 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15802 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15803 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15804 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15805 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15806 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15807 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15808 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15809 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15810 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15811 include/Makefile:build/top.mk:include/Makefile.in \
15812 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15813 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15814 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15815 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15816 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15817 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15818 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15819 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15820 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15821 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15822 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15823 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15824 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15825 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15826 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15827 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15828 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15829 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15830 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15831 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15832 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15833 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15834 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15835 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15836 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15837  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15838 EOF
15839 cat >> $CONFIG_STATUS <<EOF
15840
15841 # Protect against being on the right side of a sed subst in config.status.
15842 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15843  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15844 $ac_vpsub
15845 $extrasub
15846 s%@SHELL@%$SHELL%g
15847 s%@CFLAGS@%$CFLAGS%g
15848 s%@CPPFLAGS@%$CPPFLAGS%g
15849 s%@CXXFLAGS@%$CXXFLAGS%g
15850 s%@FFLAGS@%$FFLAGS%g
15851 s%@DEFS@%$DEFS%g
15852 s%@LDFLAGS@%$LDFLAGS%g
15853 s%@LIBS@%$LIBS%g
15854 s%@exec_prefix@%$exec_prefix%g
15855 s%@prefix@%$prefix%g
15856 s%@program_transform_name@%$program_transform_name%g
15857 s%@bindir@%$bindir%g
15858 s%@sbindir@%$sbindir%g
15859 s%@libexecdir@%$libexecdir%g
15860 s%@datadir@%$datadir%g
15861 s%@sysconfdir@%$sysconfdir%g
15862 s%@sharedstatedir@%$sharedstatedir%g
15863 s%@localstatedir@%$localstatedir%g
15864 s%@libdir@%$libdir%g
15865 s%@includedir@%$includedir%g
15866 s%@oldincludedir@%$oldincludedir%g
15867 s%@infodir@%$infodir%g
15868 s%@mandir@%$mandir%g
15869 s%@host@%$host%g
15870 s%@host_alias@%$host_alias%g
15871 s%@host_cpu@%$host_cpu%g
15872 s%@host_vendor@%$host_vendor%g
15873 s%@host_os@%$host_os%g
15874 s%@target@%$target%g
15875 s%@target_alias@%$target_alias%g
15876 s%@target_cpu@%$target_cpu%g
15877 s%@target_vendor@%$target_vendor%g
15878 s%@target_os@%$target_os%g
15879 s%@build@%$build%g
15880 s%@build_alias@%$build_alias%g
15881 s%@build_cpu@%$build_cpu%g
15882 s%@build_vendor@%$build_vendor%g
15883 s%@build_os@%$build_os%g
15884 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15885 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15886 s%@INSTALL_DATA@%$INSTALL_DATA%g
15887 s%@PACKAGE@%$PACKAGE%g
15888 s%@VERSION@%$VERSION%g
15889 s%@ACLOCAL@%$ACLOCAL%g
15890 s%@AUTOCONF@%$AUTOCONF%g
15891 s%@AUTOMAKE@%$AUTOMAKE%g
15892 s%@AUTOHEADER@%$AUTOHEADER%g
15893 s%@MAKEINFO@%$MAKEINFO%g
15894 s%@install_sh@%$install_sh%g
15895 s%@AMTAR@%$AMTAR%g
15896 s%@AWK@%$AWK%g
15897 s%@AMTARFLAGS@%$AMTARFLAGS%g
15898 s%@SET_MAKE@%$SET_MAKE%g
15899 s%@top_builddir@%$top_builddir%g
15900 s%@ldap_subdir@%$ldap_subdir%g
15901 s%@CC@%$CC%g
15902 s%@RANLIB@%$RANLIB%g
15903 s%@LN_S@%$LN_S%g
15904 s%@DLLTOOL@%$DLLTOOL%g
15905 s%@AS@%$AS%g
15906 s%@OBJDUMP@%$OBJDUMP%g
15907 s%@LIBTOOL@%$LIBTOOL%g
15908 s%@LN_H@%$LN_H%g
15909 s%@SENDMAIL@%$SENDMAIL%g
15910 s%@EDITOR@%$EDITOR%g
15911 s%@FINGER@%$FINGER%g
15912 s%@CPP@%$CPP%g
15913 s%@EXEEXT@%$EXEEXT%g
15914 s%@OBJEXT@%$OBJEXT%g
15915 s%@OL_MKDEP@%$OL_MKDEP%g
15916 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15917 s%@LIBOBJS@%$LIBOBJS%g
15918 s%@LIBSRCS@%$LIBSRCS%g
15919 s%@PLAT@%$PLAT%g
15920 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15921 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15922 s%@DYN_EXT@%$DYN_EXT%g
15923 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15924 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
15925 s%@BUILD_LDAP@%$BUILD_LDAP%g
15926 s%@BUILD_LDBM@%$BUILD_LDBM%g
15927 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15928 s%@BUILD_SHELL@%$BUILD_SHELL%g
15929 s%@BUILD_SQL@%$BUILD_SQL%g
15930 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
15931 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15932 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15933 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15934 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15935 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
15936 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15937 s%@LDAP_LIBS@%$LDAP_LIBS%g
15938 s%@LDIF_LIBS@%$LDIF_LIBS%g
15939 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15940 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15941 s%@LDBM_LIBS@%$LDBM_LIBS%g
15942 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15943 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15944 s%@WRAP_LIBS@%$WRAP_LIBS%g
15945 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15946 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15947 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15948 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15949 s%@KRB4_LIBS@%$KRB4_LIBS%g
15950 s%@KRB5_LIBS@%$KRB5_LIBS%g
15951 s%@READLINE_LIBS@%$READLINE_LIBS%g
15952 s%@SASL_LIBS@%$SASL_LIBS%g
15953 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15954 s%@TLS_LIBS@%$TLS_LIBS%g
15955 s%@MODULES_LIBS@%$MODULES_LIBS%g
15956 s%@AUTH_LIBS@%$AUTH_LIBS%g
15957 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
15958 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
15959 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
15960
15961 CEOF
15962 EOF
15963
15964 cat >> $CONFIG_STATUS <<\EOF
15965
15966 # Split the substitutions into bite-sized pieces for seds with
15967 # small command number limits, like on Digital OSF/1 and HP-UX.
15968 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15969 ac_file=1 # Number of current file.
15970 ac_beg=1 # First line for current file.
15971 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15972 ac_more_lines=:
15973 ac_sed_cmds=""
15974 while $ac_more_lines; do
15975   if test $ac_beg -gt 1; then
15976     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15977   else
15978     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15979   fi
15980   if test ! -s conftest.s$ac_file; then
15981     ac_more_lines=false
15982     rm -f conftest.s$ac_file
15983   else
15984     if test -z "$ac_sed_cmds"; then
15985       ac_sed_cmds="sed -f conftest.s$ac_file"
15986     else
15987       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15988     fi
15989     ac_file=`expr $ac_file + 1`
15990     ac_beg=$ac_end
15991     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15992   fi
15993 done
15994 if test -z "$ac_sed_cmds"; then
15995   ac_sed_cmds=cat
15996 fi
15997 EOF
15998
15999 cat >> $CONFIG_STATUS <<EOF
16000
16001 CONFIG_FILES=\${CONFIG_FILES-"\
16002 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16003 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16004 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16005 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16006 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16007 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16008 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16009 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16010 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16011 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16012 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16013 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16014 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16015 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16016 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16017 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16018 include/Makefile:build/top.mk:include/Makefile.in \
16019 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16020 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16021 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16022 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16023 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16024 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16025 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16026 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16027 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16028 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16029 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16030 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16031 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16032 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16033 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16034 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16035 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16036 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16037 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16038 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16039 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16040 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16041 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16042 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16043 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16044 "}
16045 EOF
16046 cat >> $CONFIG_STATUS <<\EOF
16047 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16048   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16049   case "$ac_file" in
16050   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16051        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16052   *) ac_file_in="${ac_file}.in" ;;
16053   esac
16054
16055   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16056
16057   # Remove last slash and all that follows it.  Not all systems have dirname.
16058   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16059   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16060     # The file is in a subdirectory.
16061     test ! -d "$ac_dir" && mkdir "$ac_dir"
16062     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16063     # A "../" for each directory in $ac_dir_suffix.
16064     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16065   else
16066     ac_dir_suffix= ac_dots=
16067   fi
16068
16069   case "$ac_given_srcdir" in
16070   .)  srcdir=.
16071       if test -z "$ac_dots"; then top_srcdir=.
16072       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16073   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16074   *) # Relative path.
16075     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16076     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16077   esac
16078
16079   case "$ac_given_INSTALL" in
16080   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16081   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16082   esac
16083
16084   echo creating "$ac_file"
16085   rm -f "$ac_file"
16086   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16087   case "$ac_file" in
16088   *[Mm]akefile*) ac_comsub="1i\\
16089 # $configure_input" ;;
16090   *) ac_comsub= ;;
16091   esac
16092
16093   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16094   sed -e "$ac_comsub
16095 s%@configure_input@%$configure_input%g
16096 s%@srcdir@%$srcdir%g
16097 s%@top_srcdir@%$top_srcdir%g
16098 s%@INSTALL@%$INSTALL%g
16099 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16100 fi; done
16101 rm -f conftest.s*
16102
16103 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16104 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16105 #
16106 # ac_d sets the value in "#define NAME VALUE" lines.
16107 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16108 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16109 ac_dC='\3'
16110 ac_dD='%g'
16111 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16112 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16113 ac_uB='\([      ]\)%\1#\2define\3'
16114 ac_uC=' '
16115 ac_uD='\4%g'
16116 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16117 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16118 ac_eB='$%\1#\2define\3'
16119 ac_eC=' '
16120 ac_eD='%g'
16121
16122 if test "${CONFIG_HEADERS+set}" != set; then
16123 EOF
16124 cat >> $CONFIG_STATUS <<EOF
16125   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16126 EOF
16127 cat >> $CONFIG_STATUS <<\EOF
16128 fi
16129 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16130   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16131   case "$ac_file" in
16132   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16133        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16134   *) ac_file_in="${ac_file}.in" ;;
16135   esac
16136
16137   echo creating $ac_file
16138
16139   rm -f conftest.frag conftest.in conftest.out
16140   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16141   cat $ac_file_inputs > conftest.in
16142
16143 EOF
16144
16145 # Transform confdefs.h into a sed script conftest.vals that substitutes
16146 # the proper values into config.h.in to produce config.h.  And first:
16147 # Protect against being on the right side of a sed subst in config.status.
16148 # Protect against being in an unquoted here document in config.status.
16149 rm -f conftest.vals
16150 cat > conftest.hdr <<\EOF
16151 s/[\\&%]/\\&/g
16152 s%[\\$`]%\\&%g
16153 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16154 s%ac_d%ac_u%gp
16155 s%ac_u%ac_e%gp
16156 EOF
16157 sed -n -f conftest.hdr confdefs.h > conftest.vals
16158 rm -f conftest.hdr
16159
16160 # This sed command replaces #undef with comments.  This is necessary, for
16161 # example, in the case of _POSIX_SOURCE, which is predefined and required
16162 # on some systems where configure will not decide to define it.
16163 cat >> conftest.vals <<\EOF
16164 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16165 EOF
16166
16167 # Break up conftest.vals because some shells have a limit on
16168 # the size of here documents, and old seds have small limits too.
16169
16170 rm -f conftest.tail
16171 while :
16172 do
16173   ac_lines=`grep -c . conftest.vals`
16174   # grep -c gives empty output for an empty file on some AIX systems.
16175   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16176   # Write a limited-size here document to conftest.frag.
16177   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16178   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16179   echo 'CEOF
16180   sed -f conftest.frag conftest.in > conftest.out
16181   rm -f conftest.in
16182   mv conftest.out conftest.in
16183 ' >> $CONFIG_STATUS
16184   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16185   rm -f conftest.vals
16186   mv conftest.tail conftest.vals
16187 done
16188 rm -f conftest.vals
16189
16190 cat >> $CONFIG_STATUS <<\EOF
16191   rm -f conftest.frag conftest.h
16192   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16193   cat conftest.in >> conftest.h
16194   rm -f conftest.in
16195   if cmp -s $ac_file conftest.h 2>/dev/null; then
16196     echo "$ac_file is unchanged"
16197     rm -f conftest.h
16198   else
16199     # Remove last slash and all that follows it.  Not all systems have dirname.
16200       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16201       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16202       # The file is in a subdirectory.
16203       test ! -d "$ac_dir" && mkdir "$ac_dir"
16204     fi
16205     rm -f $ac_file
16206     mv conftest.h $ac_file
16207   fi
16208 fi; done
16209
16210 EOF
16211 cat >> $CONFIG_STATUS <<EOF
16212
16213 EOF
16214 cat >> $CONFIG_STATUS <<\EOF
16215
16216 date > stamp-h
16217 echo Please \"make depend\" to build dependencies
16218
16219 exit 0
16220 EOF
16221 chmod +x $CONFIG_STATUS
16222 rm -fr confdefs* $ac_clean_files
16223 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16224