]> git.sur5r.net Git - openldap/blob - configure
Import empty dn check
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP 
4
5 # Copyright 1998-2001 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2001 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching [yes]"
38 ac_help="$ac_help
39   --enable-referrals      enable V2 Referrals extension [yes]"
40 ac_help="$ac_help
41   --enable-kbind          enable V2 Kerberos IV bind [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-x-compile      enable cross compiling [no]"
48 ac_help="$ac_help
49   --with-cyrus-sasl       with Cyrus SASL support [auto]"
50 ac_help="$ac_help
51   --with-fetch            with fetch URL support [auto]"
52 ac_help="$ac_help
53   --with-kerberos         with support [auto]"
54 ac_help="$ac_help
55   --with-readline         with readline support [auto]"
56 ac_help="$ac_help
57   --with-threads          with threads [auto]"
58 ac_help="$ac_help
59   --with-tls              with TLS/SSL support [auto]"
60 ac_help="$ac_help
61   --with-yielding-select  with implicitly yielding select [auto]"
62 ac_help="$ac_help
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-cleartext    enable cleartext passwords [yes]"
68 ac_help="$ac_help
69     --enable-crypt        enable crypt(3) passwords [auto]"
70 ac_help="$ac_help
71     --enable-kpasswd      enable kerberos password verification [no]"
72 ac_help="$ac_help
73     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
74 ac_help="$ac_help
75     --enable-modules      enable dynamic module support [no]"
76 ac_help="$ac_help
77     --enable-phonetic     enable phonetic/soundex [no]"
78 ac_help="$ac_help
79     --enable-rlookups     enable reverse lookups [no]"
80 ac_help="$ac_help
81     --enable-aci          enable per-object ACIs [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
86 ac_help="$ac_help
87     --enable-dnssrv       enable dnssrv backend [no]"
88 ac_help="$ac_help
89     --with-dnssrv-module  module type [static]"
90 ac_help="$ac_help
91     --enable-ldap         enable ldap backend [no]"
92 ac_help="$ac_help
93     --with-ldap-module    module type [static]"
94 ac_help="$ac_help
95     --enable-ldbm         enable ldbm backend [yes]"
96 ac_help="$ac_help
97     --with-ldbm-api       with LDBM API [auto]"
98 ac_help="$ac_help
99     --with-ldbm-module    module type [static]"
100 ac_help="$ac_help
101     --with-ldbm-type      use LDBM type [auto]"
102 ac_help="$ac_help
103     --enable-passwd       enable passwd backend [no]"
104 ac_help="$ac_help
105     --with-passwd-module  module type [static]"
106 ac_help="$ac_help
107     --enable-shell        enable shell backend [no]"
108 ac_help="$ac_help
109     --with-shell-module   module type [static]"
110 ac_help="$ac_help
111     --enable-sql          enable sql backend [no]"
112 ac_help="$ac_help
113     --with-sql-module     module type [static]"
114 ac_help="$ac_help
115 SLURPD (Replication Daemon) Options:"
116 ac_help="$ac_help
117   --enable-slurpd         enable building slurpd [auto]"
118 ac_help="$ac_help
119 Library Generation & Linking Options"
120 ac_help="$ac_help
121   --enable-static[=PKGS]  build static libraries [default=yes]"
122 ac_help="$ac_help
123   --enable-shared[=PKGS]  build shared libraries [default=yes]"
124 ac_help="$ac_help
125   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
126 ac_help="$ac_help
127   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
128 ac_help="$ac_help
129   --disable-libtool-lock  avoid locking (might break parallel builds)"
130
131 # Initialize some variables set by options.
132 # The variables have the same names as the options, with
133 # dashes changed to underlines.
134 build=NONE
135 cache_file=./config.cache
136 exec_prefix=NONE
137 host=NONE
138 no_create=
139 nonopt=NONE
140 no_recursion=
141 prefix=NONE
142 program_prefix=NONE
143 program_suffix=NONE
144 program_transform_name=s,x,x,
145 silent=
146 site=
147 srcdir=
148 target=NONE
149 verbose=
150 x_includes=NONE
151 x_libraries=NONE
152 bindir='${exec_prefix}/bin'
153 sbindir='${exec_prefix}/sbin'
154 libexecdir='${exec_prefix}/libexec'
155 datadir='${prefix}/share'
156 sysconfdir='${prefix}/etc'
157 sharedstatedir='${prefix}/com'
158 localstatedir='${prefix}/var'
159 libdir='${exec_prefix}/lib'
160 includedir='${prefix}/include'
161 oldincludedir='/usr/include'
162 infodir='${prefix}/info'
163 mandir='${prefix}/man'
164
165 # Initialize some other variables.
166 subdirs=
167 MFLAGS= MAKEFLAGS=
168 SHELL=${CONFIG_SHELL-/bin/sh}
169 # Maximum number of lines to put in a shell here document.
170 ac_max_here_lines=12
171
172 ac_prev=
173 for ac_option
174 do
175
176   # If the previous option needs an argument, assign it.
177   if test -n "$ac_prev"; then
178     eval "$ac_prev=\$ac_option"
179     ac_prev=
180     continue
181   fi
182
183   case "$ac_option" in
184   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
185   *) ac_optarg= ;;
186   esac
187
188   # Accept the important Cygnus configure options, so we can diagnose typos.
189
190   case "$ac_option" in
191
192   -bindir | --bindir | --bindi | --bind | --bin | --bi)
193     ac_prev=bindir ;;
194   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
195     bindir="$ac_optarg" ;;
196
197   -build | --build | --buil | --bui | --bu)
198     ac_prev=build ;;
199   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
200     build="$ac_optarg" ;;
201
202   -cache-file | --cache-file | --cache-fil | --cache-fi \
203   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
204     ac_prev=cache_file ;;
205   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
206   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
207     cache_file="$ac_optarg" ;;
208
209   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
210     ac_prev=datadir ;;
211   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
212   | --da=*)
213     datadir="$ac_optarg" ;;
214
215   -disable-* | --disable-*)
216     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
217     # Reject names that are not valid shell variable names.
218     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
219       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
220     fi
221     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
222     eval "enable_${ac_feature}=no" ;;
223
224   -enable-* | --enable-*)
225     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
226     # Reject names that are not valid shell variable names.
227     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
228       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
229     fi
230     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
231     case "$ac_option" in
232       *=*) ;;
233       *) ac_optarg=yes ;;
234     esac
235     eval "enable_${ac_feature}='$ac_optarg'" ;;
236
237   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
238   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
239   | --exec | --exe | --ex)
240     ac_prev=exec_prefix ;;
241   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
242   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
243   | --exec=* | --exe=* | --ex=*)
244     exec_prefix="$ac_optarg" ;;
245
246   -gas | --gas | --ga | --g)
247     # Obsolete; use --with-gas.
248     with_gas=yes ;;
249
250   -help | --help | --hel | --he)
251     # Omit some internal or obsolete options to make the list less imposing.
252     # This message is too long to be a string in the A/UX 3.1 sh.
253     cat << EOF
254 Usage: configure [options] [host]
255 Options: [defaults in brackets after descriptions]
256 Configuration:
257   --cache-file=FILE       cache test results in FILE
258   --help                  print this message
259   --no-create             do not create output files
260   --quiet, --silent       do not print \`checking...' messages
261   --version               print the version of autoconf that created configure
262 Directory and file names:
263   --prefix=PREFIX         install architecture-independent files in PREFIX
264                           [$ac_default_prefix]
265   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
266                           [same as prefix]
267   --bindir=DIR            user executables in DIR [EPREFIX/bin]
268   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
269   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
270   --datadir=DIR           read-only architecture-independent data in DIR
271                           [PREFIX/share]
272   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
273   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
274                           [PREFIX/com]
275   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
276   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
277   --includedir=DIR        C header files in DIR [PREFIX/include]
278   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
279   --infodir=DIR           info documentation in DIR [PREFIX/info]
280   --mandir=DIR            man documentation in DIR [PREFIX/man]
281   --srcdir=DIR            find the sources in DIR [configure dir or ..]
282   --program-prefix=PREFIX prepend PREFIX to installed program names
283   --program-suffix=SUFFIX append SUFFIX to installed program names
284   --program-transform-name=PROGRAM
285                           run sed PROGRAM on installed program names
286 EOF
287     cat << EOF
288 Host type:
289   --build=BUILD           configure for building on BUILD [BUILD=HOST]
290   --host=HOST             configure for HOST [guessed]
291   --target=TARGET         configure for TARGET [TARGET=HOST]
292 Features and packages:
293   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
294   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
295   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
296   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
297   --x-includes=DIR        X include files are in DIR
298   --x-libraries=DIR       X library files are in DIR
299 EOF
300     if test -n "$ac_help"; then
301       echo "--enable and --with options recognized:$ac_help"
302     fi
303     exit 0 ;;
304
305   -host | --host | --hos | --ho)
306     ac_prev=host ;;
307   -host=* | --host=* | --hos=* | --ho=*)
308     host="$ac_optarg" ;;
309
310   -includedir | --includedir | --includedi | --included | --include \
311   | --includ | --inclu | --incl | --inc)
312     ac_prev=includedir ;;
313   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
314   | --includ=* | --inclu=* | --incl=* | --inc=*)
315     includedir="$ac_optarg" ;;
316
317   -infodir | --infodir | --infodi | --infod | --info | --inf)
318     ac_prev=infodir ;;
319   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
320     infodir="$ac_optarg" ;;
321
322   -libdir | --libdir | --libdi | --libd)
323     ac_prev=libdir ;;
324   -libdir=* | --libdir=* | --libdi=* | --libd=*)
325     libdir="$ac_optarg" ;;
326
327   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
328   | --libexe | --libex | --libe)
329     ac_prev=libexecdir ;;
330   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
331   | --libexe=* | --libex=* | --libe=*)
332     libexecdir="$ac_optarg" ;;
333
334   -localstatedir | --localstatedir | --localstatedi | --localstated \
335   | --localstate | --localstat | --localsta | --localst \
336   | --locals | --local | --loca | --loc | --lo)
337     ac_prev=localstatedir ;;
338   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
339   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
340   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
341     localstatedir="$ac_optarg" ;;
342
343   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
344     ac_prev=mandir ;;
345   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
346     mandir="$ac_optarg" ;;
347
348   -nfp | --nfp | --nf)
349     # Obsolete; use --without-fp.
350     with_fp=no ;;
351
352   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
353   | --no-cr | --no-c)
354     no_create=yes ;;
355
356   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
357   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
358     no_recursion=yes ;;
359
360   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
361   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
362   | --oldin | --oldi | --old | --ol | --o)
363     ac_prev=oldincludedir ;;
364   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
365   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
366   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
367     oldincludedir="$ac_optarg" ;;
368
369   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
370     ac_prev=prefix ;;
371   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
372     prefix="$ac_optarg" ;;
373
374   -program-prefix | --program-prefix | --program-prefi | --program-pref \
375   | --program-pre | --program-pr | --program-p)
376     ac_prev=program_prefix ;;
377   -program-prefix=* | --program-prefix=* | --program-prefi=* \
378   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
379     program_prefix="$ac_optarg" ;;
380
381   -program-suffix | --program-suffix | --program-suffi | --program-suff \
382   | --program-suf | --program-su | --program-s)
383     ac_prev=program_suffix ;;
384   -program-suffix=* | --program-suffix=* | --program-suffi=* \
385   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
386     program_suffix="$ac_optarg" ;;
387
388   -program-transform-name | --program-transform-name \
389   | --program-transform-nam | --program-transform-na \
390   | --program-transform-n | --program-transform- \
391   | --program-transform | --program-transfor \
392   | --program-transfo | --program-transf \
393   | --program-trans | --program-tran \
394   | --progr-tra | --program-tr | --program-t)
395     ac_prev=program_transform_name ;;
396   -program-transform-name=* | --program-transform-name=* \
397   | --program-transform-nam=* | --program-transform-na=* \
398   | --program-transform-n=* | --program-transform-=* \
399   | --program-transform=* | --program-transfor=* \
400   | --program-transfo=* | --program-transf=* \
401   | --program-trans=* | --program-tran=* \
402   | --progr-tra=* | --program-tr=* | --program-t=*)
403     program_transform_name="$ac_optarg" ;;
404
405   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
406   | -silent | --silent | --silen | --sile | --sil)
407     silent=yes ;;
408
409   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
410     ac_prev=sbindir ;;
411   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
412   | --sbi=* | --sb=*)
413     sbindir="$ac_optarg" ;;
414
415   -sharedstatedir | --sharedstatedir | --sharedstatedi \
416   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
417   | --sharedst | --shareds | --shared | --share | --shar \
418   | --sha | --sh)
419     ac_prev=sharedstatedir ;;
420   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
421   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
422   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
423   | --sha=* | --sh=*)
424     sharedstatedir="$ac_optarg" ;;
425
426   -site | --site | --sit)
427     ac_prev=site ;;
428   -site=* | --site=* | --sit=*)
429     site="$ac_optarg" ;;
430
431   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
432     ac_prev=srcdir ;;
433   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
434     srcdir="$ac_optarg" ;;
435
436   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
437   | --syscon | --sysco | --sysc | --sys | --sy)
438     ac_prev=sysconfdir ;;
439   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
440   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
441     sysconfdir="$ac_optarg" ;;
442
443   -target | --target | --targe | --targ | --tar | --ta | --t)
444     ac_prev=target ;;
445   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
446     target="$ac_optarg" ;;
447
448   -v | -verbose | --verbose | --verbos | --verbo | --verb)
449     verbose=yes ;;
450
451   -version | --version | --versio | --versi | --vers)
452     echo "configure generated by autoconf version 2.13.1"
453     exit 0 ;;
454
455   -with-* | --with-*)
456     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
457     # Reject names that are not valid shell variable names.
458     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
459       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
460     fi
461     ac_package=`echo $ac_package| sed 's/-/_/g'`
462     case "$ac_option" in
463       *=*) ;;
464       *) ac_optarg=yes ;;
465     esac
466     eval "with_${ac_package}='$ac_optarg'" ;;
467
468   -without-* | --without-*)
469     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
470     # Reject names that are not valid shell variable names.
471     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
472       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
473     fi
474     ac_package=`echo $ac_package| sed 's/-/_/g'`
475     eval "with_${ac_package}=no" ;;
476
477   --x)
478     # Obsolete; use --with-x.
479     with_x=yes ;;
480
481   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
482   | --x-incl | --x-inc | --x-in | --x-i)
483     ac_prev=x_includes ;;
484   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
485   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
486     x_includes="$ac_optarg" ;;
487
488   -x-libraries | --x-libraries | --x-librarie | --x-librari \
489   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
490     ac_prev=x_libraries ;;
491   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
492   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
493     x_libraries="$ac_optarg" ;;
494
495   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
496     ;;
497
498   *)
499     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
500       echo "configure: warning: $ac_option: invalid host type" 1>&2
501     fi
502     if test "x$nonopt" != xNONE; then
503       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
504     fi
505     nonopt="$ac_option"
506     ;;
507
508   esac
509 done
510
511 if test -n "$ac_prev"; then
512   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
513 fi
514
515 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
516
517 # File descriptor usage:
518 # 0 standard input
519 # 1 file creation
520 # 2 errors and warnings
521 # 3 some systems may open it to /dev/tty
522 # 4 used on the Kubota Titan
523 # 6 checking for... messages and results
524 # 5 compiler messages saved in config.log
525 if test "$silent" = yes; then
526   exec 6>/dev/null
527 else
528   exec 6>&1
529 fi
530 exec 5>./config.log
531
532 echo "\
533 This file contains any messages produced by compilers while
534 running configure, to aid debugging if configure makes a mistake.
535 " 1>&5
536
537 # Strip out --no-create and --no-recursion so they do not pile up.
538 # Also quote any args containing shell metacharacters.
539 ac_configure_args=
540 for ac_arg
541 do
542   case "$ac_arg" in
543   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
544   | --no-cr | --no-c) ;;
545   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
546   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
547   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
548   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
549   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
550   esac
551 done
552
553 # NLS nuisances.
554 # Only set these to C if already set.  These must not be set unconditionally
555 # because not all systems understand e.g. LANG=C (notably SCO).
556 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
557 # Non-C LC_CTYPE values break the ctype check.
558 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
559 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
560 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
561 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
562
563 # confdefs.h avoids OS command line length limits that DEFS can exceed.
564 rm -rf conftest* confdefs.h
565 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
566 echo > confdefs.h
567
568 # A filename unique to this package, relative to the directory that
569 # configure is in, which we can look for to find out if srcdir is correct.
570 ac_unique_file=build/version
571
572 # Find the source files, if location was not specified.
573 if test -z "$srcdir"; then
574   ac_srcdir_defaulted=yes
575   # Try the directory containing this script, then its parent.
576   ac_prog=$0
577   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
578   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
579   srcdir=$ac_confdir
580   if test ! -r $srcdir/$ac_unique_file; then
581     srcdir=..
582   fi
583 else
584   ac_srcdir_defaulted=no
585 fi
586 if test ! -r $srcdir/$ac_unique_file; then
587   if test "$ac_srcdir_defaulted" = yes; then
588     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
589   else
590     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
591   fi
592 fi
593 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
594
595 # Prefer explicitly selected file to automatically selected ones.
596 if test -z "$CONFIG_SITE"; then
597   if test "x$prefix" != xNONE; then
598     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
599   else
600     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
601   fi
602 fi
603 for ac_site_file in $CONFIG_SITE; do
604   if test -r "$ac_site_file"; then
605     echo "loading site script $ac_site_file"
606     . "$ac_site_file"
607   fi
608 done
609
610
611 ac_ext=c
612 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
613 ac_cpp='$CPP $CPPFLAGS'
614 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
615 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
616 cross_compiling=$ac_cv_prog_cc_cross
617
618 ac_exeext=
619 ac_objext=o
620 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
621   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
622   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
623     ac_n= ac_c='
624 ' ac_t='        '
625   else
626     ac_n=-n ac_c= ac_t=
627   fi
628 else
629   ac_n= ac_c='\c' ac_t=
630 fi
631
632
633 # set unset (borrowed from autoconf 2.49c)
634 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
635   ol_unset=unset
636 else
637   ol_unset=false
638 fi
639 # unset CDPATH
640 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
641
642 ac_aux_dir=
643 for ac_dir in build $srcdir/build; do
644   if test -f $ac_dir/install-sh; then
645     ac_aux_dir=$ac_dir
646     ac_install_sh="$ac_aux_dir/install-sh -c"
647     break
648   elif test -f $ac_dir/install.sh; then
649     ac_aux_dir=$ac_dir
650     ac_install_sh="$ac_aux_dir/install.sh -c"
651     break
652   elif test -f $ac_dir/shtool; then
653     ac_aux_dir=$ac_dir
654     ac_install_sh="$ac_aux_dir/shtool install -c"
655     break
656   fi
657 done
658 if test -z "$ac_aux_dir"; then
659   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
660 fi
661 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
662 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
663 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
664
665 OL_VERSION=`cat $ac_aux_dir/version`
666 if test -z "$OL_VERSION"; then
667         { echo "configure: error: could not determine version" 1>&2; exit 1; }
668 fi
669
670 echo "Configuring OpenLDAP $OL_VERSION ..."
671
672
673 echo $ac_n "checking host system type""... $ac_c" 1>&6
674 echo "configure:675: checking host system type" >&5
675 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
676
677 # Make sure we can run config.sub.
678   if $ac_config_sub sun4 >/dev/null 2>&1; then :
679     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
680   fi
681
682   ac_cv_host_alias=$host
683   case "$ac_cv_host_alias" in
684   NONE)
685     case $nonopt in
686     NONE)
687       if ac_cv_host_alias=`$ac_config_guess`; then :
688       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
689       fi ;;
690     *) ac_cv_host_alias=$nonopt ;;
691     esac ;;
692   esac
693
694   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
695   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
696   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
697   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
698 else
699   echo $ac_n "(cached) $ac_c" 1>&6
700 fi
701
702 echo "$ac_t""$ac_cv_host" 1>&6
703
704 host=$ac_cv_host
705 host_alias=$ac_cv_host_alias
706 host_cpu=$ac_cv_host_cpu
707 host_vendor=$ac_cv_host_vendor
708 host_os=$ac_cv_host_os
709
710
711
712
713
714 echo $ac_n "checking target system type""... $ac_c" 1>&6
715 echo "configure:716: checking target system type" >&5
716 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
717
718 # Make sure we can run config.sub.
719   if $ac_config_sub sun4 >/dev/null 2>&1; then :
720     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
721   fi
722
723   ac_cv_target_alias=$target
724   case "$ac_cv_target_alias" in
725   NONE)
726     case $nonopt in
727     NONE)
728       ac_cv_target_alias=$host_alias ;;
729
730     *) ac_cv_target_alias=$nonopt ;;
731     esac ;;
732   esac
733
734   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
735   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
736   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
737   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
738 else
739   echo $ac_n "(cached) $ac_c" 1>&6
740 fi
741
742 echo "$ac_t""$ac_cv_target" 1>&6
743
744 target=$ac_cv_target
745 target_alias=$ac_cv_target_alias
746 target_cpu=$ac_cv_target_cpu
747 target_vendor=$ac_cv_target_vendor
748 target_os=$ac_cv_target_os
749
750
751
752
753
754 echo $ac_n "checking build system type""... $ac_c" 1>&6
755 echo "configure:756: checking build system type" >&5
756 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
757
758 # Make sure we can run config.sub.
759   if $ac_config_sub sun4 >/dev/null 2>&1; then :
760     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
761   fi
762
763   ac_cv_build_alias=$build
764   case "$ac_cv_build_alias" in
765   NONE)
766     case $nonopt in
767     NONE)
768       ac_cv_build_alias=$host_alias ;;
769
770     *) ac_cv_build_alias=$nonopt ;;
771     esac ;;
772   esac
773
774   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
775   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
776   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
777   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
778 else
779   echo $ac_n "(cached) $ac_c" 1>&6
780 fi
781
782 echo "$ac_t""$ac_cv_build" 1>&6
783
784 build=$ac_cv_build
785 build_alias=$ac_cv_build_alias
786 build_cpu=$ac_cv_build_cpu
787 build_vendor=$ac_cv_build_vendor
788 build_os=$ac_cv_build_os
789
790
791
792
793
794 # Do some error checking and defaulting for the host and target type.
795 # The inputs are:
796 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
797 #
798 # The rules are:
799 # 1. You are not allowed to specify --host, --target, and nonopt at the
800 #    same time.
801 # 2. Host defaults to nonopt.
802 # 3. If nonopt is not specified, then host defaults to the current host,
803 #    as determined by config.guess.
804 # 4. Target and build default to nonopt.
805 # 5. If nonopt is not specified, then target and build default to host.
806
807 # The aliases save the names the user supplied, while $host etc.
808 # will get canonicalized.
809 case $host---$target---$nonopt in
810 NONE---*---* | *---NONE---* | *---*---NONE) ;;
811 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
812 esac
813
814 test "$host_alias" != "$target_alias" &&
815   test "$program_prefix$program_suffix$program_transform_name" = \
816     NONENONEs,x,x, &&
817   program_prefix=${target_alias}-
818
819
820 # Find a good install program.  We prefer a C program (faster),
821 # so one script is as good as another.  But avoid the broken or
822 # incompatible versions:
823 # SysV /etc/install, /usr/sbin/install
824 # SunOS /usr/etc/install
825 # IRIX /sbin/install
826 # AIX /bin/install
827 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
828 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
829 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
830 # ./install, which can be erroneously created by make from ./install.sh.
831 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
832 echo "configure:833: checking for a BSD compatible install" >&5
833 if test -z "$INSTALL"; then
834 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
835   echo $ac_n "(cached) $ac_c" 1>&6
836 else
837     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
838   for ac_dir in $PATH; do
839     # Account for people who put trailing slashes in PATH elements.
840     case "$ac_dir/" in
841     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
842     *)
843       # OSF1 and SCO ODT 3.0 have their own names for install.
844       # Don't use installbsd from OSF since it installs stuff as root
845       # by default.
846       for ac_prog in ginstall scoinst install; do
847         if test -f $ac_dir/$ac_prog; then
848           if test $ac_prog = install &&
849             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
850             # AIX install.  It has an incompatible calling convention.
851             :
852           elif test $ac_prog = install &&
853             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
854             # program-specific install script used by HP pwplus--don't use.
855             :
856           else
857             ac_cv_path_install="$ac_dir/$ac_prog -c"
858             break 2
859           fi
860         fi
861       done
862       ;;
863     esac
864   done
865   IFS="$ac_save_IFS"
866
867 fi
868   if test "${ac_cv_path_install+set}" = set; then
869     INSTALL="$ac_cv_path_install"
870   else
871     # As a last resort, use the slow shell script.  We don't cache a
872     # path for INSTALL within a source directory, because that will
873     # break other packages using the cache if that directory is
874     # removed, or if the path is relative.
875     INSTALL="$ac_install_sh"
876   fi
877 fi
878 echo "$ac_t""$INSTALL" 1>&6
879
880 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
881 # It thinks the first close brace ends the variable substitution.
882 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
883
884 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
885
886 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
887
888 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
889 echo "configure:890: checking whether build environment is sane" >&5
890 # Just in case
891 sleep 1
892 echo timestamp > conftestfile
893 # Do `set' in a subshell so we don't clobber the current shell's
894 # arguments.  Must try -L first in case configure is actually a
895 # symlink; some systems play weird games with the mod time of symlinks
896 # (eg FreeBSD returns the mod time of the symlink's containing
897 # directory).
898 if (
899    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
900    if test "$*" = "X"; then
901       # -L didn't work.
902       set X `ls -t $srcdir/configure conftestfile`
903    fi
904    if test "$*" != "X $srcdir/configure conftestfile" \
905       && test "$*" != "X conftestfile $srcdir/configure"; then
906
907       # If neither matched, then we have a broken ls.  This can happen
908       # if, for instance, CONFIG_SHELL is bash and it inherits a
909       # broken ls alias from the environment.  This has actually
910       # happened.  Such a system could not be considered "sane".
911       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
912 alias in your environment" 1>&2; exit 1; }
913    fi
914
915    test "$2" = conftestfile
916    )
917 then
918    # Ok.
919    :
920 else
921    { echo "configure: error: newly created file is older than distributed files!
922 Check your system clock" 1>&2; exit 1; }
923 fi
924 rm -f conftest*
925 echo "$ac_t""yes" 1>&6
926 if test "$program_transform_name" = s,x,x,; then
927   program_transform_name=
928 else
929   # Double any \ or $.  echo might interpret backslashes.
930   cat <<\EOF_SED > conftestsed
931 s,\\,\\\\,g; s,\$,$$,g
932 EOF_SED
933   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
934   rm -f conftestsed
935 fi
936 test "$program_prefix" != NONE &&
937   program_transform_name="s,^,${program_prefix},;$program_transform_name"
938 # Use a double $ so make ignores it.
939 test "$program_suffix" != NONE &&
940   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
941
942 # sed with no file args requires a program.
943 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
944
945 for ac_prog in mawk gawk nawk awk
946 do
947 # Extract the first word of "$ac_prog", so it can be a program name with args.
948 set dummy $ac_prog; ac_word=$2
949 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
950 echo "configure:951: checking for $ac_word" >&5
951 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
952   echo $ac_n "(cached) $ac_c" 1>&6
953 else
954   if test -n "$AWK"; then
955   ac_cv_prog_AWK="$AWK" # Let the user override the test.
956 else
957   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
958   ac_dummy="$PATH"
959   for ac_dir in $ac_dummy; do
960     test -z "$ac_dir" && ac_dir=.
961     if test -f $ac_dir/$ac_word; then
962       ac_cv_prog_AWK="$ac_prog"
963       break
964     fi
965   done
966   IFS="$ac_save_ifs"
967 fi
968 fi
969 AWK="$ac_cv_prog_AWK"
970 if test -n "$AWK"; then
971   echo "$ac_t""$AWK" 1>&6
972 else
973   echo "$ac_t""no" 1>&6
974 fi
975
976 test -n "$AWK" && break
977 done
978
979 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
980 echo "configure:981: checking whether ${MAKE-make} sets \${MAKE}" >&5
981 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
982 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
983   echo $ac_n "(cached) $ac_c" 1>&6
984 else
985   cat > conftestmake <<\EOF
986 all:
987         @echo 'ac_maketemp="${MAKE}"'
988 EOF
989 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
990 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
991 if test -n "$ac_maketemp"; then
992   eval ac_cv_prog_make_${ac_make}_set=yes
993 else
994   eval ac_cv_prog_make_${ac_make}_set=no
995 fi
996 rm -f conftestmake
997 fi
998 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
999   echo "$ac_t""yes" 1>&6
1000   SET_MAKE=
1001 else
1002   echo "$ac_t""no" 1>&6
1003   SET_MAKE="MAKE=${MAKE-make}"
1004 fi
1005
1006
1007
1008 PACKAGE=OpenLDAP
1009
1010 VERSION=$OL_VERSION
1011
1012 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1013   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1014 fi
1015
1016
1017
1018 missing_dir=`cd $ac_aux_dir && pwd`
1019 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1020 echo "configure:1021: checking for working aclocal" >&5
1021 # Run test in a subshell; some versions of sh will print an error if
1022 # an executable is not found, even if stderr is redirected.
1023 # Redirect stdin to placate older versions of autoconf.  Sigh.
1024 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1025    ACLOCAL=aclocal
1026    echo "$ac_t""found" 1>&6
1027 else
1028    ACLOCAL="$missing_dir/missing aclocal"
1029    echo "$ac_t""missing" 1>&6
1030 fi
1031
1032 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working autoconf" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf.  Sigh.
1037 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1038    AUTOCONF=autoconf
1039    echo "$ac_t""found" 1>&6
1040 else
1041    AUTOCONF="$missing_dir/missing autoconf"
1042    echo "$ac_t""missing" 1>&6
1043 fi
1044
1045 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working automake" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (automake --version) < /dev/null > /dev/null 2>&1; then
1051    AUTOMAKE=automake
1052    echo "$ac_t""found" 1>&6
1053 else
1054    AUTOMAKE="$missing_dir/missing automake"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working autoheader" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOHEADER=autoheader
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOHEADER="$missing_dir/missing autoheader"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working makeinfo" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1077    MAKEINFO=makeinfo
1078    echo "$ac_t""found" 1>&6
1079 else
1080    MAKEINFO="$missing_dir/missing makeinfo"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 install_sh="$missing_dir/install-sh"
1085 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1086
1087 for ac_prog in gnutar gtar tar
1088 do
1089 # Extract the first word of "$ac_prog", so it can be a program name with args.
1090 set dummy $ac_prog; ac_word=$2
1091 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1092 echo "configure:1093: checking for $ac_word" >&5
1093 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1094   echo $ac_n "(cached) $ac_c" 1>&6
1095 else
1096   if test -n "$AMTAR"; then
1097   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1098 else
1099   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1100   ac_dummy="$PATH"
1101   for ac_dir in $ac_dummy; do
1102     test -z "$ac_dir" && ac_dir=.
1103     if test -f $ac_dir/$ac_word; then
1104       ac_cv_prog_AMTAR="$ac_prog"
1105       break
1106     fi
1107   done
1108   IFS="$ac_save_ifs"
1109 fi
1110 fi
1111 AMTAR="$ac_cv_prog_AMTAR"
1112 if test -n "$AMTAR"; then
1113   echo "$ac_t""$AMTAR" 1>&6
1114 else
1115   echo "$ac_t""no" 1>&6
1116 fi
1117
1118 test -n "$AMTAR" && break
1119 done
1120
1121
1122 AMTARFLAGS=
1123 if test -n "$AMTAR"; then
1124   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1125         AMTARFLAGS=o
1126   fi
1127 fi
1128
1129 cat >> confdefs.h <<EOF
1130 #define OPENLDAP_PACKAGE "$PACKAGE"
1131 EOF
1132
1133 cat >> confdefs.h <<EOF
1134 #define OPENLDAP_VERSION "$VERSION"
1135 EOF
1136
1137
1138
1139
1140 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1141 echo "configure:1142: checking configure arguments" >&5
1142
1143
1144 top_builddir=`pwd`
1145
1146 ldap_subdir="/openldap"
1147
1148 # Check whether --with-subdir or --without-subdir was given.
1149 if test "${with_subdir+set}" = set; then
1150   withval="$with_subdir"
1151   case "$withval" in
1152         no) ldap_subdir=""
1153                 ;;
1154         yes)
1155                 ;;
1156         /*|\\*)
1157                 ldap_subdir="$withval"
1158                 ;;
1159         *)
1160                 ldap_subdir="/$withval"
1161                 ;;
1162 esac
1163
1164 fi
1165
1166
1167 # OpenLDAP --enable-debug
1168         # Check whether --enable-debug or --disable-debug was given.
1169 if test "${enable_debug+set}" = set; then
1170   enableval="$enable_debug"
1171   
1172         ol_arg=invalid
1173         for ol_val in auto yes no ; do
1174                 if test "$enableval" = "$ol_val" ; then
1175                         ol_arg="$ol_val"
1176                 fi
1177         done
1178         if test "$ol_arg" = "invalid" ; then
1179                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1180         fi
1181         ol_enable_debug="$ol_arg"
1182
1183 else
1184         ol_enable_debug="yes"
1185 fi
1186 # end --enable-debug
1187 # OpenLDAP --enable-syslog
1188         # Check whether --enable-syslog or --disable-syslog was given.
1189 if test "${enable_syslog+set}" = set; then
1190   enableval="$enable_syslog"
1191   
1192         ol_arg=invalid
1193         for ol_val in auto yes no ; do
1194                 if test "$enableval" = "$ol_val" ; then
1195                         ol_arg="$ol_val"
1196                 fi
1197         done
1198         if test "$ol_arg" = "invalid" ; then
1199                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1200         fi
1201         ol_enable_syslog="$ol_arg"
1202
1203 else
1204         ol_enable_syslog="auto"
1205 fi
1206 # end --enable-syslog
1207 # OpenLDAP --enable-proctitle
1208         # Check whether --enable-proctitle or --disable-proctitle was given.
1209 if test "${enable_proctitle+set}" = set; then
1210   enableval="$enable_proctitle"
1211   
1212         ol_arg=invalid
1213         for ol_val in auto yes no ; do
1214                 if test "$enableval" = "$ol_val" ; then
1215                         ol_arg="$ol_val"
1216                 fi
1217         done
1218         if test "$ol_arg" = "invalid" ; then
1219                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1220         fi
1221         ol_enable_proctitle="$ol_arg"
1222
1223 else
1224         ol_enable_proctitle="yes"
1225 fi
1226 # end --enable-proctitle
1227 # OpenLDAP --enable-cache
1228         # Check whether --enable-cache or --disable-cache was given.
1229 if test "${enable_cache+set}" = set; then
1230   enableval="$enable_cache"
1231   
1232         ol_arg=invalid
1233         for ol_val in auto yes no ; do
1234                 if test "$enableval" = "$ol_val" ; then
1235                         ol_arg="$ol_val"
1236                 fi
1237         done
1238         if test "$ol_arg" = "invalid" ; then
1239                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1240         fi
1241         ol_enable_cache="$ol_arg"
1242
1243 else
1244         ol_enable_cache="yes"
1245 fi
1246 # end --enable-cache
1247 # OpenLDAP --enable-referrals
1248         # Check whether --enable-referrals or --disable-referrals was given.
1249 if test "${enable_referrals+set}" = set; then
1250   enableval="$enable_referrals"
1251   
1252         ol_arg=invalid
1253         for ol_val in auto yes no ; do
1254                 if test "$enableval" = "$ol_val" ; then
1255                         ol_arg="$ol_val"
1256                 fi
1257         done
1258         if test "$ol_arg" = "invalid" ; then
1259                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1260         fi
1261         ol_enable_referrals="$ol_arg"
1262
1263 else
1264         ol_enable_referrals="yes"
1265 fi
1266 # end --enable-referrals
1267 # OpenLDAP --enable-kbind
1268         # Check whether --enable-kbind or --disable-kbind was given.
1269 if test "${enable_kbind+set}" = set; then
1270   enableval="$enable_kbind"
1271   
1272         ol_arg=invalid
1273         for ol_val in auto yes no ; do
1274                 if test "$enableval" = "$ol_val" ; then
1275                         ol_arg="$ol_val"
1276                 fi
1277         done
1278         if test "$ol_arg" = "invalid" ; then
1279                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1280         fi
1281         ol_enable_kbind="$ol_arg"
1282
1283 else
1284         ol_enable_kbind="no"
1285 fi
1286 # end --enable-kbind
1287 # OpenLDAP --enable-ipv6
1288         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1289 if test "${enable_ipv6+set}" = set; then
1290   enableval="$enable_ipv6"
1291   
1292         ol_arg=invalid
1293         for ol_val in auto yes no ; do
1294                 if test "$enableval" = "$ol_val" ; then
1295                         ol_arg="$ol_val"
1296                 fi
1297         done
1298         if test "$ol_arg" = "invalid" ; then
1299                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1300         fi
1301         ol_enable_ipv6="$ol_arg"
1302
1303 else
1304         ol_enable_ipv6="auto"
1305 fi
1306 # end --enable-ipv6
1307 # OpenLDAP --enable-local
1308         # Check whether --enable-local or --disable-local was given.
1309 if test "${enable_local+set}" = set; then
1310   enableval="$enable_local"
1311   
1312         ol_arg=invalid
1313         for ol_val in auto yes no ; do
1314                 if test "$enableval" = "$ol_val" ; then
1315                         ol_arg="$ol_val"
1316                 fi
1317         done
1318         if test "$ol_arg" = "invalid" ; then
1319                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1320         fi
1321         ol_enable_local="$ol_arg"
1322
1323 else
1324         ol_enable_local="auto"
1325 fi
1326 # end --enable-local
1327 # OpenLDAP --enable-x_compile
1328         # Check whether --enable-x_compile or --disable-x_compile was given.
1329 if test "${enable_x_compile+set}" = set; then
1330   enableval="$enable_x_compile"
1331   
1332         ol_arg=invalid
1333         for ol_val in yes no ; do
1334                 if test "$enableval" = "$ol_val" ; then
1335                         ol_arg="$ol_val"
1336                 fi
1337         done
1338         if test "$ol_arg" = "invalid" ; then
1339                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1340         fi
1341         ol_enable_x_compile="$ol_arg"
1342
1343 else
1344         ol_enable_x_compile="no"
1345 fi
1346 # end --enable-x_compile
1347
1348
1349 # OpenLDAP --with-cyrus_sasl
1350         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1351 if test "${with_cyrus_sasl+set}" = set; then
1352   withval="$with_cyrus_sasl"
1353   
1354         ol_arg=invalid
1355         for ol_val in auto yes no  ; do
1356                 if test "$withval" = "$ol_val" ; then
1357                         ol_arg="$ol_val"
1358                 fi
1359         done
1360         if test "$ol_arg" = "invalid" ; then
1361                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1362         fi
1363         ol_with_cyrus_sasl="$ol_arg"
1364
1365 else
1366         ol_with_cyrus_sasl="auto"
1367 fi
1368 # end --with-cyrus_sasl
1369
1370 # OpenLDAP --with-fetch
1371         # Check whether --with-fetch or --without-fetch was given.
1372 if test "${with_fetch+set}" = set; then
1373   withval="$with_fetch"
1374   
1375         ol_arg=invalid
1376         for ol_val in auto yes no  ; do
1377                 if test "$withval" = "$ol_val" ; then
1378                         ol_arg="$ol_val"
1379                 fi
1380         done
1381         if test "$ol_arg" = "invalid" ; then
1382                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1383         fi
1384         ol_with_fetch="$ol_arg"
1385
1386 else
1387         ol_with_fetch="auto"
1388 fi
1389 # end --with-fetch
1390
1391 # OpenLDAP --with-kerberos
1392         # Check whether --with-kerberos or --without-kerberos was given.
1393 if test "${with_kerberos+set}" = set; then
1394   withval="$with_kerberos"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1398                 if test "$withval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1404         fi
1405         ol_with_kerberos="$ol_arg"
1406
1407 else
1408         ol_with_kerberos="auto"
1409 fi
1410 # end --with-kerberos
1411
1412 # OpenLDAP --with-readline
1413         # Check whether --with-readline or --without-readline was given.
1414 if test "${with_readline+set}" = set; then
1415   withval="$with_readline"
1416   
1417         ol_arg=invalid
1418         for ol_val in auto yes no  ; do
1419                 if test "$withval" = "$ol_val" ; then
1420                         ol_arg="$ol_val"
1421                 fi
1422         done
1423         if test "$ol_arg" = "invalid" ; then
1424                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1425         fi
1426         ol_with_readline="$ol_arg"
1427
1428 else
1429         ol_with_readline="auto"
1430 fi
1431 # end --with-readline
1432
1433 # OpenLDAP --with-threads
1434         # Check whether --with-threads or --without-threads was given.
1435 if test "${with_threads+set}" = set; then
1436   withval="$with_threads"
1437   
1438         ol_arg=invalid
1439         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1440                 if test "$withval" = "$ol_val" ; then
1441                         ol_arg="$ol_val"
1442                 fi
1443         done
1444         if test "$ol_arg" = "invalid" ; then
1445                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1446         fi
1447         ol_with_threads="$ol_arg"
1448
1449 else
1450         ol_with_threads="auto"
1451 fi
1452 # end --with-threads
1453
1454 # OpenLDAP --with-tls
1455         # Check whether --with-tls or --without-tls was given.
1456 if test "${with_tls+set}" = set; then
1457   withval="$with_tls"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto ssleay openssl yes no  ; do
1461                 if test "$withval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1467         fi
1468         ol_with_tls="$ol_arg"
1469
1470 else
1471         ol_with_tls="auto"
1472 fi
1473 # end --with-tls
1474
1475 # OpenLDAP --with-yielding_select
1476         # Check whether --with-yielding_select or --without-yielding_select was given.
1477 if test "${with_yielding_select+set}" = set; then
1478   withval="$with_yielding_select"
1479   
1480         ol_arg=invalid
1481         for ol_val in auto yes no manual  ; do
1482                 if test "$withval" = "$ol_val" ; then
1483                         ol_arg="$ol_val"
1484                 fi
1485         done
1486         if test "$ol_arg" = "invalid" ; then
1487                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1488         fi
1489         ol_with_yielding_select="$ol_arg"
1490
1491 else
1492         ol_with_yielding_select="auto"
1493 fi
1494 # end --with-yielding_select
1495
1496
1497
1498 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1499 if test "${with_xxslapdoptions+set}" = set; then
1500   withval="$with_xxslapdoptions"
1501   :
1502 fi
1503
1504 # OpenLDAP --enable-slapd
1505         # Check whether --enable-slapd or --disable-slapd was given.
1506 if test "${enable_slapd+set}" = set; then
1507   enableval="$enable_slapd"
1508   
1509         ol_arg=invalid
1510         for ol_val in auto yes no ; do
1511                 if test "$enableval" = "$ol_val" ; then
1512                         ol_arg="$ol_val"
1513                 fi
1514         done
1515         if test "$ol_arg" = "invalid" ; then
1516                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1517         fi
1518         ol_enable_slapd="$ol_arg"
1519
1520 else
1521         ol_enable_slapd="yes"
1522 fi
1523 # end --enable-slapd
1524 # OpenLDAP --enable-cleartext
1525         # Check whether --enable-cleartext or --disable-cleartext was given.
1526 if test "${enable_cleartext+set}" = set; then
1527   enableval="$enable_cleartext"
1528   
1529         ol_arg=invalid
1530         for ol_val in auto yes no ; do
1531                 if test "$enableval" = "$ol_val" ; then
1532                         ol_arg="$ol_val"
1533                 fi
1534         done
1535         if test "$ol_arg" = "invalid" ; then
1536                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1537         fi
1538         ol_enable_cleartext="$ol_arg"
1539
1540 else
1541         ol_enable_cleartext="yes"
1542 fi
1543 # end --enable-cleartext
1544 # OpenLDAP --enable-crypt
1545         # Check whether --enable-crypt or --disable-crypt was given.
1546 if test "${enable_crypt+set}" = set; then
1547   enableval="$enable_crypt"
1548   
1549         ol_arg=invalid
1550         for ol_val in auto yes no ; do
1551                 if test "$enableval" = "$ol_val" ; then
1552                         ol_arg="$ol_val"
1553                 fi
1554         done
1555         if test "$ol_arg" = "invalid" ; then
1556                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1557         fi
1558         ol_enable_crypt="$ol_arg"
1559
1560 else
1561         ol_enable_crypt="auto"
1562 fi
1563 # end --enable-crypt
1564 # OpenLDAP --enable-kpasswd
1565         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1566 if test "${enable_kpasswd+set}" = set; then
1567   enableval="$enable_kpasswd"
1568   
1569         ol_arg=invalid
1570         for ol_val in auto yes no ; do
1571                 if test "$enableval" = "$ol_val" ; then
1572                         ol_arg="$ol_val"
1573                 fi
1574         done
1575         if test "$ol_arg" = "invalid" ; then
1576                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1577         fi
1578         ol_enable_kpasswd="$ol_arg"
1579
1580 else
1581         ol_enable_kpasswd="no"
1582 fi
1583 # end --enable-kpasswd
1584 # OpenLDAP --enable-spasswd
1585         # Check whether --enable-spasswd or --disable-spasswd was given.
1586 if test "${enable_spasswd+set}" = set; then
1587   enableval="$enable_spasswd"
1588   
1589         ol_arg=invalid
1590         for ol_val in auto yes no ; do
1591                 if test "$enableval" = "$ol_val" ; then
1592                         ol_arg="$ol_val"
1593                 fi
1594         done
1595         if test "$ol_arg" = "invalid" ; then
1596                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1597         fi
1598         ol_enable_spasswd="$ol_arg"
1599
1600 else
1601         ol_enable_spasswd="no"
1602 fi
1603 # end --enable-spasswd
1604 # OpenLDAP --enable-modules
1605         # Check whether --enable-modules or --disable-modules was given.
1606 if test "${enable_modules+set}" = set; then
1607   enableval="$enable_modules"
1608   
1609         ol_arg=invalid
1610         for ol_val in auto yes no ; do
1611                 if test "$enableval" = "$ol_val" ; then
1612                         ol_arg="$ol_val"
1613                 fi
1614         done
1615         if test "$ol_arg" = "invalid" ; then
1616                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1617         fi
1618         ol_enable_modules="$ol_arg"
1619
1620 else
1621         ol_enable_modules="no"
1622 fi
1623 # end --enable-modules
1624 # OpenLDAP --enable-phonetic
1625         # Check whether --enable-phonetic or --disable-phonetic was given.
1626 if test "${enable_phonetic+set}" = set; then
1627   enableval="$enable_phonetic"
1628   
1629         ol_arg=invalid
1630         for ol_val in auto yes no ; do
1631                 if test "$enableval" = "$ol_val" ; then
1632                         ol_arg="$ol_val"
1633                 fi
1634         done
1635         if test "$ol_arg" = "invalid" ; then
1636                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1637         fi
1638         ol_enable_phonetic="$ol_arg"
1639
1640 else
1641         ol_enable_phonetic="no"
1642 fi
1643 # end --enable-phonetic
1644 # OpenLDAP --enable-rlookups
1645         # Check whether --enable-rlookups or --disable-rlookups was given.
1646 if test "${enable_rlookups+set}" = set; then
1647   enableval="$enable_rlookups"
1648   
1649         ol_arg=invalid
1650         for ol_val in auto yes no ; do
1651                 if test "$enableval" = "$ol_val" ; then
1652                         ol_arg="$ol_val"
1653                 fi
1654         done
1655         if test "$ol_arg" = "invalid" ; then
1656                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1657         fi
1658         ol_enable_rlookups="$ol_arg"
1659
1660 else
1661         ol_enable_rlookups="no"
1662 fi
1663 # end --enable-rlookups
1664 # OpenLDAP --enable-aci
1665         # Check whether --enable-aci or --disable-aci was given.
1666 if test "${enable_aci+set}" = set; then
1667   enableval="$enable_aci"
1668   
1669         ol_arg=invalid
1670         for ol_val in auto yes no ; do
1671                 if test "$enableval" = "$ol_val" ; then
1672                         ol_arg="$ol_val"
1673                 fi
1674         done
1675         if test "$ol_arg" = "invalid" ; then
1676                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1677         fi
1678         ol_enable_aci="$ol_arg"
1679
1680 else
1681         ol_enable_aci="no"
1682 fi
1683 # end --enable-aci
1684 # OpenLDAP --enable-wrappers
1685         # Check whether --enable-wrappers or --disable-wrappers was given.
1686 if test "${enable_wrappers+set}" = set; then
1687   enableval="$enable_wrappers"
1688   
1689         ol_arg=invalid
1690         for ol_val in auto yes no ; do
1691                 if test "$enableval" = "$ol_val" ; then
1692                         ol_arg="$ol_val"
1693                 fi
1694         done
1695         if test "$ol_arg" = "invalid" ; then
1696                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1697         fi
1698         ol_enable_wrappers="$ol_arg"
1699
1700 else
1701         ol_enable_wrappers="no"
1702 fi
1703 # end --enable-wrappers
1704 # OpenLDAP --enable-dynamic
1705         # Check whether --enable-dynamic or --disable-dynamic was given.
1706 if test "${enable_dynamic+set}" = set; then
1707   enableval="$enable_dynamic"
1708   
1709         ol_arg=invalid
1710         for ol_val in auto yes no ; do
1711                 if test "$enableval" = "$ol_val" ; then
1712                         ol_arg="$ol_val"
1713                 fi
1714         done
1715         if test "$ol_arg" = "invalid" ; then
1716                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1717         fi
1718         ol_enable_dynamic="$ol_arg"
1719
1720 else
1721         ol_enable_dynamic="no"
1722 fi
1723 # end --enable-dynamic
1724
1725 # OpenLDAP --enable-dnssrv
1726         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1727 if test "${enable_dnssrv+set}" = set; then
1728   enableval="$enable_dnssrv"
1729   
1730         ol_arg=invalid
1731         for ol_val in auto yes no ; do
1732                 if test "$enableval" = "$ol_val" ; then
1733                         ol_arg="$ol_val"
1734                 fi
1735         done
1736         if test "$ol_arg" = "invalid" ; then
1737                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1738         fi
1739         ol_enable_dnssrv="$ol_arg"
1740
1741 else
1742         ol_enable_dnssrv="no"
1743 fi
1744 # end --enable-dnssrv
1745 # OpenLDAP --with-dnssrv_module
1746         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1747 if test "${with_dnssrv_module+set}" = set; then
1748   withval="$with_dnssrv_module"
1749   
1750         ol_arg=invalid
1751         for ol_val in static dynamic ; do
1752                 if test "$withval" = "$ol_val" ; then
1753                         ol_arg="$ol_val"
1754                 fi
1755         done
1756         if test "$ol_arg" = "invalid" ; then
1757                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1758         fi
1759         ol_with_dnssrv_module="$ol_arg"
1760
1761 else
1762         ol_with_dnssrv_module="static"
1763 fi
1764 # end --with-dnssrv_module
1765
1766 # OpenLDAP --enable-ldap
1767         # Check whether --enable-ldap or --disable-ldap was given.
1768 if test "${enable_ldap+set}" = set; then
1769   enableval="$enable_ldap"
1770   
1771         ol_arg=invalid
1772         for ol_val in auto yes no ; do
1773                 if test "$enableval" = "$ol_val" ; then
1774                         ol_arg="$ol_val"
1775                 fi
1776         done
1777         if test "$ol_arg" = "invalid" ; then
1778                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1779         fi
1780         ol_enable_ldap="$ol_arg"
1781
1782 else
1783         ol_enable_ldap="no"
1784 fi
1785 # end --enable-ldap
1786 # OpenLDAP --with-ldap_module
1787         # Check whether --with-ldap_module or --without-ldap_module was given.
1788 if test "${with_ldap_module+set}" = set; then
1789   withval="$with_ldap_module"
1790   
1791         ol_arg=invalid
1792         for ol_val in static dynamic ; do
1793                 if test "$withval" = "$ol_val" ; then
1794                         ol_arg="$ol_val"
1795                 fi
1796         done
1797         if test "$ol_arg" = "invalid" ; then
1798                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1799         fi
1800         ol_with_ldap_module="$ol_arg"
1801
1802 else
1803         ol_with_ldap_module="static"
1804 fi
1805 # end --with-ldap_module
1806
1807 # OpenLDAP --enable-ldbm
1808         # Check whether --enable-ldbm or --disable-ldbm was given.
1809 if test "${enable_ldbm+set}" = set; then
1810   enableval="$enable_ldbm"
1811   
1812         ol_arg=invalid
1813         for ol_val in auto yes no ; do
1814                 if test "$enableval" = "$ol_val" ; then
1815                         ol_arg="$ol_val"
1816                 fi
1817         done
1818         if test "$ol_arg" = "invalid" ; then
1819                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1820         fi
1821         ol_enable_ldbm="$ol_arg"
1822
1823 else
1824         ol_enable_ldbm="yes"
1825 fi
1826 # end --enable-ldbm
1827 # OpenLDAP --with-ldbm_api
1828         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1829 if test "${with_ldbm_api+set}" = set; then
1830   withval="$with_ldbm_api"
1831   
1832         ol_arg=invalid
1833         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1834                 if test "$withval" = "$ol_val" ; then
1835                         ol_arg="$ol_val"
1836                 fi
1837         done
1838         if test "$ol_arg" = "invalid" ; then
1839                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1840         fi
1841         ol_with_ldbm_api="$ol_arg"
1842
1843 else
1844         ol_with_ldbm_api="auto"
1845 fi
1846 # end --with-ldbm_api
1847
1848 # OpenLDAP --with-ldbm_module
1849         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1850 if test "${with_ldbm_module+set}" = set; then
1851   withval="$with_ldbm_module"
1852   
1853         ol_arg=invalid
1854         for ol_val in static dynamic ; do
1855                 if test "$withval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1861         fi
1862         ol_with_ldbm_module="$ol_arg"
1863
1864 else
1865         ol_with_ldbm_module="static"
1866 fi
1867 # end --with-ldbm_module
1868
1869 # OpenLDAP --with-ldbm_type
1870         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1871 if test "${with_ldbm_type+set}" = set; then
1872   withval="$with_ldbm_type"
1873   
1874         ol_arg=invalid
1875         for ol_val in auto btree hash ; do
1876                 if test "$withval" = "$ol_val" ; then
1877                         ol_arg="$ol_val"
1878                 fi
1879         done
1880         if test "$ol_arg" = "invalid" ; then
1881                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1882         fi
1883         ol_with_ldbm_type="$ol_arg"
1884
1885 else
1886         ol_with_ldbm_type="auto"
1887 fi
1888 # end --with-ldbm_type
1889
1890 # OpenLDAP --enable-passwd
1891         # Check whether --enable-passwd or --disable-passwd was given.
1892 if test "${enable_passwd+set}" = set; then
1893   enableval="$enable_passwd"
1894   
1895         ol_arg=invalid
1896         for ol_val in auto yes no ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1903         fi
1904         ol_enable_passwd="$ol_arg"
1905
1906 else
1907         ol_enable_passwd="no"
1908 fi
1909 # end --enable-passwd
1910 # OpenLDAP --with-passwd_module
1911         # Check whether --with-passwd_module or --without-passwd_module was given.
1912 if test "${with_passwd_module+set}" = set; then
1913   withval="$with_passwd_module"
1914   
1915         ol_arg=invalid
1916         for ol_val in static dynamic ; do
1917                 if test "$withval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1923         fi
1924         ol_with_passwd_module="$ol_arg"
1925
1926 else
1927         ol_with_passwd_module="static"
1928 fi
1929 # end --with-passwd_module
1930
1931 # OpenLDAP --enable-shell
1932         # Check whether --enable-shell or --disable-shell was given.
1933 if test "${enable_shell+set}" = set; then
1934   enableval="$enable_shell"
1935   
1936         ol_arg=invalid
1937         for ol_val in auto yes no ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1944         fi
1945         ol_enable_shell="$ol_arg"
1946
1947 else
1948         ol_enable_shell="no"
1949 fi
1950 # end --enable-shell
1951 # OpenLDAP --with-shell_module
1952         # Check whether --with-shell_module or --without-shell_module was given.
1953 if test "${with_shell_module+set}" = set; then
1954   withval="$with_shell_module"
1955   
1956         ol_arg=invalid
1957         for ol_val in static dynamic ; do
1958                 if test "$withval" = "$ol_val" ; then
1959                         ol_arg="$ol_val"
1960                 fi
1961         done
1962         if test "$ol_arg" = "invalid" ; then
1963                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1964         fi
1965         ol_with_shell_module="$ol_arg"
1966
1967 else
1968         ol_with_shell_module="static"
1969 fi
1970 # end --with-shell_module
1971
1972 # OpenLDAP --enable-sql
1973         # Check whether --enable-sql or --disable-sql was given.
1974 if test "${enable_sql+set}" = set; then
1975   enableval="$enable_sql"
1976   
1977         ol_arg=invalid
1978         for ol_val in auto yes no ; do
1979                 if test "$enableval" = "$ol_val" ; then
1980                         ol_arg="$ol_val"
1981                 fi
1982         done
1983         if test "$ol_arg" = "invalid" ; then
1984                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
1985         fi
1986         ol_enable_sql="$ol_arg"
1987
1988 else
1989         ol_enable_sql="no"
1990 fi
1991 # end --enable-sql
1992 # OpenLDAP --with-sql_module
1993         # Check whether --with-sql_module or --without-sql_module was given.
1994 if test "${with_sql_module+set}" = set; then
1995   withval="$with_sql_module"
1996   
1997         ol_arg=invalid
1998         for ol_val in static dynamic ; do
1999                 if test "$withval" = "$ol_val" ; then
2000                         ol_arg="$ol_val"
2001                 fi
2002         done
2003         if test "$ol_arg" = "invalid" ; then
2004                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2005         fi
2006         ol_with_sql_module="$ol_arg"
2007
2008 else
2009         ol_with_sql_module="static"
2010 fi
2011 # end --with-sql_module
2012
2013
2014 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2015 if test "${with_xxslurpdoptions+set}" = set; then
2016   withval="$with_xxslurpdoptions"
2017   :
2018 fi
2019
2020 # OpenLDAP --enable-slurpd
2021         # Check whether --enable-slurpd or --disable-slurpd was given.
2022 if test "${enable_slurpd+set}" = set; then
2023   enableval="$enable_slurpd"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2033         fi
2034         ol_enable_slurpd="$ol_arg"
2035
2036 else
2037         ol_enable_slurpd="auto"
2038 fi
2039 # end --enable-slurpd
2040
2041 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2042 if test "${with_xxliboptions+set}" = set; then
2043   withval="$with_xxliboptions"
2044   :
2045 fi
2046
2047 # Check whether --enable-static or --disable-static was given.
2048 if test "${enable_static+set}" = set; then
2049   enableval="$enable_static"
2050   p=${PACKAGE-default}
2051 case "$enableval" in
2052 yes) enable_static=yes ;;
2053 no) enable_static=no ;;
2054 *)
2055   enable_static=no
2056   # Look at the argument we got.  We use all the common list separators.
2057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2058   for pkg in $enableval; do
2059     if test "X$pkg" = "X$p"; then
2060       enable_static=yes
2061     fi
2062   done
2063   IFS="$ac_save_ifs"
2064   ;;
2065 esac
2066 else
2067   enable_static=yes
2068 fi
2069
2070 # Check whether --enable-shared or --disable-shared was given.
2071 if test "${enable_shared+set}" = set; then
2072   enableval="$enable_shared"
2073   p=${PACKAGE-default}
2074 case "$enableval" in
2075 yes) enable_shared=yes ;;
2076 no) enable_shared=no ;;
2077 *)
2078   enable_shared=no
2079   # Look at the argument we got.  We use all the common list separators.
2080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2081   for pkg in $enableval; do
2082     if test "X$pkg" = "X$p"; then
2083       enable_shared=yes
2084     fi
2085   done
2086   IFS="$ac_save_ifs"
2087   ;;
2088 esac
2089 else
2090   enable_shared=yes
2091 fi
2092
2093
2094
2095 # validate options
2096 if test $ol_enable_slapd = no ; then
2097                 if test $ol_enable_dnssrv = yes ; then
2098                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2099         fi
2100         if test $ol_enable_ldap = yes ; then
2101                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2102         fi
2103         if test $ol_enable_ldbm = yes ; then
2104                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2105         fi
2106         if test $ol_enable_passwd = yes ; then
2107                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2108         fi
2109         if test $ol_enable_shell = yes ; then
2110                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2111         fi
2112         if test $ol_enable_sql = yes ; then
2113                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2114         fi
2115         if test $ol_enable_modules = yes ; then
2116                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2117         fi
2118         if test $ol_enable_wrappers = yes ; then
2119                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2120         fi
2121         if test $ol_enable_phonetic = yes ; then
2122                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2123         fi
2124         if test $ol_enable_rlookups = yes ; then
2125                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2126         fi
2127         if test $ol_enable_aci = yes ; then
2128                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2129         fi
2130         if test $ol_with_ldbm_api != auto ; then
2131                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2132         fi
2133         if test $ol_with_ldbm_type != auto ; then
2134                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2135         fi
2136         if test $ol_with_dnssrv_module != static ; then
2137                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2138         fi
2139         if test $ol_with_ldap_module != static ; then
2140                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2141         fi
2142         if test $ol_with_ldbm_module != static ; then
2143                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2144         fi
2145         if test $ol_with_passwd_module != static ; then
2146                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2147         fi
2148         if test $ol_with_shell_module != static ; then
2149                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2150         fi
2151         if test $ol_with_sql_module != static ; then
2152                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2153         fi
2154         if test $ol_enable_slurpd = yes ; then
2155                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2156         fi
2157
2158         # force settings to no
2159         ol_enable_dnssrv=no
2160         ol_enable_ldap=no
2161         ol_enable_ldbm=no
2162         ol_enable_passwd=no
2163         ol_enable_shell=no
2164         ol_enable_sql=no
2165
2166         ol_enable_modules=no
2167         ol_enable_phonetic=no
2168         ol_enable_rlookups=no
2169         ol_enable_aci=no
2170         ol_enable_wrappers=no
2171         ol_enable_dynamic=no
2172
2173         ol_with_ldbm_api=no
2174         ol_with_ldbm_type=no
2175
2176         ol_with_dnssrv_module=static
2177         ol_with_ldap_module=static
2178         ol_with_ldbm_module=static
2179         ol_with_passwd_module=static
2180         ol_with_shell_module=static
2181         ol_with_sql_module=static
2182
2183         ol_enable_slurpd=no
2184
2185 elif test $ol_enable_ldbm = no ; then
2186         
2187         if test $ol_with_ldbm_api != auto ; then
2188                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2189         fi
2190
2191         if test $ol_with_ldbm_type != auto ; then
2192                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2193         fi
2194
2195         if test $ol_with_ldbm_module != static ; then
2196                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2197         fi
2198
2199         if test $ol_enable_modules != yes -a \
2200                 $ol_enable_dnssrv = no -a \
2201                 $ol_enable_ldap = no -a \
2202                 $ol_enable_passwd = no -a \
2203                 $ol_enable_shell = no -a \
2204                 $ol_enable_sql = no ; then
2205                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2206         fi
2207
2208         ol_with_ldbm_api=no
2209         ol_with_ldbm_type=no
2210         ol_with_ldbm_module=static
2211
2212 else
2213                 if test $ol_with_ldbm_api = gdbm -a \
2214                 $ol_with_ldbm_type = btree ; then
2215                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2216         fi
2217         if test $ol_with_ldbm_api = mdbm -a \
2218                 $ol_with_ldbm_type = btree ; then
2219                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2220         fi
2221         if test $ol_with_ldbm_api = ndbm -a \
2222                 $ol_with_ldbm_type = btree ; then
2223                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2224         fi
2225 fi
2226
2227 if test $ol_enable_slurpd = yes ; then
2228                 if test $ol_with_threads = no ; then
2229                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2230         fi
2231 fi
2232
2233 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2234         if test $ol_with_kerberos = no ; then
2235                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2236         fi
2237         ol_with_kerberos=yes
2238 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2239         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2240                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2241         fi
2242         ol_with_kerberos=no
2243 fi
2244
2245 if test $ol_enable_spasswd = yes ; then
2246         if test $ol_with_cyrus_sasl = no ; then
2247                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2248         fi
2249         ol_with_cyrus_sasl=yes
2250 fi
2251
2252 echo "$ac_t""done" 1>&6
2253
2254 LDAP_LIBS=
2255 LDIF_LIBS=
2256 LDBM_LIBS=
2257 LTHREAD_LIBS=
2258 LUTIL_LIBS=
2259
2260 SLAPD_LIBS=
2261 SLURPD_LIBS=
2262
2263 BUILD_SLAPD=no
2264 BUILD_SLURPD=no
2265
2266 BUILD_THREAD=no
2267
2268 BUILD_DNSSRV=no
2269 BUILD_LDAP=no
2270 BUILD_LDBM=no
2271 BUILD_PASSWD=no
2272 BUILD_SHELL=no
2273 BUILD_SQL=no
2274
2275 BUILD_DNSSRV_DYNAMIC=static
2276 BUILD_LDAP_DYNAMIC=static
2277 BUILD_LDBM_DYNAMIC=static
2278 BUILD_PASSWD_DYNAMIC=static
2279 BUILD_SHELL_DYNAMIC=static
2280 BUILD_SQL_DYNAMIC=static
2281
2282 SLAPD_MODULES_LDFLAGS=
2283 SLAPD_MODULES_CPPFLAGS=
2284 SLAPD_MODULES_LIST=
2285
2286 SLAPD_SQL_LDFLAGS=
2287 SLAPD_SQL_LIBS=
2288 SLAPD_SQL_INCLUDES=
2289
2290 KRB4_LIBS=
2291 KRB5_LIBS=
2292 READLINE_LIBS=
2293 SASL_LIBS=
2294 TERMCAP_LIBS=
2295 TLS_LIBS=
2296 MODULES_LIBS=
2297 AUTH_LIBS=
2298
2299
2300
2301 cat >> confdefs.h <<\EOF
2302 #define HAVE_MKVERSION 1
2303 EOF
2304
2305
2306
2307
2308 ol_aix_threads=no
2309 case "$target" in
2310 *-*-aix*)       if test -z "$CC" ; then
2311                 case "$ol_with_threads" in
2312                 auto | yes |  posix) ol_aix_threads=yes ;;
2313                 esac
2314         fi
2315 ;;
2316 esac
2317
2318 if test $ol_aix_threads = yes ; then
2319         if test -z "${CC}" ; then
2320                 for ac_prog in cc_r xlc_r cc
2321 do
2322 # Extract the first word of "$ac_prog", so it can be a program name with args.
2323 set dummy $ac_prog; ac_word=$2
2324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2325 echo "configure:2326: checking for $ac_word" >&5
2326 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   if test -n "$CC"; then
2330   ac_cv_prog_CC="$CC" # Let the user override the test.
2331 else
2332   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2333   ac_dummy="$PATH"
2334   for ac_dir in $ac_dummy; do
2335     test -z "$ac_dir" && ac_dir=.
2336     if test -f $ac_dir/$ac_word; then
2337       ac_cv_prog_CC="$ac_prog"
2338       break
2339     fi
2340   done
2341   IFS="$ac_save_ifs"
2342 fi
2343 fi
2344 CC="$ac_cv_prog_CC"
2345 if test -n "$CC"; then
2346   echo "$ac_t""$CC" 1>&6
2347 else
2348   echo "$ac_t""no" 1>&6
2349 fi
2350
2351 test -n "$CC" && break
2352 done
2353
2354
2355                 if test "$CC" = cc ; then
2356                                                 if test $ol_with_threads != auto ; then
2357                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2358                         else
2359                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2360                         fi
2361                         ol_with_threads=no
2362                 fi
2363         fi
2364
2365         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2366                 ol_with_threads=posix
2367                 ol_cv_pthread_create=yes
2368         fi
2369 fi
2370
2371 if test -z "${CC}"; then
2372         for ac_prog in cc
2373 do
2374 # Extract the first word of "$ac_prog", so it can be a program name with args.
2375 set dummy $ac_prog; ac_word=$2
2376 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2377 echo "configure:2378: checking for $ac_word" >&5
2378 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2379   echo $ac_n "(cached) $ac_c" 1>&6
2380 else
2381   if test -n "$CC"; then
2382   ac_cv_prog_CC="$CC" # Let the user override the test.
2383 else
2384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2385   ac_dummy="$PATH"
2386   for ac_dir in $ac_dummy; do
2387     test -z "$ac_dir" && ac_dir=.
2388     if test -f $ac_dir/$ac_word; then
2389       ac_cv_prog_CC="$ac_prog"
2390       break
2391     fi
2392   done
2393   IFS="$ac_save_ifs"
2394 fi
2395 fi
2396 CC="$ac_cv_prog_CC"
2397 if test -n "$CC"; then
2398   echo "$ac_t""$CC" 1>&6
2399 else
2400   echo "$ac_t""no" 1>&6
2401 fi
2402
2403 test -n "$CC" && break
2404 done
2405
2406 fi
2407
2408
2409
2410
2411 # Check whether --enable-fast-install or --disable-fast-install was given.
2412 if test "${enable_fast_install+set}" = set; then
2413   enableval="$enable_fast_install"
2414   p=${PACKAGE-default}
2415 case "$enableval" in
2416 yes) enable_fast_install=yes ;;
2417 no) enable_fast_install=no ;;
2418 *)
2419   enable_fast_install=no
2420   # Look at the argument we got.  We use all the common list separators.
2421   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2422   for pkg in $enableval; do
2423     if test "X$pkg" = "X$p"; then
2424       enable_fast_install=yes
2425     fi
2426   done
2427   IFS="$ac_save_ifs"
2428   ;;
2429 esac
2430 else
2431   enable_fast_install=yes
2432 fi
2433
2434 # Extract the first word of "ranlib", so it can be a program name with args.
2435 set dummy ranlib; ac_word=$2
2436 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2437 echo "configure:2438: checking for $ac_word" >&5
2438 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2439   echo $ac_n "(cached) $ac_c" 1>&6
2440 else
2441   if test -n "$RANLIB"; then
2442   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2443 else
2444   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2445   ac_dummy="$PATH"
2446   for ac_dir in $ac_dummy; do
2447     test -z "$ac_dir" && ac_dir=.
2448     if test -f $ac_dir/$ac_word; then
2449       ac_cv_prog_RANLIB="ranlib"
2450       break
2451     fi
2452   done
2453   IFS="$ac_save_ifs"
2454   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2455 fi
2456 fi
2457 RANLIB="$ac_cv_prog_RANLIB"
2458 if test -n "$RANLIB"; then
2459   echo "$ac_t""$RANLIB" 1>&6
2460 else
2461   echo "$ac_t""no" 1>&6
2462 fi
2463
2464 # Extract the first word of "gcc", so it can be a program name with args.
2465 set dummy gcc; ac_word=$2
2466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2467 echo "configure:2468: checking for $ac_word" >&5
2468 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2469   echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471   if test -n "$CC"; then
2472   ac_cv_prog_CC="$CC" # Let the user override the test.
2473 else
2474   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2475   ac_dummy="$PATH"
2476   for ac_dir in $ac_dummy; do
2477     test -z "$ac_dir" && ac_dir=.
2478     if test -f $ac_dir/$ac_word; then
2479       ac_cv_prog_CC="gcc"
2480       break
2481     fi
2482   done
2483   IFS="$ac_save_ifs"
2484 fi
2485 fi
2486 CC="$ac_cv_prog_CC"
2487 if test -n "$CC"; then
2488   echo "$ac_t""$CC" 1>&6
2489 else
2490   echo "$ac_t""no" 1>&6
2491 fi
2492
2493 if test -z "$CC"; then
2494   # Extract the first word of "cc", so it can be a program name with args.
2495 set dummy cc; ac_word=$2
2496 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2497 echo "configure:2498: checking for $ac_word" >&5
2498 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2499   echo $ac_n "(cached) $ac_c" 1>&6
2500 else
2501   if test -n "$CC"; then
2502   ac_cv_prog_CC="$CC" # Let the user override the test.
2503 else
2504   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2505   ac_prog_rejected=no
2506   ac_dummy="$PATH"
2507   for ac_dir in $ac_dummy; do
2508     test -z "$ac_dir" && ac_dir=.
2509     if test -f $ac_dir/$ac_word; then
2510       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2511         ac_prog_rejected=yes
2512         continue
2513       fi
2514       ac_cv_prog_CC="cc"
2515       break
2516     fi
2517   done
2518   IFS="$ac_save_ifs"
2519 if test $ac_prog_rejected = yes; then
2520   # We found a bogon in the path, so make sure we never use it.
2521   set dummy $ac_cv_prog_CC
2522   shift
2523   if test $# -gt 0; then
2524     # We chose a different compiler from the bogus one.
2525     # However, it has the same basename, so the bogon will be chosen
2526     # first if we set CC to just the basename; use the full file name.
2527     shift
2528     set dummy "$ac_dir/$ac_word" "$@"
2529     shift
2530     ac_cv_prog_CC="$@"
2531   fi
2532 fi
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     case "`uname -s`" in
2544     *win32* | *WIN32* | *CYGWIN*)
2545       # Extract the first word of "cl", so it can be a program name with args.
2546 set dummy cl; ac_word=$2
2547 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2548 echo "configure:2549: checking for $ac_word" >&5
2549 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2550   echo $ac_n "(cached) $ac_c" 1>&6
2551 else
2552   if test -n "$CC"; then
2553   ac_cv_prog_CC="$CC" # Let the user override the test.
2554 else
2555   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2556   ac_dummy="$PATH"
2557   for ac_dir in $ac_dummy; do
2558     test -z "$ac_dir" && ac_dir=.
2559     if test -f $ac_dir/$ac_word; then
2560       ac_cv_prog_CC="cl"
2561       break
2562     fi
2563   done
2564   IFS="$ac_save_ifs"
2565 fi
2566 fi
2567 CC="$ac_cv_prog_CC"
2568 if test -n "$CC"; then
2569   echo "$ac_t""$CC" 1>&6
2570 else
2571   echo "$ac_t""no" 1>&6
2572 fi
2573  ;;
2574     esac
2575   fi
2576   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2577 fi
2578
2579 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2580 echo "configure:2581: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2581
2582 ac_ext=c
2583 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2584 ac_cpp='$CPP $CPPFLAGS'
2585 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2586 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2587 cross_compiling=$ac_cv_prog_cc_cross
2588
2589 cat > conftest.$ac_ext << EOF
2590
2591 #line 2592 "configure"
2592 #include "confdefs.h"
2593
2594 main(){return(0);}
2595 EOF
2596 if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2597   ac_cv_prog_cc_works=yes
2598   # If we can't run a trivial program, we are probably using a cross compiler.
2599   if (./conftest; exit) 2>/dev/null; then
2600     ac_cv_prog_cc_cross=no
2601   else
2602     ac_cv_prog_cc_cross=yes
2603   fi
2604 else
2605   echo "configure: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   ac_cv_prog_cc_works=no
2608 fi
2609 rm -fr conftest*
2610 ac_ext=c
2611 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2612 ac_cpp='$CPP $CPPFLAGS'
2613 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2614 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2615 cross_compiling=$ac_cv_prog_cc_cross
2616
2617 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2618 if test $ac_cv_prog_cc_works = no; then
2619   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2620 fi
2621 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2622 echo "configure:2623: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2623 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2624 cross_compiling=$ac_cv_prog_cc_cross
2625
2626 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2627 echo "configure:2628: checking whether we are using GNU C" >&5
2628 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   cat > conftest.c <<EOF
2632 #ifdef __GNUC__
2633   yes;
2634 #endif
2635 EOF
2636 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2637   ac_cv_prog_gcc=yes
2638 else
2639   ac_cv_prog_gcc=no
2640 fi
2641 fi
2642
2643 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2644
2645 if test $ac_cv_prog_gcc = yes; then
2646   GCC=yes
2647 else
2648   GCC=
2649 fi
2650
2651 ac_test_CFLAGS="${CFLAGS+set}"
2652 ac_save_CFLAGS="$CFLAGS"
2653 CFLAGS=
2654 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2655 echo "configure:2656: checking whether ${CC-cc} accepts -g" >&5
2656 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2657   echo $ac_n "(cached) $ac_c" 1>&6
2658 else
2659   echo 'void f(){}' > conftest.c
2660 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2661   ac_cv_prog_cc_g=yes
2662 else
2663   ac_cv_prog_cc_g=no
2664 fi
2665 rm -f conftest*
2666
2667 fi
2668
2669 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2670 if test "$ac_test_CFLAGS" = set; then
2671   CFLAGS="$ac_save_CFLAGS"
2672 elif test $ac_cv_prog_cc_g = yes; then
2673   if test "$GCC" = yes; then
2674     CFLAGS="-g -O2"
2675   else
2676     CFLAGS="-g"
2677   fi
2678 else
2679   if test "$GCC" = yes; then
2680     CFLAGS="-O2"
2681   else
2682     CFLAGS=
2683   fi
2684 fi
2685
2686 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2687 if test "${with_gnu_ld+set}" = set; then
2688   withval="$with_gnu_ld"
2689   test "$withval" = no || with_gnu_ld=yes
2690 else
2691   with_gnu_ld=no
2692 fi
2693
2694 ac_prog=ld
2695 if test "$ac_cv_prog_gcc" = yes; then
2696   # Check if gcc -print-prog-name=ld gives a path.
2697   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2698 echo "configure:2699: checking for ld used by GCC" >&5
2699   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2700   case "$ac_prog" in
2701     # Accept absolute paths.
2702     [\\/]* | [A-Za-z]:[\\/]*)
2703       re_direlt='/[^/][^/]*/\.\./'
2704       # Canonicalize the path of ld
2705       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2706       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2707         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2708       done
2709       test -z "$LD" && LD="$ac_prog"
2710       ;;
2711   "")
2712     # If it fails, then pretend we aren't using GCC.
2713     ac_prog=ld
2714     ;;
2715   *)
2716     # If it is relative, then search for the first ld in PATH.
2717     with_gnu_ld=unknown
2718     ;;
2719   esac
2720 elif test "$with_gnu_ld" = yes; then
2721   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2722 echo "configure:2723: checking for GNU ld" >&5
2723 else
2724   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2725 echo "configure:2726: checking for non-GNU ld" >&5
2726 fi
2727 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2728   echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730   if test -z "$LD"; then
2731   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2732   for ac_dir in $PATH; do
2733     test -z "$ac_dir" && ac_dir=.
2734     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2735       ac_cv_path_LD="$ac_dir/$ac_prog"
2736       # Check to see if the program is GNU ld.  I'd rather use --version,
2737       # but apparently some GNU ld's only accept -v.
2738       # Break only if it was the GNU/non-GNU ld that we prefer.
2739       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2740         test "$with_gnu_ld" != no && break
2741       else
2742         test "$with_gnu_ld" != yes && break
2743       fi
2744     fi
2745   done
2746   IFS="$ac_save_ifs"
2747 else
2748   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2749 fi
2750 fi
2751
2752 LD="$ac_cv_path_LD"
2753 if test -n "$LD"; then
2754   echo "$ac_t""$LD" 1>&6
2755 else
2756   echo "$ac_t""no" 1>&6
2757 fi
2758 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2759 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2760 echo "configure:2761: checking if the linker ($LD) is GNU ld" >&5
2761 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2762   echo $ac_n "(cached) $ac_c" 1>&6
2763 else
2764   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2765 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2766   ac_cv_prog_gnu_ld=yes
2767 else
2768   ac_cv_prog_gnu_ld=no
2769 fi
2770 fi
2771
2772 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2773
2774
2775 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2776 echo "configure:2777: checking for BSD-compatible nm" >&5
2777 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2778   echo $ac_n "(cached) $ac_c" 1>&6
2779 else
2780   if test -n "$NM"; then
2781   # Let the user override the test.
2782   ac_cv_path_NM="$NM"
2783 else
2784   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2785   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2786     test -z "$ac_dir" && ac_dir=.
2787     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2788       # Check to see if the nm accepts a BSD-compat flag.
2789       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2790       #   nm: unknown option "B" ignored
2791       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2792         ac_cv_path_NM="$ac_dir/nm -B"
2793         break
2794       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2795         ac_cv_path_NM="$ac_dir/nm -p"
2796         break
2797       else
2798         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2799         continue # so that we can try to find one that supports BSD flags
2800       fi
2801     fi
2802   done
2803   IFS="$ac_save_ifs"
2804   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2805 fi
2806 fi
2807
2808 NM="$ac_cv_path_NM"
2809 echo "$ac_t""$NM" 1>&6
2810
2811 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2812 echo "configure:2813: checking whether ln -s works" >&5
2813 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2814   echo $ac_n "(cached) $ac_c" 1>&6
2815 else
2816   rm -f conftestdata
2817 if ln -s X conftestdata 2>/dev/null
2818 then
2819   rm -f conftestdata
2820   ac_cv_prog_LN_S="ln -s"
2821 else
2822   ac_cv_prog_LN_S=ln
2823 fi
2824 fi
2825 LN_S="$ac_cv_prog_LN_S"
2826 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2827   echo "$ac_t""yes" 1>&6
2828 else
2829   echo "$ac_t""no" 1>&6
2830 fi
2831
2832 if test $host != $build; then
2833   ac_tool_prefix=${host_alias}-
2834 else
2835   ac_tool_prefix=
2836 fi
2837
2838
2839 case "$target" in
2840 NONE) lt_target="$host" ;;
2841 *) lt_target="$target" ;;
2842 esac
2843
2844 # Check for any special flags to pass to ltconfig.
2845 libtool_flags="--cache-file=$cache_file"
2846 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2847 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2848 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2849 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2850 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2851 libtool_flags="$libtool_flags --enable-dlopen"
2852 libtool_flags="$libtool_flags --enable-win32-dll"
2853 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2854 if test "${enable_libtool_lock+set}" = set; then
2855   enableval="$enable_libtool_lock"
2856   :
2857 fi
2858
2859 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2860 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2861
2862 # Some flags need to be propagated to the compiler or linker for good
2863 # libtool support.
2864 case "$lt_target" in
2865 *-*-irix6*)
2866   # Find out which ABI we are using.
2867   echo '#line 2868 "configure"' > conftest.$ac_ext
2868   if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2869     case "`/usr/bin/file conftest.o`" in
2870     *32-bit*)
2871       LD="${LD-ld} -32"
2872       ;;
2873     *N32*)
2874       LD="${LD-ld} -n32"
2875       ;;
2876     *64-bit*)
2877       LD="${LD-ld} -64"
2878       ;;
2879     esac
2880   fi
2881   rm -rf conftest*
2882   ;;
2883
2884 *-*-sco3.2v5*)
2885   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2886   SAVE_CFLAGS="$CFLAGS"
2887   CFLAGS="$CFLAGS -belf"
2888   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2889 echo "configure:2890: checking whether the C compiler needs -belf" >&5
2890 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2891   echo $ac_n "(cached) $ac_c" 1>&6
2892 else
2893   cat > conftest.$ac_ext <<EOF
2894 #line 2895 "configure"
2895 #include "confdefs.h"
2896
2897 int main() {
2898
2899 ; return 0; }
2900 EOF
2901 if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2902   rm -rf conftest*
2903   lt_cv_cc_needs_belf=yes
2904 else
2905   echo "configure: failed program was:" >&5
2906   cat conftest.$ac_ext >&5
2907   rm -rf conftest*
2908   lt_cv_cc_needs_belf=no
2909 fi
2910 rm -f conftest*
2911 fi
2912
2913 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2914   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2915     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2916     CFLAGS="$SAVE_CFLAGS"
2917   fi
2918   ;;
2919
2920 *-*-cygwin* | *-*-mingw*)
2921   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2922 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2924 echo "configure:2925: checking for $ac_word" >&5
2925 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2926   echo $ac_n "(cached) $ac_c" 1>&6
2927 else
2928   if test -n "$DLLTOOL"; then
2929   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2930 else
2931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2932   ac_dummy="$PATH"
2933   for ac_dir in $ac_dummy; do
2934     test -z "$ac_dir" && ac_dir=.
2935     if test -f $ac_dir/$ac_word; then
2936       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2937       break
2938     fi
2939   done
2940   IFS="$ac_save_ifs"
2941 fi
2942 fi
2943 DLLTOOL="$ac_cv_prog_DLLTOOL"
2944 if test -n "$DLLTOOL"; then
2945   echo "$ac_t""$DLLTOOL" 1>&6
2946 else
2947   echo "$ac_t""no" 1>&6
2948 fi
2949
2950
2951 if test -z "$ac_cv_prog_DLLTOOL"; then
2952 if test -n "$ac_tool_prefix"; then
2953   # Extract the first word of "dlltool", so it can be a program name with args.
2954 set dummy dlltool; ac_word=$2
2955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2956 echo "configure:2957: checking for $ac_word" >&5
2957 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
2958   echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960   if test -n "$DLLTOOL"; then
2961   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2962 else
2963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2964   ac_dummy="$PATH"
2965   for ac_dir in $ac_dummy; do
2966     test -z "$ac_dir" && ac_dir=.
2967     if test -f $ac_dir/$ac_word; then
2968       ac_cv_prog_DLLTOOL="dlltool"
2969       break
2970     fi
2971   done
2972   IFS="$ac_save_ifs"
2973   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
2974 fi
2975 fi
2976 DLLTOOL="$ac_cv_prog_DLLTOOL"
2977 if test -n "$DLLTOOL"; then
2978   echo "$ac_t""$DLLTOOL" 1>&6
2979 else
2980   echo "$ac_t""no" 1>&6
2981 fi
2982
2983 else
2984   DLLTOOL="false"
2985 fi
2986 fi
2987
2988   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
2989 set dummy ${ac_tool_prefix}as; ac_word=$2
2990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2991 echo "configure:2992: checking for $ac_word" >&5
2992 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
2993   echo $ac_n "(cached) $ac_c" 1>&6
2994 else
2995   if test -n "$AS"; then
2996   ac_cv_prog_AS="$AS" # Let the user override the test.
2997 else
2998   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2999   ac_dummy="$PATH"
3000   for ac_dir in $ac_dummy; do
3001     test -z "$ac_dir" && ac_dir=.
3002     if test -f $ac_dir/$ac_word; then
3003       ac_cv_prog_AS="${ac_tool_prefix}as"
3004       break
3005     fi
3006   done
3007   IFS="$ac_save_ifs"
3008 fi
3009 fi
3010 AS="$ac_cv_prog_AS"
3011 if test -n "$AS"; then
3012   echo "$ac_t""$AS" 1>&6
3013 else
3014   echo "$ac_t""no" 1>&6
3015 fi
3016
3017
3018 if test -z "$ac_cv_prog_AS"; then
3019 if test -n "$ac_tool_prefix"; then
3020   # Extract the first word of "as", so it can be a program name with args.
3021 set dummy as; ac_word=$2
3022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3023 echo "configure:3024: checking for $ac_word" >&5
3024 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   if test -n "$AS"; then
3028   ac_cv_prog_AS="$AS" # Let the user override the test.
3029 else
3030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3031   ac_dummy="$PATH"
3032   for ac_dir in $ac_dummy; do
3033     test -z "$ac_dir" && ac_dir=.
3034     if test -f $ac_dir/$ac_word; then
3035       ac_cv_prog_AS="as"
3036       break
3037     fi
3038   done
3039   IFS="$ac_save_ifs"
3040   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3041 fi
3042 fi
3043 AS="$ac_cv_prog_AS"
3044 if test -n "$AS"; then
3045   echo "$ac_t""$AS" 1>&6
3046 else
3047   echo "$ac_t""no" 1>&6
3048 fi
3049
3050 else
3051   AS="false"
3052 fi
3053 fi
3054
3055   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3056 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3057 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3058 echo "configure:3059: checking for $ac_word" >&5
3059 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   if test -n "$OBJDUMP"; then
3063   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3064 else
3065   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3066   ac_dummy="$PATH"
3067   for ac_dir in $ac_dummy; do
3068     test -z "$ac_dir" && ac_dir=.
3069     if test -f $ac_dir/$ac_word; then
3070       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3071       break
3072     fi
3073   done
3074   IFS="$ac_save_ifs"
3075 fi
3076 fi
3077 OBJDUMP="$ac_cv_prog_OBJDUMP"
3078 if test -n "$OBJDUMP"; then
3079   echo "$ac_t""$OBJDUMP" 1>&6
3080 else
3081   echo "$ac_t""no" 1>&6
3082 fi
3083
3084
3085 if test -z "$ac_cv_prog_OBJDUMP"; then
3086 if test -n "$ac_tool_prefix"; then
3087   # Extract the first word of "objdump", so it can be a program name with args.
3088 set dummy objdump; ac_word=$2
3089 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3090 echo "configure:3091: checking for $ac_word" >&5
3091 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3092   echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094   if test -n "$OBJDUMP"; then
3095   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3096 else
3097   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3098   ac_dummy="$PATH"
3099   for ac_dir in $ac_dummy; do
3100     test -z "$ac_dir" && ac_dir=.
3101     if test -f $ac_dir/$ac_word; then
3102       ac_cv_prog_OBJDUMP="objdump"
3103       break
3104     fi
3105   done
3106   IFS="$ac_save_ifs"
3107   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3108 fi
3109 fi
3110 OBJDUMP="$ac_cv_prog_OBJDUMP"
3111 if test -n "$OBJDUMP"; then
3112   echo "$ac_t""$OBJDUMP" 1>&6
3113 else
3114   echo "$ac_t""no" 1>&6
3115 fi
3116
3117 else
3118   OBJDUMP="false"
3119 fi
3120 fi
3121
3122   ;;
3123
3124 esac
3125
3126
3127 # Save cache, so that ltconfig can load it
3128
3129
3130 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3131 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3132 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3133 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3134 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3135 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3136 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3137 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3138
3139 # Reload cache, that may have been modified by ltconfig
3140
3141
3142 # This can be used to rebuild libtool when needed
3143 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3144
3145 # Always use our own libtool.
3146 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3147
3148 # Redirect the config.log output again, so that the ltconfig log is not
3149 # clobbered by the next message.
3150 exec 5>>./config.log
3151
3152
3153 for ac_prog in mawk gawk nawk awk
3154 do
3155 # Extract the first word of "$ac_prog", so it can be a program name with args.
3156 set dummy $ac_prog; ac_word=$2
3157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3158 echo "configure:3159: checking for $ac_word" >&5
3159 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3160   echo $ac_n "(cached) $ac_c" 1>&6
3161 else
3162   if test -n "$AWK"; then
3163   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3164 else
3165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3166   ac_dummy="$PATH"
3167   for ac_dir in $ac_dummy; do
3168     test -z "$ac_dir" && ac_dir=.
3169     if test -f $ac_dir/$ac_word; then
3170       ac_cv_prog_AWK="$ac_prog"
3171       break
3172     fi
3173   done
3174   IFS="$ac_save_ifs"
3175 fi
3176 fi
3177 AWK="$ac_cv_prog_AWK"
3178 if test -n "$AWK"; then
3179   echo "$ac_t""$AWK" 1>&6
3180 else
3181   echo "$ac_t""no" 1>&6
3182 fi
3183
3184 test -n "$AWK" && break
3185 done
3186
3187 # test for ln hardlink support
3188 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3189 echo "configure:3190: checking whether ln works" >&5
3190 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3191   echo $ac_n "(cached) $ac_c" 1>&6
3192 else
3193   rm -f conftest.src conftest.dst
3194 echo "conftest" > conftest.src
3195 if ln conftest.src conftest.dst 2>/dev/null
3196 then
3197   ol_cv_prog_LN_H="ln"
3198 else
3199   ol_cv_prog_LN_H="cp"
3200 fi
3201 rm -f conftest.src conftest.dst
3202
3203 fi
3204 LN_H="$ol_cv_prog_LN_H"
3205 if test "$ol_cv_prog_LN_H" = "ln"; then
3206         echo "$ac_t""yes" 1>&6
3207 else
3208         echo "$ac_t""no" 1>&6
3209 fi
3210
3211 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3212 echo "configure:3213: checking whether ln -s works" >&5
3213 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   rm -f conftestdata
3217 if ln -s X conftestdata 2>/dev/null
3218 then
3219   rm -f conftestdata
3220   ac_cv_prog_LN_S="ln -s"
3221 else
3222   ac_cv_prog_LN_S=ln
3223 fi
3224 fi
3225 LN_S="$ac_cv_prog_LN_S"
3226 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3227   echo "$ac_t""yes" 1>&6
3228 else
3229   echo "$ac_t""no" 1>&6
3230 fi
3231
3232
3233 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3234         LN_S="$LN_H"
3235 fi
3236
3237 # Extract the first word of "sendmail", so it can be a program name with args.
3238 set dummy sendmail; ac_word=$2
3239 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3240 echo "configure:3241: checking for $ac_word" >&5
3241 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3242   echo $ac_n "(cached) $ac_c" 1>&6
3243 else
3244   case "$SENDMAIL" in
3245   /*)
3246   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3247   ;;
3248   ?:/*)
3249   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3250   ;;
3251   *)
3252   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3253   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3254   for ac_dir in $ac_dummy; do 
3255     test -z "$ac_dir" && ac_dir=.
3256     if test -f $ac_dir/$ac_word; then
3257       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3258       break
3259     fi
3260   done
3261   IFS="$ac_save_ifs"
3262   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3263   ;;
3264 esac
3265 fi
3266 SENDMAIL="$ac_cv_path_SENDMAIL"
3267 if test -n "$SENDMAIL"; then
3268   echo "$ac_t""$SENDMAIL" 1>&6
3269 else
3270   echo "$ac_t""no" 1>&6
3271 fi
3272
3273 # Extract the first word of "vi", so it can be a program name with args.
3274 set dummy vi; ac_word=$2
3275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3276 echo "configure:3277: checking for $ac_word" >&5
3277 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3278   echo $ac_n "(cached) $ac_c" 1>&6
3279 else
3280   case "$EDITOR" in
3281   /*)
3282   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3283   ;;
3284   ?:/*)
3285   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3286   ;;
3287   *)
3288   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3289   ac_dummy="$PATH:/usr/ucb"
3290   for ac_dir in $ac_dummy; do 
3291     test -z "$ac_dir" && ac_dir=.
3292     if test -f $ac_dir/$ac_word; then
3293       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3294       break
3295     fi
3296   done
3297   IFS="$ac_save_ifs"
3298   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3299   ;;
3300 esac
3301 fi
3302 EDITOR="$ac_cv_path_EDITOR"
3303 if test -n "$EDITOR"; then
3304   echo "$ac_t""$EDITOR" 1>&6
3305 else
3306   echo "$ac_t""no" 1>&6
3307 fi
3308
3309 # Extract the first word of "finger", so it can be a program name with args.
3310 set dummy finger; ac_word=$2
3311 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3312 echo "configure:3313: checking for $ac_word" >&5
3313 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3314   echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316   case "$FINGER" in
3317   /*)
3318   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3319   ;;
3320   ?:/*)
3321   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3322   ;;
3323   *)
3324   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3325   ac_dummy="$PATH:/usr/ucb"
3326   for ac_dir in $ac_dummy; do 
3327     test -z "$ac_dir" && ac_dir=.
3328     if test -f $ac_dir/$ac_word; then
3329       ac_cv_path_FINGER="$ac_dir/$ac_word"
3330       break
3331     fi
3332   done
3333   IFS="$ac_save_ifs"
3334   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3335   ;;
3336 esac
3337 fi
3338 FINGER="$ac_cv_path_FINGER"
3339 if test -n "$FINGER"; then
3340   echo "$ac_t""$FINGER" 1>&6
3341 else
3342   echo "$ac_t""no" 1>&6
3343 fi
3344
3345
3346 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3347 echo "configure:3348: checking how to run the C preprocessor" >&5
3348 # On Suns, sometimes $CPP names a directory.
3349 if test -n "$CPP" && test -d "$CPP"; then
3350   CPP=
3351 fi
3352 if test -z "$CPP"; then
3353 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3354   echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356     # This must be in double quotes, not single quotes, because CPP may get
3357   # substituted into the Makefile and "${CC-cc}" will confuse make.
3358   CPP="${CC-cc} -E"
3359   # On the NeXT, cc -E runs the code through the compiler's parser,
3360   # not just through cpp.
3361   cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 #include <assert.h>
3365 Syntax Error
3366 EOF
3367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3368 { (eval echo configure:3369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3370 if test -z "$ac_err"; then
3371   :
3372 else
3373   echo "$ac_err" >&5
3374   echo "configure: failed program was:" >&5
3375   cat conftest.$ac_ext >&5
3376   rm -rf conftest*
3377   CPP="${CC-cc} -E -traditional-cpp"
3378   cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 #include <assert.h>
3382 Syntax Error
3383 EOF
3384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3385 { (eval echo configure:3386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3387 if test -z "$ac_err"; then
3388   :
3389 else
3390   echo "$ac_err" >&5
3391   echo "configure: failed program was:" >&5
3392   cat conftest.$ac_ext >&5
3393   rm -rf conftest*
3394   CPP="${CC-cc} -nologo -E"
3395   cat > conftest.$ac_ext <<EOF
3396 #line 3397 "configure"
3397 #include "confdefs.h"
3398 #include <assert.h>
3399 Syntax Error
3400 EOF
3401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3402 { (eval echo configure:3403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3404 if test -z "$ac_err"; then
3405   :
3406 else
3407   echo "$ac_err" >&5
3408   echo "configure: failed program was:" >&5
3409   cat conftest.$ac_ext >&5
3410   rm -rf conftest*
3411   CPP=/lib/cpp
3412 fi
3413 rm -f conftest*
3414 fi
3415 rm -f conftest*
3416 fi
3417 rm -f conftest*
3418   ac_cv_prog_CPP="$CPP"
3419 fi
3420   CPP="$ac_cv_prog_CPP"
3421 else
3422   ac_cv_prog_CPP="$CPP"
3423 fi
3424 echo "$ac_t""$CPP" 1>&6
3425
3426
3427 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3428         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3429
3430 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3431         echo "configure: warning: programs compiled here do run here..." 1>&2
3432         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3433
3434 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3435         echo "configure: warning: programs compiled here do not run here..." 1>&2
3436         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3437 fi
3438
3439 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3440 echo "configure:3441: checking for AIX" >&5
3441 cat > conftest.$ac_ext <<EOF
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3444 #ifdef _AIX
3445   yes
3446 #endif
3447
3448 EOF
3449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3450   egrep "yes" >/dev/null 2>&1; then
3451   rm -rf conftest*
3452   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3453 #define _ALL_SOURCE 1
3454 EOF
3455
3456 else
3457   rm -rf conftest*
3458   echo "$ac_t""no" 1>&6
3459 fi
3460 rm -f conftest*
3461
3462
3463 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3464 echo "configure:3465: checking for POSIXized ISC" >&5
3465 if test -d /etc/conf/kconfig.d &&
3466   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3467 then
3468   echo "$ac_t""yes" 1>&6
3469   ISC=yes # If later tests want to check for ISC.
3470   cat >> confdefs.h <<\EOF
3471 #define _POSIX_SOURCE 1
3472 EOF
3473
3474   if test "$GCC" = yes; then
3475     CC="$CC -posix"
3476   else
3477     CC="$CC -Xp"
3478   fi
3479 else
3480   echo "$ac_t""no" 1>&6
3481   ISC=
3482 fi
3483
3484 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3485 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3486 echo "configure:3487: checking for minix/config.h" >&5
3487 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3488   echo $ac_n "(cached) $ac_c" 1>&6
3489 else
3490   cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 #include <minix/config.h>
3494 EOF
3495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3496 { (eval echo configure:3497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3498 if test -z "$ac_err"; then
3499   rm -rf conftest*
3500   eval "ac_cv_header_$ac_safe=yes"
3501 else
3502   echo "$ac_err" >&5
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   rm -rf conftest*
3506   eval "ac_cv_header_$ac_safe=no"
3507 fi
3508 rm -f conftest*
3509 fi
3510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3511   echo "$ac_t""yes" 1>&6
3512   MINIX=yes
3513 else
3514   echo "$ac_t""no" 1>&6
3515 MINIX=
3516 fi
3517
3518 if test "$MINIX" = yes; then
3519   cat >> confdefs.h <<\EOF
3520 #define _POSIX_SOURCE 1
3521 EOF
3522
3523   cat >> confdefs.h <<\EOF
3524 #define _POSIX_1_SOURCE 2
3525 EOF
3526
3527   cat >> confdefs.h <<\EOF
3528 #define _MINIX 1
3529 EOF
3530
3531 fi
3532
3533
3534 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3535 echo "configure:3536: checking for Cygwin environment" >&5
3536 if eval "test \"\${ac_cv_cygwin+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
3543 int main() {
3544
3545 #ifndef __CYGWIN__
3546 #define __CYGWIN__ __CYGWIN32__
3547 #endif
3548 return __CYGWIN__;
3549 ; return 0; }
3550 EOF
3551 if { (eval echo configure:3552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3552   rm -rf conftest*
3553   ac_cv_cygwin=yes
3554 else
3555   echo "configure: failed program was:" >&5
3556   cat conftest.$ac_ext >&5
3557   rm -rf conftest*
3558   ac_cv_cygwin=no
3559 fi
3560 rm -f conftest*
3561 fi
3562
3563 echo "$ac_t""$ac_cv_cygwin" 1>&6
3564 CYGWIN=
3565 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3566 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3567 echo "configure:3568: checking for mingw32 environment" >&5
3568 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3569   echo $ac_n "(cached) $ac_c" 1>&6
3570 else
3571   cat > conftest.$ac_ext <<EOF
3572 #line 3573 "configure"
3573 #include "confdefs.h"
3574
3575 int main() {
3576 return __MINGW32__;
3577 ; return 0; }
3578 EOF
3579 if { (eval echo configure:3580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3580   rm -rf conftest*
3581   ac_cv_mingw32=yes
3582 else
3583   echo "configure: failed program was:" >&5
3584   cat conftest.$ac_ext >&5
3585   rm -rf conftest*
3586   ac_cv_mingw32=no
3587 fi
3588 rm -f conftest*
3589 fi
3590
3591 echo "$ac_t""$ac_cv_mingw32" 1>&6
3592 MINGW32=
3593 test "$ac_cv_mingw32" = yes && MINGW32=yes
3594 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3595 echo "configure:3596: checking for EMX OS/2 environment" >&5
3596 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3597   echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599   cat > conftest.$ac_ext <<EOF
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602
3603 int main() {
3604 return __EMX__;
3605 ; return 0; }
3606 EOF
3607 if { (eval echo configure:3608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3608   rm -rf conftest*
3609   ac_cv_emxos2=yes
3610 else
3611   echo "configure: failed program was:" >&5
3612   cat conftest.$ac_ext >&5
3613   rm -rf conftest*
3614   ac_cv_emxos2=no
3615 fi
3616 rm -f conftest*
3617 fi
3618
3619 echo "$ac_t""$ac_cv_emxos2" 1>&6
3620 EMXOS2=
3621 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3622
3623
3624
3625 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3626 echo "configure:3627: checking for executable suffix" >&5
3627 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3631   ac_cv_exeext=.exe
3632 else
3633   rm -f conftest*
3634   echo 'int main () { return 0; }' > conftest.$ac_ext
3635   ac_cv_exeext=
3636   if { (eval echo configure:3637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3637     for file in conftest.*; do
3638       case $file in
3639       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3640       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3641       esac
3642     done
3643   else
3644     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3645   fi
3646   rm -f conftest*
3647   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3648 fi
3649 fi
3650
3651 EXEEXT=""
3652 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3653 echo "$ac_t""${ac_cv_exeext}" 1>&6
3654 ac_exeext=$EXEEXT
3655
3656 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3657 echo "configure:3658: checking for object suffix" >&5
3658 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3659   echo $ac_n "(cached) $ac_c" 1>&6
3660 else
3661   rm -f conftest*
3662 echo 'int i = 1;' > conftest.$ac_ext
3663 if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3664   for ac_file in conftest.*; do
3665     case $ac_file in
3666     *.c) ;;
3667     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3668     esac
3669   done
3670 else
3671   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3672 fi
3673 rm -f conftest*
3674 fi
3675
3676 echo "$ac_t""$ac_cv_objext" 1>&6
3677 OBJEXT=$ac_cv_objext
3678 ac_objext=$ac_cv_objext
3679
3680
3681 cat >> confdefs.h <<EOF
3682 #define EXEEXT "${EXEEXT}"
3683 EOF
3684
3685
3686 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3687 echo "configure:3688: checking for be_app in -lbe" >&5
3688 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3690   echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692   ac_save_LIBS="$LIBS"
3693 LIBS="-lbe -lroot -lnet $LIBS"
3694 cat > conftest.$ac_ext <<EOF
3695 #line 3696 "configure"
3696 #include "confdefs.h"
3697 /* Override any gcc2 internal prototype to avoid an error.  */
3698 /* We use char because int might match the return type of a gcc2
3699     builtin and then its argument prototype would still apply.  */
3700 char be_app();
3701
3702 int main() {
3703 be_app()
3704 ; return 0; }
3705 EOF
3706 if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3707   rm -rf conftest*
3708   eval "ac_cv_lib_$ac_lib_var=yes"
3709 else
3710   echo "configure: failed program was:" >&5
3711   cat conftest.$ac_ext >&5
3712   rm -rf conftest*
3713   eval "ac_cv_lib_$ac_lib_var=no"
3714 fi
3715 rm -f conftest*
3716 LIBS="$ac_save_LIBS"
3717
3718 fi
3719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3720   echo "$ac_t""yes" 1>&6
3721   LIBS="$LIBS -lbe -lroot -lnet"
3722 else
3723   echo "$ac_t""no" 1>&6
3724 :
3725 fi
3726
3727
3728
3729
3730
3731 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3732 echo "configure:3733: checking for ${CC-cc} option to accept ANSI C" >&5
3733 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3734   echo $ac_n "(cached) $ac_c" 1>&6
3735 else
3736   am_cv_prog_cc_stdc=no
3737 ac_save_CC="$CC"
3738 # Don't try gcc -ansi; that turns off useful extensions and
3739 # breaks some systems' header files.
3740 # AIX                   -qlanglvl=ansi
3741 # Ultrix and OSF/1      -std1
3742 # HP-UX 10.20 and later -Ae
3743 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3744 # SVR4                  -Xc -D__EXTENSIONS__
3745 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3746 do
3747   CC="$ac_save_CC $ac_arg"
3748   cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 #include <stdarg.h>
3752 #include <stdio.h>
3753 #include <sys/types.h>
3754 #include <sys/stat.h>
3755 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3756 struct buf { int x; };
3757 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3758 static char *e (p, i)
3759      char **p;
3760      int i;
3761 {
3762   return p[i];
3763 }
3764 static char *f (char * (*g) (char **, int), char **p, ...)
3765 {
3766   char *s;
3767   va_list v;
3768   va_start (v,p);
3769   s = g (p, va_arg (v,int));
3770   va_end (v);
3771   return s;
3772 }
3773 int test (int i, double x);
3774 struct s1 {int (*f) (int a);};
3775 struct s2 {int (*f) (double a);};
3776 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3777 int argc;
3778 char **argv;
3779
3780 int main() {
3781
3782 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3783
3784 ; return 0; }
3785 EOF
3786 if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3787   rm -rf conftest*
3788   am_cv_prog_cc_stdc="$ac_arg"; break
3789 else
3790   echo "configure: failed program was:" >&5
3791   cat conftest.$ac_ext >&5
3792 fi
3793 rm -f conftest*
3794 done
3795 CC="$ac_save_CC"
3796
3797 fi
3798
3799 if test -z "$am_cv_prog_cc_stdc"; then
3800   echo "$ac_t""none needed" 1>&6
3801 else
3802   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3803 fi
3804 case "x$am_cv_prog_cc_stdc" in
3805   x|xno) ;;
3806   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3807 esac
3808
3809 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3810         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3811 fi
3812
3813 # test for make depend flag
3814 OL_MKDEP=
3815 OL_MKDEP_FLAGS=
3816 if test -z "${MKDEP}"; then
3817         OL_MKDEP="${CC-cc}"
3818         if test -z "${MKDEP_FLAGS}"; then
3819                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3820 echo "configure:3821: checking for ${OL_MKDEP} depend flag" >&5
3821 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3822   echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824   
3825                         ol_cv_mkdep=no
3826                         for flag in "-M" "-xM"; do
3827                                 cat > conftest.c <<EOF
3828  noCode;
3829 EOF
3830                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3831                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3832                                 then
3833                                         if test ! -f conftest."${ac_object}" ; then
3834                                                 ol_cv_mkdep=$flag
3835                                                 OL_MKDEP_FLAGS="$flag"
3836                                                 break
3837                                         fi
3838                                 fi
3839                         done
3840                         rm -f conftest*
3841                 
3842 fi
3843
3844 echo "$ac_t""$ol_cv_mkdep" 1>&6
3845         else
3846                 cc_cv_mkdep=yes
3847                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3848         fi
3849 else
3850         cc_cv_mkdep=yes
3851         OL_MKDEP="${MKDEP}"
3852         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3853 fi
3854
3855
3856
3857 if test "${ol_cv_mkdep}" = no ; then
3858         # this will soon become an error
3859         echo "configure: warning: do not know how to generate dependencies" 1>&2
3860 fi
3861
3862 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3863 echo "configure:3864: checking for afopen in -ls" >&5
3864 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
3865 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3866   echo $ac_n "(cached) $ac_c" 1>&6
3867 else
3868   ac_save_LIBS="$LIBS"
3869 LIBS="-ls  $LIBS"
3870 cat > conftest.$ac_ext <<EOF
3871 #line 3872 "configure"
3872 #include "confdefs.h"
3873 /* Override any gcc2 internal prototype to avoid an error.  */
3874 /* We use char because int might match the return type of a gcc2
3875     builtin and then its argument prototype would still apply.  */
3876 char afopen();
3877
3878 int main() {
3879 afopen()
3880 ; return 0; }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3883   rm -rf conftest*
3884   eval "ac_cv_lib_$ac_lib_var=yes"
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   eval "ac_cv_lib_$ac_lib_var=no"
3890 fi
3891 rm -f conftest*
3892 LIBS="$ac_save_LIBS"
3893
3894 fi
3895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3896   echo "$ac_t""yes" 1>&6
3897   
3898         AUTH_LIBS=-ls
3899         cat >> confdefs.h <<\EOF
3900 #define HAVE_AIX_SECURITY 1
3901 EOF
3902
3903
3904 else
3905   echo "$ac_t""no" 1>&6
3906 fi
3907
3908
3909
3910 ol_link_modules=no
3911 if test $ol_enable_modules != no ; then
3912         for ac_hdr in ltdl.h
3913 do
3914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3916 echo "configure:3917: checking for $ac_hdr" >&5
3917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3918   echo $ac_n "(cached) $ac_c" 1>&6
3919 else
3920   cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3923 #include <$ac_hdr>
3924 EOF
3925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3926 { (eval echo configure:3927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3928 if test -z "$ac_err"; then
3929   rm -rf conftest*
3930   eval "ac_cv_header_$ac_safe=yes"
3931 else
3932   echo "$ac_err" >&5
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -rf conftest*
3936   eval "ac_cv_header_$ac_safe=no"
3937 fi
3938 rm -f conftest*
3939 fi
3940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3941   echo "$ac_t""yes" 1>&6
3942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3943   cat >> confdefs.h <<EOF
3944 #define $ac_tr_hdr 1
3945 EOF
3946  
3947 else
3948   echo "$ac_t""no" 1>&6
3949 fi
3950 done
3951
3952
3953         if test $ac_cv_header_ltdl_h = no ; then
3954                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3955         fi
3956
3957         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3958 echo "configure:3959: checking for lt_dlinit in -lltdl" >&5
3959 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3961   echo $ac_n "(cached) $ac_c" 1>&6
3962 else
3963   ac_save_LIBS="$LIBS"
3964 LIBS="-lltdl  $LIBS"
3965 cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3968 /* Override any gcc2 internal prototype to avoid an error.  */
3969 /* We use char because int might match the return type of a gcc2
3970     builtin and then its argument prototype would still apply.  */
3971 char lt_dlinit();
3972
3973 int main() {
3974 lt_dlinit()
3975 ; return 0; }
3976 EOF
3977 if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3978   rm -rf conftest*
3979   eval "ac_cv_lib_$ac_lib_var=yes"
3980 else
3981   echo "configure: failed program was:" >&5
3982   cat conftest.$ac_ext >&5
3983   rm -rf conftest*
3984   eval "ac_cv_lib_$ac_lib_var=no"
3985 fi
3986 rm -f conftest*
3987 LIBS="$ac_save_LIBS"
3988
3989 fi
3990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3991   echo "$ac_t""yes" 1>&6
3992   
3993             MODULES_LIBS=-lltdl
3994             cat >> confdefs.h <<\EOF
3995 #define HAVE_LIBLTDL 1
3996 EOF
3997
3998         
3999 else
4000   echo "$ac_t""no" 1>&6
4001 fi
4002
4003
4004         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4005                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4006         fi
4007         ol_link_modules=yes
4008 else
4009         ol_with_dnssrv_module=static
4010         ol_with_ldap_module=static
4011         ol_with_ldbm_module=static
4012         ol_with_passwd_module=static
4013         ol_with_shell_module=static
4014         ol_with_sql_module=static
4015 fi
4016
4017 # test for EBCDIC
4018 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4019 echo "configure:4020: checking for EBCDIC" >&5
4020 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4021   echo $ac_n "(cached) $ac_c" 1>&6
4022 else
4023   
4024         cat > conftest.$ac_ext <<EOF
4025 #line 4026 "configure"
4026 #include "confdefs.h"
4027
4028 #if !('M' == 0xd4)
4029 #include <__ASCII__/generate_error.h>
4030 #endif
4031
4032 EOF
4033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4034 { (eval echo configure:4035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4036 if test -z "$ac_err"; then
4037   rm -rf conftest*
4038   ol_cv_cpp_ebcdic=yes
4039 else
4040   echo "$ac_err" >&5
4041   echo "configure: failed program was:" >&5
4042   cat conftest.$ac_ext >&5
4043   rm -rf conftest*
4044   ol_cv_cpp_ebcdic=no
4045 fi
4046 rm -f conftest*
4047 fi
4048
4049 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4050 if test $ol_cv_cpp_ebcdic = yes ; then
4051         cat >> confdefs.h <<\EOF
4052 #define HAVE_EBCDIC 1
4053 EOF
4054
4055 fi
4056
4057 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4058 echo "configure:4059: checking for ANSI C header files" >&5
4059 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4060   echo $ac_n "(cached) $ac_c" 1>&6
4061 else
4062   cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065 #include <stdlib.h>
4066 #include <stdarg.h>
4067 #include <string.h>
4068 #include <float.h>
4069 EOF
4070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4071 { (eval echo configure:4072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4072 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4073 if test -z "$ac_err"; then
4074   rm -rf conftest*
4075   ol_cv_header_stdc=yes
4076 else
4077   echo "$ac_err" >&5
4078   echo "configure: failed program was:" >&5
4079   cat conftest.$ac_ext >&5
4080   rm -rf conftest*
4081   ol_cv_header_stdc=no
4082 fi
4083 rm -f conftest*
4084
4085 if test $ol_cv_header_stdc = yes; then
4086   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4087 cat > conftest.$ac_ext <<EOF
4088 #line 4089 "configure"
4089 #include "confdefs.h"
4090 #include <string.h>
4091 EOF
4092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4093   egrep "memchr" >/dev/null 2>&1; then
4094   :
4095 else
4096   rm -rf conftest*
4097   ol_cv_header_stdc=no
4098 fi
4099 rm -f conftest*
4100
4101 fi
4102
4103 if test $ol_cv_header_stdc = yes; then
4104   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4105 cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4108 #include <stdlib.h>
4109 EOF
4110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4111   egrep "free" >/dev/null 2>&1; then
4112   :
4113 else
4114   rm -rf conftest*
4115   ol_cv_header_stdc=no
4116 fi
4117 rm -f conftest*
4118
4119 fi
4120
4121 if test $ol_cv_header_stdc = yes; then
4122   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4123 if test "$cross_compiling" = yes; then
4124   :
4125 else
4126   cat > conftest.$ac_ext <<EOF
4127 #line 4128 "configure"
4128 #include "confdefs.h"
4129 #include <ctype.h>
4130 #ifndef HAVE_EBCDIC
4131 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4132 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4133 #else
4134 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4135                 || ('j' <= (c) && (c) <= 'r') \
4136                 || ('s' <= (c) && (c) <= 'z'))
4137 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4138 #endif
4139 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4140 int main () { int i; for (i = 0; i < 256; i++)
4141 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4142 exit (0); }
4143
4144 EOF
4145 if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4146 then
4147   :
4148 else
4149   echo "configure: failed program was:" >&5
4150   cat conftest.$ac_ext >&5
4151   rm -fr conftest*
4152   ol_cv_header_stdc=no
4153 fi
4154 rm -fr conftest*
4155 fi
4156
4157 fi
4158 fi
4159
4160 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4161 if test $ol_cv_header_stdc = yes; then
4162   cat >> confdefs.h <<\EOF
4163 #define STDC_HEADERS 1
4164 EOF
4165
4166 fi
4167 ac_cv_header_stdc=disable
4168
4169
4170 if test $ol_cv_header_stdc != yes; then
4171         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4172 fi
4173
4174 ac_header_dirent=no
4175 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4176 do
4177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4178 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4179 echo "configure:4180: checking for $ac_hdr that defines DIR" >&5
4180 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4181   echo $ac_n "(cached) $ac_c" 1>&6
4182 else
4183   cat > conftest.$ac_ext <<EOF
4184 #line 4185 "configure"
4185 #include "confdefs.h"
4186 #include <sys/types.h>
4187 #include <$ac_hdr>
4188 int main() {
4189 DIR *dirp = 0;
4190 ; return 0; }
4191 EOF
4192 if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4193   rm -rf conftest*
4194   eval "ac_cv_header_dirent_$ac_safe=yes"
4195 else
4196   echo "configure: failed program was:" >&5
4197   cat conftest.$ac_ext >&5
4198   rm -rf conftest*
4199   eval "ac_cv_header_dirent_$ac_safe=no"
4200 fi
4201 rm -f conftest*
4202 fi
4203 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4204   echo "$ac_t""yes" 1>&6
4205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4206   cat >> confdefs.h <<EOF
4207 #define $ac_tr_hdr 1
4208 EOF
4209  ac_header_dirent=$ac_hdr; break
4210 else
4211   echo "$ac_t""no" 1>&6
4212 fi
4213 done
4214 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4215 if test $ac_header_dirent = dirent.h; then
4216 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4217 echo "configure:4218: checking for opendir in -ldir" >&5
4218 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4220   echo $ac_n "(cached) $ac_c" 1>&6
4221 else
4222   ac_save_LIBS="$LIBS"
4223 LIBS="-ldir  $LIBS"
4224 cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 /* Override any gcc2 internal prototype to avoid an error.  */
4228 /* We use char because int might match the return type of a gcc2
4229     builtin and then its argument prototype would still apply.  */
4230 char opendir();
4231
4232 int main() {
4233 opendir()
4234 ; return 0; }
4235 EOF
4236 if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4237   rm -rf conftest*
4238   eval "ac_cv_lib_$ac_lib_var=yes"
4239 else
4240   echo "configure: failed program was:" >&5
4241   cat conftest.$ac_ext >&5
4242   rm -rf conftest*
4243   eval "ac_cv_lib_$ac_lib_var=no"
4244 fi
4245 rm -f conftest*
4246 LIBS="$ac_save_LIBS"
4247
4248 fi
4249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4250   echo "$ac_t""yes" 1>&6
4251   LIBS="$LIBS -ldir"
4252 else
4253   echo "$ac_t""no" 1>&6
4254 fi
4255
4256 else
4257 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4258 echo "configure:4259: checking for opendir in -lx" >&5
4259 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4261   echo $ac_n "(cached) $ac_c" 1>&6
4262 else
4263   ac_save_LIBS="$LIBS"
4264 LIBS="-lx  $LIBS"
4265 cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268 /* Override any gcc2 internal prototype to avoid an error.  */
4269 /* We use char because int might match the return type of a gcc2
4270     builtin and then its argument prototype would still apply.  */
4271 char opendir();
4272
4273 int main() {
4274 opendir()
4275 ; return 0; }
4276 EOF
4277 if { (eval echo configure:4278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4278   rm -rf conftest*
4279   eval "ac_cv_lib_$ac_lib_var=yes"
4280 else
4281   echo "configure: failed program was:" >&5
4282   cat conftest.$ac_ext >&5
4283   rm -rf conftest*
4284   eval "ac_cv_lib_$ac_lib_var=no"
4285 fi
4286 rm -f conftest*
4287 LIBS="$ac_save_LIBS"
4288
4289 fi
4290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4291   echo "$ac_t""yes" 1>&6
4292   LIBS="$LIBS -lx"
4293 else
4294   echo "$ac_t""no" 1>&6
4295 fi
4296
4297 fi
4298
4299 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4300 echo "configure:4301: checking for sys/wait.h that is POSIX.1 compatible" >&5
4301 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4302   echo $ac_n "(cached) $ac_c" 1>&6
4303 else
4304   cat > conftest.$ac_ext <<EOF
4305 #line 4306 "configure"
4306 #include "confdefs.h"
4307 #include <sys/types.h>
4308 #include <sys/wait.h>
4309 #ifndef WEXITSTATUS
4310 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4311 #endif
4312 #ifndef WIFEXITED
4313 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4314 #endif
4315 int main() {
4316 int s;
4317 wait (&s);
4318 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4319 ; return 0; }
4320 EOF
4321 if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4322   rm -rf conftest*
4323   ac_cv_header_sys_wait_h=yes
4324 else
4325   echo "configure: failed program was:" >&5
4326   cat conftest.$ac_ext >&5
4327   rm -rf conftest*
4328   ac_cv_header_sys_wait_h=no
4329 fi
4330 rm -f conftest*
4331 fi
4332
4333 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4334 if test $ac_cv_header_sys_wait_h = yes; then
4335   cat >> confdefs.h <<\EOF
4336 #define HAVE_SYS_WAIT_H 1
4337 EOF
4338
4339 fi
4340
4341 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4342 echo "configure:4343: checking POSIX termios" >&5
4343 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4344   echo $ac_n "(cached) $ac_c" 1>&6
4345 else
4346   cat > conftest.$ac_ext <<EOF
4347 #line 4348 "configure"
4348 #include "confdefs.h"
4349 #include <sys/types.h>
4350 #include <unistd.h>
4351 #include <termios.h>
4352 int main() {
4353 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4354    tcgetattr(0, 0);
4355 ; return 0; }
4356 EOF
4357 if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4358   rm -rf conftest*
4359   am_cv_sys_posix_termios=yes
4360 else
4361   echo "configure: failed program was:" >&5
4362   cat conftest.$ac_ext >&5
4363   rm -rf conftest*
4364   am_cv_sys_posix_termios=no
4365 fi
4366 rm -f conftest*
4367 fi
4368
4369 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4370
4371
4372  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4373 echo "configure:4374: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4374 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4375   echo $ac_n "(cached) $ac_c" 1>&6
4376 else
4377   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4378
4379   gwinsz_in_termios_h=no
4380   if test $am_cv_sys_posix_termios = yes; then
4381     cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384 #include <sys/types.h>
4385 #     include <termios.h>
4386 #     ifdef TIOCGWINSZ
4387         yes
4388 #     endif
4389     
4390 EOF
4391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4392   egrep "yes" >/dev/null 2>&1; then
4393   rm -rf conftest*
4394   gwinsz_in_termios_h=yes
4395 fi
4396 rm -f conftest*
4397
4398   fi
4399
4400   if test $gwinsz_in_termios_h = no; then
4401     cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 #include <sys/types.h>
4405 #     include <sys/ioctl.h>
4406 #     ifdef TIOCGWINSZ
4407         yes
4408 #     endif
4409     
4410 EOF
4411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4412   egrep "yes" >/dev/null 2>&1; then
4413   rm -rf conftest*
4414   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4415 fi
4416 rm -f conftest*
4417
4418   fi
4419   
4420 fi
4421
4422 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4423   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4424     cat >> confdefs.h <<\EOF
4425 #define GWINSZ_IN_SYS_IOCTL 1
4426 EOF
4427
4428   fi
4429
4430 if test $am_cv_sys_posix_termios = yes ; then
4431         cat >> confdefs.h <<\EOF
4432 #define HAVE_POSIX_TERMIOS 1
4433 EOF
4434
4435 fi
4436
4437 for ac_hdr in \
4438         arpa/inet.h             \
4439         arpa/nameser.h  \
4440         assert.h                \
4441         conio.h                 \
4442         crypt.h                 \
4443         direct.h                \
4444         errno.h                 \
4445         fcntl.h                 \
4446         filio.h                 \
4447         getopt.h                \
4448         grp.h                   \
4449         io.h                    \
4450         libutil.h               \
4451         limits.h                \
4452         locale.h                \
4453         netinet/tcp.h   \
4454         malloc.h                \
4455         memory.h                \
4456         psap.h                  \
4457         pwd.h                   \
4458         process.h               \
4459         resolv.h                \
4460         sgtty.h                 \
4461         shadow.h                \
4462         stddef.h                \
4463         string.h                \
4464         strings.h               \
4465         sysexits.h              \
4466         sys/file.h              \
4467         sys/filio.h             \
4468         sys/errno.h             \
4469         sys/ioctl.h             \
4470         sys/param.h             \
4471         sys/resource.h  \
4472         sys/select.h    \
4473         sys/socket.h    \
4474         sys/syslog.h    \
4475         sys/time.h              \
4476         sys/types.h             \
4477         syslog.h                \
4478         termios.h               \
4479         unistd.h                \
4480         winsock.h               \
4481
4482 do
4483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4485 echo "configure:4486: checking for $ac_hdr" >&5
4486 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4487   echo $ac_n "(cached) $ac_c" 1>&6
4488 else
4489   cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492 #include <$ac_hdr>
4493 EOF
4494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4495 { (eval echo configure:4496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4497 if test -z "$ac_err"; then
4498   rm -rf conftest*
4499   eval "ac_cv_header_$ac_safe=yes"
4500 else
4501   echo "$ac_err" >&5
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   eval "ac_cv_header_$ac_safe=no"
4506 fi
4507 rm -f conftest*
4508 fi
4509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4510   echo "$ac_t""yes" 1>&6
4511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4512   cat >> confdefs.h <<EOF
4513 #define $ac_tr_hdr 1
4514 EOF
4515  
4516 else
4517   echo "$ac_t""no" 1>&6
4518 fi
4519 done
4520
4521
4522
4523
4524 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4525 echo "configure:4526: checking for dlopen" >&5
4526 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
4527   echo $ac_n "(cached) $ac_c" 1>&6
4528 else
4529   cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 /* System header to define __stub macros and hopefully few prototypes,
4533     which can conflict with char dlopen(); below.  */
4534 #include <assert.h>
4535 /* Override any gcc2 internal prototype to avoid an error.  */
4536 /* We use char because int might match the return type of a gcc2
4537     builtin and then its argument prototype would still apply.  */
4538 char dlopen();
4539 char (*f)();
4540
4541 int main() {
4542
4543 /* The GNU C library defines this for functions which it implements
4544     to always fail with ENOSYS.  Some functions are actually named
4545     something starting with __ and the normal name is an alias.  */
4546 #if defined (__stub_dlopen) || defined (__stub___dlopen)
4547 choke me
4548 #else
4549 f = dlopen;
4550 #endif
4551
4552 ; return 0; }
4553 EOF
4554 if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4555   rm -rf conftest*
4556   eval "ac_cv_func_dlopen=yes"
4557 else
4558   echo "configure: failed program was:" >&5
4559   cat conftest.$ac_ext >&5
4560   rm -rf conftest*
4561   eval "ac_cv_func_dlopen=no"
4562 fi
4563 rm -f conftest*
4564 fi
4565
4566 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
4567   echo "$ac_t""yes" 1>&6
4568   :
4569 else
4570   echo "$ac_t""no" 1>&6
4571 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4572 echo "configure:4573: checking for dlopen in -ldl" >&5
4573 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
4574 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4575   echo $ac_n "(cached) $ac_c" 1>&6
4576 else
4577   ac_save_LIBS="$LIBS"
4578 LIBS="-ldl  $LIBS"
4579 cat > conftest.$ac_ext <<EOF
4580 #line 4581 "configure"
4581 #include "confdefs.h"
4582 /* Override any gcc2 internal prototype to avoid an error.  */
4583 /* We use char because int might match the return type of a gcc2
4584     builtin and then its argument prototype would still apply.  */
4585 char dlopen();
4586
4587 int main() {
4588 dlopen()
4589 ; return 0; }
4590 EOF
4591 if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4592   rm -rf conftest*
4593   eval "ac_cv_lib_$ac_lib_var=yes"
4594 else
4595   echo "configure: failed program was:" >&5
4596   cat conftest.$ac_ext >&5
4597   rm -rf conftest*
4598   eval "ac_cv_lib_$ac_lib_var=no"
4599 fi
4600 rm -f conftest*
4601 LIBS="$ac_save_LIBS"
4602
4603 fi
4604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4605   echo "$ac_t""yes" 1>&6
4606     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4607     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4608   cat >> confdefs.h <<EOF
4609 #define $ac_tr_lib 1
4610 EOF
4611
4612   LIBS="-ldl $LIBS"
4613
4614 else
4615   echo "$ac_t""no" 1>&6
4616 fi
4617
4618 fi
4619
4620
4621 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4622 echo "configure:4623: checking for sigset in -lV3" >&5
4623 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   ac_save_LIBS="$LIBS"
4628 LIBS="-lV3  $LIBS"
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 /* Override any gcc2 internal prototype to avoid an error.  */
4633 /* We use char because int might match the return type of a gcc2
4634     builtin and then its argument prototype would still apply.  */
4635 char sigset();
4636
4637 int main() {
4638 sigset()
4639 ; return 0; }
4640 EOF
4641 if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642   rm -rf conftest*
4643   eval "ac_cv_lib_$ac_lib_var=yes"
4644 else
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -rf conftest*
4648   eval "ac_cv_lib_$ac_lib_var=no"
4649 fi
4650 rm -f conftest*
4651 LIBS="$ac_save_LIBS"
4652
4653 fi
4654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4655   echo "$ac_t""yes" 1>&6
4656     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4657     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4658   cat >> confdefs.h <<EOF
4659 #define $ac_tr_lib 1
4660 EOF
4661
4662   LIBS="-lV3 $LIBS"
4663
4664 else
4665   echo "$ac_t""no" 1>&6
4666 fi
4667
4668
4669 if test $ac_cv_header_winsock_h = yes; then
4670         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4671 echo "configure:4672: checking for winsock" >&5
4672 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4673   echo $ac_n "(cached) $ac_c" 1>&6
4674 else
4675   cat > conftest.$ac_ext <<EOF
4676 #line 4677 "configure"
4677 #include "confdefs.h"
4678 #include <winsock.h>
4679 int main() {
4680
4681                         socket(0,0,0);
4682                         select(0,NULL,NULL,NULL,NULL);
4683                         closesocket(0);
4684                         gethostname(NULL,0);
4685         
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   ol_cv_winsock=yes
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   ol_cv_winsock=no
4696 fi
4697 rm -f conftest*]
4698 fi
4699
4700 echo "$ac_t""$ol_cv_winsock" 1>&6
4701
4702         if test $ol_cv_winsock = yes ; then
4703                 cat >> confdefs.h <<\EOF
4704 #define HAVE_WINSOCK 1
4705 EOF
4706
4707                 ac_cv_func_socket=yes
4708                 ac_cv_func_select=yes
4709                 ac_cv_func_closesocket=yes
4710                 ac_cv_func_gethostname=yes
4711         fi
4712 fi
4713
4714
4715 echo $ac_n "checking for socket""... $ac_c" 1>&6
4716 echo "configure:4717: checking for socket" >&5
4717 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4718   echo $ac_n "(cached) $ac_c" 1>&6
4719 else
4720   cat > conftest.$ac_ext <<EOF
4721 #line 4722 "configure"
4722 #include "confdefs.h"
4723 /* System header to define __stub macros and hopefully few prototypes,
4724     which can conflict with char socket(); below.  */
4725 #include <assert.h>
4726 /* Override any gcc2 internal prototype to avoid an error.  */
4727 /* We use char because int might match the return type of a gcc2
4728     builtin and then its argument prototype would still apply.  */
4729 char socket();
4730 char (*f)();
4731
4732 int main() {
4733
4734 /* The GNU C library defines this for functions which it implements
4735     to always fail with ENOSYS.  Some functions are actually named
4736     something starting with __ and the normal name is an alias.  */
4737 #if defined (__stub_socket) || defined (__stub___socket)
4738 choke me
4739 #else
4740 f = socket;
4741 #endif
4742
4743 ; return 0; }
4744 EOF
4745 if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4746   rm -rf conftest*
4747   eval "ac_cv_func_socket=yes"
4748 else
4749   echo "configure: failed program was:" >&5
4750   cat conftest.$ac_ext >&5
4751   rm -rf conftest*
4752   eval "ac_cv_func_socket=no"
4753 fi
4754 rm -f conftest*
4755 fi
4756
4757 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4758   echo "$ac_t""yes" 1>&6
4759   :
4760 else
4761   echo "$ac_t""no" 1>&6
4762         
4763         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4764 echo "configure:4765: checking for main in -lsocket" >&5
4765 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4766 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4767   echo $ac_n "(cached) $ac_c" 1>&6
4768 else
4769   ac_save_LIBS="$LIBS"
4770 LIBS="-lsocket  $LIBS"
4771 cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774
4775 int main() {
4776 main()
4777 ; return 0; }
4778 EOF
4779 if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4780   rm -rf conftest*
4781   eval "ac_cv_lib_$ac_lib_var=yes"
4782 else
4783   echo "configure: failed program was:" >&5
4784   cat conftest.$ac_ext >&5
4785   rm -rf conftest*
4786   eval "ac_cv_lib_$ac_lib_var=no"
4787 fi
4788 rm -f conftest*
4789 LIBS="$ac_save_LIBS"
4790
4791 fi
4792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4793   echo "$ac_t""yes" 1>&6
4794     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4795     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4796   cat >> confdefs.h <<EOF
4797 #define $ac_tr_lib 1
4798 EOF
4799
4800   LIBS="-lsocket $LIBS"
4801
4802 else
4803   echo "$ac_t""no" 1>&6
4804 fi
4805
4806         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4807 echo "configure:4808: checking for main in -lnet" >&5
4808 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4809 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4810   echo $ac_n "(cached) $ac_c" 1>&6
4811 else
4812   ac_save_LIBS="$LIBS"
4813 LIBS="-lnet  $LIBS"
4814 cat > conftest.$ac_ext <<EOF
4815 #line 4816 "configure"
4816 #include "confdefs.h"
4817
4818 int main() {
4819 main()
4820 ; return 0; }
4821 EOF
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4823   rm -rf conftest*
4824   eval "ac_cv_lib_$ac_lib_var=yes"
4825 else
4826   echo "configure: failed program was:" >&5
4827   cat conftest.$ac_ext >&5
4828   rm -rf conftest*
4829   eval "ac_cv_lib_$ac_lib_var=no"
4830 fi
4831 rm -f conftest*
4832 LIBS="$ac_save_LIBS"
4833
4834 fi
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4836   echo "$ac_t""yes" 1>&6
4837     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4839   cat >> confdefs.h <<EOF
4840 #define $ac_tr_lib 1
4841 EOF
4842
4843   LIBS="-lnet $LIBS"
4844
4845 else
4846   echo "$ac_t""no" 1>&6
4847 fi
4848
4849         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4850 echo "configure:4851: checking for main in -lnsl_s" >&5
4851 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4852 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4853   echo $ac_n "(cached) $ac_c" 1>&6
4854 else
4855   ac_save_LIBS="$LIBS"
4856 LIBS="-lnsl_s  $LIBS"
4857 cat > conftest.$ac_ext <<EOF
4858 #line 4859 "configure"
4859 #include "confdefs.h"
4860
4861 int main() {
4862 main()
4863 ; return 0; }
4864 EOF
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866   rm -rf conftest*
4867   eval "ac_cv_lib_$ac_lib_var=yes"
4868 else
4869   echo "configure: failed program was:" >&5
4870   cat conftest.$ac_ext >&5
4871   rm -rf conftest*
4872   eval "ac_cv_lib_$ac_lib_var=no"
4873 fi
4874 rm -f conftest*
4875 LIBS="$ac_save_LIBS"
4876
4877 fi
4878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4879   echo "$ac_t""yes" 1>&6
4880     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4881     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4882   cat >> confdefs.h <<EOF
4883 #define $ac_tr_lib 1
4884 EOF
4885
4886   LIBS="-lnsl_s $LIBS"
4887
4888 else
4889   echo "$ac_t""no" 1>&6
4890 fi
4891
4892         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4893 echo "configure:4894: checking for main in -lnsl" >&5
4894 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4895 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   ac_save_LIBS="$LIBS"
4899 LIBS="-lnsl  $LIBS"
4900 cat > conftest.$ac_ext <<EOF
4901 #line 4902 "configure"
4902 #include "confdefs.h"
4903
4904 int main() {
4905 main()
4906 ; return 0; }
4907 EOF
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=yes"
4911 else
4912   echo "configure: failed program was:" >&5
4913   cat conftest.$ac_ext >&5
4914   rm -rf conftest*
4915   eval "ac_cv_lib_$ac_lib_var=no"
4916 fi
4917 rm -f conftest*
4918 LIBS="$ac_save_LIBS"
4919
4920 fi
4921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4922   echo "$ac_t""yes" 1>&6
4923     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4924     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4925   cat >> confdefs.h <<EOF
4926 #define $ac_tr_lib 1
4927 EOF
4928
4929   LIBS="-lnsl $LIBS"
4930
4931 else
4932   echo "$ac_t""no" 1>&6
4933 fi
4934
4935         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4936 echo "configure:4937: checking for socket in -linet" >&5
4937 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4939   echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941   ac_save_LIBS="$LIBS"
4942 LIBS="-linet  $LIBS"
4943 cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946 /* Override any gcc2 internal prototype to avoid an error.  */
4947 /* We use char because int might match the return type of a gcc2
4948     builtin and then its argument prototype would still apply.  */
4949 char socket();
4950
4951 int main() {
4952 socket()
4953 ; return 0; }
4954 EOF
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4956   rm -rf conftest*
4957   eval "ac_cv_lib_$ac_lib_var=yes"
4958 else
4959   echo "configure: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=no"
4963 fi
4964 rm -f conftest*
4965 LIBS="$ac_save_LIBS"
4966
4967 fi
4968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4969   echo "$ac_t""yes" 1>&6
4970     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4971     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4972   cat >> confdefs.h <<EOF
4973 #define $ac_tr_lib 1
4974 EOF
4975
4976   LIBS="-linet $LIBS"
4977
4978 else
4979   echo "$ac_t""no" 1>&6
4980 fi
4981
4982         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4983 echo "configure:4984: checking for main in -lgen" >&5
4984 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4986   echo $ac_n "(cached) $ac_c" 1>&6
4987 else
4988   ac_save_LIBS="$LIBS"
4989 LIBS="-lgen  $LIBS"
4990 cat > conftest.$ac_ext <<EOF
4991 #line 4992 "configure"
4992 #include "confdefs.h"
4993
4994 int main() {
4995 main()
4996 ; return 0; }
4997 EOF
4998 if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4999   rm -rf conftest*
5000   eval "ac_cv_lib_$ac_lib_var=yes"
5001 else
5002   echo "configure: failed program was:" >&5
5003   cat conftest.$ac_ext >&5
5004   rm -rf conftest*
5005   eval "ac_cv_lib_$ac_lib_var=no"
5006 fi
5007 rm -f conftest*
5008 LIBS="$ac_save_LIBS"
5009
5010 fi
5011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5012   echo "$ac_t""yes" 1>&6
5013     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5015   cat >> confdefs.h <<EOF
5016 #define $ac_tr_lib 1
5017 EOF
5018
5019   LIBS="-lgen $LIBS"
5020
5021 else
5022   echo "$ac_t""no" 1>&6
5023 fi
5024
5025
5026 fi
5027
5028
5029 echo $ac_n "checking for select""... $ac_c" 1>&6
5030 echo "configure:5031: checking for select" >&5
5031 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5032   echo $ac_n "(cached) $ac_c" 1>&6
5033 else
5034   cat > conftest.$ac_ext <<EOF
5035 #line 5036 "configure"
5036 #include "confdefs.h"
5037 /* System header to define __stub macros and hopefully few prototypes,
5038     which can conflict with char select(); below.  */
5039 #include <assert.h>
5040 /* Override any gcc2 internal prototype to avoid an error.  */
5041 /* We use char because int might match the return type of a gcc2
5042     builtin and then its argument prototype would still apply.  */
5043 char select();
5044 char (*f)();
5045
5046 int main() {
5047
5048 /* The GNU C library defines this for functions which it implements
5049     to always fail with ENOSYS.  Some functions are actually named
5050     something starting with __ and the normal name is an alias.  */
5051 #if defined (__stub_select) || defined (__stub___select)
5052 choke me
5053 #else
5054 f = select;
5055 #endif
5056
5057 ; return 0; }
5058 EOF
5059 if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5060   rm -rf conftest*
5061   eval "ac_cv_func_select=yes"
5062 else
5063   echo "configure: failed program was:" >&5
5064   cat conftest.$ac_ext >&5
5065   rm -rf conftest*
5066   eval "ac_cv_func_select=no"
5067 fi
5068 rm -f conftest*
5069 fi
5070
5071 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5072   echo "$ac_t""yes" 1>&6
5073   :
5074 else
5075   echo "$ac_t""no" 1>&6
5076 { echo "configure: error: select() required." 1>&2; exit 1; }
5077 fi
5078
5079
5080 if test "${ac_cv_header_winsock_h}" != yes; then
5081                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5082 echo "configure:5083: checking types of arguments for select()" >&5
5083  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5084   echo $ac_n "(cached) $ac_c" 1>&6
5085 else
5086    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5087   echo $ac_n "(cached) $ac_c" 1>&6
5088 else
5089     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5090   echo $ac_n "(cached) $ac_c" 1>&6
5091 else
5092      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5093      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5094       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5095        cat > conftest.$ac_ext <<EOF
5096 #line 5097 "configure"
5097 #include "confdefs.h"
5098 #ifdef HAVE_SYS_TYPES_H
5099 #include <sys/types.h>
5100 #endif
5101 #ifdef HAVE_SYS_TIME_H
5102 #include <sys/time.h>
5103 #endif
5104 #ifdef HAVE_SYS_SELECT_H
5105 #include <sys/select.h>
5106 #endif
5107 #ifdef HAVE_SYS_SOCKET_H
5108 #include <sys/socket.h>
5109 #endif
5110 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);
5111 int main() {
5112
5113 ; return 0; }
5114 EOF
5115 if { (eval echo configure:5116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5116   rm -rf conftest*
5117           ac_not_found=no ; break 3
5118 else
5119   echo "configure: failed program was:" >&5
5120   cat conftest.$ac_ext >&5
5121   rm -rf conftest*
5122   ac_not_found=yes
5123 fi
5124 rm -f conftest*
5125       done
5126      done
5127     done
5128    
5129 fi
5130   
5131 fi
5132  
5133 fi
5134  if test "$ac_not_found" = yes; then
5135   ac_cv_func_select_arg1=int 
5136   ac_cv_func_select_arg234='int *' 
5137   ac_cv_func_select_arg5='struct timeval *'
5138  fi
5139  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5140  cat >> confdefs.h <<EOF
5141 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5142 EOF
5143
5144  cat >> confdefs.h <<EOF
5145 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5146 EOF
5147
5148  cat >> confdefs.h <<EOF
5149 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5150 EOF
5151
5152
5153 fi
5154
5155
5156 for ac_hdr in regex.h 
5157 do
5158 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5159 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5160 echo "configure:5161: checking for $ac_hdr" >&5
5161 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5162   echo $ac_n "(cached) $ac_c" 1>&6
5163 else
5164   cat > conftest.$ac_ext <<EOF
5165 #line 5166 "configure"
5166 #include "confdefs.h"
5167 #include <$ac_hdr>
5168 EOF
5169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5170 { (eval echo configure:5171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5172 if test -z "$ac_err"; then
5173   rm -rf conftest*
5174   eval "ac_cv_header_$ac_safe=yes"
5175 else
5176   echo "$ac_err" >&5
5177   echo "configure: failed program was:" >&5
5178   cat conftest.$ac_ext >&5
5179   rm -rf conftest*
5180   eval "ac_cv_header_$ac_safe=no"
5181 fi
5182 rm -f conftest*
5183 fi
5184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5185   echo "$ac_t""yes" 1>&6
5186     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5187   cat >> confdefs.h <<EOF
5188 #define $ac_tr_hdr 1
5189 EOF
5190  
5191 else
5192   echo "$ac_t""no" 1>&6
5193 fi
5194 done
5195
5196 if test "$ac_cv_header_regex_h" != yes ; then
5197         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5198 fi
5199 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5200 echo "configure:5201: checking for regfree" >&5
5201 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5202   echo $ac_n "(cached) $ac_c" 1>&6
5203 else
5204   cat > conftest.$ac_ext <<EOF
5205 #line 5206 "configure"
5206 #include "confdefs.h"
5207 /* System header to define __stub macros and hopefully few prototypes,
5208     which can conflict with char regfree(); below.  */
5209 #include <assert.h>
5210 /* Override any gcc2 internal prototype to avoid an error.  */
5211 /* We use char because int might match the return type of a gcc2
5212     builtin and then its argument prototype would still apply.  */
5213 char regfree();
5214 char (*f)();
5215
5216 int main() {
5217
5218 /* The GNU C library defines this for functions which it implements
5219     to always fail with ENOSYS.  Some functions are actually named
5220     something starting with __ and the normal name is an alias.  */
5221 #if defined (__stub_regfree) || defined (__stub___regfree)
5222 choke me
5223 #else
5224 f = regfree;
5225 #endif
5226
5227 ; return 0; }
5228 EOF
5229 if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5230   rm -rf conftest*
5231   eval "ac_cv_func_regfree=yes"
5232 else
5233   echo "configure: failed program was:" >&5
5234   cat conftest.$ac_ext >&5
5235   rm -rf conftest*
5236   eval "ac_cv_func_regfree=no"
5237 fi
5238 rm -f conftest*
5239 fi
5240
5241 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5242   echo "$ac_t""yes" 1>&6
5243   :
5244 else
5245   echo "$ac_t""no" 1>&6
5246 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5247 fi
5248
5249
5250
5251 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5252 echo "configure:5253: checking for compatible POSIX regex" >&5
5253 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5254   echo $ac_n "(cached) $ac_c" 1>&6
5255 else
5256   
5257         if test "$cross_compiling" = yes; then
5258   ol_cv_c_posix_regex=cross
5259 else
5260   cat > conftest.$ac_ext <<EOF
5261 #line 5262 "configure"
5262 #include "confdefs.h"
5263
5264 #include <sys/types.h>
5265 #include <regex.h>
5266 static char *pattern, *string;
5267 main()
5268 {
5269         int rc;
5270         regex_t re;
5271
5272         pattern = "^A";
5273
5274         if(regcomp(&re, pattern, 0)) {
5275                 return -1;
5276         }
5277         
5278         string = "ALL MATCH";
5279         
5280         rc = regexec(&re, string, 0, (void*)0, 0);
5281
5282         regfree(&re);
5283
5284         return rc;
5285 }
5286 EOF
5287 if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5288 then
5289   ol_cv_c_posix_regex=yes
5290 else
5291   echo "configure: failed program was:" >&5
5292   cat conftest.$ac_ext >&5
5293   rm -fr conftest*
5294   ol_cv_c_posix_regex=no
5295 fi
5296 rm -fr conftest*
5297 fi
5298
5299 fi
5300
5301 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5302
5303 if test "$ol_cv_c_posix_regex" = no ; then
5304         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5305 fi
5306
5307 ol_link_dnssrv=no
5308 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5309 echo "configure:5310: checking for res_query" >&5
5310 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5311   echo $ac_n "(cached) $ac_c" 1>&6
5312 else
5313   cat > conftest.$ac_ext <<EOF
5314 #line 5315 "configure"
5315 #include "confdefs.h"
5316 /* System header to define __stub macros and hopefully few prototypes,
5317     which can conflict with char res_query(); below.  */
5318 #include <assert.h>
5319 /* Override any gcc2 internal prototype to avoid an error.  */
5320 /* We use char because int might match the return type of a gcc2
5321     builtin and then its argument prototype would still apply.  */
5322 char res_query();
5323 char (*f)();
5324
5325 int main() {
5326
5327 /* The GNU C library defines this for functions which it implements
5328     to always fail with ENOSYS.  Some functions are actually named
5329     something starting with __ and the normal name is an alias.  */
5330 #if defined (__stub_res_query) || defined (__stub___res_query)
5331 choke me
5332 #else
5333 f = res_query;
5334 #endif
5335
5336 ; return 0; }
5337 EOF
5338 if { (eval echo configure:5339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5339   rm -rf conftest*
5340   eval "ac_cv_func_res_query=yes"
5341 else
5342   echo "configure: failed program was:" >&5
5343   cat conftest.$ac_ext >&5
5344   rm -rf conftest*
5345   eval "ac_cv_func_res_query=no"
5346 fi
5347 rm -f conftest*
5348 fi
5349
5350 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5351   echo "$ac_t""yes" 1>&6
5352   :
5353 else
5354   echo "$ac_t""no" 1>&6
5355 fi
5356
5357 if test $ac_cv_func_res_query = no ; then 
5358         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5359 echo "configure:5360: checking for res_query in -lbind" >&5
5360 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5361 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5362   echo $ac_n "(cached) $ac_c" 1>&6
5363 else
5364   ac_save_LIBS="$LIBS"
5365 LIBS="-lbind  $LIBS"
5366 cat > conftest.$ac_ext <<EOF
5367 #line 5368 "configure"
5368 #include "confdefs.h"
5369 /* Override any gcc2 internal prototype to avoid an error.  */
5370 /* We use char because int might match the return type of a gcc2
5371     builtin and then its argument prototype would still apply.  */
5372 char res_query();
5373
5374 int main() {
5375 res_query()
5376 ; return 0; }
5377 EOF
5378 if { (eval echo configure:5379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5379   rm -rf conftest*
5380   eval "ac_cv_lib_$ac_lib_var=yes"
5381 else
5382   echo "configure: failed program was:" >&5
5383   cat conftest.$ac_ext >&5
5384   rm -rf conftest*
5385   eval "ac_cv_lib_$ac_lib_var=no"
5386 fi
5387 rm -f conftest*
5388 LIBS="$ac_save_LIBS"
5389
5390 fi
5391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5392   echo "$ac_t""yes" 1>&6
5393     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5394     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5395   cat >> confdefs.h <<EOF
5396 #define $ac_tr_lib 1
5397 EOF
5398
5399   LIBS="-lbind $LIBS"
5400
5401 else
5402   echo "$ac_t""no" 1>&6
5403 fi
5404
5405         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5406 fi
5407
5408 if test $ac_cv_func_res_query = no ; then 
5409         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5410 echo "configure:5411: checking for __res_query in -lbind" >&5
5411 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5412 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5413   echo $ac_n "(cached) $ac_c" 1>&6
5414 else
5415   ac_save_LIBS="$LIBS"
5416 LIBS="-lbind  $LIBS"
5417 cat > conftest.$ac_ext <<EOF
5418 #line 5419 "configure"
5419 #include "confdefs.h"
5420 /* Override any gcc2 internal prototype to avoid an error.  */
5421 /* We use char because int might match the return type of a gcc2
5422     builtin and then its argument prototype would still apply.  */
5423 char __res_query();
5424
5425 int main() {
5426 __res_query()
5427 ; return 0; }
5428 EOF
5429 if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5430   rm -rf conftest*
5431   eval "ac_cv_lib_$ac_lib_var=yes"
5432 else
5433   echo "configure: failed program was:" >&5
5434   cat conftest.$ac_ext >&5
5435   rm -rf conftest*
5436   eval "ac_cv_lib_$ac_lib_var=no"
5437 fi
5438 rm -f conftest*
5439 LIBS="$ac_save_LIBS"
5440
5441 fi
5442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5443   echo "$ac_t""yes" 1>&6
5444     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5445     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5446   cat >> confdefs.h <<EOF
5447 #define $ac_tr_lib 1
5448 EOF
5449
5450   LIBS="-lbind $LIBS"
5451
5452 else
5453   echo "$ac_t""no" 1>&6
5454 fi
5455
5456         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5457 fi
5458
5459 if test $ac_cv_func_res_query = no ; then 
5460         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5461 echo "configure:5462: checking for res_query in -lresolv" >&5
5462 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5464   echo $ac_n "(cached) $ac_c" 1>&6
5465 else
5466   ac_save_LIBS="$LIBS"
5467 LIBS="-lresolv  $LIBS"
5468 cat > conftest.$ac_ext <<EOF
5469 #line 5470 "configure"
5470 #include "confdefs.h"
5471 /* Override any gcc2 internal prototype to avoid an error.  */
5472 /* We use char because int might match the return type of a gcc2
5473     builtin and then its argument prototype would still apply.  */
5474 char res_query();
5475
5476 int main() {
5477 res_query()
5478 ; return 0; }
5479 EOF
5480 if { (eval echo configure:5481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5481   rm -rf conftest*
5482   eval "ac_cv_lib_$ac_lib_var=yes"
5483 else
5484   echo "configure: failed program was:" >&5
5485   cat conftest.$ac_ext >&5
5486   rm -rf conftest*
5487   eval "ac_cv_lib_$ac_lib_var=no"
5488 fi
5489 rm -f conftest*
5490 LIBS="$ac_save_LIBS"
5491
5492 fi
5493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5494   echo "$ac_t""yes" 1>&6
5495     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5496     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5497   cat >> confdefs.h <<EOF
5498 #define $ac_tr_lib 1
5499 EOF
5500
5501   LIBS="-lresolv $LIBS"
5502
5503 else
5504   echo "$ac_t""no" 1>&6
5505 fi
5506
5507         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5508 fi
5509
5510 if test "$ac_cv_func_res_query" = yes ; then
5511         cat >> confdefs.h <<\EOF
5512 #define HAVE_RES_QUERY 1
5513 EOF
5514
5515
5516         if test $ol_enable_dnssrv != no ; then
5517                 ol_link_dnssrv=yes
5518         fi
5519 fi
5520
5521 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5522         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5523 fi
5524
5525 for ac_func in getaddrinfo inet_ntop 
5526 do
5527 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5528 echo "configure:5529: checking for $ac_func" >&5
5529 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5530   echo $ac_n "(cached) $ac_c" 1>&6
5531 else
5532   cat > conftest.$ac_ext <<EOF
5533 #line 5534 "configure"
5534 #include "confdefs.h"
5535 /* System header to define __stub macros and hopefully few prototypes,
5536     which can conflict with char $ac_func(); below.  */
5537 #include <assert.h>
5538 /* Override any gcc2 internal prototype to avoid an error.  */
5539 /* We use char because int might match the return type of a gcc2
5540     builtin and then its argument prototype would still apply.  */
5541 char $ac_func();
5542 char (*f)();
5543
5544 int main() {
5545
5546 /* The GNU C library defines this for functions which it implements
5547     to always fail with ENOSYS.  Some functions are actually named
5548     something starting with __ and the normal name is an alias.  */
5549 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5550 choke me
5551 #else
5552 f = $ac_func;
5553 #endif
5554
5555 ; return 0; }
5556 EOF
5557 if { (eval echo configure:5558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5558   rm -rf conftest*
5559   eval "ac_cv_func_$ac_func=yes"
5560 else
5561   echo "configure: failed program was:" >&5
5562   cat conftest.$ac_ext >&5
5563   rm -rf conftest*
5564   eval "ac_cv_func_$ac_func=no"
5565 fi
5566 rm -f conftest*
5567 fi
5568
5569 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5570   echo "$ac_t""yes" 1>&6
5571     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5572   cat >> confdefs.h <<EOF
5573 #define $ac_tr_func 1
5574 EOF
5575  
5576 else
5577   echo "$ac_t""no" 1>&6
5578 fi
5579 done
5580
5581
5582 ol_link_ipv6=no
5583 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
5584         if test $ol_enable_ipv6 = yes ; then
5585                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
5586         fi
5587 else
5588         for ac_func in gai_strerror 
5589 do
5590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5591 echo "configure:5592: checking for $ac_func" >&5
5592 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5593   echo $ac_n "(cached) $ac_c" 1>&6
5594 else
5595   cat > conftest.$ac_ext <<EOF
5596 #line 5597 "configure"
5597 #include "confdefs.h"
5598 /* System header to define __stub macros and hopefully few prototypes,
5599     which can conflict with char $ac_func(); below.  */
5600 #include <assert.h>
5601 /* Override any gcc2 internal prototype to avoid an error.  */
5602 /* We use char because int might match the return type of a gcc2
5603     builtin and then its argument prototype would still apply.  */
5604 char $ac_func();
5605 char (*f)();
5606
5607 int main() {
5608
5609 /* The GNU C library defines this for functions which it implements
5610     to always fail with ENOSYS.  Some functions are actually named
5611     something starting with __ and the normal name is an alias.  */
5612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5613 choke me
5614 #else
5615 f = $ac_func;
5616 #endif
5617
5618 ; return 0; }
5619 EOF
5620 if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5621   rm -rf conftest*
5622   eval "ac_cv_func_$ac_func=yes"
5623 else
5624   echo "configure: failed program was:" >&5
5625   cat conftest.$ac_ext >&5
5626   rm -rf conftest*
5627   eval "ac_cv_func_$ac_func=no"
5628 fi
5629 rm -f conftest*
5630 fi
5631
5632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5633   echo "$ac_t""yes" 1>&6
5634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5635   cat >> confdefs.h <<EOF
5636 #define $ac_tr_func 1
5637 EOF
5638  
5639 else
5640   echo "$ac_t""no" 1>&6
5641 fi
5642 done
5643
5644
5645         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5646 echo "configure:5647: checking INET6_ADDRSTRLEN" >&5
5647 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5648   echo $ac_n "(cached) $ac_c" 1>&6
5649 else
5650   
5651                 cat > conftest.$ac_ext <<EOF
5652 #line 5653 "configure"
5653 #include "confdefs.h"
5654
5655 #                       include <netinet/in.h>
5656 #                       ifdef INET6_ADDRSTRLEN
5657                                 __has_inet6_addrstrlen__;
5658 #                       endif
5659                 
5660 EOF
5661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5662   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5663   rm -rf conftest*
5664   ol_cv_inet6_addrstrlen=yes
5665 else
5666   rm -rf conftest*
5667   ol_cv_inet6_addrstrlen=no
5668 fi
5669 rm -f conftest*
5670
5671 fi
5672
5673 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5674
5675         if test $ol_cv_inet6_addrstrlen = yes ; then
5676                 ol_link_ipv6=yes
5677         elif test $ol_enable_ipv6 = yes ; then
5678                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5679         fi
5680 fi
5681
5682 if test $ol_enable_local != no ; then
5683         for ac_hdr in sys/un.h 
5684 do
5685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5687 echo "configure:5688: checking for $ac_hdr" >&5
5688 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5689   echo $ac_n "(cached) $ac_c" 1>&6
5690 else
5691   cat > conftest.$ac_ext <<EOF
5692 #line 5693 "configure"
5693 #include "confdefs.h"
5694 #include <$ac_hdr>
5695 EOF
5696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5697 { (eval echo configure:5698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5699 if test -z "$ac_err"; then
5700   rm -rf conftest*
5701   eval "ac_cv_header_$ac_safe=yes"
5702 else
5703   echo "$ac_err" >&5
5704   echo "configure: failed program was:" >&5
5705   cat conftest.$ac_ext >&5
5706   rm -rf conftest*
5707   eval "ac_cv_header_$ac_safe=no"
5708 fi
5709 rm -f conftest*
5710 fi
5711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5712   echo "$ac_t""yes" 1>&6
5713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5714   cat >> confdefs.h <<EOF
5715 #define $ac_tr_hdr 1
5716 EOF
5717  
5718 else
5719   echo "$ac_t""no" 1>&6
5720 fi
5721 done
5722
5723
5724         if test $ol_enable_local = auto ; then
5725                 ol_enable_local=$ac_cv_header_sys_un_h
5726         elif test $ac_cv_header_sys_un_h = no ; then
5727                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5728         fi
5729 fi
5730
5731 ol_link_kbind=no
5732 ol_link_kpasswd=no
5733 ol_link_krb5=no
5734 ol_link_krb4=no
5735
5736 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5737         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5738         -o $ol_with_kerberos = k425 ; then
5739
5740         for ac_hdr in krb5.h
5741 do
5742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5743 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5744 echo "configure:5745: checking for $ac_hdr" >&5
5745 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5746   echo $ac_n "(cached) $ac_c" 1>&6
5747 else
5748   cat > conftest.$ac_ext <<EOF
5749 #line 5750 "configure"
5750 #include "confdefs.h"
5751 #include <$ac_hdr>
5752 EOF
5753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5754 { (eval echo configure:5755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5756 if test -z "$ac_err"; then
5757   rm -rf conftest*
5758   eval "ac_cv_header_$ac_safe=yes"
5759 else
5760   echo "$ac_err" >&5
5761   echo "configure: failed program was:" >&5
5762   cat conftest.$ac_ext >&5
5763   rm -rf conftest*
5764   eval "ac_cv_header_$ac_safe=no"
5765 fi
5766 rm -f conftest*
5767 fi
5768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5769   echo "$ac_t""yes" 1>&6
5770     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5771   cat >> confdefs.h <<EOF
5772 #define $ac_tr_hdr 1
5773 EOF
5774  
5775 else
5776   echo "$ac_t""no" 1>&6
5777 fi
5778 done
5779
5780
5781         if test $ac_cv_header_krb5_h = yes ; then
5782                                 for ac_hdr in heim_err.h
5783 do
5784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5786 echo "configure:5787: checking for $ac_hdr" >&5
5787 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5788   echo $ac_n "(cached) $ac_c" 1>&6
5789 else
5790   cat > conftest.$ac_ext <<EOF
5791 #line 5792 "configure"
5792 #include "confdefs.h"
5793 #include <$ac_hdr>
5794 EOF
5795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5796 { (eval echo configure:5797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5798 if test -z "$ac_err"; then
5799   rm -rf conftest*
5800   eval "ac_cv_header_$ac_safe=yes"
5801 else
5802   echo "$ac_err" >&5
5803   echo "configure: failed program was:" >&5
5804   cat conftest.$ac_ext >&5
5805   rm -rf conftest*
5806   eval "ac_cv_header_$ac_safe=no"
5807 fi
5808 rm -f conftest*
5809 fi
5810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5811   echo "$ac_t""yes" 1>&6
5812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5813   cat >> confdefs.h <<EOF
5814 #define $ac_tr_hdr 1
5815 EOF
5816  
5817 else
5818   echo "$ac_t""no" 1>&6
5819 fi
5820 done
5821
5822                 if test $ac_cv_header_heim_err_h = yes ; then
5823                         krb5_impl=heimdal
5824                 else
5825                         krb5_impl=mit
5826                 fi
5827
5828                 if test $krb5_impl = mit; then
5829                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5830 echo "configure:5831: checking for main in -lkrb5" >&5
5831 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5832 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5833   echo $ac_n "(cached) $ac_c" 1>&6
5834 else
5835   ac_save_LIBS="$LIBS"
5836 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5837 cat > conftest.$ac_ext <<EOF
5838 #line 5839 "configure"
5839 #include "confdefs.h"
5840
5841 int main() {
5842 main()
5843 ; return 0; }
5844 EOF
5845 if { (eval echo configure:5846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5846   rm -rf conftest*
5847   eval "ac_cv_lib_$ac_lib_var=yes"
5848 else
5849   echo "configure: failed program was:" >&5
5850   cat conftest.$ac_ext >&5
5851   rm -rf conftest*
5852   eval "ac_cv_lib_$ac_lib_var=no"
5853 fi
5854 rm -f conftest*
5855 LIBS="$ac_save_LIBS"
5856
5857 fi
5858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5859   echo "$ac_t""yes" 1>&6
5860   have_krb5=yes
5861                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5862 else
5863   echo "$ac_t""no" 1>&6
5864 have_krb5=no
5865 fi
5866
5867
5868                 elif test $krb5_impl = heimdal; then
5869                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5870 echo "configure:5871: checking for main in -lkrb5" >&5
5871 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5873   echo $ac_n "(cached) $ac_c" 1>&6
5874 else
5875   ac_save_LIBS="$LIBS"
5876 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5877 cat > conftest.$ac_ext <<EOF
5878 #line 5879 "configure"
5879 #include "confdefs.h"
5880
5881 int main() {
5882 main()
5883 ; return 0; }
5884 EOF
5885 if { (eval echo configure:5886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5886   rm -rf conftest*
5887   eval "ac_cv_lib_$ac_lib_var=yes"
5888 else
5889   echo "configure: failed program was:" >&5
5890   cat conftest.$ac_ext >&5
5891   rm -rf conftest*
5892   eval "ac_cv_lib_$ac_lib_var=no"
5893 fi
5894 rm -f conftest*
5895 LIBS="$ac_save_LIBS"
5896
5897 fi
5898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5899   echo "$ac_t""yes" 1>&6
5900   have_krb5=yes
5901                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5902 else
5903   echo "$ac_t""no" 1>&6
5904 have_krb5=no
5905 fi
5906
5907
5908                         cat >> confdefs.h <<\EOF
5909 #define HAVE_HEIMDAL_KERBEROS 1
5910 EOF
5911
5912                 else
5913                         have_krb5=no
5914                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
5915                 fi
5916
5917                 if test $have_krb5 = yes ; then
5918                         ol_link_krb5=yes
5919
5920                         cat >> confdefs.h <<\EOF
5921 #define HAVE_KRB5 1
5922 EOF
5923
5924
5925                         if test $ol_enable_kpasswd != no ; then
5926                                 ol_link_kpasswd=yes;
5927                         fi
5928
5929                         if test $ol_with_kerberos = k5only ; then
5930                                 ol_with_kerberos=found
5931                         fi
5932
5933                 elif test $ol_with_kerberos != auto ; then
5934                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5935                 fi
5936
5937         fi
5938 fi
5939
5940 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
5941         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5942
5943         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5944 do
5945 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5946 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5947 echo "configure:5948: checking for $ac_hdr" >&5
5948 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5949   echo $ac_n "(cached) $ac_c" 1>&6
5950 else
5951   cat > conftest.$ac_ext <<EOF
5952 #line 5953 "configure"
5953 #include "confdefs.h"
5954 #include <$ac_hdr>
5955 EOF
5956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5957 { (eval echo configure:5958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5959 if test -z "$ac_err"; then
5960   rm -rf conftest*
5961   eval "ac_cv_header_$ac_safe=yes"
5962 else
5963   echo "$ac_err" >&5
5964   echo "configure: failed program was:" >&5
5965   cat conftest.$ac_ext >&5
5966   rm -rf conftest*
5967   eval "ac_cv_header_$ac_safe=no"
5968 fi
5969 rm -f conftest*
5970 fi
5971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5972   echo "$ac_t""yes" 1>&6
5973     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5974   cat >> confdefs.h <<EOF
5975 #define $ac_tr_hdr 1
5976 EOF
5977  
5978 else
5979   echo "$ac_t""no" 1>&6
5980 fi
5981 done
5982
5983
5984         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5985                 if test $krb5_impl = mit; then
5986                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5987 echo "configure:5988: checking for main in -lkrb4" >&5
5988 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5990   echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5992   ac_save_LIBS="$LIBS"
5993 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5994 cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997
5998 int main() {
5999 main()
6000 ; return 0; }
6001 EOF
6002 if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6003   rm -rf conftest*
6004   eval "ac_cv_lib_$ac_lib_var=yes"
6005 else
6006   echo "configure: failed program was:" >&5
6007   cat conftest.$ac_ext >&5
6008   rm -rf conftest*
6009   eval "ac_cv_lib_$ac_lib_var=no"
6010 fi
6011 rm -f conftest*
6012 LIBS="$ac_save_LIBS"
6013
6014 fi
6015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6016   echo "$ac_t""yes" 1>&6
6017   have_k425=yes
6018                                 KRB4_LIBS="-lkrb4 -ldes425"
6019 else
6020   echo "$ac_t""no" 1>&6
6021 have_k425=no
6022 fi
6023
6024
6025                 elif test $krb5_impl = heimdal; then
6026                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6027 echo "configure:6028: checking for main in -lkrb4" >&5
6028 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6029 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6030   echo $ac_n "(cached) $ac_c" 1>&6
6031 else
6032   ac_save_LIBS="$LIBS"
6033 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6034 cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6037
6038 int main() {
6039 main()
6040 ; return 0; }
6041 EOF
6042 if { (eval echo configure:6043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6043   rm -rf conftest*
6044   eval "ac_cv_lib_$ac_lib_var=yes"
6045 else
6046   echo "configure: failed program was:" >&5
6047   cat conftest.$ac_ext >&5
6048   rm -rf conftest*
6049   eval "ac_cv_lib_$ac_lib_var=no"
6050 fi
6051 rm -f conftest*
6052 LIBS="$ac_save_LIBS"
6053
6054 fi
6055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6056   echo "$ac_t""yes" 1>&6
6057   have_k425=yes
6058                                 KRB4_LIBS="-lkrb4"
6059 else
6060   echo "$ac_t""no" 1>&6
6061 have_k425=no
6062 fi
6063
6064
6065                 else
6066                         have_425=no
6067                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6068                 fi
6069
6070                 if test $have_k425 = yes ; then
6071                         ol_with_kerberos=found
6072                         ol_link_krb4=yes
6073
6074                         cat >> confdefs.h <<\EOF
6075 #define HAVE_KRB425 1
6076 EOF
6077
6078                         cat >> confdefs.h <<\EOF
6079 #define HAVE_KRB4 1
6080 EOF
6081
6082
6083                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6084 echo "configure:6085: checking for des_debug in Kerberos libraries" >&5
6085 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6086   echo $ac_n "(cached) $ac_c" 1>&6
6087 else
6088   
6089                                                                 save_LIBS="$LIBS"
6090                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6091                                 cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094
6095 #include <kerberosIV/krb.h>
6096 #include <kerberosIV/des.h>
6097 extern int des_debug;
6098
6099 int main() {
6100
6101 des_debug = 1;
6102
6103 ; return 0; }
6104 EOF
6105 if { (eval echo configure:6106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6106   rm -rf conftest*
6107   ol_cv_var_des_debug=yes
6108 else
6109   echo "configure: failed program was:" >&5
6110   cat conftest.$ac_ext >&5
6111   rm -rf conftest*
6112   ol_cv_var_des_debug=no
6113 fi
6114 rm -f conftest*
6115                                                                 LIBS="$save_LIBS"
6116                         
6117 fi
6118
6119 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6120
6121                         if test $ol_cv_var_des_debug = yes ; then
6122                                 cat >> confdefs.h <<\EOF
6123 #define HAVE_DES_DEBUG 1
6124 EOF
6125
6126                         fi
6127
6128                         LIBS="$save_LIBS"
6129                 fi
6130         fi
6131 fi
6132
6133 if test $ol_link_krb5 = yes ; then
6134         ol_with_kerberos=found
6135 fi
6136
6137 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6138         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6139
6140         for ac_hdr in krb.h des.h krb-archaeology.h 
6141 do
6142 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6143 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6144 echo "configure:6145: checking for $ac_hdr" >&5
6145 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6146   echo $ac_n "(cached) $ac_c" 1>&6
6147 else
6148   cat > conftest.$ac_ext <<EOF
6149 #line 6150 "configure"
6150 #include "confdefs.h"
6151 #include <$ac_hdr>
6152 EOF
6153 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6154 { (eval echo configure:6155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6155 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6156 if test -z "$ac_err"; then
6157   rm -rf conftest*
6158   eval "ac_cv_header_$ac_safe=yes"
6159 else
6160   echo "$ac_err" >&5
6161   echo "configure: failed program was:" >&5
6162   cat conftest.$ac_ext >&5
6163   rm -rf conftest*
6164   eval "ac_cv_header_$ac_safe=no"
6165 fi
6166 rm -f conftest*
6167 fi
6168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6169   echo "$ac_t""yes" 1>&6
6170     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6171   cat >> confdefs.h <<EOF
6172 #define $ac_tr_hdr 1
6173 EOF
6174  
6175 else
6176   echo "$ac_t""no" 1>&6
6177 fi
6178 done
6179
6180
6181         if test $ac_cv_header_krb_h = yes ; then
6182                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6183 echo "configure:6184: checking for main in -lkrb" >&5
6184 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6185 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6186   echo $ac_n "(cached) $ac_c" 1>&6
6187 else
6188   ac_save_LIBS="$LIBS"
6189 LIBS="-lkrb -ldes $LIBS"
6190 cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193
6194 int main() {
6195 main()
6196 ; return 0; }
6197 EOF
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6199   rm -rf conftest*
6200   eval "ac_cv_lib_$ac_lib_var=yes"
6201 else
6202   echo "configure: failed program was:" >&5
6203   cat conftest.$ac_ext >&5
6204   rm -rf conftest*
6205   eval "ac_cv_lib_$ac_lib_var=no"
6206 fi
6207 rm -f conftest*
6208 LIBS="$ac_save_LIBS"
6209
6210 fi
6211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6212   echo "$ac_t""yes" 1>&6
6213   have_k4=yes
6214 else
6215   echo "$ac_t""no" 1>&6
6216 have_k4=no
6217 fi
6218
6219
6220                 if test $have_k4 = yes ; then
6221                         ol_with_kerberos=found
6222                         ol_link_krb4=yes
6223
6224                         cat >> confdefs.h <<\EOF
6225 #define HAVE_KRB4 1
6226 EOF
6227
6228
6229                         KRB4_LIBS="-lkrb -ldes"
6230
6231                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6232                                 cat >> confdefs.h <<\EOF
6233 #define HAVE_KTH_KERBEROS 1
6234 EOF
6235
6236                         fi
6237                 fi
6238         fi
6239 fi
6240
6241 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6242         ol_link_kpasswd=yes
6243 fi
6244
6245 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6246         ol_link_kbind=yes
6247
6248 elif test $ol_enable_kbind = yes ; then
6249         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6250 fi
6251
6252 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6253         cat >> confdefs.h <<\EOF
6254 #define HAVE_KERBEROS 1
6255 EOF
6256
6257
6258 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6259         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6260 fi
6261
6262 ol_link_tls=no
6263 if test $ol_with_tls != no ; then
6264         for ac_hdr in openssl/ssl.h ssl.h
6265 do
6266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6268 echo "configure:6269: checking for $ac_hdr" >&5
6269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6270   echo $ac_n "(cached) $ac_c" 1>&6
6271 else
6272   cat > conftest.$ac_ext <<EOF
6273 #line 6274 "configure"
6274 #include "confdefs.h"
6275 #include <$ac_hdr>
6276 EOF
6277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6278 { (eval echo configure:6279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6280 if test -z "$ac_err"; then
6281   rm -rf conftest*
6282   eval "ac_cv_header_$ac_safe=yes"
6283 else
6284   echo "$ac_err" >&5
6285   echo "configure: failed program was:" >&5
6286   cat conftest.$ac_ext >&5
6287   rm -rf conftest*
6288   eval "ac_cv_header_$ac_safe=no"
6289 fi
6290 rm -f conftest*
6291 fi
6292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6293   echo "$ac_t""yes" 1>&6
6294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6295   cat >> confdefs.h <<EOF
6296 #define $ac_tr_hdr 1
6297 EOF
6298  
6299 else
6300   echo "$ac_t""no" 1>&6
6301 fi
6302 done
6303
6304         
6305         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6306                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6307 echo "configure:6308: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6308 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6310   echo $ac_n "(cached) $ac_c" 1>&6
6311 else
6312   ac_save_LIBS="$LIBS"
6313 LIBS="-lssl -lcrypto $LIBS"
6314 cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317 /* Override any gcc2 internal prototype to avoid an error.  */
6318 /* We use char because int might match the return type of a gcc2
6319     builtin and then its argument prototype would still apply.  */
6320 char SSLeay_add_ssl_algorithms();
6321
6322 int main() {
6323 SSLeay_add_ssl_algorithms()
6324 ; return 0; }
6325 EOF
6326 if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6327   rm -rf conftest*
6328   eval "ac_cv_lib_$ac_lib_var=yes"
6329 else
6330   echo "configure: failed program was:" >&5
6331   cat conftest.$ac_ext >&5
6332   rm -rf conftest*
6333   eval "ac_cv_lib_$ac_lib_var=no"
6334 fi
6335 rm -f conftest*
6336 LIBS="$ac_save_LIBS"
6337
6338 fi
6339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6340   echo "$ac_t""yes" 1>&6
6341   have_ssleay=yes
6342                         need_rsaref=no
6343 else
6344   echo "$ac_t""no" 1>&6
6345 have_ssleay=no
6346 fi
6347
6348                         
6349                 if test $have_ssleay = no ; then
6350                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6351 echo "configure:6352: checking for SSL_library_init in -lssl" >&5
6352 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6353 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6354   echo $ac_n "(cached) $ac_c" 1>&6
6355 else
6356   ac_save_LIBS="$LIBS"
6357 LIBS="-lssl -lcrypto $LIBS"
6358 cat > conftest.$ac_ext <<EOF
6359 #line 6360 "configure"
6360 #include "confdefs.h"
6361 /* Override any gcc2 internal prototype to avoid an error.  */
6362 /* We use char because int might match the return type of a gcc2
6363     builtin and then its argument prototype would still apply.  */
6364 char SSL_library_init();
6365
6366 int main() {
6367 SSL_library_init()
6368 ; return 0; }
6369 EOF
6370 if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6371   rm -rf conftest*
6372   eval "ac_cv_lib_$ac_lib_var=yes"
6373 else
6374   echo "configure: failed program was:" >&5
6375   cat conftest.$ac_ext >&5
6376   rm -rf conftest*
6377   eval "ac_cv_lib_$ac_lib_var=no"
6378 fi
6379 rm -f conftest*
6380 LIBS="$ac_save_LIBS"
6381
6382 fi
6383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6384   echo "$ac_t""yes" 1>&6
6385   have_ssleay=yes
6386                                 need_rsaref=no
6387 else
6388   echo "$ac_t""no" 1>&6
6389 have_ssleay=no
6390 fi
6391
6392                 fi
6393
6394                 if test $have_ssleay = no ; then
6395                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6396 echo "configure:6397: checking for ssl3_accept in -lssl" >&5
6397 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6398 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6399   echo $ac_n "(cached) $ac_c" 1>&6
6400 else
6401   ac_save_LIBS="$LIBS"
6402 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6403 cat > conftest.$ac_ext <<EOF
6404 #line 6405 "configure"
6405 #include "confdefs.h"
6406 /* Override any gcc2 internal prototype to avoid an error.  */
6407 /* We use char because int might match the return type of a gcc2
6408     builtin and then its argument prototype would still apply.  */
6409 char ssl3_accept();
6410
6411 int main() {
6412 ssl3_accept()
6413 ; return 0; }
6414 EOF
6415 if { (eval echo configure:6416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6416   rm -rf conftest*
6417   eval "ac_cv_lib_$ac_lib_var=yes"
6418 else
6419   echo "configure: failed program was:" >&5
6420   cat conftest.$ac_ext >&5
6421   rm -rf conftest*
6422   eval "ac_cv_lib_$ac_lib_var=no"
6423 fi
6424 rm -f conftest*
6425 LIBS="$ac_save_LIBS"
6426
6427 fi
6428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6429   echo "$ac_t""yes" 1>&6
6430   have_ssleay=yes
6431                                 need_rsaref=yes
6432 else
6433   echo "$ac_t""no" 1>&6
6434 have_ssleay=no
6435 fi
6436
6437                 fi
6438
6439                 if test $have_ssleay = yes ; then
6440                         ol_with_tls=found
6441                         ol_link_tls=yes
6442
6443                         cat >> confdefs.h <<\EOF
6444 #define HAVE_SSLEAY 1
6445 EOF
6446
6447
6448                         if test $need_rsaref = yes; then
6449                                 cat >> confdefs.h <<\EOF
6450 #define HAVE_RSAREF 1
6451 EOF
6452
6453
6454                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6455                         else
6456                                 TLS_LIBS="-lssl -lcrypto"
6457                         fi
6458                 fi
6459         fi
6460
6461 else
6462         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6463 fi
6464
6465 if test $ol_link_tls = yes ; then
6466         cat >> confdefs.h <<\EOF
6467 #define HAVE_TLS 1
6468 EOF
6469
6470
6471 elif test $ol_with_tls = auto ; then
6472         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6473         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6474
6475 elif test $ol_with_tls != no ; then
6476         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6477 fi
6478
6479 for ac_func in \
6480         ctime_r                 \
6481         gethostbyname_r gethostbyaddr_r \
6482
6483 do
6484 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6485 echo "configure:6486: checking for $ac_func" >&5
6486 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6487   echo $ac_n "(cached) $ac_c" 1>&6
6488 else
6489   cat > conftest.$ac_ext <<EOF
6490 #line 6491 "configure"
6491 #include "confdefs.h"
6492 /* System header to define __stub macros and hopefully few prototypes,
6493     which can conflict with char $ac_func(); below.  */
6494 #include <assert.h>
6495 /* Override any gcc2 internal prototype to avoid an error.  */
6496 /* We use char because int might match the return type of a gcc2
6497     builtin and then its argument prototype would still apply.  */
6498 char $ac_func();
6499 char (*f)();
6500
6501 int main() {
6502
6503 /* The GNU C library defines this for functions which it implements
6504     to always fail with ENOSYS.  Some functions are actually named
6505     something starting with __ and the normal name is an alias.  */
6506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6507 choke me
6508 #else
6509 f = $ac_func;
6510 #endif
6511
6512 ; return 0; }
6513 EOF
6514 if { (eval echo configure:6515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6515   rm -rf conftest*
6516   eval "ac_cv_func_$ac_func=yes"
6517 else
6518   echo "configure: failed program was:" >&5
6519   cat conftest.$ac_ext >&5
6520   rm -rf conftest*
6521   eval "ac_cv_func_$ac_func=no"
6522 fi
6523 rm -f conftest*
6524 fi
6525
6526 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6527   echo "$ac_t""yes" 1>&6
6528     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6529   cat >> confdefs.h <<EOF
6530 #define $ac_tr_func 1
6531 EOF
6532  
6533 else
6534   echo "$ac_t""no" 1>&6
6535 fi
6536 done
6537
6538
6539 if test "$ac_cv_func_ctime_r" = no ; then
6540         ol_cv_func_ctime_r_nargs=0
6541 else
6542         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6543 echo "configure:6544: checking number of arguments of ctime_r" >&5
6544 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6545   echo $ac_n "(cached) $ac_c" 1>&6
6546 else
6547   cat > conftest.$ac_ext <<EOF
6548 #line 6549 "configure"
6549 #include "confdefs.h"
6550 #include <time.h>
6551 int main() {
6552 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6553 ; return 0; }
6554 EOF
6555 if { (eval echo configure:6556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6556   rm -rf conftest*
6557   ol_cv_func_ctime_r_nargs3=yes
6558 else
6559   echo "configure: failed program was:" >&5
6560   cat conftest.$ac_ext >&5
6561   rm -rf conftest*
6562   ol_cv_func_ctime_r_nargs3=no
6563 fi
6564 rm -f conftest*
6565
6566         cat > conftest.$ac_ext <<EOF
6567 #line 6568 "configure"
6568 #include "confdefs.h"
6569 #include <time.h>
6570 int main() {
6571 time_t ti; char *buffer; ctime_r(&ti,buffer);
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6575   rm -rf conftest*
6576   ol_cv_func_ctime_r_nargs2=yes
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   ol_cv_func_ctime_r_nargs2=no
6582 fi
6583 rm -f conftest*
6584
6585         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6586                 $ol_cv_func_ctime_r_nargs2 = no ; then
6587
6588                 ol_cv_func_ctime_r_nargs=3
6589
6590         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6591                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6592
6593                 ol_cv_func_ctime_r_nargs=2
6594
6595         else
6596                 ol_cv_func_ctime_r_nargs=0
6597         fi
6598   
6599 fi
6600
6601 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6602
6603   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6604         cat >> confdefs.h <<EOF
6605 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6606 EOF
6607
6608   fi
6609
6610 fi
6611
6612 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6613         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6614 echo "configure:6615: checking number of arguments of gethostbyname_r" >&5
6615 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6616   echo $ac_n "(cached) $ac_c" 1>&6
6617 else
6618   cat > conftest.$ac_ext <<EOF
6619 #line 6620 "configure"
6620 #include "confdefs.h"
6621 #include <sys/types.h>
6622 #include <sys/socket.h>
6623 #include <netinet/in.h>
6624 #include <netdb.h>
6625 #define BUFSIZE (sizeof(struct hostent)+10)
6626 int main() {
6627 struct hostent hent; char buffer[BUFSIZE];
6628                 int bufsize=BUFSIZE;int h_errno;
6629                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6630                         buffer, bufsize, &h_errno);
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6634   rm -rf conftest*
6635   ol_cv_func_gethostbyname_r_nargs5=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   ol_cv_func_gethostbyname_r_nargs5=no
6641 fi
6642 rm -f conftest*
6643
6644         cat > conftest.$ac_ext <<EOF
6645 #line 6646 "configure"
6646 #include "confdefs.h"
6647 #include <sys/types.h>
6648 #include <sys/socket.h>
6649 #include <netinet/in.h>
6650 #include <netdb.h>
6651 #define BUFSIZE (sizeof(struct hostent)+10)
6652 int main() {
6653 struct hostent hent;struct hostent *rhent;
6654                 char buffer[BUFSIZE];
6655                 int bufsize=BUFSIZE;int h_errno;
6656                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6657                         &rhent, &h_errno);
6658 ; return 0; }
6659 EOF
6660 if { (eval echo configure:6661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6661   rm -rf conftest*
6662   ol_cv_func_gethostbyname_r_nargs6=yes
6663 else
6664   echo "configure: failed program was:" >&5
6665   cat conftest.$ac_ext >&5
6666   rm -rf conftest*
6667   ol_cv_func_gethostbyname_r_nargs6=no
6668 fi
6669 rm -f conftest*
6670
6671         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6672                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6673
6674                 ol_cv_func_gethostbyname_r_nargs=5
6675
6676         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6677                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6678
6679                 ol_cv_func_gethostbyname_r_nargs=6
6680
6681         else
6682                 ol_cv_func_gethostbyname_r_nargs=0
6683         fi
6684   
6685 fi
6686
6687 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6688   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6689         cat >> confdefs.h <<EOF
6690 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6691 EOF
6692
6693   fi
6694
6695 else
6696         ol_cv_func_gethostbyname_r_nargs=0
6697 fi
6698  
6699 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6700         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6701 echo "configure:6702: checking number of arguments of gethostbyaddr_r" >&5
6702 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6703   echo $ac_n "(cached) $ac_c" 1>&6
6704 else
6705   cat > conftest.$ac_ext <<EOF
6706 #line 6707 "configure"
6707 #include "confdefs.h"
6708 #include <sys/types.h>
6709 #include <sys/socket.h>
6710 #include <netinet/in.h>
6711 #include <netdb.h>
6712 #define BUFSIZE (sizeof(struct hostent)+10)
6713 int main() {
6714 struct hostent hent; char buffer[BUFSIZE]; 
6715             struct in_addr add;
6716             size_t alen=sizeof(struct in_addr);
6717             int bufsize=BUFSIZE;int h_errno;
6718                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6719                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6723   rm -rf conftest*
6724   ol_cv_func_gethostbyaddr_r_nargs7=yes
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728   rm -rf conftest*
6729   ol_cv_func_gethostbyaddr_r_nargs7=no
6730 fi
6731 rm -f conftest*
6732
6733         cat > conftest.$ac_ext <<EOF
6734 #line 6735 "configure"
6735 #include "confdefs.h"
6736 #include <sys/types.h>
6737 #include <sys/socket.h>
6738 #include <netinet/in.h>
6739 #include <netdb.h>
6740 #define BUFSIZE (sizeof(struct hostent)+10)
6741 int main() {
6742 struct hostent hent;
6743                 struct hostent *rhent; char buffer[BUFSIZE]; 
6744                 struct in_addr add;
6745                 size_t alen=sizeof(struct in_addr);
6746                 int bufsize=BUFSIZE;int h_errno;
6747                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6748                         alen, AF_INET, &hent, buffer, bufsize, 
6749                         &rhent, &h_errno);
6750 ; return 0; }
6751 EOF
6752 if { (eval echo configure:6753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6753   rm -rf conftest*
6754   ol_cv_func_gethostbyaddr_r_nargs8=yes
6755 else
6756   echo "configure: failed program was:" >&5
6757   cat conftest.$ac_ext >&5
6758   rm -rf conftest*
6759   ol_cv_func_gethostbyaddr_r_nargs8=no
6760 fi
6761 rm -f conftest*
6762
6763         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6764                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6765
6766                 ol_cv_func_gethostbyaddr_r_nargs=7
6767
6768         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6769                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6770
6771                 ol_cv_func_gethostbyaddr_r_nargs=8
6772
6773         else
6774                 ol_cv_func_gethostbyaddr_r_nargs=0
6775         fi
6776   
6777 fi
6778
6779 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6780   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6781     cat >> confdefs.h <<EOF
6782 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6783 EOF
6784
6785   fi
6786
6787 else
6788         ol_cv_func_gethostbyaddr_r_nargs=0
6789 fi
6790
6791 if test "$ac_cv_func_ctime_r" = yes \
6792         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6793         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6794         -a "$ac_cv_func_gethostbyname_r" = yes \
6795         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6796         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6797         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6798         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6799         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6800         ; then
6801  
6802         cat >> confdefs.h <<\EOF
6803 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6804 EOF
6805
6806 fi
6807
6808 ol_link_threads=no
6809
6810 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6811         -o $ol_with_threads = nt ; then
6812
6813         
6814         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6815 echo "configure:6816: checking for _beginthread" >&5
6816 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6817   echo $ac_n "(cached) $ac_c" 1>&6
6818 else
6819   cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822 /* System header to define __stub macros and hopefully few prototypes,
6823     which can conflict with char _beginthread(); below.  */
6824 #include <assert.h>
6825 /* Override any gcc2 internal prototype to avoid an error.  */
6826 /* We use char because int might match the return type of a gcc2
6827     builtin and then its argument prototype would still apply.  */
6828 char _beginthread();
6829 char (*f)();
6830
6831 int main() {
6832
6833 /* The GNU C library defines this for functions which it implements
6834     to always fail with ENOSYS.  Some functions are actually named
6835     something starting with __ and the normal name is an alias.  */
6836 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6837 choke me
6838 #else
6839 f = _beginthread;
6840 #endif
6841
6842 ; return 0; }
6843 EOF
6844 if { (eval echo configure:6845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6845   rm -rf conftest*
6846   eval "ac_cv_func__beginthread=yes"
6847 else
6848   echo "configure: failed program was:" >&5
6849   cat conftest.$ac_ext >&5
6850   rm -rf conftest*
6851   eval "ac_cv_func__beginthread=no"
6852 fi
6853 rm -f conftest*
6854 fi
6855
6856 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6857   echo "$ac_t""yes" 1>&6
6858   :
6859 else
6860   echo "$ac_t""no" 1>&6
6861 fi
6862
6863
6864         if test $ac_cv_func__beginthread = yes ; then
6865                 cat >> confdefs.h <<\EOF
6866 #define HAVE_NT_THREADS 1
6867 EOF
6868
6869         fi
6870
6871
6872         if test "$ol_cv_nt_threads" = yes ; then
6873         ol_link_threads=nt
6874         ol_with_threads=found
6875         ol_with_yielding_select=yes
6876
6877                 cat >> confdefs.h <<\EOF
6878 #define HAVE_NT_SERVICE_MANAGER 1
6879 EOF
6880
6881                 cat >> confdefs.h <<\EOF
6882 #define HAVE_NT_EVENT_LOG 1
6883 EOF
6884
6885         fi
6886
6887         if test $ol_with_threads = nt ; then
6888                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6889         fi
6890 fi
6891
6892 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6893         -o $ol_with_threads = posix ; then
6894
6895         for ac_hdr in pthread.h
6896 do
6897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6899 echo "configure:6900: checking for $ac_hdr" >&5
6900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6901   echo $ac_n "(cached) $ac_c" 1>&6
6902 else
6903   cat > conftest.$ac_ext <<EOF
6904 #line 6905 "configure"
6905 #include "confdefs.h"
6906 #include <$ac_hdr>
6907 EOF
6908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6909 { (eval echo configure:6910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6911 if test -z "$ac_err"; then
6912   rm -rf conftest*
6913   eval "ac_cv_header_$ac_safe=yes"
6914 else
6915   echo "$ac_err" >&5
6916   echo "configure: failed program was:" >&5
6917   cat conftest.$ac_ext >&5
6918   rm -rf conftest*
6919   eval "ac_cv_header_$ac_safe=no"
6920 fi
6921 rm -f conftest*
6922 fi
6923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6924   echo "$ac_t""yes" 1>&6
6925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6926   cat >> confdefs.h <<EOF
6927 #define $ac_tr_hdr 1
6928 EOF
6929  
6930 else
6931   echo "$ac_t""no" 1>&6
6932 fi
6933 done
6934
6935
6936         if test $ac_cv_header_pthread_h = yes ; then
6937                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6938 echo "configure:6939: checking POSIX thread version" >&5
6939 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6940   echo $ac_n "(cached) $ac_c" 1>&6
6941 else
6942   
6943         cat > conftest.$ac_ext <<EOF
6944 #line 6945 "configure"
6945 #include "confdefs.h"
6946
6947 #               include <pthread.h>
6948                 /* this check could be improved */
6949 #               ifdef PTHREAD_ONCE_INIT
6950                         pthread_version_final;
6951 #               endif
6952         
6953 EOF
6954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6955   egrep "pthread_version_final" >/dev/null 2>&1; then
6956   rm -rf conftest*
6957   ol_pthread_final=yes
6958 else
6959   rm -rf conftest*
6960   ol_pthread_final=no
6961 fi
6962 rm -f conftest*
6963
6964
6965         cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968
6969 #               include <pthread.h>
6970                 /* this check could be improved */
6971 #               ifdef pthread_once_init
6972                         pthread_version_draft4;
6973 #               endif
6974         
6975 EOF
6976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6977   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6978   rm -rf conftest*
6979   ol_pthread_draft4=yes
6980 else
6981   rm -rf conftest*
6982   ol_pthread_draft4=no
6983 fi
6984 rm -f conftest*
6985
6986
6987         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6988                 ol_cv_pthread_version=final
6989         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6990                 ol_cv_pthread_version=draft4
6991         else
6992                 ol_cv_pthread_version=unknown
6993         fi
6994
6995 fi
6996
6997 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6998
6999
7000                 if test $ol_cv_pthread_version = final ; then
7001                         cat >> confdefs.h <<\EOF
7002 #define HAVE_PTHREADS_FINAL 1
7003 EOF
7004
7005                 elif test $ol_cv_pthread_version = draft4 ; then
7006                         cat >> confdefs.h <<\EOF
7007 #define HAVE_PTHREADS_D4 1
7008 EOF
7009
7010                 else
7011                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7012                 fi
7013
7014                 # consider threads found
7015                 ol_with_threads=found
7016
7017                 
7018         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7019 echo "configure:7020: checking for LinuxThreads pthread.h" >&5
7020 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7021   echo $ac_n "(cached) $ac_c" 1>&6
7022 else
7023   cat > conftest.$ac_ext <<EOF
7024 #line 7025 "configure"
7025 #include "confdefs.h"
7026 #include <pthread.h>
7027 EOF
7028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7029   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7030   rm -rf conftest*
7031   ol_cv_header_linux_threads=yes
7032 else
7033   rm -rf conftest*
7034   ol_cv_header_linux_threads=no
7035 fi
7036 rm -f conftest*
7037
7038                 
7039 fi
7040
7041 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7042         if test $ol_cv_header_linux_threads = yes; then
7043                 cat >> confdefs.h <<\EOF
7044 #define HAVE_LINUX_THREADS 1
7045 EOF
7046
7047         fi
7048
7049                 
7050         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7051 echo "configure:7052: checking for GNU Pth pthread.h" >&5
7052 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7053   echo $ac_n "(cached) $ac_c" 1>&6
7054 else
7055   cat > conftest.$ac_ext <<EOF
7056 #line 7057 "configure"
7057 #include "confdefs.h"
7058 #include <pthread.h>
7059 #ifdef _POSIX_THREAD_IS_GNU_PTH
7060         __gnu_pth__;
7061 #endif
7062
7063 EOF
7064 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7065   egrep "__gnu_pth__" >/dev/null 2>&1; then
7066   rm -rf conftest*
7067   ol_cv_header_gnu_pth_pthread_h=yes
7068 else
7069   rm -rf conftest*
7070   ol_cv_header_gnu_pth_pthread_h=no
7071 fi
7072 rm -f conftest*
7073
7074                 
7075 fi
7076
7077 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7078
7079
7080                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7081                         for ac_hdr in sched.h
7082 do
7083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7085 echo "configure:7086: checking for $ac_hdr" >&5
7086 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7087   echo $ac_n "(cached) $ac_c" 1>&6
7088 else
7089   cat > conftest.$ac_ext <<EOF
7090 #line 7091 "configure"
7091 #include "confdefs.h"
7092 #include <$ac_hdr>
7093 EOF
7094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7095 { (eval echo configure:7096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7097 if test -z "$ac_err"; then
7098   rm -rf conftest*
7099   eval "ac_cv_header_$ac_safe=yes"
7100 else
7101   echo "$ac_err" >&5
7102   echo "configure: failed program was:" >&5
7103   cat conftest.$ac_ext >&5
7104   rm -rf conftest*
7105   eval "ac_cv_header_$ac_safe=no"
7106 fi
7107 rm -f conftest*
7108 fi
7109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7110   echo "$ac_t""yes" 1>&6
7111     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7112   cat >> confdefs.h <<EOF
7113 #define $ac_tr_hdr 1
7114 EOF
7115  
7116 else
7117   echo "$ac_t""no" 1>&6
7118 fi
7119 done
7120
7121                 fi
7122
7123                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7124                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7125 echo "configure:7126: checking for pthread_create in default libraries" >&5
7126 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7127   echo $ac_n "(cached) $ac_c" 1>&6
7128 else
7129   
7130                 if test "$cross_compiling" = yes; then
7131   cat > conftest.$ac_ext <<EOF
7132 #line 7133 "configure"
7133 #include "confdefs.h"
7134 /* pthread test headers */
7135 #include <pthread.h>
7136 #ifndef NULL
7137 #define NULL (void*)0
7138 #endif
7139
7140 static void *task(p)
7141         void *p;
7142 {
7143         return (void *) (p == NULL);
7144 }
7145
7146 int main() {
7147
7148         /* pthread test function */
7149         pthread_t t;
7150         int status;
7151 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7152         /* This system (e.g. AIX) defaults detached; must override */
7153         pthread_attr_t attr;
7154
7155         status = pthread_attr_init(&attr);
7156         if( status ) exit( status );
7157
7158         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7159         if( status ) exit( status );
7160
7161 #       define  ATTR    &attr
7162 #elif defined( HAVE_PTHREADS_D4 )
7163 #       define  ATTR    pthread_attr_default
7164 #else
7165 #       define  ATTR    NULL
7166 #endif
7167
7168         /* make sure pthread_create() isn't just a stub */
7169         status = pthread_create(&t, ATTR, task, NULL);
7170         if( status ) exit( status );
7171
7172         /* give the thread a chance to complete...
7173      * it should remain joinable and hence detachable
7174          */
7175         sleep( 1 );
7176
7177         /* make sure pthread_detach() isn't just a stub */
7178 #if HAVE_PTHREADS_D4
7179         status = pthread_detach( &t );
7180 #else
7181         status = pthread_detach( t );
7182 #endif
7183
7184 #ifdef HAVE_LINUX_THREADS
7185         pthread_kill_other_threads_np();
7186 #endif
7187
7188         exit( status );
7189
7190 ; return 0; }
7191 EOF
7192 if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7193   rm -rf conftest*
7194   ol_cv_pthread_create=yes
7195 else
7196   echo "configure: failed program was:" >&5
7197   cat conftest.$ac_ext >&5
7198   rm -rf conftest*
7199   ol_cv_pthread_create=no
7200 fi
7201 rm -f conftest*
7202 else
7203   cat > conftest.$ac_ext <<EOF
7204 #line 7205 "configure"
7205 #include "confdefs.h"
7206 /* pthread test headers */
7207 #include <pthread.h>
7208 #ifndef NULL
7209 #define NULL (void*)0
7210 #endif
7211
7212 static void *task(p)
7213         void *p;
7214 {
7215         return (void *) (p == NULL);
7216 }
7217
7218
7219 int main(argc, argv)
7220         int argc;
7221         char **argv;
7222 {
7223
7224         /* pthread test function */
7225         pthread_t t;
7226         int status;
7227 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7228         /* This system (e.g. AIX) defaults detached; must override */
7229         pthread_attr_t attr;
7230
7231         status = pthread_attr_init(&attr);
7232         if( status ) exit( status );
7233
7234         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7235         if( status ) exit( status );
7236
7237 #       define  ATTR    &attr
7238 #elif defined( HAVE_PTHREADS_D4 )
7239 #       define  ATTR    pthread_attr_default
7240 #else
7241 #       define  ATTR    NULL
7242 #endif
7243
7244         /* make sure pthread_create() isn't just a stub */
7245         status = pthread_create(&t, ATTR, task, NULL);
7246         if( status ) exit( status );
7247
7248         /* give the thread a chance to complete...
7249      * it should remain joinable and hence detachable
7250          */
7251         sleep( 1 );
7252
7253         /* make sure pthread_detach() isn't just a stub */
7254 #if HAVE_PTHREADS_D4
7255         status = pthread_detach( &t );
7256 #else
7257         status = pthread_detach( t );
7258 #endif
7259
7260 #ifdef HAVE_LINUX_THREADS
7261         pthread_kill_other_threads_np();
7262 #endif
7263
7264         exit( status );
7265
7266 }
7267
7268 EOF
7269 if { (eval echo configure:7270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7270 then
7271   ol_cv_pthread_create=yes
7272 else
7273   echo "configure: failed program was:" >&5
7274   cat conftest.$ac_ext >&5
7275   rm -fr conftest*
7276   ol_cv_pthread_create=no
7277 fi
7278 rm -fr conftest*
7279 fi
7280
7281 fi
7282
7283 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7284
7285                 if test $ol_cv_pthread_create != no ; then
7286                         ol_link_threads=posix
7287                         ol_link_pthreads=""
7288                 fi
7289                 
7290                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7291 if test "$ol_link_threads" = no ; then
7292         # try -kthread
7293         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7294 echo "configure:7295: checking for pthread link with -kthread" >&5
7295 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7296   echo $ac_n "(cached) $ac_c" 1>&6
7297 else
7298   
7299                 # save the flags
7300                 ol_LIBS="$LIBS"
7301                 LIBS="-kthread $LIBS"
7302
7303                 if test "$cross_compiling" = yes; then
7304   cat > conftest.$ac_ext <<EOF
7305 #line 7306 "configure"
7306 #include "confdefs.h"
7307 /* pthread test headers */
7308 #include <pthread.h>
7309 #ifndef NULL
7310 #define NULL (void*)0
7311 #endif
7312
7313 static void *task(p)
7314         void *p;
7315 {
7316         return (void *) (p == NULL);
7317 }
7318
7319 int main() {
7320
7321         /* pthread test function */
7322         pthread_t t;
7323         int status;
7324 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7325         /* This system (e.g. AIX) defaults detached; must override */
7326         pthread_attr_t attr;
7327
7328         status = pthread_attr_init(&attr);
7329         if( status ) exit( status );
7330
7331         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7332         if( status ) exit( status );
7333
7334 #       define  ATTR    &attr
7335 #elif defined( HAVE_PTHREADS_D4 )
7336 #       define  ATTR    pthread_attr_default
7337 #else
7338 #       define  ATTR    NULL
7339 #endif
7340
7341         /* make sure pthread_create() isn't just a stub */
7342         status = pthread_create(&t, ATTR, task, NULL);
7343         if( status ) exit( status );
7344
7345         /* give the thread a chance to complete...
7346      * it should remain joinable and hence detachable
7347          */
7348         sleep( 1 );
7349
7350         /* make sure pthread_detach() isn't just a stub */
7351 #if HAVE_PTHREADS_D4
7352         status = pthread_detach( &t );
7353 #else
7354         status = pthread_detach( t );
7355 #endif
7356
7357 #ifdef HAVE_LINUX_THREADS
7358         pthread_kill_other_threads_np();
7359 #endif
7360
7361         exit( status );
7362
7363 ; return 0; }
7364 EOF
7365 if { (eval echo configure:7366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7366   rm -rf conftest*
7367   ol_cv_pthread_kthread=yes
7368 else
7369   echo "configure: failed program was:" >&5
7370   cat conftest.$ac_ext >&5
7371   rm -rf conftest*
7372   ol_cv_pthread_kthread=no
7373 fi
7374 rm -f conftest*
7375 else
7376   cat > conftest.$ac_ext <<EOF
7377 #line 7378 "configure"
7378 #include "confdefs.h"
7379 /* pthread test headers */
7380 #include <pthread.h>
7381 #ifndef NULL
7382 #define NULL (void*)0
7383 #endif
7384
7385 static void *task(p)
7386         void *p;
7387 {
7388         return (void *) (p == NULL);
7389 }
7390
7391
7392 int main(argc, argv)
7393         int argc;
7394         char **argv;
7395 {
7396
7397         /* pthread test function */
7398         pthread_t t;
7399         int status;
7400 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7401         /* This system (e.g. AIX) defaults detached; must override */
7402         pthread_attr_t attr;
7403
7404         status = pthread_attr_init(&attr);
7405         if( status ) exit( status );
7406
7407         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7408         if( status ) exit( status );
7409
7410 #       define  ATTR    &attr
7411 #elif defined( HAVE_PTHREADS_D4 )
7412 #       define  ATTR    pthread_attr_default
7413 #else
7414 #       define  ATTR    NULL
7415 #endif
7416
7417         /* make sure pthread_create() isn't just a stub */
7418         status = pthread_create(&t, ATTR, task, NULL);
7419         if( status ) exit( status );
7420
7421         /* give the thread a chance to complete...
7422      * it should remain joinable and hence detachable
7423          */
7424         sleep( 1 );
7425
7426         /* make sure pthread_detach() isn't just a stub */
7427 #if HAVE_PTHREADS_D4
7428         status = pthread_detach( &t );
7429 #else
7430         status = pthread_detach( t );
7431 #endif
7432
7433 #ifdef HAVE_LINUX_THREADS
7434         pthread_kill_other_threads_np();
7435 #endif
7436
7437         exit( status );
7438
7439 }
7440
7441 EOF
7442 if { (eval echo configure:7443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7443 then
7444   ol_cv_pthread_kthread=yes
7445 else
7446   echo "configure: failed program was:" >&5
7447   cat conftest.$ac_ext >&5
7448   rm -fr conftest*
7449   ol_cv_pthread_kthread=no
7450 fi
7451 rm -fr conftest*
7452 fi
7453
7454
7455                 # restore the LIBS
7456                 LIBS="$ol_LIBS"
7457         
7458 fi
7459
7460 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7461
7462         if test $ol_cv_pthread_kthread = yes ; then
7463                 ol_link_pthreads="-kthread"
7464                 ol_link_threads=posix
7465         fi
7466 fi
7467
7468                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7469 if test "$ol_link_threads" = no ; then
7470         # try -pthread
7471         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7472 echo "configure:7473: checking for pthread link with -pthread" >&5
7473 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7474   echo $ac_n "(cached) $ac_c" 1>&6
7475 else
7476   
7477                 # save the flags
7478                 ol_LIBS="$LIBS"
7479                 LIBS="-pthread $LIBS"
7480
7481                 if test "$cross_compiling" = yes; then
7482   cat > conftest.$ac_ext <<EOF
7483 #line 7484 "configure"
7484 #include "confdefs.h"
7485 /* pthread test headers */
7486 #include <pthread.h>
7487 #ifndef NULL
7488 #define NULL (void*)0
7489 #endif
7490
7491 static void *task(p)
7492         void *p;
7493 {
7494         return (void *) (p == NULL);
7495 }
7496
7497 int main() {
7498
7499         /* pthread test function */
7500         pthread_t t;
7501         int status;
7502 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7503         /* This system (e.g. AIX) defaults detached; must override */
7504         pthread_attr_t attr;
7505
7506         status = pthread_attr_init(&attr);
7507         if( status ) exit( status );
7508
7509         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7510         if( status ) exit( status );
7511
7512 #       define  ATTR    &attr
7513 #elif defined( HAVE_PTHREADS_D4 )
7514 #       define  ATTR    pthread_attr_default
7515 #else
7516 #       define  ATTR    NULL
7517 #endif
7518
7519         /* make sure pthread_create() isn't just a stub */
7520         status = pthread_create(&t, ATTR, task, NULL);
7521         if( status ) exit( status );
7522
7523         /* give the thread a chance to complete...
7524      * it should remain joinable and hence detachable
7525          */
7526         sleep( 1 );
7527
7528         /* make sure pthread_detach() isn't just a stub */
7529 #if HAVE_PTHREADS_D4
7530         status = pthread_detach( &t );
7531 #else
7532         status = pthread_detach( t );
7533 #endif
7534
7535 #ifdef HAVE_LINUX_THREADS
7536         pthread_kill_other_threads_np();
7537 #endif
7538
7539         exit( status );
7540
7541 ; return 0; }
7542 EOF
7543 if { (eval echo configure:7544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7544   rm -rf conftest*
7545   ol_cv_pthread_pthread=yes
7546 else
7547   echo "configure: failed program was:" >&5
7548   cat conftest.$ac_ext >&5
7549   rm -rf conftest*
7550   ol_cv_pthread_pthread=no
7551 fi
7552 rm -f conftest*
7553 else
7554   cat > conftest.$ac_ext <<EOF
7555 #line 7556 "configure"
7556 #include "confdefs.h"
7557 /* pthread test headers */
7558 #include <pthread.h>
7559 #ifndef NULL
7560 #define NULL (void*)0
7561 #endif
7562
7563 static void *task(p)
7564         void *p;
7565 {
7566         return (void *) (p == NULL);
7567 }
7568
7569
7570 int main(argc, argv)
7571         int argc;
7572         char **argv;
7573 {
7574
7575         /* pthread test function */
7576         pthread_t t;
7577         int status;
7578 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7579         /* This system (e.g. AIX) defaults detached; must override */
7580         pthread_attr_t attr;
7581
7582         status = pthread_attr_init(&attr);
7583         if( status ) exit( status );
7584
7585         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7586         if( status ) exit( status );
7587
7588 #       define  ATTR    &attr
7589 #elif defined( HAVE_PTHREADS_D4 )
7590 #       define  ATTR    pthread_attr_default
7591 #else
7592 #       define  ATTR    NULL
7593 #endif
7594
7595         /* make sure pthread_create() isn't just a stub */
7596         status = pthread_create(&t, ATTR, task, NULL);
7597         if( status ) exit( status );
7598
7599         /* give the thread a chance to complete...
7600      * it should remain joinable and hence detachable
7601          */
7602         sleep( 1 );
7603
7604         /* make sure pthread_detach() isn't just a stub */
7605 #if HAVE_PTHREADS_D4
7606         status = pthread_detach( &t );
7607 #else
7608         status = pthread_detach( t );
7609 #endif
7610
7611 #ifdef HAVE_LINUX_THREADS
7612         pthread_kill_other_threads_np();
7613 #endif
7614
7615         exit( status );
7616
7617 }
7618
7619 EOF
7620 if { (eval echo configure:7621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7621 then
7622   ol_cv_pthread_pthread=yes
7623 else
7624   echo "configure: failed program was:" >&5
7625   cat conftest.$ac_ext >&5
7626   rm -fr conftest*
7627   ol_cv_pthread_pthread=no
7628 fi
7629 rm -fr conftest*
7630 fi
7631
7632
7633                 # restore the LIBS
7634                 LIBS="$ol_LIBS"
7635         
7636 fi
7637
7638 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7639
7640         if test $ol_cv_pthread_pthread = yes ; then
7641                 ol_link_pthreads="-pthread"
7642                 ol_link_threads=posix
7643         fi
7644 fi
7645
7646                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7647 if test "$ol_link_threads" = no ; then
7648         # try -pthreads
7649         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7650 echo "configure:7651: checking for pthread link with -pthreads" >&5
7651 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7652   echo $ac_n "(cached) $ac_c" 1>&6
7653 else
7654   
7655                 # save the flags
7656                 ol_LIBS="$LIBS"
7657                 LIBS="-pthreads $LIBS"
7658
7659                 if test "$cross_compiling" = yes; then
7660   cat > conftest.$ac_ext <<EOF
7661 #line 7662 "configure"
7662 #include "confdefs.h"
7663 /* pthread test headers */
7664 #include <pthread.h>
7665 #ifndef NULL
7666 #define NULL (void*)0
7667 #endif
7668
7669 static void *task(p)
7670         void *p;
7671 {
7672         return (void *) (p == NULL);
7673 }
7674
7675 int main() {
7676
7677         /* pthread test function */
7678         pthread_t t;
7679         int status;
7680 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7681         /* This system (e.g. AIX) defaults detached; must override */
7682         pthread_attr_t attr;
7683
7684         status = pthread_attr_init(&attr);
7685         if( status ) exit( status );
7686
7687         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7688         if( status ) exit( status );
7689
7690 #       define  ATTR    &attr
7691 #elif defined( HAVE_PTHREADS_D4 )
7692 #       define  ATTR    pthread_attr_default
7693 #else
7694 #       define  ATTR    NULL
7695 #endif
7696
7697         /* make sure pthread_create() isn't just a stub */
7698         status = pthread_create(&t, ATTR, task, NULL);
7699         if( status ) exit( status );
7700
7701         /* give the thread a chance to complete...
7702      * it should remain joinable and hence detachable
7703          */
7704         sleep( 1 );
7705
7706         /* make sure pthread_detach() isn't just a stub */
7707 #if HAVE_PTHREADS_D4
7708         status = pthread_detach( &t );
7709 #else
7710         status = pthread_detach( t );
7711 #endif
7712
7713 #ifdef HAVE_LINUX_THREADS
7714         pthread_kill_other_threads_np();
7715 #endif
7716
7717         exit( status );
7718
7719 ; return 0; }
7720 EOF
7721 if { (eval echo configure:7722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7722   rm -rf conftest*
7723   ol_cv_pthread_pthreads=yes
7724 else
7725   echo "configure: failed program was:" >&5
7726   cat conftest.$ac_ext >&5
7727   rm -rf conftest*
7728   ol_cv_pthread_pthreads=no
7729 fi
7730 rm -f conftest*
7731 else
7732   cat > conftest.$ac_ext <<EOF
7733 #line 7734 "configure"
7734 #include "confdefs.h"
7735 /* pthread test headers */
7736 #include <pthread.h>
7737 #ifndef NULL
7738 #define NULL (void*)0
7739 #endif
7740
7741 static void *task(p)
7742         void *p;
7743 {
7744         return (void *) (p == NULL);
7745 }
7746
7747
7748 int main(argc, argv)
7749         int argc;
7750         char **argv;
7751 {
7752
7753         /* pthread test function */
7754         pthread_t t;
7755         int status;
7756 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7757         /* This system (e.g. AIX) defaults detached; must override */
7758         pthread_attr_t attr;
7759
7760         status = pthread_attr_init(&attr);
7761         if( status ) exit( status );
7762
7763         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7764         if( status ) exit( status );
7765
7766 #       define  ATTR    &attr
7767 #elif defined( HAVE_PTHREADS_D4 )
7768 #       define  ATTR    pthread_attr_default
7769 #else
7770 #       define  ATTR    NULL
7771 #endif
7772
7773         /* make sure pthread_create() isn't just a stub */
7774         status = pthread_create(&t, ATTR, task, NULL);
7775         if( status ) exit( status );
7776
7777         /* give the thread a chance to complete...
7778      * it should remain joinable and hence detachable
7779          */
7780         sleep( 1 );
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_pthreads=yes
7801 else
7802   echo "configure: failed program was:" >&5
7803   cat conftest.$ac_ext >&5
7804   rm -fr conftest*
7805   ol_cv_pthread_pthreads=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_pthreads" 1>&6
7817
7818         if test $ol_cv_pthread_pthreads = yes ; then
7819                 ol_link_pthreads="-pthreads"
7820                 ol_link_threads=posix
7821         fi
7822 fi
7823
7824                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7825 if test "$ol_link_threads" = no ; then
7826         # try -mthreads
7827         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7828 echo "configure:7829: checking for pthread link with -mthreads" >&5
7829 if eval "test \"\${ol_cv_pthread_mthreads+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="-mthreads $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 #elif defined( HAVE_PTHREADS_D4 )
7870 #       define  ATTR    pthread_attr_default
7871 #else
7872 #       define  ATTR    NULL
7873 #endif
7874
7875         /* make sure pthread_create() isn't just a stub */
7876         status = pthread_create(&t, ATTR, task, NULL);
7877         if( status ) exit( status );
7878
7879         /* give the thread a chance to complete...
7880      * it should remain joinable and hence detachable
7881          */
7882         sleep( 1 );
7883
7884         /* make sure pthread_detach() isn't just a stub */
7885 #if HAVE_PTHREADS_D4
7886         status = pthread_detach( &t );
7887 #else
7888         status = pthread_detach( t );
7889 #endif
7890
7891 #ifdef HAVE_LINUX_THREADS
7892         pthread_kill_other_threads_np();
7893 #endif
7894
7895         exit( status );
7896
7897 ; return 0; }
7898 EOF
7899 if { (eval echo configure:7900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7900   rm -rf conftest*
7901   ol_cv_pthread_mthreads=yes
7902 else
7903   echo "configure: failed program was:" >&5
7904   cat conftest.$ac_ext >&5
7905   rm -rf conftest*
7906   ol_cv_pthread_mthreads=no
7907 fi
7908 rm -f conftest*
7909 else
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913 /* pthread test headers */
7914 #include <pthread.h>
7915 #ifndef NULL
7916 #define NULL (void*)0
7917 #endif
7918
7919 static void *task(p)
7920         void *p;
7921 {
7922         return (void *) (p == NULL);
7923 }
7924
7925
7926 int main(argc, argv)
7927         int argc;
7928         char **argv;
7929 {
7930
7931         /* pthread test function */
7932         pthread_t t;
7933         int status;
7934 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7935         /* This system (e.g. AIX) defaults detached; must override */
7936         pthread_attr_t attr;
7937
7938         status = pthread_attr_init(&attr);
7939         if( status ) exit( status );
7940
7941         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7942         if( status ) exit( status );
7943
7944 #       define  ATTR    &attr
7945 #elif defined( HAVE_PTHREADS_D4 )
7946 #       define  ATTR    pthread_attr_default
7947 #else
7948 #       define  ATTR    NULL
7949 #endif
7950
7951         /* make sure pthread_create() isn't just a stub */
7952         status = pthread_create(&t, ATTR, task, NULL);
7953         if( status ) exit( status );
7954
7955         /* give the thread a chance to complete...
7956      * it should remain joinable and hence detachable
7957          */
7958         sleep( 1 );
7959
7960         /* make sure pthread_detach() isn't just a stub */
7961 #if HAVE_PTHREADS_D4
7962         status = pthread_detach( &t );
7963 #else
7964         status = pthread_detach( t );
7965 #endif
7966
7967 #ifdef HAVE_LINUX_THREADS
7968         pthread_kill_other_threads_np();
7969 #endif
7970
7971         exit( status );
7972
7973 }
7974
7975 EOF
7976 if { (eval echo configure:7977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7977 then
7978   ol_cv_pthread_mthreads=yes
7979 else
7980   echo "configure: failed program was:" >&5
7981   cat conftest.$ac_ext >&5
7982   rm -fr conftest*
7983   ol_cv_pthread_mthreads=no
7984 fi
7985 rm -fr conftest*
7986 fi
7987
7988
7989                 # restore the LIBS
7990                 LIBS="$ol_LIBS"
7991         
7992 fi
7993
7994 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7995
7996         if test $ol_cv_pthread_mthreads = yes ; then
7997                 ol_link_pthreads="-mthreads"
7998                 ol_link_threads=posix
7999         fi
8000 fi
8001
8002                 # Pthread try link: -thread (ol_cv_pthread_thread)
8003 if test "$ol_link_threads" = no ; then
8004         # try -thread
8005         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8006 echo "configure:8007: checking for pthread link with -thread" >&5
8007 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8008   echo $ac_n "(cached) $ac_c" 1>&6
8009 else
8010   
8011                 # save the flags
8012                 ol_LIBS="$LIBS"
8013                 LIBS="-thread $LIBS"
8014
8015                 if test "$cross_compiling" = yes; then
8016   cat > conftest.$ac_ext <<EOF
8017 #line 8018 "configure"
8018 #include "confdefs.h"
8019 /* pthread test headers */
8020 #include <pthread.h>
8021 #ifndef NULL
8022 #define NULL (void*)0
8023 #endif
8024
8025 static void *task(p)
8026         void *p;
8027 {
8028         return (void *) (p == NULL);
8029 }
8030
8031 int main() {
8032
8033         /* pthread test function */
8034         pthread_t t;
8035         int status;
8036 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8037         /* This system (e.g. AIX) defaults detached; must override */
8038         pthread_attr_t attr;
8039
8040         status = pthread_attr_init(&attr);
8041         if( status ) exit( status );
8042
8043         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8044         if( status ) exit( status );
8045
8046 #       define  ATTR    &attr
8047 #elif defined( HAVE_PTHREADS_D4 )
8048 #       define  ATTR    pthread_attr_default
8049 #else
8050 #       define  ATTR    NULL
8051 #endif
8052
8053         /* make sure pthread_create() isn't just a stub */
8054         status = pthread_create(&t, ATTR, task, NULL);
8055         if( status ) exit( status );
8056
8057         /* give the thread a chance to complete...
8058      * it should remain joinable and hence detachable
8059          */
8060         sleep( 1 );
8061
8062         /* make sure pthread_detach() isn't just a stub */
8063 #if HAVE_PTHREADS_D4
8064         status = pthread_detach( &t );
8065 #else
8066         status = pthread_detach( t );
8067 #endif
8068
8069 #ifdef HAVE_LINUX_THREADS
8070         pthread_kill_other_threads_np();
8071 #endif
8072
8073         exit( status );
8074
8075 ; return 0; }
8076 EOF
8077 if { (eval echo configure:8078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8078   rm -rf conftest*
8079   ol_cv_pthread_thread=yes
8080 else
8081   echo "configure: failed program was:" >&5
8082   cat conftest.$ac_ext >&5
8083   rm -rf conftest*
8084   ol_cv_pthread_thread=no
8085 fi
8086 rm -f conftest*
8087 else
8088   cat > conftest.$ac_ext <<EOF
8089 #line 8090 "configure"
8090 #include "confdefs.h"
8091 /* pthread test headers */
8092 #include <pthread.h>
8093 #ifndef NULL
8094 #define NULL (void*)0
8095 #endif
8096
8097 static void *task(p)
8098         void *p;
8099 {
8100         return (void *) (p == NULL);
8101 }
8102
8103
8104 int main(argc, argv)
8105         int argc;
8106         char **argv;
8107 {
8108
8109         /* pthread test function */
8110         pthread_t t;
8111         int status;
8112 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8113         /* This system (e.g. AIX) defaults detached; must override */
8114         pthread_attr_t attr;
8115
8116         status = pthread_attr_init(&attr);
8117         if( status ) exit( status );
8118
8119         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8120         if( status ) exit( status );
8121
8122 #       define  ATTR    &attr
8123 #elif defined( HAVE_PTHREADS_D4 )
8124 #       define  ATTR    pthread_attr_default
8125 #else
8126 #       define  ATTR    NULL
8127 #endif
8128
8129         /* make sure pthread_create() isn't just a stub */
8130         status = pthread_create(&t, ATTR, task, NULL);
8131         if( status ) exit( status );
8132
8133         /* give the thread a chance to complete...
8134      * it should remain joinable and hence detachable
8135          */
8136         sleep( 1 );
8137
8138         /* make sure pthread_detach() isn't just a stub */
8139 #if HAVE_PTHREADS_D4
8140         status = pthread_detach( &t );
8141 #else
8142         status = pthread_detach( t );
8143 #endif
8144
8145 #ifdef HAVE_LINUX_THREADS
8146         pthread_kill_other_threads_np();
8147 #endif
8148
8149         exit( status );
8150
8151 }
8152
8153 EOF
8154 if { (eval echo configure:8155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8155 then
8156   ol_cv_pthread_thread=yes
8157 else
8158   echo "configure: failed program was:" >&5
8159   cat conftest.$ac_ext >&5
8160   rm -fr conftest*
8161   ol_cv_pthread_thread=no
8162 fi
8163 rm -fr conftest*
8164 fi
8165
8166
8167                 # restore the LIBS
8168                 LIBS="$ol_LIBS"
8169         
8170 fi
8171
8172 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8173
8174         if test $ol_cv_pthread_thread = yes ; then
8175                 ol_link_pthreads="-thread"
8176                 ol_link_threads=posix
8177         fi
8178 fi
8179
8180
8181                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8182 if test "$ol_link_threads" = no ; then
8183         # try -lpthread -lmach -lexc -lc_r
8184         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8185 echo "configure:8186: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8186 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8187   echo $ac_n "(cached) $ac_c" 1>&6
8188 else
8189   
8190                 # save the flags
8191                 ol_LIBS="$LIBS"
8192                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8193
8194                 if test "$cross_compiling" = yes; then
8195   cat > conftest.$ac_ext <<EOF
8196 #line 8197 "configure"
8197 #include "confdefs.h"
8198 /* pthread test headers */
8199 #include <pthread.h>
8200 #ifndef NULL
8201 #define NULL (void*)0
8202 #endif
8203
8204 static void *task(p)
8205         void *p;
8206 {
8207         return (void *) (p == NULL);
8208 }
8209
8210 int main() {
8211
8212         /* pthread test function */
8213         pthread_t t;
8214         int status;
8215 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8216         /* This system (e.g. AIX) defaults detached; must override */
8217         pthread_attr_t attr;
8218
8219         status = pthread_attr_init(&attr);
8220         if( status ) exit( status );
8221
8222         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8223         if( status ) exit( status );
8224
8225 #       define  ATTR    &attr
8226 #elif defined( HAVE_PTHREADS_D4 )
8227 #       define  ATTR    pthread_attr_default
8228 #else
8229 #       define  ATTR    NULL
8230 #endif
8231
8232         /* make sure pthread_create() isn't just a stub */
8233         status = pthread_create(&t, ATTR, task, NULL);
8234         if( status ) exit( status );
8235
8236         /* give the thread a chance to complete...
8237      * it should remain joinable and hence detachable
8238          */
8239         sleep( 1 );
8240
8241         /* make sure pthread_detach() isn't just a stub */
8242 #if HAVE_PTHREADS_D4
8243         status = pthread_detach( &t );
8244 #else
8245         status = pthread_detach( t );
8246 #endif
8247
8248 #ifdef HAVE_LINUX_THREADS
8249         pthread_kill_other_threads_np();
8250 #endif
8251
8252         exit( status );
8253
8254 ; return 0; }
8255 EOF
8256 if { (eval echo configure:8257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8257   rm -rf conftest*
8258   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8259 else
8260   echo "configure: failed program was:" >&5
8261   cat conftest.$ac_ext >&5
8262   rm -rf conftest*
8263   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8264 fi
8265 rm -f conftest*
8266 else
8267   cat > conftest.$ac_ext <<EOF
8268 #line 8269 "configure"
8269 #include "confdefs.h"
8270 /* pthread test headers */
8271 #include <pthread.h>
8272 #ifndef NULL
8273 #define NULL (void*)0
8274 #endif
8275
8276 static void *task(p)
8277         void *p;
8278 {
8279         return (void *) (p == NULL);
8280 }
8281
8282
8283 int main(argc, argv)
8284         int argc;
8285         char **argv;
8286 {
8287
8288         /* pthread test function */
8289         pthread_t t;
8290         int status;
8291 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8292         /* This system (e.g. AIX) defaults detached; must override */
8293         pthread_attr_t attr;
8294
8295         status = pthread_attr_init(&attr);
8296         if( status ) exit( status );
8297
8298         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8299         if( status ) exit( status );
8300
8301 #       define  ATTR    &attr
8302 #elif defined( HAVE_PTHREADS_D4 )
8303 #       define  ATTR    pthread_attr_default
8304 #else
8305 #       define  ATTR    NULL
8306 #endif
8307
8308         /* make sure pthread_create() isn't just a stub */
8309         status = pthread_create(&t, ATTR, task, NULL);
8310         if( status ) exit( status );
8311
8312         /* give the thread a chance to complete...
8313      * it should remain joinable and hence detachable
8314          */
8315         sleep( 1 );
8316
8317         /* make sure pthread_detach() isn't just a stub */
8318 #if HAVE_PTHREADS_D4
8319         status = pthread_detach( &t );
8320 #else
8321         status = pthread_detach( t );
8322 #endif
8323
8324 #ifdef HAVE_LINUX_THREADS
8325         pthread_kill_other_threads_np();
8326 #endif
8327
8328         exit( status );
8329
8330 }
8331
8332 EOF
8333 if { (eval echo configure:8334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8334 then
8335   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8336 else
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -fr conftest*
8340   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8341 fi
8342 rm -fr conftest*
8343 fi
8344
8345
8346                 # restore the LIBS
8347                 LIBS="$ol_LIBS"
8348         
8349 fi
8350
8351 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8352
8353         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8354                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8355                 ol_link_threads=posix
8356         fi
8357 fi
8358
8359                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8360 if test "$ol_link_threads" = no ; then
8361         # try -lpthread -lmach -lexc
8362         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8363 echo "configure:8364: checking for pthread link with -lpthread -lmach -lexc" >&5
8364 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   
8368                 # save the flags
8369                 ol_LIBS="$LIBS"
8370                 LIBS="-lpthread -lmach -lexc $LIBS"
8371
8372                 if test "$cross_compiling" = yes; then
8373   cat > conftest.$ac_ext <<EOF
8374 #line 8375 "configure"
8375 #include "confdefs.h"
8376 /* pthread test headers */
8377 #include <pthread.h>
8378 #ifndef NULL
8379 #define NULL (void*)0
8380 #endif
8381
8382 static void *task(p)
8383         void *p;
8384 {
8385         return (void *) (p == NULL);
8386 }
8387
8388 int main() {
8389
8390         /* pthread test function */
8391         pthread_t t;
8392         int status;
8393 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8394         /* This system (e.g. AIX) defaults detached; must override */
8395         pthread_attr_t attr;
8396
8397         status = pthread_attr_init(&attr);
8398         if( status ) exit( status );
8399
8400         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8401         if( status ) exit( status );
8402
8403 #       define  ATTR    &attr
8404 #elif defined( HAVE_PTHREADS_D4 )
8405 #       define  ATTR    pthread_attr_default
8406 #else
8407 #       define  ATTR    NULL
8408 #endif
8409
8410         /* make sure pthread_create() isn't just a stub */
8411         status = pthread_create(&t, ATTR, task, NULL);
8412         if( status ) exit( status );
8413
8414         /* give the thread a chance to complete...
8415      * it should remain joinable and hence detachable
8416          */
8417         sleep( 1 );
8418
8419         /* make sure pthread_detach() isn't just a stub */
8420 #if HAVE_PTHREADS_D4
8421         status = pthread_detach( &t );
8422 #else
8423         status = pthread_detach( t );
8424 #endif
8425
8426 #ifdef HAVE_LINUX_THREADS
8427         pthread_kill_other_threads_np();
8428 #endif
8429
8430         exit( status );
8431
8432 ; return 0; }
8433 EOF
8434 if { (eval echo configure:8435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8435   rm -rf conftest*
8436   ol_cv_pthread_lpthread_lmach_lexc=yes
8437 else
8438   echo "configure: failed program was:" >&5
8439   cat conftest.$ac_ext >&5
8440   rm -rf conftest*
8441   ol_cv_pthread_lpthread_lmach_lexc=no
8442 fi
8443 rm -f conftest*
8444 else
8445   cat > conftest.$ac_ext <<EOF
8446 #line 8447 "configure"
8447 #include "confdefs.h"
8448 /* pthread test headers */
8449 #include <pthread.h>
8450 #ifndef NULL
8451 #define NULL (void*)0
8452 #endif
8453
8454 static void *task(p)
8455         void *p;
8456 {
8457         return (void *) (p == NULL);
8458 }
8459
8460
8461 int main(argc, argv)
8462         int argc;
8463         char **argv;
8464 {
8465
8466         /* pthread test function */
8467         pthread_t t;
8468         int status;
8469 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8470         /* This system (e.g. AIX) defaults detached; must override */
8471         pthread_attr_t attr;
8472
8473         status = pthread_attr_init(&attr);
8474         if( status ) exit( status );
8475
8476         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8477         if( status ) exit( status );
8478
8479 #       define  ATTR    &attr
8480 #elif defined( HAVE_PTHREADS_D4 )
8481 #       define  ATTR    pthread_attr_default
8482 #else
8483 #       define  ATTR    NULL
8484 #endif
8485
8486         /* make sure pthread_create() isn't just a stub */
8487         status = pthread_create(&t, ATTR, task, NULL);
8488         if( status ) exit( status );
8489
8490         /* give the thread a chance to complete...
8491      * it should remain joinable and hence detachable
8492          */
8493         sleep( 1 );
8494
8495         /* make sure pthread_detach() isn't just a stub */
8496 #if HAVE_PTHREADS_D4
8497         status = pthread_detach( &t );
8498 #else
8499         status = pthread_detach( t );
8500 #endif
8501
8502 #ifdef HAVE_LINUX_THREADS
8503         pthread_kill_other_threads_np();
8504 #endif
8505
8506         exit( status );
8507
8508 }
8509
8510 EOF
8511 if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8512 then
8513   ol_cv_pthread_lpthread_lmach_lexc=yes
8514 else
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -fr conftest*
8518   ol_cv_pthread_lpthread_lmach_lexc=no
8519 fi
8520 rm -fr conftest*
8521 fi
8522
8523
8524                 # restore the LIBS
8525                 LIBS="$ol_LIBS"
8526         
8527 fi
8528
8529 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8530
8531         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8532                 ol_link_pthreads="-lpthread -lmach -lexc"
8533                 ol_link_threads=posix
8534         fi
8535 fi
8536
8537
8538                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8539 if test "$ol_link_threads" = no ; then
8540         # try -lpthread -Wl,-woff,85
8541         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8542 echo "configure:8543: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8543 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8544   echo $ac_n "(cached) $ac_c" 1>&6
8545 else
8546   
8547                 # save the flags
8548                 ol_LIBS="$LIBS"
8549                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8550
8551                 if test "$cross_compiling" = yes; then
8552   cat > conftest.$ac_ext <<EOF
8553 #line 8554 "configure"
8554 #include "confdefs.h"
8555 /* pthread test headers */
8556 #include <pthread.h>
8557 #ifndef NULL
8558 #define NULL (void*)0
8559 #endif
8560
8561 static void *task(p)
8562         void *p;
8563 {
8564         return (void *) (p == NULL);
8565 }
8566
8567 int main() {
8568
8569         /* pthread test function */
8570         pthread_t t;
8571         int status;
8572 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8573         /* This system (e.g. AIX) defaults detached; must override */
8574         pthread_attr_t attr;
8575
8576         status = pthread_attr_init(&attr);
8577         if( status ) exit( status );
8578
8579         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8580         if( status ) exit( status );
8581
8582 #       define  ATTR    &attr
8583 #elif defined( HAVE_PTHREADS_D4 )
8584 #       define  ATTR    pthread_attr_default
8585 #else
8586 #       define  ATTR    NULL
8587 #endif
8588
8589         /* make sure pthread_create() isn't just a stub */
8590         status = pthread_create(&t, ATTR, task, NULL);
8591         if( status ) exit( status );
8592
8593         /* give the thread a chance to complete...
8594      * it should remain joinable and hence detachable
8595          */
8596         sleep( 1 );
8597
8598         /* make sure pthread_detach() isn't just a stub */
8599 #if HAVE_PTHREADS_D4
8600         status = pthread_detach( &t );
8601 #else
8602         status = pthread_detach( t );
8603 #endif
8604
8605 #ifdef HAVE_LINUX_THREADS
8606         pthread_kill_other_threads_np();
8607 #endif
8608
8609         exit( status );
8610
8611 ; return 0; }
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8614   rm -rf conftest*
8615   ol_cv_pthread_lib_lpthread_woff=yes
8616 else
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -rf conftest*
8620   ol_cv_pthread_lib_lpthread_woff=no
8621 fi
8622 rm -f conftest*
8623 else
8624   cat > conftest.$ac_ext <<EOF
8625 #line 8626 "configure"
8626 #include "confdefs.h"
8627 /* pthread test headers */
8628 #include <pthread.h>
8629 #ifndef NULL
8630 #define NULL (void*)0
8631 #endif
8632
8633 static void *task(p)
8634         void *p;
8635 {
8636         return (void *) (p == NULL);
8637 }
8638
8639
8640 int main(argc, argv)
8641         int argc;
8642         char **argv;
8643 {
8644
8645         /* pthread test function */
8646         pthread_t t;
8647         int status;
8648 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8649         /* This system (e.g. AIX) defaults detached; must override */
8650         pthread_attr_t attr;
8651
8652         status = pthread_attr_init(&attr);
8653         if( status ) exit( status );
8654
8655         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8656         if( status ) exit( status );
8657
8658 #       define  ATTR    &attr
8659 #elif defined( HAVE_PTHREADS_D4 )
8660 #       define  ATTR    pthread_attr_default
8661 #else
8662 #       define  ATTR    NULL
8663 #endif
8664
8665         /* make sure pthread_create() isn't just a stub */
8666         status = pthread_create(&t, ATTR, task, NULL);
8667         if( status ) exit( status );
8668
8669         /* give the thread a chance to complete...
8670      * it should remain joinable and hence detachable
8671          */
8672         sleep( 1 );
8673
8674         /* make sure pthread_detach() isn't just a stub */
8675 #if HAVE_PTHREADS_D4
8676         status = pthread_detach( &t );
8677 #else
8678         status = pthread_detach( t );
8679 #endif
8680
8681 #ifdef HAVE_LINUX_THREADS
8682         pthread_kill_other_threads_np();
8683 #endif
8684
8685         exit( status );
8686
8687 }
8688
8689 EOF
8690 if { (eval echo configure:8691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8691 then
8692   ol_cv_pthread_lib_lpthread_woff=yes
8693 else
8694   echo "configure: failed program was:" >&5
8695   cat conftest.$ac_ext >&5
8696   rm -fr conftest*
8697   ol_cv_pthread_lib_lpthread_woff=no
8698 fi
8699 rm -fr conftest*
8700 fi
8701
8702
8703                 # restore the LIBS
8704                 LIBS="$ol_LIBS"
8705         
8706 fi
8707
8708 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8709
8710         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8711                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8712                 ol_link_threads=posix
8713         fi
8714 fi
8715
8716
8717                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8718 if test "$ol_link_threads" = no ; then
8719         # try -lpthread
8720         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8721 echo "configure:8722: checking for pthread link with -lpthread" >&5
8722 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8723   echo $ac_n "(cached) $ac_c" 1>&6
8724 else
8725   
8726                 # save the flags
8727                 ol_LIBS="$LIBS"
8728                 LIBS="-lpthread $LIBS"
8729
8730                 if test "$cross_compiling" = yes; then
8731   cat > conftest.$ac_ext <<EOF
8732 #line 8733 "configure"
8733 #include "confdefs.h"
8734 /* pthread test headers */
8735 #include <pthread.h>
8736 #ifndef NULL
8737 #define NULL (void*)0
8738 #endif
8739
8740 static void *task(p)
8741         void *p;
8742 {
8743         return (void *) (p == NULL);
8744 }
8745
8746 int main() {
8747
8748         /* pthread test function */
8749         pthread_t t;
8750         int status;
8751 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8752         /* This system (e.g. AIX) defaults detached; must override */
8753         pthread_attr_t attr;
8754
8755         status = pthread_attr_init(&attr);
8756         if( status ) exit( status );
8757
8758         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8759         if( status ) exit( status );
8760
8761 #       define  ATTR    &attr
8762 #elif defined( HAVE_PTHREADS_D4 )
8763 #       define  ATTR    pthread_attr_default
8764 #else
8765 #       define  ATTR    NULL
8766 #endif
8767
8768         /* make sure pthread_create() isn't just a stub */
8769         status = pthread_create(&t, ATTR, task, NULL);
8770         if( status ) exit( status );
8771
8772         /* give the thread a chance to complete...
8773      * it should remain joinable and hence detachable
8774          */
8775         sleep( 1 );
8776
8777         /* make sure pthread_detach() isn't just a stub */
8778 #if HAVE_PTHREADS_D4
8779         status = pthread_detach( &t );
8780 #else
8781         status = pthread_detach( t );
8782 #endif
8783
8784 #ifdef HAVE_LINUX_THREADS
8785         pthread_kill_other_threads_np();
8786 #endif
8787
8788         exit( status );
8789
8790 ; return 0; }
8791 EOF
8792 if { (eval echo configure:8793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8793   rm -rf conftest*
8794   ol_cv_pthread_lpthread=yes
8795 else
8796   echo "configure: failed program was:" >&5
8797   cat conftest.$ac_ext >&5
8798   rm -rf conftest*
8799   ol_cv_pthread_lpthread=no
8800 fi
8801 rm -f conftest*
8802 else
8803   cat > conftest.$ac_ext <<EOF
8804 #line 8805 "configure"
8805 #include "confdefs.h"
8806 /* pthread test headers */
8807 #include <pthread.h>
8808 #ifndef NULL
8809 #define NULL (void*)0
8810 #endif
8811
8812 static void *task(p)
8813         void *p;
8814 {
8815         return (void *) (p == NULL);
8816 }
8817
8818
8819 int main(argc, argv)
8820         int argc;
8821         char **argv;
8822 {
8823
8824         /* pthread test function */
8825         pthread_t t;
8826         int status;
8827 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8828         /* This system (e.g. AIX) defaults detached; must override */
8829         pthread_attr_t attr;
8830
8831         status = pthread_attr_init(&attr);
8832         if( status ) exit( status );
8833
8834         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8835         if( status ) exit( status );
8836
8837 #       define  ATTR    &attr
8838 #elif defined( HAVE_PTHREADS_D4 )
8839 #       define  ATTR    pthread_attr_default
8840 #else
8841 #       define  ATTR    NULL
8842 #endif
8843
8844         /* make sure pthread_create() isn't just a stub */
8845         status = pthread_create(&t, ATTR, task, NULL);
8846         if( status ) exit( status );
8847
8848         /* give the thread a chance to complete...
8849      * it should remain joinable and hence detachable
8850          */
8851         sleep( 1 );
8852
8853         /* make sure pthread_detach() isn't just a stub */
8854 #if HAVE_PTHREADS_D4
8855         status = pthread_detach( &t );
8856 #else
8857         status = pthread_detach( t );
8858 #endif
8859
8860 #ifdef HAVE_LINUX_THREADS
8861         pthread_kill_other_threads_np();
8862 #endif
8863
8864         exit( status );
8865
8866 }
8867
8868 EOF
8869 if { (eval echo configure:8870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8870 then
8871   ol_cv_pthread_lpthread=yes
8872 else
8873   echo "configure: failed program was:" >&5
8874   cat conftest.$ac_ext >&5
8875   rm -fr conftest*
8876   ol_cv_pthread_lpthread=no
8877 fi
8878 rm -fr conftest*
8879 fi
8880
8881
8882                 # restore the LIBS
8883                 LIBS="$ol_LIBS"
8884         
8885 fi
8886
8887 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8888
8889         if test $ol_cv_pthread_lpthread = yes ; then
8890                 ol_link_pthreads="-lpthread"
8891                 ol_link_threads=posix
8892         fi
8893 fi
8894
8895                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8896 if test "$ol_link_threads" = no ; then
8897         # try -lc_r
8898         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8899 echo "configure:8900: checking for pthread link with -lc_r" >&5
8900 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8901   echo $ac_n "(cached) $ac_c" 1>&6
8902 else
8903   
8904                 # save the flags
8905                 ol_LIBS="$LIBS"
8906                 LIBS="-lc_r $LIBS"
8907
8908                 if test "$cross_compiling" = yes; then
8909   cat > conftest.$ac_ext <<EOF
8910 #line 8911 "configure"
8911 #include "confdefs.h"
8912 /* pthread test headers */
8913 #include <pthread.h>
8914 #ifndef NULL
8915 #define NULL (void*)0
8916 #endif
8917
8918 static void *task(p)
8919         void *p;
8920 {
8921         return (void *) (p == NULL);
8922 }
8923
8924 int main() {
8925
8926         /* pthread test function */
8927         pthread_t t;
8928         int status;
8929 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8930         /* This system (e.g. AIX) defaults detached; must override */
8931         pthread_attr_t attr;
8932
8933         status = pthread_attr_init(&attr);
8934         if( status ) exit( status );
8935
8936         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8937         if( status ) exit( status );
8938
8939 #       define  ATTR    &attr
8940 #elif defined( HAVE_PTHREADS_D4 )
8941 #       define  ATTR    pthread_attr_default
8942 #else
8943 #       define  ATTR    NULL
8944 #endif
8945
8946         /* make sure pthread_create() isn't just a stub */
8947         status = pthread_create(&t, ATTR, task, NULL);
8948         if( status ) exit( status );
8949
8950         /* give the thread a chance to complete...
8951      * it should remain joinable and hence detachable
8952          */
8953         sleep( 1 );
8954
8955         /* make sure pthread_detach() isn't just a stub */
8956 #if HAVE_PTHREADS_D4
8957         status = pthread_detach( &t );
8958 #else
8959         status = pthread_detach( t );
8960 #endif
8961
8962 #ifdef HAVE_LINUX_THREADS
8963         pthread_kill_other_threads_np();
8964 #endif
8965
8966         exit( status );
8967
8968 ; return 0; }
8969 EOF
8970 if { (eval echo configure:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8971   rm -rf conftest*
8972   ol_cv_pthread_lc_r=yes
8973 else
8974   echo "configure: failed program was:" >&5
8975   cat conftest.$ac_ext >&5
8976   rm -rf conftest*
8977   ol_cv_pthread_lc_r=no
8978 fi
8979 rm -f conftest*
8980 else
8981   cat > conftest.$ac_ext <<EOF
8982 #line 8983 "configure"
8983 #include "confdefs.h"
8984 /* pthread test headers */
8985 #include <pthread.h>
8986 #ifndef NULL
8987 #define NULL (void*)0
8988 #endif
8989
8990 static void *task(p)
8991         void *p;
8992 {
8993         return (void *) (p == NULL);
8994 }
8995
8996
8997 int main(argc, argv)
8998         int argc;
8999         char **argv;
9000 {
9001
9002         /* pthread test function */
9003         pthread_t t;
9004         int status;
9005 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9006         /* This system (e.g. AIX) defaults detached; must override */
9007         pthread_attr_t attr;
9008
9009         status = pthread_attr_init(&attr);
9010         if( status ) exit( status );
9011
9012         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9013         if( status ) exit( status );
9014
9015 #       define  ATTR    &attr
9016 #elif defined( HAVE_PTHREADS_D4 )
9017 #       define  ATTR    pthread_attr_default
9018 #else
9019 #       define  ATTR    NULL
9020 #endif
9021
9022         /* make sure pthread_create() isn't just a stub */
9023         status = pthread_create(&t, ATTR, task, NULL);
9024         if( status ) exit( status );
9025
9026         /* give the thread a chance to complete...
9027      * it should remain joinable and hence detachable
9028          */
9029         sleep( 1 );
9030
9031         /* make sure pthread_detach() isn't just a stub */
9032 #if HAVE_PTHREADS_D4
9033         status = pthread_detach( &t );
9034 #else
9035         status = pthread_detach( t );
9036 #endif
9037
9038 #ifdef HAVE_LINUX_THREADS
9039         pthread_kill_other_threads_np();
9040 #endif
9041
9042         exit( status );
9043
9044 }
9045
9046 EOF
9047 if { (eval echo configure:9048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9048 then
9049   ol_cv_pthread_lc_r=yes
9050 else
9051   echo "configure: failed program was:" >&5
9052   cat conftest.$ac_ext >&5
9053   rm -fr conftest*
9054   ol_cv_pthread_lc_r=no
9055 fi
9056 rm -fr conftest*
9057 fi
9058
9059
9060                 # restore the LIBS
9061                 LIBS="$ol_LIBS"
9062         
9063 fi
9064
9065 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9066
9067         if test $ol_cv_pthread_lc_r = yes ; then
9068                 ol_link_pthreads="-lc_r"
9069                 ol_link_threads=posix
9070         fi
9071 fi
9072
9073
9074                 # Pthread try link: -threads (ol_cv_pthread_threads)
9075 if test "$ol_link_threads" = no ; then
9076         # try -threads
9077         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9078 echo "configure:9079: checking for pthread link with -threads" >&5
9079 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9080   echo $ac_n "(cached) $ac_c" 1>&6
9081 else
9082   
9083                 # save the flags
9084                 ol_LIBS="$LIBS"
9085                 LIBS="-threads $LIBS"
9086
9087                 if test "$cross_compiling" = yes; then
9088   cat > conftest.$ac_ext <<EOF
9089 #line 9090 "configure"
9090 #include "confdefs.h"
9091 /* pthread test headers */
9092 #include <pthread.h>
9093 #ifndef NULL
9094 #define NULL (void*)0
9095 #endif
9096
9097 static void *task(p)
9098         void *p;
9099 {
9100         return (void *) (p == NULL);
9101 }
9102
9103 int main() {
9104
9105         /* pthread test function */
9106         pthread_t t;
9107         int status;
9108 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9109         /* This system (e.g. AIX) defaults detached; must override */
9110         pthread_attr_t attr;
9111
9112         status = pthread_attr_init(&attr);
9113         if( status ) exit( status );
9114
9115         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9116         if( status ) exit( status );
9117
9118 #       define  ATTR    &attr
9119 #elif defined( HAVE_PTHREADS_D4 )
9120 #       define  ATTR    pthread_attr_default
9121 #else
9122 #       define  ATTR    NULL
9123 #endif
9124
9125         /* make sure pthread_create() isn't just a stub */
9126         status = pthread_create(&t, ATTR, task, NULL);
9127         if( status ) exit( status );
9128
9129         /* give the thread a chance to complete...
9130      * it should remain joinable and hence detachable
9131          */
9132         sleep( 1 );
9133
9134         /* make sure pthread_detach() isn't just a stub */
9135 #if HAVE_PTHREADS_D4
9136         status = pthread_detach( &t );
9137 #else
9138         status = pthread_detach( t );
9139 #endif
9140
9141 #ifdef HAVE_LINUX_THREADS
9142         pthread_kill_other_threads_np();
9143 #endif
9144
9145         exit( status );
9146
9147 ; return 0; }
9148 EOF
9149 if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9150   rm -rf conftest*
9151   ol_cv_pthread_threads=yes
9152 else
9153   echo "configure: failed program was:" >&5
9154   cat conftest.$ac_ext >&5
9155   rm -rf conftest*
9156   ol_cv_pthread_threads=no
9157 fi
9158 rm -f conftest*
9159 else
9160   cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163 /* pthread test headers */
9164 #include <pthread.h>
9165 #ifndef NULL
9166 #define NULL (void*)0
9167 #endif
9168
9169 static void *task(p)
9170         void *p;
9171 {
9172         return (void *) (p == NULL);
9173 }
9174
9175
9176 int main(argc, argv)
9177         int argc;
9178         char **argv;
9179 {
9180
9181         /* pthread test function */
9182         pthread_t t;
9183         int status;
9184 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9185         /* This system (e.g. AIX) defaults detached; must override */
9186         pthread_attr_t attr;
9187
9188         status = pthread_attr_init(&attr);
9189         if( status ) exit( status );
9190
9191         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9192         if( status ) exit( status );
9193
9194 #       define  ATTR    &attr
9195 #elif defined( HAVE_PTHREADS_D4 )
9196 #       define  ATTR    pthread_attr_default
9197 #else
9198 #       define  ATTR    NULL
9199 #endif
9200
9201         /* make sure pthread_create() isn't just a stub */
9202         status = pthread_create(&t, ATTR, task, NULL);
9203         if( status ) exit( status );
9204
9205         /* give the thread a chance to complete...
9206      * it should remain joinable and hence detachable
9207          */
9208         sleep( 1 );
9209
9210         /* make sure pthread_detach() isn't just a stub */
9211 #if HAVE_PTHREADS_D4
9212         status = pthread_detach( &t );
9213 #else
9214         status = pthread_detach( t );
9215 #endif
9216
9217 #ifdef HAVE_LINUX_THREADS
9218         pthread_kill_other_threads_np();
9219 #endif
9220
9221         exit( status );
9222
9223 }
9224
9225 EOF
9226 if { (eval echo configure:9227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9227 then
9228   ol_cv_pthread_threads=yes
9229 else
9230   echo "configure: failed program was:" >&5
9231   cat conftest.$ac_ext >&5
9232   rm -fr conftest*
9233   ol_cv_pthread_threads=no
9234 fi
9235 rm -fr conftest*
9236 fi
9237
9238
9239                 # restore the LIBS
9240                 LIBS="$ol_LIBS"
9241         
9242 fi
9243
9244 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9245
9246         if test $ol_cv_pthread_threads = yes ; then
9247                 ol_link_pthreads="-threads"
9248                 ol_link_threads=posix
9249         fi
9250 fi
9251
9252
9253                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9254 if test "$ol_link_threads" = no ; then
9255         # try -lpthreads -lmach -lexc -lc_r
9256         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9257 echo "configure:9258: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9258 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9259   echo $ac_n "(cached) $ac_c" 1>&6
9260 else
9261   
9262                 # save the flags
9263                 ol_LIBS="$LIBS"
9264                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9265
9266                 if test "$cross_compiling" = yes; then
9267   cat > conftest.$ac_ext <<EOF
9268 #line 9269 "configure"
9269 #include "confdefs.h"
9270 /* pthread test headers */
9271 #include <pthread.h>
9272 #ifndef NULL
9273 #define NULL (void*)0
9274 #endif
9275
9276 static void *task(p)
9277         void *p;
9278 {
9279         return (void *) (p == NULL);
9280 }
9281
9282 int main() {
9283
9284         /* pthread test function */
9285         pthread_t t;
9286         int status;
9287 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9288         /* This system (e.g. AIX) defaults detached; must override */
9289         pthread_attr_t attr;
9290
9291         status = pthread_attr_init(&attr);
9292         if( status ) exit( status );
9293
9294         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9295         if( status ) exit( status );
9296
9297 #       define  ATTR    &attr
9298 #elif defined( HAVE_PTHREADS_D4 )
9299 #       define  ATTR    pthread_attr_default
9300 #else
9301 #       define  ATTR    NULL
9302 #endif
9303
9304         /* make sure pthread_create() isn't just a stub */
9305         status = pthread_create(&t, ATTR, task, NULL);
9306         if( status ) exit( status );
9307
9308         /* give the thread a chance to complete...
9309      * it should remain joinable and hence detachable
9310          */
9311         sleep( 1 );
9312
9313         /* make sure pthread_detach() isn't just a stub */
9314 #if HAVE_PTHREADS_D4
9315         status = pthread_detach( &t );
9316 #else
9317         status = pthread_detach( t );
9318 #endif
9319
9320 #ifdef HAVE_LINUX_THREADS
9321         pthread_kill_other_threads_np();
9322 #endif
9323
9324         exit( status );
9325
9326 ; return 0; }
9327 EOF
9328 if { (eval echo configure:9329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9329   rm -rf conftest*
9330   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9331 else
9332   echo "configure: failed program was:" >&5
9333   cat conftest.$ac_ext >&5
9334   rm -rf conftest*
9335   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9336 fi
9337 rm -f conftest*
9338 else
9339   cat > conftest.$ac_ext <<EOF
9340 #line 9341 "configure"
9341 #include "confdefs.h"
9342 /* pthread test headers */
9343 #include <pthread.h>
9344 #ifndef NULL
9345 #define NULL (void*)0
9346 #endif
9347
9348 static void *task(p)
9349         void *p;
9350 {
9351         return (void *) (p == NULL);
9352 }
9353
9354
9355 int main(argc, argv)
9356         int argc;
9357         char **argv;
9358 {
9359
9360         /* pthread test function */
9361         pthread_t t;
9362         int status;
9363 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9364         /* This system (e.g. AIX) defaults detached; must override */
9365         pthread_attr_t attr;
9366
9367         status = pthread_attr_init(&attr);
9368         if( status ) exit( status );
9369
9370         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9371         if( status ) exit( status );
9372
9373 #       define  ATTR    &attr
9374 #elif defined( HAVE_PTHREADS_D4 )
9375 #       define  ATTR    pthread_attr_default
9376 #else
9377 #       define  ATTR    NULL
9378 #endif
9379
9380         /* make sure pthread_create() isn't just a stub */
9381         status = pthread_create(&t, ATTR, task, NULL);
9382         if( status ) exit( status );
9383
9384         /* give the thread a chance to complete...
9385      * it should remain joinable and hence detachable
9386          */
9387         sleep( 1 );
9388
9389         /* make sure pthread_detach() isn't just a stub */
9390 #if HAVE_PTHREADS_D4
9391         status = pthread_detach( &t );
9392 #else
9393         status = pthread_detach( t );
9394 #endif
9395
9396 #ifdef HAVE_LINUX_THREADS
9397         pthread_kill_other_threads_np();
9398 #endif
9399
9400         exit( status );
9401
9402 }
9403
9404 EOF
9405 if { (eval echo configure:9406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9406 then
9407   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9408 else
9409   echo "configure: failed program was:" >&5
9410   cat conftest.$ac_ext >&5
9411   rm -fr conftest*
9412   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9413 fi
9414 rm -fr conftest*
9415 fi
9416
9417
9418                 # restore the LIBS
9419                 LIBS="$ol_LIBS"
9420         
9421 fi
9422
9423 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9424
9425         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9426                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9427                 ol_link_threads=posix
9428         fi
9429 fi
9430
9431                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9432 if test "$ol_link_threads" = no ; then
9433         # try -lpthreads -lmach -lexc
9434         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9435 echo "configure:9436: checking for pthread link with -lpthreads -lmach -lexc" >&5
9436 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9437   echo $ac_n "(cached) $ac_c" 1>&6
9438 else
9439   
9440                 # save the flags
9441                 ol_LIBS="$LIBS"
9442                 LIBS="-lpthreads -lmach -lexc $LIBS"
9443
9444                 if test "$cross_compiling" = yes; then
9445   cat > conftest.$ac_ext <<EOF
9446 #line 9447 "configure"
9447 #include "confdefs.h"
9448 /* pthread test headers */
9449 #include <pthread.h>
9450 #ifndef NULL
9451 #define NULL (void*)0
9452 #endif
9453
9454 static void *task(p)
9455         void *p;
9456 {
9457         return (void *) (p == NULL);
9458 }
9459
9460 int main() {
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 #elif defined( HAVE_PTHREADS_D4 )
9477 #       define  ATTR    pthread_attr_default
9478 #else
9479 #       define  ATTR    NULL
9480 #endif
9481
9482         /* make sure pthread_create() isn't just a stub */
9483         status = pthread_create(&t, ATTR, task, NULL);
9484         if( status ) exit( status );
9485
9486         /* give the thread a chance to complete...
9487      * it should remain joinable and hence detachable
9488          */
9489         sleep( 1 );
9490
9491         /* make sure pthread_detach() isn't just a stub */
9492 #if HAVE_PTHREADS_D4
9493         status = pthread_detach( &t );
9494 #else
9495         status = pthread_detach( t );
9496 #endif
9497
9498 #ifdef HAVE_LINUX_THREADS
9499         pthread_kill_other_threads_np();
9500 #endif
9501
9502         exit( status );
9503
9504 ; return 0; }
9505 EOF
9506 if { (eval echo configure:9507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9507   rm -rf conftest*
9508   ol_cv_pthread_lpthreads_lmach_lexc=yes
9509 else
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512   rm -rf conftest*
9513   ol_cv_pthread_lpthreads_lmach_lexc=no
9514 fi
9515 rm -f conftest*
9516 else
9517   cat > conftest.$ac_ext <<EOF
9518 #line 9519 "configure"
9519 #include "confdefs.h"
9520 /* pthread test headers */
9521 #include <pthread.h>
9522 #ifndef NULL
9523 #define NULL (void*)0
9524 #endif
9525
9526 static void *task(p)
9527         void *p;
9528 {
9529         return (void *) (p == NULL);
9530 }
9531
9532
9533 int main(argc, argv)
9534         int argc;
9535         char **argv;
9536 {
9537
9538         /* pthread test function */
9539         pthread_t t;
9540         int status;
9541 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9542         /* This system (e.g. AIX) defaults detached; must override */
9543         pthread_attr_t attr;
9544
9545         status = pthread_attr_init(&attr);
9546         if( status ) exit( status );
9547
9548         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9549         if( status ) exit( status );
9550
9551 #       define  ATTR    &attr
9552 #elif defined( HAVE_PTHREADS_D4 )
9553 #       define  ATTR    pthread_attr_default
9554 #else
9555 #       define  ATTR    NULL
9556 #endif
9557
9558         /* make sure pthread_create() isn't just a stub */
9559         status = pthread_create(&t, ATTR, task, NULL);
9560         if( status ) exit( status );
9561
9562         /* give the thread a chance to complete...
9563      * it should remain joinable and hence detachable
9564          */
9565         sleep( 1 );
9566
9567         /* make sure pthread_detach() isn't just a stub */
9568 #if HAVE_PTHREADS_D4
9569         status = pthread_detach( &t );
9570 #else
9571         status = pthread_detach( t );
9572 #endif
9573
9574 #ifdef HAVE_LINUX_THREADS
9575         pthread_kill_other_threads_np();
9576 #endif
9577
9578         exit( status );
9579
9580 }
9581
9582 EOF
9583 if { (eval echo configure:9584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9584 then
9585   ol_cv_pthread_lpthreads_lmach_lexc=yes
9586 else
9587   echo "configure: failed program was:" >&5
9588   cat conftest.$ac_ext >&5
9589   rm -fr conftest*
9590   ol_cv_pthread_lpthreads_lmach_lexc=no
9591 fi
9592 rm -fr conftest*
9593 fi
9594
9595
9596                 # restore the LIBS
9597                 LIBS="$ol_LIBS"
9598         
9599 fi
9600
9601 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9602
9603         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9604                 ol_link_pthreads="-lpthreads -lmach -lexc"
9605                 ol_link_threads=posix
9606         fi
9607 fi
9608
9609                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9610 if test "$ol_link_threads" = no ; then
9611         # try -lpthreads -lexc
9612         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9613 echo "configure:9614: checking for pthread link with -lpthreads -lexc" >&5
9614 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   
9618                 # save the flags
9619                 ol_LIBS="$LIBS"
9620                 LIBS="-lpthreads -lexc $LIBS"
9621
9622                 if test "$cross_compiling" = yes; then
9623   cat > conftest.$ac_ext <<EOF
9624 #line 9625 "configure"
9625 #include "confdefs.h"
9626 /* pthread test headers */
9627 #include <pthread.h>
9628 #ifndef NULL
9629 #define NULL (void*)0
9630 #endif
9631
9632 static void *task(p)
9633         void *p;
9634 {
9635         return (void *) (p == NULL);
9636 }
9637
9638 int main() {
9639
9640         /* pthread test function */
9641         pthread_t t;
9642         int status;
9643 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9644         /* This system (e.g. AIX) defaults detached; must override */
9645         pthread_attr_t attr;
9646
9647         status = pthread_attr_init(&attr);
9648         if( status ) exit( status );
9649
9650         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9651         if( status ) exit( status );
9652
9653 #       define  ATTR    &attr
9654 #elif defined( HAVE_PTHREADS_D4 )
9655 #       define  ATTR    pthread_attr_default
9656 #else
9657 #       define  ATTR    NULL
9658 #endif
9659
9660         /* make sure pthread_create() isn't just a stub */
9661         status = pthread_create(&t, ATTR, task, NULL);
9662         if( status ) exit( status );
9663
9664         /* give the thread a chance to complete...
9665      * it should remain joinable and hence detachable
9666          */
9667         sleep( 1 );
9668
9669         /* make sure pthread_detach() isn't just a stub */
9670 #if HAVE_PTHREADS_D4
9671         status = pthread_detach( &t );
9672 #else
9673         status = pthread_detach( t );
9674 #endif
9675
9676 #ifdef HAVE_LINUX_THREADS
9677         pthread_kill_other_threads_np();
9678 #endif
9679
9680         exit( status );
9681
9682 ; return 0; }
9683 EOF
9684 if { (eval echo configure:9685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9685   rm -rf conftest*
9686   ol_cv_pthread_lpthreads_lexc=yes
9687 else
9688   echo "configure: failed program was:" >&5
9689   cat conftest.$ac_ext >&5
9690   rm -rf conftest*
9691   ol_cv_pthread_lpthreads_lexc=no
9692 fi
9693 rm -f conftest*
9694 else
9695   cat > conftest.$ac_ext <<EOF
9696 #line 9697 "configure"
9697 #include "confdefs.h"
9698 /* pthread test headers */
9699 #include <pthread.h>
9700 #ifndef NULL
9701 #define NULL (void*)0
9702 #endif
9703
9704 static void *task(p)
9705         void *p;
9706 {
9707         return (void *) (p == NULL);
9708 }
9709
9710
9711 int main(argc, argv)
9712         int argc;
9713         char **argv;
9714 {
9715
9716         /* pthread test function */
9717         pthread_t t;
9718         int status;
9719 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9720         /* This system (e.g. AIX) defaults detached; must override */
9721         pthread_attr_t attr;
9722
9723         status = pthread_attr_init(&attr);
9724         if( status ) exit( status );
9725
9726         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9727         if( status ) exit( status );
9728
9729 #       define  ATTR    &attr
9730 #elif defined( HAVE_PTHREADS_D4 )
9731 #       define  ATTR    pthread_attr_default
9732 #else
9733 #       define  ATTR    NULL
9734 #endif
9735
9736         /* make sure pthread_create() isn't just a stub */
9737         status = pthread_create(&t, ATTR, task, NULL);
9738         if( status ) exit( status );
9739
9740         /* give the thread a chance to complete...
9741      * it should remain joinable and hence detachable
9742          */
9743         sleep( 1 );
9744
9745         /* make sure pthread_detach() isn't just a stub */
9746 #if HAVE_PTHREADS_D4
9747         status = pthread_detach( &t );
9748 #else
9749         status = pthread_detach( t );
9750 #endif
9751
9752 #ifdef HAVE_LINUX_THREADS
9753         pthread_kill_other_threads_np();
9754 #endif
9755
9756         exit( status );
9757
9758 }
9759
9760 EOF
9761 if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9762 then
9763   ol_cv_pthread_lpthreads_lexc=yes
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767   rm -fr conftest*
9768   ol_cv_pthread_lpthreads_lexc=no
9769 fi
9770 rm -fr conftest*
9771 fi
9772
9773
9774                 # restore the LIBS
9775                 LIBS="$ol_LIBS"
9776         
9777 fi
9778
9779 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9780
9781         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9782                 ol_link_pthreads="-lpthreads -lexc"
9783                 ol_link_threads=posix
9784         fi
9785 fi
9786
9787
9788                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9789 if test "$ol_link_threads" = no ; then
9790         # try -lpthreads
9791         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9792 echo "configure:9793: checking for pthread link with -lpthreads" >&5
9793 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9794   echo $ac_n "(cached) $ac_c" 1>&6
9795 else
9796   
9797                 # save the flags
9798                 ol_LIBS="$LIBS"
9799                 LIBS="-lpthreads $LIBS"
9800
9801                 if test "$cross_compiling" = yes; then
9802   cat > conftest.$ac_ext <<EOF
9803 #line 9804 "configure"
9804 #include "confdefs.h"
9805 /* pthread test headers */
9806 #include <pthread.h>
9807 #ifndef NULL
9808 #define NULL (void*)0
9809 #endif
9810
9811 static void *task(p)
9812         void *p;
9813 {
9814         return (void *) (p == NULL);
9815 }
9816
9817 int main() {
9818
9819         /* pthread test function */
9820         pthread_t t;
9821         int status;
9822 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9823         /* This system (e.g. AIX) defaults detached; must override */
9824         pthread_attr_t attr;
9825
9826         status = pthread_attr_init(&attr);
9827         if( status ) exit( status );
9828
9829         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9830         if( status ) exit( status );
9831
9832 #       define  ATTR    &attr
9833 #elif defined( HAVE_PTHREADS_D4 )
9834 #       define  ATTR    pthread_attr_default
9835 #else
9836 #       define  ATTR    NULL
9837 #endif
9838
9839         /* make sure pthread_create() isn't just a stub */
9840         status = pthread_create(&t, ATTR, task, NULL);
9841         if( status ) exit( status );
9842
9843         /* give the thread a chance to complete...
9844      * it should remain joinable and hence detachable
9845          */
9846         sleep( 1 );
9847
9848         /* make sure pthread_detach() isn't just a stub */
9849 #if HAVE_PTHREADS_D4
9850         status = pthread_detach( &t );
9851 #else
9852         status = pthread_detach( t );
9853 #endif
9854
9855 #ifdef HAVE_LINUX_THREADS
9856         pthread_kill_other_threads_np();
9857 #endif
9858
9859         exit( status );
9860
9861 ; return 0; }
9862 EOF
9863 if { (eval echo configure:9864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9864   rm -rf conftest*
9865   ol_cv_pthread_lib_lpthreads=yes
9866 else
9867   echo "configure: failed program was:" >&5
9868   cat conftest.$ac_ext >&5
9869   rm -rf conftest*
9870   ol_cv_pthread_lib_lpthreads=no
9871 fi
9872 rm -f conftest*
9873 else
9874   cat > conftest.$ac_ext <<EOF
9875 #line 9876 "configure"
9876 #include "confdefs.h"
9877 /* pthread test headers */
9878 #include <pthread.h>
9879 #ifndef NULL
9880 #define NULL (void*)0
9881 #endif
9882
9883 static void *task(p)
9884         void *p;
9885 {
9886         return (void *) (p == NULL);
9887 }
9888
9889
9890 int main(argc, argv)
9891         int argc;
9892         char **argv;
9893 {
9894
9895         /* pthread test function */
9896         pthread_t t;
9897         int status;
9898 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9899         /* This system (e.g. AIX) defaults detached; must override */
9900         pthread_attr_t attr;
9901
9902         status = pthread_attr_init(&attr);
9903         if( status ) exit( status );
9904
9905         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9906         if( status ) exit( status );
9907
9908 #       define  ATTR    &attr
9909 #elif defined( HAVE_PTHREADS_D4 )
9910 #       define  ATTR    pthread_attr_default
9911 #else
9912 #       define  ATTR    NULL
9913 #endif
9914
9915         /* make sure pthread_create() isn't just a stub */
9916         status = pthread_create(&t, ATTR, task, NULL);
9917         if( status ) exit( status );
9918
9919         /* give the thread a chance to complete...
9920      * it should remain joinable and hence detachable
9921          */
9922         sleep( 1 );
9923
9924         /* make sure pthread_detach() isn't just a stub */
9925 #if HAVE_PTHREADS_D4
9926         status = pthread_detach( &t );
9927 #else
9928         status = pthread_detach( t );
9929 #endif
9930
9931 #ifdef HAVE_LINUX_THREADS
9932         pthread_kill_other_threads_np();
9933 #endif
9934
9935         exit( status );
9936
9937 }
9938
9939 EOF
9940 if { (eval echo configure:9941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9941 then
9942   ol_cv_pthread_lib_lpthreads=yes
9943 else
9944   echo "configure: failed program was:" >&5
9945   cat conftest.$ac_ext >&5
9946   rm -fr conftest*
9947   ol_cv_pthread_lib_lpthreads=no
9948 fi
9949 rm -fr conftest*
9950 fi
9951
9952
9953                 # restore the LIBS
9954                 LIBS="$ol_LIBS"
9955         
9956 fi
9957
9958 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9959
9960         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9961                 ol_link_pthreads="-lpthreads"
9962                 ol_link_threads=posix
9963         fi
9964 fi
9965
9966
9967                 if test $ol_link_threads != no ; then
9968                         cat >> confdefs.h <<\EOF
9969 #define HAVE_PTHREADS 1
9970 EOF
9971
9972
9973                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9974
9975                                                 save_CPPFLAGS="$CPPFLAGS"
9976                         save_LIBS="$LIBS"
9977                         LIBS="$LTHREAD_LIBS $LIBS"
9978
9979                                                                                                 for ac_func in sched_yield pthread_yield
9980 do
9981 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9982 echo "configure:9983: checking for $ac_func" >&5
9983 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9984   echo $ac_n "(cached) $ac_c" 1>&6
9985 else
9986   cat > conftest.$ac_ext <<EOF
9987 #line 9988 "configure"
9988 #include "confdefs.h"
9989 /* System header to define __stub macros and hopefully few prototypes,
9990     which can conflict with char $ac_func(); below.  */
9991 #include <assert.h>
9992 /* Override any gcc2 internal prototype to avoid an error.  */
9993 /* We use char because int might match the return type of a gcc2
9994     builtin and then its argument prototype would still apply.  */
9995 char $ac_func();
9996 char (*f)();
9997
9998 int main() {
9999
10000 /* The GNU C library defines this for functions which it implements
10001     to always fail with ENOSYS.  Some functions are actually named
10002     something starting with __ and the normal name is an alias.  */
10003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10004 choke me
10005 #else
10006 f = $ac_func;
10007 #endif
10008
10009 ; return 0; }
10010 EOF
10011 if { (eval echo configure:10012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10012   rm -rf conftest*
10013   eval "ac_cv_func_$ac_func=yes"
10014 else
10015   echo "configure: failed program was:" >&5
10016   cat conftest.$ac_ext >&5
10017   rm -rf conftest*
10018   eval "ac_cv_func_$ac_func=no"
10019 fi
10020 rm -f conftest*
10021 fi
10022
10023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10024   echo "$ac_t""yes" 1>&6
10025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10026   cat >> confdefs.h <<EOF
10027 #define $ac_tr_func 1
10028 EOF
10029  
10030 else
10031   echo "$ac_t""no" 1>&6
10032 fi
10033 done
10034
10035
10036                         if test $ac_cv_func_sched_yield = no -a \
10037                                 $ac_cv_func_pthread_yield = no ; then
10038                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10039 echo "configure:10040: checking for sched_yield in -lrt" >&5
10040 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10042   echo $ac_n "(cached) $ac_c" 1>&6
10043 else
10044   ac_save_LIBS="$LIBS"
10045 LIBS="-lrt  $LIBS"
10046 cat > conftest.$ac_ext <<EOF
10047 #line 10048 "configure"
10048 #include "confdefs.h"
10049 /* Override any gcc2 internal prototype to avoid an error.  */
10050 /* We use char because int might match the return type of a gcc2
10051     builtin and then its argument prototype would still apply.  */
10052 char sched_yield();
10053
10054 int main() {
10055 sched_yield()
10056 ; return 0; }
10057 EOF
10058 if { (eval echo configure:10059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10059   rm -rf conftest*
10060   eval "ac_cv_lib_$ac_lib_var=yes"
10061 else
10062   echo "configure: failed program was:" >&5
10063   cat conftest.$ac_ext >&5
10064   rm -rf conftest*
10065   eval "ac_cv_lib_$ac_lib_var=no"
10066 fi
10067 rm -f conftest*
10068 LIBS="$ac_save_LIBS"
10069
10070 fi
10071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10072   echo "$ac_t""yes" 1>&6
10073   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10074                                         cat >> confdefs.h <<\EOF
10075 #define HAVE_SCHED_YIELD 1
10076 EOF
10077
10078                                         ac_cv_func_sched_yield=yes
10079 else
10080   echo "$ac_t""no" 1>&6
10081 ac_cv_func_sched_yield=no
10082 fi
10083
10084                         fi
10085                         if test $ac_cv_func_sched_yield = no -a \
10086                                 $ac_cv_func_pthread_yield = no ; then
10087                                                                                                 for ac_func in thr_yield
10088 do
10089 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10090 echo "configure:10091: checking for $ac_func" >&5
10091 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10092   echo $ac_n "(cached) $ac_c" 1>&6
10093 else
10094   cat > conftest.$ac_ext <<EOF
10095 #line 10096 "configure"
10096 #include "confdefs.h"
10097 /* System header to define __stub macros and hopefully few prototypes,
10098     which can conflict with char $ac_func(); below.  */
10099 #include <assert.h>
10100 /* Override any gcc2 internal prototype to avoid an error.  */
10101 /* We use char because int might match the return type of a gcc2
10102     builtin and then its argument prototype would still apply.  */
10103 char $ac_func();
10104 char (*f)();
10105
10106 int main() {
10107
10108 /* The GNU C library defines this for functions which it implements
10109     to always fail with ENOSYS.  Some functions are actually named
10110     something starting with __ and the normal name is an alias.  */
10111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10112 choke me
10113 #else
10114 f = $ac_func;
10115 #endif
10116
10117 ; return 0; }
10118 EOF
10119 if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10120   rm -rf conftest*
10121   eval "ac_cv_func_$ac_func=yes"
10122 else
10123   echo "configure: failed program was:" >&5
10124   cat conftest.$ac_ext >&5
10125   rm -rf conftest*
10126   eval "ac_cv_func_$ac_func=no"
10127 fi
10128 rm -f conftest*
10129 fi
10130
10131 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10132   echo "$ac_t""yes" 1>&6
10133     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10134   cat >> confdefs.h <<EOF
10135 #define $ac_tr_func 1
10136 EOF
10137  
10138 else
10139   echo "$ac_t""no" 1>&6
10140 fi
10141 done
10142
10143                         fi
10144                         if test $ac_cv_func_sched_yield = no -a \
10145                                 $ac_cv_func_pthread_yield = no -a \
10146                                 "$ac_cv_func_thr_yield" = no ; then
10147                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10148                         fi
10149
10150                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10151 do
10152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10153 echo "configure:10154: checking for $ac_func" >&5
10154 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10155   echo $ac_n "(cached) $ac_c" 1>&6
10156 else
10157   cat > conftest.$ac_ext <<EOF
10158 #line 10159 "configure"
10159 #include "confdefs.h"
10160 /* System header to define __stub macros and hopefully few prototypes,
10161     which can conflict with char $ac_func(); below.  */
10162 #include <assert.h>
10163 /* Override any gcc2 internal prototype to avoid an error.  */
10164 /* We use char because int might match the return type of a gcc2
10165     builtin and then its argument prototype would still apply.  */
10166 char $ac_func();
10167 char (*f)();
10168
10169 int main() {
10170
10171 /* The GNU C library defines this for functions which it implements
10172     to always fail with ENOSYS.  Some functions are actually named
10173     something starting with __ and the normal name is an alias.  */
10174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10175 choke me
10176 #else
10177 f = $ac_func;
10178 #endif
10179
10180 ; return 0; }
10181 EOF
10182 if { (eval echo configure:10183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10183   rm -rf conftest*
10184   eval "ac_cv_func_$ac_func=yes"
10185 else
10186   echo "configure: failed program was:" >&5
10187   cat conftest.$ac_ext >&5
10188   rm -rf conftest*
10189   eval "ac_cv_func_$ac_func=no"
10190 fi
10191 rm -f conftest*
10192 fi
10193
10194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10195   echo "$ac_t""yes" 1>&6
10196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10197   cat >> confdefs.h <<EOF
10198 #define $ac_tr_func 1
10199 EOF
10200  
10201 else
10202   echo "$ac_t""no" 1>&6
10203 fi
10204 done
10205
10206
10207                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10208 echo "configure:10209: checking for pthread_detach with <pthread.h>" >&5
10209 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10210   echo $ac_n "(cached) $ac_c" 1>&6
10211 else
10212   
10213                                                                 cat > conftest.$ac_ext <<EOF
10214 #line 10215 "configure"
10215 #include "confdefs.h"
10216
10217 #include <pthread.h>
10218 #ifndef NULL
10219 #define NULL (void*)0
10220 #endif
10221
10222 int main() {
10223 pthread_detach(NULL);
10224 ; return 0; }
10225 EOF
10226 if { (eval echo configure:10227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10227   rm -rf conftest*
10228   ol_cv_func_pthread_detach=yes
10229 else
10230   echo "configure: failed program was:" >&5
10231   cat conftest.$ac_ext >&5
10232   rm -rf conftest*
10233   ol_cv_func_pthread_detach=no
10234 fi
10235 rm -f conftest*
10236                         
10237 fi
10238
10239 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10240
10241                         if test $ol_cv_func_pthread_detach = no ; then
10242                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10243                         fi
10244
10245                         cat >> confdefs.h <<\EOF
10246 #define HAVE_PTHREAD_DETACH 1
10247 EOF
10248
10249
10250                                                 for ac_func in \
10251                                 pthread_setconcurrency \
10252                                 pthread_getconcurrency \
10253                                 thr_setconcurrency \
10254                                 thr_getconcurrency \
10255                         
10256 do
10257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10258 echo "configure:10259: checking for $ac_func" >&5
10259 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10260   echo $ac_n "(cached) $ac_c" 1>&6
10261 else
10262   cat > conftest.$ac_ext <<EOF
10263 #line 10264 "configure"
10264 #include "confdefs.h"
10265 /* System header to define __stub macros and hopefully few prototypes,
10266     which can conflict with char $ac_func(); below.  */
10267 #include <assert.h>
10268 /* Override any gcc2 internal prototype to avoid an error.  */
10269 /* We use char because int might match the return type of a gcc2
10270     builtin and then its argument prototype would still apply.  */
10271 char $ac_func();
10272 char (*f)();
10273
10274 int main() {
10275
10276 /* The GNU C library defines this for functions which it implements
10277     to always fail with ENOSYS.  Some functions are actually named
10278     something starting with __ and the normal name is an alias.  */
10279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10280 choke me
10281 #else
10282 f = $ac_func;
10283 #endif
10284
10285 ; return 0; }
10286 EOF
10287 if { (eval echo configure:10288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10288   rm -rf conftest*
10289   eval "ac_cv_func_$ac_func=yes"
10290 else
10291   echo "configure: failed program was:" >&5
10292   cat conftest.$ac_ext >&5
10293   rm -rf conftest*
10294   eval "ac_cv_func_$ac_func=no"
10295 fi
10296 rm -f conftest*
10297 fi
10298
10299 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10300   echo "$ac_t""yes" 1>&6
10301     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10302   cat >> confdefs.h <<EOF
10303 #define $ac_tr_func 1
10304 EOF
10305  
10306 else
10307   echo "$ac_t""no" 1>&6
10308 fi
10309 done
10310
10311
10312                         
10313         for ac_func in pthread_kill_other_threads_np
10314 do
10315 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10316 echo "configure:10317: checking for $ac_func" >&5
10317 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10318   echo $ac_n "(cached) $ac_c" 1>&6
10319 else
10320   cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323 /* System header to define __stub macros and hopefully few prototypes,
10324     which can conflict with char $ac_func(); below.  */
10325 #include <assert.h>
10326 /* Override any gcc2 internal prototype to avoid an error.  */
10327 /* We use char because int might match the return type of a gcc2
10328     builtin and then its argument prototype would still apply.  */
10329 char $ac_func();
10330 char (*f)();
10331
10332 int main() {
10333
10334 /* The GNU C library defines this for functions which it implements
10335     to always fail with ENOSYS.  Some functions are actually named
10336     something starting with __ and the normal name is an alias.  */
10337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10338 choke me
10339 #else
10340 f = $ac_func;
10341 #endif
10342
10343 ; return 0; }
10344 EOF
10345 if { (eval echo configure:10346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10346   rm -rf conftest*
10347   eval "ac_cv_func_$ac_func=yes"
10348 else
10349   echo "configure: failed program was:" >&5
10350   cat conftest.$ac_ext >&5
10351   rm -rf conftest*
10352   eval "ac_cv_func_$ac_func=no"
10353 fi
10354 rm -f conftest*
10355 fi
10356
10357 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10358   echo "$ac_t""yes" 1>&6
10359     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10360   cat >> confdefs.h <<EOF
10361 #define $ac_tr_func 1
10362 EOF
10363  
10364 else
10365   echo "$ac_t""no" 1>&6
10366 fi
10367 done
10368
10369         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10370 echo "configure:10371: checking for LinuxThreads implementation" >&5
10371 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10372   echo $ac_n "(cached) $ac_c" 1>&6
10373 else
10374   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10375 fi
10376
10377 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10378
10379                         
10380         
10381         
10382         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10383 echo "configure:10384: checking for LinuxThreads consistency" >&5
10384 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10385   echo $ac_n "(cached) $ac_c" 1>&6
10386 else
10387   
10388                 if test $ol_cv_header_linux_threads = yes -a \
10389                         $ol_cv_sys_linux_threads = yes; then
10390                         ol_cv_linux_threads=yes
10391                 elif test $ol_cv_header_linux_threads = no -a \
10392                         $ol_cv_sys_linux_threads = no; then
10393                         ol_cv_linux_threads=no
10394                 else
10395                         ol_cv_linux_threads=error
10396                 fi
10397         
10398 fi
10399
10400 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10401
10402
10403                         if test $ol_cv_linux_threads = error; then
10404                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10405                         fi
10406
10407                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10408 echo "configure:10409: checking if pthread_create() works" >&5
10409 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   
10413                         if test "$cross_compiling" = yes; then
10414                                 ol_cv_pthread_create_works=yes
10415 else
10416   cat > conftest.$ac_ext <<EOF
10417 #line 10418 "configure"
10418 #include "confdefs.h"
10419 /* pthread test headers */
10420 #include <pthread.h>
10421 #ifndef NULL
10422 #define NULL (void*)0
10423 #endif
10424
10425 static void *task(p)
10426         void *p;
10427 {
10428         return (void *) (p == NULL);
10429 }
10430
10431
10432 int main(argc, argv)
10433         int argc;
10434         char **argv;
10435 {
10436
10437         /* pthread test function */
10438         pthread_t t;
10439         int status;
10440 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10441         /* This system (e.g. AIX) defaults detached; must override */
10442         pthread_attr_t attr;
10443
10444         status = pthread_attr_init(&attr);
10445         if( status ) exit( status );
10446
10447         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10448         if( status ) exit( status );
10449
10450 #       define  ATTR    &attr
10451 #elif defined( HAVE_PTHREADS_D4 )
10452 #       define  ATTR    pthread_attr_default
10453 #else
10454 #       define  ATTR    NULL
10455 #endif
10456
10457         /* make sure pthread_create() isn't just a stub */
10458         status = pthread_create(&t, ATTR, task, NULL);
10459         if( status ) exit( status );
10460
10461         /* give the thread a chance to complete...
10462      * it should remain joinable and hence detachable
10463          */
10464         sleep( 1 );
10465
10466         /* make sure pthread_detach() isn't just a stub */
10467 #if HAVE_PTHREADS_D4
10468         status = pthread_detach( &t );
10469 #else
10470         status = pthread_detach( t );
10471 #endif
10472
10473 #ifdef HAVE_LINUX_THREADS
10474         pthread_kill_other_threads_np();
10475 #endif
10476
10477         exit( status );
10478
10479 }
10480
10481 EOF
10482 if { (eval echo configure:10483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10483 then
10484   ol_cv_pthread_create_works=yes
10485 else
10486   echo "configure: failed program was:" >&5
10487   cat conftest.$ac_ext >&5
10488   rm -fr conftest*
10489   ol_cv_pthread_create_works=no
10490 fi
10491 rm -fr conftest*
10492 fi
10493
10494 fi
10495
10496 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10497
10498                         if test $ol_cv_pthread_create_works = no ; then
10499                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10500                         fi
10501
10502                                                 if test $ol_with_yielding_select = auto ; then
10503                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10504 echo "configure:10505: checking if select yields when using pthreads" >&5
10505 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10506   echo $ac_n "(cached) $ac_c" 1>&6
10507 else
10508   
10509                                 if test "$cross_compiling" = yes; then
10510   ol_cv_pthread_select_yields=cross
10511 else
10512   cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515
10516 #include <sys/types.h>
10517 #include <sys/time.h>
10518 #include <unistd.h>
10519 #include <pthread.h>
10520 #ifndef NULL
10521 #define NULL (void*) 0
10522 #endif
10523
10524 static int fildes[2];
10525
10526 static void *task(p)
10527         void *p;
10528 {
10529         int i;
10530         struct timeval tv;
10531
10532         fd_set rfds;
10533
10534         tv.tv_sec=10;
10535         tv.tv_usec=0;
10536
10537         FD_ZERO(&rfds);
10538         FD_SET(fildes[0], &rfds);
10539
10540         /* we're not interested in any fds */
10541         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10542
10543         if(i < 0) {
10544                 perror("select");
10545                 exit(10);
10546         }
10547
10548         exit(0); /* if we exit here, the select blocked the whole process */
10549 }
10550
10551 int main(argc, argv)
10552         int argc;
10553         char **argv;
10554 {
10555         pthread_t t;
10556
10557         /* create a pipe to select */
10558         if(pipe(&fildes[0])) {
10559                 perror("select");
10560                 exit(1);
10561         }
10562
10563 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10564         (void) pthread_setconcurrency(2);
10565 #else
10566 #ifdef HAVE_THR_SETCONCURRENCY
10567         /* Set Solaris LWP concurrency to 2 */
10568         thr_setconcurrency(2);
10569 #endif
10570 #endif
10571
10572 #if HAVE_PTHREADS_D4
10573         pthread_create(&t, pthread_attr_default, task, NULL);
10574 #else
10575         pthread_create(&t, NULL, task, NULL);
10576 #endif
10577
10578 #if HAVE_SCHED_YIELD
10579         sched_yield();  /* make sure task runs first */
10580 #else
10581 #ifdef HAVE_PTHREAD_YIELD
10582         pthread_yield();        /* make sure task runs first */
10583 #endif
10584 #endif
10585
10586         exit(2);
10587 }
10588 EOF
10589 if { (eval echo configure:10590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10590 then
10591   ol_cv_pthread_select_yields=no
10592 else
10593   echo "configure: failed program was:" >&5
10594   cat conftest.$ac_ext >&5
10595   rm -fr conftest*
10596   ol_cv_pthread_select_yields=yes
10597 fi
10598 rm -fr conftest*
10599 fi
10600
10601 fi
10602
10603 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10604
10605                                 if test $ol_cv_pthread_select_yields = cross ; then
10606                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10607                                 fi
10608
10609                                 if test $ol_cv_pthread_select_yields = yes ; then
10610                                         ol_with_yielding_select=yes
10611                                 fi
10612                         fi
10613
10614                                                 CPPFLAGS="$save_CPPFLAGS"
10615                         LIBS="$save_LIBS"
10616                 else
10617                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10618                 fi
10619         fi
10620
10621         if test $ol_with_threads = posix ; then
10622                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10623         fi
10624 fi
10625
10626 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10627         -o $ol_with_threads = mach ; then
10628
10629                 for ac_hdr in mach/cthreads.h
10630 do
10631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10633 echo "configure:10634: checking for $ac_hdr" >&5
10634 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10635   echo $ac_n "(cached) $ac_c" 1>&6
10636 else
10637   cat > conftest.$ac_ext <<EOF
10638 #line 10639 "configure"
10639 #include "confdefs.h"
10640 #include <$ac_hdr>
10641 EOF
10642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10643 { (eval echo configure:10644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10645 if test -z "$ac_err"; then
10646   rm -rf conftest*
10647   eval "ac_cv_header_$ac_safe=yes"
10648 else
10649   echo "$ac_err" >&5
10650   echo "configure: failed program was:" >&5
10651   cat conftest.$ac_ext >&5
10652   rm -rf conftest*
10653   eval "ac_cv_header_$ac_safe=no"
10654 fi
10655 rm -f conftest*
10656 fi
10657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10658   echo "$ac_t""yes" 1>&6
10659     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10660   cat >> confdefs.h <<EOF
10661 #define $ac_tr_hdr 1
10662 EOF
10663  
10664 else
10665   echo "$ac_t""no" 1>&6
10666 fi
10667 done
10668
10669         if test $ac_cv_header_mach_cthreads_h = yes ; then
10670                 ol_with_threads=found
10671
10672                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10673 echo "configure:10674: checking for cthread_fork" >&5
10674 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10675   echo $ac_n "(cached) $ac_c" 1>&6
10676 else
10677   cat > conftest.$ac_ext <<EOF
10678 #line 10679 "configure"
10679 #include "confdefs.h"
10680 /* System header to define __stub macros and hopefully few prototypes,
10681     which can conflict with char cthread_fork(); below.  */
10682 #include <assert.h>
10683 /* Override any gcc2 internal prototype to avoid an error.  */
10684 /* We use char because int might match the return type of a gcc2
10685     builtin and then its argument prototype would still apply.  */
10686 char cthread_fork();
10687 char (*f)();
10688
10689 int main() {
10690
10691 /* The GNU C library defines this for functions which it implements
10692     to always fail with ENOSYS.  Some functions are actually named
10693     something starting with __ and the normal name is an alias.  */
10694 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10695 choke me
10696 #else
10697 f = cthread_fork;
10698 #endif
10699
10700 ; return 0; }
10701 EOF
10702 if { (eval echo configure:10703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10703   rm -rf conftest*
10704   eval "ac_cv_func_cthread_fork=yes"
10705 else
10706   echo "configure: failed program was:" >&5
10707   cat conftest.$ac_ext >&5
10708   rm -rf conftest*
10709   eval "ac_cv_func_cthread_fork=no"
10710 fi
10711 rm -f conftest*
10712 fi
10713
10714 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10715   echo "$ac_t""yes" 1>&6
10716   ol_link_threads=yes
10717 else
10718   echo "$ac_t""no" 1>&6
10719 fi
10720
10721
10722                 if test $ol_link_threads = no ; then
10723                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10724 echo "configure:10725: checking for cthread_fork with -all_load" >&5
10725 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10726   echo $ac_n "(cached) $ac_c" 1>&6
10727 else
10728   
10729                                                                 save_LIBS="$LIBS"
10730                                 LIBS="-all_load $LIBS"
10731                                 cat > conftest.$ac_ext <<EOF
10732 #line 10733 "configure"
10733 #include "confdefs.h"
10734 #include <mach/cthreads.h>
10735 int main() {
10736
10737                                         cthread_fork((void *)0, (void *)0);
10738                                         
10739 ; return 0; }
10740 EOF
10741 if { (eval echo configure:10742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10742   rm -rf conftest*
10743   ol_cv_cthread_all_load=yes
10744 else
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747   rm -rf conftest*
10748   ol_cv_cthread_all_load=no
10749 fi
10750 rm -f conftest*
10751                                                                 LIBS="$save_LIBS"
10752                         
10753 fi
10754
10755 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10756
10757                         if test $ol_cv_cthread_all_load = yes ; then
10758                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10759                                 ol_link_threads=mach
10760                         fi
10761                 fi
10762
10763                 if test $ol_link_threads != no ; then
10764                         : check for cthread specific functionality here
10765                         cat >> confdefs.h <<\EOF
10766 #define HAVE_MACH_CTHREADS 1
10767 EOF
10768
10769                 else
10770                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10771                 fi
10772         fi
10773
10774         if test $ol_with_threads = mach ; then
10775                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10776         fi
10777 fi
10778
10779 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10780         -o $ol_with_threads = pth ; then
10781
10782         for ac_hdr in pth.h
10783 do
10784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10786 echo "configure:10787: checking for $ac_hdr" >&5
10787 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10788   echo $ac_n "(cached) $ac_c" 1>&6
10789 else
10790   cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793 #include <$ac_hdr>
10794 EOF
10795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10796 { (eval echo configure:10797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10798 if test -z "$ac_err"; then
10799   rm -rf conftest*
10800   eval "ac_cv_header_$ac_safe=yes"
10801 else
10802   echo "$ac_err" >&5
10803   echo "configure: failed program was:" >&5
10804   cat conftest.$ac_ext >&5
10805   rm -rf conftest*
10806   eval "ac_cv_header_$ac_safe=no"
10807 fi
10808 rm -f conftest*
10809 fi
10810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10811   echo "$ac_t""yes" 1>&6
10812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10813   cat >> confdefs.h <<EOF
10814 #define $ac_tr_hdr 1
10815 EOF
10816  
10817 else
10818   echo "$ac_t""no" 1>&6
10819 fi
10820 done
10821
10822
10823         if test $ac_cv_header_pth_h = yes ; then
10824                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10825 echo "configure:10826: checking for pth_version in -lpth" >&5
10826 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10827 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10828   echo $ac_n "(cached) $ac_c" 1>&6
10829 else
10830   ac_save_LIBS="$LIBS"
10831 LIBS="-lpth  $LIBS"
10832 cat > conftest.$ac_ext <<EOF
10833 #line 10834 "configure"
10834 #include "confdefs.h"
10835 /* Override any gcc2 internal prototype to avoid an error.  */
10836 /* We use char because int might match the return type of a gcc2
10837     builtin and then its argument prototype would still apply.  */
10838 char pth_version();
10839
10840 int main() {
10841 pth_version()
10842 ; return 0; }
10843 EOF
10844 if { (eval echo configure:10845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10845   rm -rf conftest*
10846   eval "ac_cv_lib_$ac_lib_var=yes"
10847 else
10848   echo "configure: failed program was:" >&5
10849   cat conftest.$ac_ext >&5
10850   rm -rf conftest*
10851   eval "ac_cv_lib_$ac_lib_var=no"
10852 fi
10853 rm -f conftest*
10854 LIBS="$ac_save_LIBS"
10855
10856 fi
10857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859   have_pth=yes
10860 else
10861   echo "$ac_t""no" 1>&6
10862 have_pth=no
10863 fi
10864
10865
10866                 if test $have_pth = yes ; then
10867                         cat >> confdefs.h <<\EOF
10868 #define HAVE_GNU_PTH 1
10869 EOF
10870
10871                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10872                         ol_link_threads=pth
10873
10874                         if test $ol_with_yielding_select = auto ; then
10875                                 ol_with_yielding_select=yes
10876                         fi
10877                 fi
10878         fi
10879 fi
10880
10881 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10882         -o $ol_with_threads = lwp ; then
10883
10884                 for ac_hdr in thread.h synch.h
10885 do
10886 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10887 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10888 echo "configure:10889: checking for $ac_hdr" >&5
10889 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10890   echo $ac_n "(cached) $ac_c" 1>&6
10891 else
10892   cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 #include <$ac_hdr>
10896 EOF
10897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10898 { (eval echo configure:10899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10900 if test -z "$ac_err"; then
10901   rm -rf conftest*
10902   eval "ac_cv_header_$ac_safe=yes"
10903 else
10904   echo "$ac_err" >&5
10905   echo "configure: failed program was:" >&5
10906   cat conftest.$ac_ext >&5
10907   rm -rf conftest*
10908   eval "ac_cv_header_$ac_safe=no"
10909 fi
10910 rm -f conftest*
10911 fi
10912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10913   echo "$ac_t""yes" 1>&6
10914     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10915   cat >> confdefs.h <<EOF
10916 #define $ac_tr_hdr 1
10917 EOF
10918  
10919 else
10920   echo "$ac_t""no" 1>&6
10921 fi
10922 done
10923
10924         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10925                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10926 echo "configure:10927: checking for thr_create in -lthread" >&5
10927 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10928 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10929   echo $ac_n "(cached) $ac_c" 1>&6
10930 else
10931   ac_save_LIBS="$LIBS"
10932 LIBS="-lthread  $LIBS"
10933 cat > conftest.$ac_ext <<EOF
10934 #line 10935 "configure"
10935 #include "confdefs.h"
10936 /* Override any gcc2 internal prototype to avoid an error.  */
10937 /* We use char because int might match the return type of a gcc2
10938     builtin and then its argument prototype would still apply.  */
10939 char thr_create();
10940
10941 int main() {
10942 thr_create()
10943 ; return 0; }
10944 EOF
10945 if { (eval echo configure:10946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10946   rm -rf conftest*
10947   eval "ac_cv_lib_$ac_lib_var=yes"
10948 else
10949   echo "configure: failed program was:" >&5
10950   cat conftest.$ac_ext >&5
10951   rm -rf conftest*
10952   eval "ac_cv_lib_$ac_lib_var=no"
10953 fi
10954 rm -f conftest*
10955 LIBS="$ac_save_LIBS"
10956
10957 fi
10958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10959   echo "$ac_t""yes" 1>&6
10960   have_thr=yes
10961 else
10962   echo "$ac_t""no" 1>&6
10963 have_thr=no
10964 fi
10965
10966
10967                 if test $have_thr = yes ; then
10968                         cat >> confdefs.h <<\EOF
10969 #define HAVE_THR 1
10970 EOF
10971
10972                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10973                         ol_link_threads=thr
10974
10975                         if test $ol_with_yielding_select = auto ; then
10976                                 ol_with_yielding_select=yes
10977                         fi
10978
10979                                                 for ac_func in \
10980                                 thr_setconcurrency \
10981                                 thr_getconcurrency \
10982                         
10983 do
10984 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10985 echo "configure:10986: checking for $ac_func" >&5
10986 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10987   echo $ac_n "(cached) $ac_c" 1>&6
10988 else
10989   cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992 /* System header to define __stub macros and hopefully few prototypes,
10993     which can conflict with char $ac_func(); below.  */
10994 #include <assert.h>
10995 /* Override any gcc2 internal prototype to avoid an error.  */
10996 /* We use char because int might match the return type of a gcc2
10997     builtin and then its argument prototype would still apply.  */
10998 char $ac_func();
10999 char (*f)();
11000
11001 int main() {
11002
11003 /* The GNU C library defines this for functions which it implements
11004     to always fail with ENOSYS.  Some functions are actually named
11005     something starting with __ and the normal name is an alias.  */
11006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11007 choke me
11008 #else
11009 f = $ac_func;
11010 #endif
11011
11012 ; return 0; }
11013 EOF
11014 if { (eval echo configure:11015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11015   rm -rf conftest*
11016   eval "ac_cv_func_$ac_func=yes"
11017 else
11018   echo "configure: failed program was:" >&5
11019   cat conftest.$ac_ext >&5
11020   rm -rf conftest*
11021   eval "ac_cv_func_$ac_func=no"
11022 fi
11023 rm -f conftest*
11024 fi
11025
11026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11027   echo "$ac_t""yes" 1>&6
11028     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11029   cat >> confdefs.h <<EOF
11030 #define $ac_tr_func 1
11031 EOF
11032  
11033 else
11034   echo "$ac_t""no" 1>&6
11035 fi
11036 done
11037
11038                 fi
11039         fi
11040
11041                 for ac_hdr in lwp/lwp.h
11042 do
11043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11045 echo "configure:11046: checking for $ac_hdr" >&5
11046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11047   echo $ac_n "(cached) $ac_c" 1>&6
11048 else
11049   cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11052 #include <$ac_hdr>
11053 EOF
11054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11055 { (eval echo configure:11056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11057 if test -z "$ac_err"; then
11058   rm -rf conftest*
11059   eval "ac_cv_header_$ac_safe=yes"
11060 else
11061   echo "$ac_err" >&5
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -rf conftest*
11065   eval "ac_cv_header_$ac_safe=no"
11066 fi
11067 rm -f conftest*
11068 fi
11069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11070   echo "$ac_t""yes" 1>&6
11071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11072   cat >> confdefs.h <<EOF
11073 #define $ac_tr_hdr 1
11074 EOF
11075  
11076 else
11077   echo "$ac_t""no" 1>&6
11078 fi
11079 done
11080
11081         if test $ac_cv_header_lwp_lwp_h = yes ; then
11082                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11083 echo "configure:11084: checking for lwp_create in -llwp" >&5
11084 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11086   echo $ac_n "(cached) $ac_c" 1>&6
11087 else
11088   ac_save_LIBS="$LIBS"
11089 LIBS="-llwp  $LIBS"
11090 cat > conftest.$ac_ext <<EOF
11091 #line 11092 "configure"
11092 #include "confdefs.h"
11093 /* Override any gcc2 internal prototype to avoid an error.  */
11094 /* We use char because int might match the return type of a gcc2
11095     builtin and then its argument prototype would still apply.  */
11096 char lwp_create();
11097
11098 int main() {
11099 lwp_create()
11100 ; return 0; }
11101 EOF
11102 if { (eval echo configure:11103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11103   rm -rf conftest*
11104   eval "ac_cv_lib_$ac_lib_var=yes"
11105 else
11106   echo "configure: failed program was:" >&5
11107   cat conftest.$ac_ext >&5
11108   rm -rf conftest*
11109   eval "ac_cv_lib_$ac_lib_var=no"
11110 fi
11111 rm -f conftest*
11112 LIBS="$ac_save_LIBS"
11113
11114 fi
11115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11116   echo "$ac_t""yes" 1>&6
11117   have_lwp=yes
11118 else
11119   echo "$ac_t""no" 1>&6
11120 have_lwp=no
11121 fi
11122
11123
11124                 if test $have_lwp = yes ; then
11125                         cat >> confdefs.h <<\EOF
11126 #define HAVE_LWP 1
11127 EOF
11128
11129                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11130                         ol_link_threads=lwp
11131
11132                         if test $ol_with_yielding_select = auto ; then
11133                                 ol_with_yielding_select=no
11134                         fi
11135                 fi
11136         fi
11137 fi
11138
11139 if test $ol_with_yielding_select = yes ; then
11140         cat >> confdefs.h <<\EOF
11141 #define HAVE_YIELDING_SELECT 1
11142 EOF
11143
11144 fi
11145
11146 if test $ol_with_threads = manual ; then
11147                 ol_link_threads=yes
11148
11149         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11150
11151         for ac_hdr in pthread.h sched.h
11152 do
11153 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11154 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11155 echo "configure:11156: checking for $ac_hdr" >&5
11156 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11157   echo $ac_n "(cached) $ac_c" 1>&6
11158 else
11159   cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11162 #include <$ac_hdr>
11163 EOF
11164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11165 { (eval echo configure:11166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11167 if test -z "$ac_err"; then
11168   rm -rf conftest*
11169   eval "ac_cv_header_$ac_safe=yes"
11170 else
11171   echo "$ac_err" >&5
11172   echo "configure: failed program was:" >&5
11173   cat conftest.$ac_ext >&5
11174   rm -rf conftest*
11175   eval "ac_cv_header_$ac_safe=no"
11176 fi
11177 rm -f conftest*
11178 fi
11179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11180   echo "$ac_t""yes" 1>&6
11181     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11182   cat >> confdefs.h <<EOF
11183 #define $ac_tr_hdr 1
11184 EOF
11185  
11186 else
11187   echo "$ac_t""no" 1>&6
11188 fi
11189 done
11190
11191         for ac_func in sched_yield pthread_yield
11192 do
11193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11194 echo "configure:11195: checking for $ac_func" >&5
11195 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11196   echo $ac_n "(cached) $ac_c" 1>&6
11197 else
11198   cat > conftest.$ac_ext <<EOF
11199 #line 11200 "configure"
11200 #include "confdefs.h"
11201 /* System header to define __stub macros and hopefully few prototypes,
11202     which can conflict with char $ac_func(); below.  */
11203 #include <assert.h>
11204 /* Override any gcc2 internal prototype to avoid an error.  */
11205 /* We use char because int might match the return type of a gcc2
11206     builtin and then its argument prototype would still apply.  */
11207 char $ac_func();
11208 char (*f)();
11209
11210 int main() {
11211
11212 /* The GNU C library defines this for functions which it implements
11213     to always fail with ENOSYS.  Some functions are actually named
11214     something starting with __ and the normal name is an alias.  */
11215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11216 choke me
11217 #else
11218 f = $ac_func;
11219 #endif
11220
11221 ; return 0; }
11222 EOF
11223 if { (eval echo configure:11224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11224   rm -rf conftest*
11225   eval "ac_cv_func_$ac_func=yes"
11226 else
11227   echo "configure: failed program was:" >&5
11228   cat conftest.$ac_ext >&5
11229   rm -rf conftest*
11230   eval "ac_cv_func_$ac_func=no"
11231 fi
11232 rm -f conftest*
11233 fi
11234
11235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11236   echo "$ac_t""yes" 1>&6
11237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11238   cat >> confdefs.h <<EOF
11239 #define $ac_tr_func 1
11240 EOF
11241  
11242 else
11243   echo "$ac_t""no" 1>&6
11244 fi
11245 done
11246
11247         
11248         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11249 echo "configure:11250: checking for LinuxThreads pthread.h" >&5
11250 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11251   echo $ac_n "(cached) $ac_c" 1>&6
11252 else
11253   cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 #include <pthread.h>
11257 EOF
11258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11259   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11260   rm -rf conftest*
11261   ol_cv_header_linux_threads=yes
11262 else
11263   rm -rf conftest*
11264   ol_cv_header_linux_threads=no
11265 fi
11266 rm -f conftest*
11267
11268                 
11269 fi
11270
11271 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11272         if test $ol_cv_header_linux_threads = yes; then
11273                 cat >> confdefs.h <<\EOF
11274 #define HAVE_LINUX_THREADS 1
11275 EOF
11276
11277         fi
11278
11279
11280         for ac_hdr in mach/cthreads.h
11281 do
11282 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11283 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11284 echo "configure:11285: checking for $ac_hdr" >&5
11285 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11286   echo $ac_n "(cached) $ac_c" 1>&6
11287 else
11288   cat > conftest.$ac_ext <<EOF
11289 #line 11290 "configure"
11290 #include "confdefs.h"
11291 #include <$ac_hdr>
11292 EOF
11293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11294 { (eval echo configure:11295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11296 if test -z "$ac_err"; then
11297   rm -rf conftest*
11298   eval "ac_cv_header_$ac_safe=yes"
11299 else
11300   echo "$ac_err" >&5
11301   echo "configure: failed program was:" >&5
11302   cat conftest.$ac_ext >&5
11303   rm -rf conftest*
11304   eval "ac_cv_header_$ac_safe=no"
11305 fi
11306 rm -f conftest*
11307 fi
11308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11309   echo "$ac_t""yes" 1>&6
11310     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11311   cat >> confdefs.h <<EOF
11312 #define $ac_tr_hdr 1
11313 EOF
11314  
11315 else
11316   echo "$ac_t""no" 1>&6
11317 fi
11318 done
11319
11320         for ac_hdr in lwp/lwp.h
11321 do
11322 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11323 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11324 echo "configure:11325: checking for $ac_hdr" >&5
11325 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11326   echo $ac_n "(cached) $ac_c" 1>&6
11327 else
11328   cat > conftest.$ac_ext <<EOF
11329 #line 11330 "configure"
11330 #include "confdefs.h"
11331 #include <$ac_hdr>
11332 EOF
11333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11334 { (eval echo configure:11335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11336 if test -z "$ac_err"; then
11337   rm -rf conftest*
11338   eval "ac_cv_header_$ac_safe=yes"
11339 else
11340   echo "$ac_err" >&5
11341   echo "configure: failed program was:" >&5
11342   cat conftest.$ac_ext >&5
11343   rm -rf conftest*
11344   eval "ac_cv_header_$ac_safe=no"
11345 fi
11346 rm -f conftest*
11347 fi
11348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11349   echo "$ac_t""yes" 1>&6
11350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11351   cat >> confdefs.h <<EOF
11352 #define $ac_tr_hdr 1
11353 EOF
11354  
11355 else
11356   echo "$ac_t""no" 1>&6
11357 fi
11358 done
11359
11360         for ac_hdr in thread.h synch.h
11361 do
11362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11364 echo "configure:11365: checking for $ac_hdr" >&5
11365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11366   echo $ac_n "(cached) $ac_c" 1>&6
11367 else
11368   cat > conftest.$ac_ext <<EOF
11369 #line 11370 "configure"
11370 #include "confdefs.h"
11371 #include <$ac_hdr>
11372 EOF
11373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11374 { (eval echo configure:11375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11376 if test -z "$ac_err"; then
11377   rm -rf conftest*
11378   eval "ac_cv_header_$ac_safe=yes"
11379 else
11380   echo "$ac_err" >&5
11381   echo "configure: failed program was:" >&5
11382   cat conftest.$ac_ext >&5
11383   rm -rf conftest*
11384   eval "ac_cv_header_$ac_safe=no"
11385 fi
11386 rm -f conftest*
11387 fi
11388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11389   echo "$ac_t""yes" 1>&6
11390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11391   cat >> confdefs.h <<EOF
11392 #define $ac_tr_hdr 1
11393 EOF
11394  
11395 else
11396   echo "$ac_t""no" 1>&6
11397 fi
11398 done
11399
11400 fi
11401
11402 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11403                         cat >> confdefs.h <<\EOF
11404 #define REENTRANT 1
11405 EOF
11406
11407         cat >> confdefs.h <<\EOF
11408 #define _REENTRANT 1
11409 EOF
11410
11411         cat >> confdefs.h <<\EOF
11412 #define THREAD_SAFE 1
11413 EOF
11414
11415         cat >> confdefs.h <<\EOF
11416 #define _THREAD_SAFE 1
11417 EOF
11418
11419         cat >> confdefs.h <<\EOF
11420 #define THREADSAFE 1
11421 EOF
11422
11423         cat >> confdefs.h <<\EOF
11424 #define _THREADSAFE 1
11425 EOF
11426
11427         cat >> confdefs.h <<\EOF
11428 #define _SGI_MP_SOURCE 1
11429 EOF
11430
11431
11432                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11433 echo "configure:11434: checking for thread specific errno" >&5
11434 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11435   echo $ac_n "(cached) $ac_c" 1>&6
11436 else
11437   
11438                 cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441 #include <errno.h>
11442 int main() {
11443 errno = 0;
11444 ; return 0; }
11445 EOF
11446 if { (eval echo configure:11447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11447   rm -rf conftest*
11448   ol_cv_errno_thread_specific=yes
11449 else
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   ol_cv_errno_thread_specific=no
11454 fi
11455 rm -f conftest*
11456         
11457 fi
11458
11459 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11460
11461                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11462 echo "configure:11463: checking for thread specific h_errno" >&5
11463 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11464   echo $ac_n "(cached) $ac_c" 1>&6
11465 else
11466   
11467                 cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470 #include <netdb.h>
11471 int main() {
11472 h_errno = 0;
11473 ; return 0; }
11474 EOF
11475 if { (eval echo configure:11476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11476   rm -rf conftest*
11477   ol_cv_h_errno_thread_specific=yes
11478 else
11479   echo "configure: failed program was:" >&5
11480   cat conftest.$ac_ext >&5
11481   rm -rf conftest*
11482   ol_cv_h_errno_thread_specific=no
11483 fi
11484 rm -f conftest*
11485         
11486 fi
11487
11488 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11489
11490         if test $ol_cv_errno_thread_specific != yes \
11491                 -o $ol_cv_h_errno_thread_specific != yes ; then
11492                 LIBS="$LTHREAD_LIBS $LIBS"
11493                 LTHREAD_LIBS=""
11494         fi
11495
11496 fi  
11497
11498 if test $ol_link_threads = no ; then
11499         if test $ol_with_threads = yes ; then
11500                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11501         fi
11502
11503         if test $ol_with_threads = auto ; then
11504                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11505                 ol_with_threads=no
11506         fi
11507
11508         cat >> confdefs.h <<\EOF
11509 #define NO_THREADS 1
11510 EOF
11511
11512         LTHREAD_LIBS=""
11513 fi
11514
11515 if test $ol_link_threads != no ; then
11516         cat >> confdefs.h <<\EOF
11517 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11518 EOF
11519
11520 fi
11521
11522 ol_link_ldbm=no 
11523
11524 if test $ol_with_ldbm_api = auto \
11525         -o $ol_with_ldbm_api = berkeley \
11526         -o $ol_with_ldbm_api = bcompat ; then
11527
11528         if test $ol_with_ldbm_api = bcompat; then \
11529                 ol_cv_berkeley_db=no
11530 for ac_hdr in db_185.h db.h
11531 do
11532 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11533 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11534 echo "configure:11535: checking for $ac_hdr" >&5
11535 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11536   echo $ac_n "(cached) $ac_c" 1>&6
11537 else
11538   cat > conftest.$ac_ext <<EOF
11539 #line 11540 "configure"
11540 #include "confdefs.h"
11541 #include <$ac_hdr>
11542 EOF
11543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11544 { (eval echo configure:11545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11546 if test -z "$ac_err"; then
11547   rm -rf conftest*
11548   eval "ac_cv_header_$ac_safe=yes"
11549 else
11550   echo "$ac_err" >&5
11551   echo "configure: failed program was:" >&5
11552   cat conftest.$ac_ext >&5
11553   rm -rf conftest*
11554   eval "ac_cv_header_$ac_safe=no"
11555 fi
11556 rm -f conftest*
11557 fi
11558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11559   echo "$ac_t""yes" 1>&6
11560     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11561   cat >> confdefs.h <<EOF
11562 #define $ac_tr_hdr 1
11563 EOF
11564  
11565 else
11566   echo "$ac_t""no" 1>&6
11567 fi
11568 done
11569
11570 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11571         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11572 echo "configure:11573: checking if Berkeley DB header compatibility" >&5
11573 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11574   echo $ac_n "(cached) $ac_c" 1>&6
11575 else
11576   
11577                 cat > conftest.$ac_ext <<EOF
11578 #line 11579 "configure"
11579 #include "confdefs.h"
11580
11581 #if HAVE_DB_185_H
11582 #       include <db_185.h>
11583 #else
11584 #       include <db.h>
11585 #endif
11586
11587  /* this check could be improved */
11588 #ifndef DB_VERSION_MAJOR
11589 #       define DB_VERSION_MAJOR 1
11590 #endif
11591
11592 #if DB_VERSION_MAJOR == 1 
11593         __db_version_1
11594 #endif
11595
11596 EOF
11597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11598   egrep "__db_version_1" >/dev/null 2>&1; then
11599   rm -rf conftest*
11600   ol_cv_header_db1=yes
11601 else
11602   rm -rf conftest*
11603   ol_cv_header_db1=no
11604 fi
11605 rm -f conftest*
11606
11607 fi
11608
11609 echo "$ac_t""$ol_cv_header_db1" 1>&6
11610
11611         if test ol_cv_header_db1=yes ; then
11612                 ol_cv_lib_db=no
11613 if test $ol_cv_lib_db = no ; then
11614         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11615 echo "configure:11616: checking for Berkeley DB link (default)" >&5
11616 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11617   echo $ac_n "(cached) $ac_c" 1>&6
11618 else
11619   
11620         ol_DB_LIB=
11621         ol_LIBS=$LIBS
11622         LIBS="$ol_DB_LIB $LIBS"
11623
11624         cat > conftest.$ac_ext <<EOF
11625 #line 11626 "configure"
11626 #include "confdefs.h"
11627
11628 #ifdef HAVE_DB_185_H
11629 # include <db_185.h>
11630 #else
11631 # include <db.h>
11632 #endif
11633
11634 #ifndef DB_VERSION_MAJOR
11635 # define DB_VERSION_MAJOR 1
11636 #endif
11637
11638 #ifndef NULL
11639 #define NULL ((void*)0)
11640 #endif
11641
11642 int main() {
11643
11644 #if DB_VERSION_MAJOR > 1
11645         {
11646                 char *version;
11647                 int major, minor, patch;
11648
11649                 version = db_version( &major, &minor, &patch );
11650
11651                 if( major != DB_VERSION_MAJOR ||
11652                         minor < DB_VERSION_MINOR )
11653                 {
11654                         printf("Berkeley DB version mismatch\n"
11655                                 "\texpected: %s\n\tgot: %s\n",
11656                                 DB_VERSION_STRING, version);
11657                         return 1;
11658                 }
11659         }
11660 #endif
11661
11662 #if DB_VERSION_MAJOR > 2
11663         db_env_create( NULL, 0 );
11664 #elif DB_VERSION_MAJOR > 1
11665         db_appexit( NULL );
11666 #else
11667         (void) dbopen( NULL, 0, 0, 0, NULL);
11668 #endif
11669
11670 ; return 0; }
11671 EOF
11672 if { (eval echo configure:11673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11673   rm -rf conftest*
11674   ol_cv_db_none=yes
11675 else
11676   echo "configure: failed program was:" >&5
11677   cat conftest.$ac_ext >&5
11678   rm -rf conftest*
11679   ol_cv_db_none=no
11680 fi
11681 rm -f conftest*
11682
11683         LIBS="$ol_LIBS"
11684
11685 fi
11686
11687 echo "$ac_t""$ol_cv_db_none" 1>&6
11688
11689         if test $ol_cv_db_none = yes ; then
11690                 ol_cv_lib_db=yes
11691         fi
11692 fi
11693
11694 if test $ol_cv_lib_db = no ; then
11695         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11696 echo "configure:11697: checking for Berkeley DB link (-ldb)" >&5
11697 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11698   echo $ac_n "(cached) $ac_c" 1>&6
11699 else
11700   
11701         ol_DB_LIB=-ldb
11702         ol_LIBS=$LIBS
11703         LIBS="$ol_DB_LIB $LIBS"
11704
11705         cat > conftest.$ac_ext <<EOF
11706 #line 11707 "configure"
11707 #include "confdefs.h"
11708
11709 #ifdef HAVE_DB_185_H
11710 # include <db_185.h>
11711 #else
11712 # include <db.h>
11713 #endif
11714
11715 #ifndef DB_VERSION_MAJOR
11716 # define DB_VERSION_MAJOR 1
11717 #endif
11718
11719 #ifndef NULL
11720 #define NULL ((void*)0)
11721 #endif
11722
11723 int main() {
11724
11725 #if DB_VERSION_MAJOR > 1
11726         {
11727                 char *version;
11728                 int major, minor, patch;
11729
11730                 version = db_version( &major, &minor, &patch );
11731
11732                 if( major != DB_VERSION_MAJOR ||
11733                         minor < DB_VERSION_MINOR )
11734                 {
11735                         printf("Berkeley DB version mismatch\n"
11736                                 "\texpected: %s\n\tgot: %s\n",
11737                                 DB_VERSION_STRING, version);
11738                         return 1;
11739                 }
11740         }
11741 #endif
11742
11743 #if DB_VERSION_MAJOR > 2
11744         db_env_create( NULL, 0 );
11745 #elif DB_VERSION_MAJOR > 1
11746         db_appexit( NULL );
11747 #else
11748         (void) dbopen( NULL, 0, 0, 0, NULL);
11749 #endif
11750
11751 ; return 0; }
11752 EOF
11753 if { (eval echo configure:11754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11754   rm -rf conftest*
11755   ol_cv_db_db=yes
11756 else
11757   echo "configure: failed program was:" >&5
11758   cat conftest.$ac_ext >&5
11759   rm -rf conftest*
11760   ol_cv_db_db=no
11761 fi
11762 rm -f conftest*
11763
11764         LIBS="$ol_LIBS"
11765
11766 fi
11767
11768 echo "$ac_t""$ol_cv_db_db" 1>&6
11769
11770         if test $ol_cv_db_db = yes ; then
11771                 ol_cv_lib_db=-ldb
11772         fi
11773 fi
11774
11775 if test $ol_cv_lib_db = no ; then
11776         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11777 echo "configure:11778: checking for Berkeley DB link (-ldb3)" >&5
11778 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11779   echo $ac_n "(cached) $ac_c" 1>&6
11780 else
11781   
11782         ol_DB_LIB=-ldb3
11783         ol_LIBS=$LIBS
11784         LIBS="$ol_DB_LIB $LIBS"
11785
11786         cat > conftest.$ac_ext <<EOF
11787 #line 11788 "configure"
11788 #include "confdefs.h"
11789
11790 #ifdef HAVE_DB_185_H
11791 # include <db_185.h>
11792 #else
11793 # include <db.h>
11794 #endif
11795
11796 #ifndef DB_VERSION_MAJOR
11797 # define DB_VERSION_MAJOR 1
11798 #endif
11799
11800 #ifndef NULL
11801 #define NULL ((void*)0)
11802 #endif
11803
11804 int main() {
11805
11806 #if DB_VERSION_MAJOR > 1
11807         {
11808                 char *version;
11809                 int major, minor, patch;
11810
11811                 version = db_version( &major, &minor, &patch );
11812
11813                 if( major != DB_VERSION_MAJOR ||
11814                         minor < DB_VERSION_MINOR )
11815                 {
11816                         printf("Berkeley DB version mismatch\n"
11817                                 "\texpected: %s\n\tgot: %s\n",
11818                                 DB_VERSION_STRING, version);
11819                         return 1;
11820                 }
11821         }
11822 #endif
11823
11824 #if DB_VERSION_MAJOR > 2
11825         db_env_create( NULL, 0 );
11826 #elif DB_VERSION_MAJOR > 1
11827         db_appexit( NULL );
11828 #else
11829         (void) dbopen( NULL, 0, 0, 0, NULL);
11830 #endif
11831
11832 ; return 0; }
11833 EOF
11834 if { (eval echo configure:11835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11835   rm -rf conftest*
11836   ol_cv_db_db3=yes
11837 else
11838   echo "configure: failed program was:" >&5
11839   cat conftest.$ac_ext >&5
11840   rm -rf conftest*
11841   ol_cv_db_db3=no
11842 fi
11843 rm -f conftest*
11844
11845         LIBS="$ol_LIBS"
11846
11847 fi
11848
11849 echo "$ac_t""$ol_cv_db_db3" 1>&6
11850
11851         if test $ol_cv_db_db3 = yes ; then
11852                 ol_cv_lib_db=-ldb3
11853         fi
11854 fi
11855
11856 if test $ol_cv_lib_db = no ; then
11857         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11858 echo "configure:11859: checking for Berkeley DB link (-ldb2)" >&5
11859 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11860   echo $ac_n "(cached) $ac_c" 1>&6
11861 else
11862   
11863         ol_DB_LIB=-ldb2
11864         ol_LIBS=$LIBS
11865         LIBS="$ol_DB_LIB $LIBS"
11866
11867         cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870
11871 #ifdef HAVE_DB_185_H
11872 # include <db_185.h>
11873 #else
11874 # include <db.h>
11875 #endif
11876
11877 #ifndef DB_VERSION_MAJOR
11878 # define DB_VERSION_MAJOR 1
11879 #endif
11880
11881 #ifndef NULL
11882 #define NULL ((void*)0)
11883 #endif
11884
11885 int main() {
11886
11887 #if DB_VERSION_MAJOR > 1
11888         {
11889                 char *version;
11890                 int major, minor, patch;
11891
11892                 version = db_version( &major, &minor, &patch );
11893
11894                 if( major != DB_VERSION_MAJOR ||
11895                         minor < DB_VERSION_MINOR )
11896                 {
11897                         printf("Berkeley DB version mismatch\n"
11898                                 "\texpected: %s\n\tgot: %s\n",
11899                                 DB_VERSION_STRING, version);
11900                         return 1;
11901                 }
11902         }
11903 #endif
11904
11905 #if DB_VERSION_MAJOR > 2
11906         db_env_create( NULL, 0 );
11907 #elif DB_VERSION_MAJOR > 1
11908         db_appexit( NULL );
11909 #else
11910         (void) dbopen( NULL, 0, 0, 0, NULL);
11911 #endif
11912
11913 ; return 0; }
11914 EOF
11915 if { (eval echo configure:11916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11916   rm -rf conftest*
11917   ol_cv_db_db2=yes
11918 else
11919   echo "configure: failed program was:" >&5
11920   cat conftest.$ac_ext >&5
11921   rm -rf conftest*
11922   ol_cv_db_db2=no
11923 fi
11924 rm -f conftest*
11925
11926         LIBS="$ol_LIBS"
11927
11928 fi
11929
11930 echo "$ac_t""$ol_cv_db_db2" 1>&6
11931
11932         if test $ol_cv_db_db2 = yes ; then
11933                 ol_cv_lib_db=-ldb2
11934         fi
11935 fi
11936
11937 if test $ol_cv_lib_db = no ; then
11938         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11939 echo "configure:11940: checking for Berkeley DB link (-ldb1)" >&5
11940 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11941   echo $ac_n "(cached) $ac_c" 1>&6
11942 else
11943   
11944         ol_DB_LIB=-ldb1
11945         ol_LIBS=$LIBS
11946         LIBS="$ol_DB_LIB $LIBS"
11947
11948         cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951
11952 #ifdef HAVE_DB_185_H
11953 # include <db_185.h>
11954 #else
11955 # include <db.h>
11956 #endif
11957
11958 #ifndef DB_VERSION_MAJOR
11959 # define DB_VERSION_MAJOR 1
11960 #endif
11961
11962 #ifndef NULL
11963 #define NULL ((void*)0)
11964 #endif
11965
11966 int main() {
11967
11968 #if DB_VERSION_MAJOR > 1
11969         {
11970                 char *version;
11971                 int major, minor, patch;
11972
11973                 version = db_version( &major, &minor, &patch );
11974
11975                 if( major != DB_VERSION_MAJOR ||
11976                         minor < DB_VERSION_MINOR )
11977                 {
11978                         printf("Berkeley DB version mismatch\n"
11979                                 "\texpected: %s\n\tgot: %s\n",
11980                                 DB_VERSION_STRING, version);
11981                         return 1;
11982                 }
11983         }
11984 #endif
11985
11986 #if DB_VERSION_MAJOR > 2
11987         db_env_create( NULL, 0 );
11988 #elif DB_VERSION_MAJOR > 1
11989         db_appexit( NULL );
11990 #else
11991         (void) dbopen( NULL, 0, 0, 0, NULL);
11992 #endif
11993
11994 ; return 0; }
11995 EOF
11996 if { (eval echo configure:11997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11997   rm -rf conftest*
11998   ol_cv_db_db1=yes
11999 else
12000   echo "configure: failed program was:" >&5
12001   cat conftest.$ac_ext >&5
12002   rm -rf conftest*
12003   ol_cv_db_db1=no
12004 fi
12005 rm -f conftest*
12006
12007         LIBS="$ol_LIBS"
12008
12009 fi
12010
12011 echo "$ac_t""$ol_cv_db_db1" 1>&6
12012
12013         if test $ol_cv_db_db1 = yes ; then
12014                 ol_cv_lib_db=-ldb1
12015         fi
12016 fi
12017
12018
12019                 if test "$ol_cv_lib_db" != no ; then
12020                         ol_cv_berkeley_db=yes
12021                 fi
12022         fi
12023 fi
12024
12025         else
12026                 ol_cv_berkeley_db=no
12027 for ac_hdr in db.h
12028 do
12029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12031 echo "configure:12032: checking for $ac_hdr" >&5
12032 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12033   echo $ac_n "(cached) $ac_c" 1>&6
12034 else
12035   cat > conftest.$ac_ext <<EOF
12036 #line 12037 "configure"
12037 #include "confdefs.h"
12038 #include <$ac_hdr>
12039 EOF
12040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12041 { (eval echo configure:12042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12043 if test -z "$ac_err"; then
12044   rm -rf conftest*
12045   eval "ac_cv_header_$ac_safe=yes"
12046 else
12047   echo "$ac_err" >&5
12048   echo "configure: failed program was:" >&5
12049   cat conftest.$ac_ext >&5
12050   rm -rf conftest*
12051   eval "ac_cv_header_$ac_safe=no"
12052 fi
12053 rm -f conftest*
12054 fi
12055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12056   echo "$ac_t""yes" 1>&6
12057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12058   cat >> confdefs.h <<EOF
12059 #define $ac_tr_hdr 1
12060 EOF
12061  
12062 else
12063   echo "$ac_t""no" 1>&6
12064 fi
12065 done
12066
12067 if test $ac_cv_header_db_h = yes; then
12068         ol_cv_lib_db=no
12069 if test $ol_cv_lib_db = no ; then
12070         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12071 echo "configure:12072: checking for Berkeley DB link (default)" >&5
12072 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12073   echo $ac_n "(cached) $ac_c" 1>&6
12074 else
12075   
12076         ol_DB_LIB=
12077         ol_LIBS=$LIBS
12078         LIBS="$ol_DB_LIB $LIBS"
12079
12080         cat > conftest.$ac_ext <<EOF
12081 #line 12082 "configure"
12082 #include "confdefs.h"
12083
12084 #ifdef HAVE_DB_185_H
12085 # include <db_185.h>
12086 #else
12087 # include <db.h>
12088 #endif
12089
12090 #ifndef DB_VERSION_MAJOR
12091 # define DB_VERSION_MAJOR 1
12092 #endif
12093
12094 #ifndef NULL
12095 #define NULL ((void*)0)
12096 #endif
12097
12098 int main() {
12099
12100 #if DB_VERSION_MAJOR > 1
12101         {
12102                 char *version;
12103                 int major, minor, patch;
12104
12105                 version = db_version( &major, &minor, &patch );
12106
12107                 if( major != DB_VERSION_MAJOR ||
12108                         minor < DB_VERSION_MINOR )
12109                 {
12110                         printf("Berkeley DB version mismatch\n"
12111                                 "\texpected: %s\n\tgot: %s\n",
12112                                 DB_VERSION_STRING, version);
12113                         return 1;
12114                 }
12115         }
12116 #endif
12117
12118 #if DB_VERSION_MAJOR > 2
12119         db_env_create( NULL, 0 );
12120 #elif DB_VERSION_MAJOR > 1
12121         db_appexit( NULL );
12122 #else
12123         (void) dbopen( NULL, 0, 0, 0, NULL);
12124 #endif
12125
12126 ; return 0; }
12127 EOF
12128 if { (eval echo configure:12129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12129   rm -rf conftest*
12130   ol_cv_db_none=yes
12131 else
12132   echo "configure: failed program was:" >&5
12133   cat conftest.$ac_ext >&5
12134   rm -rf conftest*
12135   ol_cv_db_none=no
12136 fi
12137 rm -f conftest*
12138
12139         LIBS="$ol_LIBS"
12140
12141 fi
12142
12143 echo "$ac_t""$ol_cv_db_none" 1>&6
12144
12145         if test $ol_cv_db_none = yes ; then
12146                 ol_cv_lib_db=yes
12147         fi
12148 fi
12149
12150 if test $ol_cv_lib_db = no ; then
12151         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12152 echo "configure:12153: checking for Berkeley DB link (-ldb)" >&5
12153 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12154   echo $ac_n "(cached) $ac_c" 1>&6
12155 else
12156   
12157         ol_DB_LIB=-ldb
12158         ol_LIBS=$LIBS
12159         LIBS="$ol_DB_LIB $LIBS"
12160
12161         cat > conftest.$ac_ext <<EOF
12162 #line 12163 "configure"
12163 #include "confdefs.h"
12164
12165 #ifdef HAVE_DB_185_H
12166 # include <db_185.h>
12167 #else
12168 # include <db.h>
12169 #endif
12170
12171 #ifndef DB_VERSION_MAJOR
12172 # define DB_VERSION_MAJOR 1
12173 #endif
12174
12175 #ifndef NULL
12176 #define NULL ((void*)0)
12177 #endif
12178
12179 int main() {
12180
12181 #if DB_VERSION_MAJOR > 1
12182         {
12183                 char *version;
12184                 int major, minor, patch;
12185
12186                 version = db_version( &major, &minor, &patch );
12187
12188                 if( major != DB_VERSION_MAJOR ||
12189                         minor < DB_VERSION_MINOR )
12190                 {
12191                         printf("Berkeley DB version mismatch\n"
12192                                 "\texpected: %s\n\tgot: %s\n",
12193                                 DB_VERSION_STRING, version);
12194                         return 1;
12195                 }
12196         }
12197 #endif
12198
12199 #if DB_VERSION_MAJOR > 2
12200         db_env_create( NULL, 0 );
12201 #elif DB_VERSION_MAJOR > 1
12202         db_appexit( NULL );
12203 #else
12204         (void) dbopen( NULL, 0, 0, 0, NULL);
12205 #endif
12206
12207 ; return 0; }
12208 EOF
12209 if { (eval echo configure:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12210   rm -rf conftest*
12211   ol_cv_db_db=yes
12212 else
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   ol_cv_db_db=no
12217 fi
12218 rm -f conftest*
12219
12220         LIBS="$ol_LIBS"
12221
12222 fi
12223
12224 echo "$ac_t""$ol_cv_db_db" 1>&6
12225
12226         if test $ol_cv_db_db = yes ; then
12227                 ol_cv_lib_db=-ldb
12228         fi
12229 fi
12230
12231 if test $ol_cv_lib_db = no ; then
12232         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12233 echo "configure:12234: checking for Berkeley DB link (-ldb3)" >&5
12234 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12235   echo $ac_n "(cached) $ac_c" 1>&6
12236 else
12237   
12238         ol_DB_LIB=-ldb3
12239         ol_LIBS=$LIBS
12240         LIBS="$ol_DB_LIB $LIBS"
12241
12242         cat > conftest.$ac_ext <<EOF
12243 #line 12244 "configure"
12244 #include "confdefs.h"
12245
12246 #ifdef HAVE_DB_185_H
12247 # include <db_185.h>
12248 #else
12249 # include <db.h>
12250 #endif
12251
12252 #ifndef DB_VERSION_MAJOR
12253 # define DB_VERSION_MAJOR 1
12254 #endif
12255
12256 #ifndef NULL
12257 #define NULL ((void*)0)
12258 #endif
12259
12260 int main() {
12261
12262 #if DB_VERSION_MAJOR > 1
12263         {
12264                 char *version;
12265                 int major, minor, patch;
12266
12267                 version = db_version( &major, &minor, &patch );
12268
12269                 if( major != DB_VERSION_MAJOR ||
12270                         minor < DB_VERSION_MINOR )
12271                 {
12272                         printf("Berkeley DB version mismatch\n"
12273                                 "\texpected: %s\n\tgot: %s\n",
12274                                 DB_VERSION_STRING, version);
12275                         return 1;
12276                 }
12277         }
12278 #endif
12279
12280 #if DB_VERSION_MAJOR > 2
12281         db_env_create( NULL, 0 );
12282 #elif DB_VERSION_MAJOR > 1
12283         db_appexit( NULL );
12284 #else
12285         (void) dbopen( NULL, 0, 0, 0, NULL);
12286 #endif
12287
12288 ; return 0; }
12289 EOF
12290 if { (eval echo configure:12291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12291   rm -rf conftest*
12292   ol_cv_db_db3=yes
12293 else
12294   echo "configure: failed program was:" >&5
12295   cat conftest.$ac_ext >&5
12296   rm -rf conftest*
12297   ol_cv_db_db3=no
12298 fi
12299 rm -f conftest*
12300
12301         LIBS="$ol_LIBS"
12302
12303 fi
12304
12305 echo "$ac_t""$ol_cv_db_db3" 1>&6
12306
12307         if test $ol_cv_db_db3 = yes ; then
12308                 ol_cv_lib_db=-ldb3
12309         fi
12310 fi
12311
12312 if test $ol_cv_lib_db = no ; then
12313         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12314 echo "configure:12315: checking for Berkeley DB link (-ldb2)" >&5
12315 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12316   echo $ac_n "(cached) $ac_c" 1>&6
12317 else
12318   
12319         ol_DB_LIB=-ldb2
12320         ol_LIBS=$LIBS
12321         LIBS="$ol_DB_LIB $LIBS"
12322
12323         cat > conftest.$ac_ext <<EOF
12324 #line 12325 "configure"
12325 #include "confdefs.h"
12326
12327 #ifdef HAVE_DB_185_H
12328 # include <db_185.h>
12329 #else
12330 # include <db.h>
12331 #endif
12332
12333 #ifndef DB_VERSION_MAJOR
12334 # define DB_VERSION_MAJOR 1
12335 #endif
12336
12337 #ifndef NULL
12338 #define NULL ((void*)0)
12339 #endif
12340
12341 int main() {
12342
12343 #if DB_VERSION_MAJOR > 1
12344         {
12345                 char *version;
12346                 int major, minor, patch;
12347
12348                 version = db_version( &major, &minor, &patch );
12349
12350                 if( major != DB_VERSION_MAJOR ||
12351                         minor < DB_VERSION_MINOR )
12352                 {
12353                         printf("Berkeley DB version mismatch\n"
12354                                 "\texpected: %s\n\tgot: %s\n",
12355                                 DB_VERSION_STRING, version);
12356                         return 1;
12357                 }
12358         }
12359 #endif
12360
12361 #if DB_VERSION_MAJOR > 2
12362         db_env_create( NULL, 0 );
12363 #elif DB_VERSION_MAJOR > 1
12364         db_appexit( NULL );
12365 #else
12366         (void) dbopen( NULL, 0, 0, 0, NULL);
12367 #endif
12368
12369 ; return 0; }
12370 EOF
12371 if { (eval echo configure:12372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12372   rm -rf conftest*
12373   ol_cv_db_db2=yes
12374 else
12375   echo "configure: failed program was:" >&5
12376   cat conftest.$ac_ext >&5
12377   rm -rf conftest*
12378   ol_cv_db_db2=no
12379 fi
12380 rm -f conftest*
12381
12382         LIBS="$ol_LIBS"
12383
12384 fi
12385
12386 echo "$ac_t""$ol_cv_db_db2" 1>&6
12387
12388         if test $ol_cv_db_db2 = yes ; then
12389                 ol_cv_lib_db=-ldb2
12390         fi
12391 fi
12392
12393 if test $ol_cv_lib_db = no ; then
12394         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12395 echo "configure:12396: checking for Berkeley DB link (-ldb1)" >&5
12396 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12397   echo $ac_n "(cached) $ac_c" 1>&6
12398 else
12399   
12400         ol_DB_LIB=-ldb1
12401         ol_LIBS=$LIBS
12402         LIBS="$ol_DB_LIB $LIBS"
12403
12404         cat > conftest.$ac_ext <<EOF
12405 #line 12406 "configure"
12406 #include "confdefs.h"
12407
12408 #ifdef HAVE_DB_185_H
12409 # include <db_185.h>
12410 #else
12411 # include <db.h>
12412 #endif
12413
12414 #ifndef DB_VERSION_MAJOR
12415 # define DB_VERSION_MAJOR 1
12416 #endif
12417
12418 #ifndef NULL
12419 #define NULL ((void*)0)
12420 #endif
12421
12422 int main() {
12423
12424 #if DB_VERSION_MAJOR > 1
12425         {
12426                 char *version;
12427                 int major, minor, patch;
12428
12429                 version = db_version( &major, &minor, &patch );
12430
12431                 if( major != DB_VERSION_MAJOR ||
12432                         minor < DB_VERSION_MINOR )
12433                 {
12434                         printf("Berkeley DB version mismatch\n"
12435                                 "\texpected: %s\n\tgot: %s\n",
12436                                 DB_VERSION_STRING, version);
12437                         return 1;
12438                 }
12439         }
12440 #endif
12441
12442 #if DB_VERSION_MAJOR > 2
12443         db_env_create( NULL, 0 );
12444 #elif DB_VERSION_MAJOR > 1
12445         db_appexit( NULL );
12446 #else
12447         (void) dbopen( NULL, 0, 0, 0, NULL);
12448 #endif
12449
12450 ; return 0; }
12451 EOF
12452 if { (eval echo configure:12453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12453   rm -rf conftest*
12454   ol_cv_db_db1=yes
12455 else
12456   echo "configure: failed program was:" >&5
12457   cat conftest.$ac_ext >&5
12458   rm -rf conftest*
12459   ol_cv_db_db1=no
12460 fi
12461 rm -f conftest*
12462
12463         LIBS="$ol_LIBS"
12464
12465 fi
12466
12467 echo "$ac_t""$ol_cv_db_db1" 1>&6
12468
12469         if test $ol_cv_db_db1 = yes ; then
12470                 ol_cv_lib_db=-ldb1
12471         fi
12472 fi
12473
12474
12475         if test "$ol_cv_lib_db" != no ; then
12476                 ol_cv_berkeley_db=yes
12477                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12478 echo "configure:12479: checking for Berkeley DB thread support" >&5
12479 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12480   echo $ac_n "(cached) $ac_c" 1>&6
12481 else
12482   
12483         ol_LIBS="$LIBS"
12484         if test $ol_cv_lib_db != yes ; then
12485                 LIBS="$ol_cv_lib_db"
12486         fi
12487
12488         if test "$cross_compiling" = yes; then
12489   ol_cv_berkeley_db_thread=cross
12490 else
12491   cat > conftest.$ac_ext <<EOF
12492 #line 12493 "configure"
12493 #include "confdefs.h"
12494
12495 #ifdef HAVE_DB_185_H
12496         choke me;
12497 #else
12498 #include <db.h>
12499 #endif
12500 #ifndef NULL
12501 #define NULL ((void *)0)
12502 #endif
12503 main()
12504 {
12505         int rc;
12506         u_int32_t flags = DB_CREATE | DB_INIT_CDB | DB_INIT_MPOOL |
12507 #ifdef DB_PRIVATE
12508                 DB_PRIVATE |
12509 #endif
12510 #ifdef DB_MPOOL_PRIVATE
12511                 DB_MPOOL_PRIVATE |
12512 #endif
12513                 DB_THREAD;
12514
12515 #if DB_VERSION_MAJOR > 2
12516         DB_ENV *env = NULL;
12517
12518         rc = db_env_create( &env, 0 );
12519
12520         if( rc ) {
12521                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
12522                 return rc;
12523         }
12524
12525 #ifdef DB_CDB_ALLDB
12526         rc = env->set_flags( env, DB_CDB_ALLDB, 1 );
12527
12528         if( rc ) {
12529                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
12530                 return rc;
12531         }
12532 #endif
12533
12534 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12535         rc = env->open( env, NULL, flags, 0 );
12536 #else
12537         rc = env->open( env, NULL, NULL, flags, 0 );
12538 #endif
12539
12540         if ( rc == 0 ) {
12541                 rc = env->close( env, 0 );
12542         }
12543
12544         if( rc ) {
12545                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
12546                 return rc;
12547         }
12548
12549 #else
12550         DB_ENV env;
12551         memset( &env, '\0', sizeof(env) );
12552
12553         rc = db_appinit( NULL, NULL, &env, flags );
12554
12555         if( rc == 0 ) {
12556                 db_appexit( &env );
12557         }
12558
12559         unlink("__db_mpool.share");
12560         unlink("__db_lock.share");
12561 #endif
12562
12563         return rc;
12564 }
12565 EOF
12566 if { (eval echo configure:12567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12567 then
12568   ol_cv_berkeley_db_thread=yes
12569 else
12570   echo "configure: failed program was:" >&5
12571   cat conftest.$ac_ext >&5
12572   rm -fr conftest*
12573   ol_cv_berkeley_db_thread=no
12574 fi
12575 rm -fr conftest*
12576 fi
12577
12578
12579         LIBS="$ol_LIBS"
12580
12581         if test $ol_cv_berkeley_db_thread != no ; then
12582                 cat >> confdefs.h <<\EOF
12583 #define HAVE_BERKELEY_DB_THREAD 1
12584 EOF
12585
12586         fi
12587
12588 fi
12589
12590 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12591         fi
12592 fi
12593
12594         fi
12595
12596         if test $ol_cv_berkeley_db != no ; then
12597                 cat >> confdefs.h <<\EOF
12598 #define HAVE_BERKELEY_DB 1
12599 EOF
12600
12601
12602                 ol_link_ldbm=berkeley
12603                 ol_with_ldbm_api=db
12604
12605                 if test $ol_with_ldbm_type = hash ; then
12606                         cat >> confdefs.h <<\EOF
12607 #define LDBM_USE_DBHASH 1
12608 EOF
12609
12610                 else
12611                         cat >> confdefs.h <<\EOF
12612 #define LDBM_USE_DBBTREE 1
12613 EOF
12614
12615                 fi
12616
12617                                                 if test $ol_cv_lib_db != yes ; then
12618                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12619                 fi
12620         fi
12621 fi
12622
12623 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12624         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12625         ol_with_ldbm_api=none
12626 fi
12627
12628 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12629         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12630 echo "configure:12631: checking for MDBM library" >&5
12631 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12632   echo $ac_n "(cached) $ac_c" 1>&6
12633 else
12634         ol_LIBS="$LIBS"
12635         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12636 echo "configure:12637: checking for mdbm_set_chain" >&5
12637 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12638   echo $ac_n "(cached) $ac_c" 1>&6
12639 else
12640   cat > conftest.$ac_ext <<EOF
12641 #line 12642 "configure"
12642 #include "confdefs.h"
12643 /* System header to define __stub macros and hopefully few prototypes,
12644     which can conflict with char mdbm_set_chain(); below.  */
12645 #include <assert.h>
12646 /* Override any gcc2 internal prototype to avoid an error.  */
12647 /* We use char because int might match the return type of a gcc2
12648     builtin and then its argument prototype would still apply.  */
12649 char mdbm_set_chain();
12650 char (*f)();
12651
12652 int main() {
12653
12654 /* The GNU C library defines this for functions which it implements
12655     to always fail with ENOSYS.  Some functions are actually named
12656     something starting with __ and the normal name is an alias.  */
12657 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12658 choke me
12659 #else
12660 f = mdbm_set_chain;
12661 #endif
12662
12663 ; return 0; }
12664 EOF
12665 if { (eval echo configure:12666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12666   rm -rf conftest*
12667   eval "ac_cv_func_mdbm_set_chain=yes"
12668 else
12669   echo "configure: failed program was:" >&5
12670   cat conftest.$ac_ext >&5
12671   rm -rf conftest*
12672   eval "ac_cv_func_mdbm_set_chain=no"
12673 fi
12674 rm -f conftest*
12675 fi
12676
12677 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12678   echo "$ac_t""yes" 1>&6
12679   ol_cv_lib_mdbm=yes
12680 else
12681   echo "$ac_t""no" 1>&6
12682
12683                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12684 echo "configure:12685: checking for mdbm_set_chain in -lmdbm" >&5
12685 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12686 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12687   echo $ac_n "(cached) $ac_c" 1>&6
12688 else
12689   ac_save_LIBS="$LIBS"
12690 LIBS="-lmdbm  $LIBS"
12691 cat > conftest.$ac_ext <<EOF
12692 #line 12693 "configure"
12693 #include "confdefs.h"
12694 /* Override any gcc2 internal prototype to avoid an error.  */
12695 /* We use char because int might match the return type of a gcc2
12696     builtin and then its argument prototype would still apply.  */
12697 char mdbm_set_chain();
12698
12699 int main() {
12700 mdbm_set_chain()
12701 ; return 0; }
12702 EOF
12703 if { (eval echo configure:12704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12704   rm -rf conftest*
12705   eval "ac_cv_lib_$ac_lib_var=yes"
12706 else
12707   echo "configure: failed program was:" >&5
12708   cat conftest.$ac_ext >&5
12709   rm -rf conftest*
12710   eval "ac_cv_lib_$ac_lib_var=no"
12711 fi
12712 rm -f conftest*
12713 LIBS="$ac_save_LIBS"
12714
12715 fi
12716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12717   echo "$ac_t""yes" 1>&6
12718   ol_cv_lib_mdbm=-lmdbm
12719 else
12720   echo "$ac_t""no" 1>&6
12721 ol_cv_lib_mdbm=no
12722 fi
12723
12724         
12725 fi
12726
12727         LIBS="$ol_LIBS"
12728
12729 fi
12730
12731 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12732
12733
12734  for ac_hdr in mdbm.h
12735 do
12736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12738 echo "configure:12739: checking for $ac_hdr" >&5
12739 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12740   echo $ac_n "(cached) $ac_c" 1>&6
12741 else
12742   cat > conftest.$ac_ext <<EOF
12743 #line 12744 "configure"
12744 #include "confdefs.h"
12745 #include <$ac_hdr>
12746 EOF
12747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12748 { (eval echo configure:12749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12750 if test -z "$ac_err"; then
12751   rm -rf conftest*
12752   eval "ac_cv_header_$ac_safe=yes"
12753 else
12754   echo "$ac_err" >&5
12755   echo "configure: failed program was:" >&5
12756   cat conftest.$ac_ext >&5
12757   rm -rf conftest*
12758   eval "ac_cv_header_$ac_safe=no"
12759 fi
12760 rm -f conftest*
12761 fi
12762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12763   echo "$ac_t""yes" 1>&6
12764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12765   cat >> confdefs.h <<EOF
12766 #define $ac_tr_hdr 1
12767 EOF
12768  
12769 else
12770   echo "$ac_t""no" 1>&6
12771 fi
12772 done
12773
12774  echo $ac_n "checking for db""... $ac_c" 1>&6
12775 echo "configure:12776: checking for db" >&5
12776 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12777   echo $ac_n "(cached) $ac_c" 1>&6
12778 else
12779   
12780         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12781                 ol_cv_mdbm=no
12782         else
12783                 ol_cv_mdbm=yes
12784         fi
12785
12786 fi
12787
12788 echo "$ac_t""$ol_cv_mdbm" 1>&6
12789  if test $ol_cv_mdbm = yes ; then
12790         cat >> confdefs.h <<\EOF
12791 #define HAVE_MDBM 1
12792 EOF
12793
12794  fi
12795
12796
12797         if test $ol_cv_mdbm = yes ; then
12798                 ol_link_ldbm=mdbm
12799                 ol_with_ldbm_api=mdbm
12800                 if test $ol_cv_lib_mdbm != yes ; then
12801                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12802                 fi
12803         fi
12804 fi
12805
12806 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12807         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12808 echo "configure:12809: checking for GDBM library" >&5
12809 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12810   echo $ac_n "(cached) $ac_c" 1>&6
12811 else
12812         ol_LIBS="$LIBS"
12813         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12814 echo "configure:12815: checking for gdbm_open" >&5
12815 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12816   echo $ac_n "(cached) $ac_c" 1>&6
12817 else
12818   cat > conftest.$ac_ext <<EOF
12819 #line 12820 "configure"
12820 #include "confdefs.h"
12821 /* System header to define __stub macros and hopefully few prototypes,
12822     which can conflict with char gdbm_open(); below.  */
12823 #include <assert.h>
12824 /* Override any gcc2 internal prototype to avoid an error.  */
12825 /* We use char because int might match the return type of a gcc2
12826     builtin and then its argument prototype would still apply.  */
12827 char gdbm_open();
12828 char (*f)();
12829
12830 int main() {
12831
12832 /* The GNU C library defines this for functions which it implements
12833     to always fail with ENOSYS.  Some functions are actually named
12834     something starting with __ and the normal name is an alias.  */
12835 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12836 choke me
12837 #else
12838 f = gdbm_open;
12839 #endif
12840
12841 ; return 0; }
12842 EOF
12843 if { (eval echo configure:12844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12844   rm -rf conftest*
12845   eval "ac_cv_func_gdbm_open=yes"
12846 else
12847   echo "configure: failed program was:" >&5
12848   cat conftest.$ac_ext >&5
12849   rm -rf conftest*
12850   eval "ac_cv_func_gdbm_open=no"
12851 fi
12852 rm -f conftest*
12853 fi
12854
12855 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12856   echo "$ac_t""yes" 1>&6
12857   ol_cv_lib_gdbm=yes
12858 else
12859   echo "$ac_t""no" 1>&6
12860
12861                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12862 echo "configure:12863: checking for gdbm_open in -lgdbm" >&5
12863 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12865   echo $ac_n "(cached) $ac_c" 1>&6
12866 else
12867   ac_save_LIBS="$LIBS"
12868 LIBS="-lgdbm  $LIBS"
12869 cat > conftest.$ac_ext <<EOF
12870 #line 12871 "configure"
12871 #include "confdefs.h"
12872 /* Override any gcc2 internal prototype to avoid an error.  */
12873 /* We use char because int might match the return type of a gcc2
12874     builtin and then its argument prototype would still apply.  */
12875 char gdbm_open();
12876
12877 int main() {
12878 gdbm_open()
12879 ; return 0; }
12880 EOF
12881 if { (eval echo configure:12882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12882   rm -rf conftest*
12883   eval "ac_cv_lib_$ac_lib_var=yes"
12884 else
12885   echo "configure: failed program was:" >&5
12886   cat conftest.$ac_ext >&5
12887   rm -rf conftest*
12888   eval "ac_cv_lib_$ac_lib_var=no"
12889 fi
12890 rm -f conftest*
12891 LIBS="$ac_save_LIBS"
12892
12893 fi
12894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12895   echo "$ac_t""yes" 1>&6
12896   ol_cv_lib_gdbm=-lgdbm
12897 else
12898   echo "$ac_t""no" 1>&6
12899 ol_cv_lib_gdbm=no
12900 fi
12901
12902         
12903 fi
12904
12905         LIBS="$ol_LIBS"
12906
12907 fi
12908
12909 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12910
12911
12912  for ac_hdr in gdbm.h
12913 do
12914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12916 echo "configure:12917: checking for $ac_hdr" >&5
12917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12918   echo $ac_n "(cached) $ac_c" 1>&6
12919 else
12920   cat > conftest.$ac_ext <<EOF
12921 #line 12922 "configure"
12922 #include "confdefs.h"
12923 #include <$ac_hdr>
12924 EOF
12925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12926 { (eval echo configure:12927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12928 if test -z "$ac_err"; then
12929   rm -rf conftest*
12930   eval "ac_cv_header_$ac_safe=yes"
12931 else
12932   echo "$ac_err" >&5
12933   echo "configure: failed program was:" >&5
12934   cat conftest.$ac_ext >&5
12935   rm -rf conftest*
12936   eval "ac_cv_header_$ac_safe=no"
12937 fi
12938 rm -f conftest*
12939 fi
12940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12941   echo "$ac_t""yes" 1>&6
12942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12943   cat >> confdefs.h <<EOF
12944 #define $ac_tr_hdr 1
12945 EOF
12946  
12947 else
12948   echo "$ac_t""no" 1>&6
12949 fi
12950 done
12951
12952  echo $ac_n "checking for db""... $ac_c" 1>&6
12953 echo "configure:12954: checking for db" >&5
12954 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12955   echo $ac_n "(cached) $ac_c" 1>&6
12956 else
12957   
12958         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12959                 ol_cv_gdbm=no
12960         else
12961                 ol_cv_gdbm=yes
12962         fi
12963
12964 fi
12965
12966 echo "$ac_t""$ol_cv_gdbm" 1>&6
12967  if test $ol_cv_gdbm = yes ; then
12968         cat >> confdefs.h <<\EOF
12969 #define HAVE_GDBM 1
12970 EOF
12971
12972  fi
12973
12974
12975         if test $ol_cv_gdbm = yes ; then
12976                 ol_link_ldbm=gdbm
12977                 ol_with_ldbm_api=gdbm
12978
12979                 if test $ol_cv_lib_gdbm != yes ; then
12980                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12981                 fi
12982         fi
12983 fi
12984
12985 if test $ol_with_ldbm_api = ndbm ; then
12986         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12987 echo "configure:12988: checking for NDBM library" >&5
12988 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12989   echo $ac_n "(cached) $ac_c" 1>&6
12990 else
12991         ol_LIBS="$LIBS"
12992         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12993 echo "configure:12994: checking for dbm_open" >&5
12994 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12995   echo $ac_n "(cached) $ac_c" 1>&6
12996 else
12997   cat > conftest.$ac_ext <<EOF
12998 #line 12999 "configure"
12999 #include "confdefs.h"
13000 /* System header to define __stub macros and hopefully few prototypes,
13001     which can conflict with char dbm_open(); below.  */
13002 #include <assert.h>
13003 /* Override any gcc2 internal prototype to avoid an error.  */
13004 /* We use char because int might match the return type of a gcc2
13005     builtin and then its argument prototype would still apply.  */
13006 char dbm_open();
13007 char (*f)();
13008
13009 int main() {
13010
13011 /* The GNU C library defines this for functions which it implements
13012     to always fail with ENOSYS.  Some functions are actually named
13013     something starting with __ and the normal name is an alias.  */
13014 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13015 choke me
13016 #else
13017 f = dbm_open;
13018 #endif
13019
13020 ; return 0; }
13021 EOF
13022 if { (eval echo configure:13023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13023   rm -rf conftest*
13024   eval "ac_cv_func_dbm_open=yes"
13025 else
13026   echo "configure: failed program was:" >&5
13027   cat conftest.$ac_ext >&5
13028   rm -rf conftest*
13029   eval "ac_cv_func_dbm_open=no"
13030 fi
13031 rm -f conftest*
13032 fi
13033
13034 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13035   echo "$ac_t""yes" 1>&6
13036   ol_cv_lib_ndbm=yes
13037 else
13038   echo "$ac_t""no" 1>&6
13039
13040                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13041 echo "configure:13042: checking for dbm_open in -lndbm" >&5
13042 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13044   echo $ac_n "(cached) $ac_c" 1>&6
13045 else
13046   ac_save_LIBS="$LIBS"
13047 LIBS="-lndbm  $LIBS"
13048 cat > conftest.$ac_ext <<EOF
13049 #line 13050 "configure"
13050 #include "confdefs.h"
13051 /* Override any gcc2 internal prototype to avoid an error.  */
13052 /* We use char because int might match the return type of a gcc2
13053     builtin and then its argument prototype would still apply.  */
13054 char dbm_open();
13055
13056 int main() {
13057 dbm_open()
13058 ; return 0; }
13059 EOF
13060 if { (eval echo configure:13061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13061   rm -rf conftest*
13062   eval "ac_cv_lib_$ac_lib_var=yes"
13063 else
13064   echo "configure: failed program was:" >&5
13065   cat conftest.$ac_ext >&5
13066   rm -rf conftest*
13067   eval "ac_cv_lib_$ac_lib_var=no"
13068 fi
13069 rm -f conftest*
13070 LIBS="$ac_save_LIBS"
13071
13072 fi
13073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13074   echo "$ac_t""yes" 1>&6
13075   ol_cv_lib_ndbm=-lndbm
13076 else
13077   echo "$ac_t""no" 1>&6
13078
13079                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13080 echo "configure:13081: checking for dbm_open in -ldbm" >&5
13081 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13082 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13083   echo $ac_n "(cached) $ac_c" 1>&6
13084 else
13085   ac_save_LIBS="$LIBS"
13086 LIBS="-ldbm  $LIBS"
13087 cat > conftest.$ac_ext <<EOF
13088 #line 13089 "configure"
13089 #include "confdefs.h"
13090 /* Override any gcc2 internal prototype to avoid an error.  */
13091 /* We use char because int might match the return type of a gcc2
13092     builtin and then its argument prototype would still apply.  */
13093 char dbm_open();
13094
13095 int main() {
13096 dbm_open()
13097 ; return 0; }
13098 EOF
13099 if { (eval echo configure:13100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13100   rm -rf conftest*
13101   eval "ac_cv_lib_$ac_lib_var=yes"
13102 else
13103   echo "configure: failed program was:" >&5
13104   cat conftest.$ac_ext >&5
13105   rm -rf conftest*
13106   eval "ac_cv_lib_$ac_lib_var=no"
13107 fi
13108 rm -f conftest*
13109 LIBS="$ac_save_LIBS"
13110
13111 fi
13112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13113   echo "$ac_t""yes" 1>&6
13114   ol_cv_lib_ndbm=-ldbm
13115 else
13116   echo "$ac_t""no" 1>&6
13117 ol_cv_lib_ndbm=no
13118 fi
13119                 
13120 fi
13121
13122         
13123 fi
13124
13125         LIBS="$ol_LIBS"
13126
13127 fi
13128
13129 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13130
13131
13132  for ac_hdr in ndbm.h
13133 do
13134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13136 echo "configure:13137: checking for $ac_hdr" >&5
13137 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13138   echo $ac_n "(cached) $ac_c" 1>&6
13139 else
13140   cat > conftest.$ac_ext <<EOF
13141 #line 13142 "configure"
13142 #include "confdefs.h"
13143 #include <$ac_hdr>
13144 EOF
13145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13146 { (eval echo configure:13147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13148 if test -z "$ac_err"; then
13149   rm -rf conftest*
13150   eval "ac_cv_header_$ac_safe=yes"
13151 else
13152   echo "$ac_err" >&5
13153   echo "configure: failed program was:" >&5
13154   cat conftest.$ac_ext >&5
13155   rm -rf conftest*
13156   eval "ac_cv_header_$ac_safe=no"
13157 fi
13158 rm -f conftest*
13159 fi
13160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13161   echo "$ac_t""yes" 1>&6
13162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13163   cat >> confdefs.h <<EOF
13164 #define $ac_tr_hdr 1
13165 EOF
13166  
13167 else
13168   echo "$ac_t""no" 1>&6
13169 fi
13170 done
13171
13172  echo $ac_n "checking for db""... $ac_c" 1>&6
13173 echo "configure:13174: checking for db" >&5
13174 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13175   echo $ac_n "(cached) $ac_c" 1>&6
13176 else
13177   
13178         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13179                 ol_cv_ndbm=no
13180         else
13181                 ol_cv_ndbm=yes
13182         fi
13183
13184 fi
13185
13186 echo "$ac_t""$ol_cv_ndbm" 1>&6
13187  if test $ol_cv_ndbm = yes ; then
13188         cat >> confdefs.h <<\EOF
13189 #define HAVE_NDBM 1
13190 EOF
13191
13192  fi
13193
13194
13195         if test $ol_cv_ndbm = yes ; then
13196                 ol_link_ldbm=ndbm
13197                 ol_with_ldbm_api=ndbm
13198
13199                 if test $ol_cv_lib_ndbm != yes ; then
13200                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13201                 fi
13202         fi
13203 fi
13204
13205 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13206         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13207         if test $ol_enable_ldbm = yes ; then
13208                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13209         fi
13210
13211         echo "configure: warning: disabling LDBM" 1>&2
13212         ol_enable_ldbm=no
13213 fi
13214
13215 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13216         LINK_BINS_DYNAMIC="yes"
13217 else
13218         LINK_BINS_DYNAMIC="no"
13219 fi
13220
13221 if test $ol_enable_wrappers != no ; then
13222         for ac_hdr in tcpd.h
13223 do
13224 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13225 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13226 echo "configure:13227: checking for $ac_hdr" >&5
13227 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13228   echo $ac_n "(cached) $ac_c" 1>&6
13229 else
13230   cat > conftest.$ac_ext <<EOF
13231 #line 13232 "configure"
13232 #include "confdefs.h"
13233 #include <$ac_hdr>
13234 EOF
13235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13236 { (eval echo configure:13237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13238 if test -z "$ac_err"; then
13239   rm -rf conftest*
13240   eval "ac_cv_header_$ac_safe=yes"
13241 else
13242   echo "$ac_err" >&5
13243   echo "configure: failed program was:" >&5
13244   cat conftest.$ac_ext >&5
13245   rm -rf conftest*
13246   eval "ac_cv_header_$ac_safe=no"
13247 fi
13248 rm -f conftest*
13249 fi
13250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13251   echo "$ac_t""yes" 1>&6
13252     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13253   cat >> confdefs.h <<EOF
13254 #define $ac_tr_hdr 1
13255 EOF
13256  
13257 else
13258   echo "$ac_t""no" 1>&6
13259 fi
13260 done
13261
13262
13263         if test $ac_cv_header_tcpd_h != yes ; then
13264                 have_wrappers=no
13265         else
13266                 cat > conftest.$ac_ext <<EOF
13267 #line 13268 "configure"
13268 #include "confdefs.h"
13269
13270 int allow_severity = 0;
13271 int deny_severity  = 0;
13272                 
13273 int main() {
13274 hosts_access()
13275 ; return 0; }
13276 EOF
13277 if { (eval echo configure:13278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13278   rm -rf conftest*
13279   have_wrappers=yes
13280 else
13281   echo "configure: failed program was:" >&5
13282   cat conftest.$ac_ext >&5
13283   rm -rf conftest*
13284   have_wrappers=no
13285 fi
13286 rm -f conftest*
13287         fi
13288
13289         if test $have_wrappers = yes ; then
13290                 cat >> confdefs.h <<\EOF
13291 #define HAVE_TCPD 1
13292 EOF
13293
13294                 WRAP_LIBS="-lwrap"
13295
13296                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13297 echo "configure:13298: checking for main in -lnsl" >&5
13298 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13299 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13300   echo $ac_n "(cached) $ac_c" 1>&6
13301 else
13302   ac_save_LIBS="$LIBS"
13303 LIBS="-lnsl  $LIBS"
13304 cat > conftest.$ac_ext <<EOF
13305 #line 13306 "configure"
13306 #include "confdefs.h"
13307
13308 int main() {
13309 main()
13310 ; return 0; }
13311 EOF
13312 if { (eval echo configure:13313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13313   rm -rf conftest*
13314   eval "ac_cv_lib_$ac_lib_var=yes"
13315 else
13316   echo "configure: failed program was:" >&5
13317   cat conftest.$ac_ext >&5
13318   rm -rf conftest*
13319   eval "ac_cv_lib_$ac_lib_var=no"
13320 fi
13321 rm -f conftest*
13322 LIBS="$ac_save_LIBS"
13323
13324 fi
13325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13326   echo "$ac_t""yes" 1>&6
13327     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13328     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13329   cat >> confdefs.h <<EOF
13330 #define $ac_tr_lib 1
13331 EOF
13332
13333   LIBS="-lnsl $LIBS"
13334
13335 else
13336   echo "$ac_t""no" 1>&6
13337 fi
13338
13339         else
13340                 echo "configure: warning: could not find -lwrap" 1>&2
13341                 if test $ol_enable_wrappers = yes ; then
13342                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13343                 fi
13344
13345                 echo "configure: warning: disabling wrappers support" 1>&2
13346                 ol_enable_wrappers=no
13347                 WRAP_LIBS=""
13348         fi
13349 fi
13350
13351 if test $ol_enable_syslog != no ; then
13352         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13353 echo "configure:13354: checking for openlog" >&5
13354 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13355   echo $ac_n "(cached) $ac_c" 1>&6
13356 else
13357   cat > conftest.$ac_ext <<EOF
13358 #line 13359 "configure"
13359 #include "confdefs.h"
13360 /* System header to define __stub macros and hopefully few prototypes,
13361     which can conflict with char openlog(); below.  */
13362 #include <assert.h>
13363 /* Override any gcc2 internal prototype to avoid an error.  */
13364 /* We use char because int might match the return type of a gcc2
13365     builtin and then its argument prototype would still apply.  */
13366 char openlog();
13367 char (*f)();
13368
13369 int main() {
13370
13371 /* The GNU C library defines this for functions which it implements
13372     to always fail with ENOSYS.  Some functions are actually named
13373     something starting with __ and the normal name is an alias.  */
13374 #if defined (__stub_openlog) || defined (__stub___openlog)
13375 choke me
13376 #else
13377 f = openlog;
13378 #endif
13379
13380 ; return 0; }
13381 EOF
13382 if { (eval echo configure:13383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13383   rm -rf conftest*
13384   eval "ac_cv_func_openlog=yes"
13385 else
13386   echo "configure: failed program was:" >&5
13387   cat conftest.$ac_ext >&5
13388   rm -rf conftest*
13389   eval "ac_cv_func_openlog=no"
13390 fi
13391 rm -f conftest*
13392 fi
13393
13394 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13395   echo "$ac_t""yes" 1>&6
13396   :
13397 else
13398   echo "$ac_t""no" 1>&6
13399 fi
13400
13401         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13402                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13403         fi
13404         ol_enable_syslog=$ac_cv_func_openlog
13405 fi
13406
13407 ol_link_sql=no
13408 if test $ol_enable_sql != no ; then
13409         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13410 echo "configure:13411: checking for SQLDriverConnect in -liodbc" >&5
13411 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13412 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13413   echo $ac_n "(cached) $ac_c" 1>&6
13414 else
13415   ac_save_LIBS="$LIBS"
13416 LIBS="-liodbc  $LIBS"
13417 cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420 /* Override any gcc2 internal prototype to avoid an error.  */
13421 /* We use char because int might match the return type of a gcc2
13422     builtin and then its argument prototype would still apply.  */
13423 char SQLDriverConnect();
13424
13425 int main() {
13426 SQLDriverConnect()
13427 ; return 0; }
13428 EOF
13429 if { (eval echo configure:13430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13430   rm -rf conftest*
13431   eval "ac_cv_lib_$ac_lib_var=yes"
13432 else
13433   echo "configure: failed program was:" >&5
13434   cat conftest.$ac_ext >&5
13435   rm -rf conftest*
13436   eval "ac_cv_lib_$ac_lib_var=no"
13437 fi
13438 rm -f conftest*
13439 LIBS="$ac_save_LIBS"
13440
13441 fi
13442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13443   echo "$ac_t""yes" 1>&6
13444   have_iodbc=yes
13445 else
13446   echo "$ac_t""no" 1>&6
13447 have_iodbc=no
13448 fi
13449
13450         if test $have_iodbc = yes ; then
13451                 ol_link_sql="-liodbc"
13452         else
13453                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13454 echo "configure:13455: checking for SQLDriverConnect in -lodbc" >&5
13455 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13456 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13457   echo $ac_n "(cached) $ac_c" 1>&6
13458 else
13459   ac_save_LIBS="$LIBS"
13460 LIBS="-lodbc  $LIBS"
13461 cat > conftest.$ac_ext <<EOF
13462 #line 13463 "configure"
13463 #include "confdefs.h"
13464 /* Override any gcc2 internal prototype to avoid an error.  */
13465 /* We use char because int might match the return type of a gcc2
13466     builtin and then its argument prototype would still apply.  */
13467 char SQLDriverConnect();
13468
13469 int main() {
13470 SQLDriverConnect()
13471 ; return 0; }
13472 EOF
13473 if { (eval echo configure:13474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13474   rm -rf conftest*
13475   eval "ac_cv_lib_$ac_lib_var=yes"
13476 else
13477   echo "configure: failed program was:" >&5
13478   cat conftest.$ac_ext >&5
13479   rm -rf conftest*
13480   eval "ac_cv_lib_$ac_lib_var=no"
13481 fi
13482 rm -f conftest*
13483 LIBS="$ac_save_LIBS"
13484
13485 fi
13486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13487   echo "$ac_t""yes" 1>&6
13488   have_odbc=yes
13489 else
13490   echo "$ac_t""no" 1>&6
13491 have_odbc=no
13492 fi
13493
13494                 if test $have_odbc = yes ; then
13495                         ol_link_sql="-lodbc"
13496                 fi
13497         fi
13498
13499         if test $ol_link_sql != no ; then
13500                 SLAPD_SQL_LIBS="$ol_link_sql"
13501
13502         elif test $ol_enable_sql != auto ; then
13503                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13504         fi
13505 fi
13506
13507 ol_link_termcap=no
13508 for ac_hdr in termcap.h ncurses.h
13509 do
13510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13512 echo "configure:13513: checking for $ac_hdr" >&5
13513 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13514   echo $ac_n "(cached) $ac_c" 1>&6
13515 else
13516   cat > conftest.$ac_ext <<EOF
13517 #line 13518 "configure"
13518 #include "confdefs.h"
13519 #include <$ac_hdr>
13520 EOF
13521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13522 { (eval echo configure:13523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13524 if test -z "$ac_err"; then
13525   rm -rf conftest*
13526   eval "ac_cv_header_$ac_safe=yes"
13527 else
13528   echo "$ac_err" >&5
13529   echo "configure: failed program was:" >&5
13530   cat conftest.$ac_ext >&5
13531   rm -rf conftest*
13532   eval "ac_cv_header_$ac_safe=no"
13533 fi
13534 rm -f conftest*
13535 fi
13536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13537   echo "$ac_t""yes" 1>&6
13538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13539   cat >> confdefs.h <<EOF
13540 #define $ac_tr_hdr 1
13541 EOF
13542  
13543 else
13544   echo "$ac_t""no" 1>&6
13545 fi
13546 done
13547
13548
13549 if test $ol_link_termcap = no ; then
13550         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13551 echo "configure:13552: checking for tputs in -ltermcap" >&5
13552 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13554   echo $ac_n "(cached) $ac_c" 1>&6
13555 else
13556   ac_save_LIBS="$LIBS"
13557 LIBS="-ltermcap  $LIBS"
13558 cat > conftest.$ac_ext <<EOF
13559 #line 13560 "configure"
13560 #include "confdefs.h"
13561 /* Override any gcc2 internal prototype to avoid an error.  */
13562 /* We use char because int might match the return type of a gcc2
13563     builtin and then its argument prototype would still apply.  */
13564 char tputs();
13565
13566 int main() {
13567 tputs()
13568 ; return 0; }
13569 EOF
13570 if { (eval echo configure:13571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13571   rm -rf conftest*
13572   eval "ac_cv_lib_$ac_lib_var=yes"
13573 else
13574   echo "configure: failed program was:" >&5
13575   cat conftest.$ac_ext >&5
13576   rm -rf conftest*
13577   eval "ac_cv_lib_$ac_lib_var=no"
13578 fi
13579 rm -f conftest*
13580 LIBS="$ac_save_LIBS"
13581
13582 fi
13583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13584   echo "$ac_t""yes" 1>&6
13585   have_termcap=yes
13586 else
13587   echo "$ac_t""no" 1>&6
13588 have_termcap=no
13589 fi
13590
13591         if test $have_termcap = yes ; then
13592                 cat >> confdefs.h <<\EOF
13593 #define HAVE_TERMCAP 1
13594 EOF
13595
13596                 ol_link_termcap=yes
13597                 TERMCAP_LIBS=-ltermcap
13598         fi
13599 fi
13600
13601 if test $ol_link_termcap = no ; then
13602         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13603 echo "configure:13604: checking for initscr in -lncurses" >&5
13604 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13605 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13606   echo $ac_n "(cached) $ac_c" 1>&6
13607 else
13608   ac_save_LIBS="$LIBS"
13609 LIBS="-lncurses  $LIBS"
13610 cat > conftest.$ac_ext <<EOF
13611 #line 13612 "configure"
13612 #include "confdefs.h"
13613 /* Override any gcc2 internal prototype to avoid an error.  */
13614 /* We use char because int might match the return type of a gcc2
13615     builtin and then its argument prototype would still apply.  */
13616 char initscr();
13617
13618 int main() {
13619 initscr()
13620 ; return 0; }
13621 EOF
13622 if { (eval echo configure:13623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13623   rm -rf conftest*
13624   eval "ac_cv_lib_$ac_lib_var=yes"
13625 else
13626   echo "configure: failed program was:" >&5
13627   cat conftest.$ac_ext >&5
13628   rm -rf conftest*
13629   eval "ac_cv_lib_$ac_lib_var=no"
13630 fi
13631 rm -f conftest*
13632 LIBS="$ac_save_LIBS"
13633
13634 fi
13635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13636   echo "$ac_t""yes" 1>&6
13637   have_ncurses=yes
13638 else
13639   echo "$ac_t""no" 1>&6
13640 have_ncurses=no
13641 fi
13642
13643         if test $have_ncurses = yes ; then
13644                 cat >> confdefs.h <<\EOF
13645 #define HAVE_NCURSES 1
13646 EOF
13647
13648                 ol_link_termcap=yes
13649                 TERMCAP_LIBS=-lncurses
13650         fi
13651 fi
13652
13653 if test $ol_link_termcap = no ; then
13654         cat >> confdefs.h <<\EOF
13655 #define NO_TERMCAP 1
13656 EOF
13657
13658         TERMCAP_LIBS=
13659 fi
13660
13661 ol_link_sasl=no
13662 ol_link_spasswd=no
13663 if test $ol_with_cyrus_sasl != no ; then
13664         for ac_hdr in sasl.h
13665 do
13666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13668 echo "configure:13669: checking for $ac_hdr" >&5
13669 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13670   echo $ac_n "(cached) $ac_c" 1>&6
13671 else
13672   cat > conftest.$ac_ext <<EOF
13673 #line 13674 "configure"
13674 #include "confdefs.h"
13675 #include <$ac_hdr>
13676 EOF
13677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13678 { (eval echo configure:13679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13680 if test -z "$ac_err"; then
13681   rm -rf conftest*
13682   eval "ac_cv_header_$ac_safe=yes"
13683 else
13684   echo "$ac_err" >&5
13685   echo "configure: failed program was:" >&5
13686   cat conftest.$ac_ext >&5
13687   rm -rf conftest*
13688   eval "ac_cv_header_$ac_safe=no"
13689 fi
13690 rm -f conftest*
13691 fi
13692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13693   echo "$ac_t""yes" 1>&6
13694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13695   cat >> confdefs.h <<EOF
13696 #define $ac_tr_hdr 1
13697 EOF
13698  
13699 else
13700   echo "$ac_t""no" 1>&6
13701 fi
13702 done
13703
13704
13705         if test $ac_cv_header_sasl_h = yes ; then
13706                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13707 echo "configure:13708: checking for sasl_client_init in -lsasl" >&5
13708 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13709 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13710   echo $ac_n "(cached) $ac_c" 1>&6
13711 else
13712   ac_save_LIBS="$LIBS"
13713 LIBS="-lsasl  $LIBS"
13714 cat > conftest.$ac_ext <<EOF
13715 #line 13716 "configure"
13716 #include "confdefs.h"
13717 /* Override any gcc2 internal prototype to avoid an error.  */
13718 /* We use char because int might match the return type of a gcc2
13719     builtin and then its argument prototype would still apply.  */
13720 char sasl_client_init();
13721
13722 int main() {
13723 sasl_client_init()
13724 ; return 0; }
13725 EOF
13726 if { (eval echo configure:13727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13727   rm -rf conftest*
13728   eval "ac_cv_lib_$ac_lib_var=yes"
13729 else
13730   echo "configure: failed program was:" >&5
13731   cat conftest.$ac_ext >&5
13732   rm -rf conftest*
13733   eval "ac_cv_lib_$ac_lib_var=no"
13734 fi
13735 rm -f conftest*
13736 LIBS="$ac_save_LIBS"
13737
13738 fi
13739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13740   echo "$ac_t""yes" 1>&6
13741   have_cyrus_sasl=yes
13742 else
13743   echo "$ac_t""no" 1>&6
13744 have_cyrus_sasl=no
13745 fi
13746
13747
13748                 if test $have_cyrus_sasl != no ; then
13749                         SASL_LIBS="-lsasl"
13750                         cat >> confdefs.h <<\EOF
13751 #define HAVE_CYRUS_SASL 1
13752 EOF
13753
13754                         ol_link_sasl=yes
13755                 fi
13756         fi
13757
13758         if test $ol_link_sasl = no ; then
13759                 if test $ol_with_cyrus_sasl != auto ; then
13760                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13761                 else
13762                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13763                         echo "configure: warning: SASL authentication not supported!" 1>&2
13764                         if test $ol_link_tls = no ; then
13765                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13766                         fi
13767                 fi
13768
13769         elif test $ol_enable_spasswd != no ; then
13770                 ol_link_spasswd=yes
13771         fi
13772
13773 else
13774         echo "configure: warning: SASL authentication not supported!" 1>&2
13775         if test $ol_link_tls = no ; then
13776                 echo "configure: warning: Strong authentication not supported!" 1>&2
13777         fi
13778 fi
13779
13780 if test $cross_compiling != yes ; then
13781         dev=no
13782         if test -r /dev/urandom ; then
13783                 dev="/dev/urandom";
13784         elif test -r /idev/urandom ; then
13785                 dev="/idev/urandom";
13786         elif test -r /dev/srandom ; then
13787                 dev="/dev/srandom";
13788         elif test -r /dev/random ; then
13789                 dev="/dev/random";
13790         elif test -r /idev/random ; then
13791                 dev="/idev/random";
13792         fi
13793
13794         if test $dev != no ; then
13795                 cat >> confdefs.h <<EOF
13796 #define URANDOM_DEVICE "$dev"
13797 EOF
13798
13799         fi
13800 fi
13801
13802 ol_link_fetch=no
13803 if test $ol_with_fetch != no ; then
13804         ol_LIBS=$LIBS
13805 LIBS="-lfetch -lcom_err $LIBS"
13806 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13807 echo "configure:13808: checking fetch(3) library" >&5
13808 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13809   echo $ac_n "(cached) $ac_c" 1>&6
13810 else
13811   
13812         cat > conftest.$ac_ext <<EOF
13813 #line 13814 "configure"
13814 #include "confdefs.h"
13815
13816 #include <sys/param.h>
13817 #include <stdio.h>
13818 #include <fetch.h>
13819 int main() {
13820 struct url *u = fetchParseURL("file:///"); 
13821 ; return 0; }
13822 EOF
13823 if { (eval echo configure:13824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13824   rm -rf conftest*
13825   ol_cv_lib_fetch=yes
13826 else
13827   echo "configure: failed program was:" >&5
13828   cat conftest.$ac_ext >&5
13829   rm -rf conftest*
13830   ol_cv_lib_fetch=no
13831 fi
13832 rm -f conftest*
13833 fi
13834
13835 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13836 LIBS=$ol_LIBS
13837 if test $ol_cv_lib_fetch != no ; then
13838         ol_link_fetch="-lfetch -lcom_err"
13839         cat >> confdefs.h <<\EOF
13840 #define HAVE_FETCH 1
13841 EOF
13842
13843 fi
13844
13845
13846         if test $ol_cv_lib_fetch != no ; then
13847                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13848                 ol_link_fetch=freebsd
13849
13850         elif test $ol_with_fetch != auto ; then
13851                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13852         fi 
13853 fi
13854
13855 ol_link_readline=no
13856 if test $ol_with_readline != no ; then
13857         for ac_hdr in readline/readline.h readline/history.h
13858 do
13859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13861 echo "configure:13862: checking for $ac_hdr" >&5
13862 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13863   echo $ac_n "(cached) $ac_c" 1>&6
13864 else
13865   cat > conftest.$ac_ext <<EOF
13866 #line 13867 "configure"
13867 #include "confdefs.h"
13868 #include <$ac_hdr>
13869 EOF
13870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13871 { (eval echo configure:13872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13873 if test -z "$ac_err"; then
13874   rm -rf conftest*
13875   eval "ac_cv_header_$ac_safe=yes"
13876 else
13877   echo "$ac_err" >&5
13878   echo "configure: failed program was:" >&5
13879   cat conftest.$ac_ext >&5
13880   rm -rf conftest*
13881   eval "ac_cv_header_$ac_safe=no"
13882 fi
13883 rm -f conftest*
13884 fi
13885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13886   echo "$ac_t""yes" 1>&6
13887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13888   cat >> confdefs.h <<EOF
13889 #define $ac_tr_hdr 1
13890 EOF
13891  
13892 else
13893   echo "$ac_t""no" 1>&6
13894 fi
13895 done
13896
13897
13898         if test $ac_cv_header_readline_readline_h = yes ; then
13899                 save_LIBS="$LIBS"
13900                 LIBS="$TERMCAP_LIBS $LIBS"
13901                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13902 echo "configure:13903: checking for readline in -lreadline" >&5
13903 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13905   echo $ac_n "(cached) $ac_c" 1>&6
13906 else
13907   ac_save_LIBS="$LIBS"
13908 LIBS="-lreadline  $LIBS"
13909 cat > conftest.$ac_ext <<EOF
13910 #line 13911 "configure"
13911 #include "confdefs.h"
13912 /* Override any gcc2 internal prototype to avoid an error.  */
13913 /* We use char because int might match the return type of a gcc2
13914     builtin and then its argument prototype would still apply.  */
13915 char readline();
13916
13917 int main() {
13918 readline()
13919 ; return 0; }
13920 EOF
13921 if { (eval echo configure:13922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13922   rm -rf conftest*
13923   eval "ac_cv_lib_$ac_lib_var=yes"
13924 else
13925   echo "configure: failed program was:" >&5
13926   cat conftest.$ac_ext >&5
13927   rm -rf conftest*
13928   eval "ac_cv_lib_$ac_lib_var=no"
13929 fi
13930 rm -f conftest*
13931 LIBS="$ac_save_LIBS"
13932
13933 fi
13934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13935   echo "$ac_t""yes" 1>&6
13936   have_readline=yes
13937 else
13938   echo "$ac_t""no" 1>&6
13939 have_readline=no
13940 fi
13941
13942                 LIBS="$save_LIBS"
13943                         
13944                 if test $have_readline = yes ; then
13945                         ol_with_readline=found
13946                         ol_link_readline=yes
13947
13948                         READLINE_LIBS="-lreadline"
13949                 fi
13950         fi
13951 fi
13952
13953 if test $ol_link_readline = yes ; then
13954         cat >> confdefs.h <<\EOF
13955 #define HAVE_READLINE 1
13956 EOF
13957
13958 fi
13959
13960
13961 if test $ol_enable_crypt != no ; then
13962         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13963 echo "configure:13964: checking for crypt" >&5
13964 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13965   echo $ac_n "(cached) $ac_c" 1>&6
13966 else
13967   cat > conftest.$ac_ext <<EOF
13968 #line 13969 "configure"
13969 #include "confdefs.h"
13970 /* System header to define __stub macros and hopefully few prototypes,
13971     which can conflict with char crypt(); below.  */
13972 #include <assert.h>
13973 /* Override any gcc2 internal prototype to avoid an error.  */
13974 /* We use char because int might match the return type of a gcc2
13975     builtin and then its argument prototype would still apply.  */
13976 char crypt();
13977 char (*f)();
13978
13979 int main() {
13980
13981 /* The GNU C library defines this for functions which it implements
13982     to always fail with ENOSYS.  Some functions are actually named
13983     something starting with __ and the normal name is an alias.  */
13984 #if defined (__stub_crypt) || defined (__stub___crypt)
13985 choke me
13986 #else
13987 f = crypt;
13988 #endif
13989
13990 ; return 0; }
13991 EOF
13992 if { (eval echo configure:13993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13993   rm -rf conftest*
13994   eval "ac_cv_func_crypt=yes"
13995 else
13996   echo "configure: failed program was:" >&5
13997   cat conftest.$ac_ext >&5
13998   rm -rf conftest*
13999   eval "ac_cv_func_crypt=no"
14000 fi
14001 rm -f conftest*
14002 fi
14003
14004 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
14005   echo "$ac_t""yes" 1>&6
14006   have_crypt=yes
14007 else
14008   echo "$ac_t""no" 1>&6
14009
14010                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14011 echo "configure:14012: checking for crypt in -lcrypt" >&5
14012 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14014   echo $ac_n "(cached) $ac_c" 1>&6
14015 else
14016   ac_save_LIBS="$LIBS"
14017 LIBS="-lcrypt  $LIBS"
14018 cat > conftest.$ac_ext <<EOF
14019 #line 14020 "configure"
14020 #include "confdefs.h"
14021 /* Override any gcc2 internal prototype to avoid an error.  */
14022 /* We use char because int might match the return type of a gcc2
14023     builtin and then its argument prototype would still apply.  */
14024 char crypt();
14025
14026 int main() {
14027 crypt()
14028 ; return 0; }
14029 EOF
14030 if { (eval echo configure:14031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14031   rm -rf conftest*
14032   eval "ac_cv_lib_$ac_lib_var=yes"
14033 else
14034   echo "configure: failed program was:" >&5
14035   cat conftest.$ac_ext >&5
14036   rm -rf conftest*
14037   eval "ac_cv_lib_$ac_lib_var=no"
14038 fi
14039 rm -f conftest*
14040 LIBS="$ac_save_LIBS"
14041
14042 fi
14043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14044   echo "$ac_t""yes" 1>&6
14045   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14046                         have_crypt=yes
14047 else
14048   echo "$ac_t""no" 1>&6
14049 have_crypt=no
14050 fi
14051
14052 fi
14053
14054
14055         if test $have_crypt = yes ; then
14056                 cat >> confdefs.h <<\EOF
14057 #define HAVE_CRYPT 1
14058 EOF
14059
14060         else
14061                 echo "configure: warning: could not find crypt" 1>&2
14062                 if test $ol_enable_crypt = yes ; then
14063                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14064                 fi
14065
14066                 echo "configure: warning: disabling crypt support" 1>&2
14067                 ol_enable_crypt=no
14068         fi
14069 fi
14070
14071 if test $ol_enable_proctitle != no ; then
14072         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14073 echo "configure:14074: checking for setproctitle" >&5
14074 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14075   echo $ac_n "(cached) $ac_c" 1>&6
14076 else
14077   cat > conftest.$ac_ext <<EOF
14078 #line 14079 "configure"
14079 #include "confdefs.h"
14080 /* System header to define __stub macros and hopefully few prototypes,
14081     which can conflict with char setproctitle(); below.  */
14082 #include <assert.h>
14083 /* Override any gcc2 internal prototype to avoid an error.  */
14084 /* We use char because int might match the return type of a gcc2
14085     builtin and then its argument prototype would still apply.  */
14086 char setproctitle();
14087 char (*f)();
14088
14089 int main() {
14090
14091 /* The GNU C library defines this for functions which it implements
14092     to always fail with ENOSYS.  Some functions are actually named
14093     something starting with __ and the normal name is an alias.  */
14094 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14095 choke me
14096 #else
14097 f = setproctitle;
14098 #endif
14099
14100 ; return 0; }
14101 EOF
14102 if { (eval echo configure:14103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14103   rm -rf conftest*
14104   eval "ac_cv_func_setproctitle=yes"
14105 else
14106   echo "configure: failed program was:" >&5
14107   cat conftest.$ac_ext >&5
14108   rm -rf conftest*
14109   eval "ac_cv_func_setproctitle=no"
14110 fi
14111 rm -f conftest*
14112 fi
14113
14114 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14115   echo "$ac_t""yes" 1>&6
14116   have_setproctitle=yes
14117 else
14118   echo "$ac_t""no" 1>&6
14119
14120                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14121 echo "configure:14122: checking for setproctitle in -lutil" >&5
14122 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14123 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14124   echo $ac_n "(cached) $ac_c" 1>&6
14125 else
14126   ac_save_LIBS="$LIBS"
14127 LIBS="-lutil  $LIBS"
14128 cat > conftest.$ac_ext <<EOF
14129 #line 14130 "configure"
14130 #include "confdefs.h"
14131 /* Override any gcc2 internal prototype to avoid an error.  */
14132 /* We use char because int might match the return type of a gcc2
14133     builtin and then its argument prototype would still apply.  */
14134 char setproctitle();
14135
14136 int main() {
14137 setproctitle()
14138 ; return 0; }
14139 EOF
14140 if { (eval echo configure:14141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14141   rm -rf conftest*
14142   eval "ac_cv_lib_$ac_lib_var=yes"
14143 else
14144   echo "configure: failed program was:" >&5
14145   cat conftest.$ac_ext >&5
14146   rm -rf conftest*
14147   eval "ac_cv_lib_$ac_lib_var=no"
14148 fi
14149 rm -f conftest*
14150 LIBS="$ac_save_LIBS"
14151
14152 fi
14153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14154   echo "$ac_t""yes" 1>&6
14155   have_setproctitle=yes
14156                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14157 else
14158   echo "$ac_t""no" 1>&6
14159 have_setproctitle=no
14160                         LIBOBJS="$LIBOBJS setproctitle.o"
14161                         LIBSRCS="$LIBSRCS setproctitle.c"
14162 fi
14163
14164 fi
14165
14166
14167         if test $have_setproctitle = yes ; then
14168                 cat >> confdefs.h <<\EOF
14169 #define HAVE_SETPROCTITLE 1
14170 EOF
14171
14172         fi
14173 fi
14174
14175 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14176 echo "configure:14177: checking for ANSI C header files" >&5
14177 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14178   echo $ac_n "(cached) $ac_c" 1>&6
14179 else
14180   cat > conftest.$ac_ext <<EOF
14181 #line 14182 "configure"
14182 #include "confdefs.h"
14183 #include <stdlib.h>
14184 #include <stdarg.h>
14185 #include <string.h>
14186 #include <float.h>
14187 EOF
14188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14189 { (eval echo configure:14190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14191 if test -z "$ac_err"; then
14192   rm -rf conftest*
14193   ac_cv_header_stdc=yes
14194 else
14195   echo "$ac_err" >&5
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -rf conftest*
14199   ac_cv_header_stdc=no
14200 fi
14201 rm -f conftest*
14202
14203 if test $ac_cv_header_stdc = yes; then
14204   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14205 cat > conftest.$ac_ext <<EOF
14206 #line 14207 "configure"
14207 #include "confdefs.h"
14208 #include <string.h>
14209 EOF
14210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14211   egrep "memchr" >/dev/null 2>&1; then
14212   :
14213 else
14214   rm -rf conftest*
14215   ac_cv_header_stdc=no
14216 fi
14217 rm -f conftest*
14218
14219 fi
14220
14221 if test $ac_cv_header_stdc = yes; then
14222   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14223 cat > conftest.$ac_ext <<EOF
14224 #line 14225 "configure"
14225 #include "confdefs.h"
14226 #include <stdlib.h>
14227 EOF
14228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14229   egrep "free" >/dev/null 2>&1; then
14230   :
14231 else
14232   rm -rf conftest*
14233   ac_cv_header_stdc=no
14234 fi
14235 rm -f conftest*
14236
14237 fi
14238
14239 if test $ac_cv_header_stdc = yes; then
14240   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14241 if test "$cross_compiling" = yes; then
14242   :
14243 else
14244   cat > conftest.$ac_ext <<EOF
14245 #line 14246 "configure"
14246 #include "confdefs.h"
14247 #include <ctype.h>
14248 #if ((' ' & 0x0FF) == 0x020)
14249 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14250 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14251 #else
14252 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14253  || ('j' <= (c) && (c) <= 'r') \
14254  || ('s' <= (c) && (c) <= 'z'))
14255 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14256 #endif
14257 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14258 int main () { int i; for (i = 0; i < 256; i++)
14259 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14260 exit (0); }
14261
14262 EOF
14263 if { (eval echo configure:14264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14264 then
14265   :
14266 else
14267   echo "configure: failed program was:" >&5
14268   cat conftest.$ac_ext >&5
14269   rm -fr conftest*
14270   ac_cv_header_stdc=no
14271 fi
14272 rm -fr conftest*
14273 fi
14274
14275 fi
14276 fi
14277
14278 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14279 if test $ac_cv_header_stdc = yes; then
14280   cat >> confdefs.h <<\EOF
14281 #define STDC_HEADERS 1
14282 EOF
14283
14284 fi
14285
14286 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14287 echo "configure:14288: checking for mode_t" >&5
14288 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14289   echo $ac_n "(cached) $ac_c" 1>&6
14290 else
14291   cat > conftest.$ac_ext <<EOF
14292 #line 14293 "configure"
14293 #include "confdefs.h"
14294 #include <sys/types.h>
14295 #if STDC_HEADERS
14296 #include <stdlib.h>
14297 #include <stddef.h>
14298 #endif
14299
14300 EOF
14301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14302   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14303   rm -rf conftest*
14304   eval "ac_cv_type_mode_t=yes"
14305 else
14306   rm -rf conftest*
14307   eval "ac_cv_type_mode_t=no"
14308 fi
14309 rm -f conftest*
14310
14311 fi
14312 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14313   echo "$ac_t""yes" 1>&6
14314 else
14315   echo "$ac_t""no" 1>&6
14316   cat >> confdefs.h <<EOF
14317 #define mode_t int
14318 EOF
14319
14320 fi
14321
14322 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14323 echo "configure:14324: checking for off_t" >&5
14324 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14325   echo $ac_n "(cached) $ac_c" 1>&6
14326 else
14327   cat > conftest.$ac_ext <<EOF
14328 #line 14329 "configure"
14329 #include "confdefs.h"
14330 #include <sys/types.h>
14331 #if STDC_HEADERS
14332 #include <stdlib.h>
14333 #include <stddef.h>
14334 #endif
14335
14336 EOF
14337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14338   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14339   rm -rf conftest*
14340   eval "ac_cv_type_off_t=yes"
14341 else
14342   rm -rf conftest*
14343   eval "ac_cv_type_off_t=no"
14344 fi
14345 rm -f conftest*
14346
14347 fi
14348 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14349   echo "$ac_t""yes" 1>&6
14350 else
14351   echo "$ac_t""no" 1>&6
14352   cat >> confdefs.h <<EOF
14353 #define off_t long
14354 EOF
14355
14356 fi
14357
14358 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14359 echo "configure:14360: checking for pid_t" >&5
14360 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14361   echo $ac_n "(cached) $ac_c" 1>&6
14362 else
14363   cat > conftest.$ac_ext <<EOF
14364 #line 14365 "configure"
14365 #include "confdefs.h"
14366 #include <sys/types.h>
14367 #if STDC_HEADERS
14368 #include <stdlib.h>
14369 #include <stddef.h>
14370 #endif
14371
14372 EOF
14373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14374   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14375   rm -rf conftest*
14376   eval "ac_cv_type_pid_t=yes"
14377 else
14378   rm -rf conftest*
14379   eval "ac_cv_type_pid_t=no"
14380 fi
14381 rm -f conftest*
14382
14383 fi
14384 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14385   echo "$ac_t""yes" 1>&6
14386 else
14387   echo "$ac_t""no" 1>&6
14388   cat >> confdefs.h <<EOF
14389 #define pid_t int
14390 EOF
14391
14392 fi
14393
14394 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14395 echo "configure:14396: checking for ptrdiff_t" >&5
14396 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14397   echo $ac_n "(cached) $ac_c" 1>&6
14398 else
14399   cat > conftest.$ac_ext <<EOF
14400 #line 14401 "configure"
14401 #include "confdefs.h"
14402 #include <stddef.h>
14403 int main() {
14404 ptrdiff_t p
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   am_cv_type_ptrdiff_t=yes
14410 else
14411   echo "configure: failed program was:" >&5
14412   cat conftest.$ac_ext >&5
14413   rm -rf conftest*
14414   am_cv_type_ptrdiff_t=no
14415 fi
14416 rm -f conftest*
14417 fi
14418
14419 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14420    if test $am_cv_type_ptrdiff_t = yes; then
14421      cat >> confdefs.h <<\EOF
14422 #define HAVE_PTRDIFF_T 1
14423 EOF
14424
14425    fi
14426
14427 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14428 echo "configure:14429: checking return type of signal handlers" >&5
14429 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14430   echo $ac_n "(cached) $ac_c" 1>&6
14431 else
14432   cat > conftest.$ac_ext <<EOF
14433 #line 14434 "configure"
14434 #include "confdefs.h"
14435 #include <sys/types.h>
14436 #include <signal.h>
14437 #ifdef signal
14438 #undef signal
14439 #endif
14440 #ifdef __cplusplus
14441 extern "C" void (*signal (int, void (*)(int)))(int);
14442 #else
14443 void (*signal ()) ();
14444 #endif
14445
14446 int main() {
14447 int i;
14448 ; return 0; }
14449 EOF
14450 if { (eval echo configure:14451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14451   rm -rf conftest*
14452   ac_cv_type_signal=void
14453 else
14454   echo "configure: failed program was:" >&5
14455   cat conftest.$ac_ext >&5
14456   rm -rf conftest*
14457   ac_cv_type_signal=int
14458 fi
14459 rm -f conftest*
14460 fi
14461
14462 echo "$ac_t""$ac_cv_type_signal" 1>&6
14463 cat >> confdefs.h <<EOF
14464 #define RETSIGTYPE $ac_cv_type_signal
14465 EOF
14466
14467
14468 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14469 echo "configure:14470: checking for size_t" >&5
14470 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14471   echo $ac_n "(cached) $ac_c" 1>&6
14472 else
14473   cat > conftest.$ac_ext <<EOF
14474 #line 14475 "configure"
14475 #include "confdefs.h"
14476 #include <sys/types.h>
14477 #if STDC_HEADERS
14478 #include <stdlib.h>
14479 #include <stddef.h>
14480 #endif
14481
14482 EOF
14483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14484   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14485   rm -rf conftest*
14486   eval "ac_cv_type_size_t=yes"
14487 else
14488   rm -rf conftest*
14489   eval "ac_cv_type_size_t=no"
14490 fi
14491 rm -f conftest*
14492
14493 fi
14494 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14495   echo "$ac_t""yes" 1>&6
14496 else
14497   echo "$ac_t""no" 1>&6
14498   cat >> confdefs.h <<EOF
14499 #define size_t unsigned
14500 EOF
14501
14502 fi
14503
14504
14505 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14506 echo "configure:14507: checking for ssize_t" >&5
14507 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14508   echo $ac_n "(cached) $ac_c" 1>&6
14509 else
14510   cat > conftest.$ac_ext <<EOF
14511 #line 14512 "configure"
14512 #include "confdefs.h"
14513 #include <sys/types.h>
14514 #if STDC_HEADERS
14515 #include <stdlib.h>
14516 #include <stddef.h>
14517 #endif
14518
14519 EOF
14520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14521   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14522   rm -rf conftest*
14523   eval "ac_cv_type_ssize_t=yes"
14524 else
14525   rm -rf conftest*
14526   eval "ac_cv_type_ssize_t=no"
14527 fi
14528 rm -f conftest*
14529
14530 fi
14531 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14532   echo "$ac_t""yes" 1>&6
14533 else
14534   echo "$ac_t""no" 1>&6
14535   cat >> confdefs.h <<EOF
14536 #define ssize_t signed int
14537 EOF
14538
14539 fi
14540
14541 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14542 echo "configure:14543: checking for caddr_t" >&5
14543 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14544   echo $ac_n "(cached) $ac_c" 1>&6
14545 else
14546   cat > conftest.$ac_ext <<EOF
14547 #line 14548 "configure"
14548 #include "confdefs.h"
14549 #include <sys/types.h>
14550 #if STDC_HEADERS
14551 #include <stdlib.h>
14552 #include <stddef.h>
14553 #endif
14554
14555 EOF
14556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14557   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14558   rm -rf conftest*
14559   eval "ac_cv_type_caddr_t=yes"
14560 else
14561   rm -rf conftest*
14562   eval "ac_cv_type_caddr_t=no"
14563 fi
14564 rm -f conftest*
14565
14566 fi
14567 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14568   echo "$ac_t""yes" 1>&6
14569 else
14570   echo "$ac_t""no" 1>&6
14571   cat >> confdefs.h <<EOF
14572 #define caddr_t char *
14573 EOF
14574
14575 fi
14576
14577
14578 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14579 echo "configure:14580: checking for socklen_t" >&5
14580 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14581   echo $ac_n "(cached) $ac_c" 1>&6
14582 else
14583   cat > conftest.$ac_ext <<EOF
14584 #line 14585 "configure"
14585 #include "confdefs.h"
14586
14587 #ifdef HAVE_SYS_TYPES_H
14588 #include <sys/types.h>
14589 #endif
14590 #ifdef HAVE_SYS_SOCKET_H
14591 #include <sys/socket.h>
14592 #endif
14593
14594 int main() {
14595 socklen_t len;
14596 ; return 0; }
14597 EOF
14598 if { (eval echo configure:14599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14599   rm -rf conftest*
14600   ol_cv_type_socklen_t=yes
14601 else
14602   echo "configure: failed program was:" >&5
14603   cat conftest.$ac_ext >&5
14604   rm -rf conftest*
14605   ol_cv_type_socklen_t=no
14606 fi
14607 rm -f conftest*
14608 fi
14609
14610 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14611   if test $ol_cv_type_socklen_t = no; then
14612     cat >> confdefs.h <<\EOF
14613 #define socklen_t int
14614 EOF
14615
14616   fi
14617  
14618 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14619 echo "configure:14620: checking for member st_blksize in aggregate type struct stat" >&5
14620 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14621   echo $ac_n "(cached) $ac_c" 1>&6
14622 else
14623   cat > conftest.$ac_ext <<EOF
14624 #line 14625 "configure"
14625 #include "confdefs.h"
14626 #include <sys/types.h>
14627 #include <sys/stat.h>
14628 int main() {
14629 struct stat foo; foo.st_blksize;
14630 ; return 0; }
14631 EOF
14632 if { (eval echo configure:14633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14633   rm -rf conftest*
14634   ac_cv_c_struct_member_st_blksize=yes
14635 else
14636   echo "configure: failed program was:" >&5
14637   cat conftest.$ac_ext >&5
14638   rm -rf conftest*
14639   ac_cv_c_struct_member_st_blksize=no
14640 fi
14641 rm -f conftest*
14642 fi
14643
14644 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14645 st_blksize="$ac_cv_c_struct_member_st_blksize"
14646 if test $ac_cv_c_struct_member_st_blksize = yes; then
14647   cat >> confdefs.h <<\EOF
14648 #define HAVE_ST_BLKSIZE 1
14649 EOF
14650
14651 fi
14652
14653 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14654 echo "configure:14655: checking whether time.h and sys/time.h may both be included" >&5
14655 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14656   echo $ac_n "(cached) $ac_c" 1>&6
14657 else
14658   cat > conftest.$ac_ext <<EOF
14659 #line 14660 "configure"
14660 #include "confdefs.h"
14661 #include <sys/types.h>
14662 #include <sys/time.h>
14663 #include <time.h>
14664 int main() {
14665 struct tm *tp;
14666 ; return 0; }
14667 EOF
14668 if { (eval echo configure:14669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14669   rm -rf conftest*
14670   ac_cv_header_time=yes
14671 else
14672   echo "configure: failed program was:" >&5
14673   cat conftest.$ac_ext >&5
14674   rm -rf conftest*
14675   ac_cv_header_time=no
14676 fi
14677 rm -f conftest*
14678 fi
14679
14680 echo "$ac_t""$ac_cv_header_time" 1>&6
14681 if test $ac_cv_header_time = yes; then
14682   cat >> confdefs.h <<\EOF
14683 #define TIME_WITH_SYS_TIME 1
14684 EOF
14685
14686 fi
14687
14688 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14689 echo "configure:14690: checking whether struct tm is in sys/time.h or time.h" >&5
14690 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14691   echo $ac_n "(cached) $ac_c" 1>&6
14692 else
14693   cat > conftest.$ac_ext <<EOF
14694 #line 14695 "configure"
14695 #include "confdefs.h"
14696 #include <sys/types.h>
14697 #include <time.h>
14698 int main() {
14699 struct tm *tp; tp->tm_sec;
14700 ; return 0; }
14701 EOF
14702 if { (eval echo configure:14703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14703   rm -rf conftest*
14704   ac_cv_struct_tm=time.h
14705 else
14706   echo "configure: failed program was:" >&5
14707   cat conftest.$ac_ext >&5
14708   rm -rf conftest*
14709   ac_cv_struct_tm=sys/time.h
14710 fi
14711 rm -f conftest*
14712 fi
14713
14714 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14715 if test $ac_cv_struct_tm = sys/time.h; then
14716   cat >> confdefs.h <<\EOF
14717 #define TM_IN_SYS_TIME 1
14718 EOF
14719
14720 fi
14721
14722 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14723 echo "configure:14724: checking for uid_t in sys/types.h" >&5
14724 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14725   echo $ac_n "(cached) $ac_c" 1>&6
14726 else
14727   cat > conftest.$ac_ext <<EOF
14728 #line 14729 "configure"
14729 #include "confdefs.h"
14730 #include <sys/types.h>
14731 EOF
14732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14733   egrep "uid_t" >/dev/null 2>&1; then
14734   rm -rf conftest*
14735   ac_cv_type_uid_t=yes
14736 else
14737   rm -rf conftest*
14738   ac_cv_type_uid_t=no
14739 fi
14740 rm -f conftest*
14741
14742 fi
14743
14744 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14745 if test $ac_cv_type_uid_t = no; then
14746   cat >> confdefs.h <<\EOF
14747 #define uid_t int
14748 EOF
14749
14750   cat >> confdefs.h <<\EOF
14751 #define gid_t int
14752 EOF
14753
14754 fi
14755
14756 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14757 echo "configure:14758: checking for sig_atomic_t" >&5
14758 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14759   echo $ac_n "(cached) $ac_c" 1>&6
14760 else
14761   cat > conftest.$ac_ext <<EOF
14762 #line 14763 "configure"
14763 #include "confdefs.h"
14764 #include <signal.h>
14765 int main() {
14766 sig_atomic_t atomic;
14767 ; return 0; }
14768 EOF
14769 if { (eval echo configure:14770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14770   rm -rf conftest*
14771   ol_cv_type_sig_atomic_t=yes
14772 else
14773   echo "configure: failed program was:" >&5
14774   cat conftest.$ac_ext >&5
14775   rm -rf conftest*
14776   ol_cv_type_sig_atomic_t=no
14777 fi
14778 rm -f conftest*
14779 fi
14780
14781 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14782   if test $ol_cv_type_sig_atomic_t = no; then
14783     cat >> confdefs.h <<\EOF
14784 #define sig_atomic_t int
14785 EOF
14786
14787   fi
14788  
14789
14790
14791 # test for pw_gecos in struct passwd
14792 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14793 echo "configure:14794: checking struct passwd for pw_gecos" >&5
14794 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14795   echo $ac_n "(cached) $ac_c" 1>&6
14796 else
14797   
14798         cat > conftest.$ac_ext <<EOF
14799 #line 14800 "configure"
14800 #include "confdefs.h"
14801 #include <pwd.h>
14802 int main() {
14803
14804         struct passwd pwd;
14805         pwd.pw_gecos = pwd.pw_name;
14806
14807 ; return 0; }
14808 EOF
14809 if { (eval echo configure:14810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14810   rm -rf conftest*
14811   ol_cv_struct_passwd_pw_gecos=yes
14812 else
14813   echo "configure: failed program was:" >&5
14814   cat conftest.$ac_ext >&5
14815   rm -rf conftest*
14816   ol_cv_struct_passwd_pw_gecos=no
14817 fi
14818 rm -f conftest*
14819 fi
14820
14821 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14822 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14823         cat >> confdefs.h <<\EOF
14824 #define HAVE_PW_GECOS 1
14825 EOF
14826
14827 fi
14828
14829 # test for pw_passwd in struct passwd
14830 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14831 echo "configure:14832: checking struct passwd for pw_passwd" >&5
14832 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14833   echo $ac_n "(cached) $ac_c" 1>&6
14834 else
14835   
14836         cat > conftest.$ac_ext <<EOF
14837 #line 14838 "configure"
14838 #include "confdefs.h"
14839 #include <pwd.h>
14840 int main() {
14841
14842         struct passwd pwd;
14843         pwd.pw_passwd = pwd.pw_name;
14844
14845 ; return 0; }
14846 EOF
14847 if { (eval echo configure:14848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14848   rm -rf conftest*
14849   ol_cv_struct_passwd_pw_passwd=yes
14850 else
14851   echo "configure: failed program was:" >&5
14852   cat conftest.$ac_ext >&5
14853   rm -rf conftest*
14854   ol_cv_struct_passwd_pw_passwd=no
14855 fi
14856 rm -f conftest*
14857 fi
14858
14859 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14860 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14861         cat >> confdefs.h <<\EOF
14862 #define HAVE_PW_PASSWD 1
14863 EOF
14864
14865 fi
14866
14867
14868 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14869 echo "configure:14870: checking if toupper() requires islower()" >&5
14870 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14871   echo $ac_n "(cached) $ac_c" 1>&6
14872 else
14873   
14874         if test "$cross_compiling" = yes; then
14875   ol_cv_c_upper_lower=safe
14876 else
14877   cat > conftest.$ac_ext <<EOF
14878 #line 14879 "configure"
14879 #include "confdefs.h"
14880
14881 #include <ctype.h>
14882 main()
14883 {
14884         if ('C' == toupper('C'))
14885                 exit(0);
14886         else
14887                 exit(1);
14888 }
14889 EOF
14890 if { (eval echo configure:14891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14891 then
14892   ol_cv_c_upper_lower=no
14893 else
14894   echo "configure: failed program was:" >&5
14895   cat conftest.$ac_ext >&5
14896   rm -fr conftest*
14897   ol_cv_c_upper_lower=yes
14898 fi
14899 rm -fr conftest*
14900 fi
14901
14902 fi
14903
14904 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14905 if test $ol_cv_c_upper_lower != no ; then
14906         cat >> confdefs.h <<\EOF
14907 #define C_UPPER_LOWER 1
14908 EOF
14909
14910 fi
14911
14912 echo $ac_n "checking for working const""... $ac_c" 1>&6
14913 echo "configure:14914: checking for working const" >&5
14914 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14915   echo $ac_n "(cached) $ac_c" 1>&6
14916 else
14917   cat > conftest.$ac_ext <<EOF
14918 #line 14919 "configure"
14919 #include "confdefs.h"
14920
14921 int main() {
14922
14923 /* Ultrix mips cc rejects this.  */
14924 typedef int charset[2]; const charset x;
14925 /* SunOS 4.1.1 cc rejects this.  */
14926 char const *const *ccp;
14927 char **p;
14928 /* NEC SVR4.0.2 mips cc rejects this.  */
14929 struct point {int x, y;};
14930 static struct point const zero = {0,0};
14931 /* AIX XL C 1.02.0.0 rejects this.
14932    It does not let you subtract one const X* pointer from another in an arm
14933    of an if-expression whose if-part is not a constant expression */
14934 const char *g = "string";
14935 ccp = &g + (g ? g-g : 0);
14936 /* HPUX 7.0 cc rejects these. */
14937 ++ccp;
14938 p = (char**) ccp;
14939 ccp = (char const *const *) p;
14940 { /* SCO 3.2v4 cc rejects this.  */
14941   char *t;
14942   char const *s = 0 ? (char *) 0 : (char const *) 0;
14943
14944   *t++ = 0;
14945 }
14946 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14947   int x[] = {25, 17};
14948   const int *foo = &x[0];
14949   ++foo;
14950 }
14951 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14952   typedef const int *iptr;
14953   iptr p = 0;
14954   ++p;
14955 }
14956 { /* AIX XL C 1.02.0.0 rejects this saying
14957      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14958   struct s { int j; const int *ap[3]; };
14959   struct s *b; b->j = 5;
14960 }
14961 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14962   const int foo = 10;
14963 }
14964
14965 ; return 0; }
14966 EOF
14967 if { (eval echo configure:14968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14968   rm -rf conftest*
14969   ac_cv_c_const=yes
14970 else
14971   echo "configure: failed program was:" >&5
14972   cat conftest.$ac_ext >&5
14973   rm -rf conftest*
14974   ac_cv_c_const=no
14975 fi
14976 rm -f conftest*
14977 fi
14978
14979 echo "$ac_t""$ac_cv_c_const" 1>&6
14980 if test $ac_cv_c_const = no; then
14981   cat >> confdefs.h <<\EOF
14982 #define const 
14983 EOF
14984
14985 fi
14986
14987 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14988 echo "configure:14989: checking if compiler understands volatile" >&5
14989 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14990   echo $ac_n "(cached) $ac_c" 1>&6
14991 else
14992   cat > conftest.$ac_ext <<EOF
14993 #line 14994 "configure"
14994 #include "confdefs.h"
14995 int x, y, z;
14996 int main() {
14997 volatile int a; int * volatile b = x ? &y : &z;
14998       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14999       *b = 0;
15000 ; return 0; }
15001 EOF
15002 if { (eval echo configure:15003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15003   rm -rf conftest*
15004   ol_cv_c_volatile=yes
15005 else
15006   echo "configure: failed program was:" >&5
15007   cat conftest.$ac_ext >&5
15008   rm -rf conftest*
15009   ol_cv_c_volatile=no
15010 fi
15011 rm -f conftest*
15012 fi
15013
15014 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15015   if test $ol_cv_c_volatile = yes; then
15016     : 
15017   else
15018     cat >> confdefs.h <<\EOF
15019 #define volatile 
15020 EOF
15021
15022   fi
15023  
15024
15025 if test $cross_compiling = yes ; then
15026         cat >> confdefs.h <<\EOF
15027 #define CROSS_COMPILING 1
15028 EOF
15029
15030 else
15031         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15032 echo "configure:15033: checking whether byte ordering is bigendian" >&5
15033 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15034   echo $ac_n "(cached) $ac_c" 1>&6
15035 else
15036   ac_cv_c_bigendian=unknown
15037 # See if sys/param.h defines the BYTE_ORDER macro.
15038 cat > conftest.$ac_ext <<EOF
15039 #line 15040 "configure"
15040 #include "confdefs.h"
15041 #include <sys/types.h>
15042 #include <sys/param.h>
15043 int main() {
15044
15045 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15046  bogus endian macros
15047 #endif
15048 ; return 0; }
15049 EOF
15050 if { (eval echo configure:15051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15051   rm -rf conftest*
15052   # It does; now see whether it defined to BIG_ENDIAN or not.
15053 cat > conftest.$ac_ext <<EOF
15054 #line 15055 "configure"
15055 #include "confdefs.h"
15056 #include <sys/types.h>
15057 #include <sys/param.h>
15058 int main() {
15059
15060 #if BYTE_ORDER != BIG_ENDIAN
15061  not big endian
15062 #endif
15063 ; return 0; }
15064 EOF
15065 if { (eval echo configure:15066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15066   rm -rf conftest*
15067   ac_cv_c_bigendian=yes
15068 else
15069   echo "configure: failed program was:" >&5
15070   cat conftest.$ac_ext >&5
15071   rm -rf conftest*
15072   ac_cv_c_bigendian=no
15073 fi
15074 rm -f conftest*
15075 else
15076   echo "configure: failed program was:" >&5
15077   cat conftest.$ac_ext >&5
15078 fi
15079 rm -f conftest*
15080 if test $ac_cv_c_bigendian = unknown; then
15081 if test "$cross_compiling" = yes; then
15082     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15083 else
15084   cat > conftest.$ac_ext <<EOF
15085 #line 15086 "configure"
15086 #include "confdefs.h"
15087 main () {
15088   /* Are we little or big endian?  From Harbison&Steele.  */
15089   union
15090   {
15091     long l;
15092     char c[sizeof (long)];
15093   } u;
15094   u.l = 1;
15095   exit (u.c[sizeof (long) - 1] == 1);
15096 }
15097 EOF
15098 if { (eval echo configure:15099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15099 then
15100   ac_cv_c_bigendian=no
15101 else
15102   echo "configure: failed program was:" >&5
15103   cat conftest.$ac_ext >&5
15104   rm -fr conftest*
15105   ac_cv_c_bigendian=yes
15106 fi
15107 rm -fr conftest*
15108 fi
15109
15110 fi
15111 fi
15112
15113 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15114 if test $ac_cv_c_bigendian = yes; then
15115   cat >> confdefs.h <<\EOF
15116 #define WORDS_BIGENDIAN 1
15117 EOF
15118
15119 fi
15120
15121 fi
15122
15123 echo $ac_n "checking size of short""... $ac_c" 1>&6
15124 echo "configure:15125: checking size of short" >&5 
15125 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15126   echo $ac_n "(cached) $ac_c" 1>&6
15127 else
15128   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15129   cat > conftest.$ac_ext <<EOF
15130 #line 15131 "configure"
15131 #include "confdefs.h"
15132 #include "confdefs.h" 
15133 #include <sys/types.h> 
15134  
15135
15136 int main() {
15137 switch (0) case 0: case (sizeof (short) == $ac_size):;
15138 ; return 0; }
15139 EOF
15140 if { (eval echo configure:15141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15141   rm -rf conftest*
15142   ac_cv_sizeof_short=$ac_size
15143 else
15144   echo "configure: failed program was:" >&5
15145   cat conftest.$ac_ext >&5
15146 fi
15147 rm -f conftest* 
15148   if test x$ac_cv_sizeof_short != x ; then break; fi 
15149 done 
15150
15151 fi
15152  
15153 if test x$ac_cv_sizeof_short = x ; then 
15154   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15155 fi 
15156 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15157 cat >> confdefs.h <<EOF
15158 #define SIZEOF_SHORT $ac_cv_sizeof_short
15159 EOF
15160  
15161  
15162 echo $ac_n "checking size of int""... $ac_c" 1>&6
15163 echo "configure:15164: checking size of int" >&5 
15164 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15165   echo $ac_n "(cached) $ac_c" 1>&6
15166 else
15167   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15168   cat > conftest.$ac_ext <<EOF
15169 #line 15170 "configure"
15170 #include "confdefs.h"
15171 #include "confdefs.h" 
15172 #include <sys/types.h> 
15173  
15174
15175 int main() {
15176 switch (0) case 0: case (sizeof (int) == $ac_size):;
15177 ; return 0; }
15178 EOF
15179 if { (eval echo configure:15180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15180   rm -rf conftest*
15181   ac_cv_sizeof_int=$ac_size
15182 else
15183   echo "configure: failed program was:" >&5
15184   cat conftest.$ac_ext >&5
15185 fi
15186 rm -f conftest* 
15187   if test x$ac_cv_sizeof_int != x ; then break; fi 
15188 done 
15189
15190 fi
15191  
15192 if test x$ac_cv_sizeof_int = x ; then 
15193   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15194 fi 
15195 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15196 cat >> confdefs.h <<EOF
15197 #define SIZEOF_INT $ac_cv_sizeof_int
15198 EOF
15199  
15200  
15201 echo $ac_n "checking size of long""... $ac_c" 1>&6
15202 echo "configure:15203: checking size of long" >&5 
15203 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15204   echo $ac_n "(cached) $ac_c" 1>&6
15205 else
15206   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15207   cat > conftest.$ac_ext <<EOF
15208 #line 15209 "configure"
15209 #include "confdefs.h"
15210 #include "confdefs.h" 
15211 #include <sys/types.h> 
15212  
15213
15214 int main() {
15215 switch (0) case 0: case (sizeof (long) == $ac_size):;
15216 ; return 0; }
15217 EOF
15218 if { (eval echo configure:15219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15219   rm -rf conftest*
15220   ac_cv_sizeof_long=$ac_size
15221 else
15222   echo "configure: failed program was:" >&5
15223   cat conftest.$ac_ext >&5
15224 fi
15225 rm -f conftest* 
15226   if test x$ac_cv_sizeof_long != x ; then break; fi 
15227 done 
15228
15229 fi
15230  
15231 if test x$ac_cv_sizeof_long = x ; then 
15232   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15233 fi 
15234 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15235 cat >> confdefs.h <<EOF
15236 #define SIZEOF_LONG $ac_cv_sizeof_long
15237 EOF
15238  
15239
15240
15241 if test "$ac_cv_sizeof_int" -lt 4 ; then
15242         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15243
15244         cat >> confdefs.h <<\EOF
15245 #define LBER_INT_T long
15246 EOF
15247
15248 else
15249         cat >> confdefs.h <<\EOF
15250 #define LBER_INT_T int
15251 EOF
15252
15253 fi
15254
15255 cat >> confdefs.h <<\EOF
15256 #define LBER_LEN_T long
15257 EOF
15258
15259 cat >> confdefs.h <<\EOF
15260 #define LBER_SOCKET_T int
15261 EOF
15262
15263 cat >> confdefs.h <<\EOF
15264 #define LBER_TAG_T long
15265 EOF
15266
15267
15268 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15269 echo "configure:15270: checking for 8-bit clean memcmp" >&5
15270 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15271   echo $ac_n "(cached) $ac_c" 1>&6
15272 else
15273   if test "$cross_compiling" = yes; then
15274   ac_cv_func_memcmp_clean=no
15275 else
15276   cat > conftest.$ac_ext <<EOF
15277 #line 15278 "configure"
15278 #include "confdefs.h"
15279
15280 main()
15281 {
15282   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15283   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15284 }
15285
15286 EOF
15287 if { (eval echo configure:15288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15288 then
15289   ac_cv_func_memcmp_clean=yes
15290 else
15291   echo "configure: failed program was:" >&5
15292   cat conftest.$ac_ext >&5
15293   rm -fr conftest*
15294   ac_cv_func_memcmp_clean=no
15295 fi
15296 rm -fr conftest*
15297 fi
15298
15299 fi
15300
15301 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15302 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15303
15304 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15305 echo "configure:15306: checking for strftime" >&5
15306 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15307   echo $ac_n "(cached) $ac_c" 1>&6
15308 else
15309   cat > conftest.$ac_ext <<EOF
15310 #line 15311 "configure"
15311 #include "confdefs.h"
15312 /* System header to define __stub macros and hopefully few prototypes,
15313     which can conflict with char strftime(); below.  */
15314 #include <assert.h>
15315 /* Override any gcc2 internal prototype to avoid an error.  */
15316 /* We use char because int might match the return type of a gcc2
15317     builtin and then its argument prototype would still apply.  */
15318 char strftime();
15319 char (*f)();
15320
15321 int main() {
15322
15323 /* The GNU C library defines this for functions which it implements
15324     to always fail with ENOSYS.  Some functions are actually named
15325     something starting with __ and the normal name is an alias.  */
15326 #if defined (__stub_strftime) || defined (__stub___strftime)
15327 choke me
15328 #else
15329 f = strftime;
15330 #endif
15331
15332 ; return 0; }
15333 EOF
15334 if { (eval echo configure:15335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15335   rm -rf conftest*
15336   eval "ac_cv_func_strftime=yes"
15337 else
15338   echo "configure: failed program was:" >&5
15339   cat conftest.$ac_ext >&5
15340   rm -rf conftest*
15341   eval "ac_cv_func_strftime=no"
15342 fi
15343 rm -f conftest*
15344 fi
15345
15346 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15347   echo "$ac_t""yes" 1>&6
15348   cat >> confdefs.h <<\EOF
15349 #define HAVE_STRFTIME 1
15350 EOF
15351
15352 else
15353   echo "$ac_t""no" 1>&6
15354 # strftime is in -lintl on SCO UNIX.
15355 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15356 echo "configure:15357: checking for strftime in -lintl" >&5
15357 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15359   echo $ac_n "(cached) $ac_c" 1>&6
15360 else
15361   ac_save_LIBS="$LIBS"
15362 LIBS="-lintl  $LIBS"
15363 cat > conftest.$ac_ext <<EOF
15364 #line 15365 "configure"
15365 #include "confdefs.h"
15366 /* Override any gcc2 internal prototype to avoid an error.  */
15367 /* We use char because int might match the return type of a gcc2
15368     builtin and then its argument prototype would still apply.  */
15369 char strftime();
15370
15371 int main() {
15372 strftime()
15373 ; return 0; }
15374 EOF
15375 if { (eval echo configure:15376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15376   rm -rf conftest*
15377   eval "ac_cv_lib_$ac_lib_var=yes"
15378 else
15379   echo "configure: failed program was:" >&5
15380   cat conftest.$ac_ext >&5
15381   rm -rf conftest*
15382   eval "ac_cv_lib_$ac_lib_var=no"
15383 fi
15384 rm -f conftest*
15385 LIBS="$ac_save_LIBS"
15386
15387 fi
15388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15389   echo "$ac_t""yes" 1>&6
15390   cat >> confdefs.h <<\EOF
15391 #define HAVE_STRFTIME 1
15392 EOF
15393
15394 LIBS="-lintl $LIBS"
15395 else
15396   echo "$ac_t""no" 1>&6
15397 fi
15398
15399 fi
15400
15401
15402 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15403 echo "configure:15404: checking for inet_aton()" >&5
15404 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15405   echo $ac_n "(cached) $ac_c" 1>&6
15406 else
15407   cat > conftest.$ac_ext <<EOF
15408 #line 15409 "configure"
15409 #include "confdefs.h"
15410
15411 #ifdef HAVE_SYS_TYPES_H
15412 #       include <sys/types.h>
15413 #endif
15414 #ifdef HAVE_SYS_SOCKET_H
15415 #       include <sys/socket.h>
15416 #       ifdef HAVE_SYS_SELECT_H
15417 #               include <sys/select.h>
15418 #       endif
15419 #       include <netinet/in.h>
15420 #       ifdef HAVE_ARPA_INET_H
15421 #               include <arpa/inet.h>
15422 #       endif
15423 #endif
15424
15425 int main() {
15426 struct in_addr in;
15427 int rc = inet_aton( "255.255.255.255", &in );
15428 ; return 0; }
15429 EOF
15430 if { (eval echo configure:15431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15431   rm -rf conftest*
15432   ol_cv_func_inet_aton=yes
15433 else
15434   echo "configure: failed program was:" >&5
15435   cat conftest.$ac_ext >&5
15436   rm -rf conftest*
15437   ol_cv_func_inet_aton=no
15438 fi
15439 rm -f conftest*
15440 fi
15441
15442 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15443   if test $ol_cv_func_inet_aton != no; then
15444     cat >> confdefs.h <<\EOF
15445 #define HAVE_INET_ATON 1
15446 EOF
15447
15448   fi
15449  
15450
15451 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15452 echo "configure:15453: checking for _spawnlp" >&5
15453 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15454   echo $ac_n "(cached) $ac_c" 1>&6
15455 else
15456   cat > conftest.$ac_ext <<EOF
15457 #line 15458 "configure"
15458 #include "confdefs.h"
15459 /* System header to define __stub macros and hopefully few prototypes,
15460     which can conflict with char _spawnlp(); below.  */
15461 #include <assert.h>
15462 /* Override any gcc2 internal prototype to avoid an error.  */
15463 /* We use char because int might match the return type of a gcc2
15464     builtin and then its argument prototype would still apply.  */
15465 char _spawnlp();
15466 char (*f)();
15467
15468 int main() {
15469
15470 /* The GNU C library defines this for functions which it implements
15471     to always fail with ENOSYS.  Some functions are actually named
15472     something starting with __ and the normal name is an alias.  */
15473 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15474 choke me
15475 #else
15476 f = _spawnlp;
15477 #endif
15478
15479 ; return 0; }
15480 EOF
15481 if { (eval echo configure:15482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15482   rm -rf conftest*
15483   eval "ac_cv_func__spawnlp=yes"
15484 else
15485   echo "configure: failed program was:" >&5
15486   cat conftest.$ac_ext >&5
15487   rm -rf conftest*
15488   eval "ac_cv_func__spawnlp=no"
15489 fi
15490 rm -f conftest*
15491 fi
15492
15493 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15494   echo "$ac_t""yes" 1>&6
15495   cat >> confdefs.h <<\EOF
15496 #define HAVE_SPAWNLP 1
15497 EOF
15498
15499 else
15500   echo "$ac_t""no" 1>&6
15501 fi
15502
15503
15504 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15505 echo "configure:15506: checking for _snprintf" >&5
15506 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15507   echo $ac_n "(cached) $ac_c" 1>&6
15508 else
15509   cat > conftest.$ac_ext <<EOF
15510 #line 15511 "configure"
15511 #include "confdefs.h"
15512 /* System header to define __stub macros and hopefully few prototypes,
15513     which can conflict with char _snprintf(); below.  */
15514 #include <assert.h>
15515 /* Override any gcc2 internal prototype to avoid an error.  */
15516 /* We use char because int might match the return type of a gcc2
15517     builtin and then its argument prototype would still apply.  */
15518 char _snprintf();
15519 char (*f)();
15520
15521 int main() {
15522
15523 /* The GNU C library defines this for functions which it implements
15524     to always fail with ENOSYS.  Some functions are actually named
15525     something starting with __ and the normal name is an alias.  */
15526 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15527 choke me
15528 #else
15529 f = _snprintf;
15530 #endif
15531
15532 ; return 0; }
15533 EOF
15534 if { (eval echo configure:15535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15535   rm -rf conftest*
15536   eval "ac_cv_func__snprintf=yes"
15537 else
15538   echo "configure: failed program was:" >&5
15539   cat conftest.$ac_ext >&5
15540   rm -rf conftest*
15541   eval "ac_cv_func__snprintf=no"
15542 fi
15543 rm -f conftest*
15544 fi
15545
15546 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15547   echo "$ac_t""yes" 1>&6
15548   ac_cv_func_snprintf=yes
15549         cat >> confdefs.h <<\EOF
15550 #define snprintf _snprintf
15551 EOF
15552
15553
15554 else
15555   echo "$ac_t""no" 1>&6
15556 fi
15557
15558
15559 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15560 echo "configure:15561: checking for _vsnprintf" >&5
15561 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15562   echo $ac_n "(cached) $ac_c" 1>&6
15563 else
15564   cat > conftest.$ac_ext <<EOF
15565 #line 15566 "configure"
15566 #include "confdefs.h"
15567 /* System header to define __stub macros and hopefully few prototypes,
15568     which can conflict with char _vsnprintf(); below.  */
15569 #include <assert.h>
15570 /* Override any gcc2 internal prototype to avoid an error.  */
15571 /* We use char because int might match the return type of a gcc2
15572     builtin and then its argument prototype would still apply.  */
15573 char _vsnprintf();
15574 char (*f)();
15575
15576 int main() {
15577
15578 /* The GNU C library defines this for functions which it implements
15579     to always fail with ENOSYS.  Some functions are actually named
15580     something starting with __ and the normal name is an alias.  */
15581 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15582 choke me
15583 #else
15584 f = _vsnprintf;
15585 #endif
15586
15587 ; return 0; }
15588 EOF
15589 if { (eval echo configure:15590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15590   rm -rf conftest*
15591   eval "ac_cv_func__vsnprintf=yes"
15592 else
15593   echo "configure: failed program was:" >&5
15594   cat conftest.$ac_ext >&5
15595   rm -rf conftest*
15596   eval "ac_cv_func__vsnprintf=no"
15597 fi
15598 rm -f conftest*
15599 fi
15600
15601 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15602   echo "$ac_t""yes" 1>&6
15603   ac_cv_func_vsnprintf=yes
15604         cat >> confdefs.h <<\EOF
15605 #define vsnprintf _vsnprintf
15606 EOF
15607
15608
15609 else
15610   echo "$ac_t""no" 1>&6
15611 fi
15612
15613
15614 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15615 echo "configure:15616: checking for vprintf" >&5
15616 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15617   echo $ac_n "(cached) $ac_c" 1>&6
15618 else
15619   cat > conftest.$ac_ext <<EOF
15620 #line 15621 "configure"
15621 #include "confdefs.h"
15622 /* System header to define __stub macros and hopefully few prototypes,
15623     which can conflict with char vprintf(); below.  */
15624 #include <assert.h>
15625 /* Override any gcc2 internal prototype to avoid an error.  */
15626 /* We use char because int might match the return type of a gcc2
15627     builtin and then its argument prototype would still apply.  */
15628 char vprintf();
15629 char (*f)();
15630
15631 int main() {
15632
15633 /* The GNU C library defines this for functions which it implements
15634     to always fail with ENOSYS.  Some functions are actually named
15635     something starting with __ and the normal name is an alias.  */
15636 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15637 choke me
15638 #else
15639 f = vprintf;
15640 #endif
15641
15642 ; return 0; }
15643 EOF
15644 if { (eval echo configure:15645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15645   rm -rf conftest*
15646   eval "ac_cv_func_vprintf=yes"
15647 else
15648   echo "configure: failed program was:" >&5
15649   cat conftest.$ac_ext >&5
15650   rm -rf conftest*
15651   eval "ac_cv_func_vprintf=no"
15652 fi
15653 rm -f conftest*
15654 fi
15655
15656 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15657   echo "$ac_t""yes" 1>&6
15658   cat >> confdefs.h <<\EOF
15659 #define HAVE_VPRINTF 1
15660 EOF
15661
15662 else
15663   echo "$ac_t""no" 1>&6
15664 fi
15665
15666 if test "$ac_cv_func_vprintf" != yes; then
15667 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15668 echo "configure:15669: checking for _doprnt" >&5
15669 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15670   echo $ac_n "(cached) $ac_c" 1>&6
15671 else
15672   cat > conftest.$ac_ext <<EOF
15673 #line 15674 "configure"
15674 #include "confdefs.h"
15675 /* System header to define __stub macros and hopefully few prototypes,
15676     which can conflict with char _doprnt(); below.  */
15677 #include <assert.h>
15678 /* Override any gcc2 internal prototype to avoid an error.  */
15679 /* We use char because int might match the return type of a gcc2
15680     builtin and then its argument prototype would still apply.  */
15681 char _doprnt();
15682 char (*f)();
15683
15684 int main() {
15685
15686 /* The GNU C library defines this for functions which it implements
15687     to always fail with ENOSYS.  Some functions are actually named
15688     something starting with __ and the normal name is an alias.  */
15689 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15690 choke me
15691 #else
15692 f = _doprnt;
15693 #endif
15694
15695 ; return 0; }
15696 EOF
15697 if { (eval echo configure:15698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15698   rm -rf conftest*
15699   eval "ac_cv_func__doprnt=yes"
15700 else
15701   echo "configure: failed program was:" >&5
15702   cat conftest.$ac_ext >&5
15703   rm -rf conftest*
15704   eval "ac_cv_func__doprnt=no"
15705 fi
15706 rm -f conftest*
15707 fi
15708
15709 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15710   echo "$ac_t""yes" 1>&6
15711   cat >> confdefs.h <<\EOF
15712 #define HAVE_DOPRNT 1
15713 EOF
15714
15715 else
15716   echo "$ac_t""no" 1>&6
15717 fi
15718
15719 fi
15720
15721
15722 if test $ac_cv_func_vprintf = yes ; then
15723                 for ac_func in vsnprintf vsprintf
15724 do
15725 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15726 echo "configure:15727: checking for $ac_func" >&5
15727 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15728   echo $ac_n "(cached) $ac_c" 1>&6
15729 else
15730   cat > conftest.$ac_ext <<EOF
15731 #line 15732 "configure"
15732 #include "confdefs.h"
15733 /* System header to define __stub macros and hopefully few prototypes,
15734     which can conflict with char $ac_func(); below.  */
15735 #include <assert.h>
15736 /* Override any gcc2 internal prototype to avoid an error.  */
15737 /* We use char because int might match the return type of a gcc2
15738     builtin and then its argument prototype would still apply.  */
15739 char $ac_func();
15740 char (*f)();
15741
15742 int main() {
15743
15744 /* The GNU C library defines this for functions which it implements
15745     to always fail with ENOSYS.  Some functions are actually named
15746     something starting with __ and the normal name is an alias.  */
15747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15748 choke me
15749 #else
15750 f = $ac_func;
15751 #endif
15752
15753 ; return 0; }
15754 EOF
15755 if { (eval echo configure:15756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15756   rm -rf conftest*
15757   eval "ac_cv_func_$ac_func=yes"
15758 else
15759   echo "configure: failed program was:" >&5
15760   cat conftest.$ac_ext >&5
15761   rm -rf conftest*
15762   eval "ac_cv_func_$ac_func=no"
15763 fi
15764 rm -f conftest*
15765 fi
15766
15767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15768   echo "$ac_t""yes" 1>&6
15769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15770   cat >> confdefs.h <<EOF
15771 #define $ac_tr_func 1
15772 EOF
15773  
15774 else
15775   echo "$ac_t""no" 1>&6
15776 fi
15777 done
15778
15779 fi
15780
15781 for ac_func in \
15782         bcopy                   \
15783         closesocket             \
15784         chroot                  \
15785         endgrent                \
15786         endpwent                \
15787         fcntl                   \
15788         flock                   \
15789         getdtablesize   \
15790         getgrgid                \
15791         gethostname             \
15792         getpass                 \
15793         getpassphrase   \
15794         getpwuid                \
15795         getpwnam                \
15796         getspnam                \
15797         gettimeofday    \
15798         initgroups              \
15799         lockf                   \
15800         memcpy                  \
15801         memmove                 \
15802         mkstemp                 \
15803         pipe                    \
15804         read                    \
15805         recv                    \
15806         recvfrom                \
15807         setpwfile               \
15808         setgid                  \
15809         setegid                 \
15810         setsid                  \
15811         setuid                  \
15812         seteuid                 \
15813         sigaction               \
15814         signal                  \
15815         sigset                  \
15816         strdup                  \
15817         strerror                \
15818         strpbrk                 \
15819         strrchr                 \
15820         strsep                  \
15821         strstr                  \
15822         strtol                  \
15823         strtoul                 \
15824         strspn                  \
15825         sysconf                 \
15826         waitpid                 \
15827         wait4                   \
15828         write                   \
15829         send                    \
15830         sendto                  \
15831
15832 do
15833 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15834 echo "configure:15835: checking for $ac_func" >&5
15835 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15836   echo $ac_n "(cached) $ac_c" 1>&6
15837 else
15838   cat > conftest.$ac_ext <<EOF
15839 #line 15840 "configure"
15840 #include "confdefs.h"
15841 /* System header to define __stub macros and hopefully few prototypes,
15842     which can conflict with char $ac_func(); below.  */
15843 #include <assert.h>
15844 /* Override any gcc2 internal prototype to avoid an error.  */
15845 /* We use char because int might match the return type of a gcc2
15846     builtin and then its argument prototype would still apply.  */
15847 char $ac_func();
15848 char (*f)();
15849
15850 int main() {
15851
15852 /* The GNU C library defines this for functions which it implements
15853     to always fail with ENOSYS.  Some functions are actually named
15854     something starting with __ and the normal name is an alias.  */
15855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15856 choke me
15857 #else
15858 f = $ac_func;
15859 #endif
15860
15861 ; return 0; }
15862 EOF
15863 if { (eval echo configure:15864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15864   rm -rf conftest*
15865   eval "ac_cv_func_$ac_func=yes"
15866 else
15867   echo "configure: failed program was:" >&5
15868   cat conftest.$ac_ext >&5
15869   rm -rf conftest*
15870   eval "ac_cv_func_$ac_func=no"
15871 fi
15872 rm -f conftest*
15873 fi
15874
15875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15876   echo "$ac_t""yes" 1>&6
15877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15878   cat >> confdefs.h <<EOF
15879 #define $ac_tr_func 1
15880 EOF
15881  
15882 else
15883   echo "$ac_t""no" 1>&6
15884 fi
15885 done
15886
15887
15888 for ac_func in getopt tempnam
15889 do
15890 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15891 echo "configure:15892: checking for $ac_func" >&5
15892 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15893   echo $ac_n "(cached) $ac_c" 1>&6
15894 else
15895   cat > conftest.$ac_ext <<EOF
15896 #line 15897 "configure"
15897 #include "confdefs.h"
15898 /* System header to define __stub macros and hopefully few prototypes,
15899     which can conflict with char $ac_func(); below.  */
15900 #include <assert.h>
15901 /* Override any gcc2 internal prototype to avoid an error.  */
15902 /* We use char because int might match the return type of a gcc2
15903     builtin and then its argument prototype would still apply.  */
15904 char $ac_func();
15905 char (*f)();
15906
15907 int main() {
15908
15909 /* The GNU C library defines this for functions which it implements
15910     to always fail with ENOSYS.  Some functions are actually named
15911     something starting with __ and the normal name is an alias.  */
15912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15913 choke me
15914 #else
15915 f = $ac_func;
15916 #endif
15917
15918 ; return 0; }
15919 EOF
15920 if { (eval echo configure:15921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15921   rm -rf conftest*
15922   eval "ac_cv_func_$ac_func=yes"
15923 else
15924   echo "configure: failed program was:" >&5
15925   cat conftest.$ac_ext >&5
15926   rm -rf conftest*
15927   eval "ac_cv_func_$ac_func=no"
15928 fi
15929 rm -f conftest*
15930 fi
15931
15932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15933   echo "$ac_t""yes" 1>&6
15934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15935   cat >> confdefs.h <<EOF
15936 #define $ac_tr_func 1
15937 EOF
15938  
15939 else
15940   echo "$ac_t""no" 1>&6
15941 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15942 fi
15943 done
15944
15945
15946
15947 if test "$ac_cv_func_getopt" != yes; then
15948     LIBSRCS="$LIBSRCS getopt.c"
15949 fi
15950
15951 if test "$ac_cv_func_tempnam" != yes; then
15952     LIBSRCS="$LIBSRCS tempnam.c"
15953 fi
15954
15955 # Check Configuration
15956 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15957 echo "configure:15958: checking declaration of sys_errlist" >&5
15958 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15959   echo $ac_n "(cached) $ac_c" 1>&6
15960 else
15961   
15962         cat > conftest.$ac_ext <<EOF
15963 #line 15964 "configure"
15964 #include "confdefs.h"
15965
15966 #include <stdio.h>
15967 #include <sys/types.h>
15968 #include <errno.h>
15969 #ifdef WINNT
15970 #include <stdlib.h>
15971 #endif 
15972 int main() {
15973 char *c = (char *) *sys_errlist
15974 ; return 0; }
15975 EOF
15976 if { (eval echo configure:15977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15977   rm -rf conftest*
15978   ol_cv_dcl_sys_errlist=yes
15979         ol_cv_have_sys_errlist=yes
15980 else
15981   echo "configure: failed program was:" >&5
15982   cat conftest.$ac_ext >&5
15983   rm -rf conftest*
15984   ol_cv_dcl_sys_errlist=no
15985 fi
15986 rm -f conftest*
15987 fi
15988
15989 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15990 #
15991 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15992 if test $ol_cv_dcl_sys_errlist = no ; then
15993         cat >> confdefs.h <<\EOF
15994 #define DECL_SYS_ERRLIST 1
15995 EOF
15996
15997
15998         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15999 echo "configure:16000: checking existence of sys_errlist" >&5
16000 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16001   echo $ac_n "(cached) $ac_c" 1>&6
16002 else
16003   
16004                 cat > conftest.$ac_ext <<EOF
16005 #line 16006 "configure"
16006 #include "confdefs.h"
16007 #include <errno.h>
16008 int main() {
16009 char *c = (char *) *sys_errlist
16010 ; return 0; }
16011 EOF
16012 if { (eval echo configure:16013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16013   rm -rf conftest*
16014   ol_cv_have_sys_errlist=yes
16015 else
16016   echo "configure: failed program was:" >&5
16017   cat conftest.$ac_ext >&5
16018   rm -rf conftest*
16019   ol_cv_have_sys_errlist=no
16020 fi
16021 rm -f conftest*
16022 fi
16023
16024 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16025 fi
16026 if test $ol_cv_have_sys_errlist = yes ; then
16027         cat >> confdefs.h <<\EOF
16028 #define HAVE_SYS_ERRLIST 1
16029 EOF
16030
16031 fi
16032
16033
16034
16035 if test "$ol_enable_debug" != no ; then
16036         cat >> confdefs.h <<\EOF
16037 #define LDAP_DEBUG 1
16038 EOF
16039
16040 fi
16041 if test "$ol_enable_syslog" = yes ; then
16042         cat >> confdefs.h <<\EOF
16043 #define LDAP_SYSLOG 1
16044 EOF
16045
16046 fi
16047 if test "$ol_enable_cache" = no ; then
16048         cat >> confdefs.h <<\EOF
16049 #define LDAP_NOCACHE 1
16050 EOF
16051
16052 fi
16053 if test "$ol_link_kbind" != no ; then
16054         cat >> confdefs.h <<\EOF
16055 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16056 EOF
16057
16058 fi
16059 if test "$ol_enable_proctitle" != no ; then
16060         cat >> confdefs.h <<\EOF
16061 #define LDAP_PROCTITLE 1
16062 EOF
16063
16064 fi
16065 if test "$ol_enable_referrals" != no ; then
16066         cat >> confdefs.h <<\EOF
16067 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16068 EOF
16069
16070 fi
16071 if test "$ol_enable_local" != no; then
16072         cat >> confdefs.h <<\EOF
16073 #define LDAP_PF_LOCAL 1
16074 EOF
16075
16076 fi
16077 if test "$ol_link_ipv6" != no; then
16078         cat >> confdefs.h <<\EOF
16079 #define LDAP_PF_INET6 1
16080 EOF
16081
16082 fi
16083 if test "$ol_enable_cleartext" != no ; then
16084         cat >> confdefs.h <<\EOF
16085 #define SLAPD_CLEARTEXT 1
16086 EOF
16087
16088 fi
16089 if test "$ol_enable_crypt" != no ; then
16090         cat >> confdefs.h <<\EOF
16091 #define SLAPD_CRYPT 1
16092 EOF
16093
16094 fi
16095 if test "$ol_link_kpasswd" != no ; then
16096         cat >> confdefs.h <<\EOF
16097 #define SLAPD_KPASSWD 1
16098 EOF
16099
16100 fi
16101 if test "$ol_link_spasswd" != no ; then
16102         cat >> confdefs.h <<\EOF
16103 #define SLAPD_SPASSWD 1
16104 EOF
16105
16106 fi
16107 if test "$ol_enable_phonetic" != no ; then
16108         cat >> confdefs.h <<\EOF
16109 #define SLAPD_PHONETIC 1
16110 EOF
16111
16112 fi
16113 if test "$ol_enable_rlookups" != no ; then
16114         cat >> confdefs.h <<\EOF
16115 #define SLAPD_RLOOKUPS 1
16116 EOF
16117
16118 fi
16119 if test "$ol_enable_aci" != no ; then
16120         cat >> confdefs.h <<\EOF
16121 #define SLAPD_ACI_ENABLED 1
16122 EOF
16123
16124 fi
16125
16126 if test "$ol_link_modules" != no ; then
16127         cat >> confdefs.h <<\EOF
16128 #define SLAPD_MODULES 1
16129 EOF
16130
16131         BUILD_SLAPD=yes
16132         SLAPD_MODULES_LDFLAGS="-dlopen self"
16133 fi
16134
16135 if test "$ol_link_dnssrv" != no ; then
16136         cat >> confdefs.h <<\EOF
16137 #define SLAPD_DNSSRV 1
16138 EOF
16139
16140         BUILD_SLAPD=yes
16141         BUILD_DNSSRV=yes
16142         if test "$ol_with_dnssrv_module" != static ; then
16143                 cat >> confdefs.h <<\EOF
16144 #define SLAPD_DNSSRV_DYNAMIC 1
16145 EOF
16146
16147                 BUILD_DNSSRV=mod
16148                 BUILD_DNSSRV_DYNAMIC=shared
16149                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16150         fi
16151 fi
16152
16153 if test "$ol_enable_ldap" != no ; then
16154         cat >> confdefs.h <<\EOF
16155 #define SLAPD_LDAP 1
16156 EOF
16157
16158         BUILD_SLAPD=yes
16159         BUILD_LDAP=yes
16160         if test "$ol_with_ldap_module" != static ; then
16161                 cat >> confdefs.h <<\EOF
16162 #define SLAPD_LDAP_DYNAMIC 1
16163 EOF
16164
16165                 BUILD_LDAP=mod
16166                 BUILD_LDAP_DYNAMIC=shared
16167                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16168         fi
16169 fi
16170
16171 if test "$ol_link_ldbm" != no ; then
16172         cat >> confdefs.h <<\EOF
16173 #define SLAPD_LDBM 1
16174 EOF
16175
16176         BUILD_SLAPD=yes
16177         BUILD_LDBM=yes
16178         if test "$ol_with_ldbm_module" != static ; then
16179                 cat >> confdefs.h <<\EOF
16180 #define SLAPD_LDBM_DYNAMIC 1
16181 EOF
16182
16183                 BUILD_LDBM=mod
16184                 BUILD_LDBM_DYNAMIC=shared
16185                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16186         fi
16187 fi
16188
16189 if test "$ol_enable_passwd" != no ; then
16190         cat >> confdefs.h <<\EOF
16191 #define SLAPD_PASSWD 1
16192 EOF
16193
16194         BUILD_SLAPD=yes
16195         BUILD_PASSWD=yes
16196         if test "$ol_with_passwd_module" != static ; then
16197                 cat >> confdefs.h <<\EOF
16198 #define SLAPD_PASSWD_DYNAMIC 1
16199 EOF
16200
16201                 BUILD_PASSWD=mod
16202                 BUILD_PASSWD_DYNAMIC=shared
16203                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16204         fi
16205 fi
16206
16207 if test "$ol_enable_shell" != no ; then
16208         cat >> confdefs.h <<\EOF
16209 #define SLAPD_SHELL 1
16210 EOF
16211
16212         BUILD_SLAPD=yes
16213         BUILD_SHELL=yes
16214         if test "$ol_with_shell_module" != static ; then
16215                 cat >> confdefs.h <<\EOF
16216 #define SLAPD_SHELL_DYNAMIC 1
16217 EOF
16218
16219                 BUILD_SHELL=mod
16220                 BUILD_SHELL_DYNAMIC=shared
16221                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16222         fi
16223 fi
16224
16225 if test "$ol_enable_sql" != no ; then
16226         cat >> confdefs.h <<\EOF
16227 #define SLAPD_SQL 1
16228 EOF
16229
16230         BUILD_SLAPD=yes
16231         BUILD_SQL=yes
16232         if test "$ol_with_sql_module" != static; then
16233                 cat >> confdefs.h <<\EOF
16234 #define SLAPD_SQL_DYNAMIC 1
16235 EOF
16236
16237                 BUILD_SQL=mod
16238                 BUILD_SQL_DYNAMIC=shared
16239                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16240         fi
16241 fi
16242
16243 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16244         $BUILD_SLAPD = yes ; then
16245         BUILD_SLURPD=yes
16246 fi
16247
16248
16249 if test "$LINK_BINS_DYNAMIC" = yes; then
16250     LIB_LINKAGE=DYN
16251     LT_LIB_LINKAGE=shared
16252 else
16253     LIB_LINKAGE=STAT
16254     LT_LIB_LINKAGE=static
16255 fi
16256
16257 if test "$ac_cv_mingw32" = yes ; then
16258     PLAT=NT
16259     DYN_EXT=dll
16260 else
16261     PLAT=UNIX
16262     DYN_EXT=so
16263 fi
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273   
16274   
16275   
16276   
16277   
16278   
16279   
16280   
16281   
16282   
16283   
16284   
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315 trap '' 1 2 15
16316
16317 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16318
16319 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16320 # Let make expand exec_prefix.
16321 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16322
16323 # Any assignment to VPATH causes Sun make to only execute
16324 # the first set of double-colon rules, so remove it if not needed.
16325 # If there is a colon in the path, we need to keep it.
16326 if test "x$srcdir" = x.; then
16327   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16328 fi
16329
16330 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16331
16332 DEFS=-DHAVE_CONFIG_H
16333
16334 # Without the "./", some shells look in PATH for config.status.
16335 : ${CONFIG_STATUS=./config.status}
16336
16337 echo creating $CONFIG_STATUS
16338 rm -f $CONFIG_STATUS
16339 cat > $CONFIG_STATUS <<EOF
16340 #! /bin/sh
16341 # Generated automatically by configure.
16342 # Run this file to recreate the current configuration.
16343 # This directory was configured as follows,
16344 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16345 #
16346 # $0 $ac_configure_args
16347 #
16348 # Compiler output produced by configure, useful for debugging
16349 # configure, is in ./config.log if it exists.
16350
16351 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16352 for ac_option
16353 do
16354   case "\$ac_option" in
16355   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16356     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16357     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16358   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16359     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16360     exit 0 ;;
16361   -help | --help | --hel | --he | --h)
16362     echo "\$ac_cs_usage"; exit 0 ;;
16363   *) echo "\$ac_cs_usage"; exit 1 ;;
16364   esac
16365 done
16366
16367 ac_given_srcdir=$srcdir
16368 ac_given_INSTALL="$INSTALL"
16369
16370 trap 'rm -fr `echo "\
16371 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16372 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16373 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16374 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16375 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16376 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16377 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16378 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16379 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16380 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16381 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16382 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16383 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16384 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16385 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16386 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16387 include/Makefile:build/top.mk:include/Makefile.in \
16388 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16389 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16390 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16391 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16392 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16393 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16394 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16395 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16396 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16397 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16398 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16399 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16400 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16401 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16402 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16403 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16404 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16405 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16406 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16407 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16408 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16409 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16410 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16411  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16412 EOF
16413 cat >> $CONFIG_STATUS <<EOF
16414
16415 # Protect against being on the right side of a sed subst in config.status.
16416 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16417  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16418 $ac_vpsub
16419 $extrasub
16420 s%@SHELL@%$SHELL%g
16421 s%@CFLAGS@%$CFLAGS%g
16422 s%@CPPFLAGS@%$CPPFLAGS%g
16423 s%@CXXFLAGS@%$CXXFLAGS%g
16424 s%@FFLAGS@%$FFLAGS%g
16425 s%@DEFS@%$DEFS%g
16426 s%@LDFLAGS@%$LDFLAGS%g
16427 s%@LIBS@%$LIBS%g
16428 s%@exec_prefix@%$exec_prefix%g
16429 s%@prefix@%$prefix%g
16430 s%@program_transform_name@%$program_transform_name%g
16431 s%@bindir@%$bindir%g
16432 s%@sbindir@%$sbindir%g
16433 s%@libexecdir@%$libexecdir%g
16434 s%@datadir@%$datadir%g
16435 s%@sysconfdir@%$sysconfdir%g
16436 s%@sharedstatedir@%$sharedstatedir%g
16437 s%@localstatedir@%$localstatedir%g
16438 s%@libdir@%$libdir%g
16439 s%@includedir@%$includedir%g
16440 s%@oldincludedir@%$oldincludedir%g
16441 s%@infodir@%$infodir%g
16442 s%@mandir@%$mandir%g
16443 s%@host@%$host%g
16444 s%@host_alias@%$host_alias%g
16445 s%@host_cpu@%$host_cpu%g
16446 s%@host_vendor@%$host_vendor%g
16447 s%@host_os@%$host_os%g
16448 s%@target@%$target%g
16449 s%@target_alias@%$target_alias%g
16450 s%@target_cpu@%$target_cpu%g
16451 s%@target_vendor@%$target_vendor%g
16452 s%@target_os@%$target_os%g
16453 s%@build@%$build%g
16454 s%@build_alias@%$build_alias%g
16455 s%@build_cpu@%$build_cpu%g
16456 s%@build_vendor@%$build_vendor%g
16457 s%@build_os@%$build_os%g
16458 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16459 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16460 s%@INSTALL_DATA@%$INSTALL_DATA%g
16461 s%@PACKAGE@%$PACKAGE%g
16462 s%@VERSION@%$VERSION%g
16463 s%@ACLOCAL@%$ACLOCAL%g
16464 s%@AUTOCONF@%$AUTOCONF%g
16465 s%@AUTOMAKE@%$AUTOMAKE%g
16466 s%@AUTOHEADER@%$AUTOHEADER%g
16467 s%@MAKEINFO@%$MAKEINFO%g
16468 s%@install_sh@%$install_sh%g
16469 s%@AMTAR@%$AMTAR%g
16470 s%@AWK@%$AWK%g
16471 s%@AMTARFLAGS@%$AMTARFLAGS%g
16472 s%@SET_MAKE@%$SET_MAKE%g
16473 s%@top_builddir@%$top_builddir%g
16474 s%@ldap_subdir@%$ldap_subdir%g
16475 s%@CC@%$CC%g
16476 s%@RANLIB@%$RANLIB%g
16477 s%@LN_S@%$LN_S%g
16478 s%@DLLTOOL@%$DLLTOOL%g
16479 s%@AS@%$AS%g
16480 s%@OBJDUMP@%$OBJDUMP%g
16481 s%@LIBTOOL@%$LIBTOOL%g
16482 s%@LN_H@%$LN_H%g
16483 s%@SENDMAIL@%$SENDMAIL%g
16484 s%@EDITOR@%$EDITOR%g
16485 s%@FINGER@%$FINGER%g
16486 s%@CPP@%$CPP%g
16487 s%@EXEEXT@%$EXEEXT%g
16488 s%@OBJEXT@%$OBJEXT%g
16489 s%@OL_MKDEP@%$OL_MKDEP%g
16490 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16491 s%@LIBOBJS@%$LIBOBJS%g
16492 s%@LIBSRCS@%$LIBSRCS%g
16493 s%@PLAT@%$PLAT%g
16494 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16495 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16496 s%@DYN_EXT@%$DYN_EXT%g
16497 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16498 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16499 s%@BUILD_LDAP@%$BUILD_LDAP%g
16500 s%@BUILD_LDBM@%$BUILD_LDBM%g
16501 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16502 s%@BUILD_SHELL@%$BUILD_SHELL%g
16503 s%@BUILD_SQL@%$BUILD_SQL%g
16504 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16505 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16506 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16507 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16508 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16509 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16510 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16511 s%@LDAP_LIBS@%$LDAP_LIBS%g
16512 s%@LDIF_LIBS@%$LDIF_LIBS%g
16513 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16514 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16515 s%@LDBM_LIBS@%$LDBM_LIBS%g
16516 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16517 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16518 s%@WRAP_LIBS@%$WRAP_LIBS%g
16519 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16520 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16521 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16522 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16523 s%@KRB4_LIBS@%$KRB4_LIBS%g
16524 s%@KRB5_LIBS@%$KRB5_LIBS%g
16525 s%@READLINE_LIBS@%$READLINE_LIBS%g
16526 s%@SASL_LIBS@%$SASL_LIBS%g
16527 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16528 s%@TLS_LIBS@%$TLS_LIBS%g
16529 s%@MODULES_LIBS@%$MODULES_LIBS%g
16530 s%@AUTH_LIBS@%$AUTH_LIBS%g
16531 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16532 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16533 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16534
16535 CEOF
16536 EOF
16537
16538 cat >> $CONFIG_STATUS <<\EOF
16539
16540 # Split the substitutions into bite-sized pieces for seds with
16541 # small command number limits, like on Digital OSF/1 and HP-UX.
16542 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16543 ac_file=1 # Number of current file.
16544 ac_beg=1 # First line for current file.
16545 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16546 ac_more_lines=:
16547 ac_sed_cmds=""
16548 while $ac_more_lines; do
16549   if test $ac_beg -gt 1; then
16550     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16551   else
16552     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16553   fi
16554   if test ! -s conftest.s$ac_file; then
16555     ac_more_lines=false
16556     rm -f conftest.s$ac_file
16557   else
16558     if test -z "$ac_sed_cmds"; then
16559       ac_sed_cmds="sed -f conftest.s$ac_file"
16560     else
16561       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16562     fi
16563     ac_file=`expr $ac_file + 1`
16564     ac_beg=$ac_end
16565     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16566   fi
16567 done
16568 if test -z "$ac_sed_cmds"; then
16569   ac_sed_cmds=cat
16570 fi
16571 EOF
16572
16573 cat >> $CONFIG_STATUS <<EOF
16574
16575 CONFIG_FILES=\${CONFIG_FILES-"\
16576 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16577 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16578 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16579 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16580 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16581 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16582 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16583 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16584 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16585 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16586 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16587 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16588 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16589 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16590 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16591 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16592 include/Makefile:build/top.mk:include/Makefile.in \
16593 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16594 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16595 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16596 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16597 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16598 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16599 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16600 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16601 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16602 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16603 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16604 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16605 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16606 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16607 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16608 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16609 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16610 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16611 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16612 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16613 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16614 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16615 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16616 "}
16617 EOF
16618 cat >> $CONFIG_STATUS <<\EOF
16619 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16620   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16621   case "$ac_file" in
16622   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16623        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16624   *) ac_file_in="${ac_file}.in" ;;
16625   esac
16626
16627   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16628
16629   # Remove last slash and all that follows it.  Not all systems have dirname.
16630   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16631   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16632     # The file is in a subdirectory.
16633     test ! -d "$ac_dir" && mkdir "$ac_dir"
16634     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16635     # A "../" for each directory in $ac_dir_suffix.
16636     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16637   else
16638     ac_dir_suffix= ac_dots=
16639   fi
16640
16641   case "$ac_given_srcdir" in
16642   .)  srcdir=.
16643       if test -z "$ac_dots"; then top_srcdir=.
16644       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16645   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16646   *) # Relative path.
16647     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16648     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16649   esac
16650
16651   case "$ac_given_INSTALL" in
16652   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16653   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16654   esac
16655
16656   echo creating "$ac_file"
16657   rm -f "$ac_file"
16658   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16659   case "$ac_file" in
16660   *[Mm]akefile*) ac_comsub="1i\\
16661 # $configure_input" ;;
16662   *) ac_comsub= ;;
16663   esac
16664
16665   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16666   sed -e "$ac_comsub
16667 s%@configure_input@%$configure_input%g
16668 s%@srcdir@%$srcdir%g
16669 s%@top_srcdir@%$top_srcdir%g
16670 s%@INSTALL@%$INSTALL%g
16671 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16672 fi; done
16673 rm -f conftest.s*
16674
16675 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16676 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16677 #
16678 # ac_d sets the value in "#define NAME VALUE" lines.
16679 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16680 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16681 ac_dC='\3'
16682 ac_dD='%g'
16683 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16684 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16685 ac_uB='\([      ]\)%\1#\2define\3'
16686 ac_uC=' '
16687 ac_uD='\4%g'
16688 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16689 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16690 ac_eB='$%\1#\2define\3'
16691 ac_eC=' '
16692 ac_eD='%g'
16693
16694 if test "${CONFIG_HEADERS+set}" != set; then
16695 EOF
16696 cat >> $CONFIG_STATUS <<EOF
16697   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16698 EOF
16699 cat >> $CONFIG_STATUS <<\EOF
16700 fi
16701 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16702   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16703   case "$ac_file" in
16704   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16705        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16706   *) ac_file_in="${ac_file}.in" ;;
16707   esac
16708
16709   echo creating $ac_file
16710
16711   rm -f conftest.frag conftest.in conftest.out
16712   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16713   cat $ac_file_inputs > conftest.in
16714
16715 EOF
16716
16717 # Transform confdefs.h into a sed script conftest.vals that substitutes
16718 # the proper values into config.h.in to produce config.h.  And first:
16719 # Protect against being on the right side of a sed subst in config.status.
16720 # Protect against being in an unquoted here document in config.status.
16721 rm -f conftest.vals
16722 cat > conftest.hdr <<\EOF
16723 s/[\\&%]/\\&/g
16724 s%[\\$`]%\\&%g
16725 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16726 s%ac_d%ac_u%gp
16727 s%ac_u%ac_e%gp
16728 EOF
16729 sed -n -f conftest.hdr confdefs.h > conftest.vals
16730 rm -f conftest.hdr
16731
16732 # This sed command replaces #undef with comments.  This is necessary, for
16733 # example, in the case of _POSIX_SOURCE, which is predefined and required
16734 # on some systems where configure will not decide to define it.
16735 cat >> conftest.vals <<\EOF
16736 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16737 EOF
16738
16739 # Break up conftest.vals because some shells have a limit on
16740 # the size of here documents, and old seds have small limits too.
16741
16742 rm -f conftest.tail
16743 while :
16744 do
16745   ac_lines=`grep -c . conftest.vals`
16746   # grep -c gives empty output for an empty file on some AIX systems.
16747   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16748   # Write a limited-size here document to conftest.frag.
16749   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16750   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16751   echo 'CEOF
16752   sed -f conftest.frag conftest.in > conftest.out
16753   rm -f conftest.in
16754   mv conftest.out conftest.in
16755 ' >> $CONFIG_STATUS
16756   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16757   rm -f conftest.vals
16758   mv conftest.tail conftest.vals
16759 done
16760 rm -f conftest.vals
16761
16762 cat >> $CONFIG_STATUS <<\EOF
16763   rm -f conftest.frag conftest.h
16764   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16765   cat conftest.in >> conftest.h
16766   rm -f conftest.in
16767   if cmp -s $ac_file conftest.h 2>/dev/null; then
16768     echo "$ac_file is unchanged"
16769     rm -f conftest.h
16770   else
16771     # Remove last slash and all that follows it.  Not all systems have dirname.
16772       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16773       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16774       # The file is in a subdirectory.
16775       test ! -d "$ac_dir" && mkdir "$ac_dir"
16776     fi
16777     rm -f $ac_file
16778     mv conftest.h $ac_file
16779   fi
16780 fi; done
16781
16782 EOF
16783 cat >> $CONFIG_STATUS <<EOF
16784
16785 EOF
16786 cat >> $CONFIG_STATUS <<\EOF
16787
16788 date > stamp-h
16789 echo Please \"make depend\" to build dependencies
16790
16791 exit 0
16792 EOF
16793 chmod +x $CONFIG_STATUS
16794 rm -fr confdefs* $ac_clean_files
16795 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16796