]> git.sur5r.net Git - openldap/blob - configure
detect and use fcntl (for BSD/OS)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.352 2001/05/02 23:13:51 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR       change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug          enable debugging [yes]"
31 ac_help="$ac_help
32   --enable-syslog         enable syslog support [auto]"
33 ac_help="$ac_help
34   --enable-proctitle      enable proctitle support [yes]"
35 ac_help="$ac_help
36   --enable-cache          enable caching (experimental) [no]"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals (experimental) [no]"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (deprecated) [no]"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support [auto]"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling [no]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support [auto]"
51 ac_help="$ac_help
52   --with-kerberos         with support [auto]"
53 ac_help="$ac_help
54   --with-readline         with readline support [auto]"
55 ac_help="$ac_help
56   --with-threads          with threads [auto]"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support [auto]"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select [auto]"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd [yes]"
65 ac_help="$ac_help
66     --enable-aci          enable per-object ACIs (experimental) [no]"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords [yes]"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords [no]"
71 ac_help="$ac_help
72     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
73 ac_help="$ac_help
74     --enable-kpasswd      enable Kerberos password verification [no]"
75 ac_help="$ac_help
76     --enable-lmpasswd     enable LAN Manager passwords [no]"
77 ac_help="$ac_help
78     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
79 ac_help="$ac_help
80     --enable-modules      enable dynamic module support [no]"
81 ac_help="$ac_help
82     --enable-phonetic     enable phonetic/soundex [no]"
83 ac_help="$ac_help
84     --enable-rlookups     enable reverse lookups [no]"
85 ac_help="$ac_help
86     --enable-slp          enable SLPv2 support [no]"
87 ac_help="$ac_help
88     --enable-wrappers     enable tcp wrapper support [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend [no]"
91 ac_help="$ac_help
92     --with-bdb-module     module type [static]"
93 ac_help="$ac_help
94     --enable-dnssrv       enable dnssrv backend [no]"
95 ac_help="$ac_help
96     --with-dnssrv-module  module type [static]"
97 ac_help="$ac_help
98     --enable-ldap         enable ldap backend [no]"
99 ac_help="$ac_help
100     --with-ldap-module    module type [static]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend [yes]"
103 ac_help="$ac_help
104     --with-ldbm-api       with LDBM API [auto]"
105 ac_help="$ac_help
106     --with-ldbm-module    module type [static]"
107 ac_help="$ac_help
108     --with-ldbm-type      use LDBM type [auto]"
109 ac_help="$ac_help
110     --enable-passwd       enable passwd backend [no]"
111 ac_help="$ac_help
112     --with-passwd-module  module type [static]"
113 ac_help="$ac_help
114     --enable-perl         enable perl backend [no]"
115 ac_help="$ac_help
116     --with-perl-module    module type [static]"
117 ac_help="$ac_help
118     --enable-shell        enable shell backend [no]"
119 ac_help="$ac_help
120     --with-shell-module   module type [static]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend [no]"
123 ac_help="$ac_help
124     --with-sql-module     module type [static]"
125 ac_help="$ac_help
126     --enable-tcl          enable tcl backend [no]"
127 ac_help="$ac_help
128     --with-tcl-module     module type [static]"
129 ac_help="$ac_help
130 SLURPD (Replication Daemon) Options:"
131 ac_help="$ac_help
132   --enable-slurpd         enable building slurpd [auto]"
133 ac_help="$ac_help
134 Library Generation & Linking Options"
135 ac_help="$ac_help
136   --enable-static[=PKGS]  build static libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-shared[=PKGS]  build shared libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
141 ac_help="$ac_help
142   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
143 ac_help="$ac_help
144   --disable-libtool-lock  avoid locking (might break parallel builds)"
145
146 # Initialize some variables set by options.
147 # The variables have the same names as the options, with
148 # dashes changed to underlines.
149 build=NONE
150 cache_file=./config.cache
151 exec_prefix=NONE
152 host=NONE
153 no_create=
154 nonopt=NONE
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 target=NONE
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167 bindir='${exec_prefix}/bin'
168 sbindir='${exec_prefix}/sbin'
169 libexecdir='${exec_prefix}/libexec'
170 datadir='${prefix}/share'
171 sysconfdir='${prefix}/etc'
172 sharedstatedir='${prefix}/com'
173 localstatedir='${prefix}/var'
174 libdir='${exec_prefix}/lib'
175 includedir='${prefix}/include'
176 oldincludedir='/usr/include'
177 infodir='${prefix}/info'
178 mandir='${prefix}/man'
179
180 # Initialize some other variables.
181 subdirs=
182 MFLAGS= MAKEFLAGS=
183 SHELL=${CONFIG_SHELL-/bin/sh}
184 # Maximum number of lines to put in a shell here document.
185 ac_max_here_lines=12
186
187 ac_prev=
188 for ac_option
189 do
190
191   # If the previous option needs an argument, assign it.
192   if test -n "$ac_prev"; then
193     eval "$ac_prev=\$ac_option"
194     ac_prev=
195     continue
196   fi
197
198   case "$ac_option" in
199   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
200   *) ac_optarg= ;;
201   esac
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case "$ac_option" in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir="$ac_optarg" ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build="$ac_optarg" ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file="$ac_optarg" ;;
223
224   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
225     ac_prev=datadir ;;
226   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
227   | --da=*)
228     datadir="$ac_optarg" ;;
229
230   -disable-* | --disable-*)
231     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
232     # Reject names that are not valid shell variable names.
233     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
234       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
235     fi
236     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
237     eval "enable_${ac_feature}=no" ;;
238
239   -enable-* | --enable-*)
240     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
241     # Reject names that are not valid shell variable names.
242     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
243       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244     fi
245     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246     case "$ac_option" in
247       *=*) ;;
248       *) ac_optarg=yes ;;
249     esac
250     eval "enable_${ac_feature}='$ac_optarg'" ;;
251
252   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
253   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
254   | --exec | --exe | --ex)
255     ac_prev=exec_prefix ;;
256   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
257   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
258   | --exec=* | --exe=* | --ex=*)
259     exec_prefix="$ac_optarg" ;;
260
261   -gas | --gas | --ga | --g)
262     # Obsolete; use --with-gas.
263     with_gas=yes ;;
264
265   -help | --help | --hel | --he)
266     # Omit some internal or obsolete options to make the list less imposing.
267     # This message is too long to be a string in the A/UX 3.1 sh.
268     cat << EOF
269 Usage: configure [options] [host]
270 Options: [defaults in brackets after descriptions]
271 Configuration:
272   --cache-file=FILE       cache test results in FILE
273   --help                  print this message
274   --no-create             do not create output files
275   --quiet, --silent       do not print \`checking...' messages
276   --version               print the version of autoconf that created configure
277 Directory and file names:
278   --prefix=PREFIX         install architecture-independent files in PREFIX
279                           [$ac_default_prefix]
280   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
281                           [same as prefix]
282   --bindir=DIR            user executables in DIR [EPREFIX/bin]
283   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
284   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
285   --datadir=DIR           read-only architecture-independent data in DIR
286                           [PREFIX/share]
287   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
288   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
289                           [PREFIX/com]
290   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
291   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
292   --includedir=DIR        C header files in DIR [PREFIX/include]
293   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
294   --infodir=DIR           info documentation in DIR [PREFIX/info]
295   --mandir=DIR            man documentation in DIR [PREFIX/man]
296   --srcdir=DIR            find the sources in DIR [configure dir or ..]
297   --program-prefix=PREFIX prepend PREFIX to installed program names
298   --program-suffix=SUFFIX append SUFFIX to installed program names
299   --program-transform-name=PROGRAM
300                           run sed PROGRAM on installed program names
301 EOF
302     cat << EOF
303 Host type:
304   --build=BUILD           configure for building on BUILD [BUILD=HOST]
305   --host=HOST             configure for HOST [guessed]
306   --target=TARGET         configure for TARGET [TARGET=HOST]
307 Features and packages:
308   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
309   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
310   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
311   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
312   --x-includes=DIR        X include files are in DIR
313   --x-libraries=DIR       X library files are in DIR
314 EOF
315     if test -n "$ac_help"; then
316       echo "--enable and --with options recognized:$ac_help"
317     fi
318     exit 0 ;;
319
320   -host | --host | --hos | --ho)
321     ac_prev=host ;;
322   -host=* | --host=* | --hos=* | --ho=*)
323     host="$ac_optarg" ;;
324
325   -includedir | --includedir | --includedi | --included | --include \
326   | --includ | --inclu | --incl | --inc)
327     ac_prev=includedir ;;
328   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
329   | --includ=* | --inclu=* | --incl=* | --inc=*)
330     includedir="$ac_optarg" ;;
331
332   -infodir | --infodir | --infodi | --infod | --info | --inf)
333     ac_prev=infodir ;;
334   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
335     infodir="$ac_optarg" ;;
336
337   -libdir | --libdir | --libdi | --libd)
338     ac_prev=libdir ;;
339   -libdir=* | --libdir=* | --libdi=* | --libd=*)
340     libdir="$ac_optarg" ;;
341
342   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
343   | --libexe | --libex | --libe)
344     ac_prev=libexecdir ;;
345   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
346   | --libexe=* | --libex=* | --libe=*)
347     libexecdir="$ac_optarg" ;;
348
349   -localstatedir | --localstatedir | --localstatedi | --localstated \
350   | --localstate | --localstat | --localsta | --localst \
351   | --locals | --local | --loca | --loc | --lo)
352     ac_prev=localstatedir ;;
353   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
354   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
355   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
356     localstatedir="$ac_optarg" ;;
357
358   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
359     ac_prev=mandir ;;
360   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
361     mandir="$ac_optarg" ;;
362
363   -nfp | --nfp | --nf)
364     # Obsolete; use --without-fp.
365     with_fp=no ;;
366
367   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
368   | --no-cr | --no-c)
369     no_create=yes ;;
370
371   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
372   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
373     no_recursion=yes ;;
374
375   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
376   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
377   | --oldin | --oldi | --old | --ol | --o)
378     ac_prev=oldincludedir ;;
379   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
380   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
381   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
382     oldincludedir="$ac_optarg" ;;
383
384   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
385     ac_prev=prefix ;;
386   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
387     prefix="$ac_optarg" ;;
388
389   -program-prefix | --program-prefix | --program-prefi | --program-pref \
390   | --program-pre | --program-pr | --program-p)
391     ac_prev=program_prefix ;;
392   -program-prefix=* | --program-prefix=* | --program-prefi=* \
393   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
394     program_prefix="$ac_optarg" ;;
395
396   -program-suffix | --program-suffix | --program-suffi | --program-suff \
397   | --program-suf | --program-su | --program-s)
398     ac_prev=program_suffix ;;
399   -program-suffix=* | --program-suffix=* | --program-suffi=* \
400   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
401     program_suffix="$ac_optarg" ;;
402
403   -program-transform-name | --program-transform-name \
404   | --program-transform-nam | --program-transform-na \
405   | --program-transform-n | --program-transform- \
406   | --program-transform | --program-transfor \
407   | --program-transfo | --program-transf \
408   | --program-trans | --program-tran \
409   | --progr-tra | --program-tr | --program-t)
410     ac_prev=program_transform_name ;;
411   -program-transform-name=* | --program-transform-name=* \
412   | --program-transform-nam=* | --program-transform-na=* \
413   | --program-transform-n=* | --program-transform-=* \
414   | --program-transform=* | --program-transfor=* \
415   | --program-transfo=* | --program-transf=* \
416   | --program-trans=* | --program-tran=* \
417   | --progr-tra=* | --program-tr=* | --program-t=*)
418     program_transform_name="$ac_optarg" ;;
419
420   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
421   | -silent | --silent | --silen | --sile | --sil)
422     silent=yes ;;
423
424   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
425     ac_prev=sbindir ;;
426   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
427   | --sbi=* | --sb=*)
428     sbindir="$ac_optarg" ;;
429
430   -sharedstatedir | --sharedstatedir | --sharedstatedi \
431   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
432   | --sharedst | --shareds | --shared | --share | --shar \
433   | --sha | --sh)
434     ac_prev=sharedstatedir ;;
435   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
436   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
437   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
438   | --sha=* | --sh=*)
439     sharedstatedir="$ac_optarg" ;;
440
441   -site | --site | --sit)
442     ac_prev=site ;;
443   -site=* | --site=* | --sit=*)
444     site="$ac_optarg" ;;
445
446   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
447     ac_prev=srcdir ;;
448   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
449     srcdir="$ac_optarg" ;;
450
451   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
452   | --syscon | --sysco | --sysc | --sys | --sy)
453     ac_prev=sysconfdir ;;
454   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
455   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
456     sysconfdir="$ac_optarg" ;;
457
458   -target | --target | --targe | --targ | --tar | --ta | --t)
459     ac_prev=target ;;
460   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
461     target="$ac_optarg" ;;
462
463   -v | -verbose | --verbose | --verbos | --verbo | --verb)
464     verbose=yes ;;
465
466   -version | --version | --versio | --versi | --vers)
467     echo "configure generated by autoconf version 2.13.1"
468     exit 0 ;;
469
470   -with-* | --with-*)
471     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
472     # Reject names that are not valid shell variable names.
473     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
474       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
475     fi
476     ac_package=`echo $ac_package| sed 's/-/_/g'`
477     case "$ac_option" in
478       *=*) ;;
479       *) ac_optarg=yes ;;
480     esac
481     eval "with_${ac_package}='$ac_optarg'" ;;
482
483   -without-* | --without-*)
484     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
485     # Reject names that are not valid shell variable names.
486     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
487       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
488     fi
489     ac_package=`echo $ac_package| sed 's/-/_/g'`
490     eval "with_${ac_package}=no" ;;
491
492   --x)
493     # Obsolete; use --with-x.
494     with_x=yes ;;
495
496   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
497   | --x-incl | --x-inc | --x-in | --x-i)
498     ac_prev=x_includes ;;
499   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
500   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
501     x_includes="$ac_optarg" ;;
502
503   -x-libraries | --x-libraries | --x-librarie | --x-librari \
504   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
505     ac_prev=x_libraries ;;
506   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
507   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
508     x_libraries="$ac_optarg" ;;
509
510   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
511     ;;
512
513   *)
514     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
515       echo "configure: warning: $ac_option: invalid host type" 1>&2
516     fi
517     if test "x$nonopt" != xNONE; then
518       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
519     fi
520     nonopt="$ac_option"
521     ;;
522
523   esac
524 done
525
526 if test -n "$ac_prev"; then
527   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
528 fi
529
530 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
531
532 # File descriptor usage:
533 # 0 standard input
534 # 1 file creation
535 # 2 errors and warnings
536 # 3 some systems may open it to /dev/tty
537 # 4 used on the Kubota Titan
538 # 6 checking for... messages and results
539 # 5 compiler messages saved in config.log
540 if test "$silent" = yes; then
541   exec 6>/dev/null
542 else
543   exec 6>&1
544 fi
545 exec 5>./config.log
546
547 echo "\
548 This file contains any messages produced by compilers while
549 running configure, to aid debugging if configure makes a mistake.
550 " 1>&5
551
552 # Strip out --no-create and --no-recursion so they do not pile up.
553 # Also quote any args containing shell metacharacters.
554 ac_configure_args=
555 for ac_arg
556 do
557   case "$ac_arg" in
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c) ;;
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
562   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
563   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
564   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
565   esac
566 done
567
568 # NLS nuisances.
569 # Only set these to C if already set.  These must not be set unconditionally
570 # because not all systems understand e.g. LANG=C (notably SCO).
571 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
572 # Non-C LC_CTYPE values break the ctype check.
573 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
574 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
575 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
576 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
577
578 # confdefs.h avoids OS command line length limits that DEFS can exceed.
579 rm -rf conftest* confdefs.h
580 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
581 echo > confdefs.h
582
583 # A filename unique to this package, relative to the directory that
584 # configure is in, which we can look for to find out if srcdir is correct.
585 ac_unique_file=build/version.sh
586
587 # Find the source files, if location was not specified.
588 if test -z "$srcdir"; then
589   ac_srcdir_defaulted=yes
590   # Try the directory containing this script, then its parent.
591   ac_prog=$0
592   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
593   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
594   srcdir=$ac_confdir
595   if test ! -r $srcdir/$ac_unique_file; then
596     srcdir=..
597   fi
598 else
599   ac_srcdir_defaulted=no
600 fi
601 if test ! -r $srcdir/$ac_unique_file; then
602   if test "$ac_srcdir_defaulted" = yes; then
603     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
604   else
605     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
606   fi
607 fi
608 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
609
610 # Prefer explicitly selected file to automatically selected ones.
611 if test -z "$CONFIG_SITE"; then
612   if test "x$prefix" != xNONE; then
613     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
614   else
615     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
616   fi
617 fi
618 for ac_site_file in $CONFIG_SITE; do
619   if test -r "$ac_site_file"; then
620     echo "loading site script $ac_site_file"
621     . "$ac_site_file"
622   fi
623 done
624
625
626 ac_ext=c
627 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
628 ac_cpp='$CPP $CPPFLAGS'
629 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
630 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
631 cross_compiling=$ac_cv_prog_cc_cross
632
633 ac_exeext=
634 ac_objext=o
635 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
636   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
637   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
638     ac_n= ac_c='
639 ' ac_t='        '
640   else
641     ac_n=-n ac_c= ac_t=
642   fi
643 else
644   ac_n= ac_c='\c' ac_t=
645 fi
646
647
648 # set unset (borrowed from autoconf 2.49c)
649 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
650   ol_unset=unset
651 else
652   ol_unset=false
653 fi
654 # unset CDPATH
655 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
656
657 ac_aux_dir=
658 for ac_dir in build $srcdir/build; do
659   if test -f $ac_dir/install-sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install-sh -c"
662     break
663   elif test -f $ac_dir/install.sh; then
664     ac_aux_dir=$ac_dir
665     ac_install_sh="$ac_aux_dir/install.sh -c"
666     break
667   elif test -f $ac_dir/shtool; then
668     ac_aux_dir=$ac_dir
669     ac_install_sh="$ac_aux_dir/shtool install -c"
670     break
671   fi
672 done
673 if test -z "$ac_aux_dir"; then
674   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
675 fi
676 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
677 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
678 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
679
680 eval `$ac_aux_dir/version.sh`
681 if test -z "$OL_STRING"; then
682         { echo "configure: error: could not determine version" 1>&2; exit 1; }
683 fi
684
685 echo "Configuring $OL_STRING ..."
686
687
688 echo $ac_n "checking host system type""... $ac_c" 1>&6
689 echo "configure:690: checking host system type" >&5
690 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
691
692 # Make sure we can run config.sub.
693   if $ac_config_sub sun4 >/dev/null 2>&1; then :
694     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
695   fi
696
697   ac_cv_host_alias=$host
698   case "$ac_cv_host_alias" in
699   NONE)
700     case $nonopt in
701     NONE)
702       if ac_cv_host_alias=`$ac_config_guess`; then :
703       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
704       fi ;;
705     *) ac_cv_host_alias=$nonopt ;;
706     esac ;;
707   esac
708
709   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
710   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
711   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
712   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
713 else
714   echo $ac_n "(cached) $ac_c" 1>&6
715 fi
716
717 echo "$ac_t""$ac_cv_host" 1>&6
718
719 host=$ac_cv_host
720 host_alias=$ac_cv_host_alias
721 host_cpu=$ac_cv_host_cpu
722 host_vendor=$ac_cv_host_vendor
723 host_os=$ac_cv_host_os
724
725
726
727
728
729 echo $ac_n "checking target system type""... $ac_c" 1>&6
730 echo "configure:731: checking target system type" >&5
731 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
732
733 # Make sure we can run config.sub.
734   if $ac_config_sub sun4 >/dev/null 2>&1; then :
735     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
736   fi
737
738   ac_cv_target_alias=$target
739   case "$ac_cv_target_alias" in
740   NONE)
741     case $nonopt in
742     NONE)
743       ac_cv_target_alias=$host_alias ;;
744
745     *) ac_cv_target_alias=$nonopt ;;
746     esac ;;
747   esac
748
749   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
750   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
751   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
752   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
753 else
754   echo $ac_n "(cached) $ac_c" 1>&6
755 fi
756
757 echo "$ac_t""$ac_cv_target" 1>&6
758
759 target=$ac_cv_target
760 target_alias=$ac_cv_target_alias
761 target_cpu=$ac_cv_target_cpu
762 target_vendor=$ac_cv_target_vendor
763 target_os=$ac_cv_target_os
764
765
766
767
768
769 echo $ac_n "checking build system type""... $ac_c" 1>&6
770 echo "configure:771: checking build system type" >&5
771 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
772
773 # Make sure we can run config.sub.
774   if $ac_config_sub sun4 >/dev/null 2>&1; then :
775     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
776   fi
777
778   ac_cv_build_alias=$build
779   case "$ac_cv_build_alias" in
780   NONE)
781     case $nonopt in
782     NONE)
783       ac_cv_build_alias=$host_alias ;;
784
785     *) ac_cv_build_alias=$nonopt ;;
786     esac ;;
787   esac
788
789   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
790   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
791   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
792   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
793 else
794   echo $ac_n "(cached) $ac_c" 1>&6
795 fi
796
797 echo "$ac_t""$ac_cv_build" 1>&6
798
799 build=$ac_cv_build
800 build_alias=$ac_cv_build_alias
801 build_cpu=$ac_cv_build_cpu
802 build_vendor=$ac_cv_build_vendor
803 build_os=$ac_cv_build_os
804
805
806
807
808
809 # Do some error checking and defaulting for the host and target type.
810 # The inputs are:
811 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
812 #
813 # The rules are:
814 # 1. You are not allowed to specify --host, --target, and nonopt at the
815 #    same time.
816 # 2. Host defaults to nonopt.
817 # 3. If nonopt is not specified, then host defaults to the current host,
818 #    as determined by config.guess.
819 # 4. Target and build default to nonopt.
820 # 5. If nonopt is not specified, then target and build default to host.
821
822 # The aliases save the names the user supplied, while $host etc.
823 # will get canonicalized.
824 case $host---$target---$nonopt in
825 NONE---*---* | *---NONE---* | *---*---NONE) ;;
826 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
827 esac
828
829 test "$host_alias" != "$target_alias" &&
830   test "$program_prefix$program_suffix$program_transform_name" = \
831     NONENONEs,x,x, &&
832   program_prefix=${target_alias}-
833
834
835 # Find a good install program.  We prefer a C program (faster),
836 # so one script is as good as another.  But avoid the broken or
837 # incompatible versions:
838 # SysV /etc/install, /usr/sbin/install
839 # SunOS /usr/etc/install
840 # IRIX /sbin/install
841 # AIX /bin/install
842 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
843 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
844 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
845 # ./install, which can be erroneously created by make from ./install.sh.
846 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
847 echo "configure:848: checking for a BSD compatible install" >&5
848 if test -z "$INSTALL"; then
849 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
850   echo $ac_n "(cached) $ac_c" 1>&6
851 else
852     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
853   for ac_dir in $PATH; do
854     # Account for people who put trailing slashes in PATH elements.
855     case "$ac_dir/" in
856     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
857     *)
858       # OSF1 and SCO ODT 3.0 have their own names for install.
859       # Don't use installbsd from OSF since it installs stuff as root
860       # by default.
861       for ac_prog in ginstall scoinst install; do
862         if test -f $ac_dir/$ac_prog; then
863           if test $ac_prog = install &&
864             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
865             # AIX install.  It has an incompatible calling convention.
866             :
867           elif test $ac_prog = install &&
868             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
869             # program-specific install script used by HP pwplus--don't use.
870             :
871           else
872             ac_cv_path_install="$ac_dir/$ac_prog -c"
873             break 2
874           fi
875         fi
876       done
877       ;;
878     esac
879   done
880   IFS="$ac_save_IFS"
881
882 fi
883   if test "${ac_cv_path_install+set}" = set; then
884     INSTALL="$ac_cv_path_install"
885   else
886     # As a last resort, use the slow shell script.  We don't cache a
887     # path for INSTALL within a source directory, because that will
888     # break other packages using the cache if that directory is
889     # removed, or if the path is relative.
890     INSTALL="$ac_install_sh"
891   fi
892 fi
893 echo "$ac_t""$INSTALL" 1>&6
894
895 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
896 # It thinks the first close brace ends the variable substitution.
897 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
898
899 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
900
901 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
902
903 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
904 echo "configure:905: checking whether build environment is sane" >&5
905 # Just in case
906 sleep 1
907 echo timestamp > conftestfile
908 # Do `set' in a subshell so we don't clobber the current shell's
909 # arguments.  Must try -L first in case configure is actually a
910 # symlink; some systems play weird games with the mod time of symlinks
911 # (eg FreeBSD returns the mod time of the symlink's containing
912 # directory).
913 if (
914    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
915    if test "$*" = "X"; then
916       # -L didn't work.
917       set X `ls -t $srcdir/configure conftestfile`
918    fi
919    if test "$*" != "X $srcdir/configure conftestfile" \
920       && test "$*" != "X conftestfile $srcdir/configure"; then
921
922       # If neither matched, then we have a broken ls.  This can happen
923       # if, for instance, CONFIG_SHELL is bash and it inherits a
924       # broken ls alias from the environment.  This has actually
925       # happened.  Such a system could not be considered "sane".
926       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
927 alias in your environment" 1>&2; exit 1; }
928    fi
929
930    test "$2" = conftestfile
931    )
932 then
933    # Ok.
934    :
935 else
936    { echo "configure: error: newly created file is older than distributed files!
937 Check your system clock" 1>&2; exit 1; }
938 fi
939 rm -f conftest*
940 echo "$ac_t""yes" 1>&6
941 if test "$program_transform_name" = s,x,x,; then
942   program_transform_name=
943 else
944   # Double any \ or $.  echo might interpret backslashes.
945   cat <<\EOF_SED > conftestsed
946 s,\\,\\\\,g; s,\$,$$,g
947 EOF_SED
948   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
949   rm -f conftestsed
950 fi
951 test "$program_prefix" != NONE &&
952   program_transform_name="s,^,${program_prefix},;$program_transform_name"
953 # Use a double $ so make ignores it.
954 test "$program_suffix" != NONE &&
955   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
956
957 # sed with no file args requires a program.
958 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
959
960 for ac_prog in mawk gawk nawk awk
961 do
962 # Extract the first word of "$ac_prog", so it can be a program name with args.
963 set dummy $ac_prog; ac_word=$2
964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
965 echo "configure:966: checking for $ac_word" >&5
966 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
967   echo $ac_n "(cached) $ac_c" 1>&6
968 else
969   if test -n "$AWK"; then
970   ac_cv_prog_AWK="$AWK" # Let the user override the test.
971 else
972   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
973   ac_dummy="$PATH"
974   for ac_dir in $ac_dummy; do
975     test -z "$ac_dir" && ac_dir=.
976     if test -f $ac_dir/$ac_word; then
977       ac_cv_prog_AWK="$ac_prog"
978       break
979     fi
980   done
981   IFS="$ac_save_ifs"
982 fi
983 fi
984 AWK="$ac_cv_prog_AWK"
985 if test -n "$AWK"; then
986   echo "$ac_t""$AWK" 1>&6
987 else
988   echo "$ac_t""no" 1>&6
989 fi
990
991 test -n "$AWK" && break
992 done
993
994 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
995 echo "configure:996: checking whether ${MAKE-make} sets \${MAKE}" >&5
996 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
997 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
998   echo $ac_n "(cached) $ac_c" 1>&6
999 else
1000   cat > conftestmake <<\EOF
1001 all:
1002         @echo 'ac_maketemp="${MAKE}"'
1003 EOF
1004 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1005 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1006 if test -n "$ac_maketemp"; then
1007   eval ac_cv_prog_make_${ac_make}_set=yes
1008 else
1009   eval ac_cv_prog_make_${ac_make}_set=no
1010 fi
1011 rm -f conftestmake
1012 fi
1013 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1014   echo "$ac_t""yes" 1>&6
1015   SET_MAKE=
1016 else
1017   echo "$ac_t""no" 1>&6
1018   SET_MAKE="MAKE=${MAKE-make}"
1019 fi
1020
1021
1022
1023 PACKAGE=$OL_PACKAGE
1024
1025 VERSION=$OL_VERSION
1026
1027 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1028   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1029 fi
1030
1031
1032
1033 missing_dir=`cd $ac_aux_dir && pwd`
1034 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1035 echo "configure:1036: checking for working aclocal" >&5
1036 # Run test in a subshell; some versions of sh will print an error if
1037 # an executable is not found, even if stderr is redirected.
1038 # Redirect stdin to placate older versions of autoconf.  Sigh.
1039 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1040    ACLOCAL=aclocal
1041    echo "$ac_t""found" 1>&6
1042 else
1043    ACLOCAL="$missing_dir/missing aclocal"
1044    echo "$ac_t""missing" 1>&6
1045 fi
1046
1047 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1048 echo "configure:1049: checking for working autoconf" >&5
1049 # Run test in a subshell; some versions of sh will print an error if
1050 # an executable is not found, even if stderr is redirected.
1051 # Redirect stdin to placate older versions of autoconf.  Sigh.
1052 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1053    AUTOCONF=autoconf
1054    echo "$ac_t""found" 1>&6
1055 else
1056    AUTOCONF="$missing_dir/missing autoconf"
1057    echo "$ac_t""missing" 1>&6
1058 fi
1059
1060 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1061 echo "configure:1062: checking for working automake" >&5
1062 # Run test in a subshell; some versions of sh will print an error if
1063 # an executable is not found, even if stderr is redirected.
1064 # Redirect stdin to placate older versions of autoconf.  Sigh.
1065 if (automake --version) < /dev/null > /dev/null 2>&1; then
1066    AUTOMAKE=automake
1067    echo "$ac_t""found" 1>&6
1068 else
1069    AUTOMAKE="$missing_dir/missing automake"
1070    echo "$ac_t""missing" 1>&6
1071 fi
1072
1073 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1074 echo "configure:1075: checking for working autoheader" >&5
1075 # Run test in a subshell; some versions of sh will print an error if
1076 # an executable is not found, even if stderr is redirected.
1077 # Redirect stdin to placate older versions of autoconf.  Sigh.
1078 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1079    AUTOHEADER=autoheader
1080    echo "$ac_t""found" 1>&6
1081 else
1082    AUTOHEADER="$missing_dir/missing autoheader"
1083    echo "$ac_t""missing" 1>&6
1084 fi
1085
1086 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1087 echo "configure:1088: checking for working makeinfo" >&5
1088 # Run test in a subshell; some versions of sh will print an error if
1089 # an executable is not found, even if stderr is redirected.
1090 # Redirect stdin to placate older versions of autoconf.  Sigh.
1091 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1092    MAKEINFO=makeinfo
1093    echo "$ac_t""found" 1>&6
1094 else
1095    MAKEINFO="$missing_dir/missing makeinfo"
1096    echo "$ac_t""missing" 1>&6
1097 fi
1098
1099 install_sh="$missing_dir/install-sh"
1100 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1101
1102 for ac_prog in gnutar gtar tar
1103 do
1104 # Extract the first word of "$ac_prog", so it can be a program name with args.
1105 set dummy $ac_prog; ac_word=$2
1106 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1107 echo "configure:1108: checking for $ac_word" >&5
1108 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1109   echo $ac_n "(cached) $ac_c" 1>&6
1110 else
1111   if test -n "$AMTAR"; then
1112   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1113 else
1114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1115   ac_dummy="$PATH"
1116   for ac_dir in $ac_dummy; do
1117     test -z "$ac_dir" && ac_dir=.
1118     if test -f $ac_dir/$ac_word; then
1119       ac_cv_prog_AMTAR="$ac_prog"
1120       break
1121     fi
1122   done
1123   IFS="$ac_save_ifs"
1124 fi
1125 fi
1126 AMTAR="$ac_cv_prog_AMTAR"
1127 if test -n "$AMTAR"; then
1128   echo "$ac_t""$AMTAR" 1>&6
1129 else
1130   echo "$ac_t""no" 1>&6
1131 fi
1132
1133 test -n "$AMTAR" && break
1134 done
1135
1136
1137 AMTARFLAGS=
1138 if test -n "$AMTAR"; then
1139   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1140         AMTARFLAGS=o
1141   fi
1142 fi
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_PACKAGE "$PACKAGE"
1146 EOF
1147
1148 cat >> confdefs.h <<EOF
1149 #define OPENLDAP_VERSION "$VERSION"
1150 EOF
1151
1152
1153 cat >> confdefs.h <<EOF
1154 #define LDAP_VENDOR_VERSION $OL_API_INC
1155 EOF
1156
1157 cat >> confdefs.h <<EOF
1158 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1159 EOF
1160
1161 cat >> confdefs.h <<EOF
1162 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1163 EOF
1164
1165 cat >> confdefs.h <<EOF
1166 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1167 EOF
1168
1169
1170 OPENLDAP_LIBVERSION=$OL_API_LIB
1171
1172
1173
1174 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1175 echo "configure:1176: checking configure arguments" >&5
1176
1177
1178 top_builddir=`pwd`
1179
1180 ldap_subdir="/openldap"
1181
1182 # Check whether --with-subdir or --without-subdir was given.
1183 if test "${with_subdir+set}" = set; then
1184   withval="$with_subdir"
1185   case "$withval" in
1186         no) ldap_subdir=""
1187                 ;;
1188         yes)
1189                 ;;
1190         /*|\\*)
1191                 ldap_subdir="$withval"
1192                 ;;
1193         *)
1194                 ldap_subdir="/$withval"
1195                 ;;
1196 esac
1197
1198 fi
1199
1200
1201 # OpenLDAP --enable-debug
1202         # Check whether --enable-debug or --disable-debug was given.
1203 if test "${enable_debug+set}" = set; then
1204   enableval="$enable_debug"
1205   
1206         ol_arg=invalid
1207         for ol_val in auto yes no ; do
1208                 if test "$enableval" = "$ol_val" ; then
1209                         ol_arg="$ol_val"
1210                 fi
1211         done
1212         if test "$ol_arg" = "invalid" ; then
1213                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1214         fi
1215         ol_enable_debug="$ol_arg"
1216
1217 else
1218         ol_enable_debug="yes"
1219 fi
1220 # end --enable-debug
1221 # OpenLDAP --enable-syslog
1222         # Check whether --enable-syslog or --disable-syslog was given.
1223 if test "${enable_syslog+set}" = set; then
1224   enableval="$enable_syslog"
1225   
1226         ol_arg=invalid
1227         for ol_val in auto yes no ; do
1228                 if test "$enableval" = "$ol_val" ; then
1229                         ol_arg="$ol_val"
1230                 fi
1231         done
1232         if test "$ol_arg" = "invalid" ; then
1233                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1234         fi
1235         ol_enable_syslog="$ol_arg"
1236
1237 else
1238         ol_enable_syslog="auto"
1239 fi
1240 # end --enable-syslog
1241 # OpenLDAP --enable-proctitle
1242         # Check whether --enable-proctitle or --disable-proctitle was given.
1243 if test "${enable_proctitle+set}" = set; then
1244   enableval="$enable_proctitle"
1245   
1246         ol_arg=invalid
1247         for ol_val in auto yes no ; do
1248                 if test "$enableval" = "$ol_val" ; then
1249                         ol_arg="$ol_val"
1250                 fi
1251         done
1252         if test "$ol_arg" = "invalid" ; then
1253                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1254         fi
1255         ol_enable_proctitle="$ol_arg"
1256
1257 else
1258         ol_enable_proctitle="yes"
1259 fi
1260 # end --enable-proctitle
1261 # OpenLDAP --enable-cache
1262         # Check whether --enable-cache or --disable-cache was given.
1263 if test "${enable_cache+set}" = set; then
1264   enableval="$enable_cache"
1265   
1266         ol_arg=invalid
1267         for ol_val in auto yes no ; do
1268                 if test "$enableval" = "$ol_val" ; then
1269                         ol_arg="$ol_val"
1270                 fi
1271         done
1272         if test "$ol_arg" = "invalid" ; then
1273                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1274         fi
1275         ol_enable_cache="$ol_arg"
1276
1277 else
1278         ol_enable_cache="no"
1279 fi
1280 # end --enable-cache
1281 # OpenLDAP --enable-referrals
1282         # Check whether --enable-referrals or --disable-referrals was given.
1283 if test "${enable_referrals+set}" = set; then
1284   enableval="$enable_referrals"
1285   
1286         ol_arg=invalid
1287         for ol_val in auto yes no ; do
1288                 if test "$enableval" = "$ol_val" ; then
1289                         ol_arg="$ol_val"
1290                 fi
1291         done
1292         if test "$ol_arg" = "invalid" ; then
1293                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1294         fi
1295         ol_enable_referrals="$ol_arg"
1296
1297 else
1298         ol_enable_referrals="no"
1299 fi
1300 # end --enable-referrals
1301 # OpenLDAP --enable-kbind
1302         # Check whether --enable-kbind or --disable-kbind was given.
1303 if test "${enable_kbind+set}" = set; then
1304   enableval="$enable_kbind"
1305   
1306         ol_arg=invalid
1307         for ol_val in auto yes no ; do
1308                 if test "$enableval" = "$ol_val" ; then
1309                         ol_arg="$ol_val"
1310                 fi
1311         done
1312         if test "$ol_arg" = "invalid" ; then
1313                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1314         fi
1315         ol_enable_kbind="$ol_arg"
1316
1317 else
1318         ol_enable_kbind="no"
1319 fi
1320 # end --enable-kbind
1321 # OpenLDAP --enable-ipv6
1322         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1323 if test "${enable_ipv6+set}" = set; then
1324   enableval="$enable_ipv6"
1325   
1326         ol_arg=invalid
1327         for ol_val in auto yes no ; do
1328                 if test "$enableval" = "$ol_val" ; then
1329                         ol_arg="$ol_val"
1330                 fi
1331         done
1332         if test "$ol_arg" = "invalid" ; then
1333                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1334         fi
1335         ol_enable_ipv6="$ol_arg"
1336
1337 else
1338         ol_enable_ipv6="auto"
1339 fi
1340 # end --enable-ipv6
1341 # OpenLDAP --enable-local
1342         # Check whether --enable-local or --disable-local was given.
1343 if test "${enable_local+set}" = set; then
1344   enableval="$enable_local"
1345   
1346         ol_arg=invalid
1347         for ol_val in auto yes no ; do
1348                 if test "$enableval" = "$ol_val" ; then
1349                         ol_arg="$ol_val"
1350                 fi
1351         done
1352         if test "$ol_arg" = "invalid" ; then
1353                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1354         fi
1355         ol_enable_local="$ol_arg"
1356
1357 else
1358         ol_enable_local="auto"
1359 fi
1360 # end --enable-local
1361 # OpenLDAP --enable-x_compile
1362         # Check whether --enable-x_compile or --disable-x_compile was given.
1363 if test "${enable_x_compile+set}" = set; then
1364   enableval="$enable_x_compile"
1365   
1366         ol_arg=invalid
1367         for ol_val in yes no ; do
1368                 if test "$enableval" = "$ol_val" ; then
1369                         ol_arg="$ol_val"
1370                 fi
1371         done
1372         if test "$ol_arg" = "invalid" ; then
1373                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1374         fi
1375         ol_enable_x_compile="$ol_arg"
1376
1377 else
1378         ol_enable_x_compile="no"
1379 fi
1380 # end --enable-x_compile
1381
1382
1383 # OpenLDAP --with-cyrus_sasl
1384         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1385 if test "${with_cyrus_sasl+set}" = set; then
1386   withval="$with_cyrus_sasl"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no  ; do
1390                 if test "$withval" = "$ol_val" ; then
1391                         ol_arg="$ol_val"
1392                 fi
1393         done
1394         if test "$ol_arg" = "invalid" ; then
1395                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1396         fi
1397         ol_with_cyrus_sasl="$ol_arg"
1398
1399 else
1400         ol_with_cyrus_sasl="auto"
1401 fi
1402 # end --with-cyrus_sasl
1403
1404 # OpenLDAP --with-fetch
1405         # Check whether --with-fetch or --without-fetch was given.
1406 if test "${with_fetch+set}" = set; then
1407   withval="$with_fetch"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto yes no  ; do
1411                 if test "$withval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1417         fi
1418         ol_with_fetch="$ol_arg"
1419
1420 else
1421         ol_with_fetch="auto"
1422 fi
1423 # end --with-fetch
1424
1425 # OpenLDAP --with-kerberos
1426         # Check whether --with-kerberos or --without-kerberos was given.
1427 if test "${with_kerberos+set}" = set; then
1428   withval="$with_kerberos"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1432                 if test "$withval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1438         fi
1439         ol_with_kerberos="$ol_arg"
1440
1441 else
1442         ol_with_kerberos="auto"
1443 fi
1444 # end --with-kerberos
1445
1446 # OpenLDAP --with-readline
1447         # Check whether --with-readline or --without-readline was given.
1448 if test "${with_readline+set}" = set; then
1449   withval="$with_readline"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto yes no  ; do
1453                 if test "$withval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1459         fi
1460         ol_with_readline="$ol_arg"
1461
1462 else
1463         ol_with_readline="auto"
1464 fi
1465 # end --with-readline
1466
1467 # OpenLDAP --with-threads
1468         # Check whether --with-threads or --without-threads was given.
1469 if test "${with_threads+set}" = set; then
1470   withval="$with_threads"
1471   
1472         ol_arg=invalid
1473         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1474                 if test "$withval" = "$ol_val" ; then
1475                         ol_arg="$ol_val"
1476                 fi
1477         done
1478         if test "$ol_arg" = "invalid" ; then
1479                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1480         fi
1481         ol_with_threads="$ol_arg"
1482
1483 else
1484         ol_with_threads="auto"
1485 fi
1486 # end --with-threads
1487
1488 # OpenLDAP --with-tls
1489         # Check whether --with-tls or --without-tls was given.
1490 if test "${with_tls+set}" = set; then
1491   withval="$with_tls"
1492   
1493         ol_arg=invalid
1494         for ol_val in auto ssleay openssl yes no  ; do
1495                 if test "$withval" = "$ol_val" ; then
1496                         ol_arg="$ol_val"
1497                 fi
1498         done
1499         if test "$ol_arg" = "invalid" ; then
1500                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1501         fi
1502         ol_with_tls="$ol_arg"
1503
1504 else
1505         ol_with_tls="auto"
1506 fi
1507 # end --with-tls
1508
1509 # OpenLDAP --with-yielding_select
1510         # Check whether --with-yielding_select or --without-yielding_select was given.
1511 if test "${with_yielding_select+set}" = set; then
1512   withval="$with_yielding_select"
1513   
1514         ol_arg=invalid
1515         for ol_val in auto yes no manual  ; do
1516                 if test "$withval" = "$ol_val" ; then
1517                         ol_arg="$ol_val"
1518                 fi
1519         done
1520         if test "$ol_arg" = "invalid" ; then
1521                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1522         fi
1523         ol_with_yielding_select="$ol_arg"
1524
1525 else
1526         ol_with_yielding_select="auto"
1527 fi
1528 # end --with-yielding_select
1529
1530
1531
1532 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1533 if test "${with_xxslapdoptions+set}" = set; then
1534   withval="$with_xxslapdoptions"
1535   :
1536 fi
1537
1538 # OpenLDAP --enable-slapd
1539         # Check whether --enable-slapd or --disable-slapd was given.
1540 if test "${enable_slapd+set}" = set; then
1541   enableval="$enable_slapd"
1542   
1543         ol_arg=invalid
1544         for ol_val in auto yes no ; do
1545                 if test "$enableval" = "$ol_val" ; then
1546                         ol_arg="$ol_val"
1547                 fi
1548         done
1549         if test "$ol_arg" = "invalid" ; then
1550                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1551         fi
1552         ol_enable_slapd="$ol_arg"
1553
1554 else
1555         ol_enable_slapd="yes"
1556 fi
1557 # end --enable-slapd
1558 # OpenLDAP --enable-aci
1559         # Check whether --enable-aci or --disable-aci was given.
1560 if test "${enable_aci+set}" = set; then
1561   enableval="$enable_aci"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no ; do
1565                 if test "$enableval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1571         fi
1572         ol_enable_aci="$ol_arg"
1573
1574 else
1575         ol_enable_aci="no"
1576 fi
1577 # end --enable-aci
1578 # OpenLDAP --enable-cleartext
1579         # Check whether --enable-cleartext or --disable-cleartext was given.
1580 if test "${enable_cleartext+set}" = set; then
1581   enableval="$enable_cleartext"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto yes no ; do
1585                 if test "$enableval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1591         fi
1592         ol_enable_cleartext="$ol_arg"
1593
1594 else
1595         ol_enable_cleartext="yes"
1596 fi
1597 # end --enable-cleartext
1598 # OpenLDAP --enable-crypt
1599         # Check whether --enable-crypt or --disable-crypt was given.
1600 if test "${enable_crypt+set}" = set; then
1601   enableval="$enable_crypt"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto yes no ; do
1605                 if test "$enableval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1611         fi
1612         ol_enable_crypt="$ol_arg"
1613
1614 else
1615         ol_enable_crypt="no"
1616 fi
1617 # end --enable-crypt
1618 # OpenLDAP --enable-dynamic
1619         # Check whether --enable-dynamic or --disable-dynamic was given.
1620 if test "${enable_dynamic+set}" = set; then
1621   enableval="$enable_dynamic"
1622   
1623         ol_arg=invalid
1624         for ol_val in auto yes no ; do
1625                 if test "$enableval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1631         fi
1632         ol_enable_dynamic="$ol_arg"
1633
1634 else
1635         ol_enable_dynamic="no"
1636 fi
1637 # end --enable-dynamic
1638 # OpenLDAP --enable-kpasswd
1639         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1640 if test "${enable_kpasswd+set}" = set; then
1641   enableval="$enable_kpasswd"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto yes no ; do
1645                 if test "$enableval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1651         fi
1652         ol_enable_kpasswd="$ol_arg"
1653
1654 else
1655         ol_enable_kpasswd="no"
1656 fi
1657 # end --enable-kpasswd
1658 # OpenLDAP --enable-lmpasswd
1659         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1660 if test "${enable_lmpasswd+set}" = set; then
1661   enableval="$enable_lmpasswd"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1671         fi
1672         ol_enable_lmpasswd="$ol_arg"
1673
1674 else
1675         ol_enable_lmpasswd="no"
1676 fi
1677 # end --enable-lmpasswd
1678 # OpenLDAP --enable-spasswd
1679         # Check whether --enable-spasswd or --disable-spasswd was given.
1680 if test "${enable_spasswd+set}" = set; then
1681   enableval="$enable_spasswd"
1682   
1683         ol_arg=invalid
1684         for ol_val in auto yes no ; do
1685                 if test "$enableval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1691         fi
1692         ol_enable_spasswd="$ol_arg"
1693
1694 else
1695         ol_enable_spasswd="no"
1696 fi
1697 # end --enable-spasswd
1698 # OpenLDAP --enable-modules
1699         # Check whether --enable-modules or --disable-modules was given.
1700 if test "${enable_modules+set}" = set; then
1701   enableval="$enable_modules"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no ; do
1705                 if test "$enableval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1711         fi
1712         ol_enable_modules="$ol_arg"
1713
1714 else
1715         ol_enable_modules="no"
1716 fi
1717 # end --enable-modules
1718 # OpenLDAP --enable-phonetic
1719         # Check whether --enable-phonetic or --disable-phonetic was given.
1720 if test "${enable_phonetic+set}" = set; then
1721   enableval="$enable_phonetic"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no ; do
1725                 if test "$enableval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1731         fi
1732         ol_enable_phonetic="$ol_arg"
1733
1734 else
1735         ol_enable_phonetic="no"
1736 fi
1737 # end --enable-phonetic
1738 # OpenLDAP --enable-rlookups
1739         # Check whether --enable-rlookups or --disable-rlookups was given.
1740 if test "${enable_rlookups+set}" = set; then
1741   enableval="$enable_rlookups"
1742   
1743         ol_arg=invalid
1744         for ol_val in auto yes no ; do
1745                 if test "$enableval" = "$ol_val" ; then
1746                         ol_arg="$ol_val"
1747                 fi
1748         done
1749         if test "$ol_arg" = "invalid" ; then
1750                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1751         fi
1752         ol_enable_rlookups="$ol_arg"
1753
1754 else
1755         ol_enable_rlookups="no"
1756 fi
1757 # end --enable-rlookups
1758 # OpenLDAP --enable-slp
1759         # Check whether --enable-slp or --disable-slp was given.
1760 if test "${enable_slp+set}" = set; then
1761   enableval="$enable_slp"
1762   
1763         ol_arg=invalid
1764         for ol_val in auto yes no ; do
1765                 if test "$enableval" = "$ol_val" ; then
1766                         ol_arg="$ol_val"
1767                 fi
1768         done
1769         if test "$ol_arg" = "invalid" ; then
1770                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1771         fi
1772         ol_enable_slp="$ol_arg"
1773
1774 else
1775         ol_enable_slp="no"
1776 fi
1777 # end --enable-slp
1778 # OpenLDAP --enable-wrappers
1779         # Check whether --enable-wrappers or --disable-wrappers was given.
1780 if test "${enable_wrappers+set}" = set; then
1781   enableval="$enable_wrappers"
1782   
1783         ol_arg=invalid
1784         for ol_val in auto yes no ; do
1785                 if test "$enableval" = "$ol_val" ; then
1786                         ol_arg="$ol_val"
1787                 fi
1788         done
1789         if test "$ol_arg" = "invalid" ; then
1790                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1791         fi
1792         ol_enable_wrappers="$ol_arg"
1793
1794 else
1795         ol_enable_wrappers="no"
1796 fi
1797 # end --enable-wrappers
1798
1799 # OpenLDAP --enable-bdb
1800         # Check whether --enable-bdb or --disable-bdb was given.
1801 if test "${enable_bdb+set}" = set; then
1802   enableval="$enable_bdb"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1812         fi
1813         ol_enable_bdb="$ol_arg"
1814
1815 else
1816         ol_enable_bdb="no"
1817 fi
1818 # end --enable-bdb
1819 # OpenLDAP --with-bdb_module
1820         # Check whether --with-bdb_module or --without-bdb_module was given.
1821 if test "${with_bdb_module+set}" = set; then
1822   withval="$with_bdb_module"
1823   
1824         ol_arg=invalid
1825         for ol_val in static dynamic ; do
1826                 if test "$withval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1832         fi
1833         ol_with_bdb_module="$ol_arg"
1834
1835 else
1836         ol_with_bdb_module="static"
1837 fi
1838 # end --with-bdb_module
1839
1840 # OpenLDAP --enable-dnssrv
1841         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1842 if test "${enable_dnssrv+set}" = set; then
1843   enableval="$enable_dnssrv"
1844   
1845         ol_arg=invalid
1846         for ol_val in auto yes no ; do
1847                 if test "$enableval" = "$ol_val" ; then
1848                         ol_arg="$ol_val"
1849                 fi
1850         done
1851         if test "$ol_arg" = "invalid" ; then
1852                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1853         fi
1854         ol_enable_dnssrv="$ol_arg"
1855
1856 else
1857         ol_enable_dnssrv="no"
1858 fi
1859 # end --enable-dnssrv
1860 # OpenLDAP --with-dnssrv_module
1861         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1862 if test "${with_dnssrv_module+set}" = set; then
1863   withval="$with_dnssrv_module"
1864   
1865         ol_arg=invalid
1866         for ol_val in static dynamic ; do
1867                 if test "$withval" = "$ol_val" ; then
1868                         ol_arg="$ol_val"
1869                 fi
1870         done
1871         if test "$ol_arg" = "invalid" ; then
1872                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1873         fi
1874         ol_with_dnssrv_module="$ol_arg"
1875
1876 else
1877         ol_with_dnssrv_module="static"
1878 fi
1879 # end --with-dnssrv_module
1880
1881 # OpenLDAP --enable-ldap
1882         # Check whether --enable-ldap or --disable-ldap was given.
1883 if test "${enable_ldap+set}" = set; then
1884   enableval="$enable_ldap"
1885   
1886         ol_arg=invalid
1887         for ol_val in auto yes no ; do
1888                 if test "$enableval" = "$ol_val" ; then
1889                         ol_arg="$ol_val"
1890                 fi
1891         done
1892         if test "$ol_arg" = "invalid" ; then
1893                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1894         fi
1895         ol_enable_ldap="$ol_arg"
1896
1897 else
1898         ol_enable_ldap="no"
1899 fi
1900 # end --enable-ldap
1901 # OpenLDAP --with-ldap_module
1902         # Check whether --with-ldap_module or --without-ldap_module was given.
1903 if test "${with_ldap_module+set}" = set; then
1904   withval="$with_ldap_module"
1905   
1906         ol_arg=invalid
1907         for ol_val in static dynamic ; do
1908                 if test "$withval" = "$ol_val" ; then
1909                         ol_arg="$ol_val"
1910                 fi
1911         done
1912         if test "$ol_arg" = "invalid" ; then
1913                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1914         fi
1915         ol_with_ldap_module="$ol_arg"
1916
1917 else
1918         ol_with_ldap_module="static"
1919 fi
1920 # end --with-ldap_module
1921
1922 # OpenLDAP --enable-ldbm
1923         # Check whether --enable-ldbm or --disable-ldbm was given.
1924 if test "${enable_ldbm+set}" = set; then
1925   enableval="$enable_ldbm"
1926   
1927         ol_arg=invalid
1928         for ol_val in auto yes no ; do
1929                 if test "$enableval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1935         fi
1936         ol_enable_ldbm="$ol_arg"
1937
1938 else
1939         ol_enable_ldbm="yes"
1940 fi
1941 # end --enable-ldbm
1942 # OpenLDAP --with-ldbm_api
1943         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1944 if test "${with_ldbm_api+set}" = set; then
1945   withval="$with_ldbm_api"
1946   
1947         ol_arg=invalid
1948         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1949                 if test "$withval" = "$ol_val" ; then
1950                         ol_arg="$ol_val"
1951                 fi
1952         done
1953         if test "$ol_arg" = "invalid" ; then
1954                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1955         fi
1956         ol_with_ldbm_api="$ol_arg"
1957
1958 else
1959         ol_with_ldbm_api="auto"
1960 fi
1961 # end --with-ldbm_api
1962
1963 # OpenLDAP --with-ldbm_module
1964         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1965 if test "${with_ldbm_module+set}" = set; then
1966   withval="$with_ldbm_module"
1967   
1968         ol_arg=invalid
1969         for ol_val in static dynamic ; do
1970                 if test "$withval" = "$ol_val" ; then
1971                         ol_arg="$ol_val"
1972                 fi
1973         done
1974         if test "$ol_arg" = "invalid" ; then
1975                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1976         fi
1977         ol_with_ldbm_module="$ol_arg"
1978
1979 else
1980         ol_with_ldbm_module="static"
1981 fi
1982 # end --with-ldbm_module
1983
1984 # OpenLDAP --with-ldbm_type
1985         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1986 if test "${with_ldbm_type+set}" = set; then
1987   withval="$with_ldbm_type"
1988   
1989         ol_arg=invalid
1990         for ol_val in auto btree hash ; do
1991                 if test "$withval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1997         fi
1998         ol_with_ldbm_type="$ol_arg"
1999
2000 else
2001         ol_with_ldbm_type="auto"
2002 fi
2003 # end --with-ldbm_type
2004
2005 # OpenLDAP --enable-passwd
2006         # Check whether --enable-passwd or --disable-passwd was given.
2007 if test "${enable_passwd+set}" = set; then
2008   enableval="$enable_passwd"
2009   
2010         ol_arg=invalid
2011         for ol_val in auto yes no ; do
2012                 if test "$enableval" = "$ol_val" ; then
2013                         ol_arg="$ol_val"
2014                 fi
2015         done
2016         if test "$ol_arg" = "invalid" ; then
2017                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2018         fi
2019         ol_enable_passwd="$ol_arg"
2020
2021 else
2022         ol_enable_passwd="no"
2023 fi
2024 # end --enable-passwd
2025 # OpenLDAP --with-passwd_module
2026         # Check whether --with-passwd_module or --without-passwd_module was given.
2027 if test "${with_passwd_module+set}" = set; then
2028   withval="$with_passwd_module"
2029   
2030         ol_arg=invalid
2031         for ol_val in static dynamic ; do
2032                 if test "$withval" = "$ol_val" ; then
2033                         ol_arg="$ol_val"
2034                 fi
2035         done
2036         if test "$ol_arg" = "invalid" ; then
2037                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2038         fi
2039         ol_with_passwd_module="$ol_arg"
2040
2041 else
2042         ol_with_passwd_module="static"
2043 fi
2044 # end --with-passwd_module
2045
2046 # OpenLDAP --enable-perl
2047         # Check whether --enable-perl or --disable-perl was given.
2048 if test "${enable_perl+set}" = set; then
2049   enableval="$enable_perl"
2050   
2051         ol_arg=invalid
2052         for ol_val in auto yes no ; do
2053                 if test "$enableval" = "$ol_val" ; then
2054                         ol_arg="$ol_val"
2055                 fi
2056         done
2057         if test "$ol_arg" = "invalid" ; then
2058                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2059         fi
2060         ol_enable_perl="$ol_arg"
2061
2062 else
2063         ol_enable_perl="no"
2064 fi
2065 # end --enable-perl
2066 # OpenLDAP --with-perl_module
2067         # Check whether --with-perl_module or --without-perl_module was given.
2068 if test "${with_perl_module+set}" = set; then
2069   withval="$with_perl_module"
2070   
2071         ol_arg=invalid
2072         for ol_val in static dynamic ; do
2073                 if test "$withval" = "$ol_val" ; then
2074                         ol_arg="$ol_val"
2075                 fi
2076         done
2077         if test "$ol_arg" = "invalid" ; then
2078                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2079         fi
2080         ol_with_perl_module="$ol_arg"
2081
2082 else
2083         ol_with_perl_module="static"
2084 fi
2085 # end --with-perl_module
2086
2087 # OpenLDAP --enable-shell
2088         # Check whether --enable-shell or --disable-shell was given.
2089 if test "${enable_shell+set}" = set; then
2090   enableval="$enable_shell"
2091   
2092         ol_arg=invalid
2093         for ol_val in auto yes no ; do
2094                 if test "$enableval" = "$ol_val" ; then
2095                         ol_arg="$ol_val"
2096                 fi
2097         done
2098         if test "$ol_arg" = "invalid" ; then
2099                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2100         fi
2101         ol_enable_shell="$ol_arg"
2102
2103 else
2104         ol_enable_shell="no"
2105 fi
2106 # end --enable-shell
2107 # OpenLDAP --with-shell_module
2108         # Check whether --with-shell_module or --without-shell_module was given.
2109 if test "${with_shell_module+set}" = set; then
2110   withval="$with_shell_module"
2111   
2112         ol_arg=invalid
2113         for ol_val in static dynamic ; do
2114                 if test "$withval" = "$ol_val" ; then
2115                         ol_arg="$ol_val"
2116                 fi
2117         done
2118         if test "$ol_arg" = "invalid" ; then
2119                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2120         fi
2121         ol_with_shell_module="$ol_arg"
2122
2123 else
2124         ol_with_shell_module="static"
2125 fi
2126 # end --with-shell_module
2127
2128 # OpenLDAP --enable-sql
2129         # Check whether --enable-sql or --disable-sql was given.
2130 if test "${enable_sql+set}" = set; then
2131   enableval="$enable_sql"
2132   
2133         ol_arg=invalid
2134         for ol_val in auto yes no ; do
2135                 if test "$enableval" = "$ol_val" ; then
2136                         ol_arg="$ol_val"
2137                 fi
2138         done
2139         if test "$ol_arg" = "invalid" ; then
2140                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2141         fi
2142         ol_enable_sql="$ol_arg"
2143
2144 else
2145         ol_enable_sql="no"
2146 fi
2147 # end --enable-sql
2148 # OpenLDAP --with-sql_module
2149         # Check whether --with-sql_module or --without-sql_module was given.
2150 if test "${with_sql_module+set}" = set; then
2151   withval="$with_sql_module"
2152   
2153         ol_arg=invalid
2154         for ol_val in static dynamic ; do
2155                 if test "$withval" = "$ol_val" ; then
2156                         ol_arg="$ol_val"
2157                 fi
2158         done
2159         if test "$ol_arg" = "invalid" ; then
2160                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2161         fi
2162         ol_with_sql_module="$ol_arg"
2163
2164 else
2165         ol_with_sql_module="static"
2166 fi
2167 # end --with-sql_module
2168
2169 # OpenLDAP --enable-tcl
2170         # Check whether --enable-tcl or --disable-tcl was given.
2171 if test "${enable_tcl+set}" = set; then
2172   enableval="$enable_tcl"
2173   
2174         ol_arg=invalid
2175         for ol_val in auto yes no ; do
2176                 if test "$enableval" = "$ol_val" ; then
2177                         ol_arg="$ol_val"
2178                 fi
2179         done
2180         if test "$ol_arg" = "invalid" ; then
2181                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2182         fi
2183         ol_enable_tcl="$ol_arg"
2184
2185 else
2186         ol_enable_tcl="no"
2187 fi
2188 # end --enable-tcl
2189 # OpenLDAP --with-tcl_module
2190         # Check whether --with-tcl_module or --without-tcl_module was given.
2191 if test "${with_tcl_module+set}" = set; then
2192   withval="$with_tcl_module"
2193   
2194         ol_arg=invalid
2195         for ol_val in static dynamic ; do
2196                 if test "$withval" = "$ol_val" ; then
2197                         ol_arg="$ol_val"
2198                 fi
2199         done
2200         if test "$ol_arg" = "invalid" ; then
2201                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2202         fi
2203         ol_with_tcl_module="$ol_arg"
2204
2205 else
2206         ol_with_tcl_module="static"
2207 fi
2208 # end --with-tcl_module
2209
2210
2211 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2212 if test "${with_xxslurpdoptions+set}" = set; then
2213   withval="$with_xxslurpdoptions"
2214   :
2215 fi
2216
2217 # OpenLDAP --enable-slurpd
2218         # Check whether --enable-slurpd or --disable-slurpd was given.
2219 if test "${enable_slurpd+set}" = set; then
2220   enableval="$enable_slurpd"
2221   
2222         ol_arg=invalid
2223         for ol_val in auto yes no ; do
2224                 if test "$enableval" = "$ol_val" ; then
2225                         ol_arg="$ol_val"
2226                 fi
2227         done
2228         if test "$ol_arg" = "invalid" ; then
2229                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2230         fi
2231         ol_enable_slurpd="$ol_arg"
2232
2233 else
2234         ol_enable_slurpd="auto"
2235 fi
2236 # end --enable-slurpd
2237
2238 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2239 if test "${with_xxliboptions+set}" = set; then
2240   withval="$with_xxliboptions"
2241   :
2242 fi
2243
2244 # Check whether --enable-static or --disable-static was given.
2245 if test "${enable_static+set}" = set; then
2246   enableval="$enable_static"
2247   p=${PACKAGE-default}
2248 case "$enableval" in
2249 yes) enable_static=yes ;;
2250 no) enable_static=no ;;
2251 *)
2252   enable_static=no
2253   # Look at the argument we got.  We use all the common list separators.
2254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2255   for pkg in $enableval; do
2256     if test "X$pkg" = "X$p"; then
2257       enable_static=yes
2258     fi
2259   done
2260   IFS="$ac_save_ifs"
2261   ;;
2262 esac
2263 else
2264   enable_static=yes
2265 fi
2266
2267 # Check whether --enable-shared or --disable-shared was given.
2268 if test "${enable_shared+set}" = set; then
2269   enableval="$enable_shared"
2270   p=${PACKAGE-default}
2271 case "$enableval" in
2272 yes) enable_shared=yes ;;
2273 no) enable_shared=no ;;
2274 *)
2275   enable_shared=no
2276   # Look at the argument we got.  We use all the common list separators.
2277   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2278   for pkg in $enableval; do
2279     if test "X$pkg" = "X$p"; then
2280       enable_shared=yes
2281     fi
2282   done
2283   IFS="$ac_save_ifs"
2284   ;;
2285 esac
2286 else
2287   enable_shared=yes
2288 fi
2289
2290
2291
2292 # validate options
2293 if test $ol_enable_slapd = no ; then
2294                 if test $ol_enable_bdb = yes ; then
2295                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2296         fi
2297         if test $ol_enable_dnssrv = yes ; then
2298                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2299         fi
2300         if test $ol_enable_ldap = yes ; then
2301                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2302         fi
2303         if test $ol_enable_ldbm = yes ; then
2304                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2305         fi
2306         if test $ol_enable_passwd = yes ; then
2307                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2308         fi
2309         if test $ol_enable_perl = yes ; then
2310                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2311         fi
2312         if test $ol_enable_shell = yes ; then
2313                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2314         fi
2315         if test $ol_enable_tcl = yes ; then
2316                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2317         fi
2318         if test $ol_enable_sql = yes ; then
2319                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2320         fi
2321         if test $ol_enable_modules = yes ; then
2322                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2323         fi
2324         if test $ol_enable_wrappers = yes ; then
2325                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2326         fi
2327         if test $ol_enable_phonetic = yes ; then
2328                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2329         fi
2330         if test $ol_enable_rlookups = yes ; then
2331                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2332         fi
2333         if test $ol_enable_aci = yes ; then
2334                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2335         fi
2336         if test $ol_with_ldbm_api != auto ; then
2337                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2338         fi
2339         if test $ol_with_ldbm_type != auto ; then
2340                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2341         fi
2342         if test $ol_with_bdb_module != static ; then
2343                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2344         fi
2345         if test $ol_with_dnssrv_module != static ; then
2346                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2347         fi
2348         if test $ol_with_ldap_module != static ; then
2349                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2350         fi
2351         if test $ol_with_ldbm_module != static ; then
2352                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2353         fi
2354         if test $ol_with_passwd_module != static ; then
2355                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2356         fi
2357         if test $ol_with_perl_module != static ; then
2358                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2359         fi
2360         if test $ol_with_shell_module != static ; then
2361                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2362         fi
2363         if test $ol_with_tcl_module != static ; then
2364                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2365         fi
2366         if test $ol_with_sql_module != static ; then
2367                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2368         fi
2369         if test $ol_enable_slurpd = yes ; then
2370                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2371         fi
2372
2373         # force settings to no
2374         ol_enable_bdb=no
2375         ol_enable_dnssrv=no
2376         ol_enable_ldap=no
2377         ol_enable_ldbm=no
2378         ol_enable_passwd=no
2379         ol_enable_perl=no
2380         ol_enable_shell=no
2381         ol_enable_tcl=no
2382         ol_enable_sql=no
2383
2384         ol_enable_modules=no
2385         ol_enable_phonetic=no
2386         ol_enable_rlookups=no
2387         ol_enable_aci=no
2388         ol_enable_wrappers=no
2389         ol_enable_dynamic=no
2390
2391         ol_with_ldbm_api=no
2392         ol_with_ldbm_type=no
2393
2394         ol_with_bdb_module=static
2395         ol_with_dnssrv_module=static
2396         ol_with_ldap_module=static
2397         ol_with_ldbm_module=static
2398         ol_with_passwd_module=static
2399         ol_with_perl_module=static
2400         ol_with_shell_module=static
2401         ol_with_tcl_module=static
2402         ol_with_sql_module=static
2403
2404         ol_enable_slurpd=no
2405
2406 elif test $ol_enable_ldbm = no ; then
2407         
2408         if test $ol_with_ldbm_api != auto ; then
2409                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2410         fi
2411
2412         if test $ol_with_ldbm_type != auto ; then
2413                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2414         fi
2415
2416         if test $ol_with_ldbm_module != static ; then
2417                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2418         fi
2419
2420         if test $ol_enable_modules != yes -a \
2421                 $ol_enable_bdb = no -a \
2422                 $ol_enable_dnssrv = no -a \
2423                 $ol_enable_ldap = no -a \
2424                 $ol_enable_passwd = no -a \
2425                 $ol_enable_perl = no -a \
2426                 $ol_enable_shell = no -a \
2427                 $ol_enable_sql = no -a \
2428                 $ol_enable_tcl = no ; then
2429                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2430         fi
2431
2432         ol_with_ldbm_api=no
2433         ol_with_ldbm_type=no
2434         ol_with_ldbm_module=static
2435
2436 else
2437                 if test $ol_with_ldbm_api = gdbm -a \
2438                 $ol_with_ldbm_type = btree ; then
2439                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2440         fi
2441         if test $ol_with_ldbm_api = mdbm -a \
2442                 $ol_with_ldbm_type = btree ; then
2443                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2444         fi
2445         if test $ol_with_ldbm_api = ndbm -a \
2446                 $ol_with_ldbm_type = btree ; then
2447                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2448         fi
2449 fi
2450
2451 if test $ol_enable_slurpd = yes ; then
2452                 if test $ol_with_threads = no ; then
2453                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2454         fi
2455 fi
2456
2457 if test $ol_enable_lmpasswd = yes ; then
2458         if test $ol_with_tls = no ; then
2459                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2460         fi
2461 fi
2462
2463 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2464         if test $ol_with_kerberos = no ; then
2465                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2466         fi
2467         ol_with_kerberos=yes
2468 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2469         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2470                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2471         fi
2472         ol_with_kerberos=no
2473 fi
2474
2475 if test $ol_enable_spasswd = yes ; then
2476         if test $ol_with_cyrus_sasl = no ; then
2477                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2478         fi
2479         ol_with_cyrus_sasl=yes
2480 fi
2481
2482 echo "$ac_t""done" 1>&6
2483
2484 LDAP_LIBS=
2485 LDIF_LIBS=
2486 LDBM_LIBS=
2487 LTHREAD_LIBS=
2488 LUTIL_LIBS=
2489
2490 SLAPD_LIBS=
2491 SLURPD_LIBS=
2492
2493 BUILD_SLAPD=no
2494 BUILD_SLURPD=no
2495
2496 BUILD_THREAD=no
2497
2498 BUILD_BDB=no
2499 BUILD_DNSSRV=no
2500 BUILD_LDAP=no
2501 BUILD_LDBM=no
2502 BUILD_PASSWD=no
2503 BUILD_PERL=no
2504 BUILD_SHELL=no
2505 BUILD_SQL=no
2506 BUILD_TCL=no
2507
2508 BUILD_BDB_DYNAMIC=static
2509 BUILD_DNSSRV_DYNAMIC=static
2510 BUILD_LDAP_DYNAMIC=static
2511 BUILD_LDBM_DYNAMIC=static
2512 BUILD_PASSWD_DYNAMIC=static
2513 BUILD_PERL_DYNAMIC=static
2514 BUILD_SHELL_DYNAMIC=static
2515 BUILD_TCL_DYNAMIC=static
2516 BUILD_SQL_DYNAMIC=static
2517
2518 SLAPD_MODULES_LDFLAGS=
2519 SLAPD_MODULES_CPPFLAGS=
2520 SLAPD_MODULES_LIST=
2521
2522 SLAPD_PERL_LDFLAGS=
2523 MOD_PERL_LDFLAGS=
2524 PERL_CPPFLAGS=
2525
2526 SLAPD_SQL_LDFLAGS=
2527 SLAPD_SQL_LIBS=
2528 SLAPD_SQL_INCLUDES=
2529
2530 MOD_TCL_LIB=
2531 KRB4_LIBS=
2532 KRB5_LIBS=
2533 READLINE_LIBS=
2534 SASL_LIBS=
2535 TERMCAP_LIBS=
2536 TLS_LIBS=
2537 MODULES_LIBS=
2538 AUTH_LIBS=
2539
2540 SLAPD_SLP_LIBS=
2541
2542
2543
2544 cat >> confdefs.h <<\EOF
2545 #define HAVE_MKVERSION 1
2546 EOF
2547
2548
2549
2550
2551 ol_aix_threads=no
2552 case "$target" in
2553 *-*-aix*)       if test -z "$CC" ; then
2554                 case "$ol_with_threads" in
2555                 auto | yes |  posix) ol_aix_threads=yes ;;
2556                 esac
2557         fi
2558 ;;
2559 esac
2560
2561 if test $ol_aix_threads = yes ; then
2562         if test -z "${CC}" ; then
2563                 for ac_prog in cc_r xlc_r cc
2564 do
2565 # Extract the first word of "$ac_prog", so it can be a program name with args.
2566 set dummy $ac_prog; ac_word=$2
2567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2568 echo "configure:2569: checking for $ac_word" >&5
2569 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2570   echo $ac_n "(cached) $ac_c" 1>&6
2571 else
2572   if test -n "$CC"; then
2573   ac_cv_prog_CC="$CC" # Let the user override the test.
2574 else
2575   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2576   ac_dummy="$PATH"
2577   for ac_dir in $ac_dummy; do
2578     test -z "$ac_dir" && ac_dir=.
2579     if test -f $ac_dir/$ac_word; then
2580       ac_cv_prog_CC="$ac_prog"
2581       break
2582     fi
2583   done
2584   IFS="$ac_save_ifs"
2585 fi
2586 fi
2587 CC="$ac_cv_prog_CC"
2588 if test -n "$CC"; then
2589   echo "$ac_t""$CC" 1>&6
2590 else
2591   echo "$ac_t""no" 1>&6
2592 fi
2593
2594 test -n "$CC" && break
2595 done
2596
2597
2598                 if test "$CC" = cc ; then
2599                                                 if test $ol_with_threads != auto ; then
2600                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2601                         else
2602                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2603                         fi
2604                         ol_with_threads=no
2605                 fi
2606         fi
2607
2608         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2609                 ol_with_threads=posix
2610                 ol_cv_pthread_create=yes
2611         fi
2612 fi
2613
2614 if test -z "${CC}"; then
2615         for ac_prog in cc
2616 do
2617 # Extract the first word of "$ac_prog", so it can be a program name with args.
2618 set dummy $ac_prog; ac_word=$2
2619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2620 echo "configure:2621: checking for $ac_word" >&5
2621 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2622   echo $ac_n "(cached) $ac_c" 1>&6
2623 else
2624   if test -n "$CC"; then
2625   ac_cv_prog_CC="$CC" # Let the user override the test.
2626 else
2627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2628   ac_dummy="$PATH"
2629   for ac_dir in $ac_dummy; do
2630     test -z "$ac_dir" && ac_dir=.
2631     if test -f $ac_dir/$ac_word; then
2632       ac_cv_prog_CC="$ac_prog"
2633       break
2634     fi
2635   done
2636   IFS="$ac_save_ifs"
2637 fi
2638 fi
2639 CC="$ac_cv_prog_CC"
2640 if test -n "$CC"; then
2641   echo "$ac_t""$CC" 1>&6
2642 else
2643   echo "$ac_t""no" 1>&6
2644 fi
2645
2646 test -n "$CC" && break
2647 done
2648
2649 fi
2650
2651
2652
2653
2654 # Check whether --enable-fast-install or --disable-fast-install was given.
2655 if test "${enable_fast_install+set}" = set; then
2656   enableval="$enable_fast_install"
2657   p=${PACKAGE-default}
2658 case "$enableval" in
2659 yes) enable_fast_install=yes ;;
2660 no) enable_fast_install=no ;;
2661 *)
2662   enable_fast_install=no
2663   # Look at the argument we got.  We use all the common list separators.
2664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2665   for pkg in $enableval; do
2666     if test "X$pkg" = "X$p"; then
2667       enable_fast_install=yes
2668     fi
2669   done
2670   IFS="$ac_save_ifs"
2671   ;;
2672 esac
2673 else
2674   enable_fast_install=yes
2675 fi
2676
2677 # Extract the first word of "ranlib", so it can be a program name with args.
2678 set dummy ranlib; ac_word=$2
2679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2680 echo "configure:2681: checking for $ac_word" >&5
2681 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   if test -n "$RANLIB"; then
2685   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2686 else
2687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2688   ac_dummy="$PATH"
2689   for ac_dir in $ac_dummy; do
2690     test -z "$ac_dir" && ac_dir=.
2691     if test -f $ac_dir/$ac_word; then
2692       ac_cv_prog_RANLIB="ranlib"
2693       break
2694     fi
2695   done
2696   IFS="$ac_save_ifs"
2697   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2698 fi
2699 fi
2700 RANLIB="$ac_cv_prog_RANLIB"
2701 if test -n "$RANLIB"; then
2702   echo "$ac_t""$RANLIB" 1>&6
2703 else
2704   echo "$ac_t""no" 1>&6
2705 fi
2706
2707 # Extract the first word of "gcc", so it can be a program name with args.
2708 set dummy gcc; ac_word=$2
2709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2710 echo "configure:2711: checking for $ac_word" >&5
2711 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2712   echo $ac_n "(cached) $ac_c" 1>&6
2713 else
2714   if test -n "$CC"; then
2715   ac_cv_prog_CC="$CC" # Let the user override the test.
2716 else
2717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2718   ac_dummy="$PATH"
2719   for ac_dir in $ac_dummy; do
2720     test -z "$ac_dir" && ac_dir=.
2721     if test -f $ac_dir/$ac_word; then
2722       ac_cv_prog_CC="gcc"
2723       break
2724     fi
2725   done
2726   IFS="$ac_save_ifs"
2727 fi
2728 fi
2729 CC="$ac_cv_prog_CC"
2730 if test -n "$CC"; then
2731   echo "$ac_t""$CC" 1>&6
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735
2736 if test -z "$CC"; then
2737   # Extract the first word of "cc", so it can be a program name with args.
2738 set dummy cc; ac_word=$2
2739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2740 echo "configure:2741: checking for $ac_word" >&5
2741 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   if test -n "$CC"; then
2745   ac_cv_prog_CC="$CC" # Let the user override the test.
2746 else
2747   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2748   ac_prog_rejected=no
2749   ac_dummy="$PATH"
2750   for ac_dir in $ac_dummy; do
2751     test -z "$ac_dir" && ac_dir=.
2752     if test -f $ac_dir/$ac_word; then
2753       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2754         ac_prog_rejected=yes
2755         continue
2756       fi
2757       ac_cv_prog_CC="cc"
2758       break
2759     fi
2760   done
2761   IFS="$ac_save_ifs"
2762 if test $ac_prog_rejected = yes; then
2763   # We found a bogon in the path, so make sure we never use it.
2764   set dummy $ac_cv_prog_CC
2765   shift
2766   if test $# -gt 0; then
2767     # We chose a different compiler from the bogus one.
2768     # However, it has the same basename, so the bogon will be chosen
2769     # first if we set CC to just the basename; use the full file name.
2770     shift
2771     set dummy "$ac_dir/$ac_word" "$@"
2772     shift
2773     ac_cv_prog_CC="$@"
2774   fi
2775 fi
2776 fi
2777 fi
2778 CC="$ac_cv_prog_CC"
2779 if test -n "$CC"; then
2780   echo "$ac_t""$CC" 1>&6
2781 else
2782   echo "$ac_t""no" 1>&6
2783 fi
2784
2785   if test -z "$CC"; then
2786     case "`uname -s`" in
2787     *win32* | *WIN32* | *CYGWIN*)
2788       # Extract the first word of "cl", so it can be a program name with args.
2789 set dummy cl; ac_word=$2
2790 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2791 echo "configure:2792: checking for $ac_word" >&5
2792 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   if test -n "$CC"; then
2796   ac_cv_prog_CC="$CC" # Let the user override the test.
2797 else
2798   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2799   ac_dummy="$PATH"
2800   for ac_dir in $ac_dummy; do
2801     test -z "$ac_dir" && ac_dir=.
2802     if test -f $ac_dir/$ac_word; then
2803       ac_cv_prog_CC="cl"
2804       break
2805     fi
2806   done
2807   IFS="$ac_save_ifs"
2808 fi
2809 fi
2810 CC="$ac_cv_prog_CC"
2811 if test -n "$CC"; then
2812   echo "$ac_t""$CC" 1>&6
2813 else
2814   echo "$ac_t""no" 1>&6
2815 fi
2816  ;;
2817     esac
2818   fi
2819   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2820 fi
2821
2822 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2823 echo "configure:2824: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2824
2825 ac_ext=c
2826 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2827 ac_cpp='$CPP $CPPFLAGS'
2828 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2829 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2830 cross_compiling=$ac_cv_prog_cc_cross
2831
2832 cat > conftest.$ac_ext << EOF
2833
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836
2837 main(){return(0);}
2838 EOF
2839 if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2840   ac_cv_prog_cc_works=yes
2841   # If we can't run a trivial program, we are probably using a cross compiler.
2842   if (./conftest; exit) 2>/dev/null; then
2843     ac_cv_prog_cc_cross=no
2844   else
2845     ac_cv_prog_cc_cross=yes
2846   fi
2847 else
2848   echo "configure: failed program was:" >&5
2849   cat conftest.$ac_ext >&5
2850   ac_cv_prog_cc_works=no
2851 fi
2852 rm -fr conftest*
2853 ac_ext=c
2854 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2855 ac_cpp='$CPP $CPPFLAGS'
2856 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2857 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2858 cross_compiling=$ac_cv_prog_cc_cross
2859
2860 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2861 if test $ac_cv_prog_cc_works = no; then
2862   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2863 fi
2864 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2865 echo "configure:2866: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2866 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2867 cross_compiling=$ac_cv_prog_cc_cross
2868
2869 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2870 echo "configure:2871: checking whether we are using GNU C" >&5
2871 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2872   echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874   cat > conftest.c <<EOF
2875 #ifdef __GNUC__
2876   yes;
2877 #endif
2878 EOF
2879 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2880   ac_cv_prog_gcc=yes
2881 else
2882   ac_cv_prog_gcc=no
2883 fi
2884 fi
2885
2886 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2887
2888 if test $ac_cv_prog_gcc = yes; then
2889   GCC=yes
2890 else
2891   GCC=
2892 fi
2893
2894 ac_test_CFLAGS="${CFLAGS+set}"
2895 ac_save_CFLAGS="$CFLAGS"
2896 CFLAGS=
2897 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2898 echo "configure:2899: checking whether ${CC-cc} accepts -g" >&5
2899 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   echo 'void f(){}' > conftest.c
2903 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2904   ac_cv_prog_cc_g=yes
2905 else
2906   ac_cv_prog_cc_g=no
2907 fi
2908 rm -f conftest*
2909
2910 fi
2911
2912 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2913 if test "$ac_test_CFLAGS" = set; then
2914   CFLAGS="$ac_save_CFLAGS"
2915 elif test $ac_cv_prog_cc_g = yes; then
2916   if test "$GCC" = yes; then
2917     CFLAGS="-g -O2"
2918   else
2919     CFLAGS="-g"
2920   fi
2921 else
2922   if test "$GCC" = yes; then
2923     CFLAGS="-O2"
2924   else
2925     CFLAGS=
2926   fi
2927 fi
2928
2929 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2930 if test "${with_gnu_ld+set}" = set; then
2931   withval="$with_gnu_ld"
2932   test "$withval" = no || with_gnu_ld=yes
2933 else
2934   with_gnu_ld=no
2935 fi
2936
2937 ac_prog=ld
2938 if test "$ac_cv_prog_gcc" = yes; then
2939   # Check if gcc -print-prog-name=ld gives a path.
2940   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2941 echo "configure:2942: checking for ld used by GCC" >&5
2942   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2943   case "$ac_prog" in
2944     # Accept absolute paths.
2945     [\\/]* | [A-Za-z]:[\\/]*)
2946       re_direlt='/[^/][^/]*/\.\./'
2947       # Canonicalize the path of ld
2948       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2949       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2950         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2951       done
2952       test -z "$LD" && LD="$ac_prog"
2953       ;;
2954   "")
2955     # If it fails, then pretend we aren't using GCC.
2956     ac_prog=ld
2957     ;;
2958   *)
2959     # If it is relative, then search for the first ld in PATH.
2960     with_gnu_ld=unknown
2961     ;;
2962   esac
2963 elif test "$with_gnu_ld" = yes; then
2964   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2965 echo "configure:2966: checking for GNU ld" >&5
2966 else
2967   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2968 echo "configure:2969: checking for non-GNU ld" >&5
2969 fi
2970 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2971   echo $ac_n "(cached) $ac_c" 1>&6
2972 else
2973   if test -z "$LD"; then
2974   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2975   for ac_dir in $PATH; do
2976     test -z "$ac_dir" && ac_dir=.
2977     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2978       ac_cv_path_LD="$ac_dir/$ac_prog"
2979       # Check to see if the program is GNU ld.  I'd rather use --version,
2980       # but apparently some GNU ld's only accept -v.
2981       # Break only if it was the GNU/non-GNU ld that we prefer.
2982       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2983         test "$with_gnu_ld" != no && break
2984       else
2985         test "$with_gnu_ld" != yes && break
2986       fi
2987     fi
2988   done
2989   IFS="$ac_save_ifs"
2990 else
2991   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2992 fi
2993 fi
2994
2995 LD="$ac_cv_path_LD"
2996 if test -n "$LD"; then
2997   echo "$ac_t""$LD" 1>&6
2998 else
2999   echo "$ac_t""no" 1>&6
3000 fi
3001 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3002 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3003 echo "configure:3004: checking if the linker ($LD) is GNU ld" >&5
3004 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3005   echo $ac_n "(cached) $ac_c" 1>&6
3006 else
3007   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3008 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3009   ac_cv_prog_gnu_ld=yes
3010 else
3011   ac_cv_prog_gnu_ld=no
3012 fi
3013 fi
3014
3015 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3016
3017
3018 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3019 echo "configure:3020: checking for BSD-compatible nm" >&5
3020 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   if test -n "$NM"; then
3024   # Let the user override the test.
3025   ac_cv_path_NM="$NM"
3026 else
3027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3028   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3029     test -z "$ac_dir" && ac_dir=.
3030     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3031       # Check to see if the nm accepts a BSD-compat flag.
3032       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3033       #   nm: unknown option "B" ignored
3034       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3035         ac_cv_path_NM="$ac_dir/nm -B"
3036         break
3037       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3038         ac_cv_path_NM="$ac_dir/nm -p"
3039         break
3040       else
3041         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3042         continue # so that we can try to find one that supports BSD flags
3043       fi
3044     fi
3045   done
3046   IFS="$ac_save_ifs"
3047   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3048 fi
3049 fi
3050
3051 NM="$ac_cv_path_NM"
3052 echo "$ac_t""$NM" 1>&6
3053
3054 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3055 echo "configure:3056: checking whether ln -s works" >&5
3056 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3057   echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059   rm -f conftestdata
3060 if ln -s X conftestdata 2>/dev/null
3061 then
3062   rm -f conftestdata
3063   ac_cv_prog_LN_S="ln -s"
3064 else
3065   ac_cv_prog_LN_S=ln
3066 fi
3067 fi
3068 LN_S="$ac_cv_prog_LN_S"
3069 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3070   echo "$ac_t""yes" 1>&6
3071 else
3072   echo "$ac_t""no" 1>&6
3073 fi
3074
3075 if test $host != $build; then
3076   ac_tool_prefix=${host_alias}-
3077 else
3078   ac_tool_prefix=
3079 fi
3080
3081
3082 case "$target" in
3083 NONE) lt_target="$host" ;;
3084 *) lt_target="$target" ;;
3085 esac
3086
3087 # Check for any special flags to pass to ltconfig.
3088 libtool_flags="--cache-file=$cache_file"
3089 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3090 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3091 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3092 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3093 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3094 libtool_flags="$libtool_flags --enable-dlopen"
3095 libtool_flags="$libtool_flags --enable-win32-dll"
3096 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3097 if test "${enable_libtool_lock+set}" = set; then
3098   enableval="$enable_libtool_lock"
3099   :
3100 fi
3101
3102 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3103 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3104
3105 # Some flags need to be propagated to the compiler or linker for good
3106 # libtool support.
3107 case "$lt_target" in
3108 *-*-irix6*)
3109   # Find out which ABI we are using.
3110   echo '#line 3111 "configure"' > conftest.$ac_ext
3111   if { (eval echo configure:3112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3112     case "`/usr/bin/file conftest.o`" in
3113     *32-bit*)
3114       LD="${LD-ld} -32"
3115       ;;
3116     *N32*)
3117       LD="${LD-ld} -n32"
3118       ;;
3119     *64-bit*)
3120       LD="${LD-ld} -64"
3121       ;;
3122     esac
3123   fi
3124   rm -rf conftest*
3125   ;;
3126
3127 *-*-sco3.2v5*)
3128   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3129   SAVE_CFLAGS="$CFLAGS"
3130   CFLAGS="$CFLAGS -belf"
3131   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3132 echo "configure:3133: checking whether the C compiler needs -belf" >&5
3133 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139
3140 int main() {
3141
3142 ; return 0; }
3143 EOF
3144 if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3145   rm -rf conftest*
3146   lt_cv_cc_needs_belf=yes
3147 else
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   lt_cv_cc_needs_belf=no
3152 fi
3153 rm -f conftest*
3154 fi
3155
3156 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3157   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3158     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3159     CFLAGS="$SAVE_CFLAGS"
3160   fi
3161   ;;
3162
3163 *-*-cygwin* | *-*-mingw*)
3164   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3165 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3167 echo "configure:3168: checking for $ac_word" >&5
3168 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3169   echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171   if test -n "$DLLTOOL"; then
3172   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3173 else
3174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3175   ac_dummy="$PATH"
3176   for ac_dir in $ac_dummy; do
3177     test -z "$ac_dir" && ac_dir=.
3178     if test -f $ac_dir/$ac_word; then
3179       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3180       break
3181     fi
3182   done
3183   IFS="$ac_save_ifs"
3184 fi
3185 fi
3186 DLLTOOL="$ac_cv_prog_DLLTOOL"
3187 if test -n "$DLLTOOL"; then
3188   echo "$ac_t""$DLLTOOL" 1>&6
3189 else
3190   echo "$ac_t""no" 1>&6
3191 fi
3192
3193
3194 if test -z "$ac_cv_prog_DLLTOOL"; then
3195 if test -n "$ac_tool_prefix"; then
3196   # Extract the first word of "dlltool", so it can be a program name with args.
3197 set dummy dlltool; ac_word=$2
3198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3199 echo "configure:3200: checking for $ac_word" >&5
3200 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   if test -n "$DLLTOOL"; then
3204   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3205 else
3206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3207   ac_dummy="$PATH"
3208   for ac_dir in $ac_dummy; do
3209     test -z "$ac_dir" && ac_dir=.
3210     if test -f $ac_dir/$ac_word; then
3211       ac_cv_prog_DLLTOOL="dlltool"
3212       break
3213     fi
3214   done
3215   IFS="$ac_save_ifs"
3216   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3217 fi
3218 fi
3219 DLLTOOL="$ac_cv_prog_DLLTOOL"
3220 if test -n "$DLLTOOL"; then
3221   echo "$ac_t""$DLLTOOL" 1>&6
3222 else
3223   echo "$ac_t""no" 1>&6
3224 fi
3225
3226 else
3227   DLLTOOL="false"
3228 fi
3229 fi
3230
3231   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3232 set dummy ${ac_tool_prefix}as; ac_word=$2
3233 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3234 echo "configure:3235: checking for $ac_word" >&5
3235 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3236   echo $ac_n "(cached) $ac_c" 1>&6
3237 else
3238   if test -n "$AS"; then
3239   ac_cv_prog_AS="$AS" # Let the user override the test.
3240 else
3241   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3242   ac_dummy="$PATH"
3243   for ac_dir in $ac_dummy; do
3244     test -z "$ac_dir" && ac_dir=.
3245     if test -f $ac_dir/$ac_word; then
3246       ac_cv_prog_AS="${ac_tool_prefix}as"
3247       break
3248     fi
3249   done
3250   IFS="$ac_save_ifs"
3251 fi
3252 fi
3253 AS="$ac_cv_prog_AS"
3254 if test -n "$AS"; then
3255   echo "$ac_t""$AS" 1>&6
3256 else
3257   echo "$ac_t""no" 1>&6
3258 fi
3259
3260
3261 if test -z "$ac_cv_prog_AS"; then
3262 if test -n "$ac_tool_prefix"; then
3263   # Extract the first word of "as", so it can be a program name with args.
3264 set dummy as; ac_word=$2
3265 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3266 echo "configure:3267: checking for $ac_word" >&5
3267 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3268   echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270   if test -n "$AS"; then
3271   ac_cv_prog_AS="$AS" # Let the user override the test.
3272 else
3273   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3274   ac_dummy="$PATH"
3275   for ac_dir in $ac_dummy; do
3276     test -z "$ac_dir" && ac_dir=.
3277     if test -f $ac_dir/$ac_word; then
3278       ac_cv_prog_AS="as"
3279       break
3280     fi
3281   done
3282   IFS="$ac_save_ifs"
3283   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3284 fi
3285 fi
3286 AS="$ac_cv_prog_AS"
3287 if test -n "$AS"; then
3288   echo "$ac_t""$AS" 1>&6
3289 else
3290   echo "$ac_t""no" 1>&6
3291 fi
3292
3293 else
3294   AS="false"
3295 fi
3296 fi
3297
3298   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3299 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3301 echo "configure:3302: checking for $ac_word" >&5
3302 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   if test -n "$OBJDUMP"; then
3306   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3307 else
3308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3309   ac_dummy="$PATH"
3310   for ac_dir in $ac_dummy; do
3311     test -z "$ac_dir" && ac_dir=.
3312     if test -f $ac_dir/$ac_word; then
3313       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3314       break
3315     fi
3316   done
3317   IFS="$ac_save_ifs"
3318 fi
3319 fi
3320 OBJDUMP="$ac_cv_prog_OBJDUMP"
3321 if test -n "$OBJDUMP"; then
3322   echo "$ac_t""$OBJDUMP" 1>&6
3323 else
3324   echo "$ac_t""no" 1>&6
3325 fi
3326
3327
3328 if test -z "$ac_cv_prog_OBJDUMP"; then
3329 if test -n "$ac_tool_prefix"; then
3330   # Extract the first word of "objdump", so it can be a program name with args.
3331 set dummy objdump; ac_word=$2
3332 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3333 echo "configure:3334: checking for $ac_word" >&5
3334 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   if test -n "$OBJDUMP"; then
3338   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3339 else
3340   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3341   ac_dummy="$PATH"
3342   for ac_dir in $ac_dummy; do
3343     test -z "$ac_dir" && ac_dir=.
3344     if test -f $ac_dir/$ac_word; then
3345       ac_cv_prog_OBJDUMP="objdump"
3346       break
3347     fi
3348   done
3349   IFS="$ac_save_ifs"
3350   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3351 fi
3352 fi
3353 OBJDUMP="$ac_cv_prog_OBJDUMP"
3354 if test -n "$OBJDUMP"; then
3355   echo "$ac_t""$OBJDUMP" 1>&6
3356 else
3357   echo "$ac_t""no" 1>&6
3358 fi
3359
3360 else
3361   OBJDUMP="false"
3362 fi
3363 fi
3364
3365   ;;
3366
3367 esac
3368
3369
3370 # Save cache, so that ltconfig can load it
3371
3372
3373 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3374 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3375 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3376 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3377 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3378 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3379 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3380 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3381
3382 # Reload cache, that may have been modified by ltconfig
3383
3384
3385 # This can be used to rebuild libtool when needed
3386 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3387
3388 # Always use our own libtool.
3389 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3390
3391 # Redirect the config.log output again, so that the ltconfig log is not
3392 # clobbered by the next message.
3393 exec 5>>./config.log
3394
3395
3396 for ac_prog in mawk gawk nawk awk
3397 do
3398 # Extract the first word of "$ac_prog", so it can be a program name with args.
3399 set dummy $ac_prog; ac_word=$2
3400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3401 echo "configure:3402: checking for $ac_word" >&5
3402 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   if test -n "$AWK"; then
3406   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3407 else
3408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3409   ac_dummy="$PATH"
3410   for ac_dir in $ac_dummy; do
3411     test -z "$ac_dir" && ac_dir=.
3412     if test -f $ac_dir/$ac_word; then
3413       ac_cv_prog_AWK="$ac_prog"
3414       break
3415     fi
3416   done
3417   IFS="$ac_save_ifs"
3418 fi
3419 fi
3420 AWK="$ac_cv_prog_AWK"
3421 if test -n "$AWK"; then
3422   echo "$ac_t""$AWK" 1>&6
3423 else
3424   echo "$ac_t""no" 1>&6
3425 fi
3426
3427 test -n "$AWK" && break
3428 done
3429
3430 # test for ln hardlink support
3431 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3432 echo "configure:3433: checking whether ln works" >&5
3433 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3434   echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436   rm -f conftest.src conftest.dst
3437 echo "conftest" > conftest.src
3438 if ln conftest.src conftest.dst 2>/dev/null
3439 then
3440   ol_cv_prog_LN_H="ln"
3441 else
3442   ol_cv_prog_LN_H="cp"
3443 fi
3444 rm -f conftest.src conftest.dst
3445
3446 fi
3447 LN_H="$ol_cv_prog_LN_H"
3448 if test "$ol_cv_prog_LN_H" = "ln"; then
3449         echo "$ac_t""yes" 1>&6
3450 else
3451         echo "$ac_t""no" 1>&6
3452 fi
3453
3454 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3455 echo "configure:3456: checking whether ln -s works" >&5
3456 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3457   echo $ac_n "(cached) $ac_c" 1>&6
3458 else
3459   rm -f conftestdata
3460 if ln -s X conftestdata 2>/dev/null
3461 then
3462   rm -f conftestdata
3463   ac_cv_prog_LN_S="ln -s"
3464 else
3465   ac_cv_prog_LN_S=ln
3466 fi
3467 fi
3468 LN_S="$ac_cv_prog_LN_S"
3469 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3470   echo "$ac_t""yes" 1>&6
3471 else
3472   echo "$ac_t""no" 1>&6
3473 fi
3474
3475
3476 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3477         LN_S="$LN_H"
3478 fi
3479
3480 # Extract the first word of "sendmail", so it can be a program name with args.
3481 set dummy sendmail; ac_word=$2
3482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3483 echo "configure:3484: checking for $ac_word" >&5
3484 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3485   echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487   case "$SENDMAIL" in
3488   /*)
3489   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3490   ;;
3491   ?:/*)
3492   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3493   ;;
3494   *)
3495   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3496   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3497   for ac_dir in $ac_dummy; do 
3498     test -z "$ac_dir" && ac_dir=.
3499     if test -f $ac_dir/$ac_word; then
3500       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3501       break
3502     fi
3503   done
3504   IFS="$ac_save_ifs"
3505   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3506   ;;
3507 esac
3508 fi
3509 SENDMAIL="$ac_cv_path_SENDMAIL"
3510 if test -n "$SENDMAIL"; then
3511   echo "$ac_t""$SENDMAIL" 1>&6
3512 else
3513   echo "$ac_t""no" 1>&6
3514 fi
3515
3516 # Extract the first word of "vi", so it can be a program name with args.
3517 set dummy vi; ac_word=$2
3518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3519 echo "configure:3520: checking for $ac_word" >&5
3520 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3521   echo $ac_n "(cached) $ac_c" 1>&6
3522 else
3523   case "$EDITOR" in
3524   /*)
3525   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3526   ;;
3527   ?:/*)
3528   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3529   ;;
3530   *)
3531   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3532   ac_dummy="$PATH:/usr/ucb"
3533   for ac_dir in $ac_dummy; do 
3534     test -z "$ac_dir" && ac_dir=.
3535     if test -f $ac_dir/$ac_word; then
3536       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3537       break
3538     fi
3539   done
3540   IFS="$ac_save_ifs"
3541   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3542   ;;
3543 esac
3544 fi
3545 EDITOR="$ac_cv_path_EDITOR"
3546 if test -n "$EDITOR"; then
3547   echo "$ac_t""$EDITOR" 1>&6
3548 else
3549   echo "$ac_t""no" 1>&6
3550 fi
3551
3552 # Extract the first word of "finger", so it can be a program name with args.
3553 set dummy finger; ac_word=$2
3554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3555 echo "configure:3556: checking for $ac_word" >&5
3556 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3557   echo $ac_n "(cached) $ac_c" 1>&6
3558 else
3559   case "$FINGER" in
3560   /*)
3561   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3562   ;;
3563   ?:/*)
3564   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3565   ;;
3566   *)
3567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3568   ac_dummy="$PATH:/usr/ucb"
3569   for ac_dir in $ac_dummy; do 
3570     test -z "$ac_dir" && ac_dir=.
3571     if test -f $ac_dir/$ac_word; then
3572       ac_cv_path_FINGER="$ac_dir/$ac_word"
3573       break
3574     fi
3575   done
3576   IFS="$ac_save_ifs"
3577   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3578   ;;
3579 esac
3580 fi
3581 FINGER="$ac_cv_path_FINGER"
3582 if test -n "$FINGER"; then
3583   echo "$ac_t""$FINGER" 1>&6
3584 else
3585   echo "$ac_t""no" 1>&6
3586 fi
3587
3588
3589 ol_link_perl=no
3590 if test $ol_enable_perl != no ; then
3591         # Extract the first word of "perl", so it can be a program name with args.
3592 set dummy perl; ac_word=$2
3593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3594 echo "configure:3595: checking for $ac_word" >&5
3595 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   case "$PERLBIN" in
3599   /*)
3600   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3601   ;;
3602   ?:/*)
3603   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3604   ;;
3605   *)
3606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3607   ac_dummy="$PATH"
3608   for ac_dir in $ac_dummy; do 
3609     test -z "$ac_dir" && ac_dir=.
3610     if test -f $ac_dir/$ac_word; then
3611       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3612       break
3613     fi
3614   done
3615   IFS="$ac_save_ifs"
3616   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3617   ;;
3618 esac
3619 fi
3620 PERLBIN="$ac_cv_path_PERLBIN"
3621 if test -n "$PERLBIN"; then
3622   echo "$ac_t""$PERLBIN" 1>&6
3623 else
3624   echo "$ac_t""no" 1>&6
3625 fi
3626
3627
3628         if test "no$PERLBIN" = "no" ; then
3629                 if test $ol_enable_perl = yes ; then
3630                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3631                 fi
3632
3633         else
3634                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3635                 if test x"$ol_with_perl_module" = "xstatic" ; then
3636                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3637                 else
3638                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3639                 fi
3640                                 ol_link_perl=yes
3641         fi
3642 fi
3643
3644 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3645 echo "configure:3646: checking how to run the C preprocessor" >&5
3646 # On Suns, sometimes $CPP names a directory.
3647 if test -n "$CPP" && test -d "$CPP"; then
3648   CPP=
3649 fi
3650 if test -z "$CPP"; then
3651 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3652   echo $ac_n "(cached) $ac_c" 1>&6
3653 else
3654     # This must be in double quotes, not single quotes, because CPP may get
3655   # substituted into the Makefile and "${CC-cc}" will confuse make.
3656   CPP="${CC-cc} -E"
3657   # On the NeXT, cc -E runs the code through the compiler's parser,
3658   # not just through cpp.
3659   cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <assert.h>
3663 Syntax Error
3664 EOF
3665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3666 { (eval echo configure:3667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3668 if test -z "$ac_err"; then
3669   :
3670 else
3671   echo "$ac_err" >&5
3672   echo "configure: failed program was:" >&5
3673   cat conftest.$ac_ext >&5
3674   rm -rf conftest*
3675   CPP="${CC-cc} -E -traditional-cpp"
3676   cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <assert.h>
3680 Syntax Error
3681 EOF
3682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3683 { (eval echo configure:3684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3685 if test -z "$ac_err"; then
3686   :
3687 else
3688   echo "$ac_err" >&5
3689   echo "configure: failed program was:" >&5
3690   cat conftest.$ac_ext >&5
3691   rm -rf conftest*
3692   CPP="${CC-cc} -nologo -E"
3693   cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <assert.h>
3697 Syntax Error
3698 EOF
3699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3700 { (eval echo configure:3701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3702 if test -z "$ac_err"; then
3703   :
3704 else
3705   echo "$ac_err" >&5
3706   echo "configure: failed program was:" >&5
3707   cat conftest.$ac_ext >&5
3708   rm -rf conftest*
3709   CPP=/lib/cpp
3710 fi
3711 rm -f conftest*
3712 fi
3713 rm -f conftest*
3714 fi
3715 rm -f conftest*
3716   ac_cv_prog_CPP="$CPP"
3717 fi
3718   CPP="$ac_cv_prog_CPP"
3719 else
3720   ac_cv_prog_CPP="$CPP"
3721 fi
3722 echo "$ac_t""$CPP" 1>&6
3723
3724
3725 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3726         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3727
3728 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3729         echo "configure: warning: programs compiled here do run here..." 1>&2
3730         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3731
3732 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3733         echo "configure: warning: programs compiled here do not run here..." 1>&2
3734         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3735 fi
3736
3737 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3738 echo "configure:3739: checking for AIX" >&5
3739 cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 #ifdef _AIX
3743   yes
3744 #endif
3745
3746 EOF
3747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3748   egrep "yes" >/dev/null 2>&1; then
3749   rm -rf conftest*
3750   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3751 #define _ALL_SOURCE 1
3752 EOF
3753
3754 else
3755   rm -rf conftest*
3756   echo "$ac_t""no" 1>&6
3757 fi
3758 rm -f conftest*
3759
3760
3761 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3762 echo "configure:3763: checking for POSIXized ISC" >&5
3763 if test -d /etc/conf/kconfig.d &&
3764   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3765 then
3766   echo "$ac_t""yes" 1>&6
3767   ISC=yes # If later tests want to check for ISC.
3768   cat >> confdefs.h <<\EOF
3769 #define _POSIX_SOURCE 1
3770 EOF
3771
3772   if test "$GCC" = yes; then
3773     CC="$CC -posix"
3774   else
3775     CC="$CC -Xp"
3776   fi
3777 else
3778   echo "$ac_t""no" 1>&6
3779   ISC=
3780 fi
3781
3782 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3783 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3784 echo "configure:3785: checking for minix/config.h" >&5
3785 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3786   echo $ac_n "(cached) $ac_c" 1>&6
3787 else
3788   cat > conftest.$ac_ext <<EOF
3789 #line 3790 "configure"
3790 #include "confdefs.h"
3791 #include <minix/config.h>
3792 EOF
3793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3794 { (eval echo configure:3795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3796 if test -z "$ac_err"; then
3797   rm -rf conftest*
3798   eval "ac_cv_header_$ac_safe=yes"
3799 else
3800   echo "$ac_err" >&5
3801   echo "configure: failed program was:" >&5
3802   cat conftest.$ac_ext >&5
3803   rm -rf conftest*
3804   eval "ac_cv_header_$ac_safe=no"
3805 fi
3806 rm -f conftest*
3807 fi
3808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3809   echo "$ac_t""yes" 1>&6
3810   MINIX=yes
3811 else
3812   echo "$ac_t""no" 1>&6
3813 MINIX=
3814 fi
3815
3816 if test "$MINIX" = yes; then
3817   cat >> confdefs.h <<\EOF
3818 #define _POSIX_SOURCE 1
3819 EOF
3820
3821   cat >> confdefs.h <<\EOF
3822 #define _POSIX_1_SOURCE 2
3823 EOF
3824
3825   cat >> confdefs.h <<\EOF
3826 #define _MINIX 1
3827 EOF
3828
3829 fi
3830
3831
3832 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3833 echo "configure:3834: checking for Cygwin environment" >&5
3834 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3835   echo $ac_n "(cached) $ac_c" 1>&6
3836 else
3837   cat > conftest.$ac_ext <<EOF
3838 #line 3839 "configure"
3839 #include "confdefs.h"
3840
3841 int main() {
3842
3843 #ifndef __CYGWIN__
3844 #define __CYGWIN__ __CYGWIN32__
3845 #endif
3846 return __CYGWIN__;
3847 ; return 0; }
3848 EOF
3849 if { (eval echo configure:3850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3850   rm -rf conftest*
3851   ac_cv_cygwin=yes
3852 else
3853   echo "configure: failed program was:" >&5
3854   cat conftest.$ac_ext >&5
3855   rm -rf conftest*
3856   ac_cv_cygwin=no
3857 fi
3858 rm -f conftest*
3859 fi
3860
3861 echo "$ac_t""$ac_cv_cygwin" 1>&6
3862 CYGWIN=
3863 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3864 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3865 echo "configure:3866: checking for mingw32 environment" >&5
3866 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872
3873 int main() {
3874 return __MINGW32__;
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3878   rm -rf conftest*
3879   ac_cv_mingw32=yes
3880 else
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   ac_cv_mingw32=no
3885 fi
3886 rm -f conftest*
3887 fi
3888
3889 echo "$ac_t""$ac_cv_mingw32" 1>&6
3890 MINGW32=
3891 test "$ac_cv_mingw32" = yes && MINGW32=yes
3892 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3893 echo "configure:3894: checking for EMX OS/2 environment" >&5
3894 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3895   echo $ac_n "(cached) $ac_c" 1>&6
3896 else
3897   cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900
3901 int main() {
3902 return __EMX__;
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3906   rm -rf conftest*
3907   ac_cv_emxos2=yes
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   ac_cv_emxos2=no
3913 fi
3914 rm -f conftest*
3915 fi
3916
3917 echo "$ac_t""$ac_cv_emxos2" 1>&6
3918 EMXOS2=
3919 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3920
3921
3922
3923 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3924 echo "configure:3925: checking for executable suffix" >&5
3925 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3926   echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3929   ac_cv_exeext=.exe
3930 else
3931   rm -f conftest*
3932   echo 'int main () { return 0; }' > conftest.$ac_ext
3933   ac_cv_exeext=
3934   if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3935     for file in conftest.*; do
3936       case $file in
3937       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3938       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3939       esac
3940     done
3941   else
3942     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3943   fi
3944   rm -f conftest*
3945   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3946 fi
3947 fi
3948
3949 EXEEXT=""
3950 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3951 echo "$ac_t""${ac_cv_exeext}" 1>&6
3952 ac_exeext=$EXEEXT
3953
3954 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3955 echo "configure:3956: checking for object suffix" >&5
3956 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3957   echo $ac_n "(cached) $ac_c" 1>&6
3958 else
3959   rm -f conftest*
3960 echo 'int i = 1;' > conftest.$ac_ext
3961 if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3962   for ac_file in conftest.*; do
3963     case $ac_file in
3964     *.c) ;;
3965     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3966     esac
3967   done
3968 else
3969   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3970 fi
3971 rm -f conftest*
3972 fi
3973
3974 echo "$ac_t""$ac_cv_objext" 1>&6
3975 OBJEXT=$ac_cv_objext
3976 ac_objext=$ac_cv_objext
3977
3978
3979 cat >> confdefs.h <<EOF
3980 #define EXEEXT "${EXEEXT}"
3981 EOF
3982
3983
3984 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3985 echo "configure:3986: checking for be_app in -lbe" >&5
3986 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3988   echo $ac_n "(cached) $ac_c" 1>&6
3989 else
3990   ac_save_LIBS="$LIBS"
3991 LIBS="-lbe -lroot -lnet $LIBS"
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 /* Override any gcc2 internal prototype to avoid an error.  */
3996 /* We use char because int might match the return type of a gcc2
3997     builtin and then its argument prototype would still apply.  */
3998 char be_app();
3999
4000 int main() {
4001 be_app()
4002 ; return 0; }
4003 EOF
4004 if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4005   rm -rf conftest*
4006   eval "ac_cv_lib_$ac_lib_var=yes"
4007 else
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   eval "ac_cv_lib_$ac_lib_var=no"
4012 fi
4013 rm -f conftest*
4014 LIBS="$ac_save_LIBS"
4015
4016 fi
4017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4018   echo "$ac_t""yes" 1>&6
4019   LIBS="$LIBS -lbe -lroot -lnet"
4020 else
4021   echo "$ac_t""no" 1>&6
4022 :
4023 fi
4024
4025
4026
4027
4028
4029 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4030 echo "configure:4031: checking for ${CC-cc} option to accept ANSI C" >&5
4031 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4032   echo $ac_n "(cached) $ac_c" 1>&6
4033 else
4034   am_cv_prog_cc_stdc=no
4035 ac_save_CC="$CC"
4036 # Don't try gcc -ansi; that turns off useful extensions and
4037 # breaks some systems' header files.
4038 # AIX                   -qlanglvl=ansi
4039 # Ultrix and OSF/1      -std1
4040 # HP-UX 10.20 and later -Ae
4041 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4042 # SVR4                  -Xc -D__EXTENSIONS__
4043 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4044 do
4045   CC="$ac_save_CC $ac_arg"
4046   cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <stdarg.h>
4050 #include <stdio.h>
4051 #include <sys/types.h>
4052 #include <sys/stat.h>
4053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4054 struct buf { int x; };
4055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4056 static char *e (p, i)
4057      char **p;
4058      int i;
4059 {
4060   return p[i];
4061 }
4062 static char *f (char * (*g) (char **, int), char **p, ...)
4063 {
4064   char *s;
4065   va_list v;
4066   va_start (v,p);
4067   s = g (p, va_arg (v,int));
4068   va_end (v);
4069   return s;
4070 }
4071 int test (int i, double x);
4072 struct s1 {int (*f) (int a);};
4073 struct s2 {int (*f) (double a);};
4074 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4075 int argc;
4076 char **argv;
4077
4078 int main() {
4079
4080 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4081
4082 ; return 0; }
4083 EOF
4084 if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4085   rm -rf conftest*
4086   am_cv_prog_cc_stdc="$ac_arg"; break
4087 else
4088   echo "configure: failed program was:" >&5
4089   cat conftest.$ac_ext >&5
4090 fi
4091 rm -f conftest*
4092 done
4093 CC="$ac_save_CC"
4094
4095 fi
4096
4097 if test -z "$am_cv_prog_cc_stdc"; then
4098   echo "$ac_t""none needed" 1>&6
4099 else
4100   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4101 fi
4102 case "x$am_cv_prog_cc_stdc" in
4103   x|xno) ;;
4104   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4105 esac
4106
4107 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4108         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4109 fi
4110
4111 # test for make depend flag
4112 OL_MKDEP=
4113 OL_MKDEP_FLAGS=
4114 if test -z "${MKDEP}"; then
4115         OL_MKDEP="${CC-cc}"
4116         if test -z "${MKDEP_FLAGS}"; then
4117                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4118 echo "configure:4119: checking for ${OL_MKDEP} depend flag" >&5
4119 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4120   echo $ac_n "(cached) $ac_c" 1>&6
4121 else
4122   
4123                         ol_cv_mkdep=no
4124                         for flag in "-M" "-xM"; do
4125                                 cat > conftest.c <<EOF
4126  noCode;
4127 EOF
4128                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4129                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4130                                 then
4131                                         if test ! -f conftest."${ac_object}" ; then
4132                                                 ol_cv_mkdep=$flag
4133                                                 OL_MKDEP_FLAGS="$flag"
4134                                                 break
4135                                         fi
4136                                 fi
4137                         done
4138                         rm -f conftest*
4139                 
4140 fi
4141
4142 echo "$ac_t""$ol_cv_mkdep" 1>&6
4143         else
4144                 cc_cv_mkdep=yes
4145                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4146         fi
4147 else
4148         cc_cv_mkdep=yes
4149         OL_MKDEP="${MKDEP}"
4150         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4151 fi
4152
4153
4154
4155 if test "${ol_cv_mkdep}" = no ; then
4156         # this will soon become an error
4157         echo "configure: warning: do not know how to generate dependencies" 1>&2
4158 fi
4159
4160 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4161 echo "configure:4162: checking for afopen in -ls" >&5
4162 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4164   echo $ac_n "(cached) $ac_c" 1>&6
4165 else
4166   ac_save_LIBS="$LIBS"
4167 LIBS="-ls  $LIBS"
4168 cat > conftest.$ac_ext <<EOF
4169 #line 4170 "configure"
4170 #include "confdefs.h"
4171 /* Override any gcc2 internal prototype to avoid an error.  */
4172 /* We use char because int might match the return type of a gcc2
4173     builtin and then its argument prototype would still apply.  */
4174 char afopen();
4175
4176 int main() {
4177 afopen()
4178 ; return 0; }
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4181   rm -rf conftest*
4182   eval "ac_cv_lib_$ac_lib_var=yes"
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186   rm -rf conftest*
4187   eval "ac_cv_lib_$ac_lib_var=no"
4188 fi
4189 rm -f conftest*
4190 LIBS="$ac_save_LIBS"
4191
4192 fi
4193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4194   echo "$ac_t""yes" 1>&6
4195   
4196         AUTH_LIBS=-ls
4197         cat >> confdefs.h <<\EOF
4198 #define HAVE_AIX_SECURITY 1
4199 EOF
4200
4201
4202 else
4203   echo "$ac_t""no" 1>&6
4204 fi
4205
4206
4207
4208 ol_link_modules=no
4209 if test $ol_enable_modules != no ; then
4210         for ac_hdr in ltdl.h
4211 do
4212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4214 echo "configure:4215: checking for $ac_hdr" >&5
4215 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4216   echo $ac_n "(cached) $ac_c" 1>&6
4217 else
4218   cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <$ac_hdr>
4222 EOF
4223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4224 { (eval echo configure:4225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4226 if test -z "$ac_err"; then
4227   rm -rf conftest*
4228   eval "ac_cv_header_$ac_safe=yes"
4229 else
4230   echo "$ac_err" >&5
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=no"
4235 fi
4236 rm -f conftest*
4237 fi
4238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4239   echo "$ac_t""yes" 1>&6
4240     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4241   cat >> confdefs.h <<EOF
4242 #define $ac_tr_hdr 1
4243 EOF
4244  
4245 else
4246   echo "$ac_t""no" 1>&6
4247 fi
4248 done
4249
4250
4251         if test $ac_cv_header_ltdl_h = no ; then
4252                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4253         fi
4254
4255         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4256 echo "configure:4257: checking for lt_dlinit in -lltdl" >&5
4257 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4259   echo $ac_n "(cached) $ac_c" 1>&6
4260 else
4261   ac_save_LIBS="$LIBS"
4262 LIBS="-lltdl  $LIBS"
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 /* Override any gcc2 internal prototype to avoid an error.  */
4267 /* We use char because int might match the return type of a gcc2
4268     builtin and then its argument prototype would still apply.  */
4269 char lt_dlinit();
4270
4271 int main() {
4272 lt_dlinit()
4273 ; return 0; }
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4276   rm -rf conftest*
4277   eval "ac_cv_lib_$ac_lib_var=yes"
4278 else
4279   echo "configure: failed program was:" >&5
4280   cat conftest.$ac_ext >&5
4281   rm -rf conftest*
4282   eval "ac_cv_lib_$ac_lib_var=no"
4283 fi
4284 rm -f conftest*
4285 LIBS="$ac_save_LIBS"
4286
4287 fi
4288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4289   echo "$ac_t""yes" 1>&6
4290   
4291             MODULES_LIBS=-lltdl
4292             cat >> confdefs.h <<\EOF
4293 #define HAVE_LIBLTDL 1
4294 EOF
4295
4296         
4297 else
4298   echo "$ac_t""no" 1>&6
4299 fi
4300
4301
4302         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4303                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4304         fi
4305         ol_link_modules=yes
4306 else
4307         ol_with_bdb_module=static
4308         ol_with_dnssrv_module=static
4309         ol_with_ldap_module=static
4310         ol_with_ldbm_module=static
4311         ol_with_passwd_module=static
4312         ol_with_perl_module=static
4313         ol_with_shell_module=static
4314         ol_with_tcl_module=static
4315         ol_with_sql_module=static
4316 fi
4317
4318 # test for EBCDIC
4319 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4320 echo "configure:4321: checking for EBCDIC" >&5
4321 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4322   echo $ac_n "(cached) $ac_c" 1>&6
4323 else
4324   
4325         cat > conftest.$ac_ext <<EOF
4326 #line 4327 "configure"
4327 #include "confdefs.h"
4328
4329 #if !('M' == 0xd4)
4330 #include <__ASCII__/generate_error.h>
4331 #endif
4332
4333 EOF
4334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4335 { (eval echo configure:4336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4337 if test -z "$ac_err"; then
4338   rm -rf conftest*
4339   ol_cv_cpp_ebcdic=yes
4340 else
4341   echo "$ac_err" >&5
4342   echo "configure: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   rm -rf conftest*
4345   ol_cv_cpp_ebcdic=no
4346 fi
4347 rm -f conftest*
4348 fi
4349
4350 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4351 if test $ol_cv_cpp_ebcdic = yes ; then
4352         cat >> confdefs.h <<\EOF
4353 #define HAVE_EBCDIC 1
4354 EOF
4355
4356 fi
4357
4358 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4359 echo "configure:4360: checking for ANSI C header files" >&5
4360 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 #include <stdlib.h>
4367 #include <stdarg.h>
4368 #include <string.h>
4369 #include <float.h>
4370 EOF
4371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4372 { (eval echo configure:4373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4374 if test -z "$ac_err"; then
4375   rm -rf conftest*
4376   ol_cv_header_stdc=yes
4377 else
4378   echo "$ac_err" >&5
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381   rm -rf conftest*
4382   ol_cv_header_stdc=no
4383 fi
4384 rm -f conftest*
4385
4386 if test $ol_cv_header_stdc = yes; then
4387   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4388 cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391 #include <string.h>
4392 EOF
4393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4394   egrep "memchr" >/dev/null 2>&1; then
4395   :
4396 else
4397   rm -rf conftest*
4398   ol_cv_header_stdc=no
4399 fi
4400 rm -f conftest*
4401
4402 fi
4403
4404 if test $ol_cv_header_stdc = yes; then
4405   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4408 "configure"
4408 #include "confdefs.h"
4409 #include <stdlib.h>
4410 EOF
4411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4412   egrep "free" >/dev/null 2>&1; then
4413   :
4414 else
4415   rm -rf conftest*
4416   ol_cv_header_stdc=no
4417 fi
4418 rm -f conftest*
4419
4420 fi
4421
4422 if test $ol_cv_header_stdc = yes; then
4423   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4424 if test "$cross_compiling" = yes; then
4425   :
4426 else
4427   cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <ctype.h>
4431 #ifndef HAVE_EBCDIC
4432 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4433 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4434 #else
4435 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4436                 || ('j' <= (c) && (c) <= 'r') \
4437                 || ('s' <= (c) && (c) <= 'z'))
4438 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4439 #endif
4440 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4441 int main () { int i; for (i = 0; i < 256; i++)
4442 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4443 exit (0); }
4444
4445 EOF
4446 if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4447 then
4448   :
4449 else
4450   echo "configure: failed program was:" >&5
4451   cat conftest.$ac_ext >&5
4452   rm -fr conftest*
4453   ol_cv_header_stdc=no
4454 fi
4455 rm -fr conftest*
4456 fi
4457
4458 fi
4459 fi
4460
4461 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4462 if test $ol_cv_header_stdc = yes; then
4463   cat >> confdefs.h <<\EOF
4464 #define STDC_HEADERS 1
4465 EOF
4466
4467 fi
4468 ac_cv_header_stdc=disable
4469
4470
4471 if test $ol_cv_header_stdc != yes; then
4472         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4473 fi
4474
4475 ac_header_dirent=no
4476 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4477 do
4478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4479 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4480 echo "configure:4481: checking for $ac_hdr that defines DIR" >&5
4481 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4482   echo $ac_n "(cached) $ac_c" 1>&6
4483 else
4484   cat > conftest.$ac_ext <<EOF
4485 #line 4486 "configure"
4486 #include "confdefs.h"
4487 #include <sys/types.h>
4488 #include <$ac_hdr>
4489 int main() {
4490 DIR *dirp = 0;
4491 ; return 0; }
4492 EOF
4493 if { (eval echo configure:4494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4494   rm -rf conftest*
4495   eval "ac_cv_header_dirent_$ac_safe=yes"
4496 else
4497   echo "configure: failed program was:" >&5
4498   cat conftest.$ac_ext >&5
4499   rm -rf conftest*
4500   eval "ac_cv_header_dirent_$ac_safe=no"
4501 fi
4502 rm -f conftest*
4503 fi
4504 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4505   echo "$ac_t""yes" 1>&6
4506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4507   cat >> confdefs.h <<EOF
4508 #define $ac_tr_hdr 1
4509 EOF
4510  ac_header_dirent=$ac_hdr; break
4511 else
4512   echo "$ac_t""no" 1>&6
4513 fi
4514 done
4515 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4516 if test $ac_header_dirent = dirent.h; then
4517 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4518 echo "configure:4519: checking for opendir in -ldir" >&5
4519 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4520 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4521   echo $ac_n "(cached) $ac_c" 1>&6
4522 else
4523   ac_save_LIBS="$LIBS"
4524 LIBS="-ldir  $LIBS"
4525 cat > conftest.$ac_ext <<EOF
4526 #line 4527 "configure"
4527 #include "confdefs.h"
4528 /* Override any gcc2 internal prototype to avoid an error.  */
4529 /* We use char because int might match the return type of a gcc2
4530     builtin and then its argument prototype would still apply.  */
4531 char opendir();
4532
4533 int main() {
4534 opendir()
4535 ; return 0; }
4536 EOF
4537 if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4538   rm -rf conftest*
4539   eval "ac_cv_lib_$ac_lib_var=yes"
4540 else
4541   echo "configure: failed program was:" >&5
4542   cat conftest.$ac_ext >&5
4543   rm -rf conftest*
4544   eval "ac_cv_lib_$ac_lib_var=no"
4545 fi
4546 rm -f conftest*
4547 LIBS="$ac_save_LIBS"
4548
4549 fi
4550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4551   echo "$ac_t""yes" 1>&6
4552   LIBS="$LIBS -ldir"
4553 else
4554   echo "$ac_t""no" 1>&6
4555 fi
4556
4557 else
4558 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4559 echo "configure:4560: checking for opendir in -lx" >&5
4560 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   ac_save_LIBS="$LIBS"
4565 LIBS="-lx  $LIBS"
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 /* Override any gcc2 internal prototype to avoid an error.  */
4570 /* We use char because int might match the return type of a gcc2
4571     builtin and then its argument prototype would still apply.  */
4572 char opendir();
4573
4574 int main() {
4575 opendir()
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=yes"
4581 else
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -rf conftest*
4585   eval "ac_cv_lib_$ac_lib_var=no"
4586 fi
4587 rm -f conftest*
4588 LIBS="$ac_save_LIBS"
4589
4590 fi
4591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4592   echo "$ac_t""yes" 1>&6
4593   LIBS="$LIBS -lx"
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597
4598 fi
4599
4600 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4601 echo "configure:4602: checking for sys/wait.h that is POSIX.1 compatible" >&5
4602 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <sys/types.h>
4609 #include <sys/wait.h>
4610 #ifndef WEXITSTATUS
4611 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4612 #endif
4613 #ifndef WIFEXITED
4614 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4615 #endif
4616 int main() {
4617 int s;
4618 wait (&s);
4619 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4620 ; return 0; }
4621 EOF
4622 if { (eval echo configure:4623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4623   rm -rf conftest*
4624   ac_cv_header_sys_wait_h=yes
4625 else
4626   echo "configure: failed program was:" >&5
4627   cat conftest.$ac_ext >&5
4628   rm -rf conftest*
4629   ac_cv_header_sys_wait_h=no
4630 fi
4631 rm -f conftest*
4632 fi
4633
4634 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4635 if test $ac_cv_header_sys_wait_h = yes; then
4636   cat >> confdefs.h <<\EOF
4637 #define HAVE_SYS_WAIT_H 1
4638 EOF
4639
4640 fi
4641
4642 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4643 echo "configure:4644: checking POSIX termios" >&5
4644 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4645   echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647   cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650 #include <sys/types.h>
4651 #include <unistd.h>
4652 #include <termios.h>
4653 int main() {
4654 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4655    tcgetattr(0, 0);
4656 ; return 0; }
4657 EOF
4658 if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4659   rm -rf conftest*
4660   am_cv_sys_posix_termios=yes
4661 else
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -rf conftest*
4665   am_cv_sys_posix_termios=no
4666 fi
4667 rm -f conftest*
4668 fi
4669
4670 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4671
4672
4673  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4674 echo "configure:4675: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4675 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4679
4680   gwinsz_in_termios_h=no
4681   if test $am_cv_sys_posix_termios = yes; then
4682     cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 #include <sys/types.h>
4686 #     include <termios.h>
4687 #     ifdef TIOCGWINSZ
4688         yes
4689 #     endif
4690     
4691 EOF
4692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4693   egrep "yes" >/dev/null 2>&1; then
4694   rm -rf conftest*
4695   gwinsz_in_termios_h=yes
4696 fi
4697 rm -f conftest*
4698
4699   fi
4700
4701   if test $gwinsz_in_termios_h = no; then
4702     cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 #include <sys/types.h>
4706 #     include <sys/ioctl.h>
4707 #     ifdef TIOCGWINSZ
4708         yes
4709 #     endif
4710     
4711 EOF
4712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4713   egrep "yes" >/dev/null 2>&1; then
4714   rm -rf conftest*
4715   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4716 fi
4717 rm -f conftest*
4718
4719   fi
4720   
4721 fi
4722
4723 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4724   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4725     cat >> confdefs.h <<\EOF
4726 #define GWINSZ_IN_SYS_IOCTL 1
4727 EOF
4728
4729   fi
4730
4731 if test $am_cv_sys_posix_termios = yes ; then
4732         cat >> confdefs.h <<\EOF
4733 #define HAVE_POSIX_TERMIOS 1
4734 EOF
4735
4736 fi
4737
4738 for ac_hdr in \
4739         arpa/inet.h             \
4740         arpa/nameser.h  \
4741         assert.h                \
4742         conio.h                 \
4743         crypt.h                 \
4744         direct.h                \
4745         errno.h                 \
4746         fcntl.h                 \
4747         filio.h                 \
4748         getopt.h                \
4749         grp.h                   \
4750         io.h                    \
4751         libutil.h               \
4752         limits.h                \
4753         locale.h                \
4754         netinet/tcp.h   \
4755         malloc.h                \
4756         memory.h                \
4757         psap.h                  \
4758         pwd.h                   \
4759         process.h               \
4760         resolv.h                \
4761         sgtty.h                 \
4762         shadow.h                \
4763         stddef.h                \
4764         string.h                \
4765         strings.h               \
4766         sysexits.h              \
4767         sys/file.h              \
4768         sys/filio.h             \
4769         sys/errno.h             \
4770         sys/ioctl.h             \
4771         sys/param.h             \
4772         sys/resource.h  \
4773         sys/select.h    \
4774         sys/socket.h    \
4775         sys/syslog.h    \
4776         sys/time.h              \
4777         sys/types.h             \
4778         syslog.h                \
4779         termios.h               \
4780         unistd.h                \
4781         winsock.h               \
4782
4783 do
4784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4786 echo "configure:4787: checking for $ac_hdr" >&5
4787 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4788   echo $ac_n "(cached) $ac_c" 1>&6
4789 else
4790   cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4793 #include <$ac_hdr>
4794 EOF
4795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4796 { (eval echo configure:4797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4798 if test -z "$ac_err"; then
4799   rm -rf conftest*
4800   eval "ac_cv_header_$ac_safe=yes"
4801 else
4802   echo "$ac_err" >&5
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   rm -rf conftest*
4806   eval "ac_cv_header_$ac_safe=no"
4807 fi
4808 rm -f conftest*
4809 fi
4810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4813   cat >> confdefs.h <<EOF
4814 #define $ac_tr_hdr 1
4815 EOF
4816  
4817 else
4818   echo "$ac_t""no" 1>&6
4819 fi
4820 done
4821
4822
4823
4824
4825 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4826 echo "configure:4827: checking for dlopen" >&5
4827 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
4828   echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830   cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 /* System header to define __stub macros and hopefully few prototypes,
4834     which can conflict with char dlopen(); below.  */
4835 #include <assert.h>
4836 /* Override any gcc2 internal prototype to avoid an error.  */
4837 /* We use char because int might match the return type of a gcc2
4838     builtin and then its argument prototype would still apply.  */
4839 char dlopen();
4840 char (*f)();
4841
4842 int main() {
4843
4844 /* The GNU C library defines this for functions which it implements
4845     to always fail with ENOSYS.  Some functions are actually named
4846     something starting with __ and the normal name is an alias.  */
4847 #if defined (__stub_dlopen) || defined (__stub___dlopen)
4848 choke me
4849 #else
4850 f = dlopen;
4851 #endif
4852
4853 ; return 0; }
4854 EOF
4855 if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4856   rm -rf conftest*
4857   eval "ac_cv_func_dlopen=yes"
4858 else
4859   echo "configure: failed program was:" >&5
4860   cat conftest.$ac_ext >&5
4861   rm -rf conftest*
4862   eval "ac_cv_func_dlopen=no"
4863 fi
4864 rm -f conftest*
4865 fi
4866
4867 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
4868   echo "$ac_t""yes" 1>&6
4869   :
4870 else
4871   echo "$ac_t""no" 1>&6
4872 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4873 echo "configure:4874: checking for dlopen in -ldl" >&5
4874 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
4875 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4876   echo $ac_n "(cached) $ac_c" 1>&6
4877 else
4878   ac_save_LIBS="$LIBS"
4879 LIBS="-ldl  $LIBS"
4880 cat > conftest.$ac_ext <<EOF
4881 #line 4882 "configure"
4882 #include "confdefs.h"
4883 /* Override any gcc2 internal prototype to avoid an error.  */
4884 /* We use char because int might match the return type of a gcc2
4885     builtin and then its argument prototype would still apply.  */
4886 char dlopen();
4887
4888 int main() {
4889 dlopen()
4890 ; return 0; }
4891 EOF
4892 if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4893   rm -rf conftest*
4894   eval "ac_cv_lib_$ac_lib_var=yes"
4895 else
4896   echo "configure: failed program was:" >&5
4897   cat conftest.$ac_ext >&5
4898   rm -rf conftest*
4899   eval "ac_cv_lib_$ac_lib_var=no"
4900 fi
4901 rm -f conftest*
4902 LIBS="$ac_save_LIBS"
4903
4904 fi
4905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4906   echo "$ac_t""yes" 1>&6
4907     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4908     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4909   cat >> confdefs.h <<EOF
4910 #define $ac_tr_lib 1
4911 EOF
4912
4913   LIBS="-ldl $LIBS"
4914
4915 else
4916   echo "$ac_t""no" 1>&6
4917 fi
4918
4919 fi
4920
4921
4922 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4923 echo "configure:4924: checking for sigset in -lV3" >&5
4924 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4925 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4926   echo $ac_n "(cached) $ac_c" 1>&6
4927 else
4928   ac_save_LIBS="$LIBS"
4929 LIBS="-lV3  $LIBS"
4930 cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933 /* Override any gcc2 internal prototype to avoid an error.  */
4934 /* We use char because int might match the return type of a gcc2
4935     builtin and then its argument prototype would still apply.  */
4936 char sigset();
4937
4938 int main() {
4939 sigset()
4940 ; return 0; }
4941 EOF
4942 if { (eval echo configure:4943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4943   rm -rf conftest*
4944   eval "ac_cv_lib_$ac_lib_var=yes"
4945 else
4946   echo "configure: failed program was:" >&5
4947   cat conftest.$ac_ext >&5
4948   rm -rf conftest*
4949   eval "ac_cv_lib_$ac_lib_var=no"
4950 fi
4951 rm -f conftest*
4952 LIBS="$ac_save_LIBS"
4953
4954 fi
4955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4956   echo "$ac_t""yes" 1>&6
4957     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4958     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4959   cat >> confdefs.h <<EOF
4960 #define $ac_tr_lib 1
4961 EOF
4962
4963   LIBS="-lV3 $LIBS"
4964
4965 else
4966   echo "$ac_t""no" 1>&6
4967 fi
4968
4969
4970 if test $ac_cv_header_winsock_h = yes; then
4971         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4972 echo "configure:4973: checking for winsock" >&5
4973 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4974   echo $ac_n "(cached) $ac_c" 1>&6
4975 else
4976   cat > conftest.$ac_ext <<EOF
4977 #line 4978 "configure"
4978 #include "confdefs.h"
4979 #include <winsock.h>
4980 int main() {
4981
4982                         socket(0,0,0);
4983                         select(0,NULL,NULL,NULL,NULL);
4984                         closesocket(0);
4985                         gethostname(NULL,0);
4986         
4987 ; return 0; }
4988 EOF
4989 if { (eval echo configure:4990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4990   rm -rf conftest*
4991   ol_cv_winsock=yes
4992 else
4993   echo "configure: failed program was:" >&5
4994   cat conftest.$ac_ext >&5
4995   rm -rf conftest*
4996   ol_cv_winsock=no
4997 fi
4998 rm -f conftest*]
4999 fi
5000
5001 echo "$ac_t""$ol_cv_winsock" 1>&6
5002
5003         if test $ol_cv_winsock = yes ; then
5004                 cat >> confdefs.h <<\EOF
5005 #define HAVE_WINSOCK 1
5006 EOF
5007
5008                 ac_cv_func_socket=yes
5009                 ac_cv_func_select=yes
5010                 ac_cv_func_closesocket=yes
5011                 ac_cv_func_gethostname=yes
5012         fi
5013 fi
5014
5015
5016 echo $ac_n "checking for socket""... $ac_c" 1>&6
5017 echo "configure:5018: checking for socket" >&5
5018 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5019   echo $ac_n "(cached) $ac_c" 1>&6
5020 else
5021   cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024 /* System header to define __stub macros and hopefully few prototypes,
5025     which can conflict with char socket(); below.  */
5026 #include <assert.h>
5027 /* Override any gcc2 internal prototype to avoid an error.  */
5028 /* We use char because int might match the return type of a gcc2
5029     builtin and then its argument prototype would still apply.  */
5030 char socket();
5031 char (*f)();
5032
5033 int main() {
5034
5035 /* The GNU C library defines this for functions which it implements
5036     to always fail with ENOSYS.  Some functions are actually named
5037     something starting with __ and the normal name is an alias.  */
5038 #if defined (__stub_socket) || defined (__stub___socket)
5039 choke me
5040 #else
5041 f = socket;
5042 #endif
5043
5044 ; return 0; }
5045 EOF
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047   rm -rf conftest*
5048   eval "ac_cv_func_socket=yes"
5049 else
5050   echo "configure: failed program was:" >&5
5051   cat conftest.$ac_ext >&5
5052   rm -rf conftest*
5053   eval "ac_cv_func_socket=no"
5054 fi
5055 rm -f conftest*
5056 fi
5057
5058 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5059   echo "$ac_t""yes" 1>&6
5060   :
5061 else
5062   echo "$ac_t""no" 1>&6
5063         
5064         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5065 echo "configure:5066: checking for main in -lsocket" >&5
5066 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5068   echo $ac_n "(cached) $ac_c" 1>&6
5069 else
5070   ac_save_LIBS="$LIBS"
5071 LIBS="-lsocket  $LIBS"
5072 cat > conftest.$ac_ext <<EOF
5073 #line 5074 "configure"
5074 #include "confdefs.h"
5075
5076 int main() {
5077 main()
5078 ; return 0; }
5079 EOF
5080 if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5081   rm -rf conftest*
5082   eval "ac_cv_lib_$ac_lib_var=yes"
5083 else
5084   echo "configure: failed program was:" >&5
5085   cat conftest.$ac_ext >&5
5086   rm -rf conftest*
5087   eval "ac_cv_lib_$ac_lib_var=no"
5088 fi
5089 rm -f conftest*
5090 LIBS="$ac_save_LIBS"
5091
5092 fi
5093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5094   echo "$ac_t""yes" 1>&6
5095     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5096     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5097   cat >> confdefs.h <<EOF
5098 #define $ac_tr_lib 1
5099 EOF
5100
5101   LIBS="-lsocket $LIBS"
5102
5103 else
5104   echo "$ac_t""no" 1>&6
5105 fi
5106
5107         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5108 echo "configure:5109: checking for main in -lnet" >&5
5109 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5110 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5111   echo $ac_n "(cached) $ac_c" 1>&6
5112 else
5113   ac_save_LIBS="$LIBS"
5114 LIBS="-lnet  $LIBS"
5115 cat > conftest.$ac_ext <<EOF
5116 #line 5117 "configure"
5117 #include "confdefs.h"
5118
5119 int main() {
5120 main()
5121 ; return 0; }
5122 EOF
5123 if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5124   rm -rf conftest*
5125   eval "ac_cv_lib_$ac_lib_var=yes"
5126 else
5127   echo "configure: failed program was:" >&5
5128   cat conftest.$ac_ext >&5
5129   rm -rf conftest*
5130   eval "ac_cv_lib_$ac_lib_var=no"
5131 fi
5132 rm -f conftest*
5133 LIBS="$ac_save_LIBS"
5134
5135 fi
5136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5137   echo "$ac_t""yes" 1>&6
5138     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5139     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5140   cat >> confdefs.h <<EOF
5141 #define $ac_tr_lib 1
5142 EOF
5143
5144   LIBS="-lnet $LIBS"
5145
5146 else
5147   echo "$ac_t""no" 1>&6
5148 fi
5149
5150         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5151 echo "configure:5152: checking for main in -lnsl_s" >&5
5152 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5154   echo $ac_n "(cached) $ac_c" 1>&6
5155 else
5156   ac_save_LIBS="$LIBS"
5157 LIBS="-lnsl_s  $LIBS"
5158 cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161
5162 int main() {
5163 main()
5164 ; return 0; }
5165 EOF
5166 if { (eval echo configure:5167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5167   rm -rf conftest*
5168   eval "ac_cv_lib_$ac_lib_var=yes"
5169 else
5170   echo "configure: failed program was:" >&5
5171   cat conftest.$ac_ext >&5
5172   rm -rf conftest*
5173   eval "ac_cv_lib_$ac_lib_var=no"
5174 fi
5175 rm -f conftest*
5176 LIBS="$ac_save_LIBS"
5177
5178 fi
5179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5180   echo "$ac_t""yes" 1>&6
5181     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5182     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5183   cat >> confdefs.h <<EOF
5184 #define $ac_tr_lib 1
5185 EOF
5186
5187   LIBS="-lnsl_s $LIBS"
5188
5189 else
5190   echo "$ac_t""no" 1>&6
5191 fi
5192
5193         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5194 echo "configure:5195: checking for main in -lnsl" >&5
5195 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199   ac_save_LIBS="$LIBS"
5200 LIBS="-lnsl  $LIBS"
5201 cat > conftest.$ac_ext <<EOF
5202 #line 5203 "configure"
5203 #include "confdefs.h"
5204
5205 int main() {
5206 main()
5207 ; return 0; }
5208 EOF
5209 if { (eval echo configure:5210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5210   rm -rf conftest*
5211   eval "ac_cv_lib_$ac_lib_var=yes"
5212 else
5213   echo "configure: failed program was:" >&5
5214   cat conftest.$ac_ext >&5
5215   rm -rf conftest*
5216   eval "ac_cv_lib_$ac_lib_var=no"
5217 fi
5218 rm -f conftest*
5219 LIBS="$ac_save_LIBS"
5220
5221 fi
5222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5223   echo "$ac_t""yes" 1>&6
5224     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5225     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5226   cat >> confdefs.h <<EOF
5227 #define $ac_tr_lib 1
5228 EOF
5229
5230   LIBS="-lnsl $LIBS"
5231
5232 else
5233   echo "$ac_t""no" 1>&6
5234 fi
5235
5236         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5237 echo "configure:5238: checking for socket in -linet" >&5
5238 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5239 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242   ac_save_LIBS="$LIBS"
5243 LIBS="-linet  $LIBS"
5244 cat > conftest.$ac_ext <<EOF
5245 #line 5246 "configure"
5246 #include "confdefs.h"
5247 /* Override any gcc2 internal prototype to avoid an error.  */
5248 /* We use char because int might match the return type of a gcc2
5249     builtin and then its argument prototype would still apply.  */
5250 char socket();
5251
5252 int main() {
5253 socket()
5254 ; return 0; }
5255 EOF
5256 if { (eval echo configure:5257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5257   rm -rf conftest*
5258   eval "ac_cv_lib_$ac_lib_var=yes"
5259 else
5260   echo "configure: failed program was:" >&5
5261   cat conftest.$ac_ext >&5
5262   rm -rf conftest*
5263   eval "ac_cv_lib_$ac_lib_var=no"
5264 fi
5265 rm -f conftest*
5266 LIBS="$ac_save_LIBS"
5267
5268 fi
5269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5270   echo "$ac_t""yes" 1>&6
5271     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5272     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5273   cat >> confdefs.h <<EOF
5274 #define $ac_tr_lib 1
5275 EOF
5276
5277   LIBS="-linet $LIBS"
5278
5279 else
5280   echo "$ac_t""no" 1>&6
5281 fi
5282
5283         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5284 echo "configure:5285: checking for main in -lgen" >&5
5285 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5286 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5287   echo $ac_n "(cached) $ac_c" 1>&6
5288 else
5289   ac_save_LIBS="$LIBS"
5290 LIBS="-lgen  $LIBS"
5291 cat > conftest.$ac_ext <<EOF
5292 #line 5293 "configure"
5293 #include "confdefs.h"
5294
5295 int main() {
5296 main()
5297 ; return 0; }
5298 EOF
5299 if { (eval echo configure:5300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5300   rm -rf conftest*
5301   eval "ac_cv_lib_$ac_lib_var=yes"
5302 else
5303   echo "configure: failed program was:" >&5
5304   cat conftest.$ac_ext >&5
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=no"
5307 fi
5308 rm -f conftest*
5309 LIBS="$ac_save_LIBS"
5310
5311 fi
5312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5313   echo "$ac_t""yes" 1>&6
5314     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5315     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5316   cat >> confdefs.h <<EOF
5317 #define $ac_tr_lib 1
5318 EOF
5319
5320   LIBS="-lgen $LIBS"
5321
5322 else
5323   echo "$ac_t""no" 1>&6
5324 fi
5325
5326
5327 fi
5328
5329
5330 echo $ac_n "checking for select""... $ac_c" 1>&6
5331 echo "configure:5332: checking for select" >&5
5332 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5333   echo $ac_n "(cached) $ac_c" 1>&6
5334 else
5335   cat > conftest.$ac_ext <<EOF
5336 #line 5337 "configure"
5337 #include "confdefs.h"
5338 /* System header to define __stub macros and hopefully few prototypes,
5339     which can conflict with char select(); below.  */
5340 #include <assert.h>
5341 /* Override any gcc2 internal prototype to avoid an error.  */
5342 /* We use char because int might match the return type of a gcc2
5343     builtin and then its argument prototype would still apply.  */
5344 char select();
5345 char (*f)();
5346
5347 int main() {
5348
5349 /* The GNU C library defines this for functions which it implements
5350     to always fail with ENOSYS.  Some functions are actually named
5351     something starting with __ and the normal name is an alias.  */
5352 #if defined (__stub_select) || defined (__stub___select)
5353 choke me
5354 #else
5355 f = select;
5356 #endif
5357
5358 ; return 0; }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5361   rm -rf conftest*
5362   eval "ac_cv_func_select=yes"
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367   eval "ac_cv_func_select=no"
5368 fi
5369 rm -f conftest*
5370 fi
5371
5372 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5373   echo "$ac_t""yes" 1>&6
5374   :
5375 else
5376   echo "$ac_t""no" 1>&6
5377 { echo "configure: error: select() required." 1>&2; exit 1; }
5378 fi
5379
5380
5381 if test "${ac_cv_header_winsock_h}" != yes; then
5382                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5383 echo "configure:5384: checking types of arguments for select()" >&5
5384  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5385   echo $ac_n "(cached) $ac_c" 1>&6
5386 else
5387    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5388   echo $ac_n "(cached) $ac_c" 1>&6
5389 else
5390     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5391   echo $ac_n "(cached) $ac_c" 1>&6
5392 else
5393      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5394      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5395       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5396        cat > conftest.$ac_ext <<EOF
5397 #line 5398 "configure"
5398 #include "confdefs.h"
5399 #ifdef HAVE_SYS_TYPES_H
5400 #include <sys/types.h>
5401 #endif
5402 #ifdef HAVE_SYS_TIME_H
5403 #include <sys/time.h>
5404 #endif
5405 #ifdef HAVE_SYS_SELECT_H
5406 #include <sys/select.h>
5407 #endif
5408 #ifdef HAVE_SYS_SOCKET_H
5409 #include <sys/socket.h>
5410 #endif
5411 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);
5412 int main() {
5413
5414 ; return 0; }
5415 EOF
5416 if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5417   rm -rf conftest*
5418           ac_not_found=no ; break 3
5419 else
5420   echo "configure: failed program was:" >&5
5421   cat conftest.$ac_ext >&5
5422   rm -rf conftest*
5423   ac_not_found=yes
5424 fi
5425 rm -f conftest*
5426       done
5427      done
5428     done
5429    
5430 fi
5431   
5432 fi
5433  
5434 fi
5435  if test "$ac_not_found" = yes; then
5436   ac_cv_func_select_arg1=int 
5437   ac_cv_func_select_arg234='int *' 
5438   ac_cv_func_select_arg5='struct timeval *'
5439  fi
5440  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5441  cat >> confdefs.h <<EOF
5442 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5443 EOF
5444
5445  cat >> confdefs.h <<EOF
5446 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5447 EOF
5448
5449  cat >> confdefs.h <<EOF
5450 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5451 EOF
5452
5453
5454 fi
5455
5456
5457 for ac_hdr in regex.h 
5458 do
5459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5461 echo "configure:5462: checking for $ac_hdr" >&5
5462 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5463   echo $ac_n "(cached) $ac_c" 1>&6
5464 else
5465   cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468 #include <$ac_hdr>
5469 EOF
5470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5471 { (eval echo configure:5472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5473 if test -z "$ac_err"; then
5474   rm -rf conftest*
5475   eval "ac_cv_header_$ac_safe=yes"
5476 else
5477   echo "$ac_err" >&5
5478   echo "configure: failed program was:" >&5
5479   cat conftest.$ac_ext >&5
5480   rm -rf conftest*
5481   eval "ac_cv_header_$ac_safe=no"
5482 fi
5483 rm -f conftest*
5484 fi
5485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5486   echo "$ac_t""yes" 1>&6
5487     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5488   cat >> confdefs.h <<EOF
5489 #define $ac_tr_hdr 1
5490 EOF
5491  
5492 else
5493   echo "$ac_t""no" 1>&6
5494 fi
5495 done
5496
5497 if test "$ac_cv_header_regex_h" != yes ; then
5498         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5499 fi
5500 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5501 echo "configure:5502: checking for regfree" >&5
5502 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5503   echo $ac_n "(cached) $ac_c" 1>&6
5504 else
5505   cat > conftest.$ac_ext <<EOF
5506 #line 5507 "configure"
5507 #include "confdefs.h"
5508 /* System header to define __stub macros and hopefully few prototypes,
5509     which can conflict with char regfree(); below.  */
5510 #include <assert.h>
5511 /* Override any gcc2 internal prototype to avoid an error.  */
5512 /* We use char because int might match the return type of a gcc2
5513     builtin and then its argument prototype would still apply.  */
5514 char regfree();
5515 char (*f)();
5516
5517 int main() {
5518
5519 /* The GNU C library defines this for functions which it implements
5520     to always fail with ENOSYS.  Some functions are actually named
5521     something starting with __ and the normal name is an alias.  */
5522 #if defined (__stub_regfree) || defined (__stub___regfree)
5523 choke me
5524 #else
5525 f = regfree;
5526 #endif
5527
5528 ; return 0; }
5529 EOF
5530 if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5531   rm -rf conftest*
5532   eval "ac_cv_func_regfree=yes"
5533 else
5534   echo "configure: failed program was:" >&5
5535   cat conftest.$ac_ext >&5
5536   rm -rf conftest*
5537   eval "ac_cv_func_regfree=no"
5538 fi
5539 rm -f conftest*
5540 fi
5541
5542 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5543   echo "$ac_t""yes" 1>&6
5544   :
5545 else
5546   echo "$ac_t""no" 1>&6
5547 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5548 fi
5549
5550
5551
5552 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5553 echo "configure:5554: checking for compatible POSIX regex" >&5
5554 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5555   echo $ac_n "(cached) $ac_c" 1>&6
5556 else
5557   
5558         if test "$cross_compiling" = yes; then
5559   ol_cv_c_posix_regex=cross
5560 else
5561   cat > conftest.$ac_ext <<EOF
5562 #line 5563 "configure"
5563 #include "confdefs.h"
5564
5565 #include <sys/types.h>
5566 #include <regex.h>
5567 static char *pattern, *string;
5568 main()
5569 {
5570         int rc;
5571         regex_t re;
5572
5573         pattern = "^A";
5574
5575         if(regcomp(&re, pattern, 0)) {
5576                 return -1;
5577         }
5578         
5579         string = "ALL MATCH";
5580         
5581         rc = regexec(&re, string, 0, (void*)0, 0);
5582
5583         regfree(&re);
5584
5585         return rc;
5586 }
5587 EOF
5588 if { (eval echo configure:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5589 then
5590   ol_cv_c_posix_regex=yes
5591 else
5592   echo "configure: failed program was:" >&5
5593   cat conftest.$ac_ext >&5
5594   rm -fr conftest*
5595   ol_cv_c_posix_regex=no
5596 fi
5597 rm -fr conftest*
5598 fi
5599
5600 fi
5601
5602 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5603
5604 if test "$ol_cv_c_posix_regex" = no ; then
5605         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5606 fi
5607
5608 ol_link_dnssrv=no
5609 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5610 echo "configure:5611: checking for res_query" >&5
5611 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5612   echo $ac_n "(cached) $ac_c" 1>&6
5613 else
5614   cat > conftest.$ac_ext <<EOF
5615 #line 5616 "configure"
5616 #include "confdefs.h"
5617 /* System header to define __stub macros and hopefully few prototypes,
5618     which can conflict with char res_query(); below.  */
5619 #include <assert.h>
5620 /* Override any gcc2 internal prototype to avoid an error.  */
5621 /* We use char because int might match the return type of a gcc2
5622     builtin and then its argument prototype would still apply.  */
5623 char res_query();
5624 char (*f)();
5625
5626 int main() {
5627
5628 /* The GNU C library defines this for functions which it implements
5629     to always fail with ENOSYS.  Some functions are actually named
5630     something starting with __ and the normal name is an alias.  */
5631 #if defined (__stub_res_query) || defined (__stub___res_query)
5632 choke me
5633 #else
5634 f = res_query;
5635 #endif
5636
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5640   rm -rf conftest*
5641   eval "ac_cv_func_res_query=yes"
5642 else
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_func_res_query=no"
5647 fi
5648 rm -f conftest*
5649 fi
5650
5651 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5652   echo "$ac_t""yes" 1>&6
5653   :
5654 else
5655   echo "$ac_t""no" 1>&6
5656 fi
5657
5658 if test $ac_cv_func_res_query = no ; then 
5659         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5660 echo "configure:5661: checking for res_query in -lbind" >&5
5661 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5663   echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665   ac_save_LIBS="$LIBS"
5666 LIBS="-lbind  $LIBS"
5667 cat > conftest.$ac_ext <<EOF
5668 #line 5669 "configure"
5669 #include "confdefs.h"
5670 /* Override any gcc2 internal prototype to avoid an error.  */
5671 /* We use char because int might match the return type of a gcc2
5672     builtin and then its argument prototype would still apply.  */
5673 char res_query();
5674
5675 int main() {
5676 res_query()
5677 ; return 0; }
5678 EOF
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680   rm -rf conftest*
5681   eval "ac_cv_lib_$ac_lib_var=yes"
5682 else
5683   echo "configure: failed program was:" >&5
5684   cat conftest.$ac_ext >&5
5685   rm -rf conftest*
5686   eval "ac_cv_lib_$ac_lib_var=no"
5687 fi
5688 rm -f conftest*
5689 LIBS="$ac_save_LIBS"
5690
5691 fi
5692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5693   echo "$ac_t""yes" 1>&6
5694     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5695     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5696   cat >> confdefs.h <<EOF
5697 #define $ac_tr_lib 1
5698 EOF
5699
5700   LIBS="-lbind $LIBS"
5701
5702 else
5703   echo "$ac_t""no" 1>&6
5704 fi
5705
5706         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5707 fi
5708
5709 if test $ac_cv_func_res_query = no ; then 
5710         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5711 echo "configure:5712: checking for __res_query in -lbind" >&5
5712 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5713 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5714   echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716   ac_save_LIBS="$LIBS"
5717 LIBS="-lbind  $LIBS"
5718 cat > conftest.$ac_ext <<EOF
5719 #line 5720 "configure"
5720 #include "confdefs.h"
5721 /* Override any gcc2 internal prototype to avoid an error.  */
5722 /* We use char because int might match the return type of a gcc2
5723     builtin and then its argument prototype would still apply.  */
5724 char __res_query();
5725
5726 int main() {
5727 __res_query()
5728 ; return 0; }
5729 EOF
5730 if { (eval echo configure:5731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5731   rm -rf conftest*
5732   eval "ac_cv_lib_$ac_lib_var=yes"
5733 else
5734   echo "configure: failed program was:" >&5
5735   cat conftest.$ac_ext >&5
5736   rm -rf conftest*
5737   eval "ac_cv_lib_$ac_lib_var=no"
5738 fi
5739 rm -f conftest*
5740 LIBS="$ac_save_LIBS"
5741
5742 fi
5743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5744   echo "$ac_t""yes" 1>&6
5745     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5746     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5747   cat >> confdefs.h <<EOF
5748 #define $ac_tr_lib 1
5749 EOF
5750
5751   LIBS="-lbind $LIBS"
5752
5753 else
5754   echo "$ac_t""no" 1>&6
5755 fi
5756
5757         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5758 fi
5759
5760 if test $ac_cv_func_res_query = no ; then 
5761         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5762 echo "configure:5763: checking for res_query in -lresolv" >&5
5763 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5764 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5765   echo $ac_n "(cached) $ac_c" 1>&6
5766 else
5767   ac_save_LIBS="$LIBS"
5768 LIBS="-lresolv  $LIBS"
5769 cat > conftest.$ac_ext <<EOF
5770 #line 5771 "configure"
5771 #include "confdefs.h"
5772 /* Override any gcc2 internal prototype to avoid an error.  */
5773 /* We use char because int might match the return type of a gcc2
5774     builtin and then its argument prototype would still apply.  */
5775 char res_query();
5776
5777 int main() {
5778 res_query()
5779 ; return 0; }
5780 EOF
5781 if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5782   rm -rf conftest*
5783   eval "ac_cv_lib_$ac_lib_var=yes"
5784 else
5785   echo "configure: failed program was:" >&5
5786   cat conftest.$ac_ext >&5
5787   rm -rf conftest*
5788   eval "ac_cv_lib_$ac_lib_var=no"
5789 fi
5790 rm -f conftest*
5791 LIBS="$ac_save_LIBS"
5792
5793 fi
5794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5795   echo "$ac_t""yes" 1>&6
5796     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5797     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5798   cat >> confdefs.h <<EOF
5799 #define $ac_tr_lib 1
5800 EOF
5801
5802   LIBS="-lresolv $LIBS"
5803
5804 else
5805   echo "$ac_t""no" 1>&6
5806 fi
5807
5808         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5809 fi
5810
5811 if test "$ac_cv_func_res_query" = yes ; then
5812         cat >> confdefs.h <<\EOF
5813 #define HAVE_RES_QUERY 1
5814 EOF
5815
5816
5817         if test $ol_enable_dnssrv != no ; then
5818                 ol_link_dnssrv=yes
5819         fi
5820 fi
5821
5822 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5823         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5824 fi
5825
5826 for ac_func in getaddrinfo inet_ntop 
5827 do
5828 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5829 echo "configure:5830: checking for $ac_func" >&5
5830 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5831   echo $ac_n "(cached) $ac_c" 1>&6
5832 else
5833   cat > conftest.$ac_ext <<EOF
5834 #line 5835 "configure"
5835 #include "confdefs.h"
5836 /* System header to define __stub macros and hopefully few prototypes,
5837     which can conflict with char $ac_func(); below.  */
5838 #include <assert.h>
5839 /* Override any gcc2 internal prototype to avoid an error.  */
5840 /* We use char because int might match the return type of a gcc2
5841     builtin and then its argument prototype would still apply.  */
5842 char $ac_func();
5843 char (*f)();
5844
5845 int main() {
5846
5847 /* The GNU C library defines this for functions which it implements
5848     to always fail with ENOSYS.  Some functions are actually named
5849     something starting with __ and the normal name is an alias.  */
5850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5851 choke me
5852 #else
5853 f = $ac_func;
5854 #endif
5855
5856 ; return 0; }
5857 EOF
5858 if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5859   rm -rf conftest*
5860   eval "ac_cv_func_$ac_func=yes"
5861 else
5862   echo "configure: failed program was:" >&5
5863   cat conftest.$ac_ext >&5
5864   rm -rf conftest*
5865   eval "ac_cv_func_$ac_func=no"
5866 fi
5867 rm -f conftest*
5868 fi
5869
5870 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5871   echo "$ac_t""yes" 1>&6
5872     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5873   cat >> confdefs.h <<EOF
5874 #define $ac_tr_func 1
5875 EOF
5876  
5877 else
5878   echo "$ac_t""no" 1>&6
5879 fi
5880 done
5881
5882
5883 ol_link_ipv6=no
5884 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
5885         if test $ol_enable_ipv6 = yes ; then
5886                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
5887         fi
5888 else
5889         for ac_func in gai_strerror 
5890 do
5891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5892 echo "configure:5893: checking for $ac_func" >&5
5893 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5894   echo $ac_n "(cached) $ac_c" 1>&6
5895 else
5896   cat > conftest.$ac_ext <<EOF
5897 #line 5898 "configure"
5898 #include "confdefs.h"
5899 /* System header to define __stub macros and hopefully few prototypes,
5900     which can conflict with char $ac_func(); below.  */
5901 #include <assert.h>
5902 /* Override any gcc2 internal prototype to avoid an error.  */
5903 /* We use char because int might match the return type of a gcc2
5904     builtin and then its argument prototype would still apply.  */
5905 char $ac_func();
5906 char (*f)();
5907
5908 int main() {
5909
5910 /* The GNU C library defines this for functions which it implements
5911     to always fail with ENOSYS.  Some functions are actually named
5912     something starting with __ and the normal name is an alias.  */
5913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5914 choke me
5915 #else
5916 f = $ac_func;
5917 #endif
5918
5919 ; return 0; }
5920 EOF
5921 if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5922   rm -rf conftest*
5923   eval "ac_cv_func_$ac_func=yes"
5924 else
5925   echo "configure: failed program was:" >&5
5926   cat conftest.$ac_ext >&5
5927   rm -rf conftest*
5928   eval "ac_cv_func_$ac_func=no"
5929 fi
5930 rm -f conftest*
5931 fi
5932
5933 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5934   echo "$ac_t""yes" 1>&6
5935     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5936   cat >> confdefs.h <<EOF
5937 #define $ac_tr_func 1
5938 EOF
5939  
5940 else
5941   echo "$ac_t""no" 1>&6
5942 fi
5943 done
5944
5945
5946         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5947 echo "configure:5948: checking INET6_ADDRSTRLEN" >&5
5948 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5949   echo $ac_n "(cached) $ac_c" 1>&6
5950 else
5951   
5952                 cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955
5956 #                       include <netinet/in.h>
5957 #                       ifdef INET6_ADDRSTRLEN
5958                                 __has_inet6_addrstrlen__;
5959 #                       endif
5960                 
5961 EOF
5962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5963   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5964   rm -rf conftest*
5965   ol_cv_inet6_addrstrlen=yes
5966 else
5967   rm -rf conftest*
5968   ol_cv_inet6_addrstrlen=no
5969 fi
5970 rm -f conftest*
5971
5972 fi
5973
5974 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5975
5976         if test $ol_cv_inet6_addrstrlen = yes ; then
5977                 ol_link_ipv6=yes
5978         elif test $ol_enable_ipv6 = yes ; then
5979                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5980         fi
5981 fi
5982
5983 if test $ol_enable_local != no ; then
5984         for ac_hdr in sys/un.h 
5985 do
5986 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5987 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5988 echo "configure:5989: checking for $ac_hdr" >&5
5989 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5990   echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5992   cat > conftest.$ac_ext <<EOF
5993 #line 5994 "configure"
5994 #include "confdefs.h"
5995 #include <$ac_hdr>
5996 EOF
5997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5998 { (eval echo configure:5999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6000 if test -z "$ac_err"; then
6001   rm -rf conftest*
6002   eval "ac_cv_header_$ac_safe=yes"
6003 else
6004   echo "$ac_err" >&5
6005   echo "configure: failed program was:" >&5
6006   cat conftest.$ac_ext >&5
6007   rm -rf conftest*
6008   eval "ac_cv_header_$ac_safe=no"
6009 fi
6010 rm -f conftest*
6011 fi
6012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6013   echo "$ac_t""yes" 1>&6
6014     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6015   cat >> confdefs.h <<EOF
6016 #define $ac_tr_hdr 1
6017 EOF
6018  
6019 else
6020   echo "$ac_t""no" 1>&6
6021 fi
6022 done
6023
6024
6025         if test $ol_enable_local = auto ; then
6026                 ol_enable_local=$ac_cv_header_sys_un_h
6027         elif test $ac_cv_header_sys_un_h = no ; then
6028                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
6029         fi
6030 fi
6031
6032 ol_link_kbind=no
6033 ol_link_kpasswd=no
6034 ol_link_krb5=no
6035 ol_link_krb4=no
6036
6037 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6038         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
6039         -o $ol_with_kerberos = k425 ; then
6040
6041         for ac_hdr in krb5.h
6042 do
6043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6045 echo "configure:6046: checking for $ac_hdr" >&5
6046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6047   echo $ac_n "(cached) $ac_c" 1>&6
6048 else
6049   cat > conftest.$ac_ext <<EOF
6050 #line 6051 "configure"
6051 #include "confdefs.h"
6052 #include <$ac_hdr>
6053 EOF
6054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6055 { (eval echo configure:6056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6057 if test -z "$ac_err"; then
6058   rm -rf conftest*
6059   eval "ac_cv_header_$ac_safe=yes"
6060 else
6061   echo "$ac_err" >&5
6062   echo "configure: failed program was:" >&5
6063   cat conftest.$ac_ext >&5
6064   rm -rf conftest*
6065   eval "ac_cv_header_$ac_safe=no"
6066 fi
6067 rm -f conftest*
6068 fi
6069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6070   echo "$ac_t""yes" 1>&6
6071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6072   cat >> confdefs.h <<EOF
6073 #define $ac_tr_hdr 1
6074 EOF
6075  
6076 else
6077   echo "$ac_t""no" 1>&6
6078 fi
6079 done
6080
6081
6082         if test $ac_cv_header_krb5_h = yes ; then
6083                                 for ac_hdr in heim_err.h
6084 do
6085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6087 echo "configure:6088: checking for $ac_hdr" >&5
6088 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6089   echo $ac_n "(cached) $ac_c" 1>&6
6090 else
6091   cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094 #include <$ac_hdr>
6095 EOF
6096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6097 { (eval echo configure:6098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6099 if test -z "$ac_err"; then
6100   rm -rf conftest*
6101   eval "ac_cv_header_$ac_safe=yes"
6102 else
6103   echo "$ac_err" >&5
6104   echo "configure: failed program was:" >&5
6105   cat conftest.$ac_ext >&5
6106   rm -rf conftest*
6107   eval "ac_cv_header_$ac_safe=no"
6108 fi
6109 rm -f conftest*
6110 fi
6111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6112   echo "$ac_t""yes" 1>&6
6113     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6114   cat >> confdefs.h <<EOF
6115 #define $ac_tr_hdr 1
6116 EOF
6117  
6118 else
6119   echo "$ac_t""no" 1>&6
6120 fi
6121 done
6122
6123                 if test $ac_cv_header_heim_err_h = yes ; then
6124                         krb5_impl=heimdal
6125                 else
6126                         krb5_impl=mit
6127                 fi
6128
6129                 if test $krb5_impl = mit; then
6130                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6131 echo "configure:6132: checking for main in -lkrb5" >&5
6132 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6134   echo $ac_n "(cached) $ac_c" 1>&6
6135 else
6136   ac_save_LIBS="$LIBS"
6137 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6138 cat > conftest.$ac_ext <<EOF
6139 #line 6140 "configure"
6140 #include "confdefs.h"
6141
6142 int main() {
6143 main()
6144 ; return 0; }
6145 EOF
6146 if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6147   rm -rf conftest*
6148   eval "ac_cv_lib_$ac_lib_var=yes"
6149 else
6150   echo "configure: failed program was:" >&5
6151   cat conftest.$ac_ext >&5
6152   rm -rf conftest*
6153   eval "ac_cv_lib_$ac_lib_var=no"
6154 fi
6155 rm -f conftest*
6156 LIBS="$ac_save_LIBS"
6157
6158 fi
6159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6160   echo "$ac_t""yes" 1>&6
6161   have_krb5=yes
6162                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6163 else
6164   echo "$ac_t""no" 1>&6
6165 have_krb5=no
6166 fi
6167
6168
6169                 elif test $krb5_impl = heimdal; then
6170                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6171 echo "configure:6172: checking for main in -lkrb5" >&5
6172 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6173 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6174   echo $ac_n "(cached) $ac_c" 1>&6
6175 else
6176   ac_save_LIBS="$LIBS"
6177 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6178 cat > conftest.$ac_ext <<EOF
6179 #line 6180 "configure"
6180 #include "confdefs.h"
6181
6182 int main() {
6183 main()
6184 ; return 0; }
6185 EOF
6186 if { (eval echo configure:6187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6187   rm -rf conftest*
6188   eval "ac_cv_lib_$ac_lib_var=yes"
6189 else
6190   echo "configure: failed program was:" >&5
6191   cat conftest.$ac_ext >&5
6192   rm -rf conftest*
6193   eval "ac_cv_lib_$ac_lib_var=no"
6194 fi
6195 rm -f conftest*
6196 LIBS="$ac_save_LIBS"
6197
6198 fi
6199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6200   echo "$ac_t""yes" 1>&6
6201   have_krb5=yes
6202                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6203 else
6204   echo "$ac_t""no" 1>&6
6205 have_krb5=no
6206 fi
6207
6208
6209                         cat >> confdefs.h <<\EOF
6210 #define HAVE_HEIMDAL_KERBEROS 1
6211 EOF
6212
6213                 else
6214                         have_krb5=no
6215                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6216                 fi
6217
6218                 if test $have_krb5 = yes ; then
6219                         ol_link_krb5=yes
6220
6221                         cat >> confdefs.h <<\EOF
6222 #define HAVE_KRB5 1
6223 EOF
6224
6225
6226                         if test $ol_enable_kpasswd != no ; then
6227                                 ol_link_kpasswd=yes;
6228                         fi
6229
6230                         if test $ol_with_kerberos = k5only ; then
6231                                 ol_with_kerberos=found
6232                         fi
6233
6234                 elif test $ol_with_kerberos != auto ; then
6235                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6236                 fi
6237
6238         fi
6239 fi
6240
6241 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6242         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6243
6244         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6245 do
6246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6248 echo "configure:6249: checking for $ac_hdr" >&5
6249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6250   echo $ac_n "(cached) $ac_c" 1>&6
6251 else
6252   cat > conftest.$ac_ext <<EOF
6253 #line 6254 "configure"
6254 #include "confdefs.h"
6255 #include <$ac_hdr>
6256 EOF
6257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6258 { (eval echo configure:6259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6260 if test -z "$ac_err"; then
6261   rm -rf conftest*
6262   eval "ac_cv_header_$ac_safe=yes"
6263 else
6264   echo "$ac_err" >&5
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267   rm -rf conftest*
6268   eval "ac_cv_header_$ac_safe=no"
6269 fi
6270 rm -f conftest*
6271 fi
6272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6273   echo "$ac_t""yes" 1>&6
6274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6275   cat >> confdefs.h <<EOF
6276 #define $ac_tr_hdr 1
6277 EOF
6278  
6279 else
6280   echo "$ac_t""no" 1>&6
6281 fi
6282 done
6283
6284
6285         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6286                 if test $krb5_impl = mit; then
6287                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6288 echo "configure:6289: checking for main in -lkrb4" >&5
6289 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6290 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6291   echo $ac_n "(cached) $ac_c" 1>&6
6292 else
6293   ac_save_LIBS="$LIBS"
6294 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6295 cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298
6299 int main() {
6300 main()
6301 ; return 0; }
6302 EOF
6303 if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6304   rm -rf conftest*
6305   eval "ac_cv_lib_$ac_lib_var=yes"
6306 else
6307   echo "configure: failed program was:" >&5
6308   cat conftest.$ac_ext >&5
6309   rm -rf conftest*
6310   eval "ac_cv_lib_$ac_lib_var=no"
6311 fi
6312 rm -f conftest*
6313 LIBS="$ac_save_LIBS"
6314
6315 fi
6316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6317   echo "$ac_t""yes" 1>&6
6318   have_k425=yes
6319                                 KRB4_LIBS="-lkrb4 -ldes425"
6320 else
6321   echo "$ac_t""no" 1>&6
6322 have_k425=no
6323 fi
6324
6325
6326                 elif test $krb5_impl = heimdal; then
6327                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6328 echo "configure:6329: checking for main in -lkrb4" >&5
6329 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6330 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6331   echo $ac_n "(cached) $ac_c" 1>&6
6332 else
6333   ac_save_LIBS="$LIBS"
6334 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6335 cat > conftest.$ac_ext <<EOF
6336 #line 6337 "configure"
6337 #include "confdefs.h"
6338
6339 int main() {
6340 main()
6341 ; return 0; }
6342 EOF
6343 if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6344   rm -rf conftest*
6345   eval "ac_cv_lib_$ac_lib_var=yes"
6346 else
6347   echo "configure: failed program was:" >&5
6348   cat conftest.$ac_ext >&5
6349   rm -rf conftest*
6350   eval "ac_cv_lib_$ac_lib_var=no"
6351 fi
6352 rm -f conftest*
6353 LIBS="$ac_save_LIBS"
6354
6355 fi
6356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6357   echo "$ac_t""yes" 1>&6
6358   have_k425=yes
6359                                 KRB4_LIBS="-lkrb4"
6360 else
6361   echo "$ac_t""no" 1>&6
6362 have_k425=no
6363 fi
6364
6365
6366                 else
6367                         have_425=no
6368                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6369                 fi
6370
6371                 if test $have_k425 = yes ; then
6372                         ol_with_kerberos=found
6373                         ol_link_krb4=yes
6374
6375                         cat >> confdefs.h <<\EOF
6376 #define HAVE_KRB425 1
6377 EOF
6378
6379                         cat >> confdefs.h <<\EOF
6380 #define HAVE_KRB4 1
6381 EOF
6382
6383
6384                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6385 echo "configure:6386: checking for des_debug in Kerberos libraries" >&5
6386 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6387   echo $ac_n "(cached) $ac_c" 1>&6
6388 else
6389   
6390                                                                 save_LIBS="$LIBS"
6391                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6392                                 cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395
6396 #include <kerberosIV/krb.h>
6397 #include <kerberosIV/des.h>
6398 extern int des_debug;
6399
6400 int main() {
6401
6402 des_debug = 1;
6403
6404 ; return 0; }
6405 EOF
6406 if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6407   rm -rf conftest*
6408   ol_cv_var_des_debug=yes
6409 else
6410   echo "configure: failed program was:" >&5
6411   cat conftest.$ac_ext >&5
6412   rm -rf conftest*
6413   ol_cv_var_des_debug=no
6414 fi
6415 rm -f conftest*
6416                                                                 LIBS="$save_LIBS"
6417                         
6418 fi
6419
6420 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6421
6422                         if test $ol_cv_var_des_debug = yes ; then
6423                                 cat >> confdefs.h <<\EOF
6424 #define HAVE_DES_DEBUG 1
6425 EOF
6426
6427                         fi
6428
6429                         LIBS="$save_LIBS"
6430                 fi
6431         fi
6432 fi
6433
6434 if test $ol_link_krb5 = yes ; then
6435         ol_with_kerberos=found
6436 fi
6437
6438 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6439         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6440
6441         for ac_hdr in krb.h des.h krb-archaeology.h 
6442 do
6443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6445 echo "configure:6446: checking for $ac_hdr" >&5
6446 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6447   echo $ac_n "(cached) $ac_c" 1>&6
6448 else
6449   cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 #include <$ac_hdr>
6453 EOF
6454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6455 { (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6457 if test -z "$ac_err"; then
6458   rm -rf conftest*
6459   eval "ac_cv_header_$ac_safe=yes"
6460 else
6461   echo "$ac_err" >&5
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_header_$ac_safe=no"
6466 fi
6467 rm -f conftest*
6468 fi
6469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6470   echo "$ac_t""yes" 1>&6
6471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6472   cat >> confdefs.h <<EOF
6473 #define $ac_tr_hdr 1
6474 EOF
6475  
6476 else
6477   echo "$ac_t""no" 1>&6
6478 fi
6479 done
6480
6481
6482         if test $ac_cv_header_krb_h = yes ; then
6483                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6484 echo "configure:6485: checking for main in -lkrb" >&5
6485 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6487   echo $ac_n "(cached) $ac_c" 1>&6
6488 else
6489   ac_save_LIBS="$LIBS"
6490 LIBS="-lkrb -ldes $LIBS"
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494
6495 int main() {
6496 main()
6497 ; return 0; }
6498 EOF
6499 if { (eval echo configure:6500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6500   rm -rf conftest*
6501   eval "ac_cv_lib_$ac_lib_var=yes"
6502 else
6503   echo "configure: failed program was:" >&5
6504   cat conftest.$ac_ext >&5
6505   rm -rf conftest*
6506   eval "ac_cv_lib_$ac_lib_var=no"
6507 fi
6508 rm -f conftest*
6509 LIBS="$ac_save_LIBS"
6510
6511 fi
6512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6513   echo "$ac_t""yes" 1>&6
6514   have_k4=yes
6515 else
6516   echo "$ac_t""no" 1>&6
6517 have_k4=no
6518 fi
6519
6520
6521                 if test $have_k4 = yes ; then
6522                         ol_with_kerberos=found
6523                         ol_link_krb4=yes
6524
6525                         cat >> confdefs.h <<\EOF
6526 #define HAVE_KRB4 1
6527 EOF
6528
6529
6530                         KRB4_LIBS="-lkrb -ldes"
6531
6532                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6533                                 cat >> confdefs.h <<\EOF
6534 #define HAVE_KTH_KERBEROS 1
6535 EOF
6536
6537                         fi
6538                 fi
6539         fi
6540 fi
6541
6542 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6543         ol_link_kpasswd=yes
6544 fi
6545
6546 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6547         ol_link_kbind=yes
6548
6549 elif test $ol_enable_kbind = yes ; then
6550         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6551 fi
6552
6553 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6554         cat >> confdefs.h <<\EOF
6555 #define HAVE_KERBEROS 1
6556 EOF
6557
6558
6559 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6560         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6561 fi
6562
6563 ol_link_tls=no
6564 if test $ol_with_tls != no ; then
6565         for ac_hdr in openssl/ssl.h ssl.h
6566 do
6567 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6568 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6569 echo "configure:6570: checking for $ac_hdr" >&5
6570 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6571   echo $ac_n "(cached) $ac_c" 1>&6
6572 else
6573   cat > conftest.$ac_ext <<EOF
6574 #line 6575 "configure"
6575 #include "confdefs.h"
6576 #include <$ac_hdr>
6577 EOF
6578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6579 { (eval echo configure:6580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6581 if test -z "$ac_err"; then
6582   rm -rf conftest*
6583   eval "ac_cv_header_$ac_safe=yes"
6584 else
6585   echo "$ac_err" >&5
6586   echo "configure: failed program was:" >&5
6587   cat conftest.$ac_ext >&5
6588   rm -rf conftest*
6589   eval "ac_cv_header_$ac_safe=no"
6590 fi
6591 rm -f conftest*
6592 fi
6593 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6594   echo "$ac_t""yes" 1>&6
6595     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6596   cat >> confdefs.h <<EOF
6597 #define $ac_tr_hdr 1
6598 EOF
6599  
6600 else
6601   echo "$ac_t""no" 1>&6
6602 fi
6603 done
6604
6605         
6606         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6607                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6608 echo "configure:6609: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6609 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6611   echo $ac_n "(cached) $ac_c" 1>&6
6612 else
6613   ac_save_LIBS="$LIBS"
6614 LIBS="-lssl -lcrypto $LIBS"
6615 cat > conftest.$ac_ext <<EOF
6616 #line 6617 "configure"
6617 #include "confdefs.h"
6618 /* Override any gcc2 internal prototype to avoid an error.  */
6619 /* We use char because int might match the return type of a gcc2
6620     builtin and then its argument prototype would still apply.  */
6621 char SSLeay_add_ssl_algorithms();
6622
6623 int main() {
6624 SSLeay_add_ssl_algorithms()
6625 ; return 0; }
6626 EOF
6627 if { (eval echo configure:6628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6628   rm -rf conftest*
6629   eval "ac_cv_lib_$ac_lib_var=yes"
6630 else
6631   echo "configure: failed program was:" >&5
6632   cat conftest.$ac_ext >&5
6633   rm -rf conftest*
6634   eval "ac_cv_lib_$ac_lib_var=no"
6635 fi
6636 rm -f conftest*
6637 LIBS="$ac_save_LIBS"
6638
6639 fi
6640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6641   echo "$ac_t""yes" 1>&6
6642   have_ssleay=yes
6643                         need_rsaref=no
6644 else
6645   echo "$ac_t""no" 1>&6
6646 have_ssleay=no
6647 fi
6648
6649                         
6650                 if test $have_ssleay = no ; then
6651                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6652 echo "configure:6653: checking for SSL_library_init in -lssl" >&5
6653 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6654 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6655   echo $ac_n "(cached) $ac_c" 1>&6
6656 else
6657   ac_save_LIBS="$LIBS"
6658 LIBS="-lssl -lcrypto $LIBS"
6659 cat > conftest.$ac_ext <<EOF
6660 #line 6661 "configure"
6661 #include "confdefs.h"
6662 /* Override any gcc2 internal prototype to avoid an error.  */
6663 /* We use char because int might match the return type of a gcc2
6664     builtin and then its argument prototype would still apply.  */
6665 char SSL_library_init();
6666
6667 int main() {
6668 SSL_library_init()
6669 ; return 0; }
6670 EOF
6671 if { (eval echo configure:6672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6672   rm -rf conftest*
6673   eval "ac_cv_lib_$ac_lib_var=yes"
6674 else
6675   echo "configure: failed program was:" >&5
6676   cat conftest.$ac_ext >&5
6677   rm -rf conftest*
6678   eval "ac_cv_lib_$ac_lib_var=no"
6679 fi
6680 rm -f conftest*
6681 LIBS="$ac_save_LIBS"
6682
6683 fi
6684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6685   echo "$ac_t""yes" 1>&6
6686   have_ssleay=yes
6687                                 need_rsaref=no
6688 else
6689   echo "$ac_t""no" 1>&6
6690 have_ssleay=no
6691 fi
6692
6693                 fi
6694
6695                 if test $have_ssleay = no ; then
6696                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6697 echo "configure:6698: checking for ssl3_accept in -lssl" >&5
6698 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6700   echo $ac_n "(cached) $ac_c" 1>&6
6701 else
6702   ac_save_LIBS="$LIBS"
6703 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6704 cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* Override any gcc2 internal prototype to avoid an error.  */
6708 /* We use char because int might match the return type of a gcc2
6709     builtin and then its argument prototype would still apply.  */
6710 char ssl3_accept();
6711
6712 int main() {
6713 ssl3_accept()
6714 ; return 0; }
6715 EOF
6716 if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6717   rm -rf conftest*
6718   eval "ac_cv_lib_$ac_lib_var=yes"
6719 else
6720   echo "configure: failed program was:" >&5
6721   cat conftest.$ac_ext >&5
6722   rm -rf conftest*
6723   eval "ac_cv_lib_$ac_lib_var=no"
6724 fi
6725 rm -f conftest*
6726 LIBS="$ac_save_LIBS"
6727
6728 fi
6729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6730   echo "$ac_t""yes" 1>&6
6731   have_ssleay=yes
6732                                 need_rsaref=yes
6733 else
6734   echo "$ac_t""no" 1>&6
6735 have_ssleay=no
6736 fi
6737
6738                 fi
6739
6740                 if test $have_ssleay = yes ; then
6741                         ol_with_tls=found
6742                         ol_link_tls=yes
6743
6744                         cat >> confdefs.h <<\EOF
6745 #define HAVE_SSLEAY 1
6746 EOF
6747
6748
6749                         if test $need_rsaref = yes; then
6750                                 cat >> confdefs.h <<\EOF
6751 #define HAVE_RSAREF 1
6752 EOF
6753
6754
6755                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6756                         else
6757                                 TLS_LIBS="-lssl -lcrypto"
6758                         fi
6759                 fi
6760         fi
6761
6762 else
6763         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6764 fi
6765
6766 if test $ol_link_tls = yes ; then
6767         cat >> confdefs.h <<\EOF
6768 #define HAVE_TLS 1
6769 EOF
6770
6771
6772 elif test $ol_with_tls = auto ; then
6773         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6774         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6775
6776 elif test $ol_with_tls != no ; then
6777         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6778 fi
6779
6780 if test $ol_enable_lmpasswd != no; then
6781         if test $ol_link_tls != yes ; then
6782                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
6783         fi
6784
6785         cat >> confdefs.h <<\EOF
6786 #define SLAPD_LMHASH 1
6787 EOF
6788
6789 fi
6790
6791 for ac_func in \
6792         ctime_r                 \
6793         gethostbyname_r gethostbyaddr_r \
6794
6795 do
6796 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6797 echo "configure:6798: checking for $ac_func" >&5
6798 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6799   echo $ac_n "(cached) $ac_c" 1>&6
6800 else
6801   cat > conftest.$ac_ext <<EOF
6802 #line 6803 "configure"
6803 #include "confdefs.h"
6804 /* System header to define __stub macros and hopefully few prototypes,
6805     which can conflict with char $ac_func(); below.  */
6806 #include <assert.h>
6807 /* Override any gcc2 internal prototype to avoid an error.  */
6808 /* We use char because int might match the return type of a gcc2
6809     builtin and then its argument prototype would still apply.  */
6810 char $ac_func();
6811 char (*f)();
6812
6813 int main() {
6814
6815 /* The GNU C library defines this for functions which it implements
6816     to always fail with ENOSYS.  Some functions are actually named
6817     something starting with __ and the normal name is an alias.  */
6818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6819 choke me
6820 #else
6821 f = $ac_func;
6822 #endif
6823
6824 ; return 0; }
6825 EOF
6826 if { (eval echo configure:6827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6827   rm -rf conftest*
6828   eval "ac_cv_func_$ac_func=yes"
6829 else
6830   echo "configure: failed program was:" >&5
6831   cat conftest.$ac_ext >&5
6832   rm -rf conftest*
6833   eval "ac_cv_func_$ac_func=no"
6834 fi
6835 rm -f conftest*
6836 fi
6837
6838 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6839   echo "$ac_t""yes" 1>&6
6840     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6841   cat >> confdefs.h <<EOF
6842 #define $ac_tr_func 1
6843 EOF
6844  
6845 else
6846   echo "$ac_t""no" 1>&6
6847 fi
6848 done
6849
6850
6851 if test "$ac_cv_func_ctime_r" = no ; then
6852         ol_cv_func_ctime_r_nargs=0
6853 else
6854         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6855 echo "configure:6856: checking number of arguments of ctime_r" >&5
6856 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6857   echo $ac_n "(cached) $ac_c" 1>&6
6858 else
6859   cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862 #include <time.h>
6863 int main() {
6864 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6865 ; return 0; }
6866 EOF
6867 if { (eval echo configure:6868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6868   rm -rf conftest*
6869   ol_cv_func_ctime_r_nargs3=yes
6870 else
6871   echo "configure: failed program was:" >&5
6872   cat conftest.$ac_ext >&5
6873   rm -rf conftest*
6874   ol_cv_func_ctime_r_nargs3=no
6875 fi
6876 rm -f conftest*
6877
6878         cat > conftest.$ac_ext <<EOF
6879 #line 6880 "configure"
6880 #include "confdefs.h"
6881 #include <time.h>
6882 int main() {
6883 time_t ti; char *buffer; ctime_r(&ti,buffer);
6884 ; return 0; }
6885 EOF
6886 if { (eval echo configure:6887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6887   rm -rf conftest*
6888   ol_cv_func_ctime_r_nargs2=yes
6889 else
6890   echo "configure: failed program was:" >&5
6891   cat conftest.$ac_ext >&5
6892   rm -rf conftest*
6893   ol_cv_func_ctime_r_nargs2=no
6894 fi
6895 rm -f conftest*
6896
6897         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6898                 $ol_cv_func_ctime_r_nargs2 = no ; then
6899
6900                 ol_cv_func_ctime_r_nargs=3
6901
6902         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6903                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6904
6905                 ol_cv_func_ctime_r_nargs=2
6906
6907         else
6908                 ol_cv_func_ctime_r_nargs=0
6909         fi
6910   
6911 fi
6912
6913 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6914
6915   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6916         cat >> confdefs.h <<EOF
6917 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6918 EOF
6919
6920   fi
6921
6922 fi
6923
6924 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6925         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6926 echo "configure:6927: checking number of arguments of gethostbyname_r" >&5
6927 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6928   echo $ac_n "(cached) $ac_c" 1>&6
6929 else
6930   cat > conftest.$ac_ext <<EOF
6931 #line 6932 "configure"
6932 #include "confdefs.h"
6933 #include <sys/types.h>
6934 #include <sys/socket.h>
6935 #include <netinet/in.h>
6936 #include <netdb.h>
6937 #define BUFSIZE (sizeof(struct hostent)+10)
6938 int main() {
6939 struct hostent hent; char buffer[BUFSIZE];
6940                 int bufsize=BUFSIZE;int h_errno;
6941                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6942                         buffer, bufsize, &h_errno);
6943 ; return 0; }
6944 EOF
6945 if { (eval echo configure:6946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6946   rm -rf conftest*
6947   ol_cv_func_gethostbyname_r_nargs5=yes
6948 else
6949   echo "configure: failed program was:" >&5
6950   cat conftest.$ac_ext >&5
6951   rm -rf conftest*
6952   ol_cv_func_gethostbyname_r_nargs5=no
6953 fi
6954 rm -f conftest*
6955
6956         cat > conftest.$ac_ext <<EOF
6957 #line 6958 "configure"
6958 #include "confdefs.h"
6959 #include <sys/types.h>
6960 #include <sys/socket.h>
6961 #include <netinet/in.h>
6962 #include <netdb.h>
6963 #define BUFSIZE (sizeof(struct hostent)+10)
6964 int main() {
6965 struct hostent hent;struct hostent *rhent;
6966                 char buffer[BUFSIZE];
6967                 int bufsize=BUFSIZE;int h_errno;
6968                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6969                         &rhent, &h_errno);
6970 ; return 0; }
6971 EOF
6972 if { (eval echo configure:6973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6973   rm -rf conftest*
6974   ol_cv_func_gethostbyname_r_nargs6=yes
6975 else
6976   echo "configure: failed program was:" >&5
6977   cat conftest.$ac_ext >&5
6978   rm -rf conftest*
6979   ol_cv_func_gethostbyname_r_nargs6=no
6980 fi
6981 rm -f conftest*
6982
6983         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6984                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6985
6986                 ol_cv_func_gethostbyname_r_nargs=5
6987
6988         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6989                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6990
6991                 ol_cv_func_gethostbyname_r_nargs=6
6992
6993         else
6994                 ol_cv_func_gethostbyname_r_nargs=0
6995         fi
6996   
6997 fi
6998
6999 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7000   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7001         cat >> confdefs.h <<EOF
7002 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7003 EOF
7004
7005   fi
7006
7007 else
7008         ol_cv_func_gethostbyname_r_nargs=0
7009 fi
7010  
7011 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7012         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7013 echo "configure:7014: checking number of arguments of gethostbyaddr_r" >&5
7014 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7015   echo $ac_n "(cached) $ac_c" 1>&6
7016 else
7017   cat > conftest.$ac_ext <<EOF
7018 #line 7019 "configure"
7019 #include "confdefs.h"
7020 #include <sys/types.h>
7021 #include <sys/socket.h>
7022 #include <netinet/in.h>
7023 #include <netdb.h>
7024 #define BUFSIZE (sizeof(struct hostent)+10)
7025 int main() {
7026 struct hostent hent; char buffer[BUFSIZE]; 
7027             struct in_addr add;
7028             size_t alen=sizeof(struct in_addr);
7029             int bufsize=BUFSIZE;int h_errno;
7030                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7031                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7032 ; return 0; }
7033 EOF
7034 if { (eval echo configure:7035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7035   rm -rf conftest*
7036   ol_cv_func_gethostbyaddr_r_nargs7=yes
7037 else
7038   echo "configure: failed program was:" >&5
7039   cat conftest.$ac_ext >&5
7040   rm -rf conftest*
7041   ol_cv_func_gethostbyaddr_r_nargs7=no
7042 fi
7043 rm -f conftest*
7044
7045         cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 #include <sys/types.h>
7049 #include <sys/socket.h>
7050 #include <netinet/in.h>
7051 #include <netdb.h>
7052 #define BUFSIZE (sizeof(struct hostent)+10)
7053 int main() {
7054 struct hostent hent;
7055                 struct hostent *rhent; char buffer[BUFSIZE]; 
7056                 struct in_addr add;
7057                 size_t alen=sizeof(struct in_addr);
7058                 int bufsize=BUFSIZE;int h_errno;
7059                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7060                         alen, AF_INET, &hent, buffer, bufsize, 
7061                         &rhent, &h_errno);
7062 ; return 0; }
7063 EOF
7064 if { (eval echo configure:7065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7065   rm -rf conftest*
7066   ol_cv_func_gethostbyaddr_r_nargs8=yes
7067 else
7068   echo "configure: failed program was:" >&5
7069   cat conftest.$ac_ext >&5
7070   rm -rf conftest*
7071   ol_cv_func_gethostbyaddr_r_nargs8=no
7072 fi
7073 rm -f conftest*
7074
7075         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7076                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7077
7078                 ol_cv_func_gethostbyaddr_r_nargs=7
7079
7080         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7081                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7082
7083                 ol_cv_func_gethostbyaddr_r_nargs=8
7084
7085         else
7086                 ol_cv_func_gethostbyaddr_r_nargs=0
7087         fi
7088   
7089 fi
7090
7091 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7092   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7093     cat >> confdefs.h <<EOF
7094 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7095 EOF
7096
7097   fi
7098
7099 else
7100         ol_cv_func_gethostbyaddr_r_nargs=0
7101 fi
7102
7103 if test "$ac_cv_func_ctime_r" = yes \
7104         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7105         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7106         -a "$ac_cv_func_gethostbyname_r" = yes \
7107         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7108         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7109         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7110         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7111         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7112         ; then
7113  
7114         cat >> confdefs.h <<\EOF
7115 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7116 EOF
7117
7118 fi
7119
7120 ol_link_threads=no
7121
7122 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7123         -o $ol_with_threads = nt ; then
7124
7125         
7126         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7127 echo "configure:7128: checking for NT Threads" >&5
7128 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7129   echo $ac_n "(cached) $ac_c" 1>&6
7130 else
7131   
7132                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7133 echo "configure:7134: checking for _beginthread" >&5
7134 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7135   echo $ac_n "(cached) $ac_c" 1>&6
7136 else
7137   cat > conftest.$ac_ext <<EOF
7138 #line 7139 "configure"
7139 #include "confdefs.h"
7140 /* System header to define __stub macros and hopefully few prototypes,
7141     which can conflict with char _beginthread(); below.  */
7142 #include <assert.h>
7143 /* Override any gcc2 internal prototype to avoid an error.  */
7144 /* We use char because int might match the return type of a gcc2
7145     builtin and then its argument prototype would still apply.  */
7146 char _beginthread();
7147 char (*f)();
7148
7149 int main() {
7150
7151 /* The GNU C library defines this for functions which it implements
7152     to always fail with ENOSYS.  Some functions are actually named
7153     something starting with __ and the normal name is an alias.  */
7154 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7155 choke me
7156 #else
7157 f = _beginthread;
7158 #endif
7159
7160 ; return 0; }
7161 EOF
7162 if { (eval echo configure:7163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7163   rm -rf conftest*
7164   eval "ac_cv_func__beginthread=yes"
7165 else
7166   echo "configure: failed program was:" >&5
7167   cat conftest.$ac_ext >&5
7168   rm -rf conftest*
7169   eval "ac_cv_func__beginthread=no"
7170 fi
7171 rm -f conftest*
7172 fi
7173
7174 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7175   echo "$ac_t""yes" 1>&6
7176   ol_cv_nt_threads=yes
7177 else
7178   echo "$ac_t""no" 1>&6
7179 ol_cv_nt_threads=no
7180 fi
7181
7182         
7183 fi
7184
7185 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7186
7187         if test $ol_cv_nt_threads = yes ; then
7188                 cat >> confdefs.h <<\EOF
7189 #define HAVE_NT_THREADS 1
7190 EOF
7191
7192         fi
7193
7194
7195         if test "$ol_cv_nt_threads" = yes ; then
7196         ol_link_threads=nt
7197         ol_with_threads=found
7198         ol_with_yielding_select=yes
7199
7200                 cat >> confdefs.h <<\EOF
7201 #define HAVE_NT_SERVICE_MANAGER 1
7202 EOF
7203
7204                 cat >> confdefs.h <<\EOF
7205 #define HAVE_NT_EVENT_LOG 1
7206 EOF
7207
7208         fi
7209
7210         if test $ol_with_threads = nt ; then
7211                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7212         fi
7213 fi
7214
7215 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7216         -o $ol_with_threads = posix ; then
7217
7218         for ac_hdr in pthread.h
7219 do
7220 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7221 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7222 echo "configure:7223: checking for $ac_hdr" >&5
7223 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7224   echo $ac_n "(cached) $ac_c" 1>&6
7225 else
7226   cat > conftest.$ac_ext <<EOF
7227 #line 7228 "configure"
7228 #include "confdefs.h"
7229 #include <$ac_hdr>
7230 EOF
7231 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7232 { (eval echo configure:7233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7233 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7234 if test -z "$ac_err"; then
7235   rm -rf conftest*
7236   eval "ac_cv_header_$ac_safe=yes"
7237 else
7238   echo "$ac_err" >&5
7239   echo "configure: failed program was:" >&5
7240   cat conftest.$ac_ext >&5
7241   rm -rf conftest*
7242   eval "ac_cv_header_$ac_safe=no"
7243 fi
7244 rm -f conftest*
7245 fi
7246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7247   echo "$ac_t""yes" 1>&6
7248     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7249   cat >> confdefs.h <<EOF
7250 #define $ac_tr_hdr 1
7251 EOF
7252  
7253 else
7254   echo "$ac_t""no" 1>&6
7255 fi
7256 done
7257
7258
7259         if test $ac_cv_header_pthread_h = yes ; then
7260                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7261 echo "configure:7262: checking POSIX thread version" >&5
7262 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7263   echo $ac_n "(cached) $ac_c" 1>&6
7264 else
7265   
7266         cat > conftest.$ac_ext <<EOF
7267 #line 7268 "configure"
7268 #include "confdefs.h"
7269
7270 #               include <pthread.h>
7271                 /* this check could be improved */
7272 #               ifdef PTHREAD_ONCE_INIT
7273                         pthread_version_final;
7274 #               endif
7275         
7276 EOF
7277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7278   egrep "pthread_version_final" >/dev/null 2>&1; then
7279   rm -rf conftest*
7280   ol_pthread_final=yes
7281 else
7282   rm -rf conftest*
7283   ol_pthread_final=no
7284 fi
7285 rm -f conftest*
7286
7287
7288         cat > conftest.$ac_ext <<EOF
7289 #line 7290 "configure"
7290 #include "confdefs.h"
7291
7292 #               include <pthread.h>
7293                 /* this check could be improved */
7294 #               ifdef pthread_once_init
7295                         pthread_version_draft4;
7296 #               endif
7297         
7298 EOF
7299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7300   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7301   rm -rf conftest*
7302   ol_pthread_draft4=yes
7303 else
7304   rm -rf conftest*
7305   ol_pthread_draft4=no
7306 fi
7307 rm -f conftest*
7308
7309
7310         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7311                 ol_cv_pthread_version=final
7312         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7313                 ol_cv_pthread_version=draft4
7314         else
7315                 ol_cv_pthread_version=unknown
7316         fi
7317
7318 fi
7319
7320 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7321
7322
7323                 if test $ol_cv_pthread_version = final ; then
7324                         cat >> confdefs.h <<\EOF
7325 #define HAVE_PTHREADS_FINAL 1
7326 EOF
7327
7328                 elif test $ol_cv_pthread_version = draft4 ; then
7329                         cat >> confdefs.h <<\EOF
7330 #define HAVE_PTHREADS_D4 1
7331 EOF
7332
7333                 else
7334                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7335                 fi
7336
7337                 # consider threads found
7338                 ol_with_threads=found
7339
7340                 
7341         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7342 echo "configure:7343: checking for LinuxThreads pthread.h" >&5
7343 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7344   echo $ac_n "(cached) $ac_c" 1>&6
7345 else
7346   cat > conftest.$ac_ext <<EOF
7347 #line 7348 "configure"
7348 #include "confdefs.h"
7349 #include <pthread.h>
7350 EOF
7351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7352   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7353   rm -rf conftest*
7354   ol_cv_header_linux_threads=yes
7355 else
7356   rm -rf conftest*
7357   ol_cv_header_linux_threads=no
7358 fi
7359 rm -f conftest*
7360
7361                 
7362 fi
7363
7364 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7365         if test $ol_cv_header_linux_threads = yes; then
7366                 cat >> confdefs.h <<\EOF
7367 #define HAVE_LINUX_THREADS 1
7368 EOF
7369
7370         fi
7371
7372                 
7373         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7374 echo "configure:7375: checking for GNU Pth pthread.h" >&5
7375 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7376   echo $ac_n "(cached) $ac_c" 1>&6
7377 else
7378   cat > conftest.$ac_ext <<EOF
7379 #line 7380 "configure"
7380 #include "confdefs.h"
7381 #include <pthread.h>
7382 #ifdef _POSIX_THREAD_IS_GNU_PTH
7383         __gnu_pth__;
7384 #endif
7385
7386 EOF
7387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7388   egrep "__gnu_pth__" >/dev/null 2>&1; then
7389   rm -rf conftest*
7390   ol_cv_header_gnu_pth_pthread_h=yes
7391 else
7392   rm -rf conftest*
7393   ol_cv_header_gnu_pth_pthread_h=no
7394 fi
7395 rm -f conftest*
7396
7397                 
7398 fi
7399
7400 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7401
7402
7403                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7404                         for ac_hdr in sched.h
7405 do
7406 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7407 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7408 echo "configure:7409: checking for $ac_hdr" >&5
7409 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7410   echo $ac_n "(cached) $ac_c" 1>&6
7411 else
7412   cat > conftest.$ac_ext <<EOF
7413 #line 7414 "configure"
7414 #include "confdefs.h"
7415 #include <$ac_hdr>
7416 EOF
7417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7418 { (eval echo configure:7419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7420 if test -z "$ac_err"; then
7421   rm -rf conftest*
7422   eval "ac_cv_header_$ac_safe=yes"
7423 else
7424   echo "$ac_err" >&5
7425   echo "configure: failed program was:" >&5
7426   cat conftest.$ac_ext >&5
7427   rm -rf conftest*
7428   eval "ac_cv_header_$ac_safe=no"
7429 fi
7430 rm -f conftest*
7431 fi
7432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7433   echo "$ac_t""yes" 1>&6
7434     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7435   cat >> confdefs.h <<EOF
7436 #define $ac_tr_hdr 1
7437 EOF
7438  
7439 else
7440   echo "$ac_t""no" 1>&6
7441 fi
7442 done
7443
7444                 fi
7445
7446                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7447                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7448 echo "configure:7449: checking for pthread_create in default libraries" >&5
7449 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7450   echo $ac_n "(cached) $ac_c" 1>&6
7451 else
7452   
7453                 if test "$cross_compiling" = yes; then
7454   cat > conftest.$ac_ext <<EOF
7455 #line 7456 "configure"
7456 #include "confdefs.h"
7457 /* pthread test headers */
7458 #include <pthread.h>
7459 #ifndef NULL
7460 #define NULL (void*)0
7461 #endif
7462
7463 static void *task(p)
7464         void *p;
7465 {
7466         return (void *) (p == NULL);
7467 }
7468
7469 int main() {
7470
7471         /* pthread test function */
7472         pthread_t t;
7473         int status;
7474 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7475         /* This system (e.g. AIX) defaults detached; must override */
7476         pthread_attr_t attr;
7477
7478         status = pthread_attr_init(&attr);
7479         if( status ) exit( status );
7480
7481         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7482         if( status ) exit( status );
7483
7484 #       define  ATTR    &attr
7485 #elif defined( HAVE_PTHREADS_D4 )
7486 #       define  ATTR    pthread_attr_default
7487 #else
7488 #       define  ATTR    NULL
7489 #endif
7490
7491         /* make sure pthread_create() isn't just a stub */
7492         status = pthread_create(&t, ATTR, task, NULL);
7493         if( status ) exit( status );
7494
7495         /* give the thread a chance to complete...
7496      * it should remain joinable and hence detachable
7497          */
7498         sleep( 1 );
7499
7500         /* make sure pthread_detach() isn't just a stub */
7501 #if HAVE_PTHREADS_D4
7502         status = pthread_detach( &t );
7503 #else
7504         status = pthread_detach( t );
7505 #endif
7506
7507 #ifdef HAVE_LINUX_THREADS
7508         pthread_kill_other_threads_np();
7509 #endif
7510
7511         exit( status );
7512
7513 ; return 0; }
7514 EOF
7515 if { (eval echo configure:7516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7516   rm -rf conftest*
7517   ol_cv_pthread_create=yes
7518 else
7519   echo "configure: failed program was:" >&5
7520   cat conftest.$ac_ext >&5
7521   rm -rf conftest*
7522   ol_cv_pthread_create=no
7523 fi
7524 rm -f conftest*
7525 else
7526   cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 /* pthread test headers */
7530 #include <pthread.h>
7531 #ifndef NULL
7532 #define NULL (void*)0
7533 #endif
7534
7535 static void *task(p)
7536         void *p;
7537 {
7538         return (void *) (p == NULL);
7539 }
7540
7541
7542 int main(argc, argv)
7543         int argc;
7544         char **argv;
7545 {
7546
7547         /* pthread test function */
7548         pthread_t t;
7549         int status;
7550 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7551         /* This system (e.g. AIX) defaults detached; must override */
7552         pthread_attr_t attr;
7553
7554         status = pthread_attr_init(&attr);
7555         if( status ) exit( status );
7556
7557         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7558         if( status ) exit( status );
7559
7560 #       define  ATTR    &attr
7561 #elif defined( HAVE_PTHREADS_D4 )
7562 #       define  ATTR    pthread_attr_default
7563 #else
7564 #       define  ATTR    NULL
7565 #endif
7566
7567         /* make sure pthread_create() isn't just a stub */
7568         status = pthread_create(&t, ATTR, task, NULL);
7569         if( status ) exit( status );
7570
7571         /* give the thread a chance to complete...
7572      * it should remain joinable and hence detachable
7573          */
7574         sleep( 1 );
7575
7576         /* make sure pthread_detach() isn't just a stub */
7577 #if HAVE_PTHREADS_D4
7578         status = pthread_detach( &t );
7579 #else
7580         status = pthread_detach( t );
7581 #endif
7582
7583 #ifdef HAVE_LINUX_THREADS
7584         pthread_kill_other_threads_np();
7585 #endif
7586
7587         exit( status );
7588
7589 }
7590
7591 EOF
7592 if { (eval echo configure:7593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7593 then
7594   ol_cv_pthread_create=yes
7595 else
7596   echo "configure: failed program was:" >&5
7597   cat conftest.$ac_ext >&5
7598   rm -fr conftest*
7599   ol_cv_pthread_create=no
7600 fi
7601 rm -fr conftest*
7602 fi
7603
7604 fi
7605
7606 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7607
7608                 if test $ol_cv_pthread_create != no ; then
7609                         ol_link_threads=posix
7610                         ol_link_pthreads=""
7611                 fi
7612                 
7613                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7614 if test "$ol_link_threads" = no ; then
7615         # try -kthread
7616         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7617 echo "configure:7618: checking for pthread link with -kthread" >&5
7618 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7619   echo $ac_n "(cached) $ac_c" 1>&6
7620 else
7621   
7622                 # save the flags
7623                 ol_LIBS="$LIBS"
7624                 LIBS="-kthread $LIBS"
7625
7626                 if test "$cross_compiling" = yes; then
7627   cat > conftest.$ac_ext <<EOF
7628 #line 7629 "configure"
7629 #include "confdefs.h"
7630 /* pthread test headers */
7631 #include <pthread.h>
7632 #ifndef NULL
7633 #define NULL (void*)0
7634 #endif
7635
7636 static void *task(p)
7637         void *p;
7638 {
7639         return (void *) (p == NULL);
7640 }
7641
7642 int main() {
7643
7644         /* pthread test function */
7645         pthread_t t;
7646         int status;
7647 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7648         /* This system (e.g. AIX) defaults detached; must override */
7649         pthread_attr_t attr;
7650
7651         status = pthread_attr_init(&attr);
7652         if( status ) exit( status );
7653
7654         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7655         if( status ) exit( status );
7656
7657 #       define  ATTR    &attr
7658 #elif defined( HAVE_PTHREADS_D4 )
7659 #       define  ATTR    pthread_attr_default
7660 #else
7661 #       define  ATTR    NULL
7662 #endif
7663
7664         /* make sure pthread_create() isn't just a stub */
7665         status = pthread_create(&t, ATTR, task, NULL);
7666         if( status ) exit( status );
7667
7668         /* give the thread a chance to complete...
7669      * it should remain joinable and hence detachable
7670          */
7671         sleep( 1 );
7672
7673         /* make sure pthread_detach() isn't just a stub */
7674 #if HAVE_PTHREADS_D4
7675         status = pthread_detach( &t );
7676 #else
7677         status = pthread_detach( t );
7678 #endif
7679
7680 #ifdef HAVE_LINUX_THREADS
7681         pthread_kill_other_threads_np();
7682 #endif
7683
7684         exit( status );
7685
7686 ; return 0; }
7687 EOF
7688 if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7689   rm -rf conftest*
7690   ol_cv_pthread_kthread=yes
7691 else
7692   echo "configure: failed program was:" >&5
7693   cat conftest.$ac_ext >&5
7694   rm -rf conftest*
7695   ol_cv_pthread_kthread=no
7696 fi
7697 rm -f conftest*
7698 else
7699   cat > conftest.$ac_ext <<EOF
7700 #line 7701 "configure"
7701 #include "confdefs.h"
7702 /* pthread test headers */
7703 #include <pthread.h>
7704 #ifndef NULL
7705 #define NULL (void*)0
7706 #endif
7707
7708 static void *task(p)
7709         void *p;
7710 {
7711         return (void *) (p == NULL);
7712 }
7713
7714
7715 int main(argc, argv)
7716         int argc;
7717         char **argv;
7718 {
7719
7720         /* pthread test function */
7721         pthread_t t;
7722         int status;
7723 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7724         /* This system (e.g. AIX) defaults detached; must override */
7725         pthread_attr_t attr;
7726
7727         status = pthread_attr_init(&attr);
7728         if( status ) exit( status );
7729
7730         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7731         if( status ) exit( status );
7732
7733 #       define  ATTR    &attr
7734 #elif defined( HAVE_PTHREADS_D4 )
7735 #       define  ATTR    pthread_attr_default
7736 #else
7737 #       define  ATTR    NULL
7738 #endif
7739
7740         /* make sure pthread_create() isn't just a stub */
7741         status = pthread_create(&t, ATTR, task, NULL);
7742         if( status ) exit( status );
7743
7744         /* give the thread a chance to complete...
7745      * it should remain joinable and hence detachable
7746          */
7747         sleep( 1 );
7748
7749         /* make sure pthread_detach() isn't just a stub */
7750 #if HAVE_PTHREADS_D4
7751         status = pthread_detach( &t );
7752 #else
7753         status = pthread_detach( t );
7754 #endif
7755
7756 #ifdef HAVE_LINUX_THREADS
7757         pthread_kill_other_threads_np();
7758 #endif
7759
7760         exit( status );
7761
7762 }
7763
7764 EOF
7765 if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7766 then
7767   ol_cv_pthread_kthread=yes
7768 else
7769   echo "configure: failed program was:" >&5
7770   cat conftest.$ac_ext >&5
7771   rm -fr conftest*
7772   ol_cv_pthread_kthread=no
7773 fi
7774 rm -fr conftest*
7775 fi
7776
7777
7778                 # restore the LIBS
7779                 LIBS="$ol_LIBS"
7780         
7781 fi
7782
7783 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7784
7785         if test $ol_cv_pthread_kthread = yes ; then
7786                 ol_link_pthreads="-kthread"
7787                 ol_link_threads=posix
7788         fi
7789 fi
7790
7791                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7792 if test "$ol_link_threads" = no ; then
7793         # try -pthread
7794         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7795 echo "configure:7796: checking for pthread link with -pthread" >&5
7796 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7797   echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7799   
7800                 # save the flags
7801                 ol_LIBS="$LIBS"
7802                 LIBS="-pthread $LIBS"
7803
7804                 if test "$cross_compiling" = yes; then
7805   cat > conftest.$ac_ext <<EOF
7806 #line 7807 "configure"
7807 #include "confdefs.h"
7808 /* pthread test headers */
7809 #include <pthread.h>
7810 #ifndef NULL
7811 #define NULL (void*)0
7812 #endif
7813
7814 static void *task(p)
7815         void *p;
7816 {
7817         return (void *) (p == NULL);
7818 }
7819
7820 int main() {
7821
7822         /* pthread test function */
7823         pthread_t t;
7824         int status;
7825 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7826         /* This system (e.g. AIX) defaults detached; must override */
7827         pthread_attr_t attr;
7828
7829         status = pthread_attr_init(&attr);
7830         if( status ) exit( status );
7831
7832         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7833         if( status ) exit( status );
7834
7835 #       define  ATTR    &attr
7836 #elif defined( HAVE_PTHREADS_D4 )
7837 #       define  ATTR    pthread_attr_default
7838 #else
7839 #       define  ATTR    NULL
7840 #endif
7841
7842         /* make sure pthread_create() isn't just a stub */
7843         status = pthread_create(&t, ATTR, task, NULL);
7844         if( status ) exit( status );
7845
7846         /* give the thread a chance to complete...
7847      * it should remain joinable and hence detachable
7848          */
7849         sleep( 1 );
7850
7851         /* make sure pthread_detach() isn't just a stub */
7852 #if HAVE_PTHREADS_D4
7853         status = pthread_detach( &t );
7854 #else
7855         status = pthread_detach( t );
7856 #endif
7857
7858 #ifdef HAVE_LINUX_THREADS
7859         pthread_kill_other_threads_np();
7860 #endif
7861
7862         exit( status );
7863
7864 ; return 0; }
7865 EOF
7866 if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7867   rm -rf conftest*
7868   ol_cv_pthread_pthread=yes
7869 else
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872   rm -rf conftest*
7873   ol_cv_pthread_pthread=no
7874 fi
7875 rm -f conftest*
7876 else
7877   cat > conftest.$ac_ext <<EOF
7878 #line 7879 "configure"
7879 #include "confdefs.h"
7880 /* pthread test headers */
7881 #include <pthread.h>
7882 #ifndef NULL
7883 #define NULL (void*)0
7884 #endif
7885
7886 static void *task(p)
7887         void *p;
7888 {
7889         return (void *) (p == NULL);
7890 }
7891
7892
7893 int main(argc, argv)
7894         int argc;
7895         char **argv;
7896 {
7897
7898         /* pthread test function */
7899         pthread_t t;
7900         int status;
7901 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7902         /* This system (e.g. AIX) defaults detached; must override */
7903         pthread_attr_t attr;
7904
7905         status = pthread_attr_init(&attr);
7906         if( status ) exit( status );
7907
7908         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7909         if( status ) exit( status );
7910
7911 #       define  ATTR    &attr
7912 #elif defined( HAVE_PTHREADS_D4 )
7913 #       define  ATTR    pthread_attr_default
7914 #else
7915 #       define  ATTR    NULL
7916 #endif
7917
7918         /* make sure pthread_create() isn't just a stub */
7919         status = pthread_create(&t, ATTR, task, NULL);
7920         if( status ) exit( status );
7921
7922         /* give the thread a chance to complete...
7923      * it should remain joinable and hence detachable
7924          */
7925         sleep( 1 );
7926
7927         /* make sure pthread_detach() isn't just a stub */
7928 #if HAVE_PTHREADS_D4
7929         status = pthread_detach( &t );
7930 #else
7931         status = pthread_detach( t );
7932 #endif
7933
7934 #ifdef HAVE_LINUX_THREADS
7935         pthread_kill_other_threads_np();
7936 #endif
7937
7938         exit( status );
7939
7940 }
7941
7942 EOF
7943 if { (eval echo configure:7944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7944 then
7945   ol_cv_pthread_pthread=yes
7946 else
7947   echo "configure: failed program was:" >&5
7948   cat conftest.$ac_ext >&5
7949   rm -fr conftest*
7950   ol_cv_pthread_pthread=no
7951 fi
7952 rm -fr conftest*
7953 fi
7954
7955
7956                 # restore the LIBS
7957                 LIBS="$ol_LIBS"
7958         
7959 fi
7960
7961 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7962
7963         if test $ol_cv_pthread_pthread = yes ; then
7964                 ol_link_pthreads="-pthread"
7965                 ol_link_threads=posix
7966         fi
7967 fi
7968
7969                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7970 if test "$ol_link_threads" = no ; then
7971         # try -pthreads
7972         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7973 echo "configure:7974: checking for pthread link with -pthreads" >&5
7974 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7975   echo $ac_n "(cached) $ac_c" 1>&6
7976 else
7977   
7978                 # save the flags
7979                 ol_LIBS="$LIBS"
7980                 LIBS="-pthreads $LIBS"
7981
7982                 if test "$cross_compiling" = yes; then
7983   cat > conftest.$ac_ext <<EOF
7984 #line 7985 "configure"
7985 #include "confdefs.h"
7986 /* pthread test headers */
7987 #include <pthread.h>
7988 #ifndef NULL
7989 #define NULL (void*)0
7990 #endif
7991
7992 static void *task(p)
7993         void *p;
7994 {
7995         return (void *) (p == NULL);
7996 }
7997
7998 int main() {
7999
8000         /* pthread test function */
8001         pthread_t t;
8002         int status;
8003 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8004         /* This system (e.g. AIX) defaults detached; must override */
8005         pthread_attr_t attr;
8006
8007         status = pthread_attr_init(&attr);
8008         if( status ) exit( status );
8009
8010         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8011         if( status ) exit( status );
8012
8013 #       define  ATTR    &attr
8014 #elif defined( HAVE_PTHREADS_D4 )
8015 #       define  ATTR    pthread_attr_default
8016 #else
8017 #       define  ATTR    NULL
8018 #endif
8019
8020         /* make sure pthread_create() isn't just a stub */
8021         status = pthread_create(&t, ATTR, task, NULL);
8022         if( status ) exit( status );
8023
8024         /* give the thread a chance to complete...
8025      * it should remain joinable and hence detachable
8026          */
8027         sleep( 1 );
8028
8029         /* make sure pthread_detach() isn't just a stub */
8030 #if HAVE_PTHREADS_D4
8031         status = pthread_detach( &t );
8032 #else
8033         status = pthread_detach( t );
8034 #endif
8035
8036 #ifdef HAVE_LINUX_THREADS
8037         pthread_kill_other_threads_np();
8038 #endif
8039
8040         exit( status );
8041
8042 ; return 0; }
8043 EOF
8044 if { (eval echo configure:8045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8045   rm -rf conftest*
8046   ol_cv_pthread_pthreads=yes
8047 else
8048   echo "configure: failed program was:" >&5
8049   cat conftest.$ac_ext >&5
8050   rm -rf conftest*
8051   ol_cv_pthread_pthreads=no
8052 fi
8053 rm -f conftest*
8054 else
8055   cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 /* pthread test headers */
8059 #include <pthread.h>
8060 #ifndef NULL
8061 #define NULL (void*)0
8062 #endif
8063
8064 static void *task(p)
8065         void *p;
8066 {
8067         return (void *) (p == NULL);
8068 }
8069
8070
8071 int main(argc, argv)
8072         int argc;
8073         char **argv;
8074 {
8075
8076         /* pthread test function */
8077         pthread_t t;
8078         int status;
8079 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8080         /* This system (e.g. AIX) defaults detached; must override */
8081         pthread_attr_t attr;
8082
8083         status = pthread_attr_init(&attr);
8084         if( status ) exit( status );
8085
8086         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8087         if( status ) exit( status );
8088
8089 #       define  ATTR    &attr
8090 #elif defined( HAVE_PTHREADS_D4 )
8091 #       define  ATTR    pthread_attr_default
8092 #else
8093 #       define  ATTR    NULL
8094 #endif
8095
8096         /* make sure pthread_create() isn't just a stub */
8097         status = pthread_create(&t, ATTR, task, NULL);
8098         if( status ) exit( status );
8099
8100         /* give the thread a chance to complete...
8101      * it should remain joinable and hence detachable
8102          */
8103         sleep( 1 );
8104
8105         /* make sure pthread_detach() isn't just a stub */
8106 #if HAVE_PTHREADS_D4
8107         status = pthread_detach( &t );
8108 #else
8109         status = pthread_detach( t );
8110 #endif
8111
8112 #ifdef HAVE_LINUX_THREADS
8113         pthread_kill_other_threads_np();
8114 #endif
8115
8116         exit( status );
8117
8118 }
8119
8120 EOF
8121 if { (eval echo configure:8122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8122 then
8123   ol_cv_pthread_pthreads=yes
8124 else
8125   echo "configure: failed program was:" >&5
8126   cat conftest.$ac_ext >&5
8127   rm -fr conftest*
8128   ol_cv_pthread_pthreads=no
8129 fi
8130 rm -fr conftest*
8131 fi
8132
8133
8134                 # restore the LIBS
8135                 LIBS="$ol_LIBS"
8136         
8137 fi
8138
8139 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8140
8141         if test $ol_cv_pthread_pthreads = yes ; then
8142                 ol_link_pthreads="-pthreads"
8143                 ol_link_threads=posix
8144         fi
8145 fi
8146
8147                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8148 if test "$ol_link_threads" = no ; then
8149         # try -mthreads
8150         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8151 echo "configure:8152: checking for pthread link with -mthreads" >&5
8152 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8153   echo $ac_n "(cached) $ac_c" 1>&6
8154 else
8155   
8156                 # save the flags
8157                 ol_LIBS="$LIBS"
8158                 LIBS="-mthreads $LIBS"
8159
8160                 if test "$cross_compiling" = yes; then
8161   cat > conftest.$ac_ext <<EOF
8162 #line 8163 "configure"
8163 #include "confdefs.h"
8164 /* pthread test headers */
8165 #include <pthread.h>
8166 #ifndef NULL
8167 #define NULL (void*)0
8168 #endif
8169
8170 static void *task(p)
8171         void *p;
8172 {
8173         return (void *) (p == NULL);
8174 }
8175
8176 int main() {
8177
8178         /* pthread test function */
8179         pthread_t t;
8180         int status;
8181 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8182         /* This system (e.g. AIX) defaults detached; must override */
8183         pthread_attr_t attr;
8184
8185         status = pthread_attr_init(&attr);
8186         if( status ) exit( status );
8187
8188         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8189         if( status ) exit( status );
8190
8191 #       define  ATTR    &attr
8192 #elif defined( HAVE_PTHREADS_D4 )
8193 #       define  ATTR    pthread_attr_default
8194 #else
8195 #       define  ATTR    NULL
8196 #endif
8197
8198         /* make sure pthread_create() isn't just a stub */
8199         status = pthread_create(&t, ATTR, task, NULL);
8200         if( status ) exit( status );
8201
8202         /* give the thread a chance to complete...
8203      * it should remain joinable and hence detachable
8204          */
8205         sleep( 1 );
8206
8207         /* make sure pthread_detach() isn't just a stub */
8208 #if HAVE_PTHREADS_D4
8209         status = pthread_detach( &t );
8210 #else
8211         status = pthread_detach( t );
8212 #endif
8213
8214 #ifdef HAVE_LINUX_THREADS
8215         pthread_kill_other_threads_np();
8216 #endif
8217
8218         exit( status );
8219
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8223   rm -rf conftest*
8224   ol_cv_pthread_mthreads=yes
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   ol_cv_pthread_mthreads=no
8230 fi
8231 rm -f conftest*
8232 else
8233   cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 /* pthread test headers */
8237 #include <pthread.h>
8238 #ifndef NULL
8239 #define NULL (void*)0
8240 #endif
8241
8242 static void *task(p)
8243         void *p;
8244 {
8245         return (void *) (p == NULL);
8246 }
8247
8248
8249 int main(argc, argv)
8250         int argc;
8251         char **argv;
8252 {
8253
8254         /* pthread test function */
8255         pthread_t t;
8256         int status;
8257 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8258         /* This system (e.g. AIX) defaults detached; must override */
8259         pthread_attr_t attr;
8260
8261         status = pthread_attr_init(&attr);
8262         if( status ) exit( status );
8263
8264         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8265         if( status ) exit( status );
8266
8267 #       define  ATTR    &attr
8268 #elif defined( HAVE_PTHREADS_D4 )
8269 #       define  ATTR    pthread_attr_default
8270 #else
8271 #       define  ATTR    NULL
8272 #endif
8273
8274         /* make sure pthread_create() isn't just a stub */
8275         status = pthread_create(&t, ATTR, task, NULL);
8276         if( status ) exit( status );
8277
8278         /* give the thread a chance to complete...
8279      * it should remain joinable and hence detachable
8280          */
8281         sleep( 1 );
8282
8283         /* make sure pthread_detach() isn't just a stub */
8284 #if HAVE_PTHREADS_D4
8285         status = pthread_detach( &t );
8286 #else
8287         status = pthread_detach( t );
8288 #endif
8289
8290 #ifdef HAVE_LINUX_THREADS
8291         pthread_kill_other_threads_np();
8292 #endif
8293
8294         exit( status );
8295
8296 }
8297
8298 EOF
8299 if { (eval echo configure:8300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8300 then
8301   ol_cv_pthread_mthreads=yes
8302 else
8303   echo "configure: failed program was:" >&5
8304   cat conftest.$ac_ext >&5
8305   rm -fr conftest*
8306   ol_cv_pthread_mthreads=no
8307 fi
8308 rm -fr conftest*
8309 fi
8310
8311
8312                 # restore the LIBS
8313                 LIBS="$ol_LIBS"
8314         
8315 fi
8316
8317 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8318
8319         if test $ol_cv_pthread_mthreads = yes ; then
8320                 ol_link_pthreads="-mthreads"
8321                 ol_link_threads=posix
8322         fi
8323 fi
8324
8325                 # Pthread try link: -thread (ol_cv_pthread_thread)
8326 if test "$ol_link_threads" = no ; then
8327         # try -thread
8328         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8329 echo "configure:8330: checking for pthread link with -thread" >&5
8330 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8331   echo $ac_n "(cached) $ac_c" 1>&6
8332 else
8333   
8334                 # save the flags
8335                 ol_LIBS="$LIBS"
8336                 LIBS="-thread $LIBS"
8337
8338                 if test "$cross_compiling" = yes; then
8339   cat > conftest.$ac_ext <<EOF
8340 #line 8341 "configure"
8341 #include "confdefs.h"
8342 /* pthread test headers */
8343 #include <pthread.h>
8344 #ifndef NULL
8345 #define NULL (void*)0
8346 #endif
8347
8348 static void *task(p)
8349         void *p;
8350 {
8351         return (void *) (p == NULL);
8352 }
8353
8354 int main() {
8355
8356         /* pthread test function */
8357         pthread_t t;
8358         int status;
8359 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8360         /* This system (e.g. AIX) defaults detached; must override */
8361         pthread_attr_t attr;
8362
8363         status = pthread_attr_init(&attr);
8364         if( status ) exit( status );
8365
8366         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8367         if( status ) exit( status );
8368
8369 #       define  ATTR    &attr
8370 #elif defined( HAVE_PTHREADS_D4 )
8371 #       define  ATTR    pthread_attr_default
8372 #else
8373 #       define  ATTR    NULL
8374 #endif
8375
8376         /* make sure pthread_create() isn't just a stub */
8377         status = pthread_create(&t, ATTR, task, NULL);
8378         if( status ) exit( status );
8379
8380         /* give the thread a chance to complete...
8381      * it should remain joinable and hence detachable
8382          */
8383         sleep( 1 );
8384
8385         /* make sure pthread_detach() isn't just a stub */
8386 #if HAVE_PTHREADS_D4
8387         status = pthread_detach( &t );
8388 #else
8389         status = pthread_detach( t );
8390 #endif
8391
8392 #ifdef HAVE_LINUX_THREADS
8393         pthread_kill_other_threads_np();
8394 #endif
8395
8396         exit( status );
8397
8398 ; return 0; }
8399 EOF
8400 if { (eval echo configure:8401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8401   rm -rf conftest*
8402   ol_cv_pthread_thread=yes
8403 else
8404   echo "configure: failed program was:" >&5
8405   cat conftest.$ac_ext >&5
8406   rm -rf conftest*
8407   ol_cv_pthread_thread=no
8408 fi
8409 rm -f conftest*
8410 else
8411   cat > conftest.$ac_ext <<EOF
8412 #line 8413 "configure"
8413 #include "confdefs.h"
8414 /* pthread test headers */
8415 #include <pthread.h>
8416 #ifndef NULL
8417 #define NULL (void*)0
8418 #endif
8419
8420 static void *task(p)
8421         void *p;
8422 {
8423         return (void *) (p == NULL);
8424 }
8425
8426
8427 int main(argc, argv)
8428         int argc;
8429         char **argv;
8430 {
8431
8432         /* pthread test function */
8433         pthread_t t;
8434         int status;
8435 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8436         /* This system (e.g. AIX) defaults detached; must override */
8437         pthread_attr_t attr;
8438
8439         status = pthread_attr_init(&attr);
8440         if( status ) exit( status );
8441
8442         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8443         if( status ) exit( status );
8444
8445 #       define  ATTR    &attr
8446 #elif defined( HAVE_PTHREADS_D4 )
8447 #       define  ATTR    pthread_attr_default
8448 #else
8449 #       define  ATTR    NULL
8450 #endif
8451
8452         /* make sure pthread_create() isn't just a stub */
8453         status = pthread_create(&t, ATTR, task, NULL);
8454         if( status ) exit( status );
8455
8456         /* give the thread a chance to complete...
8457      * it should remain joinable and hence detachable
8458          */
8459         sleep( 1 );
8460
8461         /* make sure pthread_detach() isn't just a stub */
8462 #if HAVE_PTHREADS_D4
8463         status = pthread_detach( &t );
8464 #else
8465         status = pthread_detach( t );
8466 #endif
8467
8468 #ifdef HAVE_LINUX_THREADS
8469         pthread_kill_other_threads_np();
8470 #endif
8471
8472         exit( status );
8473
8474 }
8475
8476 EOF
8477 if { (eval echo configure:8478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8478 then
8479   ol_cv_pthread_thread=yes
8480 else
8481   echo "configure: failed program was:" >&5
8482   cat conftest.$ac_ext >&5
8483   rm -fr conftest*
8484   ol_cv_pthread_thread=no
8485 fi
8486 rm -fr conftest*
8487 fi
8488
8489
8490                 # restore the LIBS
8491                 LIBS="$ol_LIBS"
8492         
8493 fi
8494
8495 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8496
8497         if test $ol_cv_pthread_thread = yes ; then
8498                 ol_link_pthreads="-thread"
8499                 ol_link_threads=posix
8500         fi
8501 fi
8502
8503
8504                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8505 if test "$ol_link_threads" = no ; then
8506         # try -lpthread -lmach -lexc -lc_r
8507         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8508 echo "configure:8509: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8509 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8510   echo $ac_n "(cached) $ac_c" 1>&6
8511 else
8512   
8513                 # save the flags
8514                 ol_LIBS="$LIBS"
8515                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8516
8517                 if test "$cross_compiling" = yes; then
8518   cat > conftest.$ac_ext <<EOF
8519 #line 8520 "configure"
8520 #include "confdefs.h"
8521 /* pthread test headers */
8522 #include <pthread.h>
8523 #ifndef NULL
8524 #define NULL (void*)0
8525 #endif
8526
8527 static void *task(p)
8528         void *p;
8529 {
8530         return (void *) (p == NULL);
8531 }
8532
8533 int main() {
8534
8535         /* pthread test function */
8536         pthread_t t;
8537         int status;
8538 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8539         /* This system (e.g. AIX) defaults detached; must override */
8540         pthread_attr_t attr;
8541
8542         status = pthread_attr_init(&attr);
8543         if( status ) exit( status );
8544
8545         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8546         if( status ) exit( status );
8547
8548 #       define  ATTR    &attr
8549 #elif defined( HAVE_PTHREADS_D4 )
8550 #       define  ATTR    pthread_attr_default
8551 #else
8552 #       define  ATTR    NULL
8553 #endif
8554
8555         /* make sure pthread_create() isn't just a stub */
8556         status = pthread_create(&t, ATTR, task, NULL);
8557         if( status ) exit( status );
8558
8559         /* give the thread a chance to complete...
8560      * it should remain joinable and hence detachable
8561          */
8562         sleep( 1 );
8563
8564         /* make sure pthread_detach() isn't just a stub */
8565 #if HAVE_PTHREADS_D4
8566         status = pthread_detach( &t );
8567 #else
8568         status = pthread_detach( t );
8569 #endif
8570
8571 #ifdef HAVE_LINUX_THREADS
8572         pthread_kill_other_threads_np();
8573 #endif
8574
8575         exit( status );
8576
8577 ; return 0; }
8578 EOF
8579 if { (eval echo configure:8580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8580   rm -rf conftest*
8581   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8582 else
8583   echo "configure: failed program was:" >&5
8584   cat conftest.$ac_ext >&5
8585   rm -rf conftest*
8586   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8587 fi
8588 rm -f conftest*
8589 else
8590   cat > conftest.$ac_ext <<EOF
8591 #line 8592 "configure"
8592 #include "confdefs.h"
8593 /* pthread test headers */
8594 #include <pthread.h>
8595 #ifndef NULL
8596 #define NULL (void*)0
8597 #endif
8598
8599 static void *task(p)
8600         void *p;
8601 {
8602         return (void *) (p == NULL);
8603 }
8604
8605
8606 int main(argc, argv)
8607         int argc;
8608         char **argv;
8609 {
8610
8611         /* pthread test function */
8612         pthread_t t;
8613         int status;
8614 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8615         /* This system (e.g. AIX) defaults detached; must override */
8616         pthread_attr_t attr;
8617
8618         status = pthread_attr_init(&attr);
8619         if( status ) exit( status );
8620
8621         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8622         if( status ) exit( status );
8623
8624 #       define  ATTR    &attr
8625 #elif defined( HAVE_PTHREADS_D4 )
8626 #       define  ATTR    pthread_attr_default
8627 #else
8628 #       define  ATTR    NULL
8629 #endif
8630
8631         /* make sure pthread_create() isn't just a stub */
8632         status = pthread_create(&t, ATTR, task, NULL);
8633         if( status ) exit( status );
8634
8635         /* give the thread a chance to complete...
8636      * it should remain joinable and hence detachable
8637          */
8638         sleep( 1 );
8639
8640         /* make sure pthread_detach() isn't just a stub */
8641 #if HAVE_PTHREADS_D4
8642         status = pthread_detach( &t );
8643 #else
8644         status = pthread_detach( t );
8645 #endif
8646
8647 #ifdef HAVE_LINUX_THREADS
8648         pthread_kill_other_threads_np();
8649 #endif
8650
8651         exit( status );
8652
8653 }
8654
8655 EOF
8656 if { (eval echo configure:8657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8657 then
8658   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8659 else
8660   echo "configure: failed program was:" >&5
8661   cat conftest.$ac_ext >&5
8662   rm -fr conftest*
8663   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8664 fi
8665 rm -fr conftest*
8666 fi
8667
8668
8669                 # restore the LIBS
8670                 LIBS="$ol_LIBS"
8671         
8672 fi
8673
8674 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8675
8676         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8677                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8678                 ol_link_threads=posix
8679         fi
8680 fi
8681
8682                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8683 if test "$ol_link_threads" = no ; then
8684         # try -lpthread -lmach -lexc
8685         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8686 echo "configure:8687: checking for pthread link with -lpthread -lmach -lexc" >&5
8687 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8688   echo $ac_n "(cached) $ac_c" 1>&6
8689 else
8690   
8691                 # save the flags
8692                 ol_LIBS="$LIBS"
8693                 LIBS="-lpthread -lmach -lexc $LIBS"
8694
8695                 if test "$cross_compiling" = yes; then
8696   cat > conftest.$ac_ext <<EOF
8697 #line 8698 "configure"
8698 #include "confdefs.h"
8699 /* pthread test headers */
8700 #include <pthread.h>
8701 #ifndef NULL
8702 #define NULL (void*)0
8703 #endif
8704
8705 static void *task(p)
8706         void *p;
8707 {
8708         return (void *) (p == NULL);
8709 }
8710
8711 int main() {
8712
8713         /* pthread test function */
8714         pthread_t t;
8715         int status;
8716 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8717         /* This system (e.g. AIX) defaults detached; must override */
8718         pthread_attr_t attr;
8719
8720         status = pthread_attr_init(&attr);
8721         if( status ) exit( status );
8722
8723         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8724         if( status ) exit( status );
8725
8726 #       define  ATTR    &attr
8727 #elif defined( HAVE_PTHREADS_D4 )
8728 #       define  ATTR    pthread_attr_default
8729 #else
8730 #       define  ATTR    NULL
8731 #endif
8732
8733         /* make sure pthread_create() isn't just a stub */
8734         status = pthread_create(&t, ATTR, task, NULL);
8735         if( status ) exit( status );
8736
8737         /* give the thread a chance to complete...
8738      * it should remain joinable and hence detachable
8739          */
8740         sleep( 1 );
8741
8742         /* make sure pthread_detach() isn't just a stub */
8743 #if HAVE_PTHREADS_D4
8744         status = pthread_detach( &t );
8745 #else
8746         status = pthread_detach( t );
8747 #endif
8748
8749 #ifdef HAVE_LINUX_THREADS
8750         pthread_kill_other_threads_np();
8751 #endif
8752
8753         exit( status );
8754
8755 ; return 0; }
8756 EOF
8757 if { (eval echo configure:8758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8758   rm -rf conftest*
8759   ol_cv_pthread_lpthread_lmach_lexc=yes
8760 else
8761   echo "configure: failed program was:" >&5
8762   cat conftest.$ac_ext >&5
8763   rm -rf conftest*
8764   ol_cv_pthread_lpthread_lmach_lexc=no
8765 fi
8766 rm -f conftest*
8767 else
8768   cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 /* pthread test headers */
8772 #include <pthread.h>
8773 #ifndef NULL
8774 #define NULL (void*)0
8775 #endif
8776
8777 static void *task(p)
8778         void *p;
8779 {
8780         return (void *) (p == NULL);
8781 }
8782
8783
8784 int main(argc, argv)
8785         int argc;
8786         char **argv;
8787 {
8788
8789         /* pthread test function */
8790         pthread_t t;
8791         int status;
8792 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8793         /* This system (e.g. AIX) defaults detached; must override */
8794         pthread_attr_t attr;
8795
8796         status = pthread_attr_init(&attr);
8797         if( status ) exit( status );
8798
8799         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8800         if( status ) exit( status );
8801
8802 #       define  ATTR    &attr
8803 #elif defined( HAVE_PTHREADS_D4 )
8804 #       define  ATTR    pthread_attr_default
8805 #else
8806 #       define  ATTR    NULL
8807 #endif
8808
8809         /* make sure pthread_create() isn't just a stub */
8810         status = pthread_create(&t, ATTR, task, NULL);
8811         if( status ) exit( status );
8812
8813         /* give the thread a chance to complete...
8814      * it should remain joinable and hence detachable
8815          */
8816         sleep( 1 );
8817
8818         /* make sure pthread_detach() isn't just a stub */
8819 #if HAVE_PTHREADS_D4
8820         status = pthread_detach( &t );
8821 #else
8822         status = pthread_detach( t );
8823 #endif
8824
8825 #ifdef HAVE_LINUX_THREADS
8826         pthread_kill_other_threads_np();
8827 #endif
8828
8829         exit( status );
8830
8831 }
8832
8833 EOF
8834 if { (eval echo configure:8835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8835 then
8836   ol_cv_pthread_lpthread_lmach_lexc=yes
8837 else
8838   echo "configure: failed program was:" >&5
8839   cat conftest.$ac_ext >&5
8840   rm -fr conftest*
8841   ol_cv_pthread_lpthread_lmach_lexc=no
8842 fi
8843 rm -fr conftest*
8844 fi
8845
8846
8847                 # restore the LIBS
8848                 LIBS="$ol_LIBS"
8849         
8850 fi
8851
8852 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8853
8854         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8855                 ol_link_pthreads="-lpthread -lmach -lexc"
8856                 ol_link_threads=posix
8857         fi
8858 fi
8859
8860
8861                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8862 if test "$ol_link_threads" = no ; then
8863         # try -lpthread -Wl,-woff,85
8864         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8865 echo "configure:8866: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8866 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8867   echo $ac_n "(cached) $ac_c" 1>&6
8868 else
8869   
8870                 # save the flags
8871                 ol_LIBS="$LIBS"
8872                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8873
8874                 if test "$cross_compiling" = yes; then
8875   cat > conftest.$ac_ext <<EOF
8876 #line 8877 "configure"
8877 #include "confdefs.h"
8878 /* pthread test headers */
8879 #include <pthread.h>
8880 #ifndef NULL
8881 #define NULL (void*)0
8882 #endif
8883
8884 static void *task(p)
8885         void *p;
8886 {
8887         return (void *) (p == NULL);
8888 }
8889
8890 int main() {
8891
8892         /* pthread test function */
8893         pthread_t t;
8894         int status;
8895 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8896         /* This system (e.g. AIX) defaults detached; must override */
8897         pthread_attr_t attr;
8898
8899         status = pthread_attr_init(&attr);
8900         if( status ) exit( status );
8901
8902         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8903         if( status ) exit( status );
8904
8905 #       define  ATTR    &attr
8906 #elif defined( HAVE_PTHREADS_D4 )
8907 #       define  ATTR    pthread_attr_default
8908 #else
8909 #       define  ATTR    NULL
8910 #endif
8911
8912         /* make sure pthread_create() isn't just a stub */
8913         status = pthread_create(&t, ATTR, task, NULL);
8914         if( status ) exit( status );
8915
8916         /* give the thread a chance to complete...
8917      * it should remain joinable and hence detachable
8918          */
8919         sleep( 1 );
8920
8921         /* make sure pthread_detach() isn't just a stub */
8922 #if HAVE_PTHREADS_D4
8923         status = pthread_detach( &t );
8924 #else
8925         status = pthread_detach( t );
8926 #endif
8927
8928 #ifdef HAVE_LINUX_THREADS
8929         pthread_kill_other_threads_np();
8930 #endif
8931
8932         exit( status );
8933
8934 ; return 0; }
8935 EOF
8936 if { (eval echo configure:8937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8937   rm -rf conftest*
8938   ol_cv_pthread_lib_lpthread_woff=yes
8939 else
8940   echo "configure: failed program was:" >&5
8941   cat conftest.$ac_ext >&5
8942   rm -rf conftest*
8943   ol_cv_pthread_lib_lpthread_woff=no
8944 fi
8945 rm -f conftest*
8946 else
8947   cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 /* pthread test headers */
8951 #include <pthread.h>
8952 #ifndef NULL
8953 #define NULL (void*)0
8954 #endif
8955
8956 static void *task(p)
8957         void *p;
8958 {
8959         return (void *) (p == NULL);
8960 }
8961
8962
8963 int main(argc, argv)
8964         int argc;
8965         char **argv;
8966 {
8967
8968         /* pthread test function */
8969         pthread_t t;
8970         int status;
8971 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8972         /* This system (e.g. AIX) defaults detached; must override */
8973         pthread_attr_t attr;
8974
8975         status = pthread_attr_init(&attr);
8976         if( status ) exit( status );
8977
8978         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8979         if( status ) exit( status );
8980
8981 #       define  ATTR    &attr
8982 #elif defined( HAVE_PTHREADS_D4 )
8983 #       define  ATTR    pthread_attr_default
8984 #else
8985 #       define  ATTR    NULL
8986 #endif
8987
8988         /* make sure pthread_create() isn't just a stub */
8989         status = pthread_create(&t, ATTR, task, NULL);
8990         if( status ) exit( status );
8991
8992         /* give the thread a chance to complete...
8993      * it should remain joinable and hence detachable
8994          */
8995         sleep( 1 );
8996
8997         /* make sure pthread_detach() isn't just a stub */
8998 #if HAVE_PTHREADS_D4
8999         status = pthread_detach( &t );
9000 #else
9001         status = pthread_detach( t );
9002 #endif
9003
9004 #ifdef HAVE_LINUX_THREADS
9005         pthread_kill_other_threads_np();
9006 #endif
9007
9008         exit( status );
9009
9010 }
9011
9012 EOF
9013 if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9014 then
9015   ol_cv_pthread_lib_lpthread_woff=yes
9016 else
9017   echo "configure: failed program was:" >&5
9018   cat conftest.$ac_ext >&5
9019   rm -fr conftest*
9020   ol_cv_pthread_lib_lpthread_woff=no
9021 fi
9022 rm -fr conftest*
9023 fi
9024
9025
9026                 # restore the LIBS
9027                 LIBS="$ol_LIBS"
9028         
9029 fi
9030
9031 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9032
9033         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9034                 ol_link_pthreads="-lpthread -Wl,-woff,85"
9035                 ol_link_threads=posix
9036         fi
9037 fi
9038
9039
9040                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9041 if test "$ol_link_threads" = no ; then
9042         # try -lpthread
9043         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9044 echo "configure:9045: checking for pthread link with -lpthread" >&5
9045 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9046   echo $ac_n "(cached) $ac_c" 1>&6
9047 else
9048   
9049                 # save the flags
9050                 ol_LIBS="$LIBS"
9051                 LIBS="-lpthread $LIBS"
9052
9053                 if test "$cross_compiling" = yes; then
9054   cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057 /* pthread test headers */
9058 #include <pthread.h>
9059 #ifndef NULL
9060 #define NULL (void*)0
9061 #endif
9062
9063 static void *task(p)
9064         void *p;
9065 {
9066         return (void *) (p == NULL);
9067 }
9068
9069 int main() {
9070
9071         /* pthread test function */
9072         pthread_t t;
9073         int status;
9074 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9075         /* This system (e.g. AIX) defaults detached; must override */
9076         pthread_attr_t attr;
9077
9078         status = pthread_attr_init(&attr);
9079         if( status ) exit( status );
9080
9081         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9082         if( status ) exit( status );
9083
9084 #       define  ATTR    &attr
9085 #elif defined( HAVE_PTHREADS_D4 )
9086 #       define  ATTR    pthread_attr_default
9087 #else
9088 #       define  ATTR    NULL
9089 #endif
9090
9091         /* make sure pthread_create() isn't just a stub */
9092         status = pthread_create(&t, ATTR, task, NULL);
9093         if( status ) exit( status );
9094
9095         /* give the thread a chance to complete...
9096      * it should remain joinable and hence detachable
9097          */
9098         sleep( 1 );
9099
9100         /* make sure pthread_detach() isn't just a stub */
9101 #if HAVE_PTHREADS_D4
9102         status = pthread_detach( &t );
9103 #else
9104         status = pthread_detach( t );
9105 #endif
9106
9107 #ifdef HAVE_LINUX_THREADS
9108         pthread_kill_other_threads_np();
9109 #endif
9110
9111         exit( status );
9112
9113 ; return 0; }
9114 EOF
9115 if { (eval echo configure:9116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9116   rm -rf conftest*
9117   ol_cv_pthread_lpthread=yes
9118 else
9119   echo "configure: failed program was:" >&5
9120   cat conftest.$ac_ext >&5
9121   rm -rf conftest*
9122   ol_cv_pthread_lpthread=no
9123 fi
9124 rm -f conftest*
9125 else
9126   cat > conftest.$ac_ext <<EOF
9127 #line 9128 "configure"
9128 #include "confdefs.h"
9129 /* pthread test headers */
9130 #include <pthread.h>
9131 #ifndef NULL
9132 #define NULL (void*)0
9133 #endif
9134
9135 static void *task(p)
9136         void *p;
9137 {
9138         return (void *) (p == NULL);
9139 }
9140
9141
9142 int main(argc, argv)
9143         int argc;
9144         char **argv;
9145 {
9146
9147         /* pthread test function */
9148         pthread_t t;
9149         int status;
9150 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9151         /* This system (e.g. AIX) defaults detached; must override */
9152         pthread_attr_t attr;
9153
9154         status = pthread_attr_init(&attr);
9155         if( status ) exit( status );
9156
9157         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9158         if( status ) exit( status );
9159
9160 #       define  ATTR    &attr
9161 #elif defined( HAVE_PTHREADS_D4 )
9162 #       define  ATTR    pthread_attr_default
9163 #else
9164 #       define  ATTR    NULL
9165 #endif
9166
9167         /* make sure pthread_create() isn't just a stub */
9168         status = pthread_create(&t, ATTR, task, NULL);
9169         if( status ) exit( status );
9170
9171         /* give the thread a chance to complete...
9172      * it should remain joinable and hence detachable
9173          */
9174         sleep( 1 );
9175
9176         /* make sure pthread_detach() isn't just a stub */
9177 #if HAVE_PTHREADS_D4
9178         status = pthread_detach( &t );
9179 #else
9180         status = pthread_detach( t );
9181 #endif
9182
9183 #ifdef HAVE_LINUX_THREADS
9184         pthread_kill_other_threads_np();
9185 #endif
9186
9187         exit( status );
9188
9189 }
9190
9191 EOF
9192 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9193 then
9194   ol_cv_pthread_lpthread=yes
9195 else
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -fr conftest*
9199   ol_cv_pthread_lpthread=no
9200 fi
9201 rm -fr conftest*
9202 fi
9203
9204
9205                 # restore the LIBS
9206                 LIBS="$ol_LIBS"
9207         
9208 fi
9209
9210 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9211
9212         if test $ol_cv_pthread_lpthread = yes ; then
9213                 ol_link_pthreads="-lpthread"
9214                 ol_link_threads=posix
9215         fi
9216 fi
9217
9218                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9219 if test "$ol_link_threads" = no ; then
9220         # try -lc_r
9221         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9222 echo "configure:9223: checking for pthread link with -lc_r" >&5
9223 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9224   echo $ac_n "(cached) $ac_c" 1>&6
9225 else
9226   
9227                 # save the flags
9228                 ol_LIBS="$LIBS"
9229                 LIBS="-lc_r $LIBS"
9230
9231                 if test "$cross_compiling" = yes; then
9232   cat > conftest.$ac_ext <<EOF
9233 #line 9234 "configure"
9234 #include "confdefs.h"
9235 /* pthread test headers */
9236 #include <pthread.h>
9237 #ifndef NULL
9238 #define NULL (void*)0
9239 #endif
9240
9241 static void *task(p)
9242         void *p;
9243 {
9244         return (void *) (p == NULL);
9245 }
9246
9247 int main() {
9248
9249         /* pthread test function */
9250         pthread_t t;
9251         int status;
9252 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9253         /* This system (e.g. AIX) defaults detached; must override */
9254         pthread_attr_t attr;
9255
9256         status = pthread_attr_init(&attr);
9257         if( status ) exit( status );
9258
9259         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9260         if( status ) exit( status );
9261
9262 #       define  ATTR    &attr
9263 #elif defined( HAVE_PTHREADS_D4 )
9264 #       define  ATTR    pthread_attr_default
9265 #else
9266 #       define  ATTR    NULL
9267 #endif
9268
9269         /* make sure pthread_create() isn't just a stub */
9270         status = pthread_create(&t, ATTR, task, NULL);
9271         if( status ) exit( status );
9272
9273         /* give the thread a chance to complete...
9274      * it should remain joinable and hence detachable
9275          */
9276         sleep( 1 );
9277
9278         /* make sure pthread_detach() isn't just a stub */
9279 #if HAVE_PTHREADS_D4
9280         status = pthread_detach( &t );
9281 #else
9282         status = pthread_detach( t );
9283 #endif
9284
9285 #ifdef HAVE_LINUX_THREADS
9286         pthread_kill_other_threads_np();
9287 #endif
9288
9289         exit( status );
9290
9291 ; return 0; }
9292 EOF
9293 if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9294   rm -rf conftest*
9295   ol_cv_pthread_lc_r=yes
9296 else
9297   echo "configure: failed program was:" >&5
9298   cat conftest.$ac_ext >&5
9299   rm -rf conftest*
9300   ol_cv_pthread_lc_r=no
9301 fi
9302 rm -f conftest*
9303 else
9304   cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307 /* pthread test headers */
9308 #include <pthread.h>
9309 #ifndef NULL
9310 #define NULL (void*)0
9311 #endif
9312
9313 static void *task(p)
9314         void *p;
9315 {
9316         return (void *) (p == NULL);
9317 }
9318
9319
9320 int main(argc, argv)
9321         int argc;
9322         char **argv;
9323 {
9324
9325         /* pthread test function */
9326         pthread_t t;
9327         int status;
9328 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9329         /* This system (e.g. AIX) defaults detached; must override */
9330         pthread_attr_t attr;
9331
9332         status = pthread_attr_init(&attr);
9333         if( status ) exit( status );
9334
9335         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9336         if( status ) exit( status );
9337
9338 #       define  ATTR    &attr
9339 #elif defined( HAVE_PTHREADS_D4 )
9340 #       define  ATTR    pthread_attr_default
9341 #else
9342 #       define  ATTR    NULL
9343 #endif
9344
9345         /* make sure pthread_create() isn't just a stub */
9346         status = pthread_create(&t, ATTR, task, NULL);
9347         if( status ) exit( status );
9348
9349         /* give the thread a chance to complete...
9350      * it should remain joinable and hence detachable
9351          */
9352         sleep( 1 );
9353
9354         /* make sure pthread_detach() isn't just a stub */
9355 #if HAVE_PTHREADS_D4
9356         status = pthread_detach( &t );
9357 #else
9358         status = pthread_detach( t );
9359 #endif
9360
9361 #ifdef HAVE_LINUX_THREADS
9362         pthread_kill_other_threads_np();
9363 #endif
9364
9365         exit( status );
9366
9367 }
9368
9369 EOF
9370 if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9371 then
9372   ol_cv_pthread_lc_r=yes
9373 else
9374   echo "configure: failed program was:" >&5
9375   cat conftest.$ac_ext >&5
9376   rm -fr conftest*
9377   ol_cv_pthread_lc_r=no
9378 fi
9379 rm -fr conftest*
9380 fi
9381
9382
9383                 # restore the LIBS
9384                 LIBS="$ol_LIBS"
9385         
9386 fi
9387
9388 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9389
9390         if test $ol_cv_pthread_lc_r = yes ; then
9391                 ol_link_pthreads="-lc_r"
9392                 ol_link_threads=posix
9393         fi
9394 fi
9395
9396
9397                 # Pthread try link: -threads (ol_cv_pthread_threads)
9398 if test "$ol_link_threads" = no ; then
9399         # try -threads
9400         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9401 echo "configure:9402: checking for pthread link with -threads" >&5
9402 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9403   echo $ac_n "(cached) $ac_c" 1>&6
9404 else
9405   
9406                 # save the flags
9407                 ol_LIBS="$LIBS"
9408                 LIBS="-threads $LIBS"
9409
9410                 if test "$cross_compiling" = yes; then
9411   cat > conftest.$ac_ext <<EOF
9412 #line 9413 "configure"
9413 #include "confdefs.h"
9414 /* pthread test headers */
9415 #include <pthread.h>
9416 #ifndef NULL
9417 #define NULL (void*)0
9418 #endif
9419
9420 static void *task(p)
9421         void *p;
9422 {
9423         return (void *) (p == NULL);
9424 }
9425
9426 int main() {
9427
9428         /* pthread test function */
9429         pthread_t t;
9430         int status;
9431 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9432         /* This system (e.g. AIX) defaults detached; must override */
9433         pthread_attr_t attr;
9434
9435         status = pthread_attr_init(&attr);
9436         if( status ) exit( status );
9437
9438         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9439         if( status ) exit( status );
9440
9441 #       define  ATTR    &attr
9442 #elif defined( HAVE_PTHREADS_D4 )
9443 #       define  ATTR    pthread_attr_default
9444 #else
9445 #       define  ATTR    NULL
9446 #endif
9447
9448         /* make sure pthread_create() isn't just a stub */
9449         status = pthread_create(&t, ATTR, task, NULL);
9450         if( status ) exit( status );
9451
9452         /* give the thread a chance to complete...
9453      * it should remain joinable and hence detachable
9454          */
9455         sleep( 1 );
9456
9457         /* make sure pthread_detach() isn't just a stub */
9458 #if HAVE_PTHREADS_D4
9459         status = pthread_detach( &t );
9460 #else
9461         status = pthread_detach( t );
9462 #endif
9463
9464 #ifdef HAVE_LINUX_THREADS
9465         pthread_kill_other_threads_np();
9466 #endif
9467
9468         exit( status );
9469
9470 ; return 0; }
9471 EOF
9472 if { (eval echo configure:9473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9473   rm -rf conftest*
9474   ol_cv_pthread_threads=yes
9475 else
9476   echo "configure: failed program was:" >&5
9477   cat conftest.$ac_ext >&5
9478   rm -rf conftest*
9479   ol_cv_pthread_threads=no
9480 fi
9481 rm -f conftest*
9482 else
9483   cat > conftest.$ac_ext <<EOF
9484 #line 9485 "configure"
9485 #include "confdefs.h"
9486 /* pthread test headers */
9487 #include <pthread.h>
9488 #ifndef NULL
9489 #define NULL (void*)0
9490 #endif
9491
9492 static void *task(p)
9493         void *p;
9494 {
9495         return (void *) (p == NULL);
9496 }
9497
9498
9499 int main(argc, argv)
9500         int argc;
9501         char **argv;
9502 {
9503
9504         /* pthread test function */
9505         pthread_t t;
9506         int status;
9507 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9508         /* This system (e.g. AIX) defaults detached; must override */
9509         pthread_attr_t attr;
9510
9511         status = pthread_attr_init(&attr);
9512         if( status ) exit( status );
9513
9514         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9515         if( status ) exit( status );
9516
9517 #       define  ATTR    &attr
9518 #elif defined( HAVE_PTHREADS_D4 )
9519 #       define  ATTR    pthread_attr_default
9520 #else
9521 #       define  ATTR    NULL
9522 #endif
9523
9524         /* make sure pthread_create() isn't just a stub */
9525         status = pthread_create(&t, ATTR, task, NULL);
9526         if( status ) exit( status );
9527
9528         /* give the thread a chance to complete...
9529      * it should remain joinable and hence detachable
9530          */
9531         sleep( 1 );
9532
9533         /* make sure pthread_detach() isn't just a stub */
9534 #if HAVE_PTHREADS_D4
9535         status = pthread_detach( &t );
9536 #else
9537         status = pthread_detach( t );
9538 #endif
9539
9540 #ifdef HAVE_LINUX_THREADS
9541         pthread_kill_other_threads_np();
9542 #endif
9543
9544         exit( status );
9545
9546 }
9547
9548 EOF
9549 if { (eval echo configure:9550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9550 then
9551   ol_cv_pthread_threads=yes
9552 else
9553   echo "configure: failed program was:" >&5
9554   cat conftest.$ac_ext >&5
9555   rm -fr conftest*
9556   ol_cv_pthread_threads=no
9557 fi
9558 rm -fr conftest*
9559 fi
9560
9561
9562                 # restore the LIBS
9563                 LIBS="$ol_LIBS"
9564         
9565 fi
9566
9567 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9568
9569         if test $ol_cv_pthread_threads = yes ; then
9570                 ol_link_pthreads="-threads"
9571                 ol_link_threads=posix
9572         fi
9573 fi
9574
9575
9576                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9577 if test "$ol_link_threads" = no ; then
9578         # try -lpthreads -lmach -lexc -lc_r
9579         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9580 echo "configure:9581: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9581 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9582   echo $ac_n "(cached) $ac_c" 1>&6
9583 else
9584   
9585                 # save the flags
9586                 ol_LIBS="$LIBS"
9587                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9588
9589                 if test "$cross_compiling" = yes; then
9590   cat > conftest.$ac_ext <<EOF
9591 #line 9592 "configure"
9592 #include "confdefs.h"
9593 /* pthread test headers */
9594 #include <pthread.h>
9595 #ifndef NULL
9596 #define NULL (void*)0
9597 #endif
9598
9599 static void *task(p)
9600         void *p;
9601 {
9602         return (void *) (p == NULL);
9603 }
9604
9605 int main() {
9606
9607         /* pthread test function */
9608         pthread_t t;
9609         int status;
9610 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9611         /* This system (e.g. AIX) defaults detached; must override */
9612         pthread_attr_t attr;
9613
9614         status = pthread_attr_init(&attr);
9615         if( status ) exit( status );
9616
9617         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9618         if( status ) exit( status );
9619
9620 #       define  ATTR    &attr
9621 #elif defined( HAVE_PTHREADS_D4 )
9622 #       define  ATTR    pthread_attr_default
9623 #else
9624 #       define  ATTR    NULL
9625 #endif
9626
9627         /* make sure pthread_create() isn't just a stub */
9628         status = pthread_create(&t, ATTR, task, NULL);
9629         if( status ) exit( status );
9630
9631         /* give the thread a chance to complete...
9632      * it should remain joinable and hence detachable
9633          */
9634         sleep( 1 );
9635
9636         /* make sure pthread_detach() isn't just a stub */
9637 #if HAVE_PTHREADS_D4
9638         status = pthread_detach( &t );
9639 #else
9640         status = pthread_detach( t );
9641 #endif
9642
9643 #ifdef HAVE_LINUX_THREADS
9644         pthread_kill_other_threads_np();
9645 #endif
9646
9647         exit( status );
9648
9649 ; return 0; }
9650 EOF
9651 if { (eval echo configure:9652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9652   rm -rf conftest*
9653   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9654 else
9655   echo "configure: failed program was:" >&5
9656   cat conftest.$ac_ext >&5
9657   rm -rf conftest*
9658   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9659 fi
9660 rm -f conftest*
9661 else
9662   cat > conftest.$ac_ext <<EOF
9663 #line 9664 "configure"
9664 #include "confdefs.h"
9665 /* pthread test headers */
9666 #include <pthread.h>
9667 #ifndef NULL
9668 #define NULL (void*)0
9669 #endif
9670
9671 static void *task(p)
9672         void *p;
9673 {
9674         return (void *) (p == NULL);
9675 }
9676
9677
9678 int main(argc, argv)
9679         int argc;
9680         char **argv;
9681 {
9682
9683         /* pthread test function */
9684         pthread_t t;
9685         int status;
9686 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9687         /* This system (e.g. AIX) defaults detached; must override */
9688         pthread_attr_t attr;
9689
9690         status = pthread_attr_init(&attr);
9691         if( status ) exit( status );
9692
9693         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9694         if( status ) exit( status );
9695
9696 #       define  ATTR    &attr
9697 #elif defined( HAVE_PTHREADS_D4 )
9698 #       define  ATTR    pthread_attr_default
9699 #else
9700 #       define  ATTR    NULL
9701 #endif
9702
9703         /* make sure pthread_create() isn't just a stub */
9704         status = pthread_create(&t, ATTR, task, NULL);
9705         if( status ) exit( status );
9706
9707         /* give the thread a chance to complete...
9708      * it should remain joinable and hence detachable
9709          */
9710         sleep( 1 );
9711
9712         /* make sure pthread_detach() isn't just a stub */
9713 #if HAVE_PTHREADS_D4
9714         status = pthread_detach( &t );
9715 #else
9716         status = pthread_detach( t );
9717 #endif
9718
9719 #ifdef HAVE_LINUX_THREADS
9720         pthread_kill_other_threads_np();
9721 #endif
9722
9723         exit( status );
9724
9725 }
9726
9727 EOF
9728 if { (eval echo configure:9729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9729 then
9730   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9731 else
9732   echo "configure: failed program was:" >&5
9733   cat conftest.$ac_ext >&5
9734   rm -fr conftest*
9735   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9736 fi
9737 rm -fr conftest*
9738 fi
9739
9740
9741                 # restore the LIBS
9742                 LIBS="$ol_LIBS"
9743         
9744 fi
9745
9746 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9747
9748         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9749                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9750                 ol_link_threads=posix
9751         fi
9752 fi
9753
9754                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9755 if test "$ol_link_threads" = no ; then
9756         # try -lpthreads -lmach -lexc
9757         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9758 echo "configure:9759: checking for pthread link with -lpthreads -lmach -lexc" >&5
9759 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9760   echo $ac_n "(cached) $ac_c" 1>&6
9761 else
9762   
9763                 # save the flags
9764                 ol_LIBS="$LIBS"
9765                 LIBS="-lpthreads -lmach -lexc $LIBS"
9766
9767                 if test "$cross_compiling" = yes; then
9768   cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771 /* pthread test headers */
9772 #include <pthread.h>
9773 #ifndef NULL
9774 #define NULL (void*)0
9775 #endif
9776
9777 static void *task(p)
9778         void *p;
9779 {
9780         return (void *) (p == NULL);
9781 }
9782
9783 int main() {
9784
9785         /* pthread test function */
9786         pthread_t t;
9787         int status;
9788 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9789         /* This system (e.g. AIX) defaults detached; must override */
9790         pthread_attr_t attr;
9791
9792         status = pthread_attr_init(&attr);
9793         if( status ) exit( status );
9794
9795         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9796         if( status ) exit( status );
9797
9798 #       define  ATTR    &attr
9799 #elif defined( HAVE_PTHREADS_D4 )
9800 #       define  ATTR    pthread_attr_default
9801 #else
9802 #       define  ATTR    NULL
9803 #endif
9804
9805         /* make sure pthread_create() isn't just a stub */
9806         status = pthread_create(&t, ATTR, task, NULL);
9807         if( status ) exit( status );
9808
9809         /* give the thread a chance to complete...
9810      * it should remain joinable and hence detachable
9811          */
9812         sleep( 1 );
9813
9814         /* make sure pthread_detach() isn't just a stub */
9815 #if HAVE_PTHREADS_D4
9816         status = pthread_detach( &t );
9817 #else
9818         status = pthread_detach( t );
9819 #endif
9820
9821 #ifdef HAVE_LINUX_THREADS
9822         pthread_kill_other_threads_np();
9823 #endif
9824
9825         exit( status );
9826
9827 ; return 0; }
9828 EOF
9829 if { (eval echo configure:9830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9830   rm -rf conftest*
9831   ol_cv_pthread_lpthreads_lmach_lexc=yes
9832 else
9833   echo "configure: failed program was:" >&5
9834   cat conftest.$ac_ext >&5
9835   rm -rf conftest*
9836   ol_cv_pthread_lpthreads_lmach_lexc=no
9837 fi
9838 rm -f conftest*
9839 else
9840   cat > conftest.$ac_ext <<EOF
9841 #line 9842 "configure"
9842 #include "confdefs.h"
9843 /* pthread test headers */
9844 #include <pthread.h>
9845 #ifndef NULL
9846 #define NULL (void*)0
9847 #endif
9848
9849 static void *task(p)
9850         void *p;
9851 {
9852         return (void *) (p == NULL);
9853 }
9854
9855
9856 int main(argc, argv)
9857         int argc;
9858         char **argv;
9859 {
9860
9861         /* pthread test function */
9862         pthread_t t;
9863         int status;
9864 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9865         /* This system (e.g. AIX) defaults detached; must override */
9866         pthread_attr_t attr;
9867
9868         status = pthread_attr_init(&attr);
9869         if( status ) exit( status );
9870
9871         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9872         if( status ) exit( status );
9873
9874 #       define  ATTR    &attr
9875 #elif defined( HAVE_PTHREADS_D4 )
9876 #       define  ATTR    pthread_attr_default
9877 #else
9878 #       define  ATTR    NULL
9879 #endif
9880
9881         /* make sure pthread_create() isn't just a stub */
9882         status = pthread_create(&t, ATTR, task, NULL);
9883         if( status ) exit( status );
9884
9885         /* give the thread a chance to complete...
9886      * it should remain joinable and hence detachable
9887          */
9888         sleep( 1 );
9889
9890         /* make sure pthread_detach() isn't just a stub */
9891 #if HAVE_PTHREADS_D4
9892         status = pthread_detach( &t );
9893 #else
9894         status = pthread_detach( t );
9895 #endif
9896
9897 #ifdef HAVE_LINUX_THREADS
9898         pthread_kill_other_threads_np();
9899 #endif
9900
9901         exit( status );
9902
9903 }
9904
9905 EOF
9906 if { (eval echo configure:9907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9907 then
9908   ol_cv_pthread_lpthreads_lmach_lexc=yes
9909 else
9910   echo "configure: failed program was:" >&5
9911   cat conftest.$ac_ext >&5
9912   rm -fr conftest*
9913   ol_cv_pthread_lpthreads_lmach_lexc=no
9914 fi
9915 rm -fr conftest*
9916 fi
9917
9918
9919                 # restore the LIBS
9920                 LIBS="$ol_LIBS"
9921         
9922 fi
9923
9924 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9925
9926         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9927                 ol_link_pthreads="-lpthreads -lmach -lexc"
9928                 ol_link_threads=posix
9929         fi
9930 fi
9931
9932                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9933 if test "$ol_link_threads" = no ; then
9934         # try -lpthreads -lexc
9935         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9936 echo "configure:9937: checking for pthread link with -lpthreads -lexc" >&5
9937 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9938   echo $ac_n "(cached) $ac_c" 1>&6
9939 else
9940   
9941                 # save the flags
9942                 ol_LIBS="$LIBS"
9943                 LIBS="-lpthreads -lexc $LIBS"
9944
9945                 if test "$cross_compiling" = yes; then
9946   cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 /* pthread test headers */
9950 #include <pthread.h>
9951 #ifndef NULL
9952 #define NULL (void*)0
9953 #endif
9954
9955 static void *task(p)
9956         void *p;
9957 {
9958         return (void *) (p == NULL);
9959 }
9960
9961 int main() {
9962
9963         /* pthread test function */
9964         pthread_t t;
9965         int status;
9966 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9967         /* This system (e.g. AIX) defaults detached; must override */
9968         pthread_attr_t attr;
9969
9970         status = pthread_attr_init(&attr);
9971         if( status ) exit( status );
9972
9973         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9974         if( status ) exit( status );
9975
9976 #       define  ATTR    &attr
9977 #elif defined( HAVE_PTHREADS_D4 )
9978 #       define  ATTR    pthread_attr_default
9979 #else
9980 #       define  ATTR    NULL
9981 #endif
9982
9983         /* make sure pthread_create() isn't just a stub */
9984         status = pthread_create(&t, ATTR, task, NULL);
9985         if( status ) exit( status );
9986
9987         /* give the thread a chance to complete...
9988      * it should remain joinable and hence detachable
9989          */
9990         sleep( 1 );
9991
9992         /* make sure pthread_detach() isn't just a stub */
9993 #if HAVE_PTHREADS_D4
9994         status = pthread_detach( &t );
9995 #else
9996         status = pthread_detach( t );
9997 #endif
9998
9999 #ifdef HAVE_LINUX_THREADS
10000         pthread_kill_other_threads_np();
10001 #endif
10002
10003         exit( status );
10004
10005 ; return 0; }
10006 EOF
10007 if { (eval echo configure:10008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10008   rm -rf conftest*
10009   ol_cv_pthread_lpthreads_lexc=yes
10010 else
10011   echo "configure: failed program was:" >&5
10012   cat conftest.$ac_ext >&5
10013   rm -rf conftest*
10014   ol_cv_pthread_lpthreads_lexc=no
10015 fi
10016 rm -f conftest*
10017 else
10018   cat > conftest.$ac_ext <<EOF
10019 #line 10020 "configure"
10020 #include "confdefs.h"
10021 /* pthread test headers */
10022 #include <pthread.h>
10023 #ifndef NULL
10024 #define NULL (void*)0
10025 #endif
10026
10027 static void *task(p)
10028         void *p;
10029 {
10030         return (void *) (p == NULL);
10031 }
10032
10033
10034 int main(argc, argv)
10035         int argc;
10036         char **argv;
10037 {
10038
10039         /* pthread test function */
10040         pthread_t t;
10041         int status;
10042 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10043         /* This system (e.g. AIX) defaults detached; must override */
10044         pthread_attr_t attr;
10045
10046         status = pthread_attr_init(&attr);
10047         if( status ) exit( status );
10048
10049         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10050         if( status ) exit( status );
10051
10052 #       define  ATTR    &attr
10053 #elif defined( HAVE_PTHREADS_D4 )
10054 #       define  ATTR    pthread_attr_default
10055 #else
10056 #       define  ATTR    NULL
10057 #endif
10058
10059         /* make sure pthread_create() isn't just a stub */
10060         status = pthread_create(&t, ATTR, task, NULL);
10061         if( status ) exit( status );
10062
10063         /* give the thread a chance to complete...
10064      * it should remain joinable and hence detachable
10065          */
10066         sleep( 1 );
10067
10068         /* make sure pthread_detach() isn't just a stub */
10069 #if HAVE_PTHREADS_D4
10070         status = pthread_detach( &t );
10071 #else
10072         status = pthread_detach( t );
10073 #endif
10074
10075 #ifdef HAVE_LINUX_THREADS
10076         pthread_kill_other_threads_np();
10077 #endif
10078
10079         exit( status );
10080
10081 }
10082
10083 EOF
10084 if { (eval echo configure:10085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10085 then
10086   ol_cv_pthread_lpthreads_lexc=yes
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -fr conftest*
10091   ol_cv_pthread_lpthreads_lexc=no
10092 fi
10093 rm -fr conftest*
10094 fi
10095
10096
10097                 # restore the LIBS
10098                 LIBS="$ol_LIBS"
10099         
10100 fi
10101
10102 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
10103
10104         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10105                 ol_link_pthreads="-lpthreads -lexc"
10106                 ol_link_threads=posix
10107         fi
10108 fi
10109
10110
10111                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10112 if test "$ol_link_threads" = no ; then
10113         # try -lpthreads
10114         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10115 echo "configure:10116: checking for pthread link with -lpthreads" >&5
10116 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10117   echo $ac_n "(cached) $ac_c" 1>&6
10118 else
10119   
10120                 # save the flags
10121                 ol_LIBS="$LIBS"
10122                 LIBS="-lpthreads $LIBS"
10123
10124                 if test "$cross_compiling" = yes; then
10125   cat > conftest.$ac_ext <<EOF
10126 #line 10127 "configure"
10127 #include "confdefs.h"
10128 /* pthread test headers */
10129 #include <pthread.h>
10130 #ifndef NULL
10131 #define NULL (void*)0
10132 #endif
10133
10134 static void *task(p)
10135         void *p;
10136 {
10137         return (void *) (p == NULL);
10138 }
10139
10140 int main() {
10141
10142         /* pthread test function */
10143         pthread_t t;
10144         int status;
10145 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10146         /* This system (e.g. AIX) defaults detached; must override */
10147         pthread_attr_t attr;
10148
10149         status = pthread_attr_init(&attr);
10150         if( status ) exit( status );
10151
10152         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10153         if( status ) exit( status );
10154
10155 #       define  ATTR    &attr
10156 #elif defined( HAVE_PTHREADS_D4 )
10157 #       define  ATTR    pthread_attr_default
10158 #else
10159 #       define  ATTR    NULL
10160 #endif
10161
10162         /* make sure pthread_create() isn't just a stub */
10163         status = pthread_create(&t, ATTR, task, NULL);
10164         if( status ) exit( status );
10165
10166         /* give the thread a chance to complete...
10167      * it should remain joinable and hence detachable
10168          */
10169         sleep( 1 );
10170
10171         /* make sure pthread_detach() isn't just a stub */
10172 #if HAVE_PTHREADS_D4
10173         status = pthread_detach( &t );
10174 #else
10175         status = pthread_detach( t );
10176 #endif
10177
10178 #ifdef HAVE_LINUX_THREADS
10179         pthread_kill_other_threads_np();
10180 #endif
10181
10182         exit( status );
10183
10184 ; return 0; }
10185 EOF
10186 if { (eval echo configure:10187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10187   rm -rf conftest*
10188   ol_cv_pthread_lib_lpthreads=yes
10189 else
10190   echo "configure: failed program was:" >&5
10191   cat conftest.$ac_ext >&5
10192   rm -rf conftest*
10193   ol_cv_pthread_lib_lpthreads=no
10194 fi
10195 rm -f conftest*
10196 else
10197   cat > conftest.$ac_ext <<EOF
10198 #line 10199 "configure"
10199 #include "confdefs.h"
10200 /* pthread test headers */
10201 #include <pthread.h>
10202 #ifndef NULL
10203 #define NULL (void*)0
10204 #endif
10205
10206 static void *task(p)
10207         void *p;
10208 {
10209         return (void *) (p == NULL);
10210 }
10211
10212
10213 int main(argc, argv)
10214         int argc;
10215         char **argv;
10216 {
10217
10218         /* pthread test function */
10219         pthread_t t;
10220         int status;
10221 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10222         /* This system (e.g. AIX) defaults detached; must override */
10223         pthread_attr_t attr;
10224
10225         status = pthread_attr_init(&attr);
10226         if( status ) exit( status );
10227
10228         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10229         if( status ) exit( status );
10230
10231 #       define  ATTR    &attr
10232 #elif defined( HAVE_PTHREADS_D4 )
10233 #       define  ATTR    pthread_attr_default
10234 #else
10235 #       define  ATTR    NULL
10236 #endif
10237
10238         /* make sure pthread_create() isn't just a stub */
10239         status = pthread_create(&t, ATTR, task, NULL);
10240         if( status ) exit( status );
10241
10242         /* give the thread a chance to complete...
10243      * it should remain joinable and hence detachable
10244          */
10245         sleep( 1 );
10246
10247         /* make sure pthread_detach() isn't just a stub */
10248 #if HAVE_PTHREADS_D4
10249         status = pthread_detach( &t );
10250 #else
10251         status = pthread_detach( t );
10252 #endif
10253
10254 #ifdef HAVE_LINUX_THREADS
10255         pthread_kill_other_threads_np();
10256 #endif
10257
10258         exit( status );
10259
10260 }
10261
10262 EOF
10263 if { (eval echo configure:10264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10264 then
10265   ol_cv_pthread_lib_lpthreads=yes
10266 else
10267   echo "configure: failed program was:" >&5
10268   cat conftest.$ac_ext >&5
10269   rm -fr conftest*
10270   ol_cv_pthread_lib_lpthreads=no
10271 fi
10272 rm -fr conftest*
10273 fi
10274
10275
10276                 # restore the LIBS
10277                 LIBS="$ol_LIBS"
10278         
10279 fi
10280
10281 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10282
10283         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10284                 ol_link_pthreads="-lpthreads"
10285                 ol_link_threads=posix
10286         fi
10287 fi
10288
10289
10290                 if test $ol_link_threads != no ; then
10291                         cat >> confdefs.h <<\EOF
10292 #define HAVE_PTHREADS 1
10293 EOF
10294
10295
10296                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10297
10298                                                 save_CPPFLAGS="$CPPFLAGS"
10299                         save_LIBS="$LIBS"
10300                         LIBS="$LTHREAD_LIBS $LIBS"
10301
10302                                                                                                 for ac_func in sched_yield pthread_yield
10303 do
10304 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10305 echo "configure:10306: checking for $ac_func" >&5
10306 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10307   echo $ac_n "(cached) $ac_c" 1>&6
10308 else
10309   cat > conftest.$ac_ext <<EOF
10310 #line 10311 "configure"
10311 #include "confdefs.h"
10312 /* System header to define __stub macros and hopefully few prototypes,
10313     which can conflict with char $ac_func(); below.  */
10314 #include <assert.h>
10315 /* Override any gcc2 internal prototype to avoid an error.  */
10316 /* We use char because int might match the return type of a gcc2
10317     builtin and then its argument prototype would still apply.  */
10318 char $ac_func();
10319 char (*f)();
10320
10321 int main() {
10322
10323 /* The GNU C library defines this for functions which it implements
10324     to always fail with ENOSYS.  Some functions are actually named
10325     something starting with __ and the normal name is an alias.  */
10326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10327 choke me
10328 #else
10329 f = $ac_func;
10330 #endif
10331
10332 ; return 0; }
10333 EOF
10334 if { (eval echo configure:10335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10335   rm -rf conftest*
10336   eval "ac_cv_func_$ac_func=yes"
10337 else
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   eval "ac_cv_func_$ac_func=no"
10342 fi
10343 rm -f conftest*
10344 fi
10345
10346 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10347   echo "$ac_t""yes" 1>&6
10348     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10349   cat >> confdefs.h <<EOF
10350 #define $ac_tr_func 1
10351 EOF
10352  
10353 else
10354   echo "$ac_t""no" 1>&6
10355 fi
10356 done
10357
10358
10359                         if test $ac_cv_func_sched_yield = no -a \
10360                                 $ac_cv_func_pthread_yield = no ; then
10361                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10362 echo "configure:10363: checking for sched_yield in -lrt" >&5
10363 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10365   echo $ac_n "(cached) $ac_c" 1>&6
10366 else
10367   ac_save_LIBS="$LIBS"
10368 LIBS="-lrt  $LIBS"
10369 cat > conftest.$ac_ext <<EOF
10370 #line 10371 "configure"
10371 #include "confdefs.h"
10372 /* Override any gcc2 internal prototype to avoid an error.  */
10373 /* We use char because int might match the return type of a gcc2
10374     builtin and then its argument prototype would still apply.  */
10375 char sched_yield();
10376
10377 int main() {
10378 sched_yield()
10379 ; return 0; }
10380 EOF
10381 if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10382   rm -rf conftest*
10383   eval "ac_cv_lib_$ac_lib_var=yes"
10384 else
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_lib_$ac_lib_var=no"
10389 fi
10390 rm -f conftest*
10391 LIBS="$ac_save_LIBS"
10392
10393 fi
10394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10395   echo "$ac_t""yes" 1>&6
10396   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10397                                         cat >> confdefs.h <<\EOF
10398 #define HAVE_SCHED_YIELD 1
10399 EOF
10400
10401                                         ac_cv_func_sched_yield=yes
10402 else
10403   echo "$ac_t""no" 1>&6
10404 ac_cv_func_sched_yield=no
10405 fi
10406
10407                         fi
10408                         if test $ac_cv_func_sched_yield = no -a \
10409                                 $ac_cv_func_pthread_yield = no ; then
10410                                                                                                 for ac_func in thr_yield
10411 do
10412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10413 echo "configure:10414: checking for $ac_func" >&5
10414 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10415   echo $ac_n "(cached) $ac_c" 1>&6
10416 else
10417   cat > conftest.$ac_ext <<EOF
10418 #line 10419 "configure"
10419 #include "confdefs.h"
10420 /* System header to define __stub macros and hopefully few prototypes,
10421     which can conflict with char $ac_func(); below.  */
10422 #include <assert.h>
10423 /* Override any gcc2 internal prototype to avoid an error.  */
10424 /* We use char because int might match the return type of a gcc2
10425     builtin and then its argument prototype would still apply.  */
10426 char $ac_func();
10427 char (*f)();
10428
10429 int main() {
10430
10431 /* The GNU C library defines this for functions which it implements
10432     to always fail with ENOSYS.  Some functions are actually named
10433     something starting with __ and the normal name is an alias.  */
10434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10435 choke me
10436 #else
10437 f = $ac_func;
10438 #endif
10439
10440 ; return 0; }
10441 EOF
10442 if { (eval echo configure:10443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10443   rm -rf conftest*
10444   eval "ac_cv_func_$ac_func=yes"
10445 else
10446   echo "configure: failed program was:" >&5
10447   cat conftest.$ac_ext >&5
10448   rm -rf conftest*
10449   eval "ac_cv_func_$ac_func=no"
10450 fi
10451 rm -f conftest*
10452 fi
10453
10454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10455   echo "$ac_t""yes" 1>&6
10456     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10457   cat >> confdefs.h <<EOF
10458 #define $ac_tr_func 1
10459 EOF
10460  
10461 else
10462   echo "$ac_t""no" 1>&6
10463 fi
10464 done
10465
10466                         fi
10467                         if test $ac_cv_func_sched_yield = no -a \
10468                                 $ac_cv_func_pthread_yield = no -a \
10469                                 "$ac_cv_func_thr_yield" = no ; then
10470                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10471                         fi
10472
10473                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10474 do
10475 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10476 echo "configure:10477: checking for $ac_func" >&5
10477 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10478   echo $ac_n "(cached) $ac_c" 1>&6
10479 else
10480   cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 /* System header to define __stub macros and hopefully few prototypes,
10484     which can conflict with char $ac_func(); below.  */
10485 #include <assert.h>
10486 /* Override any gcc2 internal prototype to avoid an error.  */
10487 /* We use char because int might match the return type of a gcc2
10488     builtin and then its argument prototype would still apply.  */
10489 char $ac_func();
10490 char (*f)();
10491
10492 int main() {
10493
10494 /* The GNU C library defines this for functions which it implements
10495     to always fail with ENOSYS.  Some functions are actually named
10496     something starting with __ and the normal name is an alias.  */
10497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10498 choke me
10499 #else
10500 f = $ac_func;
10501 #endif
10502
10503 ; return 0; }
10504 EOF
10505 if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10506   rm -rf conftest*
10507   eval "ac_cv_func_$ac_func=yes"
10508 else
10509   echo "configure: failed program was:" >&5
10510   cat conftest.$ac_ext >&5
10511   rm -rf conftest*
10512   eval "ac_cv_func_$ac_func=no"
10513 fi
10514 rm -f conftest*
10515 fi
10516
10517 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10518   echo "$ac_t""yes" 1>&6
10519     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10520   cat >> confdefs.h <<EOF
10521 #define $ac_tr_func 1
10522 EOF
10523  
10524 else
10525   echo "$ac_t""no" 1>&6
10526 fi
10527 done
10528
10529
10530                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10531 echo "configure:10532: checking for pthread_detach with <pthread.h>" >&5
10532 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10533   echo $ac_n "(cached) $ac_c" 1>&6
10534 else
10535   
10536                                                                 cat > conftest.$ac_ext <<EOF
10537 #line 10538 "configure"
10538 #include "confdefs.h"
10539
10540 #include <pthread.h>
10541 #ifndef NULL
10542 #define NULL (void*)0
10543 #endif
10544
10545 int main() {
10546 pthread_detach(NULL);
10547 ; return 0; }
10548 EOF
10549 if { (eval echo configure:10550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10550   rm -rf conftest*
10551   ol_cv_func_pthread_detach=yes
10552 else
10553   echo "configure: failed program was:" >&5
10554   cat conftest.$ac_ext >&5
10555   rm -rf conftest*
10556   ol_cv_func_pthread_detach=no
10557 fi
10558 rm -f conftest*
10559                         
10560 fi
10561
10562 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10563
10564                         if test $ol_cv_func_pthread_detach = no ; then
10565                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10566                         fi
10567
10568                         cat >> confdefs.h <<\EOF
10569 #define HAVE_PTHREAD_DETACH 1
10570 EOF
10571
10572
10573                                                 for ac_func in \
10574                                 pthread_setconcurrency \
10575                                 pthread_getconcurrency \
10576                                 thr_setconcurrency \
10577                                 thr_getconcurrency \
10578                         
10579 do
10580 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10581 echo "configure:10582: checking for $ac_func" >&5
10582 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10583   echo $ac_n "(cached) $ac_c" 1>&6
10584 else
10585   cat > conftest.$ac_ext <<EOF
10586 #line 10587 "configure"
10587 #include "confdefs.h"
10588 /* System header to define __stub macros and hopefully few prototypes,
10589     which can conflict with char $ac_func(); below.  */
10590 #include <assert.h>
10591 /* Override any gcc2 internal prototype to avoid an error.  */
10592 /* We use char because int might match the return type of a gcc2
10593     builtin and then its argument prototype would still apply.  */
10594 char $ac_func();
10595 char (*f)();
10596
10597 int main() {
10598
10599 /* The GNU C library defines this for functions which it implements
10600     to always fail with ENOSYS.  Some functions are actually named
10601     something starting with __ and the normal name is an alias.  */
10602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10603 choke me
10604 #else
10605 f = $ac_func;
10606 #endif
10607
10608 ; return 0; }
10609 EOF
10610 if { (eval echo configure:10611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10611   rm -rf conftest*
10612   eval "ac_cv_func_$ac_func=yes"
10613 else
10614   echo "configure: failed program was:" >&5
10615   cat conftest.$ac_ext >&5
10616   rm -rf conftest*
10617   eval "ac_cv_func_$ac_func=no"
10618 fi
10619 rm -f conftest*
10620 fi
10621
10622 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10623   echo "$ac_t""yes" 1>&6
10624     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10625   cat >> confdefs.h <<EOF
10626 #define $ac_tr_func 1
10627 EOF
10628  
10629 else
10630   echo "$ac_t""no" 1>&6
10631 fi
10632 done
10633
10634
10635                         
10636         for ac_func in pthread_kill_other_threads_np
10637 do
10638 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10639 echo "configure:10640: checking for $ac_func" >&5
10640 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10641   echo $ac_n "(cached) $ac_c" 1>&6
10642 else
10643   cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646 /* System header to define __stub macros and hopefully few prototypes,
10647     which can conflict with char $ac_func(); below.  */
10648 #include <assert.h>
10649 /* Override any gcc2 internal prototype to avoid an error.  */
10650 /* We use char because int might match the return type of a gcc2
10651     builtin and then its argument prototype would still apply.  */
10652 char $ac_func();
10653 char (*f)();
10654
10655 int main() {
10656
10657 /* The GNU C library defines this for functions which it implements
10658     to always fail with ENOSYS.  Some functions are actually named
10659     something starting with __ and the normal name is an alias.  */
10660 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10661 choke me
10662 #else
10663 f = $ac_func;
10664 #endif
10665
10666 ; return 0; }
10667 EOF
10668 if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10669   rm -rf conftest*
10670   eval "ac_cv_func_$ac_func=yes"
10671 else
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   eval "ac_cv_func_$ac_func=no"
10676 fi
10677 rm -f conftest*
10678 fi
10679
10680 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10681   echo "$ac_t""yes" 1>&6
10682     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10683   cat >> confdefs.h <<EOF
10684 #define $ac_tr_func 1
10685 EOF
10686  
10687 else
10688   echo "$ac_t""no" 1>&6
10689 fi
10690 done
10691
10692         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10693 echo "configure:10694: checking for LinuxThreads implementation" >&5
10694 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10695   echo $ac_n "(cached) $ac_c" 1>&6
10696 else
10697   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10698 fi
10699
10700 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10701
10702                         
10703         
10704         
10705         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10706 echo "configure:10707: checking for LinuxThreads consistency" >&5
10707 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10708   echo $ac_n "(cached) $ac_c" 1>&6
10709 else
10710   
10711                 if test $ol_cv_header_linux_threads = yes -a \
10712                         $ol_cv_sys_linux_threads = yes; then
10713                         ol_cv_linux_threads=yes
10714                 elif test $ol_cv_header_linux_threads = no -a \
10715                         $ol_cv_sys_linux_threads = no; then
10716                         ol_cv_linux_threads=no
10717                 else
10718                         ol_cv_linux_threads=error
10719                 fi
10720         
10721 fi
10722
10723 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10724
10725
10726                         if test $ol_cv_linux_threads = error; then
10727                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10728                         fi
10729
10730                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10731 echo "configure:10732: checking if pthread_create() works" >&5
10732 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10733   echo $ac_n "(cached) $ac_c" 1>&6
10734 else
10735   
10736                         if test "$cross_compiling" = yes; then
10737                                 ol_cv_pthread_create_works=yes
10738 else
10739   cat > conftest.$ac_ext <<EOF
10740 #line 10741 "configure"
10741 #include "confdefs.h"
10742 /* pthread test headers */
10743 #include <pthread.h>
10744 #ifndef NULL
10745 #define NULL (void*)0
10746 #endif
10747
10748 static void *task(p)
10749         void *p;
10750 {
10751         return (void *) (p == NULL);
10752 }
10753
10754
10755 int main(argc, argv)
10756         int argc;
10757         char **argv;
10758 {
10759
10760         /* pthread test function */
10761         pthread_t t;
10762         int status;
10763 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10764         /* This system (e.g. AIX) defaults detached; must override */
10765         pthread_attr_t attr;
10766
10767         status = pthread_attr_init(&attr);
10768         if( status ) exit( status );
10769
10770         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10771         if( status ) exit( status );
10772
10773 #       define  ATTR    &attr
10774 #elif defined( HAVE_PTHREADS_D4 )
10775 #       define  ATTR    pthread_attr_default
10776 #else
10777 #       define  ATTR    NULL
10778 #endif
10779
10780         /* make sure pthread_create() isn't just a stub */
10781         status = pthread_create(&t, ATTR, task, NULL);
10782         if( status ) exit( status );
10783
10784         /* give the thread a chance to complete...
10785      * it should remain joinable and hence detachable
10786          */
10787         sleep( 1 );
10788
10789         /* make sure pthread_detach() isn't just a stub */
10790 #if HAVE_PTHREADS_D4
10791         status = pthread_detach( &t );
10792 #else
10793         status = pthread_detach( t );
10794 #endif
10795
10796 #ifdef HAVE_LINUX_THREADS
10797         pthread_kill_other_threads_np();
10798 #endif
10799
10800         exit( status );
10801
10802 }
10803
10804 EOF
10805 if { (eval echo configure:10806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10806 then
10807   ol_cv_pthread_create_works=yes
10808 else
10809   echo "configure: failed program was:" >&5
10810   cat conftest.$ac_ext >&5
10811   rm -fr conftest*
10812   ol_cv_pthread_create_works=no
10813 fi
10814 rm -fr conftest*
10815 fi
10816
10817 fi
10818
10819 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10820
10821                         if test $ol_cv_pthread_create_works = no ; then
10822                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10823                         fi
10824
10825                                                 if test $ol_with_yielding_select = auto ; then
10826                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10827 echo "configure:10828: checking if select yields when using pthreads" >&5
10828 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10829   echo $ac_n "(cached) $ac_c" 1>&6
10830 else
10831   
10832                                 if test "$cross_compiling" = yes; then
10833   ol_cv_pthread_select_yields=cross
10834 else
10835   cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838
10839 #include <sys/types.h>
10840 #include <sys/time.h>
10841 #include <unistd.h>
10842 #include <pthread.h>
10843 #ifndef NULL
10844 #define NULL (void*) 0
10845 #endif
10846
10847 static int fildes[2];
10848
10849 static void *task(p)
10850         void *p;
10851 {
10852         int i;
10853         struct timeval tv;
10854
10855         fd_set rfds;
10856
10857         tv.tv_sec=10;
10858         tv.tv_usec=0;
10859
10860         FD_ZERO(&rfds);
10861         FD_SET(fildes[0], &rfds);
10862
10863         /* we're not interested in any fds */
10864         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10865
10866         if(i < 0) {
10867                 perror("select");
10868                 exit(10);
10869         }
10870
10871         exit(0); /* if we exit here, the select blocked the whole process */
10872 }
10873
10874 int main(argc, argv)
10875         int argc;
10876         char **argv;
10877 {
10878         pthread_t t;
10879
10880         /* create a pipe to select */
10881         if(pipe(&fildes[0])) {
10882                 perror("select");
10883                 exit(1);
10884         }
10885
10886 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10887         (void) pthread_setconcurrency(2);
10888 #else
10889 #ifdef HAVE_THR_SETCONCURRENCY
10890         /* Set Solaris LWP concurrency to 2 */
10891         thr_setconcurrency(2);
10892 #endif
10893 #endif
10894
10895 #if HAVE_PTHREADS_D4
10896         pthread_create(&t, pthread_attr_default, task, NULL);
10897 #else
10898         pthread_create(&t, NULL, task, NULL);
10899 #endif
10900
10901 #if HAVE_SCHED_YIELD
10902         sched_yield();  /* make sure task runs first */
10903 #else
10904 #ifdef HAVE_PTHREAD_YIELD
10905         pthread_yield();        /* make sure task runs first */
10906 #endif
10907 #endif
10908
10909         exit(2);
10910 }
10911 EOF
10912 if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10913 then
10914   ol_cv_pthread_select_yields=no
10915 else
10916   echo "configure: failed program was:" >&5
10917   cat conftest.$ac_ext >&5
10918   rm -fr conftest*
10919   ol_cv_pthread_select_yields=yes
10920 fi
10921 rm -fr conftest*
10922 fi
10923
10924 fi
10925
10926 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10927
10928                                 if test $ol_cv_pthread_select_yields = cross ; then
10929                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10930                                 fi
10931
10932                                 if test $ol_cv_pthread_select_yields = yes ; then
10933                                         ol_with_yielding_select=yes
10934                                 fi
10935                         fi
10936
10937                                                 CPPFLAGS="$save_CPPFLAGS"
10938                         LIBS="$save_LIBS"
10939                 else
10940                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10941                 fi
10942         fi
10943
10944         if test $ol_with_threads = posix ; then
10945                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10946         fi
10947 fi
10948
10949 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10950         -o $ol_with_threads = mach ; then
10951
10952                 for ac_hdr in mach/cthreads.h
10953 do
10954 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10955 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10956 echo "configure:10957: checking for $ac_hdr" >&5
10957 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10958   echo $ac_n "(cached) $ac_c" 1>&6
10959 else
10960   cat > conftest.$ac_ext <<EOF
10961 #line 10962 "configure"
10962 #include "confdefs.h"
10963 #include <$ac_hdr>
10964 EOF
10965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10966 { (eval echo configure:10967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10968 if test -z "$ac_err"; then
10969   rm -rf conftest*
10970   eval "ac_cv_header_$ac_safe=yes"
10971 else
10972   echo "$ac_err" >&5
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -rf conftest*
10976   eval "ac_cv_header_$ac_safe=no"
10977 fi
10978 rm -f conftest*
10979 fi
10980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10981   echo "$ac_t""yes" 1>&6
10982     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10983   cat >> confdefs.h <<EOF
10984 #define $ac_tr_hdr 1
10985 EOF
10986  
10987 else
10988   echo "$ac_t""no" 1>&6
10989 fi
10990 done
10991
10992         if test $ac_cv_header_mach_cthreads_h = yes ; then
10993                 ol_with_threads=found
10994
10995                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10996 echo "configure:10997: checking for cthread_fork" >&5
10997 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10998   echo $ac_n "(cached) $ac_c" 1>&6
10999 else
11000   cat > conftest.$ac_ext <<EOF
11001 #line 11002 "configure"
11002 #include "confdefs.h"
11003 /* System header to define __stub macros and hopefully few prototypes,
11004     which can conflict with char cthread_fork(); below.  */
11005 #include <assert.h>
11006 /* Override any gcc2 internal prototype to avoid an error.  */
11007 /* We use char because int might match the return type of a gcc2
11008     builtin and then its argument prototype would still apply.  */
11009 char cthread_fork();
11010 char (*f)();
11011
11012 int main() {
11013
11014 /* The GNU C library defines this for functions which it implements
11015     to always fail with ENOSYS.  Some functions are actually named
11016     something starting with __ and the normal name is an alias.  */
11017 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
11018 choke me
11019 #else
11020 f = cthread_fork;
11021 #endif
11022
11023 ; return 0; }
11024 EOF
11025 if { (eval echo configure:11026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11026   rm -rf conftest*
11027   eval "ac_cv_func_cthread_fork=yes"
11028 else
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -rf conftest*
11032   eval "ac_cv_func_cthread_fork=no"
11033 fi
11034 rm -f conftest*
11035 fi
11036
11037 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
11038   echo "$ac_t""yes" 1>&6
11039   ol_link_threads=yes
11040 else
11041   echo "$ac_t""no" 1>&6
11042 fi
11043
11044
11045                 if test $ol_link_threads = no ; then
11046                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
11047 echo "configure:11048: checking for cthread_fork with -all_load" >&5
11048 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
11049   echo $ac_n "(cached) $ac_c" 1>&6
11050 else
11051   
11052                                                                 save_LIBS="$LIBS"
11053                                 LIBS="-all_load $LIBS"
11054                                 cat > conftest.$ac_ext <<EOF
11055 #line 11056 "configure"
11056 #include "confdefs.h"
11057 #include <mach/cthreads.h>
11058 int main() {
11059
11060                                         cthread_fork((void *)0, (void *)0);
11061                                         
11062 ; return 0; }
11063 EOF
11064 if { (eval echo configure:11065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11065   rm -rf conftest*
11066   ol_cv_cthread_all_load=yes
11067 else
11068   echo "configure: failed program was:" >&5
11069   cat conftest.$ac_ext >&5
11070   rm -rf conftest*
11071   ol_cv_cthread_all_load=no
11072 fi
11073 rm -f conftest*
11074                                                                 LIBS="$save_LIBS"
11075                         
11076 fi
11077
11078 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
11079
11080                         if test $ol_cv_cthread_all_load = yes ; then
11081                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
11082                                 ol_link_threads=mach
11083                         fi
11084                 fi
11085
11086                 if test $ol_link_threads != no ; then
11087                         : check for cthread specific functionality here
11088                         cat >> confdefs.h <<\EOF
11089 #define HAVE_MACH_CTHREADS 1
11090 EOF
11091
11092                 else
11093                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
11094                 fi
11095         fi
11096
11097         if test $ol_with_threads = mach ; then
11098                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
11099         fi
11100 fi
11101
11102 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11103         -o $ol_with_threads = pth ; then
11104
11105         for ac_hdr in pth.h
11106 do
11107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11109 echo "configure:11110: checking for $ac_hdr" >&5
11110 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11111   echo $ac_n "(cached) $ac_c" 1>&6
11112 else
11113   cat > conftest.$ac_ext <<EOF
11114 #line 11115 "configure"
11115 #include "confdefs.h"
11116 #include <$ac_hdr>
11117 EOF
11118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11119 { (eval echo configure:11120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11121 if test -z "$ac_err"; then
11122   rm -rf conftest*
11123   eval "ac_cv_header_$ac_safe=yes"
11124 else
11125   echo "$ac_err" >&5
11126   echo "configure: failed program was:" >&5
11127   cat conftest.$ac_ext >&5
11128   rm -rf conftest*
11129   eval "ac_cv_header_$ac_safe=no"
11130 fi
11131 rm -f conftest*
11132 fi
11133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11134   echo "$ac_t""yes" 1>&6
11135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11136   cat >> confdefs.h <<EOF
11137 #define $ac_tr_hdr 1
11138 EOF
11139  
11140 else
11141   echo "$ac_t""no" 1>&6
11142 fi
11143 done
11144
11145
11146         if test $ac_cv_header_pth_h = yes ; then
11147                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11148 echo "configure:11149: checking for pth_version in -lpth" >&5
11149 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11151   echo $ac_n "(cached) $ac_c" 1>&6
11152 else
11153   ac_save_LIBS="$LIBS"
11154 LIBS="-lpth  $LIBS"
11155 cat > conftest.$ac_ext <<EOF
11156 #line 11157 "configure"
11157 #include "confdefs.h"
11158 /* Override any gcc2 internal prototype to avoid an error.  */
11159 /* We use char because int might match the return type of a gcc2
11160     builtin and then its argument prototype would still apply.  */
11161 char pth_version();
11162
11163 int main() {
11164 pth_version()
11165 ; return 0; }
11166 EOF
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11168   rm -rf conftest*
11169   eval "ac_cv_lib_$ac_lib_var=yes"
11170 else
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=no"
11175 fi
11176 rm -f conftest*
11177 LIBS="$ac_save_LIBS"
11178
11179 fi
11180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11181   echo "$ac_t""yes" 1>&6
11182   have_pth=yes
11183 else
11184   echo "$ac_t""no" 1>&6
11185 have_pth=no
11186 fi
11187
11188
11189                 if test $have_pth = yes ; then
11190                         cat >> confdefs.h <<\EOF
11191 #define HAVE_GNU_PTH 1
11192 EOF
11193
11194                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11195                         ol_link_threads=pth
11196
11197                         if test $ol_with_yielding_select = auto ; then
11198                                 ol_with_yielding_select=yes
11199                         fi
11200                 fi
11201         fi
11202 fi
11203
11204 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11205         -o $ol_with_threads = lwp ; then
11206
11207                 for ac_hdr in thread.h synch.h
11208 do
11209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11211 echo "configure:11212: checking for $ac_hdr" >&5
11212 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11213   echo $ac_n "(cached) $ac_c" 1>&6
11214 else
11215   cat > conftest.$ac_ext <<EOF
11216 #line 11217 "configure"
11217 #include "confdefs.h"
11218 #include <$ac_hdr>
11219 EOF
11220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11221 { (eval echo configure:11222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11223 if test -z "$ac_err"; then
11224   rm -rf conftest*
11225   eval "ac_cv_header_$ac_safe=yes"
11226 else
11227   echo "$ac_err" >&5
11228   echo "configure: failed program was:" >&5
11229   cat conftest.$ac_ext >&5
11230   rm -rf conftest*
11231   eval "ac_cv_header_$ac_safe=no"
11232 fi
11233 rm -f conftest*
11234 fi
11235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11236   echo "$ac_t""yes" 1>&6
11237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11238   cat >> confdefs.h <<EOF
11239 #define $ac_tr_hdr 1
11240 EOF
11241  
11242 else
11243   echo "$ac_t""no" 1>&6
11244 fi
11245 done
11246
11247         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11248                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11249 echo "configure:11250: checking for thr_create in -lthread" >&5
11250 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11251 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11252   echo $ac_n "(cached) $ac_c" 1>&6
11253 else
11254   ac_save_LIBS="$LIBS"
11255 LIBS="-lthread  $LIBS"
11256 cat > conftest.$ac_ext <<EOF
11257 #line 11258 "configure"
11258 #include "confdefs.h"
11259 /* Override any gcc2 internal prototype to avoid an error.  */
11260 /* We use char because int might match the return type of a gcc2
11261     builtin and then its argument prototype would still apply.  */
11262 char thr_create();
11263
11264 int main() {
11265 thr_create()
11266 ; return 0; }
11267 EOF
11268 if { (eval echo configure:11269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11269   rm -rf conftest*
11270   eval "ac_cv_lib_$ac_lib_var=yes"
11271 else
11272   echo "configure: failed program was:" >&5
11273   cat conftest.$ac_ext >&5
11274   rm -rf conftest*
11275   eval "ac_cv_lib_$ac_lib_var=no"
11276 fi
11277 rm -f conftest*
11278 LIBS="$ac_save_LIBS"
11279
11280 fi
11281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11282   echo "$ac_t""yes" 1>&6
11283   have_thr=yes
11284 else
11285   echo "$ac_t""no" 1>&6
11286 have_thr=no
11287 fi
11288
11289
11290                 if test $have_thr = yes ; then
11291                         cat >> confdefs.h <<\EOF
11292 #define HAVE_THR 1
11293 EOF
11294
11295                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11296                         ol_link_threads=thr
11297
11298                         if test $ol_with_yielding_select = auto ; then
11299                                 ol_with_yielding_select=yes
11300                         fi
11301
11302                                                 for ac_func in \
11303                                 thr_setconcurrency \
11304                                 thr_getconcurrency \
11305                         
11306 do
11307 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11308 echo "configure:11309: checking for $ac_func" >&5
11309 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11310   echo $ac_n "(cached) $ac_c" 1>&6
11311 else
11312   cat > conftest.$ac_ext <<EOF
11313 #line 11314 "configure"
11314 #include "confdefs.h"
11315 /* System header to define __stub macros and hopefully few prototypes,
11316     which can conflict with char $ac_func(); below.  */
11317 #include <assert.h>
11318 /* Override any gcc2 internal prototype to avoid an error.  */
11319 /* We use char because int might match the return type of a gcc2
11320     builtin and then its argument prototype would still apply.  */
11321 char $ac_func();
11322 char (*f)();
11323
11324 int main() {
11325
11326 /* The GNU C library defines this for functions which it implements
11327     to always fail with ENOSYS.  Some functions are actually named
11328     something starting with __ and the normal name is an alias.  */
11329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11330 choke me
11331 #else
11332 f = $ac_func;
11333 #endif
11334
11335 ; return 0; }
11336 EOF
11337 if { (eval echo configure:11338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11338   rm -rf conftest*
11339   eval "ac_cv_func_$ac_func=yes"
11340 else
11341   echo "configure: failed program was:" >&5
11342   cat conftest.$ac_ext >&5
11343   rm -rf conftest*
11344   eval "ac_cv_func_$ac_func=no"
11345 fi
11346 rm -f conftest*
11347 fi
11348
11349 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11350   echo "$ac_t""yes" 1>&6
11351     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11352   cat >> confdefs.h <<EOF
11353 #define $ac_tr_func 1
11354 EOF
11355  
11356 else
11357   echo "$ac_t""no" 1>&6
11358 fi
11359 done
11360
11361                 fi
11362         fi
11363
11364                 for ac_hdr in lwp/lwp.h
11365 do
11366 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11367 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11368 echo "configure:11369: checking for $ac_hdr" >&5
11369 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11370   echo $ac_n "(cached) $ac_c" 1>&6
11371 else
11372   cat > conftest.$ac_ext <<EOF
11373 #line 11374 "configure"
11374 #include "confdefs.h"
11375 #include <$ac_hdr>
11376 EOF
11377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11378 { (eval echo configure:11379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11380 if test -z "$ac_err"; then
11381   rm -rf conftest*
11382   eval "ac_cv_header_$ac_safe=yes"
11383 else
11384   echo "$ac_err" >&5
11385   echo "configure: failed program was:" >&5
11386   cat conftest.$ac_ext >&5
11387   rm -rf conftest*
11388   eval "ac_cv_header_$ac_safe=no"
11389 fi
11390 rm -f conftest*
11391 fi
11392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11393   echo "$ac_t""yes" 1>&6
11394     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11395   cat >> confdefs.h <<EOF
11396 #define $ac_tr_hdr 1
11397 EOF
11398  
11399 else
11400   echo "$ac_t""no" 1>&6
11401 fi
11402 done
11403
11404         if test $ac_cv_header_lwp_lwp_h = yes ; then
11405                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11406 echo "configure:11407: checking for lwp_create in -llwp" >&5
11407 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11408 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11409   echo $ac_n "(cached) $ac_c" 1>&6
11410 else
11411   ac_save_LIBS="$LIBS"
11412 LIBS="-llwp  $LIBS"
11413 cat > conftest.$ac_ext <<EOF
11414 #line 11415 "configure"
11415 #include "confdefs.h"
11416 /* Override any gcc2 internal prototype to avoid an error.  */
11417 /* We use char because int might match the return type of a gcc2
11418     builtin and then its argument prototype would still apply.  */
11419 char lwp_create();
11420
11421 int main() {
11422 lwp_create()
11423 ; return 0; }
11424 EOF
11425 if { (eval echo configure:11426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11426   rm -rf conftest*
11427   eval "ac_cv_lib_$ac_lib_var=yes"
11428 else
11429   echo "configure: failed program was:" >&5
11430   cat conftest.$ac_ext >&5
11431   rm -rf conftest*
11432   eval "ac_cv_lib_$ac_lib_var=no"
11433 fi
11434 rm -f conftest*
11435 LIBS="$ac_save_LIBS"
11436
11437 fi
11438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11439   echo "$ac_t""yes" 1>&6
11440   have_lwp=yes
11441 else
11442   echo "$ac_t""no" 1>&6
11443 have_lwp=no
11444 fi
11445
11446
11447                 if test $have_lwp = yes ; then
11448                         cat >> confdefs.h <<\EOF
11449 #define HAVE_LWP 1
11450 EOF
11451
11452                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11453                         ol_link_threads=lwp
11454
11455                         if test $ol_with_yielding_select = auto ; then
11456                                 ol_with_yielding_select=no
11457                         fi
11458                 fi
11459         fi
11460 fi
11461
11462 if test $ol_with_yielding_select = yes ; then
11463         cat >> confdefs.h <<\EOF
11464 #define HAVE_YIELDING_SELECT 1
11465 EOF
11466
11467 fi
11468
11469 if test $ol_with_threads = manual ; then
11470                 ol_link_threads=yes
11471
11472         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11473
11474         for ac_hdr in pthread.h sched.h
11475 do
11476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11478 echo "configure:11479: checking for $ac_hdr" >&5
11479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11480   echo $ac_n "(cached) $ac_c" 1>&6
11481 else
11482   cat > conftest.$ac_ext <<EOF
11483 #line 11484 "configure"
11484 #include "confdefs.h"
11485 #include <$ac_hdr>
11486 EOF
11487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11488 { (eval echo configure:11489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11490 if test -z "$ac_err"; then
11491   rm -rf conftest*
11492   eval "ac_cv_header_$ac_safe=yes"
11493 else
11494   echo "$ac_err" >&5
11495   echo "configure: failed program was:" >&5
11496   cat conftest.$ac_ext >&5
11497   rm -rf conftest*
11498   eval "ac_cv_header_$ac_safe=no"
11499 fi
11500 rm -f conftest*
11501 fi
11502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11503   echo "$ac_t""yes" 1>&6
11504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11505   cat >> confdefs.h <<EOF
11506 #define $ac_tr_hdr 1
11507 EOF
11508  
11509 else
11510   echo "$ac_t""no" 1>&6
11511 fi
11512 done
11513
11514         for ac_func in sched_yield pthread_yield
11515 do
11516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11517 echo "configure:11518: checking for $ac_func" >&5
11518 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11519   echo $ac_n "(cached) $ac_c" 1>&6
11520 else
11521   cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524 /* System header to define __stub macros and hopefully few prototypes,
11525     which can conflict with char $ac_func(); below.  */
11526 #include <assert.h>
11527 /* Override any gcc2 internal prototype to avoid an error.  */
11528 /* We use char because int might match the return type of a gcc2
11529     builtin and then its argument prototype would still apply.  */
11530 char $ac_func();
11531 char (*f)();
11532
11533 int main() {
11534
11535 /* The GNU C library defines this for functions which it implements
11536     to always fail with ENOSYS.  Some functions are actually named
11537     something starting with __ and the normal name is an alias.  */
11538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11539 choke me
11540 #else
11541 f = $ac_func;
11542 #endif
11543
11544 ; return 0; }
11545 EOF
11546 if { (eval echo configure:11547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11547   rm -rf conftest*
11548   eval "ac_cv_func_$ac_func=yes"
11549 else
11550   echo "configure: failed program was:" >&5
11551   cat conftest.$ac_ext >&5
11552   rm -rf conftest*
11553   eval "ac_cv_func_$ac_func=no"
11554 fi
11555 rm -f conftest*
11556 fi
11557
11558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11559   echo "$ac_t""yes" 1>&6
11560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11561   cat >> confdefs.h <<EOF
11562 #define $ac_tr_func 1
11563 EOF
11564  
11565 else
11566   echo "$ac_t""no" 1>&6
11567 fi
11568 done
11569
11570         
11571         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11572 echo "configure:11573: checking for LinuxThreads pthread.h" >&5
11573 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11574   echo $ac_n "(cached) $ac_c" 1>&6
11575 else
11576   cat > conftest.$ac_ext <<EOF
11577 #line 11578 "configure"
11578 #include "confdefs.h"
11579 #include <pthread.h>
11580 EOF
11581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11582   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11583   rm -rf conftest*
11584   ol_cv_header_linux_threads=yes
11585 else
11586   rm -rf conftest*
11587   ol_cv_header_linux_threads=no
11588 fi
11589 rm -f conftest*
11590
11591                 
11592 fi
11593
11594 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11595         if test $ol_cv_header_linux_threads = yes; then
11596                 cat >> confdefs.h <<\EOF
11597 #define HAVE_LINUX_THREADS 1
11598 EOF
11599
11600         fi
11601
11602
11603         for ac_hdr in mach/cthreads.h
11604 do
11605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11607 echo "configure:11608: checking for $ac_hdr" >&5
11608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11609   echo $ac_n "(cached) $ac_c" 1>&6
11610 else
11611   cat > conftest.$ac_ext <<EOF
11612 #line 11613 "configure"
11613 #include "confdefs.h"
11614 #include <$ac_hdr>
11615 EOF
11616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11617 { (eval echo configure:11618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11619 if test -z "$ac_err"; then
11620   rm -rf conftest*
11621   eval "ac_cv_header_$ac_safe=yes"
11622 else
11623   echo "$ac_err" >&5
11624   echo "configure: failed program was:" >&5
11625   cat conftest.$ac_ext >&5
11626   rm -rf conftest*
11627   eval "ac_cv_header_$ac_safe=no"
11628 fi
11629 rm -f conftest*
11630 fi
11631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11632   echo "$ac_t""yes" 1>&6
11633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11634   cat >> confdefs.h <<EOF
11635 #define $ac_tr_hdr 1
11636 EOF
11637  
11638 else
11639   echo "$ac_t""no" 1>&6
11640 fi
11641 done
11642
11643         for ac_hdr in lwp/lwp.h
11644 do
11645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11647 echo "configure:11648: checking for $ac_hdr" >&5
11648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11649   echo $ac_n "(cached) $ac_c" 1>&6
11650 else
11651   cat > conftest.$ac_ext <<EOF
11652 #line 11653 "configure"
11653 #include "confdefs.h"
11654 #include <$ac_hdr>
11655 EOF
11656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11657 { (eval echo configure:11658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11659 if test -z "$ac_err"; then
11660   rm -rf conftest*
11661   eval "ac_cv_header_$ac_safe=yes"
11662 else
11663   echo "$ac_err" >&5
11664   echo "configure: failed program was:" >&5
11665   cat conftest.$ac_ext >&5
11666   rm -rf conftest*
11667   eval "ac_cv_header_$ac_safe=no"
11668 fi
11669 rm -f conftest*
11670 fi
11671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11672   echo "$ac_t""yes" 1>&6
11673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11674   cat >> confdefs.h <<EOF
11675 #define $ac_tr_hdr 1
11676 EOF
11677  
11678 else
11679   echo "$ac_t""no" 1>&6
11680 fi
11681 done
11682
11683         for ac_hdr in thread.h synch.h
11684 do
11685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11687 echo "configure:11688: checking for $ac_hdr" >&5
11688 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11689   echo $ac_n "(cached) $ac_c" 1>&6
11690 else
11691   cat > conftest.$ac_ext <<EOF
11692 #line 11693 "configure"
11693 #include "confdefs.h"
11694 #include <$ac_hdr>
11695 EOF
11696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11697 { (eval echo configure:11698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11699 if test -z "$ac_err"; then
11700   rm -rf conftest*
11701   eval "ac_cv_header_$ac_safe=yes"
11702 else
11703   echo "$ac_err" >&5
11704   echo "configure: failed program was:" >&5
11705   cat conftest.$ac_ext >&5
11706   rm -rf conftest*
11707   eval "ac_cv_header_$ac_safe=no"
11708 fi
11709 rm -f conftest*
11710 fi
11711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11712   echo "$ac_t""yes" 1>&6
11713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11714   cat >> confdefs.h <<EOF
11715 #define $ac_tr_hdr 1
11716 EOF
11717  
11718 else
11719   echo "$ac_t""no" 1>&6
11720 fi
11721 done
11722
11723 fi
11724
11725 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11726                         cat >> confdefs.h <<\EOF
11727 #define REENTRANT 1
11728 EOF
11729
11730         cat >> confdefs.h <<\EOF
11731 #define _REENTRANT 1
11732 EOF
11733
11734         cat >> confdefs.h <<\EOF
11735 #define THREAD_SAFE 1
11736 EOF
11737
11738         cat >> confdefs.h <<\EOF
11739 #define _THREAD_SAFE 1
11740 EOF
11741
11742         cat >> confdefs.h <<\EOF
11743 #define THREADSAFE 1
11744 EOF
11745
11746         cat >> confdefs.h <<\EOF
11747 #define _THREADSAFE 1
11748 EOF
11749
11750         cat >> confdefs.h <<\EOF
11751 #define _SGI_MP_SOURCE 1
11752 EOF
11753
11754
11755                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11756 echo "configure:11757: checking for thread specific errno" >&5
11757 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11758   echo $ac_n "(cached) $ac_c" 1>&6
11759 else
11760   
11761                 cat > conftest.$ac_ext <<EOF
11762 #line 11763 "configure"
11763 #include "confdefs.h"
11764 #include <errno.h>
11765 int main() {
11766 errno = 0;
11767 ; return 0; }
11768 EOF
11769 if { (eval echo configure:11770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11770   rm -rf conftest*
11771   ol_cv_errno_thread_specific=yes
11772 else
11773   echo "configure: failed program was:" >&5
11774   cat conftest.$ac_ext >&5
11775   rm -rf conftest*
11776   ol_cv_errno_thread_specific=no
11777 fi
11778 rm -f conftest*
11779         
11780 fi
11781
11782 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11783
11784                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11785 echo "configure:11786: checking for thread specific h_errno" >&5
11786 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11787   echo $ac_n "(cached) $ac_c" 1>&6
11788 else
11789   
11790                 cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793 #include <netdb.h>
11794 int main() {
11795 h_errno = 0;
11796 ; return 0; }
11797 EOF
11798 if { (eval echo configure:11799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11799   rm -rf conftest*
11800   ol_cv_h_errno_thread_specific=yes
11801 else
11802   echo "configure: failed program was:" >&5
11803   cat conftest.$ac_ext >&5
11804   rm -rf conftest*
11805   ol_cv_h_errno_thread_specific=no
11806 fi
11807 rm -f conftest*
11808         
11809 fi
11810
11811 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11812
11813         if test $ol_cv_errno_thread_specific != yes \
11814                 -o $ol_cv_h_errno_thread_specific != yes ; then
11815                 LIBS="$LTHREAD_LIBS $LIBS"
11816                 LTHREAD_LIBS=""
11817         fi
11818
11819 fi  
11820
11821 if test $ol_link_threads = no ; then
11822         if test $ol_with_threads = yes ; then
11823                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11824         fi
11825
11826         if test $ol_with_threads = auto ; then
11827                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11828                 ol_with_threads=no
11829         fi
11830
11831         cat >> confdefs.h <<\EOF
11832 #define NO_THREADS 1
11833 EOF
11834
11835         LTHREAD_LIBS=""
11836 fi
11837
11838 if test $ol_link_threads != no ; then
11839         cat >> confdefs.h <<\EOF
11840 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11841 EOF
11842
11843 fi
11844
11845 ol_link_ldbm=no 
11846
11847 if test $ol_with_ldbm_api = auto \
11848         -o $ol_with_ldbm_api = berkeley \
11849         -o $ol_with_ldbm_api = bcompat ; then
11850
11851         if test $ol_with_ldbm_api = bcompat; then \
11852                 ol_cv_berkeley_db=no
11853 for ac_hdr in db_185.h db.h
11854 do
11855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11857 echo "configure:11858: checking for $ac_hdr" >&5
11858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11859   echo $ac_n "(cached) $ac_c" 1>&6
11860 else
11861   cat > conftest.$ac_ext <<EOF
11862 #line 11863 "configure"
11863 #include "confdefs.h"
11864 #include <$ac_hdr>
11865 EOF
11866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11867 { (eval echo configure:11868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11869 if test -z "$ac_err"; then
11870   rm -rf conftest*
11871   eval "ac_cv_header_$ac_safe=yes"
11872 else
11873   echo "$ac_err" >&5
11874   echo "configure: failed program was:" >&5
11875   cat conftest.$ac_ext >&5
11876   rm -rf conftest*
11877   eval "ac_cv_header_$ac_safe=no"
11878 fi
11879 rm -f conftest*
11880 fi
11881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11882   echo "$ac_t""yes" 1>&6
11883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11884   cat >> confdefs.h <<EOF
11885 #define $ac_tr_hdr 1
11886 EOF
11887  
11888 else
11889   echo "$ac_t""no" 1>&6
11890 fi
11891 done
11892
11893 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11894         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11895 echo "configure:11896: checking if Berkeley DB header compatibility" >&5
11896 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11897   echo $ac_n "(cached) $ac_c" 1>&6
11898 else
11899   
11900                 cat > conftest.$ac_ext <<EOF
11901 #line 11902 "configure"
11902 #include "confdefs.h"
11903
11904 #if HAVE_DB_185_H
11905 #       include <db_185.h>
11906 #else
11907 #       include <db.h>
11908 #endif
11909
11910  /* this check could be improved */
11911 #ifndef DB_VERSION_MAJOR
11912 #       define DB_VERSION_MAJOR 1
11913 #endif
11914
11915 #if DB_VERSION_MAJOR == 1 
11916         __db_version_1
11917 #endif
11918
11919 EOF
11920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11921   egrep "__db_version_1" >/dev/null 2>&1; then
11922   rm -rf conftest*
11923   ol_cv_header_db1=yes
11924 else
11925   rm -rf conftest*
11926   ol_cv_header_db1=no
11927 fi
11928 rm -f conftest*
11929
11930 fi
11931
11932 echo "$ac_t""$ol_cv_header_db1" 1>&6
11933
11934         if test ol_cv_header_db1=yes ; then
11935                 ol_cv_lib_db=no
11936 if test $ol_cv_lib_db = no ; then
11937         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11938 echo "configure:11939: checking for Berkeley DB link (default)" >&5
11939 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11940   echo $ac_n "(cached) $ac_c" 1>&6
11941 else
11942   
11943         ol_DB_LIB=
11944         ol_LIBS=$LIBS
11945         LIBS="$ol_DB_LIB $LIBS"
11946
11947         cat > conftest.$ac_ext <<EOF
11948 #line 11949 "configure"
11949 #include "confdefs.h"
11950
11951 #ifdef HAVE_DB_185_H
11952 # include <db_185.h>
11953 #else
11954 # include <db.h>
11955 #endif
11956
11957 #ifndef DB_VERSION_MAJOR
11958 # define DB_VERSION_MAJOR 1
11959 #endif
11960
11961 #ifndef NULL
11962 #define NULL ((void*)0)
11963 #endif
11964
11965 int main() {
11966
11967 #if DB_VERSION_MAJOR > 2
11968         db_env_create( NULL, 0 );
11969 #elif DB_VERSION_MAJOR > 1
11970         db_appexit( NULL );
11971 #else
11972         (void) dbopen( NULL, 0, 0, 0, NULL);
11973 #endif
11974
11975 ; return 0; }
11976 EOF
11977 if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11978   rm -rf conftest*
11979   ol_cv_db_none=yes
11980 else
11981   echo "configure: failed program was:" >&5
11982   cat conftest.$ac_ext >&5
11983   rm -rf conftest*
11984   ol_cv_db_none=no
11985 fi
11986 rm -f conftest*
11987
11988         LIBS="$ol_LIBS"
11989
11990 fi
11991
11992 echo "$ac_t""$ol_cv_db_none" 1>&6
11993
11994         if test $ol_cv_db_none = yes ; then
11995                 ol_cv_lib_db=yes
11996         fi
11997 fi
11998
11999 if test $ol_cv_lib_db = no ; then
12000         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12001 echo "configure:12002: checking for Berkeley DB link (-ldb)" >&5
12002 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12003   echo $ac_n "(cached) $ac_c" 1>&6
12004 else
12005   
12006         ol_DB_LIB=-ldb
12007         ol_LIBS=$LIBS
12008         LIBS="$ol_DB_LIB $LIBS"
12009
12010         cat > conftest.$ac_ext <<EOF
12011 #line 12012 "configure"
12012 #include "confdefs.h"
12013
12014 #ifdef HAVE_DB_185_H
12015 # include <db_185.h>
12016 #else
12017 # include <db.h>
12018 #endif
12019
12020 #ifndef DB_VERSION_MAJOR
12021 # define DB_VERSION_MAJOR 1
12022 #endif
12023
12024 #ifndef NULL
12025 #define NULL ((void*)0)
12026 #endif
12027
12028 int main() {
12029
12030 #if DB_VERSION_MAJOR > 2
12031         db_env_create( NULL, 0 );
12032 #elif DB_VERSION_MAJOR > 1
12033         db_appexit( NULL );
12034 #else
12035         (void) dbopen( NULL, 0, 0, 0, NULL);
12036 #endif
12037
12038 ; return 0; }
12039 EOF
12040 if { (eval echo configure:12041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12041   rm -rf conftest*
12042   ol_cv_db_db=yes
12043 else
12044   echo "configure: failed program was:" >&5
12045   cat conftest.$ac_ext >&5
12046   rm -rf conftest*
12047   ol_cv_db_db=no
12048 fi
12049 rm -f conftest*
12050
12051         LIBS="$ol_LIBS"
12052
12053 fi
12054
12055 echo "$ac_t""$ol_cv_db_db" 1>&6
12056
12057         if test $ol_cv_db_db = yes ; then
12058                 ol_cv_lib_db=-ldb
12059         fi
12060 fi
12061
12062 if test $ol_cv_lib_db = no ; then
12063         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12064 echo "configure:12065: checking for Berkeley DB link (-ldb3)" >&5
12065 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12066   echo $ac_n "(cached) $ac_c" 1>&6
12067 else
12068   
12069         ol_DB_LIB=-ldb3
12070         ol_LIBS=$LIBS
12071         LIBS="$ol_DB_LIB $LIBS"
12072
12073         cat > conftest.$ac_ext <<EOF
12074 #line 12075 "configure"
12075 #include "confdefs.h"
12076
12077 #ifdef HAVE_DB_185_H
12078 # include <db_185.h>
12079 #else
12080 # include <db.h>
12081 #endif
12082
12083 #ifndef DB_VERSION_MAJOR
12084 # define DB_VERSION_MAJOR 1
12085 #endif
12086
12087 #ifndef NULL
12088 #define NULL ((void*)0)
12089 #endif
12090
12091 int main() {
12092
12093 #if DB_VERSION_MAJOR > 2
12094         db_env_create( NULL, 0 );
12095 #elif DB_VERSION_MAJOR > 1
12096         db_appexit( NULL );
12097 #else
12098         (void) dbopen( NULL, 0, 0, 0, NULL);
12099 #endif
12100
12101 ; return 0; }
12102 EOF
12103 if { (eval echo configure:12104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12104   rm -rf conftest*
12105   ol_cv_db_db3=yes
12106 else
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -rf conftest*
12110   ol_cv_db_db3=no
12111 fi
12112 rm -f conftest*
12113
12114         LIBS="$ol_LIBS"
12115
12116 fi
12117
12118 echo "$ac_t""$ol_cv_db_db3" 1>&6
12119
12120         if test $ol_cv_db_db3 = yes ; then
12121                 ol_cv_lib_db=-ldb3
12122         fi
12123 fi
12124
12125 if test $ol_cv_lib_db = no ; then
12126         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12127 echo "configure:12128: checking for Berkeley DB link (-ldb2)" >&5
12128 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12129   echo $ac_n "(cached) $ac_c" 1>&6
12130 else
12131   
12132         ol_DB_LIB=-ldb2
12133         ol_LIBS=$LIBS
12134         LIBS="$ol_DB_LIB $LIBS"
12135
12136         cat > conftest.$ac_ext <<EOF
12137 #line 12138 "configure"
12138 #include "confdefs.h"
12139
12140 #ifdef HAVE_DB_185_H
12141 # include <db_185.h>
12142 #else
12143 # include <db.h>
12144 #endif
12145
12146 #ifndef DB_VERSION_MAJOR
12147 # define DB_VERSION_MAJOR 1
12148 #endif
12149
12150 #ifndef NULL
12151 #define NULL ((void*)0)
12152 #endif
12153
12154 int main() {
12155
12156 #if DB_VERSION_MAJOR > 2
12157         db_env_create( NULL, 0 );
12158 #elif DB_VERSION_MAJOR > 1
12159         db_appexit( NULL );
12160 #else
12161         (void) dbopen( NULL, 0, 0, 0, NULL);
12162 #endif
12163
12164 ; return 0; }
12165 EOF
12166 if { (eval echo configure:12167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12167   rm -rf conftest*
12168   ol_cv_db_db2=yes
12169 else
12170   echo "configure: failed program was:" >&5
12171   cat conftest.$ac_ext >&5
12172   rm -rf conftest*
12173   ol_cv_db_db2=no
12174 fi
12175 rm -f conftest*
12176
12177         LIBS="$ol_LIBS"
12178
12179 fi
12180
12181 echo "$ac_t""$ol_cv_db_db2" 1>&6
12182
12183         if test $ol_cv_db_db2 = yes ; then
12184                 ol_cv_lib_db=-ldb2
12185         fi
12186 fi
12187
12188 if test $ol_cv_lib_db = no ; then
12189         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12190 echo "configure:12191: checking for Berkeley DB link (-ldb1)" >&5
12191 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12192   echo $ac_n "(cached) $ac_c" 1>&6
12193 else
12194   
12195         ol_DB_LIB=-ldb1
12196         ol_LIBS=$LIBS
12197         LIBS="$ol_DB_LIB $LIBS"
12198
12199         cat > conftest.$ac_ext <<EOF
12200 #line 12201 "configure"
12201 #include "confdefs.h"
12202
12203 #ifdef HAVE_DB_185_H
12204 # include <db_185.h>
12205 #else
12206 # include <db.h>
12207 #endif
12208
12209 #ifndef DB_VERSION_MAJOR
12210 # define DB_VERSION_MAJOR 1
12211 #endif
12212
12213 #ifndef NULL
12214 #define NULL ((void*)0)
12215 #endif
12216
12217 int main() {
12218
12219 #if DB_VERSION_MAJOR > 2
12220         db_env_create( NULL, 0 );
12221 #elif DB_VERSION_MAJOR > 1
12222         db_appexit( NULL );
12223 #else
12224         (void) dbopen( NULL, 0, 0, 0, NULL);
12225 #endif
12226
12227 ; return 0; }
12228 EOF
12229 if { (eval echo configure:12230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12230   rm -rf conftest*
12231   ol_cv_db_db1=yes
12232 else
12233   echo "configure: failed program was:" >&5
12234   cat conftest.$ac_ext >&5
12235   rm -rf conftest*
12236   ol_cv_db_db1=no
12237 fi
12238 rm -f conftest*
12239
12240         LIBS="$ol_LIBS"
12241
12242 fi
12243
12244 echo "$ac_t""$ol_cv_db_db1" 1>&6
12245
12246         if test $ol_cv_db_db1 = yes ; then
12247                 ol_cv_lib_db=-ldb1
12248         fi
12249 fi
12250
12251
12252                 if test "$ol_cv_lib_db" != no ; then
12253                         ol_cv_berkeley_db=yes
12254                 fi
12255         fi
12256 fi
12257
12258         else
12259                 ol_cv_berkeley_db=no
12260 for ac_hdr in db.h
12261 do
12262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12264 echo "configure:12265: checking for $ac_hdr" >&5
12265 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12266   echo $ac_n "(cached) $ac_c" 1>&6
12267 else
12268   cat > conftest.$ac_ext <<EOF
12269 #line 12270 "configure"
12270 #include "confdefs.h"
12271 #include <$ac_hdr>
12272 EOF
12273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12274 { (eval echo configure:12275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12276 if test -z "$ac_err"; then
12277   rm -rf conftest*
12278   eval "ac_cv_header_$ac_safe=yes"
12279 else
12280   echo "$ac_err" >&5
12281   echo "configure: failed program was:" >&5
12282   cat conftest.$ac_ext >&5
12283   rm -rf conftest*
12284   eval "ac_cv_header_$ac_safe=no"
12285 fi
12286 rm -f conftest*
12287 fi
12288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12289   echo "$ac_t""yes" 1>&6
12290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12291   cat >> confdefs.h <<EOF
12292 #define $ac_tr_hdr 1
12293 EOF
12294  
12295 else
12296   echo "$ac_t""no" 1>&6
12297 fi
12298 done
12299
12300 if test $ac_cv_header_db_h = yes; then
12301         ol_cv_lib_db=no
12302 if test $ol_cv_lib_db = no ; then
12303         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12304 echo "configure:12305: checking for Berkeley DB link (default)" >&5
12305 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12306   echo $ac_n "(cached) $ac_c" 1>&6
12307 else
12308   
12309         ol_DB_LIB=
12310         ol_LIBS=$LIBS
12311         LIBS="$ol_DB_LIB $LIBS"
12312
12313         cat > conftest.$ac_ext <<EOF
12314 #line 12315 "configure"
12315 #include "confdefs.h"
12316
12317 #ifdef HAVE_DB_185_H
12318 # include <db_185.h>
12319 #else
12320 # include <db.h>
12321 #endif
12322
12323 #ifndef DB_VERSION_MAJOR
12324 # define DB_VERSION_MAJOR 1
12325 #endif
12326
12327 #ifndef NULL
12328 #define NULL ((void*)0)
12329 #endif
12330
12331 int main() {
12332
12333 #if DB_VERSION_MAJOR > 2
12334         db_env_create( NULL, 0 );
12335 #elif DB_VERSION_MAJOR > 1
12336         db_appexit( NULL );
12337 #else
12338         (void) dbopen( NULL, 0, 0, 0, NULL);
12339 #endif
12340
12341 ; return 0; }
12342 EOF
12343 if { (eval echo configure:12344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12344   rm -rf conftest*
12345   ol_cv_db_none=yes
12346 else
12347   echo "configure: failed program was:" >&5
12348   cat conftest.$ac_ext >&5
12349   rm -rf conftest*
12350   ol_cv_db_none=no
12351 fi
12352 rm -f conftest*
12353
12354         LIBS="$ol_LIBS"
12355
12356 fi
12357
12358 echo "$ac_t""$ol_cv_db_none" 1>&6
12359
12360         if test $ol_cv_db_none = yes ; then
12361                 ol_cv_lib_db=yes
12362         fi
12363 fi
12364
12365 if test $ol_cv_lib_db = no ; then
12366         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12367 echo "configure:12368: checking for Berkeley DB link (-ldb)" >&5
12368 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12369   echo $ac_n "(cached) $ac_c" 1>&6
12370 else
12371   
12372         ol_DB_LIB=-ldb
12373         ol_LIBS=$LIBS
12374         LIBS="$ol_DB_LIB $LIBS"
12375
12376         cat > conftest.$ac_ext <<EOF
12377 #line 12378 "configure"
12378 #include "confdefs.h"
12379
12380 #ifdef HAVE_DB_185_H
12381 # include <db_185.h>
12382 #else
12383 # include <db.h>
12384 #endif
12385
12386 #ifndef DB_VERSION_MAJOR
12387 # define DB_VERSION_MAJOR 1
12388 #endif
12389
12390 #ifndef NULL
12391 #define NULL ((void*)0)
12392 #endif
12393
12394 int main() {
12395
12396 #if DB_VERSION_MAJOR > 2
12397         db_env_create( NULL, 0 );
12398 #elif DB_VERSION_MAJOR > 1
12399         db_appexit( NULL );
12400 #else
12401         (void) dbopen( NULL, 0, 0, 0, NULL);
12402 #endif
12403
12404 ; return 0; }
12405 EOF
12406 if { (eval echo configure:12407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12407   rm -rf conftest*
12408   ol_cv_db_db=yes
12409 else
12410   echo "configure: failed program was:" >&5
12411   cat conftest.$ac_ext >&5
12412   rm -rf conftest*
12413   ol_cv_db_db=no
12414 fi
12415 rm -f conftest*
12416
12417         LIBS="$ol_LIBS"
12418
12419 fi
12420
12421 echo "$ac_t""$ol_cv_db_db" 1>&6
12422
12423         if test $ol_cv_db_db = yes ; then
12424                 ol_cv_lib_db=-ldb
12425         fi
12426 fi
12427
12428 if test $ol_cv_lib_db = no ; then
12429         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12430 echo "configure:12431: checking for Berkeley DB link (-ldb3)" >&5
12431 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12432   echo $ac_n "(cached) $ac_c" 1>&6
12433 else
12434   
12435         ol_DB_LIB=-ldb3
12436         ol_LIBS=$LIBS
12437         LIBS="$ol_DB_LIB $LIBS"
12438
12439         cat > conftest.$ac_ext <<EOF
12440 #line 12441 "configure"
12441 #include "confdefs.h"
12442
12443 #ifdef HAVE_DB_185_H
12444 # include <db_185.h>
12445 #else
12446 # include <db.h>
12447 #endif
12448
12449 #ifndef DB_VERSION_MAJOR
12450 # define DB_VERSION_MAJOR 1
12451 #endif
12452
12453 #ifndef NULL
12454 #define NULL ((void*)0)
12455 #endif
12456
12457 int main() {
12458
12459 #if DB_VERSION_MAJOR > 2
12460         db_env_create( NULL, 0 );
12461 #elif DB_VERSION_MAJOR > 1
12462         db_appexit( NULL );
12463 #else
12464         (void) dbopen( NULL, 0, 0, 0, NULL);
12465 #endif
12466
12467 ; return 0; }
12468 EOF
12469 if { (eval echo configure:12470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12470   rm -rf conftest*
12471   ol_cv_db_db3=yes
12472 else
12473   echo "configure: failed program was:" >&5
12474   cat conftest.$ac_ext >&5
12475   rm -rf conftest*
12476   ol_cv_db_db3=no
12477 fi
12478 rm -f conftest*
12479
12480         LIBS="$ol_LIBS"
12481
12482 fi
12483
12484 echo "$ac_t""$ol_cv_db_db3" 1>&6
12485
12486         if test $ol_cv_db_db3 = yes ; then
12487                 ol_cv_lib_db=-ldb3
12488         fi
12489 fi
12490
12491 if test $ol_cv_lib_db = no ; then
12492         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12493 echo "configure:12494: checking for Berkeley DB link (-ldb2)" >&5
12494 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12495   echo $ac_n "(cached) $ac_c" 1>&6
12496 else
12497   
12498         ol_DB_LIB=-ldb2
12499         ol_LIBS=$LIBS
12500         LIBS="$ol_DB_LIB $LIBS"
12501
12502         cat > conftest.$ac_ext <<EOF
12503 #line 12504 "configure"
12504 #include "confdefs.h"
12505
12506 #ifdef HAVE_DB_185_H
12507 # include <db_185.h>
12508 #else
12509 # include <db.h>
12510 #endif
12511
12512 #ifndef DB_VERSION_MAJOR
12513 # define DB_VERSION_MAJOR 1
12514 #endif
12515
12516 #ifndef NULL
12517 #define NULL ((void*)0)
12518 #endif
12519
12520 int main() {
12521
12522 #if DB_VERSION_MAJOR > 2
12523         db_env_create( NULL, 0 );
12524 #elif DB_VERSION_MAJOR > 1
12525         db_appexit( NULL );
12526 #else
12527         (void) dbopen( NULL, 0, 0, 0, NULL);
12528 #endif
12529
12530 ; return 0; }
12531 EOF
12532 if { (eval echo configure:12533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12533   rm -rf conftest*
12534   ol_cv_db_db2=yes
12535 else
12536   echo "configure: failed program was:" >&5
12537   cat conftest.$ac_ext >&5
12538   rm -rf conftest*
12539   ol_cv_db_db2=no
12540 fi
12541 rm -f conftest*
12542
12543         LIBS="$ol_LIBS"
12544
12545 fi
12546
12547 echo "$ac_t""$ol_cv_db_db2" 1>&6
12548
12549         if test $ol_cv_db_db2 = yes ; then
12550                 ol_cv_lib_db=-ldb2
12551         fi
12552 fi
12553
12554 if test $ol_cv_lib_db = no ; then
12555         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12556 echo "configure:12557: checking for Berkeley DB link (-ldb1)" >&5
12557 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12558   echo $ac_n "(cached) $ac_c" 1>&6
12559 else
12560   
12561         ol_DB_LIB=-ldb1
12562         ol_LIBS=$LIBS
12563         LIBS="$ol_DB_LIB $LIBS"
12564
12565         cat > conftest.$ac_ext <<EOF
12566 #line 12567 "configure"
12567 #include "confdefs.h"
12568
12569 #ifdef HAVE_DB_185_H
12570 # include <db_185.h>
12571 #else
12572 # include <db.h>
12573 #endif
12574
12575 #ifndef DB_VERSION_MAJOR
12576 # define DB_VERSION_MAJOR 1
12577 #endif
12578
12579 #ifndef NULL
12580 #define NULL ((void*)0)
12581 #endif
12582
12583 int main() {
12584
12585 #if DB_VERSION_MAJOR > 2
12586         db_env_create( NULL, 0 );
12587 #elif DB_VERSION_MAJOR > 1
12588         db_appexit( NULL );
12589 #else
12590         (void) dbopen( NULL, 0, 0, 0, NULL);
12591 #endif
12592
12593 ; return 0; }
12594 EOF
12595 if { (eval echo configure:12596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12596   rm -rf conftest*
12597   ol_cv_db_db1=yes
12598 else
12599   echo "configure: failed program was:" >&5
12600   cat conftest.$ac_ext >&5
12601   rm -rf conftest*
12602   ol_cv_db_db1=no
12603 fi
12604 rm -f conftest*
12605
12606         LIBS="$ol_LIBS"
12607
12608 fi
12609
12610 echo "$ac_t""$ol_cv_db_db1" 1>&6
12611
12612         if test $ol_cv_db_db1 = yes ; then
12613                 ol_cv_lib_db=-ldb1
12614         fi
12615 fi
12616
12617
12618         if test "$ol_cv_lib_db" != no ; then
12619                 ol_cv_berkeley_db=yes
12620                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12621 echo "configure:12622: checking for Berkeley DB thread support" >&5
12622 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12623   echo $ac_n "(cached) $ac_c" 1>&6
12624 else
12625   
12626         ol_LIBS="$LIBS"
12627         if test $ol_cv_lib_db != yes ; then
12628                 LIBS="$ol_cv_lib_db"
12629         fi
12630
12631         if test "$cross_compiling" = yes; then
12632   ol_cv_berkeley_db_thread=cross
12633 else
12634   cat > conftest.$ac_ext <<EOF
12635 #line 12636 "configure"
12636 #include "confdefs.h"
12637
12638 #ifdef HAVE_DB_185_H
12639         choke me;
12640 #else
12641 #include <db.h>
12642 #endif
12643 #ifndef NULL
12644 #define NULL ((void *)0)
12645 #endif
12646 main()
12647 {
12648         int rc;
12649         u_int32_t flags = DB_CREATE | DB_THREAD;
12650
12651 #if DB_VERSION_MAJOR > 2
12652         DB_ENV *env = NULL;
12653
12654         rc = db_env_create( &env, 0 );
12655
12656         if( rc == 0 ) {
12657 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12658                 rc = env->open( env, NULL, flags, 0 );
12659 #else
12660                 rc = env->open( env, NULL, NULL, flags, 0 );
12661 #endif
12662         }
12663
12664 #else
12665         DB_ENV env;
12666         memset( &env, '\0', sizeof(env) );
12667
12668         rc = db_appinit( NULL, NULL, &env, flags );
12669
12670         if( rc == 0 ) {
12671                 db_appexit( &env );
12672         }
12673 #endif
12674 #if DB_VERSION_MAJOR > 2
12675 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12676         env->remove( env, NULL, DB_FORCE);
12677 #else
12678         env->remove( env, NULL, NULL, DB_FORCE);
12679 #endif
12680 #endif
12681
12682         return rc;
12683 }
12684 EOF
12685 if { (eval echo configure:12686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12686 then
12687   ol_cv_berkeley_db_thread=yes
12688 else
12689   echo "configure: failed program was:" >&5
12690   cat conftest.$ac_ext >&5
12691   rm -fr conftest*
12692   ol_cv_berkeley_db_thread=no
12693 fi
12694 rm -fr conftest*
12695 fi
12696
12697
12698         LIBS="$ol_LIBS"
12699
12700         if test $ol_cv_berkeley_db_thread != no ; then
12701                 cat >> confdefs.h <<\EOF
12702 #define HAVE_BERKELEY_DB_THREAD 1
12703 EOF
12704
12705         fi
12706
12707 fi
12708
12709 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12710         fi
12711 fi
12712
12713         fi
12714
12715         if test $ol_cv_berkeley_db != no ; then
12716                 cat >> confdefs.h <<\EOF
12717 #define HAVE_BERKELEY_DB 1
12718 EOF
12719
12720
12721                 ol_link_ldbm=berkeley
12722                 ol_with_ldbm_api=db
12723
12724                 if test $ol_with_ldbm_type = hash ; then
12725                         cat >> confdefs.h <<\EOF
12726 #define LDBM_USE_DBHASH 1
12727 EOF
12728
12729                 else
12730                         cat >> confdefs.h <<\EOF
12731 #define LDBM_USE_DBBTREE 1
12732 EOF
12733
12734                 fi
12735
12736                                                 if test $ol_cv_lib_db != yes ; then
12737                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12738                 fi
12739         fi
12740 fi
12741
12742 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12743         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12744         ol_with_ldbm_api=none
12745 fi
12746
12747 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12748         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12749 echo "configure:12750: checking for MDBM library" >&5
12750 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12751   echo $ac_n "(cached) $ac_c" 1>&6
12752 else
12753         ol_LIBS="$LIBS"
12754         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12755 echo "configure:12756: checking for mdbm_set_chain" >&5
12756 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12757   echo $ac_n "(cached) $ac_c" 1>&6
12758 else
12759   cat > conftest.$ac_ext <<EOF
12760 #line 12761 "configure"
12761 #include "confdefs.h"
12762 /* System header to define __stub macros and hopefully few prototypes,
12763     which can conflict with char mdbm_set_chain(); below.  */
12764 #include <assert.h>
12765 /* Override any gcc2 internal prototype to avoid an error.  */
12766 /* We use char because int might match the return type of a gcc2
12767     builtin and then its argument prototype would still apply.  */
12768 char mdbm_set_chain();
12769 char (*f)();
12770
12771 int main() {
12772
12773 /* The GNU C library defines this for functions which it implements
12774     to always fail with ENOSYS.  Some functions are actually named
12775     something starting with __ and the normal name is an alias.  */
12776 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12777 choke me
12778 #else
12779 f = mdbm_set_chain;
12780 #endif
12781
12782 ; return 0; }
12783 EOF
12784 if { (eval echo configure:12785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12785   rm -rf conftest*
12786   eval "ac_cv_func_mdbm_set_chain=yes"
12787 else
12788   echo "configure: failed program was:" >&5
12789   cat conftest.$ac_ext >&5
12790   rm -rf conftest*
12791   eval "ac_cv_func_mdbm_set_chain=no"
12792 fi
12793 rm -f conftest*
12794 fi
12795
12796 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12797   echo "$ac_t""yes" 1>&6
12798   ol_cv_lib_mdbm=yes
12799 else
12800   echo "$ac_t""no" 1>&6
12801
12802                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12803 echo "configure:12804: checking for mdbm_set_chain in -lmdbm" >&5
12804 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12806   echo $ac_n "(cached) $ac_c" 1>&6
12807 else
12808   ac_save_LIBS="$LIBS"
12809 LIBS="-lmdbm  $LIBS"
12810 cat > conftest.$ac_ext <<EOF
12811 #line 12812 "configure"
12812 #include "confdefs.h"
12813 /* Override any gcc2 internal prototype to avoid an error.  */
12814 /* We use char because int might match the return type of a gcc2
12815     builtin and then its argument prototype would still apply.  */
12816 char mdbm_set_chain();
12817
12818 int main() {
12819 mdbm_set_chain()
12820 ; return 0; }
12821 EOF
12822 if { (eval echo configure:12823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12823   rm -rf conftest*
12824   eval "ac_cv_lib_$ac_lib_var=yes"
12825 else
12826   echo "configure: failed program was:" >&5
12827   cat conftest.$ac_ext >&5
12828   rm -rf conftest*
12829   eval "ac_cv_lib_$ac_lib_var=no"
12830 fi
12831 rm -f conftest*
12832 LIBS="$ac_save_LIBS"
12833
12834 fi
12835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12836   echo "$ac_t""yes" 1>&6
12837   ol_cv_lib_mdbm=-lmdbm
12838 else
12839   echo "$ac_t""no" 1>&6
12840 ol_cv_lib_mdbm=no
12841 fi
12842
12843         
12844 fi
12845
12846         LIBS="$ol_LIBS"
12847
12848 fi
12849
12850 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12851
12852
12853  for ac_hdr in mdbm.h
12854 do
12855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12857 echo "configure:12858: checking for $ac_hdr" >&5
12858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12859   echo $ac_n "(cached) $ac_c" 1>&6
12860 else
12861   cat > conftest.$ac_ext <<EOF
12862 #line 12863 "configure"
12863 #include "confdefs.h"
12864 #include <$ac_hdr>
12865 EOF
12866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12867 { (eval echo configure:12868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12869 if test -z "$ac_err"; then
12870   rm -rf conftest*
12871   eval "ac_cv_header_$ac_safe=yes"
12872 else
12873   echo "$ac_err" >&5
12874   echo "configure: failed program was:" >&5
12875   cat conftest.$ac_ext >&5
12876   rm -rf conftest*
12877   eval "ac_cv_header_$ac_safe=no"
12878 fi
12879 rm -f conftest*
12880 fi
12881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12882   echo "$ac_t""yes" 1>&6
12883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12884   cat >> confdefs.h <<EOF
12885 #define $ac_tr_hdr 1
12886 EOF
12887  
12888 else
12889   echo "$ac_t""no" 1>&6
12890 fi
12891 done
12892
12893  echo $ac_n "checking for db""... $ac_c" 1>&6
12894 echo "configure:12895: checking for db" >&5
12895 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12896   echo $ac_n "(cached) $ac_c" 1>&6
12897 else
12898   
12899         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12900                 ol_cv_mdbm=no
12901         else
12902                 ol_cv_mdbm=yes
12903         fi
12904
12905 fi
12906
12907 echo "$ac_t""$ol_cv_mdbm" 1>&6
12908  if test $ol_cv_mdbm = yes ; then
12909         cat >> confdefs.h <<\EOF
12910 #define HAVE_MDBM 1
12911 EOF
12912
12913  fi
12914
12915
12916         if test $ol_cv_mdbm = yes ; then
12917                 ol_link_ldbm=mdbm
12918                 ol_with_ldbm_api=mdbm
12919                 if test $ol_cv_lib_mdbm != yes ; then
12920                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12921                 fi
12922         fi
12923 fi
12924
12925 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12926         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12927 echo "configure:12928: checking for GDBM library" >&5
12928 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12929   echo $ac_n "(cached) $ac_c" 1>&6
12930 else
12931         ol_LIBS="$LIBS"
12932         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12933 echo "configure:12934: checking for gdbm_open" >&5
12934 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12935   echo $ac_n "(cached) $ac_c" 1>&6
12936 else
12937   cat > conftest.$ac_ext <<EOF
12938 #line 12939 "configure"
12939 #include "confdefs.h"
12940 /* System header to define __stub macros and hopefully few prototypes,
12941     which can conflict with char gdbm_open(); below.  */
12942 #include <assert.h>
12943 /* Override any gcc2 internal prototype to avoid an error.  */
12944 /* We use char because int might match the return type of a gcc2
12945     builtin and then its argument prototype would still apply.  */
12946 char gdbm_open();
12947 char (*f)();
12948
12949 int main() {
12950
12951 /* The GNU C library defines this for functions which it implements
12952     to always fail with ENOSYS.  Some functions are actually named
12953     something starting with __ and the normal name is an alias.  */
12954 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12955 choke me
12956 #else
12957 f = gdbm_open;
12958 #endif
12959
12960 ; return 0; }
12961 EOF
12962 if { (eval echo configure:12963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12963   rm -rf conftest*
12964   eval "ac_cv_func_gdbm_open=yes"
12965 else
12966   echo "configure: failed program was:" >&5
12967   cat conftest.$ac_ext >&5
12968   rm -rf conftest*
12969   eval "ac_cv_func_gdbm_open=no"
12970 fi
12971 rm -f conftest*
12972 fi
12973
12974 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12975   echo "$ac_t""yes" 1>&6
12976   ol_cv_lib_gdbm=yes
12977 else
12978   echo "$ac_t""no" 1>&6
12979
12980                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12981 echo "configure:12982: checking for gdbm_open in -lgdbm" >&5
12982 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12984   echo $ac_n "(cached) $ac_c" 1>&6
12985 else
12986   ac_save_LIBS="$LIBS"
12987 LIBS="-lgdbm  $LIBS"
12988 cat > conftest.$ac_ext <<EOF
12989 #line 12990 "configure"
12990 #include "confdefs.h"
12991 /* Override any gcc2 internal prototype to avoid an error.  */
12992 /* We use char because int might match the return type of a gcc2
12993     builtin and then its argument prototype would still apply.  */
12994 char gdbm_open();
12995
12996 int main() {
12997 gdbm_open()
12998 ; return 0; }
12999 EOF
13000 if { (eval echo configure:13001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13001   rm -rf conftest*
13002   eval "ac_cv_lib_$ac_lib_var=yes"
13003 else
13004   echo "configure: failed program was:" >&5
13005   cat conftest.$ac_ext >&5
13006   rm -rf conftest*
13007   eval "ac_cv_lib_$ac_lib_var=no"
13008 fi
13009 rm -f conftest*
13010 LIBS="$ac_save_LIBS"
13011
13012 fi
13013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13014   echo "$ac_t""yes" 1>&6
13015   ol_cv_lib_gdbm=-lgdbm
13016 else
13017   echo "$ac_t""no" 1>&6
13018 ol_cv_lib_gdbm=no
13019 fi
13020
13021         
13022 fi
13023
13024         LIBS="$ol_LIBS"
13025
13026 fi
13027
13028 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
13029
13030
13031  for ac_hdr in gdbm.h
13032 do
13033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13035 echo "configure:13036: checking for $ac_hdr" >&5
13036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13037   echo $ac_n "(cached) $ac_c" 1>&6
13038 else
13039   cat > conftest.$ac_ext <<EOF
13040 #line 13041 "configure"
13041 #include "confdefs.h"
13042 #include <$ac_hdr>
13043 EOF
13044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13045 { (eval echo configure:13046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13047 if test -z "$ac_err"; then
13048   rm -rf conftest*
13049   eval "ac_cv_header_$ac_safe=yes"
13050 else
13051   echo "$ac_err" >&5
13052   echo "configure: failed program was:" >&5
13053   cat conftest.$ac_ext >&5
13054   rm -rf conftest*
13055   eval "ac_cv_header_$ac_safe=no"
13056 fi
13057 rm -f conftest*
13058 fi
13059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13060   echo "$ac_t""yes" 1>&6
13061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13062   cat >> confdefs.h <<EOF
13063 #define $ac_tr_hdr 1
13064 EOF
13065  
13066 else
13067   echo "$ac_t""no" 1>&6
13068 fi
13069 done
13070
13071  echo $ac_n "checking for db""... $ac_c" 1>&6
13072 echo "configure:13073: checking for db" >&5
13073 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
13074   echo $ac_n "(cached) $ac_c" 1>&6
13075 else
13076   
13077         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
13078                 ol_cv_gdbm=no
13079         else
13080                 ol_cv_gdbm=yes
13081         fi
13082
13083 fi
13084
13085 echo "$ac_t""$ol_cv_gdbm" 1>&6
13086  if test $ol_cv_gdbm = yes ; then
13087         cat >> confdefs.h <<\EOF
13088 #define HAVE_GDBM 1
13089 EOF
13090
13091  fi
13092
13093
13094         if test $ol_cv_gdbm = yes ; then
13095                 ol_link_ldbm=gdbm
13096                 ol_with_ldbm_api=gdbm
13097
13098                 if test $ol_cv_lib_gdbm != yes ; then
13099                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
13100                 fi
13101         fi
13102 fi
13103
13104 if test $ol_with_ldbm_api = ndbm ; then
13105         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
13106 echo "configure:13107: checking for NDBM library" >&5
13107 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
13108   echo $ac_n "(cached) $ac_c" 1>&6
13109 else
13110         ol_LIBS="$LIBS"
13111         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13112 echo "configure:13113: checking for dbm_open" >&5
13113 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
13114   echo $ac_n "(cached) $ac_c" 1>&6
13115 else
13116   cat > conftest.$ac_ext <<EOF
13117 #line 13118 "configure"
13118 #include "confdefs.h"
13119 /* System header to define __stub macros and hopefully few prototypes,
13120     which can conflict with char dbm_open(); below.  */
13121 #include <assert.h>
13122 /* Override any gcc2 internal prototype to avoid an error.  */
13123 /* We use char because int might match the return type of a gcc2
13124     builtin and then its argument prototype would still apply.  */
13125 char dbm_open();
13126 char (*f)();
13127
13128 int main() {
13129
13130 /* The GNU C library defines this for functions which it implements
13131     to always fail with ENOSYS.  Some functions are actually named
13132     something starting with __ and the normal name is an alias.  */
13133 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13134 choke me
13135 #else
13136 f = dbm_open;
13137 #endif
13138
13139 ; return 0; }
13140 EOF
13141 if { (eval echo configure:13142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13142   rm -rf conftest*
13143   eval "ac_cv_func_dbm_open=yes"
13144 else
13145   echo "configure: failed program was:" >&5
13146   cat conftest.$ac_ext >&5
13147   rm -rf conftest*
13148   eval "ac_cv_func_dbm_open=no"
13149 fi
13150 rm -f conftest*
13151 fi
13152
13153 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13154   echo "$ac_t""yes" 1>&6
13155   ol_cv_lib_ndbm=yes
13156 else
13157   echo "$ac_t""no" 1>&6
13158
13159                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13160 echo "configure:13161: checking for dbm_open in -lndbm" >&5
13161 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13162 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13163   echo $ac_n "(cached) $ac_c" 1>&6
13164 else
13165   ac_save_LIBS="$LIBS"
13166 LIBS="-lndbm  $LIBS"
13167 cat > conftest.$ac_ext <<EOF
13168 #line 13169 "configure"
13169 #include "confdefs.h"
13170 /* Override any gcc2 internal prototype to avoid an error.  */
13171 /* We use char because int might match the return type of a gcc2
13172     builtin and then its argument prototype would still apply.  */
13173 char dbm_open();
13174
13175 int main() {
13176 dbm_open()
13177 ; return 0; }
13178 EOF
13179 if { (eval echo configure:13180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13180   rm -rf conftest*
13181   eval "ac_cv_lib_$ac_lib_var=yes"
13182 else
13183   echo "configure: failed program was:" >&5
13184   cat conftest.$ac_ext >&5
13185   rm -rf conftest*
13186   eval "ac_cv_lib_$ac_lib_var=no"
13187 fi
13188 rm -f conftest*
13189 LIBS="$ac_save_LIBS"
13190
13191 fi
13192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13193   echo "$ac_t""yes" 1>&6
13194   ol_cv_lib_ndbm=-lndbm
13195 else
13196   echo "$ac_t""no" 1>&6
13197
13198                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13199 echo "configure:13200: checking for dbm_open in -ldbm" >&5
13200 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13202   echo $ac_n "(cached) $ac_c" 1>&6
13203 else
13204   ac_save_LIBS="$LIBS"
13205 LIBS="-ldbm  $LIBS"
13206 cat > conftest.$ac_ext <<EOF
13207 #line 13208 "configure"
13208 #include "confdefs.h"
13209 /* Override any gcc2 internal prototype to avoid an error.  */
13210 /* We use char because int might match the return type of a gcc2
13211     builtin and then its argument prototype would still apply.  */
13212 char dbm_open();
13213
13214 int main() {
13215 dbm_open()
13216 ; return 0; }
13217 EOF
13218 if { (eval echo configure:13219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13219   rm -rf conftest*
13220   eval "ac_cv_lib_$ac_lib_var=yes"
13221 else
13222   echo "configure: failed program was:" >&5
13223   cat conftest.$ac_ext >&5
13224   rm -rf conftest*
13225   eval "ac_cv_lib_$ac_lib_var=no"
13226 fi
13227 rm -f conftest*
13228 LIBS="$ac_save_LIBS"
13229
13230 fi
13231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13232   echo "$ac_t""yes" 1>&6
13233   ol_cv_lib_ndbm=-ldbm
13234 else
13235   echo "$ac_t""no" 1>&6
13236 ol_cv_lib_ndbm=no
13237 fi
13238                 
13239 fi
13240
13241         
13242 fi
13243
13244         LIBS="$ol_LIBS"
13245
13246 fi
13247
13248 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13249
13250
13251  for ac_hdr in ndbm.h
13252 do
13253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13255 echo "configure:13256: checking for $ac_hdr" >&5
13256 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13257   echo $ac_n "(cached) $ac_c" 1>&6
13258 else
13259   cat > conftest.$ac_ext <<EOF
13260 #line 13261 "configure"
13261 #include "confdefs.h"
13262 #include <$ac_hdr>
13263 EOF
13264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13265 { (eval echo configure:13266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13267 if test -z "$ac_err"; then
13268   rm -rf conftest*
13269   eval "ac_cv_header_$ac_safe=yes"
13270 else
13271   echo "$ac_err" >&5
13272   echo "configure: failed program was:" >&5
13273   cat conftest.$ac_ext >&5
13274   rm -rf conftest*
13275   eval "ac_cv_header_$ac_safe=no"
13276 fi
13277 rm -f conftest*
13278 fi
13279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13280   echo "$ac_t""yes" 1>&6
13281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13282   cat >> confdefs.h <<EOF
13283 #define $ac_tr_hdr 1
13284 EOF
13285  
13286 else
13287   echo "$ac_t""no" 1>&6
13288 fi
13289 done
13290
13291  echo $ac_n "checking for db""... $ac_c" 1>&6
13292 echo "configure:13293: checking for db" >&5
13293 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13294   echo $ac_n "(cached) $ac_c" 1>&6
13295 else
13296   
13297         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13298                 ol_cv_ndbm=no
13299         else
13300                 ol_cv_ndbm=yes
13301         fi
13302
13303 fi
13304
13305 echo "$ac_t""$ol_cv_ndbm" 1>&6
13306  if test $ol_cv_ndbm = yes ; then
13307         cat >> confdefs.h <<\EOF
13308 #define HAVE_NDBM 1
13309 EOF
13310
13311  fi
13312
13313
13314         if test $ol_cv_ndbm = yes ; then
13315                 ol_link_ldbm=ndbm
13316                 ol_with_ldbm_api=ndbm
13317
13318                 if test $ol_cv_lib_ndbm != yes ; then
13319                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13320                 fi
13321         fi
13322 fi
13323
13324 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13325         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13326         if test $ol_enable_ldbm = yes ; then
13327                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13328         fi
13329
13330         echo "configure: warning: disabling LDBM" 1>&2
13331         ol_enable_ldbm=no
13332 fi
13333
13334 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13335         LINK_BINS_DYNAMIC="yes"
13336 else
13337         LINK_BINS_DYNAMIC="no"
13338 fi
13339
13340 if test $ol_enable_wrappers != no ; then
13341         for ac_hdr in tcpd.h
13342 do
13343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13345 echo "configure:13346: checking for $ac_hdr" >&5
13346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13347   echo $ac_n "(cached) $ac_c" 1>&6
13348 else
13349   cat > conftest.$ac_ext <<EOF
13350 #line 13351 "configure"
13351 #include "confdefs.h"
13352 #include <$ac_hdr>
13353 EOF
13354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13355 { (eval echo configure:13356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13357 if test -z "$ac_err"; then
13358   rm -rf conftest*
13359   eval "ac_cv_header_$ac_safe=yes"
13360 else
13361   echo "$ac_err" >&5
13362   echo "configure: failed program was:" >&5
13363   cat conftest.$ac_ext >&5
13364   rm -rf conftest*
13365   eval "ac_cv_header_$ac_safe=no"
13366 fi
13367 rm -f conftest*
13368 fi
13369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13370   echo "$ac_t""yes" 1>&6
13371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13372   cat >> confdefs.h <<EOF
13373 #define $ac_tr_hdr 1
13374 EOF
13375  
13376 else
13377   echo "$ac_t""no" 1>&6
13378 fi
13379 done
13380
13381
13382         if test $ac_cv_header_tcpd_h != yes ; then
13383                 have_wrappers=no
13384         else
13385                 cat > conftest.$ac_ext <<EOF
13386 #line 13387 "configure"
13387 #include "confdefs.h"
13388
13389 int allow_severity = 0;
13390 int deny_severity  = 0;
13391                 
13392 int main() {
13393 hosts_access()
13394 ; return 0; }
13395 EOF
13396 if { (eval echo configure:13397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13397   rm -rf conftest*
13398   have_wrappers=yes
13399 else
13400   echo "configure: failed program was:" >&5
13401   cat conftest.$ac_ext >&5
13402   rm -rf conftest*
13403   have_wrappers=no
13404 fi
13405 rm -f conftest*
13406         fi
13407
13408         if test $have_wrappers = yes ; then
13409                 cat >> confdefs.h <<\EOF
13410 #define HAVE_TCPD 1
13411 EOF
13412
13413                 WRAP_LIBS="-lwrap"
13414
13415                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13416 echo "configure:13417: checking for main in -lnsl" >&5
13417 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13419   echo $ac_n "(cached) $ac_c" 1>&6
13420 else
13421   ac_save_LIBS="$LIBS"
13422 LIBS="-lnsl  $LIBS"
13423 cat > conftest.$ac_ext <<EOF
13424 #line 13425 "configure"
13425 #include "confdefs.h"
13426
13427 int main() {
13428 main()
13429 ; return 0; }
13430 EOF
13431 if { (eval echo configure:13432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13432   rm -rf conftest*
13433   eval "ac_cv_lib_$ac_lib_var=yes"
13434 else
13435   echo "configure: failed program was:" >&5
13436   cat conftest.$ac_ext >&5
13437   rm -rf conftest*
13438   eval "ac_cv_lib_$ac_lib_var=no"
13439 fi
13440 rm -f conftest*
13441 LIBS="$ac_save_LIBS"
13442
13443 fi
13444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13445   echo "$ac_t""yes" 1>&6
13446     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13447     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13448   cat >> confdefs.h <<EOF
13449 #define $ac_tr_lib 1
13450 EOF
13451
13452   LIBS="-lnsl $LIBS"
13453
13454 else
13455   echo "$ac_t""no" 1>&6
13456 fi
13457
13458         else
13459                 echo "configure: warning: could not find -lwrap" 1>&2
13460                 if test $ol_enable_wrappers = yes ; then
13461                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13462                 fi
13463
13464                 echo "configure: warning: disabling wrappers support" 1>&2
13465                 ol_enable_wrappers=no
13466                 WRAP_LIBS=""
13467         fi
13468 fi
13469
13470 if test $ol_enable_syslog != no ; then
13471         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13472 echo "configure:13473: checking for openlog" >&5
13473 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13474   echo $ac_n "(cached) $ac_c" 1>&6
13475 else
13476   cat > conftest.$ac_ext <<EOF
13477 #line 13478 "configure"
13478 #include "confdefs.h"
13479 /* System header to define __stub macros and hopefully few prototypes,
13480     which can conflict with char openlog(); below.  */
13481 #include <assert.h>
13482 /* Override any gcc2 internal prototype to avoid an error.  */
13483 /* We use char because int might match the return type of a gcc2
13484     builtin and then its argument prototype would still apply.  */
13485 char openlog();
13486 char (*f)();
13487
13488 int main() {
13489
13490 /* The GNU C library defines this for functions which it implements
13491     to always fail with ENOSYS.  Some functions are actually named
13492     something starting with __ and the normal name is an alias.  */
13493 #if defined (__stub_openlog) || defined (__stub___openlog)
13494 choke me
13495 #else
13496 f = openlog;
13497 #endif
13498
13499 ; return 0; }
13500 EOF
13501 if { (eval echo configure:13502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13502   rm -rf conftest*
13503   eval "ac_cv_func_openlog=yes"
13504 else
13505   echo "configure: failed program was:" >&5
13506   cat conftest.$ac_ext >&5
13507   rm -rf conftest*
13508   eval "ac_cv_func_openlog=no"
13509 fi
13510 rm -f conftest*
13511 fi
13512
13513 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13514   echo "$ac_t""yes" 1>&6
13515   :
13516 else
13517   echo "$ac_t""no" 1>&6
13518 fi
13519
13520         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13521                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13522         fi
13523         ol_enable_syslog=$ac_cv_func_openlog
13524 fi
13525
13526
13527 ol_link_sql=no
13528 if test $ol_enable_sql != no ; then
13529         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13530 echo "configure:13531: checking for SQLDriverConnect in -liodbc" >&5
13531 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13533   echo $ac_n "(cached) $ac_c" 1>&6
13534 else
13535   ac_save_LIBS="$LIBS"
13536 LIBS="-liodbc  $LIBS"
13537 cat > conftest.$ac_ext <<EOF
13538 #line 13539 "configure"
13539 #include "confdefs.h"
13540 /* Override any gcc2 internal prototype to avoid an error.  */
13541 /* We use char because int might match the return type of a gcc2
13542     builtin and then its argument prototype would still apply.  */
13543 char SQLDriverConnect();
13544
13545 int main() {
13546 SQLDriverConnect()
13547 ; return 0; }
13548 EOF
13549 if { (eval echo configure:13550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13550   rm -rf conftest*
13551   eval "ac_cv_lib_$ac_lib_var=yes"
13552 else
13553   echo "configure: failed program was:" >&5
13554   cat conftest.$ac_ext >&5
13555   rm -rf conftest*
13556   eval "ac_cv_lib_$ac_lib_var=no"
13557 fi
13558 rm -f conftest*
13559 LIBS="$ac_save_LIBS"
13560
13561 fi
13562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13563   echo "$ac_t""yes" 1>&6
13564   have_iodbc=yes
13565 else
13566   echo "$ac_t""no" 1>&6
13567 have_iodbc=no
13568 fi
13569
13570         if test $have_iodbc = yes ; then
13571                 ol_link_sql="-liodbc"
13572         else
13573                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13574 echo "configure:13575: checking for SQLDriverConnect in -lodbc" >&5
13575 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13576 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13577   echo $ac_n "(cached) $ac_c" 1>&6
13578 else
13579   ac_save_LIBS="$LIBS"
13580 LIBS="-lodbc  $LIBS"
13581 cat > conftest.$ac_ext <<EOF
13582 #line 13583 "configure"
13583 #include "confdefs.h"
13584 /* Override any gcc2 internal prototype to avoid an error.  */
13585 /* We use char because int might match the return type of a gcc2
13586     builtin and then its argument prototype would still apply.  */
13587 char SQLDriverConnect();
13588
13589 int main() {
13590 SQLDriverConnect()
13591 ; return 0; }
13592 EOF
13593 if { (eval echo configure:13594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13594   rm -rf conftest*
13595   eval "ac_cv_lib_$ac_lib_var=yes"
13596 else
13597   echo "configure: failed program was:" >&5
13598   cat conftest.$ac_ext >&5
13599   rm -rf conftest*
13600   eval "ac_cv_lib_$ac_lib_var=no"
13601 fi
13602 rm -f conftest*
13603 LIBS="$ac_save_LIBS"
13604
13605 fi
13606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13607   echo "$ac_t""yes" 1>&6
13608   have_odbc=yes
13609 else
13610   echo "$ac_t""no" 1>&6
13611 have_odbc=no
13612 fi
13613
13614                 if test $have_odbc = yes ; then
13615                         ol_link_sql="-lodbc"
13616                 fi
13617         fi
13618
13619         if test $ol_link_sql != no ; then
13620                 SLAPD_SQL_LIBS="$ol_link_sql"
13621
13622         elif test $ol_enable_sql != auto ; then
13623                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13624         fi
13625 fi
13626
13627 if test $ol_enable_tcl != no ; then
13628         for ac_hdr in tcl.h
13629 do
13630 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13631 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13632 echo "configure:13633: checking for $ac_hdr" >&5
13633 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13634   echo $ac_n "(cached) $ac_c" 1>&6
13635 else
13636   cat > conftest.$ac_ext <<EOF
13637 #line 13638 "configure"
13638 #include "confdefs.h"
13639 #include <$ac_hdr>
13640 EOF
13641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13642 { (eval echo configure:13643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13644 if test -z "$ac_err"; then
13645   rm -rf conftest*
13646   eval "ac_cv_header_$ac_safe=yes"
13647 else
13648   echo "$ac_err" >&5
13649   echo "configure: failed program was:" >&5
13650   cat conftest.$ac_ext >&5
13651   rm -rf conftest*
13652   eval "ac_cv_header_$ac_safe=no"
13653 fi
13654 rm -f conftest*
13655 fi
13656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13657   echo "$ac_t""yes" 1>&6
13658     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13659   cat >> confdefs.h <<EOF
13660 #define $ac_tr_hdr 1
13661 EOF
13662  
13663 else
13664   echo "$ac_t""no" 1>&6
13665 fi
13666 done
13667
13668
13669         if test $ac_cv_header_tcl_h != yes ; then
13670                 have_tcl=no
13671         else
13672                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13673                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13674 echo "configure:13675: checking for main in -l$lib" >&5
13675 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13676 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13677   echo $ac_n "(cached) $ac_c" 1>&6
13678 else
13679   ac_save_LIBS="$LIBS"
13680 LIBS="-l$lib  $LIBS"
13681 cat > conftest.$ac_ext <<EOF
13682 #line 13683 "configure"
13683 #include "confdefs.h"
13684
13685 int main() {
13686 main()
13687 ; return 0; }
13688 EOF
13689 if { (eval echo configure:13690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13690   rm -rf conftest*
13691   eval "ac_cv_lib_$ac_lib_var=yes"
13692 else
13693   echo "configure: failed program was:" >&5
13694   cat conftest.$ac_ext >&5
13695   rm -rf conftest*
13696   eval "ac_cv_lib_$ac_lib_var=no"
13697 fi
13698 rm -f conftest*
13699 LIBS="$ac_save_LIBS"
13700
13701 fi
13702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13703   echo "$ac_t""yes" 1>&6
13704   have_tcl=yes
13705                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13706                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13707                            else
13708                                MOD_TCL_LIB="-l${lib}"
13709                            fi;break
13710 else
13711   echo "$ac_t""no" 1>&6
13712 have_tcl=no
13713 fi
13714
13715                 done
13716         fi
13717
13718         if test $have_tcl != yes ; then
13719                 echo "configure: warning: could not find -ltcl" 1>&2
13720                 if test $ol_enable_tcl = yes ; then
13721                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13722                 fi
13723
13724                 ol_enable_tcl=no
13725         fi
13726 fi
13727
13728 ol_link_termcap=no
13729 for ac_hdr in termcap.h ncurses.h
13730 do
13731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13733 echo "configure:13734: checking for $ac_hdr" >&5
13734 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13735   echo $ac_n "(cached) $ac_c" 1>&6
13736 else
13737   cat > conftest.$ac_ext <<EOF
13738 #line 13739 "configure"
13739 #include "confdefs.h"
13740 #include <$ac_hdr>
13741 EOF
13742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13743 { (eval echo configure:13744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13745 if test -z "$ac_err"; then
13746   rm -rf conftest*
13747   eval "ac_cv_header_$ac_safe=yes"
13748 else
13749   echo "$ac_err" >&5
13750   echo "configure: failed program was:" >&5
13751   cat conftest.$ac_ext >&5
13752   rm -rf conftest*
13753   eval "ac_cv_header_$ac_safe=no"
13754 fi
13755 rm -f conftest*
13756 fi
13757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13758   echo "$ac_t""yes" 1>&6
13759     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13760   cat >> confdefs.h <<EOF
13761 #define $ac_tr_hdr 1
13762 EOF
13763  
13764 else
13765   echo "$ac_t""no" 1>&6
13766 fi
13767 done
13768
13769
13770 if test $ol_link_termcap = no ; then
13771         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13772 echo "configure:13773: checking for tputs in -ltermcap" >&5
13773 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13774 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13775   echo $ac_n "(cached) $ac_c" 1>&6
13776 else
13777   ac_save_LIBS="$LIBS"
13778 LIBS="-ltermcap  $LIBS"
13779 cat > conftest.$ac_ext <<EOF
13780 #line 13781 "configure"
13781 #include "confdefs.h"
13782 /* Override any gcc2 internal prototype to avoid an error.  */
13783 /* We use char because int might match the return type of a gcc2
13784     builtin and then its argument prototype would still apply.  */
13785 char tputs();
13786
13787 int main() {
13788 tputs()
13789 ; return 0; }
13790 EOF
13791 if { (eval echo configure:13792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13792   rm -rf conftest*
13793   eval "ac_cv_lib_$ac_lib_var=yes"
13794 else
13795   echo "configure: failed program was:" >&5
13796   cat conftest.$ac_ext >&5
13797   rm -rf conftest*
13798   eval "ac_cv_lib_$ac_lib_var=no"
13799 fi
13800 rm -f conftest*
13801 LIBS="$ac_save_LIBS"
13802
13803 fi
13804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13805   echo "$ac_t""yes" 1>&6
13806   have_termcap=yes
13807 else
13808   echo "$ac_t""no" 1>&6
13809 have_termcap=no
13810 fi
13811
13812         if test $have_termcap = yes ; then
13813                 cat >> confdefs.h <<\EOF
13814 #define HAVE_TERMCAP 1
13815 EOF
13816
13817                 ol_link_termcap=yes
13818                 TERMCAP_LIBS=-ltermcap
13819         fi
13820 fi
13821
13822 if test $ol_link_termcap = no ; then
13823         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13824 echo "configure:13825: checking for initscr in -lncurses" >&5
13825 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13827   echo $ac_n "(cached) $ac_c" 1>&6
13828 else
13829   ac_save_LIBS="$LIBS"
13830 LIBS="-lncurses  $LIBS"
13831 cat > conftest.$ac_ext <<EOF
13832 #line 13833 "configure"
13833 #include "confdefs.h"
13834 /* Override any gcc2 internal prototype to avoid an error.  */
13835 /* We use char because int might match the return type of a gcc2
13836     builtin and then its argument prototype would still apply.  */
13837 char initscr();
13838
13839 int main() {
13840 initscr()
13841 ; return 0; }
13842 EOF
13843 if { (eval echo configure:13844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13844   rm -rf conftest*
13845   eval "ac_cv_lib_$ac_lib_var=yes"
13846 else
13847   echo "configure: failed program was:" >&5
13848   cat conftest.$ac_ext >&5
13849   rm -rf conftest*
13850   eval "ac_cv_lib_$ac_lib_var=no"
13851 fi
13852 rm -f conftest*
13853 LIBS="$ac_save_LIBS"
13854
13855 fi
13856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13857   echo "$ac_t""yes" 1>&6
13858   have_ncurses=yes
13859 else
13860   echo "$ac_t""no" 1>&6
13861 have_ncurses=no
13862 fi
13863
13864         if test $have_ncurses = yes ; then
13865                 cat >> confdefs.h <<\EOF
13866 #define HAVE_NCURSES 1
13867 EOF
13868
13869                 ol_link_termcap=yes
13870                 TERMCAP_LIBS=-lncurses
13871         fi
13872 fi
13873
13874 if test $ol_link_termcap = no ; then
13875         cat >> confdefs.h <<\EOF
13876 #define NO_TERMCAP 1
13877 EOF
13878
13879         TERMCAP_LIBS=
13880 fi
13881
13882 ol_link_sasl=no
13883 ol_link_spasswd=no
13884 if test $ol_with_cyrus_sasl != no ; then
13885         for ac_hdr in sasl.h
13886 do
13887 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13888 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13889 echo "configure:13890: checking for $ac_hdr" >&5
13890 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13891   echo $ac_n "(cached) $ac_c" 1>&6
13892 else
13893   cat > conftest.$ac_ext <<EOF
13894 #line 13895 "configure"
13895 #include "confdefs.h"
13896 #include <$ac_hdr>
13897 EOF
13898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13899 { (eval echo configure:13900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13901 if test -z "$ac_err"; then
13902   rm -rf conftest*
13903   eval "ac_cv_header_$ac_safe=yes"
13904 else
13905   echo "$ac_err" >&5
13906   echo "configure: failed program was:" >&5
13907   cat conftest.$ac_ext >&5
13908   rm -rf conftest*
13909   eval "ac_cv_header_$ac_safe=no"
13910 fi
13911 rm -f conftest*
13912 fi
13913 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13914   echo "$ac_t""yes" 1>&6
13915     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13916   cat >> confdefs.h <<EOF
13917 #define $ac_tr_hdr 1
13918 EOF
13919  
13920 else
13921   echo "$ac_t""no" 1>&6
13922 fi
13923 done
13924
13925
13926         if test $ac_cv_header_sasl_h = yes ; then
13927                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13928 echo "configure:13929: checking for sasl_client_init in -lsasl" >&5
13929 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13930 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13931   echo $ac_n "(cached) $ac_c" 1>&6
13932 else
13933   ac_save_LIBS="$LIBS"
13934 LIBS="-lsasl  $LIBS"
13935 cat > conftest.$ac_ext <<EOF
13936 #line 13937 "configure"
13937 #include "confdefs.h"
13938 /* Override any gcc2 internal prototype to avoid an error.  */
13939 /* We use char because int might match the return type of a gcc2
13940     builtin and then its argument prototype would still apply.  */
13941 char sasl_client_init();
13942
13943 int main() {
13944 sasl_client_init()
13945 ; return 0; }
13946 EOF
13947 if { (eval echo configure:13948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13948   rm -rf conftest*
13949   eval "ac_cv_lib_$ac_lib_var=yes"
13950 else
13951   echo "configure: failed program was:" >&5
13952   cat conftest.$ac_ext >&5
13953   rm -rf conftest*
13954   eval "ac_cv_lib_$ac_lib_var=no"
13955 fi
13956 rm -f conftest*
13957 LIBS="$ac_save_LIBS"
13958
13959 fi
13960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13961   echo "$ac_t""yes" 1>&6
13962   have_cyrus_sasl=yes
13963 else
13964   echo "$ac_t""no" 1>&6
13965 have_cyrus_sasl=no
13966 fi
13967
13968
13969                 if test $have_cyrus_sasl != no ; then
13970                         SASL_LIBS="-lsasl"
13971                         cat >> confdefs.h <<\EOF
13972 #define HAVE_CYRUS_SASL 1
13973 EOF
13974
13975                         ol_link_sasl=yes
13976                 fi
13977         fi
13978
13979         if test $ol_link_sasl = no ; then
13980                 if test $ol_with_cyrus_sasl != auto ; then
13981                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13982                 else
13983                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13984                         echo "configure: warning: SASL authentication not supported!" 1>&2
13985                         if test $ol_link_tls = no ; then
13986                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13987                         fi
13988                 fi
13989
13990         elif test $ol_enable_spasswd != no ; then
13991                 ol_link_spasswd=yes
13992         fi
13993
13994 else
13995         echo "configure: warning: SASL authentication not supported!" 1>&2
13996         if test $ol_link_tls = no ; then
13997                 echo "configure: warning: Strong authentication not supported!" 1>&2
13998         fi
13999 fi
14000
14001 if test $cross_compiling != yes ; then
14002         dev=no
14003         if test -r /dev/urandom ; then
14004                 dev="/dev/urandom";
14005         elif test -r /idev/urandom ; then
14006                 dev="/idev/urandom";
14007         elif test -r /dev/srandom ; then
14008                 dev="/dev/srandom";
14009         elif test -r /dev/random ; then
14010                 dev="/dev/random";
14011         elif test -r /idev/random ; then
14012                 dev="/idev/random";
14013         fi
14014
14015         if test $dev != no ; then
14016                 cat >> confdefs.h <<EOF
14017 #define URANDOM_DEVICE "$dev"
14018 EOF
14019
14020         fi
14021 fi
14022
14023 ol_link_fetch=no
14024 if test $ol_with_fetch != no ; then
14025         ol_LIBS=$LIBS
14026 LIBS="-lfetch -lcom_err $LIBS"
14027 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
14028 echo "configure:14029: checking fetch(3) library" >&5
14029 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
14030   echo $ac_n "(cached) $ac_c" 1>&6
14031 else
14032   
14033         cat > conftest.$ac_ext <<EOF
14034 #line 14035 "configure"
14035 #include "confdefs.h"
14036
14037 #include <sys/param.h>
14038 #include <stdio.h>
14039 #include <fetch.h>
14040 int main() {
14041 struct url *u = fetchParseURL("file:///"); 
14042 ; return 0; }
14043 EOF
14044 if { (eval echo configure:14045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14045   rm -rf conftest*
14046   ol_cv_lib_fetch=yes
14047 else
14048   echo "configure: failed program was:" >&5
14049   cat conftest.$ac_ext >&5
14050   rm -rf conftest*
14051   ol_cv_lib_fetch=no
14052 fi
14053 rm -f conftest*
14054 fi
14055
14056 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
14057 LIBS=$ol_LIBS
14058 if test $ol_cv_lib_fetch != no ; then
14059         ol_link_fetch="-lfetch -lcom_err"
14060         cat >> confdefs.h <<\EOF
14061 #define HAVE_FETCH 1
14062 EOF
14063
14064 fi
14065
14066
14067         if test $ol_cv_lib_fetch != no ; then
14068                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
14069                 ol_link_fetch=freebsd
14070
14071         elif test $ol_with_fetch != auto ; then
14072                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
14073         fi 
14074 fi
14075
14076 ol_link_readline=no
14077 if test $ol_with_readline != no ; then
14078         for ac_hdr in readline/readline.h readline/history.h
14079 do
14080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14082 echo "configure:14083: checking for $ac_hdr" >&5
14083 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14084   echo $ac_n "(cached) $ac_c" 1>&6
14085 else
14086   cat > conftest.$ac_ext <<EOF
14087 #line 14088 "configure"
14088 #include "confdefs.h"
14089 #include <$ac_hdr>
14090 EOF
14091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14092 { (eval echo configure:14093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14094 if test -z "$ac_err"; then
14095   rm -rf conftest*
14096   eval "ac_cv_header_$ac_safe=yes"
14097 else
14098   echo "$ac_err" >&5
14099   echo "configure: failed program was:" >&5
14100   cat conftest.$ac_ext >&5
14101   rm -rf conftest*
14102   eval "ac_cv_header_$ac_safe=no"
14103 fi
14104 rm -f conftest*
14105 fi
14106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14107   echo "$ac_t""yes" 1>&6
14108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14109   cat >> confdefs.h <<EOF
14110 #define $ac_tr_hdr 1
14111 EOF
14112  
14113 else
14114   echo "$ac_t""no" 1>&6
14115 fi
14116 done
14117
14118
14119         if test $ac_cv_header_readline_readline_h = yes ; then
14120                 save_LIBS="$LIBS"
14121                 LIBS="$TERMCAP_LIBS $LIBS"
14122                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
14123 echo "configure:14124: checking for readline in -lreadline" >&5
14124 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
14125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14126   echo $ac_n "(cached) $ac_c" 1>&6
14127 else
14128   ac_save_LIBS="$LIBS"
14129 LIBS="-lreadline  $LIBS"
14130 cat > conftest.$ac_ext <<EOF
14131 #line 14132 "configure"
14132 #include "confdefs.h"
14133 /* Override any gcc2 internal prototype to avoid an error.  */
14134 /* We use char because int might match the return type of a gcc2
14135     builtin and then its argument prototype would still apply.  */
14136 char readline();
14137
14138 int main() {
14139 readline()
14140 ; return 0; }
14141 EOF
14142 if { (eval echo configure:14143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14143   rm -rf conftest*
14144   eval "ac_cv_lib_$ac_lib_var=yes"
14145 else
14146   echo "configure: failed program was:" >&5
14147   cat conftest.$ac_ext >&5
14148   rm -rf conftest*
14149   eval "ac_cv_lib_$ac_lib_var=no"
14150 fi
14151 rm -f conftest*
14152 LIBS="$ac_save_LIBS"
14153
14154 fi
14155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14156   echo "$ac_t""yes" 1>&6
14157   have_readline=yes
14158 else
14159   echo "$ac_t""no" 1>&6
14160 have_readline=no
14161 fi
14162
14163                 LIBS="$save_LIBS"
14164                         
14165                 if test $have_readline = yes ; then
14166                         ol_with_readline=found
14167                         ol_link_readline=yes
14168
14169                         READLINE_LIBS="-lreadline"
14170                 fi
14171         fi
14172 fi
14173
14174 if test $ol_link_readline = yes ; then
14175         cat >> confdefs.h <<\EOF
14176 #define HAVE_READLINE 1
14177 EOF
14178
14179 fi
14180
14181
14182 if test $ol_enable_crypt != no ; then
14183         echo $ac_n "checking for crypt""... $ac_c" 1>&6
14184 echo "configure:14185: checking for crypt" >&5
14185 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
14186   echo $ac_n "(cached) $ac_c" 1>&6
14187 else
14188   cat > conftest.$ac_ext <<EOF
14189 #line 14190 "configure"
14190 #include "confdefs.h"
14191 /* System header to define __stub macros and hopefully few prototypes,
14192     which can conflict with char crypt(); below.  */
14193 #include <assert.h>
14194 /* Override any gcc2 internal prototype to avoid an error.  */
14195 /* We use char because int might match the return type of a gcc2
14196     builtin and then its argument prototype would still apply.  */
14197 char crypt();
14198 char (*f)();
14199
14200 int main() {
14201
14202 /* The GNU C library defines this for functions which it implements
14203     to always fail with ENOSYS.  Some functions are actually named
14204     something starting with __ and the normal name is an alias.  */
14205 #if defined (__stub_crypt) || defined (__stub___crypt)
14206 choke me
14207 #else
14208 f = crypt;
14209 #endif
14210
14211 ; return 0; }
14212 EOF
14213 if { (eval echo configure:14214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14214   rm -rf conftest*
14215   eval "ac_cv_func_crypt=yes"
14216 else
14217   echo "configure: failed program was:" >&5
14218   cat conftest.$ac_ext >&5
14219   rm -rf conftest*
14220   eval "ac_cv_func_crypt=no"
14221 fi
14222 rm -f conftest*
14223 fi
14224
14225 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
14226   echo "$ac_t""yes" 1>&6
14227   have_crypt=yes
14228 else
14229   echo "$ac_t""no" 1>&6
14230
14231                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14232 echo "configure:14233: checking for crypt in -lcrypt" >&5
14233 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14235   echo $ac_n "(cached) $ac_c" 1>&6
14236 else
14237   ac_save_LIBS="$LIBS"
14238 LIBS="-lcrypt  $LIBS"
14239 cat > conftest.$ac_ext <<EOF
14240 #line 14241 "configure"
14241 #include "confdefs.h"
14242 /* Override any gcc2 internal prototype to avoid an error.  */
14243 /* We use char because int might match the return type of a gcc2
14244     builtin and then its argument prototype would still apply.  */
14245 char crypt();
14246
14247 int main() {
14248 crypt()
14249 ; return 0; }
14250 EOF
14251 if { (eval echo configure:14252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14252   rm -rf conftest*
14253   eval "ac_cv_lib_$ac_lib_var=yes"
14254 else
14255   echo "configure: failed program was:" >&5
14256   cat conftest.$ac_ext >&5
14257   rm -rf conftest*
14258   eval "ac_cv_lib_$ac_lib_var=no"
14259 fi
14260 rm -f conftest*
14261 LIBS="$ac_save_LIBS"
14262
14263 fi
14264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14265   echo "$ac_t""yes" 1>&6
14266   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14267                         have_crypt=yes
14268 else
14269   echo "$ac_t""no" 1>&6
14270 have_crypt=no
14271 fi
14272
14273 fi
14274
14275
14276         if test $have_crypt = yes ; then
14277                 cat >> confdefs.h <<\EOF
14278 #define HAVE_CRYPT 1
14279 EOF
14280
14281         else
14282                 echo "configure: warning: could not find crypt" 1>&2
14283                 if test $ol_enable_crypt = yes ; then
14284                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14285                 fi
14286
14287                 echo "configure: warning: disabling crypt support" 1>&2
14288                 ol_enable_crypt=no
14289         fi
14290 fi
14291
14292 if test $ol_enable_proctitle != no ; then
14293         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14294 echo "configure:14295: checking for setproctitle" >&5
14295 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14296   echo $ac_n "(cached) $ac_c" 1>&6
14297 else
14298   cat > conftest.$ac_ext <<EOF
14299 #line 14300 "configure"
14300 #include "confdefs.h"
14301 /* System header to define __stub macros and hopefully few prototypes,
14302     which can conflict with char setproctitle(); below.  */
14303 #include <assert.h>
14304 /* Override any gcc2 internal prototype to avoid an error.  */
14305 /* We use char because int might match the return type of a gcc2
14306     builtin and then its argument prototype would still apply.  */
14307 char setproctitle();
14308 char (*f)();
14309
14310 int main() {
14311
14312 /* The GNU C library defines this for functions which it implements
14313     to always fail with ENOSYS.  Some functions are actually named
14314     something starting with __ and the normal name is an alias.  */
14315 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14316 choke me
14317 #else
14318 f = setproctitle;
14319 #endif
14320
14321 ; return 0; }
14322 EOF
14323 if { (eval echo configure:14324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14324   rm -rf conftest*
14325   eval "ac_cv_func_setproctitle=yes"
14326 else
14327   echo "configure: failed program was:" >&5
14328   cat conftest.$ac_ext >&5
14329   rm -rf conftest*
14330   eval "ac_cv_func_setproctitle=no"
14331 fi
14332 rm -f conftest*
14333 fi
14334
14335 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14336   echo "$ac_t""yes" 1>&6
14337   have_setproctitle=yes
14338 else
14339   echo "$ac_t""no" 1>&6
14340
14341                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14342 echo "configure:14343: checking for setproctitle in -lutil" >&5
14343 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14344 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14345   echo $ac_n "(cached) $ac_c" 1>&6
14346 else
14347   ac_save_LIBS="$LIBS"
14348 LIBS="-lutil  $LIBS"
14349 cat > conftest.$ac_ext <<EOF
14350 #line 14351 "configure"
14351 #include "confdefs.h"
14352 /* Override any gcc2 internal prototype to avoid an error.  */
14353 /* We use char because int might match the return type of a gcc2
14354     builtin and then its argument prototype would still apply.  */
14355 char setproctitle();
14356
14357 int main() {
14358 setproctitle()
14359 ; return 0; }
14360 EOF
14361 if { (eval echo configure:14362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14362   rm -rf conftest*
14363   eval "ac_cv_lib_$ac_lib_var=yes"
14364 else
14365   echo "configure: failed program was:" >&5
14366   cat conftest.$ac_ext >&5
14367   rm -rf conftest*
14368   eval "ac_cv_lib_$ac_lib_var=no"
14369 fi
14370 rm -f conftest*
14371 LIBS="$ac_save_LIBS"
14372
14373 fi
14374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14375   echo "$ac_t""yes" 1>&6
14376   have_setproctitle=yes
14377                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14378 else
14379   echo "$ac_t""no" 1>&6
14380 have_setproctitle=no
14381                         LIBOBJS="$LIBOBJS setproctitle.o"
14382                         LIBSRCS="$LIBSRCS setproctitle.c"
14383 fi
14384
14385 fi
14386
14387
14388         if test $have_setproctitle = yes ; then
14389                 cat >> confdefs.h <<\EOF
14390 #define HAVE_SETPROCTITLE 1
14391 EOF
14392
14393         fi
14394 fi
14395
14396 if test $ol_enable_slp != no ; then
14397         for ac_hdr in slp.h 
14398 do
14399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14401 echo "configure:14402: checking for $ac_hdr" >&5
14402 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14403   echo $ac_n "(cached) $ac_c" 1>&6
14404 else
14405   cat > conftest.$ac_ext <<EOF
14406 #line 14407 "configure"
14407 #include "confdefs.h"
14408 #include <$ac_hdr>
14409 EOF
14410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14411 { (eval echo configure:14412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14413 if test -z "$ac_err"; then
14414   rm -rf conftest*
14415   eval "ac_cv_header_$ac_safe=yes"
14416 else
14417   echo "$ac_err" >&5
14418   echo "configure: failed program was:" >&5
14419   cat conftest.$ac_ext >&5
14420   rm -rf conftest*
14421   eval "ac_cv_header_$ac_safe=no"
14422 fi
14423 rm -f conftest*
14424 fi
14425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14426   echo "$ac_t""yes" 1>&6
14427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14428   cat >> confdefs.h <<EOF
14429 #define $ac_tr_hdr 1
14430 EOF
14431  
14432 else
14433   echo "$ac_t""no" 1>&6
14434 fi
14435 done
14436
14437
14438         if test $ac_cv_header_slp_h = yes ; then
14439                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
14440 echo "configure:14441: checking for SLPOpen in -lslp" >&5
14441 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
14442 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14443   echo $ac_n "(cached) $ac_c" 1>&6
14444 else
14445   ac_save_LIBS="$LIBS"
14446 LIBS="-lslp  $LIBS"
14447 cat > conftest.$ac_ext <<EOF
14448 #line 14449 "configure"
14449 #include "confdefs.h"
14450 /* Override any gcc2 internal prototype to avoid an error.  */
14451 /* We use char because int might match the return type of a gcc2
14452     builtin and then its argument prototype would still apply.  */
14453 char SLPOpen();
14454
14455 int main() {
14456 SLPOpen()
14457 ; return 0; }
14458 EOF
14459 if { (eval echo configure:14460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14460   rm -rf conftest*
14461   eval "ac_cv_lib_$ac_lib_var=yes"
14462 else
14463   echo "configure: failed program was:" >&5
14464   cat conftest.$ac_ext >&5
14465   rm -rf conftest*
14466   eval "ac_cv_lib_$ac_lib_var=no"
14467 fi
14468 rm -f conftest*
14469 LIBS="$ac_save_LIBS"
14470
14471 fi
14472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14473   echo "$ac_t""yes" 1>&6
14474   have_slp=yes
14475 else
14476   echo "$ac_t""no" 1>&6
14477 have_slp=no
14478 fi
14479
14480                 if test $have_slp = yes ; then
14481                         cat >> confdefs.h <<\EOF
14482 #define HAVE_SLP 1
14483 EOF
14484
14485                         SLAPD_SLP_LIBS=-lslp
14486                 fi
14487
14488         elif test $ol_enable_slp = yes ; then
14489                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
14490         fi
14491 fi
14492
14493 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14494 echo "configure:14495: checking for ANSI C header files" >&5
14495 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14496   echo $ac_n "(cached) $ac_c" 1>&6
14497 else
14498   cat > conftest.$ac_ext <<EOF
14499 #line 14500 "configure"
14500 #include "confdefs.h"
14501 #include <stdlib.h>
14502 #include <stdarg.h>
14503 #include <string.h>
14504 #include <float.h>
14505 EOF
14506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14507 { (eval echo configure:14508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14509 if test -z "$ac_err"; then
14510   rm -rf conftest*
14511   ac_cv_header_stdc=yes
14512 else
14513   echo "$ac_err" >&5
14514   echo "configure: failed program was:" >&5
14515   cat conftest.$ac_ext >&5
14516   rm -rf conftest*
14517   ac_cv_header_stdc=no
14518 fi
14519 rm -f conftest*
14520
14521 if test $ac_cv_header_stdc = yes; then
14522   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14523 cat > conftest.$ac_ext <<EOF
14524 #line 14525 "configure"
14525 #include "confdefs.h"
14526 #include <string.h>
14527 EOF
14528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14529   egrep "memchr" >/dev/null 2>&1; then
14530   :
14531 else
14532   rm -rf conftest*
14533   ac_cv_header_stdc=no
14534 fi
14535 rm -f conftest*
14536
14537 fi
14538
14539 if test $ac_cv_header_stdc = yes; then
14540   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14541 cat > conftest.$ac_ext <<EOF
14542 #line 14543 "configure"
14543 #include "confdefs.h"
14544 #include <stdlib.h>
14545 EOF
14546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14547   egrep "free" >/dev/null 2>&1; then
14548   :
14549 else
14550   rm -rf conftest*
14551   ac_cv_header_stdc=no
14552 fi
14553 rm -f conftest*
14554
14555 fi
14556
14557 if test $ac_cv_header_stdc = yes; then
14558   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14559 if test "$cross_compiling" = yes; then
14560   :
14561 else
14562   cat > conftest.$ac_ext <<EOF
14563 #line 14564 "configure"
14564 #include "confdefs.h"
14565 #include <ctype.h>
14566 #if ((' ' & 0x0FF) == 0x020)
14567 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14568 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14569 #else
14570 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14571  || ('j' <= (c) && (c) <= 'r') \
14572  || ('s' <= (c) && (c) <= 'z'))
14573 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14574 #endif
14575 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14576 int main () { int i; for (i = 0; i < 256; i++)
14577 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14578 exit (0); }
14579
14580 EOF
14581 if { (eval echo configure:14582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14582 then
14583   :
14584 else
14585   echo "configure: failed program was:" >&5
14586   cat conftest.$ac_ext >&5
14587   rm -fr conftest*
14588   ac_cv_header_stdc=no
14589 fi
14590 rm -fr conftest*
14591 fi
14592
14593 fi
14594 fi
14595
14596 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14597 if test $ac_cv_header_stdc = yes; then
14598   cat >> confdefs.h <<\EOF
14599 #define STDC_HEADERS 1
14600 EOF
14601
14602 fi
14603
14604 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14605 echo "configure:14606: checking for mode_t" >&5
14606 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14607   echo $ac_n "(cached) $ac_c" 1>&6
14608 else
14609   cat > conftest.$ac_ext <<EOF
14610 #line 14611 "configure"
14611 #include "confdefs.h"
14612 #include <sys/types.h>
14613 #if STDC_HEADERS
14614 #include <stdlib.h>
14615 #include <stddef.h>
14616 #endif
14617
14618 EOF
14619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14620   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14621   rm -rf conftest*
14622   eval "ac_cv_type_mode_t=yes"
14623 else
14624   rm -rf conftest*
14625   eval "ac_cv_type_mode_t=no"
14626 fi
14627 rm -f conftest*
14628
14629 fi
14630 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14631   echo "$ac_t""yes" 1>&6
14632 else
14633   echo "$ac_t""no" 1>&6
14634   cat >> confdefs.h <<EOF
14635 #define mode_t int
14636 EOF
14637
14638 fi
14639
14640 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14641 echo "configure:14642: checking for off_t" >&5
14642 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14643   echo $ac_n "(cached) $ac_c" 1>&6
14644 else
14645   cat > conftest.$ac_ext <<EOF
14646 #line 14647 "configure"
14647 #include "confdefs.h"
14648 #include <sys/types.h>
14649 #if STDC_HEADERS
14650 #include <stdlib.h>
14651 #include <stddef.h>
14652 #endif
14653
14654 EOF
14655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14656   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14657   rm -rf conftest*
14658   eval "ac_cv_type_off_t=yes"
14659 else
14660   rm -rf conftest*
14661   eval "ac_cv_type_off_t=no"
14662 fi
14663 rm -f conftest*
14664
14665 fi
14666 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14667   echo "$ac_t""yes" 1>&6
14668 else
14669   echo "$ac_t""no" 1>&6
14670   cat >> confdefs.h <<EOF
14671 #define off_t long
14672 EOF
14673
14674 fi
14675
14676 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14677 echo "configure:14678: checking for pid_t" >&5
14678 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14679   echo $ac_n "(cached) $ac_c" 1>&6
14680 else
14681   cat > conftest.$ac_ext <<EOF
14682 #line 14683 "configure"
14683 #include "confdefs.h"
14684 #include <sys/types.h>
14685 #if STDC_HEADERS
14686 #include <stdlib.h>
14687 #include <stddef.h>
14688 #endif
14689
14690 EOF
14691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14692   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14693   rm -rf conftest*
14694   eval "ac_cv_type_pid_t=yes"
14695 else
14696   rm -rf conftest*
14697   eval "ac_cv_type_pid_t=no"
14698 fi
14699 rm -f conftest*
14700
14701 fi
14702 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14703   echo "$ac_t""yes" 1>&6
14704 else
14705   echo "$ac_t""no" 1>&6
14706   cat >> confdefs.h <<EOF
14707 #define pid_t int
14708 EOF
14709
14710 fi
14711
14712 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14713 echo "configure:14714: checking for ptrdiff_t" >&5
14714 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14715   echo $ac_n "(cached) $ac_c" 1>&6
14716 else
14717   cat > conftest.$ac_ext <<EOF
14718 #line 14719 "configure"
14719 #include "confdefs.h"
14720 #include <stddef.h>
14721 int main() {
14722 ptrdiff_t p
14723 ; return 0; }
14724 EOF
14725 if { (eval echo configure:14726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14726   rm -rf conftest*
14727   am_cv_type_ptrdiff_t=yes
14728 else
14729   echo "configure: failed program was:" >&5
14730   cat conftest.$ac_ext >&5
14731   rm -rf conftest*
14732   am_cv_type_ptrdiff_t=no
14733 fi
14734 rm -f conftest*
14735 fi
14736
14737 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14738    if test $am_cv_type_ptrdiff_t = yes; then
14739      cat >> confdefs.h <<\EOF
14740 #define HAVE_PTRDIFF_T 1
14741 EOF
14742
14743    fi
14744
14745 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14746 echo "configure:14747: checking return type of signal handlers" >&5
14747 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14748   echo $ac_n "(cached) $ac_c" 1>&6
14749 else
14750   cat > conftest.$ac_ext <<EOF
14751 #line 14752 "configure"
14752 #include "confdefs.h"
14753 #include <sys/types.h>
14754 #include <signal.h>
14755 #ifdef signal
14756 #undef signal
14757 #endif
14758 #ifdef __cplusplus
14759 extern "C" void (*signal (int, void (*)(int)))(int);
14760 #else
14761 void (*signal ()) ();
14762 #endif
14763
14764 int main() {
14765 int i;
14766 ; return 0; }
14767 EOF
14768 if { (eval echo configure:14769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14769   rm -rf conftest*
14770   ac_cv_type_signal=void
14771 else
14772   echo "configure: failed program was:" >&5
14773   cat conftest.$ac_ext >&5
14774   rm -rf conftest*
14775   ac_cv_type_signal=int
14776 fi
14777 rm -f conftest*
14778 fi
14779
14780 echo "$ac_t""$ac_cv_type_signal" 1>&6
14781 cat >> confdefs.h <<EOF
14782 #define RETSIGTYPE $ac_cv_type_signal
14783 EOF
14784
14785
14786 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14787 echo "configure:14788: checking for size_t" >&5
14788 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14789   echo $ac_n "(cached) $ac_c" 1>&6
14790 else
14791   cat > conftest.$ac_ext <<EOF
14792 #line 14793 "configure"
14793 #include "confdefs.h"
14794 #include <sys/types.h>
14795 #if STDC_HEADERS
14796 #include <stdlib.h>
14797 #include <stddef.h>
14798 #endif
14799
14800 EOF
14801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14802   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14803   rm -rf conftest*
14804   eval "ac_cv_type_size_t=yes"
14805 else
14806   rm -rf conftest*
14807   eval "ac_cv_type_size_t=no"
14808 fi
14809 rm -f conftest*
14810
14811 fi
14812 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14813   echo "$ac_t""yes" 1>&6
14814 else
14815   echo "$ac_t""no" 1>&6
14816   cat >> confdefs.h <<EOF
14817 #define size_t unsigned
14818 EOF
14819
14820 fi
14821
14822
14823 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14824 echo "configure:14825: checking for ssize_t" >&5
14825 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14826   echo $ac_n "(cached) $ac_c" 1>&6
14827 else
14828   cat > conftest.$ac_ext <<EOF
14829 #line 14830 "configure"
14830 #include "confdefs.h"
14831 #include <sys/types.h>
14832 #if STDC_HEADERS
14833 #include <stdlib.h>
14834 #include <stddef.h>
14835 #endif
14836
14837 EOF
14838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14839   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14840   rm -rf conftest*
14841   eval "ac_cv_type_ssize_t=yes"
14842 else
14843   rm -rf conftest*
14844   eval "ac_cv_type_ssize_t=no"
14845 fi
14846 rm -f conftest*
14847
14848 fi
14849 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14850   echo "$ac_t""yes" 1>&6
14851 else
14852   echo "$ac_t""no" 1>&6
14853   cat >> confdefs.h <<EOF
14854 #define ssize_t signed int
14855 EOF
14856
14857 fi
14858
14859 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14860 echo "configure:14861: checking for caddr_t" >&5
14861 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14862   echo $ac_n "(cached) $ac_c" 1>&6
14863 else
14864   cat > conftest.$ac_ext <<EOF
14865 #line 14866 "configure"
14866 #include "confdefs.h"
14867 #include <sys/types.h>
14868 #if STDC_HEADERS
14869 #include <stdlib.h>
14870 #include <stddef.h>
14871 #endif
14872
14873 EOF
14874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14875   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14876   rm -rf conftest*
14877   eval "ac_cv_type_caddr_t=yes"
14878 else
14879   rm -rf conftest*
14880   eval "ac_cv_type_caddr_t=no"
14881 fi
14882 rm -f conftest*
14883
14884 fi
14885 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14886   echo "$ac_t""yes" 1>&6
14887 else
14888   echo "$ac_t""no" 1>&6
14889   cat >> confdefs.h <<EOF
14890 #define caddr_t char *
14891 EOF
14892
14893 fi
14894
14895
14896 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14897 echo "configure:14898: checking for socklen_t" >&5
14898 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14899   echo $ac_n "(cached) $ac_c" 1>&6
14900 else
14901   cat > conftest.$ac_ext <<EOF
14902 #line 14903 "configure"
14903 #include "confdefs.h"
14904
14905 #ifdef HAVE_SYS_TYPES_H
14906 #include <sys/types.h>
14907 #endif
14908 #ifdef HAVE_SYS_SOCKET_H
14909 #include <sys/socket.h>
14910 #endif
14911
14912 int main() {
14913 socklen_t len;
14914 ; return 0; }
14915 EOF
14916 if { (eval echo configure:14917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14917   rm -rf conftest*
14918   ol_cv_type_socklen_t=yes
14919 else
14920   echo "configure: failed program was:" >&5
14921   cat conftest.$ac_ext >&5
14922   rm -rf conftest*
14923   ol_cv_type_socklen_t=no
14924 fi
14925 rm -f conftest*
14926 fi
14927
14928 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14929   if test $ol_cv_type_socklen_t = no; then
14930     cat >> confdefs.h <<\EOF
14931 #define socklen_t int
14932 EOF
14933
14934   fi
14935  
14936 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14937 echo "configure:14938: checking for member st_blksize in aggregate type struct stat" >&5
14938 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14939   echo $ac_n "(cached) $ac_c" 1>&6
14940 else
14941   cat > conftest.$ac_ext <<EOF
14942 #line 14943 "configure"
14943 #include "confdefs.h"
14944 #include <sys/types.h>
14945 #include <sys/stat.h>
14946 int main() {
14947 struct stat foo; foo.st_blksize;
14948 ; return 0; }
14949 EOF
14950 if { (eval echo configure:14951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14951   rm -rf conftest*
14952   ac_cv_c_struct_member_st_blksize=yes
14953 else
14954   echo "configure: failed program was:" >&5
14955   cat conftest.$ac_ext >&5
14956   rm -rf conftest*
14957   ac_cv_c_struct_member_st_blksize=no
14958 fi
14959 rm -f conftest*
14960 fi
14961
14962 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14963 st_blksize="$ac_cv_c_struct_member_st_blksize"
14964 if test $ac_cv_c_struct_member_st_blksize = yes; then
14965   cat >> confdefs.h <<\EOF
14966 #define HAVE_ST_BLKSIZE 1
14967 EOF
14968
14969 fi
14970
14971 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14972 echo "configure:14973: checking whether time.h and sys/time.h may both be included" >&5
14973 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14974   echo $ac_n "(cached) $ac_c" 1>&6
14975 else
14976   cat > conftest.$ac_ext <<EOF
14977 #line 14978 "configure"
14978 #include "confdefs.h"
14979 #include <sys/types.h>
14980 #include <sys/time.h>
14981 #include <time.h>
14982 int main() {
14983 struct tm *tp;
14984 ; return 0; }
14985 EOF
14986 if { (eval echo configure:14987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14987   rm -rf conftest*
14988   ac_cv_header_time=yes
14989 else
14990   echo "configure: failed program was:" >&5
14991   cat conftest.$ac_ext >&5
14992   rm -rf conftest*
14993   ac_cv_header_time=no
14994 fi
14995 rm -f conftest*
14996 fi
14997
14998 echo "$ac_t""$ac_cv_header_time" 1>&6
14999 if test $ac_cv_header_time = yes; then
15000   cat >> confdefs.h <<\EOF
15001 #define TIME_WITH_SYS_TIME 1
15002 EOF
15003
15004 fi
15005
15006 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
15007 echo "configure:15008: checking whether struct tm is in sys/time.h or time.h" >&5
15008 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
15009   echo $ac_n "(cached) $ac_c" 1>&6
15010 else
15011   cat > conftest.$ac_ext <<EOF
15012 #line 15013 "configure"
15013 #include "confdefs.h"
15014 #include <sys/types.h>
15015 #include <time.h>
15016 int main() {
15017 struct tm *tp; tp->tm_sec;
15018 ; return 0; }
15019 EOF
15020 if { (eval echo configure:15021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15021   rm -rf conftest*
15022   ac_cv_struct_tm=time.h
15023 else
15024   echo "configure: failed program was:" >&5
15025   cat conftest.$ac_ext >&5
15026   rm -rf conftest*
15027   ac_cv_struct_tm=sys/time.h
15028 fi
15029 rm -f conftest*
15030 fi
15031
15032 echo "$ac_t""$ac_cv_struct_tm" 1>&6
15033 if test $ac_cv_struct_tm = sys/time.h; then
15034   cat >> confdefs.h <<\EOF
15035 #define TM_IN_SYS_TIME 1
15036 EOF
15037
15038 fi
15039
15040 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
15041 echo "configure:15042: checking for uid_t in sys/types.h" >&5
15042 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
15043   echo $ac_n "(cached) $ac_c" 1>&6
15044 else
15045   cat > conftest.$ac_ext <<EOF
15046 #line 15047 "configure"
15047 #include "confdefs.h"
15048 #include <sys/types.h>
15049 EOF
15050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15051   egrep "uid_t" >/dev/null 2>&1; then
15052   rm -rf conftest*
15053   ac_cv_type_uid_t=yes
15054 else
15055   rm -rf conftest*
15056   ac_cv_type_uid_t=no
15057 fi
15058 rm -f conftest*
15059
15060 fi
15061
15062 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
15063 if test $ac_cv_type_uid_t = no; then
15064   cat >> confdefs.h <<\EOF
15065 #define uid_t int
15066 EOF
15067
15068   cat >> confdefs.h <<\EOF
15069 #define gid_t int
15070 EOF
15071
15072 fi
15073
15074 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
15075 echo "configure:15076: checking for sig_atomic_t" >&5
15076 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
15077   echo $ac_n "(cached) $ac_c" 1>&6
15078 else
15079   cat > conftest.$ac_ext <<EOF
15080 #line 15081 "configure"
15081 #include "confdefs.h"
15082 #include <signal.h>
15083 int main() {
15084 sig_atomic_t atomic;
15085 ; return 0; }
15086 EOF
15087 if { (eval echo configure:15088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15088   rm -rf conftest*
15089   ol_cv_type_sig_atomic_t=yes
15090 else
15091   echo "configure: failed program was:" >&5
15092   cat conftest.$ac_ext >&5
15093   rm -rf conftest*
15094   ol_cv_type_sig_atomic_t=no
15095 fi
15096 rm -f conftest*
15097 fi
15098
15099 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
15100   if test $ol_cv_type_sig_atomic_t = no; then
15101     cat >> confdefs.h <<\EOF
15102 #define sig_atomic_t int
15103 EOF
15104
15105   fi
15106  
15107
15108
15109 # test for pw_gecos in struct passwd
15110 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
15111 echo "configure:15112: checking struct passwd for pw_gecos" >&5
15112 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
15113   echo $ac_n "(cached) $ac_c" 1>&6
15114 else
15115   
15116         cat > conftest.$ac_ext <<EOF
15117 #line 15118 "configure"
15118 #include "confdefs.h"
15119 #include <pwd.h>
15120 int main() {
15121
15122         struct passwd pwd;
15123         pwd.pw_gecos = pwd.pw_name;
15124
15125 ; return 0; }
15126 EOF
15127 if { (eval echo configure:15128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15128   rm -rf conftest*
15129   ol_cv_struct_passwd_pw_gecos=yes
15130 else
15131   echo "configure: failed program was:" >&5
15132   cat conftest.$ac_ext >&5
15133   rm -rf conftest*
15134   ol_cv_struct_passwd_pw_gecos=no
15135 fi
15136 rm -f conftest*
15137 fi
15138
15139 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
15140 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
15141         cat >> confdefs.h <<\EOF
15142 #define HAVE_PW_GECOS 1
15143 EOF
15144
15145 fi
15146
15147 # test for pw_passwd in struct passwd
15148 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
15149 echo "configure:15150: checking struct passwd for pw_passwd" >&5
15150 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
15151   echo $ac_n "(cached) $ac_c" 1>&6
15152 else
15153   
15154         cat > conftest.$ac_ext <<EOF
15155 #line 15156 "configure"
15156 #include "confdefs.h"
15157 #include <pwd.h>
15158 int main() {
15159
15160         struct passwd pwd;
15161         pwd.pw_passwd = pwd.pw_name;
15162
15163 ; return 0; }
15164 EOF
15165 if { (eval echo configure:15166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15166   rm -rf conftest*
15167   ol_cv_struct_passwd_pw_passwd=yes
15168 else
15169   echo "configure: failed program was:" >&5
15170   cat conftest.$ac_ext >&5
15171   rm -rf conftest*
15172   ol_cv_struct_passwd_pw_passwd=no
15173 fi
15174 rm -f conftest*
15175 fi
15176
15177 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
15178 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
15179         cat >> confdefs.h <<\EOF
15180 #define HAVE_PW_PASSWD 1
15181 EOF
15182
15183 fi
15184
15185
15186 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
15187 echo "configure:15188: checking if toupper() requires islower()" >&5
15188 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
15189   echo $ac_n "(cached) $ac_c" 1>&6
15190 else
15191   
15192         if test "$cross_compiling" = yes; then
15193   ol_cv_c_upper_lower=safe
15194 else
15195   cat > conftest.$ac_ext <<EOF
15196 #line 15197 "configure"
15197 #include "confdefs.h"
15198
15199 #include <ctype.h>
15200 main()
15201 {
15202         if ('C' == toupper('C'))
15203                 exit(0);
15204         else
15205                 exit(1);
15206 }
15207 EOF
15208 if { (eval echo configure:15209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15209 then
15210   ol_cv_c_upper_lower=no
15211 else
15212   echo "configure: failed program was:" >&5
15213   cat conftest.$ac_ext >&5
15214   rm -fr conftest*
15215   ol_cv_c_upper_lower=yes
15216 fi
15217 rm -fr conftest*
15218 fi
15219
15220 fi
15221
15222 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
15223 if test $ol_cv_c_upper_lower != no ; then
15224         cat >> confdefs.h <<\EOF
15225 #define C_UPPER_LOWER 1
15226 EOF
15227
15228 fi
15229
15230 echo $ac_n "checking for working const""... $ac_c" 1>&6
15231 echo "configure:15232: checking for working const" >&5
15232 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
15233   echo $ac_n "(cached) $ac_c" 1>&6
15234 else
15235   cat > conftest.$ac_ext <<EOF
15236 #line 15237 "configure"
15237 #include "confdefs.h"
15238
15239 int main() {
15240
15241 /* Ultrix mips cc rejects this.  */
15242 typedef int charset[2]; const charset x;
15243 /* SunOS 4.1.1 cc rejects this.  */
15244 char const *const *ccp;
15245 char **p;
15246 /* NEC SVR4.0.2 mips cc rejects this.  */
15247 struct point {int x, y;};
15248 static struct point const zero = {0,0};
15249 /* AIX XL C 1.02.0.0 rejects this.
15250    It does not let you subtract one const X* pointer from another in an arm
15251    of an if-expression whose if-part is not a constant expression */
15252 const char *g = "string";
15253 ccp = &g + (g ? g-g : 0);
15254 /* HPUX 7.0 cc rejects these. */
15255 ++ccp;
15256 p = (char**) ccp;
15257 ccp = (char const *const *) p;
15258 { /* SCO 3.2v4 cc rejects this.  */
15259   char *t;
15260   char const *s = 0 ? (char *) 0 : (char const *) 0;
15261
15262   *t++ = 0;
15263 }
15264 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15265   int x[] = {25, 17};
15266   const int *foo = &x[0];
15267   ++foo;
15268 }
15269 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15270   typedef const int *iptr;
15271   iptr p = 0;
15272   ++p;
15273 }
15274 { /* AIX XL C 1.02.0.0 rejects this saying
15275      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15276   struct s { int j; const int *ap[3]; };
15277   struct s *b; b->j = 5;
15278 }
15279 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15280   const int foo = 10;
15281 }
15282
15283 ; return 0; }
15284 EOF
15285 if { (eval echo configure:15286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15286   rm -rf conftest*
15287   ac_cv_c_const=yes
15288 else
15289   echo "configure: failed program was:" >&5
15290   cat conftest.$ac_ext >&5
15291   rm -rf conftest*
15292   ac_cv_c_const=no
15293 fi
15294 rm -f conftest*
15295 fi
15296
15297 echo "$ac_t""$ac_cv_c_const" 1>&6
15298 if test $ac_cv_c_const = no; then
15299   cat >> confdefs.h <<\EOF
15300 #define const 
15301 EOF
15302
15303 fi
15304
15305 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
15306 echo "configure:15307: checking if compiler understands volatile" >&5
15307 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
15308   echo $ac_n "(cached) $ac_c" 1>&6
15309 else
15310   cat > conftest.$ac_ext <<EOF
15311 #line 15312 "configure"
15312 #include "confdefs.h"
15313 int x, y, z;
15314 int main() {
15315 volatile int a; int * volatile b = x ? &y : &z;
15316       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
15317       *b = 0;
15318 ; return 0; }
15319 EOF
15320 if { (eval echo configure:15321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15321   rm -rf conftest*
15322   ol_cv_c_volatile=yes
15323 else
15324   echo "configure: failed program was:" >&5
15325   cat conftest.$ac_ext >&5
15326   rm -rf conftest*
15327   ol_cv_c_volatile=no
15328 fi
15329 rm -f conftest*
15330 fi
15331
15332 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15333   if test $ol_cv_c_volatile = yes; then
15334     : 
15335   else
15336     cat >> confdefs.h <<\EOF
15337 #define volatile 
15338 EOF
15339
15340   fi
15341  
15342
15343 if test $cross_compiling = yes ; then
15344         cat >> confdefs.h <<\EOF
15345 #define CROSS_COMPILING 1
15346 EOF
15347
15348 else
15349         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15350 echo "configure:15351: checking whether byte ordering is bigendian" >&5
15351 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15352   echo $ac_n "(cached) $ac_c" 1>&6
15353 else
15354   ac_cv_c_bigendian=unknown
15355 # See if sys/param.h defines the BYTE_ORDER macro.
15356 cat > conftest.$ac_ext <<EOF
15357 #line 15358 "configure"
15358 #include "confdefs.h"
15359 #include <sys/types.h>
15360 #include <sys/param.h>
15361 int main() {
15362
15363 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15364  bogus endian macros
15365 #endif
15366 ; return 0; }
15367 EOF
15368 if { (eval echo configure:15369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15369   rm -rf conftest*
15370   # It does; now see whether it defined to BIG_ENDIAN or not.
15371 cat > conftest.$ac_ext <<EOF
15372 #line 15373 "configure"
15373 #include "confdefs.h"
15374 #include <sys/types.h>
15375 #include <sys/param.h>
15376 int main() {
15377
15378 #if BYTE_ORDER != BIG_ENDIAN
15379  not big endian
15380 #endif
15381 ; return 0; }
15382 EOF
15383 if { (eval echo configure:15384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15384   rm -rf conftest*
15385   ac_cv_c_bigendian=yes
15386 else
15387   echo "configure: failed program was:" >&5
15388   cat conftest.$ac_ext >&5
15389   rm -rf conftest*
15390   ac_cv_c_bigendian=no
15391 fi
15392 rm -f conftest*
15393 else
15394   echo "configure: failed program was:" >&5
15395   cat conftest.$ac_ext >&5
15396 fi
15397 rm -f conftest*
15398 if test $ac_cv_c_bigendian = unknown; then
15399 if test "$cross_compiling" = yes; then
15400     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15401 else
15402   cat > conftest.$ac_ext <<EOF
15403 #line 15404 "configure"
15404 #include "confdefs.h"
15405 main () {
15406   /* Are we little or big endian?  From Harbison&Steele.  */
15407   union
15408   {
15409     long l;
15410     char c[sizeof (long)];
15411   } u;
15412   u.l = 1;
15413   exit (u.c[sizeof (long) - 1] == 1);
15414 }
15415 EOF
15416 if { (eval echo configure:15417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15417 then
15418   ac_cv_c_bigendian=no
15419 else
15420   echo "configure: failed program was:" >&5
15421   cat conftest.$ac_ext >&5
15422   rm -fr conftest*
15423   ac_cv_c_bigendian=yes
15424 fi
15425 rm -fr conftest*
15426 fi
15427
15428 fi
15429 fi
15430
15431 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15432 if test $ac_cv_c_bigendian = yes; then
15433   cat >> confdefs.h <<\EOF
15434 #define WORDS_BIGENDIAN 1
15435 EOF
15436
15437 fi
15438
15439 fi
15440
15441 echo $ac_n "checking size of short""... $ac_c" 1>&6
15442 echo "configure:15443: checking size of short" >&5 
15443 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15444   echo $ac_n "(cached) $ac_c" 1>&6
15445 else
15446   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15447   cat > conftest.$ac_ext <<EOF
15448 #line 15449 "configure"
15449 #include "confdefs.h"
15450 #include "confdefs.h" 
15451 #include <sys/types.h> 
15452  
15453
15454 int main() {
15455 switch (0) case 0: case (sizeof (short) == $ac_size):;
15456 ; return 0; }
15457 EOF
15458 if { (eval echo configure:15459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15459   rm -rf conftest*
15460   ac_cv_sizeof_short=$ac_size
15461 else
15462   echo "configure: failed program was:" >&5
15463   cat conftest.$ac_ext >&5
15464 fi
15465 rm -f conftest* 
15466   if test x$ac_cv_sizeof_short != x ; then break; fi 
15467 done 
15468
15469 fi
15470  
15471 if test x$ac_cv_sizeof_short = x ; then 
15472   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15473 fi 
15474 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15475 cat >> confdefs.h <<EOF
15476 #define SIZEOF_SHORT $ac_cv_sizeof_short
15477 EOF
15478  
15479  
15480 echo $ac_n "checking size of int""... $ac_c" 1>&6
15481 echo "configure:15482: checking size of int" >&5 
15482 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15483   echo $ac_n "(cached) $ac_c" 1>&6
15484 else
15485   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15486   cat > conftest.$ac_ext <<EOF
15487 #line 15488 "configure"
15488 #include "confdefs.h"
15489 #include "confdefs.h" 
15490 #include <sys/types.h> 
15491  
15492
15493 int main() {
15494 switch (0) case 0: case (sizeof (int) == $ac_size):;
15495 ; return 0; }
15496 EOF
15497 if { (eval echo configure:15498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15498   rm -rf conftest*
15499   ac_cv_sizeof_int=$ac_size
15500 else
15501   echo "configure: failed program was:" >&5
15502   cat conftest.$ac_ext >&5
15503 fi
15504 rm -f conftest* 
15505   if test x$ac_cv_sizeof_int != x ; then break; fi 
15506 done 
15507
15508 fi
15509  
15510 if test x$ac_cv_sizeof_int = x ; then 
15511   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15512 fi 
15513 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15514 cat >> confdefs.h <<EOF
15515 #define SIZEOF_INT $ac_cv_sizeof_int
15516 EOF
15517  
15518  
15519 echo $ac_n "checking size of long""... $ac_c" 1>&6
15520 echo "configure:15521: checking size of long" >&5 
15521 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15522   echo $ac_n "(cached) $ac_c" 1>&6
15523 else
15524   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15525   cat > conftest.$ac_ext <<EOF
15526 #line 15527 "configure"
15527 #include "confdefs.h"
15528 #include "confdefs.h" 
15529 #include <sys/types.h> 
15530  
15531
15532 int main() {
15533 switch (0) case 0: case (sizeof (long) == $ac_size):;
15534 ; return 0; }
15535 EOF
15536 if { (eval echo configure:15537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15537   rm -rf conftest*
15538   ac_cv_sizeof_long=$ac_size
15539 else
15540   echo "configure: failed program was:" >&5
15541   cat conftest.$ac_ext >&5
15542 fi
15543 rm -f conftest* 
15544   if test x$ac_cv_sizeof_long != x ; then break; fi 
15545 done 
15546
15547 fi
15548  
15549 if test x$ac_cv_sizeof_long = x ; then 
15550   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15551 fi 
15552 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15553 cat >> confdefs.h <<EOF
15554 #define SIZEOF_LONG $ac_cv_sizeof_long
15555 EOF
15556  
15557
15558
15559 if test "$ac_cv_sizeof_int" -lt 4 ; then
15560         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15561
15562         cat >> confdefs.h <<\EOF
15563 #define LBER_INT_T long
15564 EOF
15565
15566 else
15567         cat >> confdefs.h <<\EOF
15568 #define LBER_INT_T int
15569 EOF
15570
15571 fi
15572
15573 cat >> confdefs.h <<\EOF
15574 #define LBER_LEN_T long
15575 EOF
15576
15577 cat >> confdefs.h <<\EOF
15578 #define LBER_SOCKET_T int
15579 EOF
15580
15581 cat >> confdefs.h <<\EOF
15582 #define LBER_TAG_T long
15583 EOF
15584
15585
15586 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15587 echo "configure:15588: checking for 8-bit clean memcmp" >&5
15588 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15589   echo $ac_n "(cached) $ac_c" 1>&6
15590 else
15591   if test "$cross_compiling" = yes; then
15592   ac_cv_func_memcmp_clean=no
15593 else
15594   cat > conftest.$ac_ext <<EOF
15595 #line 15596 "configure"
15596 #include "confdefs.h"
15597
15598 main()
15599 {
15600   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15601   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15602 }
15603
15604 EOF
15605 if { (eval echo configure:15606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15606 then
15607   ac_cv_func_memcmp_clean=yes
15608 else
15609   echo "configure: failed program was:" >&5
15610   cat conftest.$ac_ext >&5
15611   rm -fr conftest*
15612   ac_cv_func_memcmp_clean=no
15613 fi
15614 rm -fr conftest*
15615 fi
15616
15617 fi
15618
15619 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15620 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15621
15622 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15623 echo "configure:15624: checking for strftime" >&5
15624 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15625   echo $ac_n "(cached) $ac_c" 1>&6
15626 else
15627   cat > conftest.$ac_ext <<EOF
15628 #line 15629 "configure"
15629 #include "confdefs.h"
15630 /* System header to define __stub macros and hopefully few prototypes,
15631     which can conflict with char strftime(); below.  */
15632 #include <assert.h>
15633 /* Override any gcc2 internal prototype to avoid an error.  */
15634 /* We use char because int might match the return type of a gcc2
15635     builtin and then its argument prototype would still apply.  */
15636 char strftime();
15637 char (*f)();
15638
15639 int main() {
15640
15641 /* The GNU C library defines this for functions which it implements
15642     to always fail with ENOSYS.  Some functions are actually named
15643     something starting with __ and the normal name is an alias.  */
15644 #if defined (__stub_strftime) || defined (__stub___strftime)
15645 choke me
15646 #else
15647 f = strftime;
15648 #endif
15649
15650 ; return 0; }
15651 EOF
15652 if { (eval echo configure:15653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15653   rm -rf conftest*
15654   eval "ac_cv_func_strftime=yes"
15655 else
15656   echo "configure: failed program was:" >&5
15657   cat conftest.$ac_ext >&5
15658   rm -rf conftest*
15659   eval "ac_cv_func_strftime=no"
15660 fi
15661 rm -f conftest*
15662 fi
15663
15664 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15665   echo "$ac_t""yes" 1>&6
15666   cat >> confdefs.h <<\EOF
15667 #define HAVE_STRFTIME 1
15668 EOF
15669
15670 else
15671   echo "$ac_t""no" 1>&6
15672 # strftime is in -lintl on SCO UNIX.
15673 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15674 echo "configure:15675: checking for strftime in -lintl" >&5
15675 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15676 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15677   echo $ac_n "(cached) $ac_c" 1>&6
15678 else
15679   ac_save_LIBS="$LIBS"
15680 LIBS="-lintl  $LIBS"
15681 cat > conftest.$ac_ext <<EOF
15682 #line 15683 "configure"
15683 #include "confdefs.h"
15684 /* Override any gcc2 internal prototype to avoid an error.  */
15685 /* We use char because int might match the return type of a gcc2
15686     builtin and then its argument prototype would still apply.  */
15687 char strftime();
15688
15689 int main() {
15690 strftime()
15691 ; return 0; }
15692 EOF
15693 if { (eval echo configure:15694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15694   rm -rf conftest*
15695   eval "ac_cv_lib_$ac_lib_var=yes"
15696 else
15697   echo "configure: failed program was:" >&5
15698   cat conftest.$ac_ext >&5
15699   rm -rf conftest*
15700   eval "ac_cv_lib_$ac_lib_var=no"
15701 fi
15702 rm -f conftest*
15703 LIBS="$ac_save_LIBS"
15704
15705 fi
15706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15707   echo "$ac_t""yes" 1>&6
15708   cat >> confdefs.h <<\EOF
15709 #define HAVE_STRFTIME 1
15710 EOF
15711
15712 LIBS="-lintl $LIBS"
15713 else
15714   echo "$ac_t""no" 1>&6
15715 fi
15716
15717 fi
15718
15719
15720 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15721 echo "configure:15722: checking for inet_aton()" >&5
15722 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15723   echo $ac_n "(cached) $ac_c" 1>&6
15724 else
15725   cat > conftest.$ac_ext <<EOF
15726 #line 15727 "configure"
15727 #include "confdefs.h"
15728
15729 #ifdef HAVE_SYS_TYPES_H
15730 #       include <sys/types.h>
15731 #endif
15732 #ifdef HAVE_SYS_SOCKET_H
15733 #       include <sys/socket.h>
15734 #       ifdef HAVE_SYS_SELECT_H
15735 #               include <sys/select.h>
15736 #       endif
15737 #       include <netinet/in.h>
15738 #       ifdef HAVE_ARPA_INET_H
15739 #               include <arpa/inet.h>
15740 #       endif
15741 #endif
15742
15743 int main() {
15744 struct in_addr in;
15745 int rc = inet_aton( "255.255.255.255", &in );
15746 ; return 0; }
15747 EOF
15748 if { (eval echo configure:15749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15749   rm -rf conftest*
15750   ol_cv_func_inet_aton=yes
15751 else
15752   echo "configure: failed program was:" >&5
15753   cat conftest.$ac_ext >&5
15754   rm -rf conftest*
15755   ol_cv_func_inet_aton=no
15756 fi
15757 rm -f conftest*
15758 fi
15759
15760 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15761   if test $ol_cv_func_inet_aton != no; then
15762     cat >> confdefs.h <<\EOF
15763 #define HAVE_INET_ATON 1
15764 EOF
15765
15766   fi
15767  
15768
15769 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15770 echo "configure:15771: checking for _spawnlp" >&5
15771 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15772   echo $ac_n "(cached) $ac_c" 1>&6
15773 else
15774   cat > conftest.$ac_ext <<EOF
15775 #line 15776 "configure"
15776 #include "confdefs.h"
15777 /* System header to define __stub macros and hopefully few prototypes,
15778     which can conflict with char _spawnlp(); below.  */
15779 #include <assert.h>
15780 /* Override any gcc2 internal prototype to avoid an error.  */
15781 /* We use char because int might match the return type of a gcc2
15782     builtin and then its argument prototype would still apply.  */
15783 char _spawnlp();
15784 char (*f)();
15785
15786 int main() {
15787
15788 /* The GNU C library defines this for functions which it implements
15789     to always fail with ENOSYS.  Some functions are actually named
15790     something starting with __ and the normal name is an alias.  */
15791 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15792 choke me
15793 #else
15794 f = _spawnlp;
15795 #endif
15796
15797 ; return 0; }
15798 EOF
15799 if { (eval echo configure:15800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15800   rm -rf conftest*
15801   eval "ac_cv_func__spawnlp=yes"
15802 else
15803   echo "configure: failed program was:" >&5
15804   cat conftest.$ac_ext >&5
15805   rm -rf conftest*
15806   eval "ac_cv_func__spawnlp=no"
15807 fi
15808 rm -f conftest*
15809 fi
15810
15811 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15812   echo "$ac_t""yes" 1>&6
15813   cat >> confdefs.h <<\EOF
15814 #define HAVE_SPAWNLP 1
15815 EOF
15816
15817 else
15818   echo "$ac_t""no" 1>&6
15819 fi
15820
15821
15822 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15823 echo "configure:15824: checking for _snprintf" >&5
15824 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15825   echo $ac_n "(cached) $ac_c" 1>&6
15826 else
15827   cat > conftest.$ac_ext <<EOF
15828 #line 15829 "configure"
15829 #include "confdefs.h"
15830 /* System header to define __stub macros and hopefully few prototypes,
15831     which can conflict with char _snprintf(); below.  */
15832 #include <assert.h>
15833 /* Override any gcc2 internal prototype to avoid an error.  */
15834 /* We use char because int might match the return type of a gcc2
15835     builtin and then its argument prototype would still apply.  */
15836 char _snprintf();
15837 char (*f)();
15838
15839 int main() {
15840
15841 /* The GNU C library defines this for functions which it implements
15842     to always fail with ENOSYS.  Some functions are actually named
15843     something starting with __ and the normal name is an alias.  */
15844 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15845 choke me
15846 #else
15847 f = _snprintf;
15848 #endif
15849
15850 ; return 0; }
15851 EOF
15852 if { (eval echo configure:15853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15853   rm -rf conftest*
15854   eval "ac_cv_func__snprintf=yes"
15855 else
15856   echo "configure: failed program was:" >&5
15857   cat conftest.$ac_ext >&5
15858   rm -rf conftest*
15859   eval "ac_cv_func__snprintf=no"
15860 fi
15861 rm -f conftest*
15862 fi
15863
15864 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15865   echo "$ac_t""yes" 1>&6
15866   ac_cv_func_snprintf=yes
15867         cat >> confdefs.h <<\EOF
15868 #define snprintf _snprintf
15869 EOF
15870
15871
15872 else
15873   echo "$ac_t""no" 1>&6
15874 fi
15875
15876
15877 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15878 echo "configure:15879: checking for _vsnprintf" >&5
15879 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15880   echo $ac_n "(cached) $ac_c" 1>&6
15881 else
15882   cat > conftest.$ac_ext <<EOF
15883 #line 15884 "configure"
15884 #include "confdefs.h"
15885 /* System header to define __stub macros and hopefully few prototypes,
15886     which can conflict with char _vsnprintf(); below.  */
15887 #include <assert.h>
15888 /* Override any gcc2 internal prototype to avoid an error.  */
15889 /* We use char because int might match the return type of a gcc2
15890     builtin and then its argument prototype would still apply.  */
15891 char _vsnprintf();
15892 char (*f)();
15893
15894 int main() {
15895
15896 /* The GNU C library defines this for functions which it implements
15897     to always fail with ENOSYS.  Some functions are actually named
15898     something starting with __ and the normal name is an alias.  */
15899 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15900 choke me
15901 #else
15902 f = _vsnprintf;
15903 #endif
15904
15905 ; return 0; }
15906 EOF
15907 if { (eval echo configure:15908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15908   rm -rf conftest*
15909   eval "ac_cv_func__vsnprintf=yes"
15910 else
15911   echo "configure: failed program was:" >&5
15912   cat conftest.$ac_ext >&5
15913   rm -rf conftest*
15914   eval "ac_cv_func__vsnprintf=no"
15915 fi
15916 rm -f conftest*
15917 fi
15918
15919 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15920   echo "$ac_t""yes" 1>&6
15921   ac_cv_func_vsnprintf=yes
15922         cat >> confdefs.h <<\EOF
15923 #define vsnprintf _vsnprintf
15924 EOF
15925
15926
15927 else
15928   echo "$ac_t""no" 1>&6
15929 fi
15930
15931
15932 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15933 echo "configure:15934: checking for vprintf" >&5
15934 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15935   echo $ac_n "(cached) $ac_c" 1>&6
15936 else
15937   cat > conftest.$ac_ext <<EOF
15938 #line 15939 "configure"
15939 #include "confdefs.h"
15940 /* System header to define __stub macros and hopefully few prototypes,
15941     which can conflict with char vprintf(); below.  */
15942 #include <assert.h>
15943 /* Override any gcc2 internal prototype to avoid an error.  */
15944 /* We use char because int might match the return type of a gcc2
15945     builtin and then its argument prototype would still apply.  */
15946 char vprintf();
15947 char (*f)();
15948
15949 int main() {
15950
15951 /* The GNU C library defines this for functions which it implements
15952     to always fail with ENOSYS.  Some functions are actually named
15953     something starting with __ and the normal name is an alias.  */
15954 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15955 choke me
15956 #else
15957 f = vprintf;
15958 #endif
15959
15960 ; return 0; }
15961 EOF
15962 if { (eval echo configure:15963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15963   rm -rf conftest*
15964   eval "ac_cv_func_vprintf=yes"
15965 else
15966   echo "configure: failed program was:" >&5
15967   cat conftest.$ac_ext >&5
15968   rm -rf conftest*
15969   eval "ac_cv_func_vprintf=no"
15970 fi
15971 rm -f conftest*
15972 fi
15973
15974 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15975   echo "$ac_t""yes" 1>&6
15976   cat >> confdefs.h <<\EOF
15977 #define HAVE_VPRINTF 1
15978 EOF
15979
15980 else
15981   echo "$ac_t""no" 1>&6
15982 fi
15983
15984 if test "$ac_cv_func_vprintf" != yes; then
15985 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15986 echo "configure:15987: checking for _doprnt" >&5
15987 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15988   echo $ac_n "(cached) $ac_c" 1>&6
15989 else
15990   cat > conftest.$ac_ext <<EOF
15991 #line 15992 "configure"
15992 #include "confdefs.h"
15993 /* System header to define __stub macros and hopefully few prototypes,
15994     which can conflict with char _doprnt(); below.  */
15995 #include <assert.h>
15996 /* Override any gcc2 internal prototype to avoid an error.  */
15997 /* We use char because int might match the return type of a gcc2
15998     builtin and then its argument prototype would still apply.  */
15999 char _doprnt();
16000 char (*f)();
16001
16002 int main() {
16003
16004 /* The GNU C library defines this for functions which it implements
16005     to always fail with ENOSYS.  Some functions are actually named
16006     something starting with __ and the normal name is an alias.  */
16007 #if defined (__stub__doprnt) || defined (__stub____doprnt)
16008 choke me
16009 #else
16010 f = _doprnt;
16011 #endif
16012
16013 ; return 0; }
16014 EOF
16015 if { (eval echo configure:16016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16016   rm -rf conftest*
16017   eval "ac_cv_func__doprnt=yes"
16018 else
16019   echo "configure: failed program was:" >&5
16020   cat conftest.$ac_ext >&5
16021   rm -rf conftest*
16022   eval "ac_cv_func__doprnt=no"
16023 fi
16024 rm -f conftest*
16025 fi
16026
16027 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
16028   echo "$ac_t""yes" 1>&6
16029   cat >> confdefs.h <<\EOF
16030 #define HAVE_DOPRNT 1
16031 EOF
16032
16033 else
16034   echo "$ac_t""no" 1>&6
16035 fi
16036
16037 fi
16038
16039
16040 if test $ac_cv_func_vprintf = yes ; then
16041                 for ac_func in vsnprintf vsprintf
16042 do
16043 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16044 echo "configure:16045: checking for $ac_func" >&5
16045 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16046   echo $ac_n "(cached) $ac_c" 1>&6
16047 else
16048   cat > conftest.$ac_ext <<EOF
16049 #line 16050 "configure"
16050 #include "confdefs.h"
16051 /* System header to define __stub macros and hopefully few prototypes,
16052     which can conflict with char $ac_func(); below.  */
16053 #include <assert.h>
16054 /* Override any gcc2 internal prototype to avoid an error.  */
16055 /* We use char because int might match the return type of a gcc2
16056     builtin and then its argument prototype would still apply.  */
16057 char $ac_func();
16058 char (*f)();
16059
16060 int main() {
16061
16062 /* The GNU C library defines this for functions which it implements
16063     to always fail with ENOSYS.  Some functions are actually named
16064     something starting with __ and the normal name is an alias.  */
16065 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16066 choke me
16067 #else
16068 f = $ac_func;
16069 #endif
16070
16071 ; return 0; }
16072 EOF
16073 if { (eval echo configure:16074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16074   rm -rf conftest*
16075   eval "ac_cv_func_$ac_func=yes"
16076 else
16077   echo "configure: failed program was:" >&5
16078   cat conftest.$ac_ext >&5
16079   rm -rf conftest*
16080   eval "ac_cv_func_$ac_func=no"
16081 fi
16082 rm -f conftest*
16083 fi
16084
16085 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16086   echo "$ac_t""yes" 1>&6
16087     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16088   cat >> confdefs.h <<EOF
16089 #define $ac_tr_func 1
16090 EOF
16091  
16092 else
16093   echo "$ac_t""no" 1>&6
16094 fi
16095 done
16096
16097 fi
16098
16099 for ac_func in \
16100         bcopy                   \
16101         closesocket             \
16102         chroot                  \
16103         endgrent                \
16104         endpwent                \
16105         fcntl                   \
16106         flock                   \
16107         getdtablesize   \
16108         getgrgid                \
16109         gethostname             \
16110         getpass                 \
16111         getpassphrase   \
16112         getpwuid                \
16113         getpwnam                \
16114         getspnam                \
16115         gettimeofday    \
16116         initgroups              \
16117         lockf                   \
16118         memcpy                  \
16119         memmove                 \
16120         mkstemp                 \
16121         pipe                    \
16122         read                    \
16123         recv                    \
16124         recvfrom                \
16125         setpwfile               \
16126         setgid                  \
16127         setegid                 \
16128         setsid                  \
16129         setuid                  \
16130         seteuid                 \
16131         sigaction               \
16132         signal                  \
16133         sigset                  \
16134         snprintf                \
16135         strdup                  \
16136         strerror                \
16137         strpbrk                 \
16138         strrchr                 \
16139         strsep                  \
16140         strstr                  \
16141         strtol                  \
16142         strtoul                 \
16143         strspn                  \
16144         sysconf                 \
16145         waitpid                 \
16146         wait4                   \
16147         write                   \
16148         send                    \
16149         sendto                  \
16150
16151 do
16152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16153 echo "configure:16154: checking for $ac_func" >&5
16154 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16155   echo $ac_n "(cached) $ac_c" 1>&6
16156 else
16157   cat > conftest.$ac_ext <<EOF
16158 #line 16159 "configure"
16159 #include "confdefs.h"
16160 /* System header to define __stub macros and hopefully few prototypes,
16161     which can conflict with char $ac_func(); below.  */
16162 #include <assert.h>
16163 /* Override any gcc2 internal prototype to avoid an error.  */
16164 /* We use char because int might match the return type of a gcc2
16165     builtin and then its argument prototype would still apply.  */
16166 char $ac_func();
16167 char (*f)();
16168
16169 int main() {
16170
16171 /* The GNU C library defines this for functions which it implements
16172     to always fail with ENOSYS.  Some functions are actually named
16173     something starting with __ and the normal name is an alias.  */
16174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16175 choke me
16176 #else
16177 f = $ac_func;
16178 #endif
16179
16180 ; return 0; }
16181 EOF
16182 if { (eval echo configure:16183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16183   rm -rf conftest*
16184   eval "ac_cv_func_$ac_func=yes"
16185 else
16186   echo "configure: failed program was:" >&5
16187   cat conftest.$ac_ext >&5
16188   rm -rf conftest*
16189   eval "ac_cv_func_$ac_func=no"
16190 fi
16191 rm -f conftest*
16192 fi
16193
16194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16195   echo "$ac_t""yes" 1>&6
16196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16197   cat >> confdefs.h <<EOF
16198 #define $ac_tr_func 1
16199 EOF
16200  
16201 else
16202   echo "$ac_t""no" 1>&6
16203 fi
16204 done
16205
16206
16207 for ac_func in getopt tempnam
16208 do
16209 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16210 echo "configure:16211: checking for $ac_func" >&5
16211 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16212   echo $ac_n "(cached) $ac_c" 1>&6
16213 else
16214   cat > conftest.$ac_ext <<EOF
16215 #line 16216 "configure"
16216 #include "confdefs.h"
16217 /* System header to define __stub macros and hopefully few prototypes,
16218     which can conflict with char $ac_func(); below.  */
16219 #include <assert.h>
16220 /* Override any gcc2 internal prototype to avoid an error.  */
16221 /* We use char because int might match the return type of a gcc2
16222     builtin and then its argument prototype would still apply.  */
16223 char $ac_func();
16224 char (*f)();
16225
16226 int main() {
16227
16228 /* The GNU C library defines this for functions which it implements
16229     to always fail with ENOSYS.  Some functions are actually named
16230     something starting with __ and the normal name is an alias.  */
16231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16232 choke me
16233 #else
16234 f = $ac_func;
16235 #endif
16236
16237 ; return 0; }
16238 EOF
16239 if { (eval echo configure:16240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16240   rm -rf conftest*
16241   eval "ac_cv_func_$ac_func=yes"
16242 else
16243   echo "configure: failed program was:" >&5
16244   cat conftest.$ac_ext >&5
16245   rm -rf conftest*
16246   eval "ac_cv_func_$ac_func=no"
16247 fi
16248 rm -f conftest*
16249 fi
16250
16251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16252   echo "$ac_t""yes" 1>&6
16253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16254   cat >> confdefs.h <<EOF
16255 #define $ac_tr_func 1
16256 EOF
16257  
16258 else
16259   echo "$ac_t""no" 1>&6
16260 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16261 fi
16262 done
16263
16264
16265
16266 if test "$ac_cv_func_getopt" != yes; then
16267     LIBSRCS="$LIBSRCS getopt.c"
16268 fi
16269
16270 if test "$ac_cv_func_tempnam" != yes; then
16271     LIBSRCS="$LIBSRCS tempnam.c"
16272 fi
16273
16274 # Check Configuration
16275 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
16276 echo "configure:16277: checking declaration of sys_errlist" >&5
16277 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
16278   echo $ac_n "(cached) $ac_c" 1>&6
16279 else
16280   
16281         cat > conftest.$ac_ext <<EOF
16282 #line 16283 "configure"
16283 #include "confdefs.h"
16284
16285 #include <stdio.h>
16286 #include <sys/types.h>
16287 #include <errno.h>
16288 #ifdef WINNT
16289 #include <stdlib.h>
16290 #endif 
16291 int main() {
16292 char *c = (char *) *sys_errlist
16293 ; return 0; }
16294 EOF
16295 if { (eval echo configure:16296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16296   rm -rf conftest*
16297   ol_cv_dcl_sys_errlist=yes
16298         ol_cv_have_sys_errlist=yes
16299 else
16300   echo "configure: failed program was:" >&5
16301   cat conftest.$ac_ext >&5
16302   rm -rf conftest*
16303   ol_cv_dcl_sys_errlist=no
16304 fi
16305 rm -f conftest*
16306 fi
16307
16308 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
16309 #
16310 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16311 if test $ol_cv_dcl_sys_errlist = no ; then
16312         cat >> confdefs.h <<\EOF
16313 #define DECL_SYS_ERRLIST 1
16314 EOF
16315
16316
16317         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
16318 echo "configure:16319: checking existence of sys_errlist" >&5
16319 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16320   echo $ac_n "(cached) $ac_c" 1>&6
16321 else
16322   
16323                 cat > conftest.$ac_ext <<EOF
16324 #line 16325 "configure"
16325 #include "confdefs.h"
16326 #include <errno.h>
16327 int main() {
16328 char *c = (char *) *sys_errlist
16329 ; return 0; }
16330 EOF
16331 if { (eval echo configure:16332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16332   rm -rf conftest*
16333   ol_cv_have_sys_errlist=yes
16334 else
16335   echo "configure: failed program was:" >&5
16336   cat conftest.$ac_ext >&5
16337   rm -rf conftest*
16338   ol_cv_have_sys_errlist=no
16339 fi
16340 rm -f conftest*
16341 fi
16342
16343 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16344 fi
16345 if test $ol_cv_have_sys_errlist = yes ; then
16346         cat >> confdefs.h <<\EOF
16347 #define HAVE_SYS_ERRLIST 1
16348 EOF
16349
16350 fi
16351
16352
16353
16354 if test "$ol_enable_debug" != no ; then
16355         cat >> confdefs.h <<\EOF
16356 #define LDAP_DEBUG 1
16357 EOF
16358
16359 fi
16360 if test "$ol_enable_syslog" = yes ; then
16361         cat >> confdefs.h <<\EOF
16362 #define LDAP_SYSLOG 1
16363 EOF
16364
16365 fi
16366 if test "$ol_enable_cache" = no ; then
16367         cat >> confdefs.h <<\EOF
16368 #define LDAP_NOCACHE 1
16369 EOF
16370
16371 fi
16372 if test "$ol_link_kbind" != no ; then
16373         cat >> confdefs.h <<\EOF
16374 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16375 EOF
16376
16377 fi
16378 if test "$ol_enable_proctitle" != no ; then
16379         cat >> confdefs.h <<\EOF
16380 #define LDAP_PROCTITLE 1
16381 EOF
16382
16383 fi
16384 if test "$ol_enable_referrals" != no ; then
16385         cat >> confdefs.h <<\EOF
16386 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16387 EOF
16388
16389 fi
16390 if test "$ol_enable_local" != no; then
16391         cat >> confdefs.h <<\EOF
16392 #define LDAP_PF_LOCAL 1
16393 EOF
16394
16395 fi
16396 if test "$ol_link_ipv6" != no; then
16397         cat >> confdefs.h <<\EOF
16398 #define LDAP_PF_INET6 1
16399 EOF
16400
16401 fi
16402 if test "$ol_enable_cleartext" != no ; then
16403         cat >> confdefs.h <<\EOF
16404 #define SLAPD_CLEARTEXT 1
16405 EOF
16406
16407 fi
16408 if test "$ol_enable_crypt" != no ; then
16409         cat >> confdefs.h <<\EOF
16410 #define SLAPD_CRYPT 1
16411 EOF
16412
16413 fi
16414 if test "$ol_link_kpasswd" != no ; then
16415         cat >> confdefs.h <<\EOF
16416 #define SLAPD_KPASSWD 1
16417 EOF
16418
16419 fi
16420 if test "$ol_link_spasswd" != no ; then
16421         cat >> confdefs.h <<\EOF
16422 #define SLAPD_SPASSWD 1
16423 EOF
16424
16425 fi
16426 if test "$ol_enable_phonetic" != no ; then
16427         cat >> confdefs.h <<\EOF
16428 #define SLAPD_PHONETIC 1
16429 EOF
16430
16431 fi
16432 if test "$ol_enable_rlookups" != no ; then
16433         cat >> confdefs.h <<\EOF
16434 #define SLAPD_RLOOKUPS 1
16435 EOF
16436
16437 fi
16438 if test "$ol_enable_aci" != no ; then
16439         cat >> confdefs.h <<\EOF
16440 #define SLAPD_ACI_ENABLED 1
16441 EOF
16442
16443 fi
16444
16445 if test "$ol_link_modules" != no ; then
16446         cat >> confdefs.h <<\EOF
16447 #define SLAPD_MODULES 1
16448 EOF
16449
16450         BUILD_SLAPD=yes
16451         SLAPD_MODULES_LDFLAGS="-dlopen self"
16452 fi
16453
16454 if test "$ol_enable_bdb" != no ; then
16455         cat >> confdefs.h <<\EOF
16456 #define SLAPD_BDB 1
16457 EOF
16458
16459         BUILD_SLAPD=yes
16460         BUILD_BDB=yes
16461         if test "$ol_with_bdb_module" != static ; then
16462                 cat >> confdefs.h <<\EOF
16463 #define SLAPD_BDB_DYNAMIC 1
16464 EOF
16465
16466                 BUILD_BDB=mod
16467                 BUILD_BDB_DYNAMIC=shared
16468                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16469         fi
16470 fi
16471
16472 if test "$ol_link_dnssrv" != no ; then
16473         cat >> confdefs.h <<\EOF
16474 #define SLAPD_DNSSRV 1
16475 EOF
16476
16477         BUILD_SLAPD=yes
16478         BUILD_DNSSRV=yes
16479         if test "$ol_with_dnssrv_module" != static ; then
16480                 cat >> confdefs.h <<\EOF
16481 #define SLAPD_DNSSRV_DYNAMIC 1
16482 EOF
16483
16484                 BUILD_DNSSRV=mod
16485                 BUILD_DNSSRV_DYNAMIC=shared
16486                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16487         fi
16488 fi
16489
16490 if test "$ol_enable_ldap" != no ; then
16491         cat >> confdefs.h <<\EOF
16492 #define SLAPD_LDAP 1
16493 EOF
16494
16495         BUILD_SLAPD=yes
16496         BUILD_LDAP=yes
16497         if test "$ol_with_ldap_module" != static ; then
16498                 cat >> confdefs.h <<\EOF
16499 #define SLAPD_LDAP_DYNAMIC 1
16500 EOF
16501
16502                 BUILD_LDAP=mod
16503                 BUILD_LDAP_DYNAMIC=shared
16504                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16505         fi
16506 fi
16507
16508 if test "$ol_link_ldbm" != no ; then
16509         cat >> confdefs.h <<\EOF
16510 #define SLAPD_LDBM 1
16511 EOF
16512
16513         BUILD_SLAPD=yes
16514         BUILD_LDBM=yes
16515         if test "$ol_with_ldbm_module" != static ; then
16516                 cat >> confdefs.h <<\EOF
16517 #define SLAPD_LDBM_DYNAMIC 1
16518 EOF
16519
16520                 BUILD_LDBM=mod
16521                 BUILD_LDBM_DYNAMIC=shared
16522                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16523         fi
16524 fi
16525
16526 if test "$ol_enable_passwd" != no ; then
16527         cat >> confdefs.h <<\EOF
16528 #define SLAPD_PASSWD 1
16529 EOF
16530
16531         BUILD_SLAPD=yes
16532         BUILD_PASSWD=yes
16533         if test "$ol_with_passwd_module" != static ; then
16534                 cat >> confdefs.h <<\EOF
16535 #define SLAPD_PASSWD_DYNAMIC 1
16536 EOF
16537
16538                 BUILD_PASSWD=mod
16539                 BUILD_PASSWD_DYNAMIC=shared
16540                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16541         fi
16542 fi
16543
16544 if test "$ol_link_perl" != no ; then
16545         cat >> confdefs.h <<\EOF
16546 #define SLAPD_PERL 1
16547 EOF
16548
16549         BUILD_SLAPD=yes
16550         BUILD_PERL=yes
16551         if test "$ol_with_perl_module" != static ; then
16552                 cat >> confdefs.h <<\EOF
16553 #define SLAPD_PERL_DYNAMIC 1
16554 EOF
16555
16556                 BUILD_PERL=mod
16557                 BUILD_PERL_DYNAMIC=shared
16558                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16559         fi
16560 fi
16561
16562 if test "$ol_enable_shell" != no ; then
16563         cat >> confdefs.h <<\EOF
16564 #define SLAPD_SHELL 1
16565 EOF
16566
16567         BUILD_SLAPD=yes
16568         BUILD_SHELL=yes
16569         if test "$ol_with_shell_module" != static ; then
16570                 cat >> confdefs.h <<\EOF
16571 #define SLAPD_SHELL_DYNAMIC 1
16572 EOF
16573
16574                 BUILD_SHELL=mod
16575                 BUILD_SHELL_DYNAMIC=shared
16576                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16577         fi
16578 fi
16579
16580 if test "$ol_enable_tcl" != no ; then
16581         cat >> confdefs.h <<\EOF
16582 #define SLAPD_TCL 1
16583 EOF
16584
16585         BUILD_SLAPD=yes
16586         BUILD_TCL=yes
16587         if test "$ol_with_tcl_module" != static; then
16588                 cat >> confdefs.h <<\EOF
16589 #define SLAPD_TCL_DYNAMIC 1
16590 EOF
16591
16592                 BUILD_TCL=mod
16593                 BUILD_TCL_DYNAMIC=shared
16594                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16595         fi
16596 fi
16597
16598 if test "$ol_link_sql" != no ; then
16599         cat >> confdefs.h <<\EOF
16600 #define SLAPD_SQL 1
16601 EOF
16602
16603         BUILD_SLAPD=yes
16604         BUILD_SQL=yes
16605         if test "$ol_with_sql_module" != static; then
16606                 cat >> confdefs.h <<\EOF
16607 #define SLAPD_SQL_DYNAMIC 1
16608 EOF
16609
16610                 BUILD_SQL=mod
16611                 BUILD_SQL_DYNAMIC=shared
16612                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16613         fi
16614 fi
16615
16616 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16617         $BUILD_SLAPD = yes ; then
16618         BUILD_SLURPD=yes
16619 fi
16620
16621
16622 if test "$LINK_BINS_DYNAMIC" = yes; then
16623     LIB_LINKAGE=DYN
16624     LT_LIB_LINKAGE=shared
16625 else
16626     LIB_LINKAGE=STAT
16627     LT_LIB_LINKAGE=static
16628 fi
16629
16630 if test "$ac_cv_mingw32" = yes ; then
16631     PLAT=NT
16632     DYN_EXT=dll
16633 else
16634     PLAT=UNIX
16635     DYN_EXT=so
16636 fi
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646   
16647   
16648   
16649   
16650   
16651   
16652   
16653   
16654   
16655   
16656   
16657   
16658   
16659   
16660   
16661   
16662   
16663   
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701 trap '' 1 2 15
16702
16703 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16704
16705 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16706 # Let make expand exec_prefix.
16707 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16708
16709 # Any assignment to VPATH causes Sun make to only execute
16710 # the first set of double-colon rules, so remove it if not needed.
16711 # If there is a colon in the path, we need to keep it.
16712 if test "x$srcdir" = x.; then
16713   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16714 fi
16715
16716 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16717
16718 DEFS=-DHAVE_CONFIG_H
16719
16720 # Without the "./", some shells look in PATH for config.status.
16721 : ${CONFIG_STATUS=./config.status}
16722
16723 echo creating $CONFIG_STATUS
16724 rm -f $CONFIG_STATUS
16725 cat > $CONFIG_STATUS <<EOF
16726 #! /bin/sh
16727 # Generated automatically by configure.
16728 # Run this file to recreate the current configuration.
16729 # This directory was configured as follows,
16730 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16731 #
16732 # $0 $ac_configure_args
16733 #
16734 # Compiler output produced by configure, useful for debugging
16735 # configure, is in ./config.log if it exists.
16736
16737 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16738 for ac_option
16739 do
16740   case "\$ac_option" in
16741   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16742     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16743     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16744   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16745     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16746     exit 0 ;;
16747   -help | --help | --hel | --he | --h)
16748     echo "\$ac_cs_usage"; exit 0 ;;
16749   *) echo "\$ac_cs_usage"; exit 1 ;;
16750   esac
16751 done
16752
16753 ac_given_srcdir=$srcdir
16754 ac_given_INSTALL="$INSTALL"
16755
16756 trap 'rm -fr `echo "\
16757 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16758 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16759 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16760 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16761 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16762 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16763 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16764 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16765 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16766 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16767 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16768 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16769 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16770 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16771 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16772 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16773 include/Makefile:build/top.mk:include/Makefile.in \
16774 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16775 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16776 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16777 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16778 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16779 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16780 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16781 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16782 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16783 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16784 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16785 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16786 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16787 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16788 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16789 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16790 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16791 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16792 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16793 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16794 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16795 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16796 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16797 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16798 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16799 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16800 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16801 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16802  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16803 EOF
16804 cat >> $CONFIG_STATUS <<EOF
16805
16806 # Protect against being on the right side of a sed subst in config.status.
16807 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16808  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16809 $ac_vpsub
16810 $extrasub
16811 s%@SHELL@%$SHELL%g
16812 s%@CFLAGS@%$CFLAGS%g
16813 s%@CPPFLAGS@%$CPPFLAGS%g
16814 s%@CXXFLAGS@%$CXXFLAGS%g
16815 s%@FFLAGS@%$FFLAGS%g
16816 s%@DEFS@%$DEFS%g
16817 s%@LDFLAGS@%$LDFLAGS%g
16818 s%@LIBS@%$LIBS%g
16819 s%@exec_prefix@%$exec_prefix%g
16820 s%@prefix@%$prefix%g
16821 s%@program_transform_name@%$program_transform_name%g
16822 s%@bindir@%$bindir%g
16823 s%@sbindir@%$sbindir%g
16824 s%@libexecdir@%$libexecdir%g
16825 s%@datadir@%$datadir%g
16826 s%@sysconfdir@%$sysconfdir%g
16827 s%@sharedstatedir@%$sharedstatedir%g
16828 s%@localstatedir@%$localstatedir%g
16829 s%@libdir@%$libdir%g
16830 s%@includedir@%$includedir%g
16831 s%@oldincludedir@%$oldincludedir%g
16832 s%@infodir@%$infodir%g
16833 s%@mandir@%$mandir%g
16834 s%@host@%$host%g
16835 s%@host_alias@%$host_alias%g
16836 s%@host_cpu@%$host_cpu%g
16837 s%@host_vendor@%$host_vendor%g
16838 s%@host_os@%$host_os%g
16839 s%@target@%$target%g
16840 s%@target_alias@%$target_alias%g
16841 s%@target_cpu@%$target_cpu%g
16842 s%@target_vendor@%$target_vendor%g
16843 s%@target_os@%$target_os%g
16844 s%@build@%$build%g
16845 s%@build_alias@%$build_alias%g
16846 s%@build_cpu@%$build_cpu%g
16847 s%@build_vendor@%$build_vendor%g
16848 s%@build_os@%$build_os%g
16849 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16850 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16851 s%@INSTALL_DATA@%$INSTALL_DATA%g
16852 s%@PACKAGE@%$PACKAGE%g
16853 s%@VERSION@%$VERSION%g
16854 s%@ACLOCAL@%$ACLOCAL%g
16855 s%@AUTOCONF@%$AUTOCONF%g
16856 s%@AUTOMAKE@%$AUTOMAKE%g
16857 s%@AUTOHEADER@%$AUTOHEADER%g
16858 s%@MAKEINFO@%$MAKEINFO%g
16859 s%@install_sh@%$install_sh%g
16860 s%@AMTAR@%$AMTAR%g
16861 s%@AWK@%$AWK%g
16862 s%@AMTARFLAGS@%$AMTARFLAGS%g
16863 s%@SET_MAKE@%$SET_MAKE%g
16864 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16865 s%@top_builddir@%$top_builddir%g
16866 s%@ldap_subdir@%$ldap_subdir%g
16867 s%@CC@%$CC%g
16868 s%@RANLIB@%$RANLIB%g
16869 s%@LN_S@%$LN_S%g
16870 s%@DLLTOOL@%$DLLTOOL%g
16871 s%@AS@%$AS%g
16872 s%@OBJDUMP@%$OBJDUMP%g
16873 s%@LIBTOOL@%$LIBTOOL%g
16874 s%@LN_H@%$LN_H%g
16875 s%@SENDMAIL@%$SENDMAIL%g
16876 s%@EDITOR@%$EDITOR%g
16877 s%@FINGER@%$FINGER%g
16878 s%@PERLBIN@%$PERLBIN%g
16879 s%@CPP@%$CPP%g
16880 s%@EXEEXT@%$EXEEXT%g
16881 s%@OBJEXT@%$OBJEXT%g
16882 s%@OL_MKDEP@%$OL_MKDEP%g
16883 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16884 s%@LIBOBJS@%$LIBOBJS%g
16885 s%@LIBSRCS@%$LIBSRCS%g
16886 s%@PLAT@%$PLAT%g
16887 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16888 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16889 s%@DYN_EXT@%$DYN_EXT%g
16890 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16891 s%@BUILD_BDB@%$BUILD_BDB%g
16892 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16893 s%@BUILD_LDAP@%$BUILD_LDAP%g
16894 s%@BUILD_LDBM@%$BUILD_LDBM%g
16895 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16896 s%@BUILD_PERL@%$BUILD_PERL%g
16897 s%@BUILD_SHELL@%$BUILD_SHELL%g
16898 s%@BUILD_SQL@%$BUILD_SQL%g
16899 s%@BUILD_TCL@%$BUILD_TCL%g
16900 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16901 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16902 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16903 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16904 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16905 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16906 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16907 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16908 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16909 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16910 s%@LDAP_LIBS@%$LDAP_LIBS%g
16911 s%@LDIF_LIBS@%$LDIF_LIBS%g
16912 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16913 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16914 s%@LDBM_LIBS@%$LDBM_LIBS%g
16915 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16916 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16917 s%@WRAP_LIBS@%$WRAP_LIBS%g
16918 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16919 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16920 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16921 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16922 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16923 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16924 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16925 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16926 s%@KRB4_LIBS@%$KRB4_LIBS%g
16927 s%@KRB5_LIBS@%$KRB5_LIBS%g
16928 s%@READLINE_LIBS@%$READLINE_LIBS%g
16929 s%@SASL_LIBS@%$SASL_LIBS%g
16930 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16931 s%@TLS_LIBS@%$TLS_LIBS%g
16932 s%@MODULES_LIBS@%$MODULES_LIBS%g
16933 s%@AUTH_LIBS@%$AUTH_LIBS%g
16934 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
16935 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16936 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16937 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16938
16939 CEOF
16940 EOF
16941
16942 cat >> $CONFIG_STATUS <<\EOF
16943
16944 # Split the substitutions into bite-sized pieces for seds with
16945 # small command number limits, like on Digital OSF/1 and HP-UX.
16946 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16947 ac_file=1 # Number of current file.
16948 ac_beg=1 # First line for current file.
16949 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16950 ac_more_lines=:
16951 ac_sed_cmds=""
16952 while $ac_more_lines; do
16953   if test $ac_beg -gt 1; then
16954     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16955   else
16956     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16957   fi
16958   if test ! -s conftest.s$ac_file; then
16959     ac_more_lines=false
16960     rm -f conftest.s$ac_file
16961   else
16962     if test -z "$ac_sed_cmds"; then
16963       ac_sed_cmds="sed -f conftest.s$ac_file"
16964     else
16965       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16966     fi
16967     ac_file=`expr $ac_file + 1`
16968     ac_beg=$ac_end
16969     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16970   fi
16971 done
16972 if test -z "$ac_sed_cmds"; then
16973   ac_sed_cmds=cat
16974 fi
16975 EOF
16976
16977 cat >> $CONFIG_STATUS <<EOF
16978
16979 CONFIG_FILES=\${CONFIG_FILES-"\
16980 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16981 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16982 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16983 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16984 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16985 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16986 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16987 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16988 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16989 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16990 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16991 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16992 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16993 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16994 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16995 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16996 include/Makefile:build/top.mk:include/Makefile.in \
16997 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16998 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16999 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17000 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17001 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
17002 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
17003 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
17004 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
17005 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
17006 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17007 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17008 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
17009 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17010 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17011 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17012 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17013 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
17014 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17015 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17016 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
17017 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17018 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17019 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17020 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17021 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17022 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17023 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17024 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
17025 "}
17026 EOF
17027 cat >> $CONFIG_STATUS <<\EOF
17028 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
17029   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17030   case "$ac_file" in
17031   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17032        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17033   *) ac_file_in="${ac_file}.in" ;;
17034   esac
17035
17036   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
17037
17038   # Remove last slash and all that follows it.  Not all systems have dirname.
17039   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17040   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17041     # The file is in a subdirectory.
17042     test ! -d "$ac_dir" && mkdir "$ac_dir"
17043     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
17044     # A "../" for each directory in $ac_dir_suffix.
17045     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
17046   else
17047     ac_dir_suffix= ac_dots=
17048   fi
17049
17050   case "$ac_given_srcdir" in
17051   .)  srcdir=.
17052       if test -z "$ac_dots"; then top_srcdir=.
17053       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
17054   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
17055   *) # Relative path.
17056     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
17057     top_srcdir="$ac_dots$ac_given_srcdir" ;;
17058   esac
17059
17060   case "$ac_given_INSTALL" in
17061   [/$]*) INSTALL="$ac_given_INSTALL" ;;
17062   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
17063   esac
17064
17065   echo creating "$ac_file"
17066   rm -f "$ac_file"
17067   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
17068   case "$ac_file" in
17069   *[Mm]akefile*) ac_comsub="1i\\
17070 # $configure_input" ;;
17071   *) ac_comsub= ;;
17072   esac
17073
17074   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17075   sed -e "$ac_comsub
17076 s%@configure_input@%$configure_input%g
17077 s%@srcdir@%$srcdir%g
17078 s%@top_srcdir@%$top_srcdir%g
17079 s%@INSTALL@%$INSTALL%g
17080 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
17081 fi; done
17082 rm -f conftest.s*
17083
17084 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17085 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17086 #
17087 # ac_d sets the value in "#define NAME VALUE" lines.
17088 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17089 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
17090 ac_dC='\3'
17091 ac_dD='%g'
17092 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17093 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17094 ac_uB='\([      ]\)%\1#\2define\3'
17095 ac_uC=' '
17096 ac_uD='\4%g'
17097 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17098 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17099 ac_eB='$%\1#\2define\3'
17100 ac_eC=' '
17101 ac_eD='%g'
17102
17103 if test "${CONFIG_HEADERS+set}" != set; then
17104 EOF
17105 cat >> $CONFIG_STATUS <<EOF
17106   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
17107 EOF
17108 cat >> $CONFIG_STATUS <<\EOF
17109 fi
17110 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17111   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17112   case "$ac_file" in
17113   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17114        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17115   *) ac_file_in="${ac_file}.in" ;;
17116   esac
17117
17118   echo creating $ac_file
17119
17120   rm -f conftest.frag conftest.in conftest.out
17121   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17122   cat $ac_file_inputs > conftest.in
17123
17124 EOF
17125
17126 # Transform confdefs.h into a sed script conftest.vals that substitutes
17127 # the proper values into config.h.in to produce config.h.  And first:
17128 # Protect against being on the right side of a sed subst in config.status.
17129 # Protect against being in an unquoted here document in config.status.
17130 rm -f conftest.vals
17131 cat > conftest.hdr <<\EOF
17132 s/[\\&%]/\\&/g
17133 s%[\\$`]%\\&%g
17134 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17135 s%ac_d%ac_u%gp
17136 s%ac_u%ac_e%gp
17137 EOF
17138 sed -n -f conftest.hdr confdefs.h > conftest.vals
17139 rm -f conftest.hdr
17140
17141 # This sed command replaces #undef with comments.  This is necessary, for
17142 # example, in the case of _POSIX_SOURCE, which is predefined and required
17143 # on some systems where configure will not decide to define it.
17144 cat >> conftest.vals <<\EOF
17145 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17146 EOF
17147
17148 # Break up conftest.vals because some shells have a limit on
17149 # the size of here documents, and old seds have small limits too.
17150
17151 rm -f conftest.tail
17152 while :
17153 do
17154   ac_lines=`grep -c . conftest.vals`
17155   # grep -c gives empty output for an empty file on some AIX systems.
17156   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17157   # Write a limited-size here document to conftest.frag.
17158   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17159   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17160   echo 'CEOF
17161   sed -f conftest.frag conftest.in > conftest.out
17162   rm -f conftest.in
17163   mv conftest.out conftest.in
17164 ' >> $CONFIG_STATUS
17165   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17166   rm -f conftest.vals
17167   mv conftest.tail conftest.vals
17168 done
17169 rm -f conftest.vals
17170
17171 cat >> $CONFIG_STATUS <<\EOF
17172   rm -f conftest.frag conftest.h
17173   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17174   cat conftest.in >> conftest.h
17175   rm -f conftest.in
17176   if cmp -s $ac_file conftest.h 2>/dev/null; then
17177     echo "$ac_file is unchanged"
17178     rm -f conftest.h
17179   else
17180     # Remove last slash and all that follows it.  Not all systems have dirname.
17181       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17182       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17183       # The file is in a subdirectory.
17184       test ! -d "$ac_dir" && mkdir "$ac_dir"
17185     fi
17186     rm -f $ac_file
17187     mv conftest.h $ac_file
17188   fi
17189 fi; done
17190
17191 EOF
17192 cat >> $CONFIG_STATUS <<EOF
17193
17194 EOF
17195 cat >> $CONFIG_STATUS <<\EOF
17196
17197 date > stamp-h
17198 echo Please \"make depend\" to build dependencies
17199
17200 exit 0
17201 EOF
17202 chmod +x $CONFIG_STATUS
17203 rm -fr confdefs* $ac_clean_files
17204 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
17205