]> git.sur5r.net Git - openldap/blob - configure
Add ITS#876 nisSchema
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.353 2001/05/03 03:53:37 kurt Exp  
4
5 # Copyright 1998-2001 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-2001 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 _beginthread""... $ac_c" 1>&6
7127 echo "configure:7128: checking for _beginthread" >&5
7128 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7129   echo $ac_n "(cached) $ac_c" 1>&6
7130 else
7131   cat > conftest.$ac_ext <<EOF
7132 #line 7133 "configure"
7133 #include "confdefs.h"
7134 /* System header to define __stub macros and hopefully few prototypes,
7135     which can conflict with char _beginthread(); below.  */
7136 #include <assert.h>
7137 /* Override any gcc2 internal prototype to avoid an error.  */
7138 /* We use char because int might match the return type of a gcc2
7139     builtin and then its argument prototype would still apply.  */
7140 char _beginthread();
7141 char (*f)();
7142
7143 int main() {
7144
7145 /* The GNU C library defines this for functions which it implements
7146     to always fail with ENOSYS.  Some functions are actually named
7147     something starting with __ and the normal name is an alias.  */
7148 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7149 choke me
7150 #else
7151 f = _beginthread;
7152 #endif
7153
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_func__beginthread=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_func__beginthread=no"
7164 fi
7165 rm -f conftest*
7166 fi
7167
7168 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7169   echo "$ac_t""yes" 1>&6
7170   :
7171 else
7172   echo "$ac_t""no" 1>&6
7173 fi
7174
7175
7176         if test $ac_cv_func__beginthread = yes ; then
7177                 cat >> confdefs.h <<\EOF
7178 #define HAVE_NT_THREADS 1
7179 EOF
7180
7181         fi
7182
7183
7184         if test "$ol_cv_nt_threads" = yes ; then
7185         ol_link_threads=nt
7186         ol_with_threads=found
7187         ol_with_yielding_select=yes
7188
7189                 cat >> confdefs.h <<\EOF
7190 #define HAVE_NT_SERVICE_MANAGER 1
7191 EOF
7192
7193                 cat >> confdefs.h <<\EOF
7194 #define HAVE_NT_EVENT_LOG 1
7195 EOF
7196
7197         fi
7198
7199         if test $ol_with_threads = nt ; then
7200                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7201         fi
7202 fi
7203
7204 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7205         -o $ol_with_threads = posix ; then
7206
7207         for ac_hdr in pthread.h
7208 do
7209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7211 echo "configure:7212: checking for $ac_hdr" >&5
7212 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7213   echo $ac_n "(cached) $ac_c" 1>&6
7214 else
7215   cat > conftest.$ac_ext <<EOF
7216 #line 7217 "configure"
7217 #include "confdefs.h"
7218 #include <$ac_hdr>
7219 EOF
7220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7221 { (eval echo configure:7222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7223 if test -z "$ac_err"; then
7224   rm -rf conftest*
7225   eval "ac_cv_header_$ac_safe=yes"
7226 else
7227   echo "$ac_err" >&5
7228   echo "configure: failed program was:" >&5
7229   cat conftest.$ac_ext >&5
7230   rm -rf conftest*
7231   eval "ac_cv_header_$ac_safe=no"
7232 fi
7233 rm -f conftest*
7234 fi
7235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7236   echo "$ac_t""yes" 1>&6
7237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7238   cat >> confdefs.h <<EOF
7239 #define $ac_tr_hdr 1
7240 EOF
7241  
7242 else
7243   echo "$ac_t""no" 1>&6
7244 fi
7245 done
7246
7247
7248         if test $ac_cv_header_pthread_h = yes ; then
7249                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7250 echo "configure:7251: checking POSIX thread version" >&5
7251 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7252   echo $ac_n "(cached) $ac_c" 1>&6
7253 else
7254   
7255         cat > conftest.$ac_ext <<EOF
7256 #line 7257 "configure"
7257 #include "confdefs.h"
7258
7259 #               include <pthread.h>
7260                 /* this check could be improved */
7261 #               ifdef PTHREAD_ONCE_INIT
7262                         pthread_version_final;
7263 #               endif
7264         
7265 EOF
7266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7267   egrep "pthread_version_final" >/dev/null 2>&1; then
7268   rm -rf conftest*
7269   ol_pthread_final=yes
7270 else
7271   rm -rf conftest*
7272   ol_pthread_final=no
7273 fi
7274 rm -f conftest*
7275
7276
7277         cat > conftest.$ac_ext <<EOF
7278 #line 7279 "configure"
7279 #include "confdefs.h"
7280
7281 #               include <pthread.h>
7282                 /* this check could be improved */
7283 #               ifdef pthread_once_init
7284                         pthread_version_draft4;
7285 #               endif
7286         
7287 EOF
7288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7289   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7290   rm -rf conftest*
7291   ol_pthread_draft4=yes
7292 else
7293   rm -rf conftest*
7294   ol_pthread_draft4=no
7295 fi
7296 rm -f conftest*
7297
7298
7299         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7300                 ol_cv_pthread_version=final
7301         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7302                 ol_cv_pthread_version=draft4
7303         else
7304                 ol_cv_pthread_version=unknown
7305         fi
7306
7307 fi
7308
7309 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7310
7311
7312                 if test $ol_cv_pthread_version = final ; then
7313                         cat >> confdefs.h <<\EOF
7314 #define HAVE_PTHREADS_FINAL 1
7315 EOF
7316
7317                 elif test $ol_cv_pthread_version = draft4 ; then
7318                         cat >> confdefs.h <<\EOF
7319 #define HAVE_PTHREADS_D4 1
7320 EOF
7321
7322                 else
7323                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7324                 fi
7325
7326                 # consider threads found
7327                 ol_with_threads=found
7328
7329                 
7330         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7331 echo "configure:7332: checking for LinuxThreads pthread.h" >&5
7332 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7333   echo $ac_n "(cached) $ac_c" 1>&6
7334 else
7335   cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 #include <pthread.h>
7339 EOF
7340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7341   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7342   rm -rf conftest*
7343   ol_cv_header_linux_threads=yes
7344 else
7345   rm -rf conftest*
7346   ol_cv_header_linux_threads=no
7347 fi
7348 rm -f conftest*
7349
7350                 
7351 fi
7352
7353 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7354         if test $ol_cv_header_linux_threads = yes; then
7355                 cat >> confdefs.h <<\EOF
7356 #define HAVE_LINUX_THREADS 1
7357 EOF
7358
7359         fi
7360
7361                 
7362         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7363 echo "configure:7364: checking for GNU Pth pthread.h" >&5
7364 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7365   echo $ac_n "(cached) $ac_c" 1>&6
7366 else
7367   cat > conftest.$ac_ext <<EOF
7368 #line 7369 "configure"
7369 #include "confdefs.h"
7370 #include <pthread.h>
7371 #ifdef _POSIX_THREAD_IS_GNU_PTH
7372         __gnu_pth__;
7373 #endif
7374
7375 EOF
7376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7377   egrep "__gnu_pth__" >/dev/null 2>&1; then
7378   rm -rf conftest*
7379   ol_cv_header_gnu_pth_pthread_h=yes
7380 else
7381   rm -rf conftest*
7382   ol_cv_header_gnu_pth_pthread_h=no
7383 fi
7384 rm -f conftest*
7385
7386                 
7387 fi
7388
7389 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7390
7391
7392                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7393                         for ac_hdr in sched.h
7394 do
7395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397 echo "configure:7398: checking for $ac_hdr" >&5
7398 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7399   echo $ac_n "(cached) $ac_c" 1>&6
7400 else
7401   cat > conftest.$ac_ext <<EOF
7402 #line 7403 "configure"
7403 #include "confdefs.h"
7404 #include <$ac_hdr>
7405 EOF
7406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7407 { (eval echo configure:7408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7409 if test -z "$ac_err"; then
7410   rm -rf conftest*
7411   eval "ac_cv_header_$ac_safe=yes"
7412 else
7413   echo "$ac_err" >&5
7414   echo "configure: failed program was:" >&5
7415   cat conftest.$ac_ext >&5
7416   rm -rf conftest*
7417   eval "ac_cv_header_$ac_safe=no"
7418 fi
7419 rm -f conftest*
7420 fi
7421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7422   echo "$ac_t""yes" 1>&6
7423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7424   cat >> confdefs.h <<EOF
7425 #define $ac_tr_hdr 1
7426 EOF
7427  
7428 else
7429   echo "$ac_t""no" 1>&6
7430 fi
7431 done
7432
7433                 fi
7434
7435                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7436                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7437 echo "configure:7438: checking for pthread_create in default libraries" >&5
7438 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7439   echo $ac_n "(cached) $ac_c" 1>&6
7440 else
7441   
7442                 if test "$cross_compiling" = yes; then
7443   cat > conftest.$ac_ext <<EOF
7444 #line 7445 "configure"
7445 #include "confdefs.h"
7446 /* pthread test headers */
7447 #include <pthread.h>
7448 #ifndef NULL
7449 #define NULL (void*)0
7450 #endif
7451
7452 static void *task(p)
7453         void *p;
7454 {
7455         return (void *) (p == NULL);
7456 }
7457
7458 int main() {
7459
7460         /* pthread test function */
7461         pthread_t t;
7462         int status;
7463 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7464         /* This system (e.g. AIX) defaults detached; must override */
7465         pthread_attr_t attr;
7466
7467         status = pthread_attr_init(&attr);
7468         if( status ) exit( status );
7469
7470         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7471         if( status ) exit( status );
7472
7473 #       define  ATTR    &attr
7474 #elif defined( HAVE_PTHREADS_D4 )
7475 #       define  ATTR    pthread_attr_default
7476 #else
7477 #       define  ATTR    NULL
7478 #endif
7479
7480         /* make sure pthread_create() isn't just a stub */
7481         status = pthread_create(&t, ATTR, task, NULL);
7482         if( status ) exit( status );
7483
7484         /* give the thread a chance to complete...
7485      * it should remain joinable and hence detachable
7486          */
7487         sleep( 1 );
7488
7489         /* make sure pthread_detach() isn't just a stub */
7490 #if HAVE_PTHREADS_D4
7491         status = pthread_detach( &t );
7492 #else
7493         status = pthread_detach( t );
7494 #endif
7495
7496 #ifdef HAVE_LINUX_THREADS
7497         pthread_kill_other_threads_np();
7498 #endif
7499
7500         exit( status );
7501
7502 ; return 0; }
7503 EOF
7504 if { (eval echo configure:7505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7505   rm -rf conftest*
7506   ol_cv_pthread_create=yes
7507 else
7508   echo "configure: failed program was:" >&5
7509   cat conftest.$ac_ext >&5
7510   rm -rf conftest*
7511   ol_cv_pthread_create=no
7512 fi
7513 rm -f conftest*
7514 else
7515   cat > conftest.$ac_ext <<EOF
7516 #line 7517 "configure"
7517 #include "confdefs.h"
7518 /* pthread test headers */
7519 #include <pthread.h>
7520 #ifndef NULL
7521 #define NULL (void*)0
7522 #endif
7523
7524 static void *task(p)
7525         void *p;
7526 {
7527         return (void *) (p == NULL);
7528 }
7529
7530
7531 int main(argc, argv)
7532         int argc;
7533         char **argv;
7534 {
7535
7536         /* pthread test function */
7537         pthread_t t;
7538         int status;
7539 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7540         /* This system (e.g. AIX) defaults detached; must override */
7541         pthread_attr_t attr;
7542
7543         status = pthread_attr_init(&attr);
7544         if( status ) exit( status );
7545
7546         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7547         if( status ) exit( status );
7548
7549 #       define  ATTR    &attr
7550 #elif defined( HAVE_PTHREADS_D4 )
7551 #       define  ATTR    pthread_attr_default
7552 #else
7553 #       define  ATTR    NULL
7554 #endif
7555
7556         /* make sure pthread_create() isn't just a stub */
7557         status = pthread_create(&t, ATTR, task, NULL);
7558         if( status ) exit( status );
7559
7560         /* give the thread a chance to complete...
7561      * it should remain joinable and hence detachable
7562          */
7563         sleep( 1 );
7564
7565         /* make sure pthread_detach() isn't just a stub */
7566 #if HAVE_PTHREADS_D4
7567         status = pthread_detach( &t );
7568 #else
7569         status = pthread_detach( t );
7570 #endif
7571
7572 #ifdef HAVE_LINUX_THREADS
7573         pthread_kill_other_threads_np();
7574 #endif
7575
7576         exit( status );
7577
7578 }
7579
7580 EOF
7581 if { (eval echo configure:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7582 then
7583   ol_cv_pthread_create=yes
7584 else
7585   echo "configure: failed program was:" >&5
7586   cat conftest.$ac_ext >&5
7587   rm -fr conftest*
7588   ol_cv_pthread_create=no
7589 fi
7590 rm -fr conftest*
7591 fi
7592
7593 fi
7594
7595 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7596
7597                 if test $ol_cv_pthread_create != no ; then
7598                         ol_link_threads=posix
7599                         ol_link_pthreads=""
7600                 fi
7601                 
7602                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7603 if test "$ol_link_threads" = no ; then
7604         # try -kthread
7605         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7606 echo "configure:7607: checking for pthread link with -kthread" >&5
7607 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7608   echo $ac_n "(cached) $ac_c" 1>&6
7609 else
7610   
7611                 # save the flags
7612                 ol_LIBS="$LIBS"
7613                 LIBS="-kthread $LIBS"
7614
7615                 if test "$cross_compiling" = yes; then
7616   cat > conftest.$ac_ext <<EOF
7617 #line 7618 "configure"
7618 #include "confdefs.h"
7619 /* pthread test headers */
7620 #include <pthread.h>
7621 #ifndef NULL
7622 #define NULL (void*)0
7623 #endif
7624
7625 static void *task(p)
7626         void *p;
7627 {
7628         return (void *) (p == NULL);
7629 }
7630
7631 int main() {
7632
7633         /* pthread test function */
7634         pthread_t t;
7635         int status;
7636 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7637         /* This system (e.g. AIX) defaults detached; must override */
7638         pthread_attr_t attr;
7639
7640         status = pthread_attr_init(&attr);
7641         if( status ) exit( status );
7642
7643         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7644         if( status ) exit( status );
7645
7646 #       define  ATTR    &attr
7647 #elif defined( HAVE_PTHREADS_D4 )
7648 #       define  ATTR    pthread_attr_default
7649 #else
7650 #       define  ATTR    NULL
7651 #endif
7652
7653         /* make sure pthread_create() isn't just a stub */
7654         status = pthread_create(&t, ATTR, task, NULL);
7655         if( status ) exit( status );
7656
7657         /* give the thread a chance to complete...
7658      * it should remain joinable and hence detachable
7659          */
7660         sleep( 1 );
7661
7662         /* make sure pthread_detach() isn't just a stub */
7663 #if HAVE_PTHREADS_D4
7664         status = pthread_detach( &t );
7665 #else
7666         status = pthread_detach( t );
7667 #endif
7668
7669 #ifdef HAVE_LINUX_THREADS
7670         pthread_kill_other_threads_np();
7671 #endif
7672
7673         exit( status );
7674
7675 ; return 0; }
7676 EOF
7677 if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7678   rm -rf conftest*
7679   ol_cv_pthread_kthread=yes
7680 else
7681   echo "configure: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   rm -rf conftest*
7684   ol_cv_pthread_kthread=no
7685 fi
7686 rm -f conftest*
7687 else
7688   cat > conftest.$ac_ext <<EOF
7689 #line 7690 "configure"
7690 #include "confdefs.h"
7691 /* pthread test headers */
7692 #include <pthread.h>
7693 #ifndef NULL
7694 #define NULL (void*)0
7695 #endif
7696
7697 static void *task(p)
7698         void *p;
7699 {
7700         return (void *) (p == NULL);
7701 }
7702
7703
7704 int main(argc, argv)
7705         int argc;
7706         char **argv;
7707 {
7708
7709         /* pthread test function */
7710         pthread_t t;
7711         int status;
7712 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7713         /* This system (e.g. AIX) defaults detached; must override */
7714         pthread_attr_t attr;
7715
7716         status = pthread_attr_init(&attr);
7717         if( status ) exit( status );
7718
7719         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7720         if( status ) exit( status );
7721
7722 #       define  ATTR    &attr
7723 #elif defined( HAVE_PTHREADS_D4 )
7724 #       define  ATTR    pthread_attr_default
7725 #else
7726 #       define  ATTR    NULL
7727 #endif
7728
7729         /* make sure pthread_create() isn't just a stub */
7730         status = pthread_create(&t, ATTR, task, NULL);
7731         if( status ) exit( status );
7732
7733         /* give the thread a chance to complete...
7734      * it should remain joinable and hence detachable
7735          */
7736         sleep( 1 );
7737
7738         /* make sure pthread_detach() isn't just a stub */
7739 #if HAVE_PTHREADS_D4
7740         status = pthread_detach( &t );
7741 #else
7742         status = pthread_detach( t );
7743 #endif
7744
7745 #ifdef HAVE_LINUX_THREADS
7746         pthread_kill_other_threads_np();
7747 #endif
7748
7749         exit( status );
7750
7751 }
7752
7753 EOF
7754 if { (eval echo configure:7755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7755 then
7756   ol_cv_pthread_kthread=yes
7757 else
7758   echo "configure: failed program was:" >&5
7759   cat conftest.$ac_ext >&5
7760   rm -fr conftest*
7761   ol_cv_pthread_kthread=no
7762 fi
7763 rm -fr conftest*
7764 fi
7765
7766
7767                 # restore the LIBS
7768                 LIBS="$ol_LIBS"
7769         
7770 fi
7771
7772 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7773
7774         if test $ol_cv_pthread_kthread = yes ; then
7775                 ol_link_pthreads="-kthread"
7776                 ol_link_threads=posix
7777         fi
7778 fi
7779
7780                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7781 if test "$ol_link_threads" = no ; then
7782         # try -pthread
7783         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7784 echo "configure:7785: checking for pthread link with -pthread" >&5
7785 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7786   echo $ac_n "(cached) $ac_c" 1>&6
7787 else
7788   
7789                 # save the flags
7790                 ol_LIBS="$LIBS"
7791                 LIBS="-pthread $LIBS"
7792
7793                 if test "$cross_compiling" = yes; then
7794   cat > conftest.$ac_ext <<EOF
7795 #line 7796 "configure"
7796 #include "confdefs.h"
7797 /* pthread test headers */
7798 #include <pthread.h>
7799 #ifndef NULL
7800 #define NULL (void*)0
7801 #endif
7802
7803 static void *task(p)
7804         void *p;
7805 {
7806         return (void *) (p == NULL);
7807 }
7808
7809 int main() {
7810
7811         /* pthread test function */
7812         pthread_t t;
7813         int status;
7814 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7815         /* This system (e.g. AIX) defaults detached; must override */
7816         pthread_attr_t attr;
7817
7818         status = pthread_attr_init(&attr);
7819         if( status ) exit( status );
7820
7821         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7822         if( status ) exit( status );
7823
7824 #       define  ATTR    &attr
7825 #elif defined( HAVE_PTHREADS_D4 )
7826 #       define  ATTR    pthread_attr_default
7827 #else
7828 #       define  ATTR    NULL
7829 #endif
7830
7831         /* make sure pthread_create() isn't just a stub */
7832         status = pthread_create(&t, ATTR, task, NULL);
7833         if( status ) exit( status );
7834
7835         /* give the thread a chance to complete...
7836      * it should remain joinable and hence detachable
7837          */
7838         sleep( 1 );
7839
7840         /* make sure pthread_detach() isn't just a stub */
7841 #if HAVE_PTHREADS_D4
7842         status = pthread_detach( &t );
7843 #else
7844         status = pthread_detach( t );
7845 #endif
7846
7847 #ifdef HAVE_LINUX_THREADS
7848         pthread_kill_other_threads_np();
7849 #endif
7850
7851         exit( status );
7852
7853 ; return 0; }
7854 EOF
7855 if { (eval echo configure:7856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7856   rm -rf conftest*
7857   ol_cv_pthread_pthread=yes
7858 else
7859   echo "configure: failed program was:" >&5
7860   cat conftest.$ac_ext >&5
7861   rm -rf conftest*
7862   ol_cv_pthread_pthread=no
7863 fi
7864 rm -f conftest*
7865 else
7866   cat > conftest.$ac_ext <<EOF
7867 #line 7868 "configure"
7868 #include "confdefs.h"
7869 /* pthread test headers */
7870 #include <pthread.h>
7871 #ifndef NULL
7872 #define NULL (void*)0
7873 #endif
7874
7875 static void *task(p)
7876         void *p;
7877 {
7878         return (void *) (p == NULL);
7879 }
7880
7881
7882 int main(argc, argv)
7883         int argc;
7884         char **argv;
7885 {
7886
7887         /* pthread test function */
7888         pthread_t t;
7889         int status;
7890 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7891         /* This system (e.g. AIX) defaults detached; must override */
7892         pthread_attr_t attr;
7893
7894         status = pthread_attr_init(&attr);
7895         if( status ) exit( status );
7896
7897         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7898         if( status ) exit( status );
7899
7900 #       define  ATTR    &attr
7901 #elif defined( HAVE_PTHREADS_D4 )
7902 #       define  ATTR    pthread_attr_default
7903 #else
7904 #       define  ATTR    NULL
7905 #endif
7906
7907         /* make sure pthread_create() isn't just a stub */
7908         status = pthread_create(&t, ATTR, task, NULL);
7909         if( status ) exit( status );
7910
7911         /* give the thread a chance to complete...
7912      * it should remain joinable and hence detachable
7913          */
7914         sleep( 1 );
7915
7916         /* make sure pthread_detach() isn't just a stub */
7917 #if HAVE_PTHREADS_D4
7918         status = pthread_detach( &t );
7919 #else
7920         status = pthread_detach( t );
7921 #endif
7922
7923 #ifdef HAVE_LINUX_THREADS
7924         pthread_kill_other_threads_np();
7925 #endif
7926
7927         exit( status );
7928
7929 }
7930
7931 EOF
7932 if { (eval echo configure:7933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7933 then
7934   ol_cv_pthread_pthread=yes
7935 else
7936   echo "configure: failed program was:" >&5
7937   cat conftest.$ac_ext >&5
7938   rm -fr conftest*
7939   ol_cv_pthread_pthread=no
7940 fi
7941 rm -fr conftest*
7942 fi
7943
7944
7945                 # restore the LIBS
7946                 LIBS="$ol_LIBS"
7947         
7948 fi
7949
7950 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7951
7952         if test $ol_cv_pthread_pthread = yes ; then
7953                 ol_link_pthreads="-pthread"
7954                 ol_link_threads=posix
7955         fi
7956 fi
7957
7958                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7959 if test "$ol_link_threads" = no ; then
7960         # try -pthreads
7961         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7962 echo "configure:7963: checking for pthread link with -pthreads" >&5
7963 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7964   echo $ac_n "(cached) $ac_c" 1>&6
7965 else
7966   
7967                 # save the flags
7968                 ol_LIBS="$LIBS"
7969                 LIBS="-pthreads $LIBS"
7970
7971                 if test "$cross_compiling" = yes; then
7972   cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975 /* pthread test headers */
7976 #include <pthread.h>
7977 #ifndef NULL
7978 #define NULL (void*)0
7979 #endif
7980
7981 static void *task(p)
7982         void *p;
7983 {
7984         return (void *) (p == NULL);
7985 }
7986
7987 int main() {
7988
7989         /* pthread test function */
7990         pthread_t t;
7991         int status;
7992 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7993         /* This system (e.g. AIX) defaults detached; must override */
7994         pthread_attr_t attr;
7995
7996         status = pthread_attr_init(&attr);
7997         if( status ) exit( status );
7998
7999         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8000         if( status ) exit( status );
8001
8002 #       define  ATTR    &attr
8003 #elif defined( HAVE_PTHREADS_D4 )
8004 #       define  ATTR    pthread_attr_default
8005 #else
8006 #       define  ATTR    NULL
8007 #endif
8008
8009         /* make sure pthread_create() isn't just a stub */
8010         status = pthread_create(&t, ATTR, task, NULL);
8011         if( status ) exit( status );
8012
8013         /* give the thread a chance to complete...
8014      * it should remain joinable and hence detachable
8015          */
8016         sleep( 1 );
8017
8018         /* make sure pthread_detach() isn't just a stub */
8019 #if HAVE_PTHREADS_D4
8020         status = pthread_detach( &t );
8021 #else
8022         status = pthread_detach( t );
8023 #endif
8024
8025 #ifdef HAVE_LINUX_THREADS
8026         pthread_kill_other_threads_np();
8027 #endif
8028
8029         exit( status );
8030
8031 ; return 0; }
8032 EOF
8033 if { (eval echo configure:8034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8034   rm -rf conftest*
8035   ol_cv_pthread_pthreads=yes
8036 else
8037   echo "configure: failed program was:" >&5
8038   cat conftest.$ac_ext >&5
8039   rm -rf conftest*
8040   ol_cv_pthread_pthreads=no
8041 fi
8042 rm -f conftest*
8043 else
8044   cat > conftest.$ac_ext <<EOF
8045 #line 8046 "configure"
8046 #include "confdefs.h"
8047 /* pthread test headers */
8048 #include <pthread.h>
8049 #ifndef NULL
8050 #define NULL (void*)0
8051 #endif
8052
8053 static void *task(p)
8054         void *p;
8055 {
8056         return (void *) (p == NULL);
8057 }
8058
8059
8060 int main(argc, argv)
8061         int argc;
8062         char **argv;
8063 {
8064
8065         /* pthread test function */
8066         pthread_t t;
8067         int status;
8068 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8069         /* This system (e.g. AIX) defaults detached; must override */
8070         pthread_attr_t attr;
8071
8072         status = pthread_attr_init(&attr);
8073         if( status ) exit( status );
8074
8075         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8076         if( status ) exit( status );
8077
8078 #       define  ATTR    &attr
8079 #elif defined( HAVE_PTHREADS_D4 )
8080 #       define  ATTR    pthread_attr_default
8081 #else
8082 #       define  ATTR    NULL
8083 #endif
8084
8085         /* make sure pthread_create() isn't just a stub */
8086         status = pthread_create(&t, ATTR, task, NULL);
8087         if( status ) exit( status );
8088
8089         /* give the thread a chance to complete...
8090      * it should remain joinable and hence detachable
8091          */
8092         sleep( 1 );
8093
8094         /* make sure pthread_detach() isn't just a stub */
8095 #if HAVE_PTHREADS_D4
8096         status = pthread_detach( &t );
8097 #else
8098         status = pthread_detach( t );
8099 #endif
8100
8101 #ifdef HAVE_LINUX_THREADS
8102         pthread_kill_other_threads_np();
8103 #endif
8104
8105         exit( status );
8106
8107 }
8108
8109 EOF
8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8111 then
8112   ol_cv_pthread_pthreads=yes
8113 else
8114   echo "configure: failed program was:" >&5
8115   cat conftest.$ac_ext >&5
8116   rm -fr conftest*
8117   ol_cv_pthread_pthreads=no
8118 fi
8119 rm -fr conftest*
8120 fi
8121
8122
8123                 # restore the LIBS
8124                 LIBS="$ol_LIBS"
8125         
8126 fi
8127
8128 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8129
8130         if test $ol_cv_pthread_pthreads = yes ; then
8131                 ol_link_pthreads="-pthreads"
8132                 ol_link_threads=posix
8133         fi
8134 fi
8135
8136                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8137 if test "$ol_link_threads" = no ; then
8138         # try -mthreads
8139         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8140 echo "configure:8141: checking for pthread link with -mthreads" >&5
8141 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8142   echo $ac_n "(cached) $ac_c" 1>&6
8143 else
8144   
8145                 # save the flags
8146                 ol_LIBS="$LIBS"
8147                 LIBS="-mthreads $LIBS"
8148
8149                 if test "$cross_compiling" = yes; then
8150   cat > conftest.$ac_ext <<EOF
8151 #line 8152 "configure"
8152 #include "confdefs.h"
8153 /* pthread test headers */
8154 #include <pthread.h>
8155 #ifndef NULL
8156 #define NULL (void*)0
8157 #endif
8158
8159 static void *task(p)
8160         void *p;
8161 {
8162         return (void *) (p == NULL);
8163 }
8164
8165 int main() {
8166
8167         /* pthread test function */
8168         pthread_t t;
8169         int status;
8170 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8171         /* This system (e.g. AIX) defaults detached; must override */
8172         pthread_attr_t attr;
8173
8174         status = pthread_attr_init(&attr);
8175         if( status ) exit( status );
8176
8177         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8178         if( status ) exit( status );
8179
8180 #       define  ATTR    &attr
8181 #elif defined( HAVE_PTHREADS_D4 )
8182 #       define  ATTR    pthread_attr_default
8183 #else
8184 #       define  ATTR    NULL
8185 #endif
8186
8187         /* make sure pthread_create() isn't just a stub */
8188         status = pthread_create(&t, ATTR, task, NULL);
8189         if( status ) exit( status );
8190
8191         /* give the thread a chance to complete...
8192      * it should remain joinable and hence detachable
8193          */
8194         sleep( 1 );
8195
8196         /* make sure pthread_detach() isn't just a stub */
8197 #if HAVE_PTHREADS_D4
8198         status = pthread_detach( &t );
8199 #else
8200         status = pthread_detach( t );
8201 #endif
8202
8203 #ifdef HAVE_LINUX_THREADS
8204         pthread_kill_other_threads_np();
8205 #endif
8206
8207         exit( status );
8208
8209 ; return 0; }
8210 EOF
8211 if { (eval echo configure:8212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8212   rm -rf conftest*
8213   ol_cv_pthread_mthreads=yes
8214 else
8215   echo "configure: failed program was:" >&5
8216   cat conftest.$ac_ext >&5
8217   rm -rf conftest*
8218   ol_cv_pthread_mthreads=no
8219 fi
8220 rm -f conftest*
8221 else
8222   cat > conftest.$ac_ext <<EOF
8223 #line 8224 "configure"
8224 #include "confdefs.h"
8225 /* pthread test headers */
8226 #include <pthread.h>
8227 #ifndef NULL
8228 #define NULL (void*)0
8229 #endif
8230
8231 static void *task(p)
8232         void *p;
8233 {
8234         return (void *) (p == NULL);
8235 }
8236
8237
8238 int main(argc, argv)
8239         int argc;
8240         char **argv;
8241 {
8242
8243         /* pthread test function */
8244         pthread_t t;
8245         int status;
8246 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8247         /* This system (e.g. AIX) defaults detached; must override */
8248         pthread_attr_t attr;
8249
8250         status = pthread_attr_init(&attr);
8251         if( status ) exit( status );
8252
8253         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8254         if( status ) exit( status );
8255
8256 #       define  ATTR    &attr
8257 #elif defined( HAVE_PTHREADS_D4 )
8258 #       define  ATTR    pthread_attr_default
8259 #else
8260 #       define  ATTR    NULL
8261 #endif
8262
8263         /* make sure pthread_create() isn't just a stub */
8264         status = pthread_create(&t, ATTR, task, NULL);
8265         if( status ) exit( status );
8266
8267         /* give the thread a chance to complete...
8268      * it should remain joinable and hence detachable
8269          */
8270         sleep( 1 );
8271
8272         /* make sure pthread_detach() isn't just a stub */
8273 #if HAVE_PTHREADS_D4
8274         status = pthread_detach( &t );
8275 #else
8276         status = pthread_detach( t );
8277 #endif
8278
8279 #ifdef HAVE_LINUX_THREADS
8280         pthread_kill_other_threads_np();
8281 #endif
8282
8283         exit( status );
8284
8285 }
8286
8287 EOF
8288 if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8289 then
8290   ol_cv_pthread_mthreads=yes
8291 else
8292   echo "configure: failed program was:" >&5
8293   cat conftest.$ac_ext >&5
8294   rm -fr conftest*
8295   ol_cv_pthread_mthreads=no
8296 fi
8297 rm -fr conftest*
8298 fi
8299
8300
8301                 # restore the LIBS
8302                 LIBS="$ol_LIBS"
8303         
8304 fi
8305
8306 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8307
8308         if test $ol_cv_pthread_mthreads = yes ; then
8309                 ol_link_pthreads="-mthreads"
8310                 ol_link_threads=posix
8311         fi
8312 fi
8313
8314                 # Pthread try link: -thread (ol_cv_pthread_thread)
8315 if test "$ol_link_threads" = no ; then
8316         # try -thread
8317         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8318 echo "configure:8319: checking for pthread link with -thread" >&5
8319 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8320   echo $ac_n "(cached) $ac_c" 1>&6
8321 else
8322   
8323                 # save the flags
8324                 ol_LIBS="$LIBS"
8325                 LIBS="-thread $LIBS"
8326
8327                 if test "$cross_compiling" = yes; then
8328   cat > conftest.$ac_ext <<EOF
8329 #line 8330 "configure"
8330 #include "confdefs.h"
8331 /* pthread test headers */
8332 #include <pthread.h>
8333 #ifndef NULL
8334 #define NULL (void*)0
8335 #endif
8336
8337 static void *task(p)
8338         void *p;
8339 {
8340         return (void *) (p == NULL);
8341 }
8342
8343 int main() {
8344
8345         /* pthread test function */
8346         pthread_t t;
8347         int status;
8348 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8349         /* This system (e.g. AIX) defaults detached; must override */
8350         pthread_attr_t attr;
8351
8352         status = pthread_attr_init(&attr);
8353         if( status ) exit( status );
8354
8355         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8356         if( status ) exit( status );
8357
8358 #       define  ATTR    &attr
8359 #elif defined( HAVE_PTHREADS_D4 )
8360 #       define  ATTR    pthread_attr_default
8361 #else
8362 #       define  ATTR    NULL
8363 #endif
8364
8365         /* make sure pthread_create() isn't just a stub */
8366         status = pthread_create(&t, ATTR, task, NULL);
8367         if( status ) exit( status );
8368
8369         /* give the thread a chance to complete...
8370      * it should remain joinable and hence detachable
8371          */
8372         sleep( 1 );
8373
8374         /* make sure pthread_detach() isn't just a stub */
8375 #if HAVE_PTHREADS_D4
8376         status = pthread_detach( &t );
8377 #else
8378         status = pthread_detach( t );
8379 #endif
8380
8381 #ifdef HAVE_LINUX_THREADS
8382         pthread_kill_other_threads_np();
8383 #endif
8384
8385         exit( status );
8386
8387 ; return 0; }
8388 EOF
8389 if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8390   rm -rf conftest*
8391   ol_cv_pthread_thread=yes
8392 else
8393   echo "configure: failed program was:" >&5
8394   cat conftest.$ac_ext >&5
8395   rm -rf conftest*
8396   ol_cv_pthread_thread=no
8397 fi
8398 rm -f conftest*
8399 else
8400   cat > conftest.$ac_ext <<EOF
8401 #line 8402 "configure"
8402 #include "confdefs.h"
8403 /* pthread test headers */
8404 #include <pthread.h>
8405 #ifndef NULL
8406 #define NULL (void*)0
8407 #endif
8408
8409 static void *task(p)
8410         void *p;
8411 {
8412         return (void *) (p == NULL);
8413 }
8414
8415
8416 int main(argc, argv)
8417         int argc;
8418         char **argv;
8419 {
8420
8421         /* pthread test function */
8422         pthread_t t;
8423         int status;
8424 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8425         /* This system (e.g. AIX) defaults detached; must override */
8426         pthread_attr_t attr;
8427
8428         status = pthread_attr_init(&attr);
8429         if( status ) exit( status );
8430
8431         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8432         if( status ) exit( status );
8433
8434 #       define  ATTR    &attr
8435 #elif defined( HAVE_PTHREADS_D4 )
8436 #       define  ATTR    pthread_attr_default
8437 #else
8438 #       define  ATTR    NULL
8439 #endif
8440
8441         /* make sure pthread_create() isn't just a stub */
8442         status = pthread_create(&t, ATTR, task, NULL);
8443         if( status ) exit( status );
8444
8445         /* give the thread a chance to complete...
8446      * it should remain joinable and hence detachable
8447          */
8448         sleep( 1 );
8449
8450         /* make sure pthread_detach() isn't just a stub */
8451 #if HAVE_PTHREADS_D4
8452         status = pthread_detach( &t );
8453 #else
8454         status = pthread_detach( t );
8455 #endif
8456
8457 #ifdef HAVE_LINUX_THREADS
8458         pthread_kill_other_threads_np();
8459 #endif
8460
8461         exit( status );
8462
8463 }
8464
8465 EOF
8466 if { (eval echo configure:8467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8467 then
8468   ol_cv_pthread_thread=yes
8469 else
8470   echo "configure: failed program was:" >&5
8471   cat conftest.$ac_ext >&5
8472   rm -fr conftest*
8473   ol_cv_pthread_thread=no
8474 fi
8475 rm -fr conftest*
8476 fi
8477
8478
8479                 # restore the LIBS
8480                 LIBS="$ol_LIBS"
8481         
8482 fi
8483
8484 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8485
8486         if test $ol_cv_pthread_thread = yes ; then
8487                 ol_link_pthreads="-thread"
8488                 ol_link_threads=posix
8489         fi
8490 fi
8491
8492
8493                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8494 if test "$ol_link_threads" = no ; then
8495         # try -lpthread -lmach -lexc -lc_r
8496         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8497 echo "configure:8498: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8498 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8499   echo $ac_n "(cached) $ac_c" 1>&6
8500 else
8501   
8502                 # save the flags
8503                 ol_LIBS="$LIBS"
8504                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8505
8506                 if test "$cross_compiling" = yes; then
8507   cat > conftest.$ac_ext <<EOF
8508 #line 8509 "configure"
8509 #include "confdefs.h"
8510 /* pthread test headers */
8511 #include <pthread.h>
8512 #ifndef NULL
8513 #define NULL (void*)0
8514 #endif
8515
8516 static void *task(p)
8517         void *p;
8518 {
8519         return (void *) (p == NULL);
8520 }
8521
8522 int main() {
8523
8524         /* pthread test function */
8525         pthread_t t;
8526         int status;
8527 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8528         /* This system (e.g. AIX) defaults detached; must override */
8529         pthread_attr_t attr;
8530
8531         status = pthread_attr_init(&attr);
8532         if( status ) exit( status );
8533
8534         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8535         if( status ) exit( status );
8536
8537 #       define  ATTR    &attr
8538 #elif defined( HAVE_PTHREADS_D4 )
8539 #       define  ATTR    pthread_attr_default
8540 #else
8541 #       define  ATTR    NULL
8542 #endif
8543
8544         /* make sure pthread_create() isn't just a stub */
8545         status = pthread_create(&t, ATTR, task, NULL);
8546         if( status ) exit( status );
8547
8548         /* give the thread a chance to complete...
8549      * it should remain joinable and hence detachable
8550          */
8551         sleep( 1 );
8552
8553         /* make sure pthread_detach() isn't just a stub */
8554 #if HAVE_PTHREADS_D4
8555         status = pthread_detach( &t );
8556 #else
8557         status = pthread_detach( t );
8558 #endif
8559
8560 #ifdef HAVE_LINUX_THREADS
8561         pthread_kill_other_threads_np();
8562 #endif
8563
8564         exit( status );
8565
8566 ; return 0; }
8567 EOF
8568 if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8569   rm -rf conftest*
8570   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8571 else
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -rf conftest*
8575   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8576 fi
8577 rm -f conftest*
8578 else
8579   cat > conftest.$ac_ext <<EOF
8580 #line 8581 "configure"
8581 #include "confdefs.h"
8582 /* pthread test headers */
8583 #include <pthread.h>
8584 #ifndef NULL
8585 #define NULL (void*)0
8586 #endif
8587
8588 static void *task(p)
8589         void *p;
8590 {
8591         return (void *) (p == NULL);
8592 }
8593
8594
8595 int main(argc, argv)
8596         int argc;
8597         char **argv;
8598 {
8599
8600         /* pthread test function */
8601         pthread_t t;
8602         int status;
8603 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8604         /* This system (e.g. AIX) defaults detached; must override */
8605         pthread_attr_t attr;
8606
8607         status = pthread_attr_init(&attr);
8608         if( status ) exit( status );
8609
8610         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8611         if( status ) exit( status );
8612
8613 #       define  ATTR    &attr
8614 #elif defined( HAVE_PTHREADS_D4 )
8615 #       define  ATTR    pthread_attr_default
8616 #else
8617 #       define  ATTR    NULL
8618 #endif
8619
8620         /* make sure pthread_create() isn't just a stub */
8621         status = pthread_create(&t, ATTR, task, NULL);
8622         if( status ) exit( status );
8623
8624         /* give the thread a chance to complete...
8625      * it should remain joinable and hence detachable
8626          */
8627         sleep( 1 );
8628
8629         /* make sure pthread_detach() isn't just a stub */
8630 #if HAVE_PTHREADS_D4
8631         status = pthread_detach( &t );
8632 #else
8633         status = pthread_detach( t );
8634 #endif
8635
8636 #ifdef HAVE_LINUX_THREADS
8637         pthread_kill_other_threads_np();
8638 #endif
8639
8640         exit( status );
8641
8642 }
8643
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8646 then
8647   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -fr conftest*
8652   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8653 fi
8654 rm -fr conftest*
8655 fi
8656
8657
8658                 # restore the LIBS
8659                 LIBS="$ol_LIBS"
8660         
8661 fi
8662
8663 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8664
8665         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8666                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8667                 ol_link_threads=posix
8668         fi
8669 fi
8670
8671                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8672 if test "$ol_link_threads" = no ; then
8673         # try -lpthread -lmach -lexc
8674         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8675 echo "configure:8676: checking for pthread link with -lpthread -lmach -lexc" >&5
8676 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8677   echo $ac_n "(cached) $ac_c" 1>&6
8678 else
8679   
8680                 # save the flags
8681                 ol_LIBS="$LIBS"
8682                 LIBS="-lpthread -lmach -lexc $LIBS"
8683
8684                 if test "$cross_compiling" = yes; then
8685   cat > conftest.$ac_ext <<EOF
8686 #line 8687 "configure"
8687 #include "confdefs.h"
8688 /* pthread test headers */
8689 #include <pthread.h>
8690 #ifndef NULL
8691 #define NULL (void*)0
8692 #endif
8693
8694 static void *task(p)
8695         void *p;
8696 {
8697         return (void *) (p == NULL);
8698 }
8699
8700 int main() {
8701
8702         /* pthread test function */
8703         pthread_t t;
8704         int status;
8705 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8706         /* This system (e.g. AIX) defaults detached; must override */
8707         pthread_attr_t attr;
8708
8709         status = pthread_attr_init(&attr);
8710         if( status ) exit( status );
8711
8712         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8713         if( status ) exit( status );
8714
8715 #       define  ATTR    &attr
8716 #elif defined( HAVE_PTHREADS_D4 )
8717 #       define  ATTR    pthread_attr_default
8718 #else
8719 #       define  ATTR    NULL
8720 #endif
8721
8722         /* make sure pthread_create() isn't just a stub */
8723         status = pthread_create(&t, ATTR, task, NULL);
8724         if( status ) exit( status );
8725
8726         /* give the thread a chance to complete...
8727      * it should remain joinable and hence detachable
8728          */
8729         sleep( 1 );
8730
8731         /* make sure pthread_detach() isn't just a stub */
8732 #if HAVE_PTHREADS_D4
8733         status = pthread_detach( &t );
8734 #else
8735         status = pthread_detach( t );
8736 #endif
8737
8738 #ifdef HAVE_LINUX_THREADS
8739         pthread_kill_other_threads_np();
8740 #endif
8741
8742         exit( status );
8743
8744 ; return 0; }
8745 EOF
8746 if { (eval echo configure:8747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8747   rm -rf conftest*
8748   ol_cv_pthread_lpthread_lmach_lexc=yes
8749 else
8750   echo "configure: failed program was:" >&5
8751   cat conftest.$ac_ext >&5
8752   rm -rf conftest*
8753   ol_cv_pthread_lpthread_lmach_lexc=no
8754 fi
8755 rm -f conftest*
8756 else
8757   cat > conftest.$ac_ext <<EOF
8758 #line 8759 "configure"
8759 #include "confdefs.h"
8760 /* pthread test headers */
8761 #include <pthread.h>
8762 #ifndef NULL
8763 #define NULL (void*)0
8764 #endif
8765
8766 static void *task(p)
8767         void *p;
8768 {
8769         return (void *) (p == NULL);
8770 }
8771
8772
8773 int main(argc, argv)
8774         int argc;
8775         char **argv;
8776 {
8777
8778         /* pthread test function */
8779         pthread_t t;
8780         int status;
8781 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8782         /* This system (e.g. AIX) defaults detached; must override */
8783         pthread_attr_t attr;
8784
8785         status = pthread_attr_init(&attr);
8786         if( status ) exit( status );
8787
8788         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8789         if( status ) exit( status );
8790
8791 #       define  ATTR    &attr
8792 #elif defined( HAVE_PTHREADS_D4 )
8793 #       define  ATTR    pthread_attr_default
8794 #else
8795 #       define  ATTR    NULL
8796 #endif
8797
8798         /* make sure pthread_create() isn't just a stub */
8799         status = pthread_create(&t, ATTR, task, NULL);
8800         if( status ) exit( status );
8801
8802         /* give the thread a chance to complete...
8803      * it should remain joinable and hence detachable
8804          */
8805         sleep( 1 );
8806
8807         /* make sure pthread_detach() isn't just a stub */
8808 #if HAVE_PTHREADS_D4
8809         status = pthread_detach( &t );
8810 #else
8811         status = pthread_detach( t );
8812 #endif
8813
8814 #ifdef HAVE_LINUX_THREADS
8815         pthread_kill_other_threads_np();
8816 #endif
8817
8818         exit( status );
8819
8820 }
8821
8822 EOF
8823 if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8824 then
8825   ol_cv_pthread_lpthread_lmach_lexc=yes
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -fr conftest*
8830   ol_cv_pthread_lpthread_lmach_lexc=no
8831 fi
8832 rm -fr conftest*
8833 fi
8834
8835
8836                 # restore the LIBS
8837                 LIBS="$ol_LIBS"
8838         
8839 fi
8840
8841 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8842
8843         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8844                 ol_link_pthreads="-lpthread -lmach -lexc"
8845                 ol_link_threads=posix
8846         fi
8847 fi
8848
8849
8850                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8851 if test "$ol_link_threads" = no ; then
8852         # try -lpthread -Wl,-woff,85
8853         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8854 echo "configure:8855: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8855 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8856   echo $ac_n "(cached) $ac_c" 1>&6
8857 else
8858   
8859                 # save the flags
8860                 ol_LIBS="$LIBS"
8861                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8862
8863                 if test "$cross_compiling" = yes; then
8864   cat > conftest.$ac_ext <<EOF
8865 #line 8866 "configure"
8866 #include "confdefs.h"
8867 /* pthread test headers */
8868 #include <pthread.h>
8869 #ifndef NULL
8870 #define NULL (void*)0
8871 #endif
8872
8873 static void *task(p)
8874         void *p;
8875 {
8876         return (void *) (p == NULL);
8877 }
8878
8879 int main() {
8880
8881         /* pthread test function */
8882         pthread_t t;
8883         int status;
8884 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8885         /* This system (e.g. AIX) defaults detached; must override */
8886         pthread_attr_t attr;
8887
8888         status = pthread_attr_init(&attr);
8889         if( status ) exit( status );
8890
8891         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8892         if( status ) exit( status );
8893
8894 #       define  ATTR    &attr
8895 #elif defined( HAVE_PTHREADS_D4 )
8896 #       define  ATTR    pthread_attr_default
8897 #else
8898 #       define  ATTR    NULL
8899 #endif
8900
8901         /* make sure pthread_create() isn't just a stub */
8902         status = pthread_create(&t, ATTR, task, NULL);
8903         if( status ) exit( status );
8904
8905         /* give the thread a chance to complete...
8906      * it should remain joinable and hence detachable
8907          */
8908         sleep( 1 );
8909
8910         /* make sure pthread_detach() isn't just a stub */
8911 #if HAVE_PTHREADS_D4
8912         status = pthread_detach( &t );
8913 #else
8914         status = pthread_detach( t );
8915 #endif
8916
8917 #ifdef HAVE_LINUX_THREADS
8918         pthread_kill_other_threads_np();
8919 #endif
8920
8921         exit( status );
8922
8923 ; return 0; }
8924 EOF
8925 if { (eval echo configure:8926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8926   rm -rf conftest*
8927   ol_cv_pthread_lib_lpthread_woff=yes
8928 else
8929   echo "configure: failed program was:" >&5
8930   cat conftest.$ac_ext >&5
8931   rm -rf conftest*
8932   ol_cv_pthread_lib_lpthread_woff=no
8933 fi
8934 rm -f conftest*
8935 else
8936   cat > conftest.$ac_ext <<EOF
8937 #line 8938 "configure"
8938 #include "confdefs.h"
8939 /* pthread test headers */
8940 #include <pthread.h>
8941 #ifndef NULL
8942 #define NULL (void*)0
8943 #endif
8944
8945 static void *task(p)
8946         void *p;
8947 {
8948         return (void *) (p == NULL);
8949 }
8950
8951
8952 int main(argc, argv)
8953         int argc;
8954         char **argv;
8955 {
8956
8957         /* pthread test function */
8958         pthread_t t;
8959         int status;
8960 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8961         /* This system (e.g. AIX) defaults detached; must override */
8962         pthread_attr_t attr;
8963
8964         status = pthread_attr_init(&attr);
8965         if( status ) exit( status );
8966
8967         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8968         if( status ) exit( status );
8969
8970 #       define  ATTR    &attr
8971 #elif defined( HAVE_PTHREADS_D4 )
8972 #       define  ATTR    pthread_attr_default
8973 #else
8974 #       define  ATTR    NULL
8975 #endif
8976
8977         /* make sure pthread_create() isn't just a stub */
8978         status = pthread_create(&t, ATTR, task, NULL);
8979         if( status ) exit( status );
8980
8981         /* give the thread a chance to complete...
8982      * it should remain joinable and hence detachable
8983          */
8984         sleep( 1 );
8985
8986         /* make sure pthread_detach() isn't just a stub */
8987 #if HAVE_PTHREADS_D4
8988         status = pthread_detach( &t );
8989 #else
8990         status = pthread_detach( t );
8991 #endif
8992
8993 #ifdef HAVE_LINUX_THREADS
8994         pthread_kill_other_threads_np();
8995 #endif
8996
8997         exit( status );
8998
8999 }
9000
9001 EOF
9002 if { (eval echo configure:9003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9003 then
9004   ol_cv_pthread_lib_lpthread_woff=yes
9005 else
9006   echo "configure: failed program was:" >&5
9007   cat conftest.$ac_ext >&5
9008   rm -fr conftest*
9009   ol_cv_pthread_lib_lpthread_woff=no
9010 fi
9011 rm -fr conftest*
9012 fi
9013
9014
9015                 # restore the LIBS
9016                 LIBS="$ol_LIBS"
9017         
9018 fi
9019
9020 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9021
9022         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9023                 ol_link_pthreads="-lpthread -Wl,-woff,85"
9024                 ol_link_threads=posix
9025         fi
9026 fi
9027
9028
9029                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9030 if test "$ol_link_threads" = no ; then
9031         # try -lpthread
9032         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9033 echo "configure:9034: checking for pthread link with -lpthread" >&5
9034 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9035   echo $ac_n "(cached) $ac_c" 1>&6
9036 else
9037   
9038                 # save the flags
9039                 ol_LIBS="$LIBS"
9040                 LIBS="-lpthread $LIBS"
9041
9042                 if test "$cross_compiling" = yes; then
9043   cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046 /* pthread test headers */
9047 #include <pthread.h>
9048 #ifndef NULL
9049 #define NULL (void*)0
9050 #endif
9051
9052 static void *task(p)
9053         void *p;
9054 {
9055         return (void *) (p == NULL);
9056 }
9057
9058 int main() {
9059
9060         /* pthread test function */
9061         pthread_t t;
9062         int status;
9063 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9064         /* This system (e.g. AIX) defaults detached; must override */
9065         pthread_attr_t attr;
9066
9067         status = pthread_attr_init(&attr);
9068         if( status ) exit( status );
9069
9070         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9071         if( status ) exit( status );
9072
9073 #       define  ATTR    &attr
9074 #elif defined( HAVE_PTHREADS_D4 )
9075 #       define  ATTR    pthread_attr_default
9076 #else
9077 #       define  ATTR    NULL
9078 #endif
9079
9080         /* make sure pthread_create() isn't just a stub */
9081         status = pthread_create(&t, ATTR, task, NULL);
9082         if( status ) exit( status );
9083
9084         /* give the thread a chance to complete...
9085      * it should remain joinable and hence detachable
9086          */
9087         sleep( 1 );
9088
9089         /* make sure pthread_detach() isn't just a stub */
9090 #if HAVE_PTHREADS_D4
9091         status = pthread_detach( &t );
9092 #else
9093         status = pthread_detach( t );
9094 #endif
9095
9096 #ifdef HAVE_LINUX_THREADS
9097         pthread_kill_other_threads_np();
9098 #endif
9099
9100         exit( status );
9101
9102 ; return 0; }
9103 EOF
9104 if { (eval echo configure:9105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9105   rm -rf conftest*
9106   ol_cv_pthread_lpthread=yes
9107 else
9108   echo "configure: failed program was:" >&5
9109   cat conftest.$ac_ext >&5
9110   rm -rf conftest*
9111   ol_cv_pthread_lpthread=no
9112 fi
9113 rm -f conftest*
9114 else
9115   cat > conftest.$ac_ext <<EOF
9116 #line 9117 "configure"
9117 #include "confdefs.h"
9118 /* pthread test headers */
9119 #include <pthread.h>
9120 #ifndef NULL
9121 #define NULL (void*)0
9122 #endif
9123
9124 static void *task(p)
9125         void *p;
9126 {
9127         return (void *) (p == NULL);
9128 }
9129
9130
9131 int main(argc, argv)
9132         int argc;
9133         char **argv;
9134 {
9135
9136         /* pthread test function */
9137         pthread_t t;
9138         int status;
9139 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9140         /* This system (e.g. AIX) defaults detached; must override */
9141         pthread_attr_t attr;
9142
9143         status = pthread_attr_init(&attr);
9144         if( status ) exit( status );
9145
9146         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9147         if( status ) exit( status );
9148
9149 #       define  ATTR    &attr
9150 #elif defined( HAVE_PTHREADS_D4 )
9151 #       define  ATTR    pthread_attr_default
9152 #else
9153 #       define  ATTR    NULL
9154 #endif
9155
9156         /* make sure pthread_create() isn't just a stub */
9157         status = pthread_create(&t, ATTR, task, NULL);
9158         if( status ) exit( status );
9159
9160         /* give the thread a chance to complete...
9161      * it should remain joinable and hence detachable
9162          */
9163         sleep( 1 );
9164
9165         /* make sure pthread_detach() isn't just a stub */
9166 #if HAVE_PTHREADS_D4
9167         status = pthread_detach( &t );
9168 #else
9169         status = pthread_detach( t );
9170 #endif
9171
9172 #ifdef HAVE_LINUX_THREADS
9173         pthread_kill_other_threads_np();
9174 #endif
9175
9176         exit( status );
9177
9178 }
9179
9180 EOF
9181 if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9182 then
9183   ol_cv_pthread_lpthread=yes
9184 else
9185   echo "configure: failed program was:" >&5
9186   cat conftest.$ac_ext >&5
9187   rm -fr conftest*
9188   ol_cv_pthread_lpthread=no
9189 fi
9190 rm -fr conftest*
9191 fi
9192
9193
9194                 # restore the LIBS
9195                 LIBS="$ol_LIBS"
9196         
9197 fi
9198
9199 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9200
9201         if test $ol_cv_pthread_lpthread = yes ; then
9202                 ol_link_pthreads="-lpthread"
9203                 ol_link_threads=posix
9204         fi
9205 fi
9206
9207                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9208 if test "$ol_link_threads" = no ; then
9209         # try -lc_r
9210         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9211 echo "configure:9212: checking for pthread link with -lc_r" >&5
9212 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9213   echo $ac_n "(cached) $ac_c" 1>&6
9214 else
9215   
9216                 # save the flags
9217                 ol_LIBS="$LIBS"
9218                 LIBS="-lc_r $LIBS"
9219
9220                 if test "$cross_compiling" = yes; then
9221   cat > conftest.$ac_ext <<EOF
9222 #line 9223 "configure"
9223 #include "confdefs.h"
9224 /* pthread test headers */
9225 #include <pthread.h>
9226 #ifndef NULL
9227 #define NULL (void*)0
9228 #endif
9229
9230 static void *task(p)
9231         void *p;
9232 {
9233         return (void *) (p == NULL);
9234 }
9235
9236 int main() {
9237
9238         /* pthread test function */
9239         pthread_t t;
9240         int status;
9241 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9242         /* This system (e.g. AIX) defaults detached; must override */
9243         pthread_attr_t attr;
9244
9245         status = pthread_attr_init(&attr);
9246         if( status ) exit( status );
9247
9248         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9249         if( status ) exit( status );
9250
9251 #       define  ATTR    &attr
9252 #elif defined( HAVE_PTHREADS_D4 )
9253 #       define  ATTR    pthread_attr_default
9254 #else
9255 #       define  ATTR    NULL
9256 #endif
9257
9258         /* make sure pthread_create() isn't just a stub */
9259         status = pthread_create(&t, ATTR, task, NULL);
9260         if( status ) exit( status );
9261
9262         /* give the thread a chance to complete...
9263      * it should remain joinable and hence detachable
9264          */
9265         sleep( 1 );
9266
9267         /* make sure pthread_detach() isn't just a stub */
9268 #if HAVE_PTHREADS_D4
9269         status = pthread_detach( &t );
9270 #else
9271         status = pthread_detach( t );
9272 #endif
9273
9274 #ifdef HAVE_LINUX_THREADS
9275         pthread_kill_other_threads_np();
9276 #endif
9277
9278         exit( status );
9279
9280 ; return 0; }
9281 EOF
9282 if { (eval echo configure:9283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9283   rm -rf conftest*
9284   ol_cv_pthread_lc_r=yes
9285 else
9286   echo "configure: failed program was:" >&5
9287   cat conftest.$ac_ext >&5
9288   rm -rf conftest*
9289   ol_cv_pthread_lc_r=no
9290 fi
9291 rm -f conftest*
9292 else
9293   cat > conftest.$ac_ext <<EOF
9294 #line 9295 "configure"
9295 #include "confdefs.h"
9296 /* pthread test headers */
9297 #include <pthread.h>
9298 #ifndef NULL
9299 #define NULL (void*)0
9300 #endif
9301
9302 static void *task(p)
9303         void *p;
9304 {
9305         return (void *) (p == NULL);
9306 }
9307
9308
9309 int main(argc, argv)
9310         int argc;
9311         char **argv;
9312 {
9313
9314         /* pthread test function */
9315         pthread_t t;
9316         int status;
9317 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9318         /* This system (e.g. AIX) defaults detached; must override */
9319         pthread_attr_t attr;
9320
9321         status = pthread_attr_init(&attr);
9322         if( status ) exit( status );
9323
9324         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9325         if( status ) exit( status );
9326
9327 #       define  ATTR    &attr
9328 #elif defined( HAVE_PTHREADS_D4 )
9329 #       define  ATTR    pthread_attr_default
9330 #else
9331 #       define  ATTR    NULL
9332 #endif
9333
9334         /* make sure pthread_create() isn't just a stub */
9335         status = pthread_create(&t, ATTR, task, NULL);
9336         if( status ) exit( status );
9337
9338         /* give the thread a chance to complete...
9339      * it should remain joinable and hence detachable
9340          */
9341         sleep( 1 );
9342
9343         /* make sure pthread_detach() isn't just a stub */
9344 #if HAVE_PTHREADS_D4
9345         status = pthread_detach( &t );
9346 #else
9347         status = pthread_detach( t );
9348 #endif
9349
9350 #ifdef HAVE_LINUX_THREADS
9351         pthread_kill_other_threads_np();
9352 #endif
9353
9354         exit( status );
9355
9356 }
9357
9358 EOF
9359 if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9360 then
9361   ol_cv_pthread_lc_r=yes
9362 else
9363   echo "configure: failed program was:" >&5
9364   cat conftest.$ac_ext >&5
9365   rm -fr conftest*
9366   ol_cv_pthread_lc_r=no
9367 fi
9368 rm -fr conftest*
9369 fi
9370
9371
9372                 # restore the LIBS
9373                 LIBS="$ol_LIBS"
9374         
9375 fi
9376
9377 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9378
9379         if test $ol_cv_pthread_lc_r = yes ; then
9380                 ol_link_pthreads="-lc_r"
9381                 ol_link_threads=posix
9382         fi
9383 fi
9384
9385
9386                 # Pthread try link: -threads (ol_cv_pthread_threads)
9387 if test "$ol_link_threads" = no ; then
9388         # try -threads
9389         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9390 echo "configure:9391: checking for pthread link with -threads" >&5
9391 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9392   echo $ac_n "(cached) $ac_c" 1>&6
9393 else
9394   
9395                 # save the flags
9396                 ol_LIBS="$LIBS"
9397                 LIBS="-threads $LIBS"
9398
9399                 if test "$cross_compiling" = yes; then
9400   cat > conftest.$ac_ext <<EOF
9401 #line 9402 "configure"
9402 #include "confdefs.h"
9403 /* pthread test headers */
9404 #include <pthread.h>
9405 #ifndef NULL
9406 #define NULL (void*)0
9407 #endif
9408
9409 static void *task(p)
9410         void *p;
9411 {
9412         return (void *) (p == NULL);
9413 }
9414
9415 int main() {
9416
9417         /* pthread test function */
9418         pthread_t t;
9419         int status;
9420 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9421         /* This system (e.g. AIX) defaults detached; must override */
9422         pthread_attr_t attr;
9423
9424         status = pthread_attr_init(&attr);
9425         if( status ) exit( status );
9426
9427         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9428         if( status ) exit( status );
9429
9430 #       define  ATTR    &attr
9431 #elif defined( HAVE_PTHREADS_D4 )
9432 #       define  ATTR    pthread_attr_default
9433 #else
9434 #       define  ATTR    NULL
9435 #endif
9436
9437         /* make sure pthread_create() isn't just a stub */
9438         status = pthread_create(&t, ATTR, task, NULL);
9439         if( status ) exit( status );
9440
9441         /* give the thread a chance to complete...
9442      * it should remain joinable and hence detachable
9443          */
9444         sleep( 1 );
9445
9446         /* make sure pthread_detach() isn't just a stub */
9447 #if HAVE_PTHREADS_D4
9448         status = pthread_detach( &t );
9449 #else
9450         status = pthread_detach( t );
9451 #endif
9452
9453 #ifdef HAVE_LINUX_THREADS
9454         pthread_kill_other_threads_np();
9455 #endif
9456
9457         exit( status );
9458
9459 ; return 0; }
9460 EOF
9461 if { (eval echo configure:9462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9462   rm -rf conftest*
9463   ol_cv_pthread_threads=yes
9464 else
9465   echo "configure: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   rm -rf conftest*
9468   ol_cv_pthread_threads=no
9469 fi
9470 rm -f conftest*
9471 else
9472   cat > conftest.$ac_ext <<EOF
9473 #line 9474 "configure"
9474 #include "confdefs.h"
9475 /* pthread test headers */
9476 #include <pthread.h>
9477 #ifndef NULL
9478 #define NULL (void*)0
9479 #endif
9480
9481 static void *task(p)
9482         void *p;
9483 {
9484         return (void *) (p == NULL);
9485 }
9486
9487
9488 int main(argc, argv)
9489         int argc;
9490         char **argv;
9491 {
9492
9493         /* pthread test function */
9494         pthread_t t;
9495         int status;
9496 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9497         /* This system (e.g. AIX) defaults detached; must override */
9498         pthread_attr_t attr;
9499
9500         status = pthread_attr_init(&attr);
9501         if( status ) exit( status );
9502
9503         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9504         if( status ) exit( status );
9505
9506 #       define  ATTR    &attr
9507 #elif defined( HAVE_PTHREADS_D4 )
9508 #       define  ATTR    pthread_attr_default
9509 #else
9510 #       define  ATTR    NULL
9511 #endif
9512
9513         /* make sure pthread_create() isn't just a stub */
9514         status = pthread_create(&t, ATTR, task, NULL);
9515         if( status ) exit( status );
9516
9517         /* give the thread a chance to complete...
9518      * it should remain joinable and hence detachable
9519          */
9520         sleep( 1 );
9521
9522         /* make sure pthread_detach() isn't just a stub */
9523 #if HAVE_PTHREADS_D4
9524         status = pthread_detach( &t );
9525 #else
9526         status = pthread_detach( t );
9527 #endif
9528
9529 #ifdef HAVE_LINUX_THREADS
9530         pthread_kill_other_threads_np();
9531 #endif
9532
9533         exit( status );
9534
9535 }
9536
9537 EOF
9538 if { (eval echo configure:9539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9539 then
9540   ol_cv_pthread_threads=yes
9541 else
9542   echo "configure: failed program was:" >&5
9543   cat conftest.$ac_ext >&5
9544   rm -fr conftest*
9545   ol_cv_pthread_threads=no
9546 fi
9547 rm -fr conftest*
9548 fi
9549
9550
9551                 # restore the LIBS
9552                 LIBS="$ol_LIBS"
9553         
9554 fi
9555
9556 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9557
9558         if test $ol_cv_pthread_threads = yes ; then
9559                 ol_link_pthreads="-threads"
9560                 ol_link_threads=posix
9561         fi
9562 fi
9563
9564
9565                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9566 if test "$ol_link_threads" = no ; then
9567         # try -lpthreads -lmach -lexc -lc_r
9568         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9569 echo "configure:9570: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9570 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9571   echo $ac_n "(cached) $ac_c" 1>&6
9572 else
9573   
9574                 # save the flags
9575                 ol_LIBS="$LIBS"
9576                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9577
9578                 if test "$cross_compiling" = yes; then
9579   cat > conftest.$ac_ext <<EOF
9580 #line 9581 "configure"
9581 #include "confdefs.h"
9582 /* pthread test headers */
9583 #include <pthread.h>
9584 #ifndef NULL
9585 #define NULL (void*)0
9586 #endif
9587
9588 static void *task(p)
9589         void *p;
9590 {
9591         return (void *) (p == NULL);
9592 }
9593
9594 int main() {
9595
9596         /* pthread test function */
9597         pthread_t t;
9598         int status;
9599 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9600         /* This system (e.g. AIX) defaults detached; must override */
9601         pthread_attr_t attr;
9602
9603         status = pthread_attr_init(&attr);
9604         if( status ) exit( status );
9605
9606         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9607         if( status ) exit( status );
9608
9609 #       define  ATTR    &attr
9610 #elif defined( HAVE_PTHREADS_D4 )
9611 #       define  ATTR    pthread_attr_default
9612 #else
9613 #       define  ATTR    NULL
9614 #endif
9615
9616         /* make sure pthread_create() isn't just a stub */
9617         status = pthread_create(&t, ATTR, task, NULL);
9618         if( status ) exit( status );
9619
9620         /* give the thread a chance to complete...
9621      * it should remain joinable and hence detachable
9622          */
9623         sleep( 1 );
9624
9625         /* make sure pthread_detach() isn't just a stub */
9626 #if HAVE_PTHREADS_D4
9627         status = pthread_detach( &t );
9628 #else
9629         status = pthread_detach( t );
9630 #endif
9631
9632 #ifdef HAVE_LINUX_THREADS
9633         pthread_kill_other_threads_np();
9634 #endif
9635
9636         exit( status );
9637
9638 ; return 0; }
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9641   rm -rf conftest*
9642   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9643 else
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646   rm -rf conftest*
9647   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9648 fi
9649 rm -f conftest*
9650 else
9651   cat > conftest.$ac_ext <<EOF
9652 #line 9653 "configure"
9653 #include "confdefs.h"
9654 /* pthread test headers */
9655 #include <pthread.h>
9656 #ifndef NULL
9657 #define NULL (void*)0
9658 #endif
9659
9660 static void *task(p)
9661         void *p;
9662 {
9663         return (void *) (p == NULL);
9664 }
9665
9666
9667 int main(argc, argv)
9668         int argc;
9669         char **argv;
9670 {
9671
9672         /* pthread test function */
9673         pthread_t t;
9674         int status;
9675 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9676         /* This system (e.g. AIX) defaults detached; must override */
9677         pthread_attr_t attr;
9678
9679         status = pthread_attr_init(&attr);
9680         if( status ) exit( status );
9681
9682         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9683         if( status ) exit( status );
9684
9685 #       define  ATTR    &attr
9686 #elif defined( HAVE_PTHREADS_D4 )
9687 #       define  ATTR    pthread_attr_default
9688 #else
9689 #       define  ATTR    NULL
9690 #endif
9691
9692         /* make sure pthread_create() isn't just a stub */
9693         status = pthread_create(&t, ATTR, task, NULL);
9694         if( status ) exit( status );
9695
9696         /* give the thread a chance to complete...
9697      * it should remain joinable and hence detachable
9698          */
9699         sleep( 1 );
9700
9701         /* make sure pthread_detach() isn't just a stub */
9702 #if HAVE_PTHREADS_D4
9703         status = pthread_detach( &t );
9704 #else
9705         status = pthread_detach( t );
9706 #endif
9707
9708 #ifdef HAVE_LINUX_THREADS
9709         pthread_kill_other_threads_np();
9710 #endif
9711
9712         exit( status );
9713
9714 }
9715
9716 EOF
9717 if { (eval echo configure:9718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9718 then
9719   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9720 else
9721   echo "configure: failed program was:" >&5
9722   cat conftest.$ac_ext >&5
9723   rm -fr conftest*
9724   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9725 fi
9726 rm -fr conftest*
9727 fi
9728
9729
9730                 # restore the LIBS
9731                 LIBS="$ol_LIBS"
9732         
9733 fi
9734
9735 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9736
9737         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9738                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9739                 ol_link_threads=posix
9740         fi
9741 fi
9742
9743                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9744 if test "$ol_link_threads" = no ; then
9745         # try -lpthreads -lmach -lexc
9746         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9747 echo "configure:9748: checking for pthread link with -lpthreads -lmach -lexc" >&5
9748 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   
9752                 # save the flags
9753                 ol_LIBS="$LIBS"
9754                 LIBS="-lpthreads -lmach -lexc $LIBS"
9755
9756                 if test "$cross_compiling" = yes; then
9757   cat > conftest.$ac_ext <<EOF
9758 #line 9759 "configure"
9759 #include "confdefs.h"
9760 /* pthread test headers */
9761 #include <pthread.h>
9762 #ifndef NULL
9763 #define NULL (void*)0
9764 #endif
9765
9766 static void *task(p)
9767         void *p;
9768 {
9769         return (void *) (p == NULL);
9770 }
9771
9772 int main() {
9773
9774         /* pthread test function */
9775         pthread_t t;
9776         int status;
9777 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9778         /* This system (e.g. AIX) defaults detached; must override */
9779         pthread_attr_t attr;
9780
9781         status = pthread_attr_init(&attr);
9782         if( status ) exit( status );
9783
9784         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9785         if( status ) exit( status );
9786
9787 #       define  ATTR    &attr
9788 #elif defined( HAVE_PTHREADS_D4 )
9789 #       define  ATTR    pthread_attr_default
9790 #else
9791 #       define  ATTR    NULL
9792 #endif
9793
9794         /* make sure pthread_create() isn't just a stub */
9795         status = pthread_create(&t, ATTR, task, NULL);
9796         if( status ) exit( status );
9797
9798         /* give the thread a chance to complete...
9799      * it should remain joinable and hence detachable
9800          */
9801         sleep( 1 );
9802
9803         /* make sure pthread_detach() isn't just a stub */
9804 #if HAVE_PTHREADS_D4
9805         status = pthread_detach( &t );
9806 #else
9807         status = pthread_detach( t );
9808 #endif
9809
9810 #ifdef HAVE_LINUX_THREADS
9811         pthread_kill_other_threads_np();
9812 #endif
9813
9814         exit( status );
9815
9816 ; return 0; }
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9819   rm -rf conftest*
9820   ol_cv_pthread_lpthreads_lmach_lexc=yes
9821 else
9822   echo "configure: failed program was:" >&5
9823   cat conftest.$ac_ext >&5
9824   rm -rf conftest*
9825   ol_cv_pthread_lpthreads_lmach_lexc=no
9826 fi
9827 rm -f conftest*
9828 else
9829   cat > conftest.$ac_ext <<EOF
9830 #line 9831 "configure"
9831 #include "confdefs.h"
9832 /* pthread test headers */
9833 #include <pthread.h>
9834 #ifndef NULL
9835 #define NULL (void*)0
9836 #endif
9837
9838 static void *task(p)
9839         void *p;
9840 {
9841         return (void *) (p == NULL);
9842 }
9843
9844
9845 int main(argc, argv)
9846         int argc;
9847         char **argv;
9848 {
9849
9850         /* pthread test function */
9851         pthread_t t;
9852         int status;
9853 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9854         /* This system (e.g. AIX) defaults detached; must override */
9855         pthread_attr_t attr;
9856
9857         status = pthread_attr_init(&attr);
9858         if( status ) exit( status );
9859
9860         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9861         if( status ) exit( status );
9862
9863 #       define  ATTR    &attr
9864 #elif defined( HAVE_PTHREADS_D4 )
9865 #       define  ATTR    pthread_attr_default
9866 #else
9867 #       define  ATTR    NULL
9868 #endif
9869
9870         /* make sure pthread_create() isn't just a stub */
9871         status = pthread_create(&t, ATTR, task, NULL);
9872         if( status ) exit( status );
9873
9874         /* give the thread a chance to complete...
9875      * it should remain joinable and hence detachable
9876          */
9877         sleep( 1 );
9878
9879         /* make sure pthread_detach() isn't just a stub */
9880 #if HAVE_PTHREADS_D4
9881         status = pthread_detach( &t );
9882 #else
9883         status = pthread_detach( t );
9884 #endif
9885
9886 #ifdef HAVE_LINUX_THREADS
9887         pthread_kill_other_threads_np();
9888 #endif
9889
9890         exit( status );
9891
9892 }
9893
9894 EOF
9895 if { (eval echo configure:9896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9896 then
9897   ol_cv_pthread_lpthreads_lmach_lexc=yes
9898 else
9899   echo "configure: failed program was:" >&5
9900   cat conftest.$ac_ext >&5
9901   rm -fr conftest*
9902   ol_cv_pthread_lpthreads_lmach_lexc=no
9903 fi
9904 rm -fr conftest*
9905 fi
9906
9907
9908                 # restore the LIBS
9909                 LIBS="$ol_LIBS"
9910         
9911 fi
9912
9913 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9914
9915         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9916                 ol_link_pthreads="-lpthreads -lmach -lexc"
9917                 ol_link_threads=posix
9918         fi
9919 fi
9920
9921                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9922 if test "$ol_link_threads" = no ; then
9923         # try -lpthreads -lexc
9924         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9925 echo "configure:9926: checking for pthread link with -lpthreads -lexc" >&5
9926 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9927   echo $ac_n "(cached) $ac_c" 1>&6
9928 else
9929   
9930                 # save the flags
9931                 ol_LIBS="$LIBS"
9932                 LIBS="-lpthreads -lexc $LIBS"
9933
9934                 if test "$cross_compiling" = yes; then
9935   cat > conftest.$ac_ext <<EOF
9936 #line 9937 "configure"
9937 #include "confdefs.h"
9938 /* pthread test headers */
9939 #include <pthread.h>
9940 #ifndef NULL
9941 #define NULL (void*)0
9942 #endif
9943
9944 static void *task(p)
9945         void *p;
9946 {
9947         return (void *) (p == NULL);
9948 }
9949
9950 int main() {
9951
9952         /* pthread test function */
9953         pthread_t t;
9954         int status;
9955 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9956         /* This system (e.g. AIX) defaults detached; must override */
9957         pthread_attr_t attr;
9958
9959         status = pthread_attr_init(&attr);
9960         if( status ) exit( status );
9961
9962         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9963         if( status ) exit( status );
9964
9965 #       define  ATTR    &attr
9966 #elif defined( HAVE_PTHREADS_D4 )
9967 #       define  ATTR    pthread_attr_default
9968 #else
9969 #       define  ATTR    NULL
9970 #endif
9971
9972         /* make sure pthread_create() isn't just a stub */
9973         status = pthread_create(&t, ATTR, task, NULL);
9974         if( status ) exit( status );
9975
9976         /* give the thread a chance to complete...
9977      * it should remain joinable and hence detachable
9978          */
9979         sleep( 1 );
9980
9981         /* make sure pthread_detach() isn't just a stub */
9982 #if HAVE_PTHREADS_D4
9983         status = pthread_detach( &t );
9984 #else
9985         status = pthread_detach( t );
9986 #endif
9987
9988 #ifdef HAVE_LINUX_THREADS
9989         pthread_kill_other_threads_np();
9990 #endif
9991
9992         exit( status );
9993
9994 ; return 0; }
9995 EOF
9996 if { (eval echo configure:9997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9997   rm -rf conftest*
9998   ol_cv_pthread_lpthreads_lexc=yes
9999 else
10000   echo "configure: failed program was:" >&5
10001   cat conftest.$ac_ext >&5
10002   rm -rf conftest*
10003   ol_cv_pthread_lpthreads_lexc=no
10004 fi
10005 rm -f conftest*
10006 else
10007   cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 /* pthread test headers */
10011 #include <pthread.h>
10012 #ifndef NULL
10013 #define NULL (void*)0
10014 #endif
10015
10016 static void *task(p)
10017         void *p;
10018 {
10019         return (void *) (p == NULL);
10020 }
10021
10022
10023 int main(argc, argv)
10024         int argc;
10025         char **argv;
10026 {
10027
10028         /* pthread test function */
10029         pthread_t t;
10030         int status;
10031 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10032         /* This system (e.g. AIX) defaults detached; must override */
10033         pthread_attr_t attr;
10034
10035         status = pthread_attr_init(&attr);
10036         if( status ) exit( status );
10037
10038         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10039         if( status ) exit( status );
10040
10041 #       define  ATTR    &attr
10042 #elif defined( HAVE_PTHREADS_D4 )
10043 #       define  ATTR    pthread_attr_default
10044 #else
10045 #       define  ATTR    NULL
10046 #endif
10047
10048         /* make sure pthread_create() isn't just a stub */
10049         status = pthread_create(&t, ATTR, task, NULL);
10050         if( status ) exit( status );
10051
10052         /* give the thread a chance to complete...
10053      * it should remain joinable and hence detachable
10054          */
10055         sleep( 1 );
10056
10057         /* make sure pthread_detach() isn't just a stub */
10058 #if HAVE_PTHREADS_D4
10059         status = pthread_detach( &t );
10060 #else
10061         status = pthread_detach( t );
10062 #endif
10063
10064 #ifdef HAVE_LINUX_THREADS
10065         pthread_kill_other_threads_np();
10066 #endif
10067
10068         exit( status );
10069
10070 }
10071
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10074 then
10075   ol_cv_pthread_lpthreads_lexc=yes
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -fr conftest*
10080   ol_cv_pthread_lpthreads_lexc=no
10081 fi
10082 rm -fr conftest*
10083 fi
10084
10085
10086                 # restore the LIBS
10087                 LIBS="$ol_LIBS"
10088         
10089 fi
10090
10091 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
10092
10093         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10094                 ol_link_pthreads="-lpthreads -lexc"
10095                 ol_link_threads=posix
10096         fi
10097 fi
10098
10099
10100                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10101 if test "$ol_link_threads" = no ; then
10102         # try -lpthreads
10103         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10104 echo "configure:10105: checking for pthread link with -lpthreads" >&5
10105 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   
10109                 # save the flags
10110                 ol_LIBS="$LIBS"
10111                 LIBS="-lpthreads $LIBS"
10112
10113                 if test "$cross_compiling" = yes; then
10114   cat > conftest.$ac_ext <<EOF
10115 #line 10116 "configure"
10116 #include "confdefs.h"
10117 /* pthread test headers */
10118 #include <pthread.h>
10119 #ifndef NULL
10120 #define NULL (void*)0
10121 #endif
10122
10123 static void *task(p)
10124         void *p;
10125 {
10126         return (void *) (p == NULL);
10127 }
10128
10129 int main() {
10130
10131         /* pthread test function */
10132         pthread_t t;
10133         int status;
10134 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10135         /* This system (e.g. AIX) defaults detached; must override */
10136         pthread_attr_t attr;
10137
10138         status = pthread_attr_init(&attr);
10139         if( status ) exit( status );
10140
10141         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10142         if( status ) exit( status );
10143
10144 #       define  ATTR    &attr
10145 #elif defined( HAVE_PTHREADS_D4 )
10146 #       define  ATTR    pthread_attr_default
10147 #else
10148 #       define  ATTR    NULL
10149 #endif
10150
10151         /* make sure pthread_create() isn't just a stub */
10152         status = pthread_create(&t, ATTR, task, NULL);
10153         if( status ) exit( status );
10154
10155         /* give the thread a chance to complete...
10156      * it should remain joinable and hence detachable
10157          */
10158         sleep( 1 );
10159
10160         /* make sure pthread_detach() isn't just a stub */
10161 #if HAVE_PTHREADS_D4
10162         status = pthread_detach( &t );
10163 #else
10164         status = pthread_detach( t );
10165 #endif
10166
10167 #ifdef HAVE_LINUX_THREADS
10168         pthread_kill_other_threads_np();
10169 #endif
10170
10171         exit( status );
10172
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   ol_cv_pthread_lib_lpthreads=yes
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   ol_cv_pthread_lib_lpthreads=no
10183 fi
10184 rm -f conftest*
10185 else
10186   cat > conftest.$ac_ext <<EOF
10187 #line 10188 "configure"
10188 #include "confdefs.h"
10189 /* pthread test headers */
10190 #include <pthread.h>
10191 #ifndef NULL
10192 #define NULL (void*)0
10193 #endif
10194
10195 static void *task(p)
10196         void *p;
10197 {
10198         return (void *) (p == NULL);
10199 }
10200
10201
10202 int main(argc, argv)
10203         int argc;
10204         char **argv;
10205 {
10206
10207         /* pthread test function */
10208         pthread_t t;
10209         int status;
10210 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10211         /* This system (e.g. AIX) defaults detached; must override */
10212         pthread_attr_t attr;
10213
10214         status = pthread_attr_init(&attr);
10215         if( status ) exit( status );
10216
10217         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10218         if( status ) exit( status );
10219
10220 #       define  ATTR    &attr
10221 #elif defined( HAVE_PTHREADS_D4 )
10222 #       define  ATTR    pthread_attr_default
10223 #else
10224 #       define  ATTR    NULL
10225 #endif
10226
10227         /* make sure pthread_create() isn't just a stub */
10228         status = pthread_create(&t, ATTR, task, NULL);
10229         if( status ) exit( status );
10230
10231         /* give the thread a chance to complete...
10232      * it should remain joinable and hence detachable
10233          */
10234         sleep( 1 );
10235
10236         /* make sure pthread_detach() isn't just a stub */
10237 #if HAVE_PTHREADS_D4
10238         status = pthread_detach( &t );
10239 #else
10240         status = pthread_detach( t );
10241 #endif
10242
10243 #ifdef HAVE_LINUX_THREADS
10244         pthread_kill_other_threads_np();
10245 #endif
10246
10247         exit( status );
10248
10249 }
10250
10251 EOF
10252 if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10253 then
10254   ol_cv_pthread_lib_lpthreads=yes
10255 else
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -fr conftest*
10259   ol_cv_pthread_lib_lpthreads=no
10260 fi
10261 rm -fr conftest*
10262 fi
10263
10264
10265                 # restore the LIBS
10266                 LIBS="$ol_LIBS"
10267         
10268 fi
10269
10270 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10271
10272         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10273                 ol_link_pthreads="-lpthreads"
10274                 ol_link_threads=posix
10275         fi
10276 fi
10277
10278
10279                 if test $ol_link_threads != no ; then
10280                         cat >> confdefs.h <<\EOF
10281 #define HAVE_PTHREADS 1
10282 EOF
10283
10284
10285                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10286
10287                                                 save_CPPFLAGS="$CPPFLAGS"
10288                         save_LIBS="$LIBS"
10289                         LIBS="$LTHREAD_LIBS $LIBS"
10290
10291                                                                                                 for ac_func in sched_yield pthread_yield
10292 do
10293 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10294 echo "configure:10295: checking for $ac_func" >&5
10295 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10296   echo $ac_n "(cached) $ac_c" 1>&6
10297 else
10298   cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 /* System header to define __stub macros and hopefully few prototypes,
10302     which can conflict with char $ac_func(); below.  */
10303 #include <assert.h>
10304 /* Override any gcc2 internal prototype to avoid an error.  */
10305 /* We use char because int might match the return type of a gcc2
10306     builtin and then its argument prototype would still apply.  */
10307 char $ac_func();
10308 char (*f)();
10309
10310 int main() {
10311
10312 /* The GNU C library defines this for functions which it implements
10313     to always fail with ENOSYS.  Some functions are actually named
10314     something starting with __ and the normal name is an alias.  */
10315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10316 choke me
10317 #else
10318 f = $ac_func;
10319 #endif
10320
10321 ; return 0; }
10322 EOF
10323 if { (eval echo configure:10324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10324   rm -rf conftest*
10325   eval "ac_cv_func_$ac_func=yes"
10326 else
10327   echo "configure: failed program was:" >&5
10328   cat conftest.$ac_ext >&5
10329   rm -rf conftest*
10330   eval "ac_cv_func_$ac_func=no"
10331 fi
10332 rm -f conftest*
10333 fi
10334
10335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10336   echo "$ac_t""yes" 1>&6
10337     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10338   cat >> confdefs.h <<EOF
10339 #define $ac_tr_func 1
10340 EOF
10341  
10342 else
10343   echo "$ac_t""no" 1>&6
10344 fi
10345 done
10346
10347
10348                         if test $ac_cv_func_sched_yield = no -a \
10349                                 $ac_cv_func_pthread_yield = no ; then
10350                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10351 echo "configure:10352: checking for sched_yield in -lrt" >&5
10352 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10353 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10354   echo $ac_n "(cached) $ac_c" 1>&6
10355 else
10356   ac_save_LIBS="$LIBS"
10357 LIBS="-lrt  $LIBS"
10358 cat > conftest.$ac_ext <<EOF
10359 #line 10360 "configure"
10360 #include "confdefs.h"
10361 /* Override any gcc2 internal prototype to avoid an error.  */
10362 /* We use char because int might match the return type of a gcc2
10363     builtin and then its argument prototype would still apply.  */
10364 char sched_yield();
10365
10366 int main() {
10367 sched_yield()
10368 ; return 0; }
10369 EOF
10370 if { (eval echo configure:10371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10371   rm -rf conftest*
10372   eval "ac_cv_lib_$ac_lib_var=yes"
10373 else
10374   echo "configure: failed program was:" >&5
10375   cat conftest.$ac_ext >&5
10376   rm -rf conftest*
10377   eval "ac_cv_lib_$ac_lib_var=no"
10378 fi
10379 rm -f conftest*
10380 LIBS="$ac_save_LIBS"
10381
10382 fi
10383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10384   echo "$ac_t""yes" 1>&6
10385   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10386                                         cat >> confdefs.h <<\EOF
10387 #define HAVE_SCHED_YIELD 1
10388 EOF
10389
10390                                         ac_cv_func_sched_yield=yes
10391 else
10392   echo "$ac_t""no" 1>&6
10393 ac_cv_func_sched_yield=no
10394 fi
10395
10396                         fi
10397                         if test $ac_cv_func_sched_yield = no -a \
10398                                 $ac_cv_func_pthread_yield = no ; then
10399                                                                                                 for ac_func in thr_yield
10400 do
10401 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10402 echo "configure:10403: checking for $ac_func" >&5
10403 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10404   echo $ac_n "(cached) $ac_c" 1>&6
10405 else
10406   cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 /* System header to define __stub macros and hopefully few prototypes,
10410     which can conflict with char $ac_func(); below.  */
10411 #include <assert.h>
10412 /* Override any gcc2 internal prototype to avoid an error.  */
10413 /* We use char because int might match the return type of a gcc2
10414     builtin and then its argument prototype would still apply.  */
10415 char $ac_func();
10416 char (*f)();
10417
10418 int main() {
10419
10420 /* The GNU C library defines this for functions which it implements
10421     to always fail with ENOSYS.  Some functions are actually named
10422     something starting with __ and the normal name is an alias.  */
10423 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10424 choke me
10425 #else
10426 f = $ac_func;
10427 #endif
10428
10429 ; return 0; }
10430 EOF
10431 if { (eval echo configure:10432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10432   rm -rf conftest*
10433   eval "ac_cv_func_$ac_func=yes"
10434 else
10435   echo "configure: failed program was:" >&5
10436   cat conftest.$ac_ext >&5
10437   rm -rf conftest*
10438   eval "ac_cv_func_$ac_func=no"
10439 fi
10440 rm -f conftest*
10441 fi
10442
10443 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10444   echo "$ac_t""yes" 1>&6
10445     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10446   cat >> confdefs.h <<EOF
10447 #define $ac_tr_func 1
10448 EOF
10449  
10450 else
10451   echo "$ac_t""no" 1>&6
10452 fi
10453 done
10454
10455                         fi
10456                         if test $ac_cv_func_sched_yield = no -a \
10457                                 $ac_cv_func_pthread_yield = no -a \
10458                                 "$ac_cv_func_thr_yield" = no ; then
10459                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10460                         fi
10461
10462                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10463 do
10464 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10465 echo "configure:10466: checking for $ac_func" >&5
10466 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10467   echo $ac_n "(cached) $ac_c" 1>&6
10468 else
10469   cat > conftest.$ac_ext <<EOF
10470 #line 10471 "configure"
10471 #include "confdefs.h"
10472 /* System header to define __stub macros and hopefully few prototypes,
10473     which can conflict with char $ac_func(); below.  */
10474 #include <assert.h>
10475 /* Override any gcc2 internal prototype to avoid an error.  */
10476 /* We use char because int might match the return type of a gcc2
10477     builtin and then its argument prototype would still apply.  */
10478 char $ac_func();
10479 char (*f)();
10480
10481 int main() {
10482
10483 /* The GNU C library defines this for functions which it implements
10484     to always fail with ENOSYS.  Some functions are actually named
10485     something starting with __ and the normal name is an alias.  */
10486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10487 choke me
10488 #else
10489 f = $ac_func;
10490 #endif
10491
10492 ; return 0; }
10493 EOF
10494 if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10495   rm -rf conftest*
10496   eval "ac_cv_func_$ac_func=yes"
10497 else
10498   echo "configure: failed program was:" >&5
10499   cat conftest.$ac_ext >&5
10500   rm -rf conftest*
10501   eval "ac_cv_func_$ac_func=no"
10502 fi
10503 rm -f conftest*
10504 fi
10505
10506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10507   echo "$ac_t""yes" 1>&6
10508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10509   cat >> confdefs.h <<EOF
10510 #define $ac_tr_func 1
10511 EOF
10512  
10513 else
10514   echo "$ac_t""no" 1>&6
10515 fi
10516 done
10517
10518
10519                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10520 echo "configure:10521: checking for pthread_detach with <pthread.h>" >&5
10521 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10522   echo $ac_n "(cached) $ac_c" 1>&6
10523 else
10524   
10525                                                                 cat > conftest.$ac_ext <<EOF
10526 #line 10527 "configure"
10527 #include "confdefs.h"
10528
10529 #include <pthread.h>
10530 #ifndef NULL
10531 #define NULL (void*)0
10532 #endif
10533
10534 int main() {
10535 pthread_detach(NULL);
10536 ; return 0; }
10537 EOF
10538 if { (eval echo configure:10539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10539   rm -rf conftest*
10540   ol_cv_func_pthread_detach=yes
10541 else
10542   echo "configure: failed program was:" >&5
10543   cat conftest.$ac_ext >&5
10544   rm -rf conftest*
10545   ol_cv_func_pthread_detach=no
10546 fi
10547 rm -f conftest*
10548                         
10549 fi
10550
10551 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10552
10553                         if test $ol_cv_func_pthread_detach = no ; then
10554                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10555                         fi
10556
10557                         cat >> confdefs.h <<\EOF
10558 #define HAVE_PTHREAD_DETACH 1
10559 EOF
10560
10561
10562                                                 for ac_func in \
10563                                 pthread_setconcurrency \
10564                                 pthread_getconcurrency \
10565                                 thr_setconcurrency \
10566                                 thr_getconcurrency \
10567                         
10568 do
10569 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10570 echo "configure:10571: checking for $ac_func" >&5
10571 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10572   echo $ac_n "(cached) $ac_c" 1>&6
10573 else
10574   cat > conftest.$ac_ext <<EOF
10575 #line 10576 "configure"
10576 #include "confdefs.h"
10577 /* System header to define __stub macros and hopefully few prototypes,
10578     which can conflict with char $ac_func(); below.  */
10579 #include <assert.h>
10580 /* Override any gcc2 internal prototype to avoid an error.  */
10581 /* We use char because int might match the return type of a gcc2
10582     builtin and then its argument prototype would still apply.  */
10583 char $ac_func();
10584 char (*f)();
10585
10586 int main() {
10587
10588 /* The GNU C library defines this for functions which it implements
10589     to always fail with ENOSYS.  Some functions are actually named
10590     something starting with __ and the normal name is an alias.  */
10591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10592 choke me
10593 #else
10594 f = $ac_func;
10595 #endif
10596
10597 ; return 0; }
10598 EOF
10599 if { (eval echo configure:10600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10600   rm -rf conftest*
10601   eval "ac_cv_func_$ac_func=yes"
10602 else
10603   echo "configure: failed program was:" >&5
10604   cat conftest.$ac_ext >&5
10605   rm -rf conftest*
10606   eval "ac_cv_func_$ac_func=no"
10607 fi
10608 rm -f conftest*
10609 fi
10610
10611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10612   echo "$ac_t""yes" 1>&6
10613     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10614   cat >> confdefs.h <<EOF
10615 #define $ac_tr_func 1
10616 EOF
10617  
10618 else
10619   echo "$ac_t""no" 1>&6
10620 fi
10621 done
10622
10623
10624                         
10625         for ac_func in pthread_kill_other_threads_np
10626 do
10627 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10628 echo "configure:10629: checking for $ac_func" >&5
10629 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10630   echo $ac_n "(cached) $ac_c" 1>&6
10631 else
10632   cat > conftest.$ac_ext <<EOF
10633 #line 10634 "configure"
10634 #include "confdefs.h"
10635 /* System header to define __stub macros and hopefully few prototypes,
10636     which can conflict with char $ac_func(); below.  */
10637 #include <assert.h>
10638 /* Override any gcc2 internal prototype to avoid an error.  */
10639 /* We use char because int might match the return type of a gcc2
10640     builtin and then its argument prototype would still apply.  */
10641 char $ac_func();
10642 char (*f)();
10643
10644 int main() {
10645
10646 /* The GNU C library defines this for functions which it implements
10647     to always fail with ENOSYS.  Some functions are actually named
10648     something starting with __ and the normal name is an alias.  */
10649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10650 choke me
10651 #else
10652 f = $ac_func;
10653 #endif
10654
10655 ; return 0; }
10656 EOF
10657 if { (eval echo configure:10658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10658   rm -rf conftest*
10659   eval "ac_cv_func_$ac_func=yes"
10660 else
10661   echo "configure: failed program was:" >&5
10662   cat conftest.$ac_ext >&5
10663   rm -rf conftest*
10664   eval "ac_cv_func_$ac_func=no"
10665 fi
10666 rm -f conftest*
10667 fi
10668
10669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10670   echo "$ac_t""yes" 1>&6
10671     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10672   cat >> confdefs.h <<EOF
10673 #define $ac_tr_func 1
10674 EOF
10675  
10676 else
10677   echo "$ac_t""no" 1>&6
10678 fi
10679 done
10680
10681         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10682 echo "configure:10683: checking for LinuxThreads implementation" >&5
10683 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10684   echo $ac_n "(cached) $ac_c" 1>&6
10685 else
10686   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10687 fi
10688
10689 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10690
10691                         
10692         
10693         
10694         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10695 echo "configure:10696: checking for LinuxThreads consistency" >&5
10696 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10697   echo $ac_n "(cached) $ac_c" 1>&6
10698 else
10699   
10700                 if test $ol_cv_header_linux_threads = yes -a \
10701                         $ol_cv_sys_linux_threads = yes; then
10702                         ol_cv_linux_threads=yes
10703                 elif test $ol_cv_header_linux_threads = no -a \
10704                         $ol_cv_sys_linux_threads = no; then
10705                         ol_cv_linux_threads=no
10706                 else
10707                         ol_cv_linux_threads=error
10708                 fi
10709         
10710 fi
10711
10712 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10713
10714
10715                         if test $ol_cv_linux_threads = error; then
10716                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10717                         fi
10718
10719                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10720 echo "configure:10721: checking if pthread_create() works" >&5
10721 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10722   echo $ac_n "(cached) $ac_c" 1>&6
10723 else
10724   
10725                         if test "$cross_compiling" = yes; then
10726                                 ol_cv_pthread_create_works=yes
10727 else
10728   cat > conftest.$ac_ext <<EOF
10729 #line 10730 "configure"
10730 #include "confdefs.h"
10731 /* pthread test headers */
10732 #include <pthread.h>
10733 #ifndef NULL
10734 #define NULL (void*)0
10735 #endif
10736
10737 static void *task(p)
10738         void *p;
10739 {
10740         return (void *) (p == NULL);
10741 }
10742
10743
10744 int main(argc, argv)
10745         int argc;
10746         char **argv;
10747 {
10748
10749         /* pthread test function */
10750         pthread_t t;
10751         int status;
10752 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10753         /* This system (e.g. AIX) defaults detached; must override */
10754         pthread_attr_t attr;
10755
10756         status = pthread_attr_init(&attr);
10757         if( status ) exit( status );
10758
10759         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10760         if( status ) exit( status );
10761
10762 #       define  ATTR    &attr
10763 #elif defined( HAVE_PTHREADS_D4 )
10764 #       define  ATTR    pthread_attr_default
10765 #else
10766 #       define  ATTR    NULL
10767 #endif
10768
10769         /* make sure pthread_create() isn't just a stub */
10770         status = pthread_create(&t, ATTR, task, NULL);
10771         if( status ) exit( status );
10772
10773         /* give the thread a chance to complete...
10774      * it should remain joinable and hence detachable
10775          */
10776         sleep( 1 );
10777
10778         /* make sure pthread_detach() isn't just a stub */
10779 #if HAVE_PTHREADS_D4
10780         status = pthread_detach( &t );
10781 #else
10782         status = pthread_detach( t );
10783 #endif
10784
10785 #ifdef HAVE_LINUX_THREADS
10786         pthread_kill_other_threads_np();
10787 #endif
10788
10789         exit( status );
10790
10791 }
10792
10793 EOF
10794 if { (eval echo configure:10795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10795 then
10796   ol_cv_pthread_create_works=yes
10797 else
10798   echo "configure: failed program was:" >&5
10799   cat conftest.$ac_ext >&5
10800   rm -fr conftest*
10801   ol_cv_pthread_create_works=no
10802 fi
10803 rm -fr conftest*
10804 fi
10805
10806 fi
10807
10808 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10809
10810                         if test $ol_cv_pthread_create_works = no ; then
10811                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10812                         fi
10813
10814                                                 if test $ol_with_yielding_select = auto ; then
10815                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10816 echo "configure:10817: checking if select yields when using pthreads" >&5
10817 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10818   echo $ac_n "(cached) $ac_c" 1>&6
10819 else
10820   
10821                                 if test "$cross_compiling" = yes; then
10822   ol_cv_pthread_select_yields=cross
10823 else
10824   cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827
10828 #include <sys/types.h>
10829 #include <sys/time.h>
10830 #include <unistd.h>
10831 #include <pthread.h>
10832 #ifndef NULL
10833 #define NULL (void*) 0
10834 #endif
10835
10836 static int fildes[2];
10837
10838 static void *task(p)
10839         void *p;
10840 {
10841         int i;
10842         struct timeval tv;
10843
10844         fd_set rfds;
10845
10846         tv.tv_sec=10;
10847         tv.tv_usec=0;
10848
10849         FD_ZERO(&rfds);
10850         FD_SET(fildes[0], &rfds);
10851
10852         /* we're not interested in any fds */
10853         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10854
10855         if(i < 0) {
10856                 perror("select");
10857                 exit(10);
10858         }
10859
10860         exit(0); /* if we exit here, the select blocked the whole process */
10861 }
10862
10863 int main(argc, argv)
10864         int argc;
10865         char **argv;
10866 {
10867         pthread_t t;
10868
10869         /* create a pipe to select */
10870         if(pipe(&fildes[0])) {
10871                 perror("select");
10872                 exit(1);
10873         }
10874
10875 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10876         (void) pthread_setconcurrency(2);
10877 #else
10878 #ifdef HAVE_THR_SETCONCURRENCY
10879         /* Set Solaris LWP concurrency to 2 */
10880         thr_setconcurrency(2);
10881 #endif
10882 #endif
10883
10884 #if HAVE_PTHREADS_D4
10885         pthread_create(&t, pthread_attr_default, task, NULL);
10886 #else
10887         pthread_create(&t, NULL, task, NULL);
10888 #endif
10889
10890 #if HAVE_SCHED_YIELD
10891         sched_yield();  /* make sure task runs first */
10892 #else
10893 #ifdef HAVE_PTHREAD_YIELD
10894         pthread_yield();        /* make sure task runs first */
10895 #endif
10896 #endif
10897
10898         exit(2);
10899 }
10900 EOF
10901 if { (eval echo configure:10902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10902 then
10903   ol_cv_pthread_select_yields=no
10904 else
10905   echo "configure: failed program was:" >&5
10906   cat conftest.$ac_ext >&5
10907   rm -fr conftest*
10908   ol_cv_pthread_select_yields=yes
10909 fi
10910 rm -fr conftest*
10911 fi
10912
10913 fi
10914
10915 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10916
10917                                 if test $ol_cv_pthread_select_yields = cross ; then
10918                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10919                                 fi
10920
10921                                 if test $ol_cv_pthread_select_yields = yes ; then
10922                                         ol_with_yielding_select=yes
10923                                 fi
10924                         fi
10925
10926                                                 CPPFLAGS="$save_CPPFLAGS"
10927                         LIBS="$save_LIBS"
10928                 else
10929                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10930                 fi
10931         fi
10932
10933         if test $ol_with_threads = posix ; then
10934                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10935         fi
10936 fi
10937
10938 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10939         -o $ol_with_threads = mach ; then
10940
10941                 for ac_hdr in mach/cthreads.h
10942 do
10943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10945 echo "configure:10946: checking for $ac_hdr" >&5
10946 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10947   echo $ac_n "(cached) $ac_c" 1>&6
10948 else
10949   cat > conftest.$ac_ext <<EOF
10950 #line 10951 "configure"
10951 #include "confdefs.h"
10952 #include <$ac_hdr>
10953 EOF
10954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10955 { (eval echo configure:10956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10957 if test -z "$ac_err"; then
10958   rm -rf conftest*
10959   eval "ac_cv_header_$ac_safe=yes"
10960 else
10961   echo "$ac_err" >&5
10962   echo "configure: failed program was:" >&5
10963   cat conftest.$ac_ext >&5
10964   rm -rf conftest*
10965   eval "ac_cv_header_$ac_safe=no"
10966 fi
10967 rm -f conftest*
10968 fi
10969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10970   echo "$ac_t""yes" 1>&6
10971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10972   cat >> confdefs.h <<EOF
10973 #define $ac_tr_hdr 1
10974 EOF
10975  
10976 else
10977   echo "$ac_t""no" 1>&6
10978 fi
10979 done
10980
10981         if test $ac_cv_header_mach_cthreads_h = yes ; then
10982                 ol_with_threads=found
10983
10984                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10985 echo "configure:10986: checking for cthread_fork" >&5
10986 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10987   echo $ac_n "(cached) $ac_c" 1>&6
10988 else
10989   cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992 /* System header to define __stub macros and hopefully few prototypes,
10993     which can conflict with char cthread_fork(); below.  */
10994 #include <assert.h>
10995 /* Override any gcc2 internal prototype to avoid an error.  */
10996 /* We use char because int might match the return type of a gcc2
10997     builtin and then its argument prototype would still apply.  */
10998 char cthread_fork();
10999 char (*f)();
11000
11001 int main() {
11002
11003 /* The GNU C library defines this for functions which it implements
11004     to always fail with ENOSYS.  Some functions are actually named
11005     something starting with __ and the normal name is an alias.  */
11006 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
11007 choke me
11008 #else
11009 f = cthread_fork;
11010 #endif
11011
11012 ; return 0; }
11013 EOF
11014 if { (eval echo configure:11015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11015   rm -rf conftest*
11016   eval "ac_cv_func_cthread_fork=yes"
11017 else
11018   echo "configure: failed program was:" >&5
11019   cat conftest.$ac_ext >&5
11020   rm -rf conftest*
11021   eval "ac_cv_func_cthread_fork=no"
11022 fi
11023 rm -f conftest*
11024 fi
11025
11026 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
11027   echo "$ac_t""yes" 1>&6
11028   ol_link_threads=yes
11029 else
11030   echo "$ac_t""no" 1>&6
11031 fi
11032
11033
11034                 if test $ol_link_threads = no ; then
11035                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
11036 echo "configure:11037: checking for cthread_fork with -all_load" >&5
11037 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
11038   echo $ac_n "(cached) $ac_c" 1>&6
11039 else
11040   
11041                                                                 save_LIBS="$LIBS"
11042                                 LIBS="-all_load $LIBS"
11043                                 cat > conftest.$ac_ext <<EOF
11044 #line 11045 "configure"
11045 #include "confdefs.h"
11046 #include <mach/cthreads.h>
11047 int main() {
11048
11049                                         cthread_fork((void *)0, (void *)0);
11050                                         
11051 ; return 0; }
11052 EOF
11053 if { (eval echo configure:11054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11054   rm -rf conftest*
11055   ol_cv_cthread_all_load=yes
11056 else
11057   echo "configure: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   rm -rf conftest*
11060   ol_cv_cthread_all_load=no
11061 fi
11062 rm -f conftest*
11063                                                                 LIBS="$save_LIBS"
11064                         
11065 fi
11066
11067 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
11068
11069                         if test $ol_cv_cthread_all_load = yes ; then
11070                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
11071                                 ol_link_threads=mach
11072                         fi
11073                 fi
11074
11075                 if test $ol_link_threads != no ; then
11076                         : check for cthread specific functionality here
11077                         cat >> confdefs.h <<\EOF
11078 #define HAVE_MACH_CTHREADS 1
11079 EOF
11080
11081                 else
11082                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
11083                 fi
11084         fi
11085
11086         if test $ol_with_threads = mach ; then
11087                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
11088         fi
11089 fi
11090
11091 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11092         -o $ol_with_threads = pth ; then
11093
11094         for ac_hdr in pth.h
11095 do
11096 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11097 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11098 echo "configure:11099: checking for $ac_hdr" >&5
11099 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11100   echo $ac_n "(cached) $ac_c" 1>&6
11101 else
11102   cat > conftest.$ac_ext <<EOF
11103 #line 11104 "configure"
11104 #include "confdefs.h"
11105 #include <$ac_hdr>
11106 EOF
11107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11108 { (eval echo configure:11109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11110 if test -z "$ac_err"; then
11111   rm -rf conftest*
11112   eval "ac_cv_header_$ac_safe=yes"
11113 else
11114   echo "$ac_err" >&5
11115   echo "configure: failed program was:" >&5
11116   cat conftest.$ac_ext >&5
11117   rm -rf conftest*
11118   eval "ac_cv_header_$ac_safe=no"
11119 fi
11120 rm -f conftest*
11121 fi
11122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11123   echo "$ac_t""yes" 1>&6
11124     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11125   cat >> confdefs.h <<EOF
11126 #define $ac_tr_hdr 1
11127 EOF
11128  
11129 else
11130   echo "$ac_t""no" 1>&6
11131 fi
11132 done
11133
11134
11135         if test $ac_cv_header_pth_h = yes ; then
11136                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11137 echo "configure:11138: checking for pth_version in -lpth" >&5
11138 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11140   echo $ac_n "(cached) $ac_c" 1>&6
11141 else
11142   ac_save_LIBS="$LIBS"
11143 LIBS="-lpth  $LIBS"
11144 cat > conftest.$ac_ext <<EOF
11145 #line 11146 "configure"
11146 #include "confdefs.h"
11147 /* Override any gcc2 internal prototype to avoid an error.  */
11148 /* We use char because int might match the return type of a gcc2
11149     builtin and then its argument prototype would still apply.  */
11150 char pth_version();
11151
11152 int main() {
11153 pth_version()
11154 ; return 0; }
11155 EOF
11156 if { (eval echo configure:11157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11157   rm -rf conftest*
11158   eval "ac_cv_lib_$ac_lib_var=yes"
11159 else
11160   echo "configure: failed program was:" >&5
11161   cat conftest.$ac_ext >&5
11162   rm -rf conftest*
11163   eval "ac_cv_lib_$ac_lib_var=no"
11164 fi
11165 rm -f conftest*
11166 LIBS="$ac_save_LIBS"
11167
11168 fi
11169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11170   echo "$ac_t""yes" 1>&6
11171   have_pth=yes
11172 else
11173   echo "$ac_t""no" 1>&6
11174 have_pth=no
11175 fi
11176
11177
11178                 if test $have_pth = yes ; then
11179                         cat >> confdefs.h <<\EOF
11180 #define HAVE_GNU_PTH 1
11181 EOF
11182
11183                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11184                         ol_link_threads=pth
11185
11186                         if test $ol_with_yielding_select = auto ; then
11187                                 ol_with_yielding_select=yes
11188                         fi
11189                 fi
11190         fi
11191 fi
11192
11193 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11194         -o $ol_with_threads = lwp ; then
11195
11196                 for ac_hdr in thread.h synch.h
11197 do
11198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11200 echo "configure:11201: checking for $ac_hdr" >&5
11201 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11202   echo $ac_n "(cached) $ac_c" 1>&6
11203 else
11204   cat > conftest.$ac_ext <<EOF
11205 #line 11206 "configure"
11206 #include "confdefs.h"
11207 #include <$ac_hdr>
11208 EOF
11209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11210 { (eval echo configure:11211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11212 if test -z "$ac_err"; then
11213   rm -rf conftest*
11214   eval "ac_cv_header_$ac_safe=yes"
11215 else
11216   echo "$ac_err" >&5
11217   echo "configure: failed program was:" >&5
11218   cat conftest.$ac_ext >&5
11219   rm -rf conftest*
11220   eval "ac_cv_header_$ac_safe=no"
11221 fi
11222 rm -f conftest*
11223 fi
11224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11225   echo "$ac_t""yes" 1>&6
11226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11227   cat >> confdefs.h <<EOF
11228 #define $ac_tr_hdr 1
11229 EOF
11230  
11231 else
11232   echo "$ac_t""no" 1>&6
11233 fi
11234 done
11235
11236         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11237                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11238 echo "configure:11239: checking for thr_create in -lthread" >&5
11239 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11241   echo $ac_n "(cached) $ac_c" 1>&6
11242 else
11243   ac_save_LIBS="$LIBS"
11244 LIBS="-lthread  $LIBS"
11245 cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 /* Override any gcc2 internal prototype to avoid an error.  */
11249 /* We use char because int might match the return type of a gcc2
11250     builtin and then its argument prototype would still apply.  */
11251 char thr_create();
11252
11253 int main() {
11254 thr_create()
11255 ; return 0; }
11256 EOF
11257 if { (eval echo configure:11258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11258   rm -rf conftest*
11259   eval "ac_cv_lib_$ac_lib_var=yes"
11260 else
11261   echo "configure: failed program was:" >&5
11262   cat conftest.$ac_ext >&5
11263   rm -rf conftest*
11264   eval "ac_cv_lib_$ac_lib_var=no"
11265 fi
11266 rm -f conftest*
11267 LIBS="$ac_save_LIBS"
11268
11269 fi
11270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11271   echo "$ac_t""yes" 1>&6
11272   have_thr=yes
11273 else
11274   echo "$ac_t""no" 1>&6
11275 have_thr=no
11276 fi
11277
11278
11279                 if test $have_thr = yes ; then
11280                         cat >> confdefs.h <<\EOF
11281 #define HAVE_THR 1
11282 EOF
11283
11284                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11285                         ol_link_threads=thr
11286
11287                         if test $ol_with_yielding_select = auto ; then
11288                                 ol_with_yielding_select=yes
11289                         fi
11290
11291                                                 for ac_func in \
11292                                 thr_setconcurrency \
11293                                 thr_getconcurrency \
11294                         
11295 do
11296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11297 echo "configure:11298: checking for $ac_func" >&5
11298 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11299   echo $ac_n "(cached) $ac_c" 1>&6
11300 else
11301   cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304 /* System header to define __stub macros and hopefully few prototypes,
11305     which can conflict with char $ac_func(); below.  */
11306 #include <assert.h>
11307 /* Override any gcc2 internal prototype to avoid an error.  */
11308 /* We use char because int might match the return type of a gcc2
11309     builtin and then its argument prototype would still apply.  */
11310 char $ac_func();
11311 char (*f)();
11312
11313 int main() {
11314
11315 /* The GNU C library defines this for functions which it implements
11316     to always fail with ENOSYS.  Some functions are actually named
11317     something starting with __ and the normal name is an alias.  */
11318 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11319 choke me
11320 #else
11321 f = $ac_func;
11322 #endif
11323
11324 ; return 0; }
11325 EOF
11326 if { (eval echo configure:11327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11327   rm -rf conftest*
11328   eval "ac_cv_func_$ac_func=yes"
11329 else
11330   echo "configure: failed program was:" >&5
11331   cat conftest.$ac_ext >&5
11332   rm -rf conftest*
11333   eval "ac_cv_func_$ac_func=no"
11334 fi
11335 rm -f conftest*
11336 fi
11337
11338 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11339   echo "$ac_t""yes" 1>&6
11340     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11341   cat >> confdefs.h <<EOF
11342 #define $ac_tr_func 1
11343 EOF
11344  
11345 else
11346   echo "$ac_t""no" 1>&6
11347 fi
11348 done
11349
11350                 fi
11351         fi
11352
11353                 for ac_hdr in lwp/lwp.h
11354 do
11355 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11356 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11357 echo "configure:11358: checking for $ac_hdr" >&5
11358 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11359   echo $ac_n "(cached) $ac_c" 1>&6
11360 else
11361   cat > conftest.$ac_ext <<EOF
11362 #line 11363 "configure"
11363 #include "confdefs.h"
11364 #include <$ac_hdr>
11365 EOF
11366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11367 { (eval echo configure:11368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11369 if test -z "$ac_err"; then
11370   rm -rf conftest*
11371   eval "ac_cv_header_$ac_safe=yes"
11372 else
11373   echo "$ac_err" >&5
11374   echo "configure: failed program was:" >&5
11375   cat conftest.$ac_ext >&5
11376   rm -rf conftest*
11377   eval "ac_cv_header_$ac_safe=no"
11378 fi
11379 rm -f conftest*
11380 fi
11381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11382   echo "$ac_t""yes" 1>&6
11383     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11384   cat >> confdefs.h <<EOF
11385 #define $ac_tr_hdr 1
11386 EOF
11387  
11388 else
11389   echo "$ac_t""no" 1>&6
11390 fi
11391 done
11392
11393         if test $ac_cv_header_lwp_lwp_h = yes ; then
11394                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11395 echo "configure:11396: checking for lwp_create in -llwp" >&5
11396 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11397 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11398   echo $ac_n "(cached) $ac_c" 1>&6
11399 else
11400   ac_save_LIBS="$LIBS"
11401 LIBS="-llwp  $LIBS"
11402 cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405 /* Override any gcc2 internal prototype to avoid an error.  */
11406 /* We use char because int might match the return type of a gcc2
11407     builtin and then its argument prototype would still apply.  */
11408 char lwp_create();
11409
11410 int main() {
11411 lwp_create()
11412 ; return 0; }
11413 EOF
11414 if { (eval echo configure:11415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11415   rm -rf conftest*
11416   eval "ac_cv_lib_$ac_lib_var=yes"
11417 else
11418   echo "configure: failed program was:" >&5
11419   cat conftest.$ac_ext >&5
11420   rm -rf conftest*
11421   eval "ac_cv_lib_$ac_lib_var=no"
11422 fi
11423 rm -f conftest*
11424 LIBS="$ac_save_LIBS"
11425
11426 fi
11427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11428   echo "$ac_t""yes" 1>&6
11429   have_lwp=yes
11430 else
11431   echo "$ac_t""no" 1>&6
11432 have_lwp=no
11433 fi
11434
11435
11436                 if test $have_lwp = yes ; then
11437                         cat >> confdefs.h <<\EOF
11438 #define HAVE_LWP 1
11439 EOF
11440
11441                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11442                         ol_link_threads=lwp
11443
11444                         if test $ol_with_yielding_select = auto ; then
11445                                 ol_with_yielding_select=no
11446                         fi
11447                 fi
11448         fi
11449 fi
11450
11451 if test $ol_with_yielding_select = yes ; then
11452         cat >> confdefs.h <<\EOF
11453 #define HAVE_YIELDING_SELECT 1
11454 EOF
11455
11456 fi
11457
11458 if test $ol_with_threads = manual ; then
11459                 ol_link_threads=yes
11460
11461         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11462
11463         for ac_hdr in pthread.h sched.h
11464 do
11465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11467 echo "configure:11468: checking for $ac_hdr" >&5
11468 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11469   echo $ac_n "(cached) $ac_c" 1>&6
11470 else
11471   cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474 #include <$ac_hdr>
11475 EOF
11476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11477 { (eval echo configure:11478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11479 if test -z "$ac_err"; then
11480   rm -rf conftest*
11481   eval "ac_cv_header_$ac_safe=yes"
11482 else
11483   echo "$ac_err" >&5
11484   echo "configure: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   rm -rf conftest*
11487   eval "ac_cv_header_$ac_safe=no"
11488 fi
11489 rm -f conftest*
11490 fi
11491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11492   echo "$ac_t""yes" 1>&6
11493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11494   cat >> confdefs.h <<EOF
11495 #define $ac_tr_hdr 1
11496 EOF
11497  
11498 else
11499   echo "$ac_t""no" 1>&6
11500 fi
11501 done
11502
11503         for ac_func in sched_yield pthread_yield
11504 do
11505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11506 echo "configure:11507: checking for $ac_func" >&5
11507 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11508   echo $ac_n "(cached) $ac_c" 1>&6
11509 else
11510   cat > conftest.$ac_ext <<EOF
11511 #line 11512 "configure"
11512 #include "confdefs.h"
11513 /* System header to define __stub macros and hopefully few prototypes,
11514     which can conflict with char $ac_func(); below.  */
11515 #include <assert.h>
11516 /* Override any gcc2 internal prototype to avoid an error.  */
11517 /* We use char because int might match the return type of a gcc2
11518     builtin and then its argument prototype would still apply.  */
11519 char $ac_func();
11520 char (*f)();
11521
11522 int main() {
11523
11524 /* The GNU C library defines this for functions which it implements
11525     to always fail with ENOSYS.  Some functions are actually named
11526     something starting with __ and the normal name is an alias.  */
11527 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11528 choke me
11529 #else
11530 f = $ac_func;
11531 #endif
11532
11533 ; return 0; }
11534 EOF
11535 if { (eval echo configure:11536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11536   rm -rf conftest*
11537   eval "ac_cv_func_$ac_func=yes"
11538 else
11539   echo "configure: failed program was:" >&5
11540   cat conftest.$ac_ext >&5
11541   rm -rf conftest*
11542   eval "ac_cv_func_$ac_func=no"
11543 fi
11544 rm -f conftest*
11545 fi
11546
11547 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11548   echo "$ac_t""yes" 1>&6
11549     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11550   cat >> confdefs.h <<EOF
11551 #define $ac_tr_func 1
11552 EOF
11553  
11554 else
11555   echo "$ac_t""no" 1>&6
11556 fi
11557 done
11558
11559         
11560         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11561 echo "configure:11562: checking for LinuxThreads pthread.h" >&5
11562 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11563   echo $ac_n "(cached) $ac_c" 1>&6
11564 else
11565   cat > conftest.$ac_ext <<EOF
11566 #line 11567 "configure"
11567 #include "confdefs.h"
11568 #include <pthread.h>
11569 EOF
11570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11571   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11572   rm -rf conftest*
11573   ol_cv_header_linux_threads=yes
11574 else
11575   rm -rf conftest*
11576   ol_cv_header_linux_threads=no
11577 fi
11578 rm -f conftest*
11579
11580                 
11581 fi
11582
11583 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11584         if test $ol_cv_header_linux_threads = yes; then
11585                 cat >> confdefs.h <<\EOF
11586 #define HAVE_LINUX_THREADS 1
11587 EOF
11588
11589         fi
11590
11591
11592         for ac_hdr in mach/cthreads.h
11593 do
11594 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11595 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11596 echo "configure:11597: checking for $ac_hdr" >&5
11597 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11598   echo $ac_n "(cached) $ac_c" 1>&6
11599 else
11600   cat > conftest.$ac_ext <<EOF
11601 #line 11602 "configure"
11602 #include "confdefs.h"
11603 #include <$ac_hdr>
11604 EOF
11605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11606 { (eval echo configure:11607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11608 if test -z "$ac_err"; then
11609   rm -rf conftest*
11610   eval "ac_cv_header_$ac_safe=yes"
11611 else
11612   echo "$ac_err" >&5
11613   echo "configure: failed program was:" >&5
11614   cat conftest.$ac_ext >&5
11615   rm -rf conftest*
11616   eval "ac_cv_header_$ac_safe=no"
11617 fi
11618 rm -f conftest*
11619 fi
11620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11621   echo "$ac_t""yes" 1>&6
11622     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11623   cat >> confdefs.h <<EOF
11624 #define $ac_tr_hdr 1
11625 EOF
11626  
11627 else
11628   echo "$ac_t""no" 1>&6
11629 fi
11630 done
11631
11632         for ac_hdr in lwp/lwp.h
11633 do
11634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11636 echo "configure:11637: checking for $ac_hdr" >&5
11637 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11638   echo $ac_n "(cached) $ac_c" 1>&6
11639 else
11640   cat > conftest.$ac_ext <<EOF
11641 #line 11642 "configure"
11642 #include "confdefs.h"
11643 #include <$ac_hdr>
11644 EOF
11645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11646 { (eval echo configure:11647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11648 if test -z "$ac_err"; then
11649   rm -rf conftest*
11650   eval "ac_cv_header_$ac_safe=yes"
11651 else
11652   echo "$ac_err" >&5
11653   echo "configure: failed program was:" >&5
11654   cat conftest.$ac_ext >&5
11655   rm -rf conftest*
11656   eval "ac_cv_header_$ac_safe=no"
11657 fi
11658 rm -f conftest*
11659 fi
11660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11661   echo "$ac_t""yes" 1>&6
11662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11663   cat >> confdefs.h <<EOF
11664 #define $ac_tr_hdr 1
11665 EOF
11666  
11667 else
11668   echo "$ac_t""no" 1>&6
11669 fi
11670 done
11671
11672         for ac_hdr in thread.h synch.h
11673 do
11674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11675 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11676 echo "configure:11677: checking for $ac_hdr" >&5
11677 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11678   echo $ac_n "(cached) $ac_c" 1>&6
11679 else
11680   cat > conftest.$ac_ext <<EOF
11681 #line 11682 "configure"
11682 #include "confdefs.h"
11683 #include <$ac_hdr>
11684 EOF
11685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11686 { (eval echo configure:11687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11688 if test -z "$ac_err"; then
11689   rm -rf conftest*
11690   eval "ac_cv_header_$ac_safe=yes"
11691 else
11692   echo "$ac_err" >&5
11693   echo "configure: failed program was:" >&5
11694   cat conftest.$ac_ext >&5
11695   rm -rf conftest*
11696   eval "ac_cv_header_$ac_safe=no"
11697 fi
11698 rm -f conftest*
11699 fi
11700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11701   echo "$ac_t""yes" 1>&6
11702     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11703   cat >> confdefs.h <<EOF
11704 #define $ac_tr_hdr 1
11705 EOF
11706  
11707 else
11708   echo "$ac_t""no" 1>&6
11709 fi
11710 done
11711
11712 fi
11713
11714 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11715                         cat >> confdefs.h <<\EOF
11716 #define REENTRANT 1
11717 EOF
11718
11719         cat >> confdefs.h <<\EOF
11720 #define _REENTRANT 1
11721 EOF
11722
11723         cat >> confdefs.h <<\EOF
11724 #define THREAD_SAFE 1
11725 EOF
11726
11727         cat >> confdefs.h <<\EOF
11728 #define _THREAD_SAFE 1
11729 EOF
11730
11731         cat >> confdefs.h <<\EOF
11732 #define THREADSAFE 1
11733 EOF
11734
11735         cat >> confdefs.h <<\EOF
11736 #define _THREADSAFE 1
11737 EOF
11738
11739         cat >> confdefs.h <<\EOF
11740 #define _SGI_MP_SOURCE 1
11741 EOF
11742
11743
11744                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11745 echo "configure:11746: checking for thread specific errno" >&5
11746 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11747   echo $ac_n "(cached) $ac_c" 1>&6
11748 else
11749   
11750                 cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 #include <errno.h>
11754 int main() {
11755 errno = 0;
11756 ; return 0; }
11757 EOF
11758 if { (eval echo configure:11759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11759   rm -rf conftest*
11760   ol_cv_errno_thread_specific=yes
11761 else
11762   echo "configure: failed program was:" >&5
11763   cat conftest.$ac_ext >&5
11764   rm -rf conftest*
11765   ol_cv_errno_thread_specific=no
11766 fi
11767 rm -f conftest*
11768         
11769 fi
11770
11771 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11772
11773                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11774 echo "configure:11775: checking for thread specific h_errno" >&5
11775 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11776   echo $ac_n "(cached) $ac_c" 1>&6
11777 else
11778   
11779                 cat > conftest.$ac_ext <<EOF
11780 #line 11781 "configure"
11781 #include "confdefs.h"
11782 #include <netdb.h>
11783 int main() {
11784 h_errno = 0;
11785 ; return 0; }
11786 EOF
11787 if { (eval echo configure:11788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11788   rm -rf conftest*
11789   ol_cv_h_errno_thread_specific=yes
11790 else
11791   echo "configure: failed program was:" >&5
11792   cat conftest.$ac_ext >&5
11793   rm -rf conftest*
11794   ol_cv_h_errno_thread_specific=no
11795 fi
11796 rm -f conftest*
11797         
11798 fi
11799
11800 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11801
11802         if test $ol_cv_errno_thread_specific != yes \
11803                 -o $ol_cv_h_errno_thread_specific != yes ; then
11804                 LIBS="$LTHREAD_LIBS $LIBS"
11805                 LTHREAD_LIBS=""
11806         fi
11807
11808 fi  
11809
11810 if test $ol_link_threads = no ; then
11811         if test $ol_with_threads = yes ; then
11812                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11813         fi
11814
11815         if test $ol_with_threads = auto ; then
11816                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11817                 ol_with_threads=no
11818         fi
11819
11820         cat >> confdefs.h <<\EOF
11821 #define NO_THREADS 1
11822 EOF
11823
11824         LTHREAD_LIBS=""
11825 fi
11826
11827 if test $ol_link_threads != no ; then
11828         cat >> confdefs.h <<\EOF
11829 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11830 EOF
11831
11832 fi
11833
11834 ol_link_ldbm=no 
11835
11836 if test $ol_with_ldbm_api = auto \
11837         -o $ol_with_ldbm_api = berkeley \
11838         -o $ol_with_ldbm_api = bcompat ; then
11839
11840         if test $ol_with_ldbm_api = bcompat; then \
11841                 ol_cv_berkeley_db=no
11842 for ac_hdr in db_185.h db.h
11843 do
11844 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11845 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11846 echo "configure:11847: checking for $ac_hdr" >&5
11847 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11848   echo $ac_n "(cached) $ac_c" 1>&6
11849 else
11850   cat > conftest.$ac_ext <<EOF
11851 #line 11852 "configure"
11852 #include "confdefs.h"
11853 #include <$ac_hdr>
11854 EOF
11855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11856 { (eval echo configure:11857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11858 if test -z "$ac_err"; then
11859   rm -rf conftest*
11860   eval "ac_cv_header_$ac_safe=yes"
11861 else
11862   echo "$ac_err" >&5
11863   echo "configure: failed program was:" >&5
11864   cat conftest.$ac_ext >&5
11865   rm -rf conftest*
11866   eval "ac_cv_header_$ac_safe=no"
11867 fi
11868 rm -f conftest*
11869 fi
11870 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11871   echo "$ac_t""yes" 1>&6
11872     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11873   cat >> confdefs.h <<EOF
11874 #define $ac_tr_hdr 1
11875 EOF
11876  
11877 else
11878   echo "$ac_t""no" 1>&6
11879 fi
11880 done
11881
11882 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11883         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11884 echo "configure:11885: checking if Berkeley DB header compatibility" >&5
11885 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11886   echo $ac_n "(cached) $ac_c" 1>&6
11887 else
11888   
11889                 cat > conftest.$ac_ext <<EOF
11890 #line 11891 "configure"
11891 #include "confdefs.h"
11892
11893 #if HAVE_DB_185_H
11894 #       include <db_185.h>
11895 #else
11896 #       include <db.h>
11897 #endif
11898
11899  /* this check could be improved */
11900 #ifndef DB_VERSION_MAJOR
11901 #       define DB_VERSION_MAJOR 1
11902 #endif
11903
11904 #if DB_VERSION_MAJOR == 1 
11905         __db_version_1
11906 #endif
11907
11908 EOF
11909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11910   egrep "__db_version_1" >/dev/null 2>&1; then
11911   rm -rf conftest*
11912   ol_cv_header_db1=yes
11913 else
11914   rm -rf conftest*
11915   ol_cv_header_db1=no
11916 fi
11917 rm -f conftest*
11918
11919 fi
11920
11921 echo "$ac_t""$ol_cv_header_db1" 1>&6
11922
11923         if test ol_cv_header_db1=yes ; then
11924                 ol_cv_lib_db=no
11925 if test $ol_cv_lib_db = no ; then
11926         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11927 echo "configure:11928: checking for Berkeley DB link (default)" >&5
11928 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11929   echo $ac_n "(cached) $ac_c" 1>&6
11930 else
11931   
11932         ol_DB_LIB=
11933         ol_LIBS=$LIBS
11934         LIBS="$ol_DB_LIB $LIBS"
11935
11936         cat > conftest.$ac_ext <<EOF
11937 #line 11938 "configure"
11938 #include "confdefs.h"
11939
11940 #ifdef HAVE_DB_185_H
11941 # include <db_185.h>
11942 #else
11943 # include <db.h>
11944 #endif
11945
11946 #ifndef DB_VERSION_MAJOR
11947 # define DB_VERSION_MAJOR 1
11948 #endif
11949
11950 #ifndef NULL
11951 #define NULL ((void*)0)
11952 #endif
11953
11954 int main() {
11955
11956 #if DB_VERSION_MAJOR > 2
11957         db_env_create( NULL, 0 );
11958 #elif DB_VERSION_MAJOR > 1
11959         db_appexit( NULL );
11960 #else
11961         (void) dbopen( NULL, 0, 0, 0, NULL);
11962 #endif
11963
11964 ; return 0; }
11965 EOF
11966 if { (eval echo configure:11967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11967   rm -rf conftest*
11968   ol_cv_db_none=yes
11969 else
11970   echo "configure: failed program was:" >&5
11971   cat conftest.$ac_ext >&5
11972   rm -rf conftest*
11973   ol_cv_db_none=no
11974 fi
11975 rm -f conftest*
11976
11977         LIBS="$ol_LIBS"
11978
11979 fi
11980
11981 echo "$ac_t""$ol_cv_db_none" 1>&6
11982
11983         if test $ol_cv_db_none = yes ; then
11984                 ol_cv_lib_db=yes
11985         fi
11986 fi
11987
11988 if test $ol_cv_lib_db = no ; then
11989         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11990 echo "configure:11991: checking for Berkeley DB link (-ldb)" >&5
11991 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11992   echo $ac_n "(cached) $ac_c" 1>&6
11993 else
11994   
11995         ol_DB_LIB=-ldb
11996         ol_LIBS=$LIBS
11997         LIBS="$ol_DB_LIB $LIBS"
11998
11999         cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002
12003 #ifdef HAVE_DB_185_H
12004 # include <db_185.h>
12005 #else
12006 # include <db.h>
12007 #endif
12008
12009 #ifndef DB_VERSION_MAJOR
12010 # define DB_VERSION_MAJOR 1
12011 #endif
12012
12013 #ifndef NULL
12014 #define NULL ((void*)0)
12015 #endif
12016
12017 int main() {
12018
12019 #if DB_VERSION_MAJOR > 2
12020         db_env_create( NULL, 0 );
12021 #elif DB_VERSION_MAJOR > 1
12022         db_appexit( NULL );
12023 #else
12024         (void) dbopen( NULL, 0, 0, 0, NULL);
12025 #endif
12026
12027 ; return 0; }
12028 EOF
12029 if { (eval echo configure:12030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12030   rm -rf conftest*
12031   ol_cv_db_db=yes
12032 else
12033   echo "configure: failed program was:" >&5
12034   cat conftest.$ac_ext >&5
12035   rm -rf conftest*
12036   ol_cv_db_db=no
12037 fi
12038 rm -f conftest*
12039
12040         LIBS="$ol_LIBS"
12041
12042 fi
12043
12044 echo "$ac_t""$ol_cv_db_db" 1>&6
12045
12046         if test $ol_cv_db_db = yes ; then
12047                 ol_cv_lib_db=-ldb
12048         fi
12049 fi
12050
12051 if test $ol_cv_lib_db = no ; then
12052         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12053 echo "configure:12054: checking for Berkeley DB link (-ldb3)" >&5
12054 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12055   echo $ac_n "(cached) $ac_c" 1>&6
12056 else
12057   
12058         ol_DB_LIB=-ldb3
12059         ol_LIBS=$LIBS
12060         LIBS="$ol_DB_LIB $LIBS"
12061
12062         cat > conftest.$ac_ext <<EOF
12063 #line 12064 "configure"
12064 #include "confdefs.h"
12065
12066 #ifdef HAVE_DB_185_H
12067 # include <db_185.h>
12068 #else
12069 # include <db.h>
12070 #endif
12071
12072 #ifndef DB_VERSION_MAJOR
12073 # define DB_VERSION_MAJOR 1
12074 #endif
12075
12076 #ifndef NULL
12077 #define NULL ((void*)0)
12078 #endif
12079
12080 int main() {
12081
12082 #if DB_VERSION_MAJOR > 2
12083         db_env_create( NULL, 0 );
12084 #elif DB_VERSION_MAJOR > 1
12085         db_appexit( NULL );
12086 #else
12087         (void) dbopen( NULL, 0, 0, 0, NULL);
12088 #endif
12089
12090 ; return 0; }
12091 EOF
12092 if { (eval echo configure:12093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12093   rm -rf conftest*
12094   ol_cv_db_db3=yes
12095 else
12096   echo "configure: failed program was:" >&5
12097   cat conftest.$ac_ext >&5
12098   rm -rf conftest*
12099   ol_cv_db_db3=no
12100 fi
12101 rm -f conftest*
12102
12103         LIBS="$ol_LIBS"
12104
12105 fi
12106
12107 echo "$ac_t""$ol_cv_db_db3" 1>&6
12108
12109         if test $ol_cv_db_db3 = yes ; then
12110                 ol_cv_lib_db=-ldb3
12111         fi
12112 fi
12113
12114 if test $ol_cv_lib_db = no ; then
12115         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12116 echo "configure:12117: checking for Berkeley DB link (-ldb2)" >&5
12117 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12118   echo $ac_n "(cached) $ac_c" 1>&6
12119 else
12120   
12121         ol_DB_LIB=-ldb2
12122         ol_LIBS=$LIBS
12123         LIBS="$ol_DB_LIB $LIBS"
12124
12125         cat > conftest.$ac_ext <<EOF
12126 #line 12127 "configure"
12127 #include "confdefs.h"
12128
12129 #ifdef HAVE_DB_185_H
12130 # include <db_185.h>
12131 #else
12132 # include <db.h>
12133 #endif
12134
12135 #ifndef DB_VERSION_MAJOR
12136 # define DB_VERSION_MAJOR 1
12137 #endif
12138
12139 #ifndef NULL
12140 #define NULL ((void*)0)
12141 #endif
12142
12143 int main() {
12144
12145 #if DB_VERSION_MAJOR > 2
12146         db_env_create( NULL, 0 );
12147 #elif DB_VERSION_MAJOR > 1
12148         db_appexit( NULL );
12149 #else
12150         (void) dbopen( NULL, 0, 0, 0, NULL);
12151 #endif
12152
12153 ; return 0; }
12154 EOF
12155 if { (eval echo configure:12156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12156   rm -rf conftest*
12157   ol_cv_db_db2=yes
12158 else
12159   echo "configure: failed program was:" >&5
12160   cat conftest.$ac_ext >&5
12161   rm -rf conftest*
12162   ol_cv_db_db2=no
12163 fi
12164 rm -f conftest*
12165
12166         LIBS="$ol_LIBS"
12167
12168 fi
12169
12170 echo "$ac_t""$ol_cv_db_db2" 1>&6
12171
12172         if test $ol_cv_db_db2 = yes ; then
12173                 ol_cv_lib_db=-ldb2
12174         fi
12175 fi
12176
12177 if test $ol_cv_lib_db = no ; then
12178         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12179 echo "configure:12180: checking for Berkeley DB link (-ldb1)" >&5
12180 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12181   echo $ac_n "(cached) $ac_c" 1>&6
12182 else
12183   
12184         ol_DB_LIB=-ldb1
12185         ol_LIBS=$LIBS
12186         LIBS="$ol_DB_LIB $LIBS"
12187
12188         cat > conftest.$ac_ext <<EOF
12189 #line 12190 "configure"
12190 #include "confdefs.h"
12191
12192 #ifdef HAVE_DB_185_H
12193 # include <db_185.h>
12194 #else
12195 # include <db.h>
12196 #endif
12197
12198 #ifndef DB_VERSION_MAJOR
12199 # define DB_VERSION_MAJOR 1
12200 #endif
12201
12202 #ifndef NULL
12203 #define NULL ((void*)0)
12204 #endif
12205
12206 int main() {
12207
12208 #if DB_VERSION_MAJOR > 2
12209         db_env_create( NULL, 0 );
12210 #elif DB_VERSION_MAJOR > 1
12211         db_appexit( NULL );
12212 #else
12213         (void) dbopen( NULL, 0, 0, 0, NULL);
12214 #endif
12215
12216 ; return 0; }
12217 EOF
12218 if { (eval echo configure:12219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12219   rm -rf conftest*
12220   ol_cv_db_db1=yes
12221 else
12222   echo "configure: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   rm -rf conftest*
12225   ol_cv_db_db1=no
12226 fi
12227 rm -f conftest*
12228
12229         LIBS="$ol_LIBS"
12230
12231 fi
12232
12233 echo "$ac_t""$ol_cv_db_db1" 1>&6
12234
12235         if test $ol_cv_db_db1 = yes ; then
12236                 ol_cv_lib_db=-ldb1
12237         fi
12238 fi
12239
12240
12241                 if test "$ol_cv_lib_db" != no ; then
12242                         ol_cv_berkeley_db=yes
12243                 fi
12244         fi
12245 fi
12246
12247         else
12248                 ol_cv_berkeley_db=no
12249 for ac_hdr in db.h
12250 do
12251 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12252 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12253 echo "configure:12254: checking for $ac_hdr" >&5
12254 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12255   echo $ac_n "(cached) $ac_c" 1>&6
12256 else
12257   cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 #include <$ac_hdr>
12261 EOF
12262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12263 { (eval echo configure:12264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12265 if test -z "$ac_err"; then
12266   rm -rf conftest*
12267   eval "ac_cv_header_$ac_safe=yes"
12268 else
12269   echo "$ac_err" >&5
12270   echo "configure: failed program was:" >&5
12271   cat conftest.$ac_ext >&5
12272   rm -rf conftest*
12273   eval "ac_cv_header_$ac_safe=no"
12274 fi
12275 rm -f conftest*
12276 fi
12277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12278   echo "$ac_t""yes" 1>&6
12279     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12280   cat >> confdefs.h <<EOF
12281 #define $ac_tr_hdr 1
12282 EOF
12283  
12284 else
12285   echo "$ac_t""no" 1>&6
12286 fi
12287 done
12288
12289 if test $ac_cv_header_db_h = yes; then
12290         ol_cv_lib_db=no
12291 if test $ol_cv_lib_db = no ; then
12292         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12293 echo "configure:12294: checking for Berkeley DB link (default)" >&5
12294 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12295   echo $ac_n "(cached) $ac_c" 1>&6
12296 else
12297   
12298         ol_DB_LIB=
12299         ol_LIBS=$LIBS
12300         LIBS="$ol_DB_LIB $LIBS"
12301
12302         cat > conftest.$ac_ext <<EOF
12303 #line 12304 "configure"
12304 #include "confdefs.h"
12305
12306 #ifdef HAVE_DB_185_H
12307 # include <db_185.h>
12308 #else
12309 # include <db.h>
12310 #endif
12311
12312 #ifndef DB_VERSION_MAJOR
12313 # define DB_VERSION_MAJOR 1
12314 #endif
12315
12316 #ifndef NULL
12317 #define NULL ((void*)0)
12318 #endif
12319
12320 int main() {
12321
12322 #if DB_VERSION_MAJOR > 2
12323         db_env_create( NULL, 0 );
12324 #elif DB_VERSION_MAJOR > 1
12325         db_appexit( NULL );
12326 #else
12327         (void) dbopen( NULL, 0, 0, 0, NULL);
12328 #endif
12329
12330 ; return 0; }
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12333   rm -rf conftest*
12334   ol_cv_db_none=yes
12335 else
12336   echo "configure: failed program was:" >&5
12337   cat conftest.$ac_ext >&5
12338   rm -rf conftest*
12339   ol_cv_db_none=no
12340 fi
12341 rm -f conftest*
12342
12343         LIBS="$ol_LIBS"
12344
12345 fi
12346
12347 echo "$ac_t""$ol_cv_db_none" 1>&6
12348
12349         if test $ol_cv_db_none = yes ; then
12350                 ol_cv_lib_db=yes
12351         fi
12352 fi
12353
12354 if test $ol_cv_lib_db = no ; then
12355         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12356 echo "configure:12357: checking for Berkeley DB link (-ldb)" >&5
12357 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12358   echo $ac_n "(cached) $ac_c" 1>&6
12359 else
12360   
12361         ol_DB_LIB=-ldb
12362         ol_LIBS=$LIBS
12363         LIBS="$ol_DB_LIB $LIBS"
12364
12365         cat > conftest.$ac_ext <<EOF
12366 #line 12367 "configure"
12367 #include "confdefs.h"
12368
12369 #ifdef HAVE_DB_185_H
12370 # include <db_185.h>
12371 #else
12372 # include <db.h>
12373 #endif
12374
12375 #ifndef DB_VERSION_MAJOR
12376 # define DB_VERSION_MAJOR 1
12377 #endif
12378
12379 #ifndef NULL
12380 #define NULL ((void*)0)
12381 #endif
12382
12383 int main() {
12384
12385 #if DB_VERSION_MAJOR > 2
12386         db_env_create( NULL, 0 );
12387 #elif DB_VERSION_MAJOR > 1
12388         db_appexit( NULL );
12389 #else
12390         (void) dbopen( NULL, 0, 0, 0, NULL);
12391 #endif
12392
12393 ; return 0; }
12394 EOF
12395 if { (eval echo configure:12396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12396   rm -rf conftest*
12397   ol_cv_db_db=yes
12398 else
12399   echo "configure: failed program was:" >&5
12400   cat conftest.$ac_ext >&5
12401   rm -rf conftest*
12402   ol_cv_db_db=no
12403 fi
12404 rm -f conftest*
12405
12406         LIBS="$ol_LIBS"
12407
12408 fi
12409
12410 echo "$ac_t""$ol_cv_db_db" 1>&6
12411
12412         if test $ol_cv_db_db = yes ; then
12413                 ol_cv_lib_db=-ldb
12414         fi
12415 fi
12416
12417 if test $ol_cv_lib_db = no ; then
12418         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12419 echo "configure:12420: checking for Berkeley DB link (-ldb3)" >&5
12420 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12421   echo $ac_n "(cached) $ac_c" 1>&6
12422 else
12423   
12424         ol_DB_LIB=-ldb3
12425         ol_LIBS=$LIBS
12426         LIBS="$ol_DB_LIB $LIBS"
12427
12428         cat > conftest.$ac_ext <<EOF
12429 #line 12430 "configure"
12430 #include "confdefs.h"
12431
12432 #ifdef HAVE_DB_185_H
12433 # include <db_185.h>
12434 #else
12435 # include <db.h>
12436 #endif
12437
12438 #ifndef DB_VERSION_MAJOR
12439 # define DB_VERSION_MAJOR 1
12440 #endif
12441
12442 #ifndef NULL
12443 #define NULL ((void*)0)
12444 #endif
12445
12446 int main() {
12447
12448 #if DB_VERSION_MAJOR > 2
12449         db_env_create( NULL, 0 );
12450 #elif DB_VERSION_MAJOR > 1
12451         db_appexit( NULL );
12452 #else
12453         (void) dbopen( NULL, 0, 0, 0, NULL);
12454 #endif
12455
12456 ; return 0; }
12457 EOF
12458 if { (eval echo configure:12459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12459   rm -rf conftest*
12460   ol_cv_db_db3=yes
12461 else
12462   echo "configure: failed program was:" >&5
12463   cat conftest.$ac_ext >&5
12464   rm -rf conftest*
12465   ol_cv_db_db3=no
12466 fi
12467 rm -f conftest*
12468
12469         LIBS="$ol_LIBS"
12470
12471 fi
12472
12473 echo "$ac_t""$ol_cv_db_db3" 1>&6
12474
12475         if test $ol_cv_db_db3 = yes ; then
12476                 ol_cv_lib_db=-ldb3
12477         fi
12478 fi
12479
12480 if test $ol_cv_lib_db = no ; then
12481         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12482 echo "configure:12483: checking for Berkeley DB link (-ldb2)" >&5
12483 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12484   echo $ac_n "(cached) $ac_c" 1>&6
12485 else
12486   
12487         ol_DB_LIB=-ldb2
12488         ol_LIBS=$LIBS
12489         LIBS="$ol_DB_LIB $LIBS"
12490
12491         cat > conftest.$ac_ext <<EOF
12492 #line 12493 "configure"
12493 #include "confdefs.h"
12494
12495 #ifdef HAVE_DB_185_H
12496 # include <db_185.h>
12497 #else
12498 # include <db.h>
12499 #endif
12500
12501 #ifndef DB_VERSION_MAJOR
12502 # define DB_VERSION_MAJOR 1
12503 #endif
12504
12505 #ifndef NULL
12506 #define NULL ((void*)0)
12507 #endif
12508
12509 int main() {
12510
12511 #if DB_VERSION_MAJOR > 2
12512         db_env_create( NULL, 0 );
12513 #elif DB_VERSION_MAJOR > 1
12514         db_appexit( NULL );
12515 #else
12516         (void) dbopen( NULL, 0, 0, 0, NULL);
12517 #endif
12518
12519 ; return 0; }
12520 EOF
12521 if { (eval echo configure:12522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12522   rm -rf conftest*
12523   ol_cv_db_db2=yes
12524 else
12525   echo "configure: failed program was:" >&5
12526   cat conftest.$ac_ext >&5
12527   rm -rf conftest*
12528   ol_cv_db_db2=no
12529 fi
12530 rm -f conftest*
12531
12532         LIBS="$ol_LIBS"
12533
12534 fi
12535
12536 echo "$ac_t""$ol_cv_db_db2" 1>&6
12537
12538         if test $ol_cv_db_db2 = yes ; then
12539                 ol_cv_lib_db=-ldb2
12540         fi
12541 fi
12542
12543 if test $ol_cv_lib_db = no ; then
12544         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12545 echo "configure:12546: checking for Berkeley DB link (-ldb1)" >&5
12546 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12547   echo $ac_n "(cached) $ac_c" 1>&6
12548 else
12549   
12550         ol_DB_LIB=-ldb1
12551         ol_LIBS=$LIBS
12552         LIBS="$ol_DB_LIB $LIBS"
12553
12554         cat > conftest.$ac_ext <<EOF
12555 #line 12556 "configure"
12556 #include "confdefs.h"
12557
12558 #ifdef HAVE_DB_185_H
12559 # include <db_185.h>
12560 #else
12561 # include <db.h>
12562 #endif
12563
12564 #ifndef DB_VERSION_MAJOR
12565 # define DB_VERSION_MAJOR 1
12566 #endif
12567
12568 #ifndef NULL
12569 #define NULL ((void*)0)
12570 #endif
12571
12572 int main() {
12573
12574 #if DB_VERSION_MAJOR > 2
12575         db_env_create( NULL, 0 );
12576 #elif DB_VERSION_MAJOR > 1
12577         db_appexit( NULL );
12578 #else
12579         (void) dbopen( NULL, 0, 0, 0, NULL);
12580 #endif
12581
12582 ; return 0; }
12583 EOF
12584 if { (eval echo configure:12585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12585   rm -rf conftest*
12586   ol_cv_db_db1=yes
12587 else
12588   echo "configure: failed program was:" >&5
12589   cat conftest.$ac_ext >&5
12590   rm -rf conftest*
12591   ol_cv_db_db1=no
12592 fi
12593 rm -f conftest*
12594
12595         LIBS="$ol_LIBS"
12596
12597 fi
12598
12599 echo "$ac_t""$ol_cv_db_db1" 1>&6
12600
12601         if test $ol_cv_db_db1 = yes ; then
12602                 ol_cv_lib_db=-ldb1
12603         fi
12604 fi
12605
12606
12607         if test "$ol_cv_lib_db" != no ; then
12608                 ol_cv_berkeley_db=yes
12609                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12610 echo "configure:12611: checking for Berkeley DB thread support" >&5
12611 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12612   echo $ac_n "(cached) $ac_c" 1>&6
12613 else
12614   
12615         ol_LIBS="$LIBS"
12616         if test $ol_cv_lib_db != yes ; then
12617                 LIBS="$ol_cv_lib_db"
12618         fi
12619
12620         if test "$cross_compiling" = yes; then
12621   ol_cv_berkeley_db_thread=cross
12622 else
12623   cat > conftest.$ac_ext <<EOF
12624 #line 12625 "configure"
12625 #include "confdefs.h"
12626
12627 #ifdef HAVE_DB_185_H
12628         choke me;
12629 #else
12630 #include <db.h>
12631 #endif
12632 #ifndef NULL
12633 #define NULL ((void *)0)
12634 #endif
12635 main()
12636 {
12637         int rc;
12638         u_int32_t flags = DB_CREATE | DB_THREAD;
12639
12640 #if DB_VERSION_MAJOR > 2
12641         DB_ENV *env = NULL;
12642
12643         rc = db_env_create( &env, 0 );
12644
12645         if( rc == 0 ) {
12646 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12647                 rc = env->open( env, NULL, flags, 0 );
12648 #else
12649                 rc = env->open( env, NULL, NULL, flags, 0 );
12650 #endif
12651         }
12652
12653 #else
12654         DB_ENV env;
12655         memset( &env, '\0', sizeof(env) );
12656
12657         rc = db_appinit( NULL, NULL, &env, flags );
12658
12659         if( rc == 0 ) {
12660                 db_appexit( &env );
12661         }
12662 #endif
12663 #if DB_VERSION_MAJOR > 2
12664 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12665         env->remove( env, NULL, DB_FORCE);
12666 #else
12667         env->remove( env, NULL, NULL, DB_FORCE);
12668 #endif
12669 #endif
12670
12671         return rc;
12672 }
12673 EOF
12674 if { (eval echo configure:12675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12675 then
12676   ol_cv_berkeley_db_thread=yes
12677 else
12678   echo "configure: failed program was:" >&5
12679   cat conftest.$ac_ext >&5
12680   rm -fr conftest*
12681   ol_cv_berkeley_db_thread=no
12682 fi
12683 rm -fr conftest*
12684 fi
12685
12686
12687         LIBS="$ol_LIBS"
12688
12689         if test $ol_cv_berkeley_db_thread != no ; then
12690                 cat >> confdefs.h <<\EOF
12691 #define HAVE_BERKELEY_DB_THREAD 1
12692 EOF
12693
12694         fi
12695
12696 fi
12697
12698 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12699         fi
12700 fi
12701
12702         fi
12703
12704         if test $ol_cv_berkeley_db != no ; then
12705                 cat >> confdefs.h <<\EOF
12706 #define HAVE_BERKELEY_DB 1
12707 EOF
12708
12709
12710                 ol_link_ldbm=berkeley
12711                 ol_with_ldbm_api=db
12712
12713                 if test $ol_with_ldbm_type = hash ; then
12714                         cat >> confdefs.h <<\EOF
12715 #define LDBM_USE_DBHASH 1
12716 EOF
12717
12718                 else
12719                         cat >> confdefs.h <<\EOF
12720 #define LDBM_USE_DBBTREE 1
12721 EOF
12722
12723                 fi
12724
12725                                                 if test $ol_cv_lib_db != yes ; then
12726                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12727                 fi
12728         fi
12729 fi
12730
12731 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12732         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12733         ol_with_ldbm_api=none
12734 fi
12735
12736 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12737         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12738 echo "configure:12739: checking for MDBM library" >&5
12739 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12740   echo $ac_n "(cached) $ac_c" 1>&6
12741 else
12742         ol_LIBS="$LIBS"
12743         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12744 echo "configure:12745: checking for mdbm_set_chain" >&5
12745 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12746   echo $ac_n "(cached) $ac_c" 1>&6
12747 else
12748   cat > conftest.$ac_ext <<EOF
12749 #line 12750 "configure"
12750 #include "confdefs.h"
12751 /* System header to define __stub macros and hopefully few prototypes,
12752     which can conflict with char mdbm_set_chain(); below.  */
12753 #include <assert.h>
12754 /* Override any gcc2 internal prototype to avoid an error.  */
12755 /* We use char because int might match the return type of a gcc2
12756     builtin and then its argument prototype would still apply.  */
12757 char mdbm_set_chain();
12758 char (*f)();
12759
12760 int main() {
12761
12762 /* The GNU C library defines this for functions which it implements
12763     to always fail with ENOSYS.  Some functions are actually named
12764     something starting with __ and the normal name is an alias.  */
12765 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12766 choke me
12767 #else
12768 f = mdbm_set_chain;
12769 #endif
12770
12771 ; return 0; }
12772 EOF
12773 if { (eval echo configure:12774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12774   rm -rf conftest*
12775   eval "ac_cv_func_mdbm_set_chain=yes"
12776 else
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -rf conftest*
12780   eval "ac_cv_func_mdbm_set_chain=no"
12781 fi
12782 rm -f conftest*
12783 fi
12784
12785 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12786   echo "$ac_t""yes" 1>&6
12787   ol_cv_lib_mdbm=yes
12788 else
12789   echo "$ac_t""no" 1>&6
12790
12791                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12792 echo "configure:12793: checking for mdbm_set_chain in -lmdbm" >&5
12793 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12795   echo $ac_n "(cached) $ac_c" 1>&6
12796 else
12797   ac_save_LIBS="$LIBS"
12798 LIBS="-lmdbm  $LIBS"
12799 cat > conftest.$ac_ext <<EOF
12800 #line 12801 "configure"
12801 #include "confdefs.h"
12802 /* Override any gcc2 internal prototype to avoid an error.  */
12803 /* We use char because int might match the return type of a gcc2
12804     builtin and then its argument prototype would still apply.  */
12805 char mdbm_set_chain();
12806
12807 int main() {
12808 mdbm_set_chain()
12809 ; return 0; }
12810 EOF
12811 if { (eval echo configure:12812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12812   rm -rf conftest*
12813   eval "ac_cv_lib_$ac_lib_var=yes"
12814 else
12815   echo "configure: failed program was:" >&5
12816   cat conftest.$ac_ext >&5
12817   rm -rf conftest*
12818   eval "ac_cv_lib_$ac_lib_var=no"
12819 fi
12820 rm -f conftest*
12821 LIBS="$ac_save_LIBS"
12822
12823 fi
12824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12825   echo "$ac_t""yes" 1>&6
12826   ol_cv_lib_mdbm=-lmdbm
12827 else
12828   echo "$ac_t""no" 1>&6
12829 ol_cv_lib_mdbm=no
12830 fi
12831
12832         
12833 fi
12834
12835         LIBS="$ol_LIBS"
12836
12837 fi
12838
12839 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12840
12841
12842  for ac_hdr in mdbm.h
12843 do
12844 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12845 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12846 echo "configure:12847: checking for $ac_hdr" >&5
12847 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12848   echo $ac_n "(cached) $ac_c" 1>&6
12849 else
12850   cat > conftest.$ac_ext <<EOF
12851 #line 12852 "configure"
12852 #include "confdefs.h"
12853 #include <$ac_hdr>
12854 EOF
12855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12856 { (eval echo configure:12857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12858 if test -z "$ac_err"; then
12859   rm -rf conftest*
12860   eval "ac_cv_header_$ac_safe=yes"
12861 else
12862   echo "$ac_err" >&5
12863   echo "configure: failed program was:" >&5
12864   cat conftest.$ac_ext >&5
12865   rm -rf conftest*
12866   eval "ac_cv_header_$ac_safe=no"
12867 fi
12868 rm -f conftest*
12869 fi
12870 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12871   echo "$ac_t""yes" 1>&6
12872     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12873   cat >> confdefs.h <<EOF
12874 #define $ac_tr_hdr 1
12875 EOF
12876  
12877 else
12878   echo "$ac_t""no" 1>&6
12879 fi
12880 done
12881
12882  echo $ac_n "checking for db""... $ac_c" 1>&6
12883 echo "configure:12884: checking for db" >&5
12884 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12885   echo $ac_n "(cached) $ac_c" 1>&6
12886 else
12887   
12888         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12889                 ol_cv_mdbm=no
12890         else
12891                 ol_cv_mdbm=yes
12892         fi
12893
12894 fi
12895
12896 echo "$ac_t""$ol_cv_mdbm" 1>&6
12897  if test $ol_cv_mdbm = yes ; then
12898         cat >> confdefs.h <<\EOF
12899 #define HAVE_MDBM 1
12900 EOF
12901
12902  fi
12903
12904
12905         if test $ol_cv_mdbm = yes ; then
12906                 ol_link_ldbm=mdbm
12907                 ol_with_ldbm_api=mdbm
12908                 if test $ol_cv_lib_mdbm != yes ; then
12909                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12910                 fi
12911         fi
12912 fi
12913
12914 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12915         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12916 echo "configure:12917: checking for GDBM library" >&5
12917 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12918   echo $ac_n "(cached) $ac_c" 1>&6
12919 else
12920         ol_LIBS="$LIBS"
12921         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12922 echo "configure:12923: checking for gdbm_open" >&5
12923 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12924   echo $ac_n "(cached) $ac_c" 1>&6
12925 else
12926   cat > conftest.$ac_ext <<EOF
12927 #line 12928 "configure"
12928 #include "confdefs.h"
12929 /* System header to define __stub macros and hopefully few prototypes,
12930     which can conflict with char gdbm_open(); below.  */
12931 #include <assert.h>
12932 /* Override any gcc2 internal prototype to avoid an error.  */
12933 /* We use char because int might match the return type of a gcc2
12934     builtin and then its argument prototype would still apply.  */
12935 char gdbm_open();
12936 char (*f)();
12937
12938 int main() {
12939
12940 /* The GNU C library defines this for functions which it implements
12941     to always fail with ENOSYS.  Some functions are actually named
12942     something starting with __ and the normal name is an alias.  */
12943 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12944 choke me
12945 #else
12946 f = gdbm_open;
12947 #endif
12948
12949 ; return 0; }
12950 EOF
12951 if { (eval echo configure:12952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12952   rm -rf conftest*
12953   eval "ac_cv_func_gdbm_open=yes"
12954 else
12955   echo "configure: failed program was:" >&5
12956   cat conftest.$ac_ext >&5
12957   rm -rf conftest*
12958   eval "ac_cv_func_gdbm_open=no"
12959 fi
12960 rm -f conftest*
12961 fi
12962
12963 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12964   echo "$ac_t""yes" 1>&6
12965   ol_cv_lib_gdbm=yes
12966 else
12967   echo "$ac_t""no" 1>&6
12968
12969                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12970 echo "configure:12971: checking for gdbm_open in -lgdbm" >&5
12971 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12972 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12973   echo $ac_n "(cached) $ac_c" 1>&6
12974 else
12975   ac_save_LIBS="$LIBS"
12976 LIBS="-lgdbm  $LIBS"
12977 cat > conftest.$ac_ext <<EOF
12978 #line 12979 "configure"
12979 #include "confdefs.h"
12980 /* Override any gcc2 internal prototype to avoid an error.  */
12981 /* We use char because int might match the return type of a gcc2
12982     builtin and then its argument prototype would still apply.  */
12983 char gdbm_open();
12984
12985 int main() {
12986 gdbm_open()
12987 ; return 0; }
12988 EOF
12989 if { (eval echo configure:12990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12990   rm -rf conftest*
12991   eval "ac_cv_lib_$ac_lib_var=yes"
12992 else
12993   echo "configure: failed program was:" >&5
12994   cat conftest.$ac_ext >&5
12995   rm -rf conftest*
12996   eval "ac_cv_lib_$ac_lib_var=no"
12997 fi
12998 rm -f conftest*
12999 LIBS="$ac_save_LIBS"
13000
13001 fi
13002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13003   echo "$ac_t""yes" 1>&6
13004   ol_cv_lib_gdbm=-lgdbm
13005 else
13006   echo "$ac_t""no" 1>&6
13007 ol_cv_lib_gdbm=no
13008 fi
13009
13010         
13011 fi
13012
13013         LIBS="$ol_LIBS"
13014
13015 fi
13016
13017 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
13018
13019
13020  for ac_hdr in gdbm.h
13021 do
13022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13024 echo "configure:13025: checking for $ac_hdr" >&5
13025 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13026   echo $ac_n "(cached) $ac_c" 1>&6
13027 else
13028   cat > conftest.$ac_ext <<EOF
13029 #line 13030 "configure"
13030 #include "confdefs.h"
13031 #include <$ac_hdr>
13032 EOF
13033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13034 { (eval echo configure:13035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13036 if test -z "$ac_err"; then
13037   rm -rf conftest*
13038   eval "ac_cv_header_$ac_safe=yes"
13039 else
13040   echo "$ac_err" >&5
13041   echo "configure: failed program was:" >&5
13042   cat conftest.$ac_ext >&5
13043   rm -rf conftest*
13044   eval "ac_cv_header_$ac_safe=no"
13045 fi
13046 rm -f conftest*
13047 fi
13048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13049   echo "$ac_t""yes" 1>&6
13050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13051   cat >> confdefs.h <<EOF
13052 #define $ac_tr_hdr 1
13053 EOF
13054  
13055 else
13056   echo "$ac_t""no" 1>&6
13057 fi
13058 done
13059
13060  echo $ac_n "checking for db""... $ac_c" 1>&6
13061 echo "configure:13062: checking for db" >&5
13062 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
13063   echo $ac_n "(cached) $ac_c" 1>&6
13064 else
13065   
13066         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
13067                 ol_cv_gdbm=no
13068         else
13069                 ol_cv_gdbm=yes
13070         fi
13071
13072 fi
13073
13074 echo "$ac_t""$ol_cv_gdbm" 1>&6
13075  if test $ol_cv_gdbm = yes ; then
13076         cat >> confdefs.h <<\EOF
13077 #define HAVE_GDBM 1
13078 EOF
13079
13080  fi
13081
13082
13083         if test $ol_cv_gdbm = yes ; then
13084                 ol_link_ldbm=gdbm
13085                 ol_with_ldbm_api=gdbm
13086
13087                 if test $ol_cv_lib_gdbm != yes ; then
13088                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
13089                 fi
13090         fi
13091 fi
13092
13093 if test $ol_with_ldbm_api = ndbm ; then
13094         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
13095 echo "configure:13096: checking for NDBM library" >&5
13096 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
13097   echo $ac_n "(cached) $ac_c" 1>&6
13098 else
13099         ol_LIBS="$LIBS"
13100         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13101 echo "configure:13102: checking for dbm_open" >&5
13102 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
13103   echo $ac_n "(cached) $ac_c" 1>&6
13104 else
13105   cat > conftest.$ac_ext <<EOF
13106 #line 13107 "configure"
13107 #include "confdefs.h"
13108 /* System header to define __stub macros and hopefully few prototypes,
13109     which can conflict with char dbm_open(); below.  */
13110 #include <assert.h>
13111 /* Override any gcc2 internal prototype to avoid an error.  */
13112 /* We use char because int might match the return type of a gcc2
13113     builtin and then its argument prototype would still apply.  */
13114 char dbm_open();
13115 char (*f)();
13116
13117 int main() {
13118
13119 /* The GNU C library defines this for functions which it implements
13120     to always fail with ENOSYS.  Some functions are actually named
13121     something starting with __ and the normal name is an alias.  */
13122 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13123 choke me
13124 #else
13125 f = dbm_open;
13126 #endif
13127
13128 ; return 0; }
13129 EOF
13130 if { (eval echo configure:13131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13131   rm -rf conftest*
13132   eval "ac_cv_func_dbm_open=yes"
13133 else
13134   echo "configure: failed program was:" >&5
13135   cat conftest.$ac_ext >&5
13136   rm -rf conftest*
13137   eval "ac_cv_func_dbm_open=no"
13138 fi
13139 rm -f conftest*
13140 fi
13141
13142 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13143   echo "$ac_t""yes" 1>&6
13144   ol_cv_lib_ndbm=yes
13145 else
13146   echo "$ac_t""no" 1>&6
13147
13148                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13149 echo "configure:13150: checking for dbm_open in -lndbm" >&5
13150 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13152   echo $ac_n "(cached) $ac_c" 1>&6
13153 else
13154   ac_save_LIBS="$LIBS"
13155 LIBS="-lndbm  $LIBS"
13156 cat > conftest.$ac_ext <<EOF
13157 #line 13158 "configure"
13158 #include "confdefs.h"
13159 /* Override any gcc2 internal prototype to avoid an error.  */
13160 /* We use char because int might match the return type of a gcc2
13161     builtin and then its argument prototype would still apply.  */
13162 char dbm_open();
13163
13164 int main() {
13165 dbm_open()
13166 ; return 0; }
13167 EOF
13168 if { (eval echo configure:13169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13169   rm -rf conftest*
13170   eval "ac_cv_lib_$ac_lib_var=yes"
13171 else
13172   echo "configure: failed program was:" >&5
13173   cat conftest.$ac_ext >&5
13174   rm -rf conftest*
13175   eval "ac_cv_lib_$ac_lib_var=no"
13176 fi
13177 rm -f conftest*
13178 LIBS="$ac_save_LIBS"
13179
13180 fi
13181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13182   echo "$ac_t""yes" 1>&6
13183   ol_cv_lib_ndbm=-lndbm
13184 else
13185   echo "$ac_t""no" 1>&6
13186
13187                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13188 echo "configure:13189: checking for dbm_open in -ldbm" >&5
13189 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13191   echo $ac_n "(cached) $ac_c" 1>&6
13192 else
13193   ac_save_LIBS="$LIBS"
13194 LIBS="-ldbm  $LIBS"
13195 cat > conftest.$ac_ext <<EOF
13196 #line 13197 "configure"
13197 #include "confdefs.h"
13198 /* Override any gcc2 internal prototype to avoid an error.  */
13199 /* We use char because int might match the return type of a gcc2
13200     builtin and then its argument prototype would still apply.  */
13201 char dbm_open();
13202
13203 int main() {
13204 dbm_open()
13205 ; return 0; }
13206 EOF
13207 if { (eval echo configure:13208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13208   rm -rf conftest*
13209   eval "ac_cv_lib_$ac_lib_var=yes"
13210 else
13211   echo "configure: failed program was:" >&5
13212   cat conftest.$ac_ext >&5
13213   rm -rf conftest*
13214   eval "ac_cv_lib_$ac_lib_var=no"
13215 fi
13216 rm -f conftest*
13217 LIBS="$ac_save_LIBS"
13218
13219 fi
13220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13221   echo "$ac_t""yes" 1>&6
13222   ol_cv_lib_ndbm=-ldbm
13223 else
13224   echo "$ac_t""no" 1>&6
13225 ol_cv_lib_ndbm=no
13226 fi
13227                 
13228 fi
13229
13230         
13231 fi
13232
13233         LIBS="$ol_LIBS"
13234
13235 fi
13236
13237 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13238
13239
13240  for ac_hdr in ndbm.h
13241 do
13242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13244 echo "configure:13245: checking for $ac_hdr" >&5
13245 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13246   echo $ac_n "(cached) $ac_c" 1>&6
13247 else
13248   cat > conftest.$ac_ext <<EOF
13249 #line 13250 "configure"
13250 #include "confdefs.h"
13251 #include <$ac_hdr>
13252 EOF
13253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13254 { (eval echo configure:13255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13256 if test -z "$ac_err"; then
13257   rm -rf conftest*
13258   eval "ac_cv_header_$ac_safe=yes"
13259 else
13260   echo "$ac_err" >&5
13261   echo "configure: failed program was:" >&5
13262   cat conftest.$ac_ext >&5
13263   rm -rf conftest*
13264   eval "ac_cv_header_$ac_safe=no"
13265 fi
13266 rm -f conftest*
13267 fi
13268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13269   echo "$ac_t""yes" 1>&6
13270     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13271   cat >> confdefs.h <<EOF
13272 #define $ac_tr_hdr 1
13273 EOF
13274  
13275 else
13276   echo "$ac_t""no" 1>&6
13277 fi
13278 done
13279
13280  echo $ac_n "checking for db""... $ac_c" 1>&6
13281 echo "configure:13282: checking for db" >&5
13282 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13283   echo $ac_n "(cached) $ac_c" 1>&6
13284 else
13285   
13286         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13287                 ol_cv_ndbm=no
13288         else
13289                 ol_cv_ndbm=yes
13290         fi
13291
13292 fi
13293
13294 echo "$ac_t""$ol_cv_ndbm" 1>&6
13295  if test $ol_cv_ndbm = yes ; then
13296         cat >> confdefs.h <<\EOF
13297 #define HAVE_NDBM 1
13298 EOF
13299
13300  fi
13301
13302
13303         if test $ol_cv_ndbm = yes ; then
13304                 ol_link_ldbm=ndbm
13305                 ol_with_ldbm_api=ndbm
13306
13307                 if test $ol_cv_lib_ndbm != yes ; then
13308                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13309                 fi
13310         fi
13311 fi
13312
13313 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13314         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13315         if test $ol_enable_ldbm = yes ; then
13316                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13317         fi
13318
13319         echo "configure: warning: disabling LDBM" 1>&2
13320         ol_enable_ldbm=no
13321 fi
13322
13323 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13324         LINK_BINS_DYNAMIC="yes"
13325 else
13326         LINK_BINS_DYNAMIC="no"
13327 fi
13328
13329 if test $ol_enable_wrappers != no ; then
13330         for ac_hdr in tcpd.h
13331 do
13332 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13333 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13334 echo "configure:13335: checking for $ac_hdr" >&5
13335 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13336   echo $ac_n "(cached) $ac_c" 1>&6
13337 else
13338   cat > conftest.$ac_ext <<EOF
13339 #line 13340 "configure"
13340 #include "confdefs.h"
13341 #include <$ac_hdr>
13342 EOF
13343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13344 { (eval echo configure:13345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13346 if test -z "$ac_err"; then
13347   rm -rf conftest*
13348   eval "ac_cv_header_$ac_safe=yes"
13349 else
13350   echo "$ac_err" >&5
13351   echo "configure: failed program was:" >&5
13352   cat conftest.$ac_ext >&5
13353   rm -rf conftest*
13354   eval "ac_cv_header_$ac_safe=no"
13355 fi
13356 rm -f conftest*
13357 fi
13358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13359   echo "$ac_t""yes" 1>&6
13360     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13361   cat >> confdefs.h <<EOF
13362 #define $ac_tr_hdr 1
13363 EOF
13364  
13365 else
13366   echo "$ac_t""no" 1>&6
13367 fi
13368 done
13369
13370
13371         if test $ac_cv_header_tcpd_h != yes ; then
13372                 have_wrappers=no
13373         else
13374                 cat > conftest.$ac_ext <<EOF
13375 #line 13376 "configure"
13376 #include "confdefs.h"
13377
13378 int allow_severity = 0;
13379 int deny_severity  = 0;
13380                 
13381 int main() {
13382 hosts_access()
13383 ; return 0; }
13384 EOF
13385 if { (eval echo configure:13386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13386   rm -rf conftest*
13387   have_wrappers=yes
13388 else
13389   echo "configure: failed program was:" >&5
13390   cat conftest.$ac_ext >&5
13391   rm -rf conftest*
13392   have_wrappers=no
13393 fi
13394 rm -f conftest*
13395         fi
13396
13397         if test $have_wrappers = yes ; then
13398                 cat >> confdefs.h <<\EOF
13399 #define HAVE_TCPD 1
13400 EOF
13401
13402                 WRAP_LIBS="-lwrap"
13403
13404                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13405 echo "configure:13406: checking for main in -lnsl" >&5
13406 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13407 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13408   echo $ac_n "(cached) $ac_c" 1>&6
13409 else
13410   ac_save_LIBS="$LIBS"
13411 LIBS="-lnsl  $LIBS"
13412 cat > conftest.$ac_ext <<EOF
13413 #line 13414 "configure"
13414 #include "confdefs.h"
13415
13416 int main() {
13417 main()
13418 ; return 0; }
13419 EOF
13420 if { (eval echo configure:13421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13421   rm -rf conftest*
13422   eval "ac_cv_lib_$ac_lib_var=yes"
13423 else
13424   echo "configure: failed program was:" >&5
13425   cat conftest.$ac_ext >&5
13426   rm -rf conftest*
13427   eval "ac_cv_lib_$ac_lib_var=no"
13428 fi
13429 rm -f conftest*
13430 LIBS="$ac_save_LIBS"
13431
13432 fi
13433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13434   echo "$ac_t""yes" 1>&6
13435     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13436     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13437   cat >> confdefs.h <<EOF
13438 #define $ac_tr_lib 1
13439 EOF
13440
13441   LIBS="-lnsl $LIBS"
13442
13443 else
13444   echo "$ac_t""no" 1>&6
13445 fi
13446
13447         else
13448                 echo "configure: warning: could not find -lwrap" 1>&2
13449                 if test $ol_enable_wrappers = yes ; then
13450                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13451                 fi
13452
13453                 echo "configure: warning: disabling wrappers support" 1>&2
13454                 ol_enable_wrappers=no
13455                 WRAP_LIBS=""
13456         fi
13457 fi
13458
13459 if test $ol_enable_syslog != no ; then
13460         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13461 echo "configure:13462: checking for openlog" >&5
13462 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13463   echo $ac_n "(cached) $ac_c" 1>&6
13464 else
13465   cat > conftest.$ac_ext <<EOF
13466 #line 13467 "configure"
13467 #include "confdefs.h"
13468 /* System header to define __stub macros and hopefully few prototypes,
13469     which can conflict with char openlog(); below.  */
13470 #include <assert.h>
13471 /* Override any gcc2 internal prototype to avoid an error.  */
13472 /* We use char because int might match the return type of a gcc2
13473     builtin and then its argument prototype would still apply.  */
13474 char openlog();
13475 char (*f)();
13476
13477 int main() {
13478
13479 /* The GNU C library defines this for functions which it implements
13480     to always fail with ENOSYS.  Some functions are actually named
13481     something starting with __ and the normal name is an alias.  */
13482 #if defined (__stub_openlog) || defined (__stub___openlog)
13483 choke me
13484 #else
13485 f = openlog;
13486 #endif
13487
13488 ; return 0; }
13489 EOF
13490 if { (eval echo configure:13491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13491   rm -rf conftest*
13492   eval "ac_cv_func_openlog=yes"
13493 else
13494   echo "configure: failed program was:" >&5
13495   cat conftest.$ac_ext >&5
13496   rm -rf conftest*
13497   eval "ac_cv_func_openlog=no"
13498 fi
13499 rm -f conftest*
13500 fi
13501
13502 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13503   echo "$ac_t""yes" 1>&6
13504   :
13505 else
13506   echo "$ac_t""no" 1>&6
13507 fi
13508
13509         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13510                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13511         fi
13512         ol_enable_syslog=$ac_cv_func_openlog
13513 fi
13514
13515
13516 ol_link_sql=no
13517 if test $ol_enable_sql != no ; then
13518         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13519 echo "configure:13520: checking for SQLDriverConnect in -liodbc" >&5
13520 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13521 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13522   echo $ac_n "(cached) $ac_c" 1>&6
13523 else
13524   ac_save_LIBS="$LIBS"
13525 LIBS="-liodbc  $LIBS"
13526 cat > conftest.$ac_ext <<EOF
13527 #line 13528 "configure"
13528 #include "confdefs.h"
13529 /* Override any gcc2 internal prototype to avoid an error.  */
13530 /* We use char because int might match the return type of a gcc2
13531     builtin and then its argument prototype would still apply.  */
13532 char SQLDriverConnect();
13533
13534 int main() {
13535 SQLDriverConnect()
13536 ; return 0; }
13537 EOF
13538 if { (eval echo configure:13539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13539   rm -rf conftest*
13540   eval "ac_cv_lib_$ac_lib_var=yes"
13541 else
13542   echo "configure: failed program was:" >&5
13543   cat conftest.$ac_ext >&5
13544   rm -rf conftest*
13545   eval "ac_cv_lib_$ac_lib_var=no"
13546 fi
13547 rm -f conftest*
13548 LIBS="$ac_save_LIBS"
13549
13550 fi
13551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13552   echo "$ac_t""yes" 1>&6
13553   have_iodbc=yes
13554 else
13555   echo "$ac_t""no" 1>&6
13556 have_iodbc=no
13557 fi
13558
13559         if test $have_iodbc = yes ; then
13560                 ol_link_sql="-liodbc"
13561         else
13562                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13563 echo "configure:13564: checking for SQLDriverConnect in -lodbc" >&5
13564 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13565 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13566   echo $ac_n "(cached) $ac_c" 1>&6
13567 else
13568   ac_save_LIBS="$LIBS"
13569 LIBS="-lodbc  $LIBS"
13570 cat > conftest.$ac_ext <<EOF
13571 #line 13572 "configure"
13572 #include "confdefs.h"
13573 /* Override any gcc2 internal prototype to avoid an error.  */
13574 /* We use char because int might match the return type of a gcc2
13575     builtin and then its argument prototype would still apply.  */
13576 char SQLDriverConnect();
13577
13578 int main() {
13579 SQLDriverConnect()
13580 ; return 0; }
13581 EOF
13582 if { (eval echo configure:13583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13583   rm -rf conftest*
13584   eval "ac_cv_lib_$ac_lib_var=yes"
13585 else
13586   echo "configure: failed program was:" >&5
13587   cat conftest.$ac_ext >&5
13588   rm -rf conftest*
13589   eval "ac_cv_lib_$ac_lib_var=no"
13590 fi
13591 rm -f conftest*
13592 LIBS="$ac_save_LIBS"
13593
13594 fi
13595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13596   echo "$ac_t""yes" 1>&6
13597   have_odbc=yes
13598 else
13599   echo "$ac_t""no" 1>&6
13600 have_odbc=no
13601 fi
13602
13603                 if test $have_odbc = yes ; then
13604                         ol_link_sql="-lodbc"
13605                 fi
13606         fi
13607
13608         if test $ol_link_sql != no ; then
13609                 SLAPD_SQL_LIBS="$ol_link_sql"
13610
13611         elif test $ol_enable_sql != auto ; then
13612                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13613         fi
13614 fi
13615
13616 if test $ol_enable_tcl != no ; then
13617         for ac_hdr in tcl.h
13618 do
13619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13621 echo "configure:13622: checking for $ac_hdr" >&5
13622 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13623   echo $ac_n "(cached) $ac_c" 1>&6
13624 else
13625   cat > conftest.$ac_ext <<EOF
13626 #line 13627 "configure"
13627 #include "confdefs.h"
13628 #include <$ac_hdr>
13629 EOF
13630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13631 { (eval echo configure:13632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13633 if test -z "$ac_err"; then
13634   rm -rf conftest*
13635   eval "ac_cv_header_$ac_safe=yes"
13636 else
13637   echo "$ac_err" >&5
13638   echo "configure: failed program was:" >&5
13639   cat conftest.$ac_ext >&5
13640   rm -rf conftest*
13641   eval "ac_cv_header_$ac_safe=no"
13642 fi
13643 rm -f conftest*
13644 fi
13645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13646   echo "$ac_t""yes" 1>&6
13647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13648   cat >> confdefs.h <<EOF
13649 #define $ac_tr_hdr 1
13650 EOF
13651  
13652 else
13653   echo "$ac_t""no" 1>&6
13654 fi
13655 done
13656
13657
13658         if test $ac_cv_header_tcl_h != yes ; then
13659                 have_tcl=no
13660         else
13661                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13662                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13663 echo "configure:13664: checking for main in -l$lib" >&5
13664 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13665 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13666   echo $ac_n "(cached) $ac_c" 1>&6
13667 else
13668   ac_save_LIBS="$LIBS"
13669 LIBS="-l$lib  $LIBS"
13670 cat > conftest.$ac_ext <<EOF
13671 #line 13672 "configure"
13672 #include "confdefs.h"
13673
13674 int main() {
13675 main()
13676 ; return 0; }
13677 EOF
13678 if { (eval echo configure:13679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13679   rm -rf conftest*
13680   eval "ac_cv_lib_$ac_lib_var=yes"
13681 else
13682   echo "configure: failed program was:" >&5
13683   cat conftest.$ac_ext >&5
13684   rm -rf conftest*
13685   eval "ac_cv_lib_$ac_lib_var=no"
13686 fi
13687 rm -f conftest*
13688 LIBS="$ac_save_LIBS"
13689
13690 fi
13691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13692   echo "$ac_t""yes" 1>&6
13693   have_tcl=yes
13694                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13695                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13696                            else
13697                                MOD_TCL_LIB="-l${lib}"
13698                            fi;break
13699 else
13700   echo "$ac_t""no" 1>&6
13701 have_tcl=no
13702 fi
13703
13704                 done
13705         fi
13706
13707         if test $have_tcl != yes ; then
13708                 echo "configure: warning: could not find -ltcl" 1>&2
13709                 if test $ol_enable_tcl = yes ; then
13710                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13711                 fi
13712
13713                 ol_enable_tcl=no
13714         fi
13715 fi
13716
13717 ol_link_termcap=no
13718 for ac_hdr in termcap.h ncurses.h
13719 do
13720 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13721 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13722 echo "configure:13723: checking for $ac_hdr" >&5
13723 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13724   echo $ac_n "(cached) $ac_c" 1>&6
13725 else
13726   cat > conftest.$ac_ext <<EOF
13727 #line 13728 "configure"
13728 #include "confdefs.h"
13729 #include <$ac_hdr>
13730 EOF
13731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13732 { (eval echo configure:13733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13734 if test -z "$ac_err"; then
13735   rm -rf conftest*
13736   eval "ac_cv_header_$ac_safe=yes"
13737 else
13738   echo "$ac_err" >&5
13739   echo "configure: failed program was:" >&5
13740   cat conftest.$ac_ext >&5
13741   rm -rf conftest*
13742   eval "ac_cv_header_$ac_safe=no"
13743 fi
13744 rm -f conftest*
13745 fi
13746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13747   echo "$ac_t""yes" 1>&6
13748     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13749   cat >> confdefs.h <<EOF
13750 #define $ac_tr_hdr 1
13751 EOF
13752  
13753 else
13754   echo "$ac_t""no" 1>&6
13755 fi
13756 done
13757
13758
13759 if test $ol_link_termcap = no ; then
13760         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13761 echo "configure:13762: checking for tputs in -ltermcap" >&5
13762 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13764   echo $ac_n "(cached) $ac_c" 1>&6
13765 else
13766   ac_save_LIBS="$LIBS"
13767 LIBS="-ltermcap  $LIBS"
13768 cat > conftest.$ac_ext <<EOF
13769 #line 13770 "configure"
13770 #include "confdefs.h"
13771 /* Override any gcc2 internal prototype to avoid an error.  */
13772 /* We use char because int might match the return type of a gcc2
13773     builtin and then its argument prototype would still apply.  */
13774 char tputs();
13775
13776 int main() {
13777 tputs()
13778 ; return 0; }
13779 EOF
13780 if { (eval echo configure:13781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13781   rm -rf conftest*
13782   eval "ac_cv_lib_$ac_lib_var=yes"
13783 else
13784   echo "configure: failed program was:" >&5
13785   cat conftest.$ac_ext >&5
13786   rm -rf conftest*
13787   eval "ac_cv_lib_$ac_lib_var=no"
13788 fi
13789 rm -f conftest*
13790 LIBS="$ac_save_LIBS"
13791
13792 fi
13793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13794   echo "$ac_t""yes" 1>&6
13795   have_termcap=yes
13796 else
13797   echo "$ac_t""no" 1>&6
13798 have_termcap=no
13799 fi
13800
13801         if test $have_termcap = yes ; then
13802                 cat >> confdefs.h <<\EOF
13803 #define HAVE_TERMCAP 1
13804 EOF
13805
13806                 ol_link_termcap=yes
13807                 TERMCAP_LIBS=-ltermcap
13808         fi
13809 fi
13810
13811 if test $ol_link_termcap = no ; then
13812         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13813 echo "configure:13814: checking for initscr in -lncurses" >&5
13814 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13815 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13816   echo $ac_n "(cached) $ac_c" 1>&6
13817 else
13818   ac_save_LIBS="$LIBS"
13819 LIBS="-lncurses  $LIBS"
13820 cat > conftest.$ac_ext <<EOF
13821 #line 13822 "configure"
13822 #include "confdefs.h"
13823 /* Override any gcc2 internal prototype to avoid an error.  */
13824 /* We use char because int might match the return type of a gcc2
13825     builtin and then its argument prototype would still apply.  */
13826 char initscr();
13827
13828 int main() {
13829 initscr()
13830 ; return 0; }
13831 EOF
13832 if { (eval echo configure:13833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13833   rm -rf conftest*
13834   eval "ac_cv_lib_$ac_lib_var=yes"
13835 else
13836   echo "configure: failed program was:" >&5
13837   cat conftest.$ac_ext >&5
13838   rm -rf conftest*
13839   eval "ac_cv_lib_$ac_lib_var=no"
13840 fi
13841 rm -f conftest*
13842 LIBS="$ac_save_LIBS"
13843
13844 fi
13845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13846   echo "$ac_t""yes" 1>&6
13847   have_ncurses=yes
13848 else
13849   echo "$ac_t""no" 1>&6
13850 have_ncurses=no
13851 fi
13852
13853         if test $have_ncurses = yes ; then
13854                 cat >> confdefs.h <<\EOF
13855 #define HAVE_NCURSES 1
13856 EOF
13857
13858                 ol_link_termcap=yes
13859                 TERMCAP_LIBS=-lncurses
13860         fi
13861 fi
13862
13863 if test $ol_link_termcap = no ; then
13864         cat >> confdefs.h <<\EOF
13865 #define NO_TERMCAP 1
13866 EOF
13867
13868         TERMCAP_LIBS=
13869 fi
13870
13871 ol_link_sasl=no
13872 ol_link_spasswd=no
13873 if test $ol_with_cyrus_sasl != no ; then
13874         for ac_hdr in sasl.h
13875 do
13876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13878 echo "configure:13879: checking for $ac_hdr" >&5
13879 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13880   echo $ac_n "(cached) $ac_c" 1>&6
13881 else
13882   cat > conftest.$ac_ext <<EOF
13883 #line 13884 "configure"
13884 #include "confdefs.h"
13885 #include <$ac_hdr>
13886 EOF
13887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13888 { (eval echo configure:13889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13890 if test -z "$ac_err"; then
13891   rm -rf conftest*
13892   eval "ac_cv_header_$ac_safe=yes"
13893 else
13894   echo "$ac_err" >&5
13895   echo "configure: failed program was:" >&5
13896   cat conftest.$ac_ext >&5
13897   rm -rf conftest*
13898   eval "ac_cv_header_$ac_safe=no"
13899 fi
13900 rm -f conftest*
13901 fi
13902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13903   echo "$ac_t""yes" 1>&6
13904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13905   cat >> confdefs.h <<EOF
13906 #define $ac_tr_hdr 1
13907 EOF
13908  
13909 else
13910   echo "$ac_t""no" 1>&6
13911 fi
13912 done
13913
13914
13915         if test $ac_cv_header_sasl_h = yes ; then
13916                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13917 echo "configure:13918: checking for sasl_client_init in -lsasl" >&5
13918 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13920   echo $ac_n "(cached) $ac_c" 1>&6
13921 else
13922   ac_save_LIBS="$LIBS"
13923 LIBS="-lsasl  $LIBS"
13924 cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 /* Override any gcc2 internal prototype to avoid an error.  */
13928 /* We use char because int might match the return type of a gcc2
13929     builtin and then its argument prototype would still apply.  */
13930 char sasl_client_init();
13931
13932 int main() {
13933 sasl_client_init()
13934 ; return 0; }
13935 EOF
13936 if { (eval echo configure:13937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13937   rm -rf conftest*
13938   eval "ac_cv_lib_$ac_lib_var=yes"
13939 else
13940   echo "configure: failed program was:" >&5
13941   cat conftest.$ac_ext >&5
13942   rm -rf conftest*
13943   eval "ac_cv_lib_$ac_lib_var=no"
13944 fi
13945 rm -f conftest*
13946 LIBS="$ac_save_LIBS"
13947
13948 fi
13949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13950   echo "$ac_t""yes" 1>&6
13951   have_cyrus_sasl=yes
13952 else
13953   echo "$ac_t""no" 1>&6
13954 have_cyrus_sasl=no
13955 fi
13956
13957
13958                 if test $have_cyrus_sasl != no ; then
13959                         SASL_LIBS="-lsasl"
13960                         cat >> confdefs.h <<\EOF
13961 #define HAVE_CYRUS_SASL 1
13962 EOF
13963
13964                         ol_link_sasl=yes
13965                 fi
13966         fi
13967
13968         if test $ol_link_sasl = no ; then
13969                 if test $ol_with_cyrus_sasl != auto ; then
13970                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13971                 else
13972                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13973                         echo "configure: warning: SASL authentication not supported!" 1>&2
13974                         if test $ol_link_tls = no ; then
13975                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13976                         fi
13977                 fi
13978
13979         elif test $ol_enable_spasswd != no ; then
13980                 ol_link_spasswd=yes
13981         fi
13982
13983 else
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 if test $cross_compiling != yes ; then
13991         dev=no
13992         if test -r /dev/urandom ; then
13993                 dev="/dev/urandom";
13994         elif test -r /idev/urandom ; then
13995                 dev="/idev/urandom";
13996         elif test -r /dev/srandom ; then
13997                 dev="/dev/srandom";
13998         elif test -r /dev/random ; then
13999                 dev="/dev/random";
14000         elif test -r /idev/random ; then
14001                 dev="/idev/random";
14002         fi
14003
14004         if test $dev != no ; then
14005                 cat >> confdefs.h <<EOF
14006 #define URANDOM_DEVICE "$dev"
14007 EOF
14008
14009         fi
14010 fi
14011
14012 ol_link_fetch=no
14013 if test $ol_with_fetch != no ; then
14014         ol_LIBS=$LIBS
14015 LIBS="-lfetch -lcom_err $LIBS"
14016 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
14017 echo "configure:14018: checking fetch(3) library" >&5
14018 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
14019   echo $ac_n "(cached) $ac_c" 1>&6
14020 else
14021   
14022         cat > conftest.$ac_ext <<EOF
14023 #line 14024 "configure"
14024 #include "confdefs.h"
14025
14026 #include <sys/param.h>
14027 #include <stdio.h>
14028 #include <fetch.h>
14029 int main() {
14030 struct url *u = fetchParseURL("file:///"); 
14031 ; return 0; }
14032 EOF
14033 if { (eval echo configure:14034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14034   rm -rf conftest*
14035   ol_cv_lib_fetch=yes
14036 else
14037   echo "configure: failed program was:" >&5
14038   cat conftest.$ac_ext >&5
14039   rm -rf conftest*
14040   ol_cv_lib_fetch=no
14041 fi
14042 rm -f conftest*
14043 fi
14044
14045 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
14046 LIBS=$ol_LIBS
14047 if test $ol_cv_lib_fetch != no ; then
14048         ol_link_fetch="-lfetch -lcom_err"
14049         cat >> confdefs.h <<\EOF
14050 #define HAVE_FETCH 1
14051 EOF
14052
14053 fi
14054
14055
14056         if test $ol_cv_lib_fetch != no ; then
14057                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
14058                 ol_link_fetch=freebsd
14059
14060         elif test $ol_with_fetch != auto ; then
14061                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
14062         fi 
14063 fi
14064
14065 ol_link_readline=no
14066 if test $ol_with_readline != no ; then
14067         for ac_hdr in readline/readline.h readline/history.h
14068 do
14069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14071 echo "configure:14072: checking for $ac_hdr" >&5
14072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14073   echo $ac_n "(cached) $ac_c" 1>&6
14074 else
14075   cat > conftest.$ac_ext <<EOF
14076 #line 14077 "configure"
14077 #include "confdefs.h"
14078 #include <$ac_hdr>
14079 EOF
14080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14081 { (eval echo configure:14082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14083 if test -z "$ac_err"; then
14084   rm -rf conftest*
14085   eval "ac_cv_header_$ac_safe=yes"
14086 else
14087   echo "$ac_err" >&5
14088   echo "configure: failed program was:" >&5
14089   cat conftest.$ac_ext >&5
14090   rm -rf conftest*
14091   eval "ac_cv_header_$ac_safe=no"
14092 fi
14093 rm -f conftest*
14094 fi
14095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14096   echo "$ac_t""yes" 1>&6
14097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14098   cat >> confdefs.h <<EOF
14099 #define $ac_tr_hdr 1
14100 EOF
14101  
14102 else
14103   echo "$ac_t""no" 1>&6
14104 fi
14105 done
14106
14107
14108         if test $ac_cv_header_readline_readline_h = yes ; then
14109                 save_LIBS="$LIBS"
14110                 LIBS="$TERMCAP_LIBS $LIBS"
14111                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
14112 echo "configure:14113: checking for readline in -lreadline" >&5
14113 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
14114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14115   echo $ac_n "(cached) $ac_c" 1>&6
14116 else
14117   ac_save_LIBS="$LIBS"
14118 LIBS="-lreadline  $LIBS"
14119 cat > conftest.$ac_ext <<EOF
14120 #line 14121 "configure"
14121 #include "confdefs.h"
14122 /* Override any gcc2 internal prototype to avoid an error.  */
14123 /* We use char because int might match the return type of a gcc2
14124     builtin and then its argument prototype would still apply.  */
14125 char readline();
14126
14127 int main() {
14128 readline()
14129 ; return 0; }
14130 EOF
14131 if { (eval echo configure:14132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14132   rm -rf conftest*
14133   eval "ac_cv_lib_$ac_lib_var=yes"
14134 else
14135   echo "configure: failed program was:" >&5
14136   cat conftest.$ac_ext >&5
14137   rm -rf conftest*
14138   eval "ac_cv_lib_$ac_lib_var=no"
14139 fi
14140 rm -f conftest*
14141 LIBS="$ac_save_LIBS"
14142
14143 fi
14144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14145   echo "$ac_t""yes" 1>&6
14146   have_readline=yes
14147 else
14148   echo "$ac_t""no" 1>&6
14149 have_readline=no
14150 fi
14151
14152                 LIBS="$save_LIBS"
14153                         
14154                 if test $have_readline = yes ; then
14155                         ol_with_readline=found
14156                         ol_link_readline=yes
14157
14158                         READLINE_LIBS="-lreadline"
14159                 fi
14160         fi
14161 fi
14162
14163 if test $ol_link_readline = yes ; then
14164         cat >> confdefs.h <<\EOF
14165 #define HAVE_READLINE 1
14166 EOF
14167
14168 fi
14169
14170
14171 if test $ol_enable_crypt != no ; then
14172         echo $ac_n "checking for crypt""... $ac_c" 1>&6
14173 echo "configure:14174: checking for crypt" >&5
14174 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
14175   echo $ac_n "(cached) $ac_c" 1>&6
14176 else
14177   cat > conftest.$ac_ext <<EOF
14178 #line 14179 "configure"
14179 #include "confdefs.h"
14180 /* System header to define __stub macros and hopefully few prototypes,
14181     which can conflict with char crypt(); below.  */
14182 #include <assert.h>
14183 /* Override any gcc2 internal prototype to avoid an error.  */
14184 /* We use char because int might match the return type of a gcc2
14185     builtin and then its argument prototype would still apply.  */
14186 char crypt();
14187 char (*f)();
14188
14189 int main() {
14190
14191 /* The GNU C library defines this for functions which it implements
14192     to always fail with ENOSYS.  Some functions are actually named
14193     something starting with __ and the normal name is an alias.  */
14194 #if defined (__stub_crypt) || defined (__stub___crypt)
14195 choke me
14196 #else
14197 f = crypt;
14198 #endif
14199
14200 ; return 0; }
14201 EOF
14202 if { (eval echo configure:14203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14203   rm -rf conftest*
14204   eval "ac_cv_func_crypt=yes"
14205 else
14206   echo "configure: failed program was:" >&5
14207   cat conftest.$ac_ext >&5
14208   rm -rf conftest*
14209   eval "ac_cv_func_crypt=no"
14210 fi
14211 rm -f conftest*
14212 fi
14213
14214 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
14215   echo "$ac_t""yes" 1>&6
14216   have_crypt=yes
14217 else
14218   echo "$ac_t""no" 1>&6
14219
14220                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14221 echo "configure:14222: checking for crypt in -lcrypt" >&5
14222 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14224   echo $ac_n "(cached) $ac_c" 1>&6
14225 else
14226   ac_save_LIBS="$LIBS"
14227 LIBS="-lcrypt  $LIBS"
14228 cat > conftest.$ac_ext <<EOF
14229 #line 14230 "configure"
14230 #include "confdefs.h"
14231 /* Override any gcc2 internal prototype to avoid an error.  */
14232 /* We use char because int might match the return type of a gcc2
14233     builtin and then its argument prototype would still apply.  */
14234 char crypt();
14235
14236 int main() {
14237 crypt()
14238 ; return 0; }
14239 EOF
14240 if { (eval echo configure:14241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14241   rm -rf conftest*
14242   eval "ac_cv_lib_$ac_lib_var=yes"
14243 else
14244   echo "configure: failed program was:" >&5
14245   cat conftest.$ac_ext >&5
14246   rm -rf conftest*
14247   eval "ac_cv_lib_$ac_lib_var=no"
14248 fi
14249 rm -f conftest*
14250 LIBS="$ac_save_LIBS"
14251
14252 fi
14253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14254   echo "$ac_t""yes" 1>&6
14255   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14256                         have_crypt=yes
14257 else
14258   echo "$ac_t""no" 1>&6
14259 have_crypt=no
14260 fi
14261
14262 fi
14263
14264
14265         if test $have_crypt = yes ; then
14266                 cat >> confdefs.h <<\EOF
14267 #define HAVE_CRYPT 1
14268 EOF
14269
14270         else
14271                 echo "configure: warning: could not find crypt" 1>&2
14272                 if test $ol_enable_crypt = yes ; then
14273                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14274                 fi
14275
14276                 echo "configure: warning: disabling crypt support" 1>&2
14277                 ol_enable_crypt=no
14278         fi
14279 fi
14280
14281 if test $ol_enable_proctitle != no ; then
14282         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14283 echo "configure:14284: checking for setproctitle" >&5
14284 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14285   echo $ac_n "(cached) $ac_c" 1>&6
14286 else
14287   cat > conftest.$ac_ext <<EOF
14288 #line 14289 "configure"
14289 #include "confdefs.h"
14290 /* System header to define __stub macros and hopefully few prototypes,
14291     which can conflict with char setproctitle(); below.  */
14292 #include <assert.h>
14293 /* Override any gcc2 internal prototype to avoid an error.  */
14294 /* We use char because int might match the return type of a gcc2
14295     builtin and then its argument prototype would still apply.  */
14296 char setproctitle();
14297 char (*f)();
14298
14299 int main() {
14300
14301 /* The GNU C library defines this for functions which it implements
14302     to always fail with ENOSYS.  Some functions are actually named
14303     something starting with __ and the normal name is an alias.  */
14304 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14305 choke me
14306 #else
14307 f = setproctitle;
14308 #endif
14309
14310 ; return 0; }
14311 EOF
14312 if { (eval echo configure:14313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14313   rm -rf conftest*
14314   eval "ac_cv_func_setproctitle=yes"
14315 else
14316   echo "configure: failed program was:" >&5
14317   cat conftest.$ac_ext >&5
14318   rm -rf conftest*
14319   eval "ac_cv_func_setproctitle=no"
14320 fi
14321 rm -f conftest*
14322 fi
14323
14324 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14325   echo "$ac_t""yes" 1>&6
14326   have_setproctitle=yes
14327 else
14328   echo "$ac_t""no" 1>&6
14329
14330                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14331 echo "configure:14332: checking for setproctitle in -lutil" >&5
14332 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14333 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14334   echo $ac_n "(cached) $ac_c" 1>&6
14335 else
14336   ac_save_LIBS="$LIBS"
14337 LIBS="-lutil  $LIBS"
14338 cat > conftest.$ac_ext <<EOF
14339 #line 14340 "configure"
14340 #include "confdefs.h"
14341 /* Override any gcc2 internal prototype to avoid an error.  */
14342 /* We use char because int might match the return type of a gcc2
14343     builtin and then its argument prototype would still apply.  */
14344 char setproctitle();
14345
14346 int main() {
14347 setproctitle()
14348 ; return 0; }
14349 EOF
14350 if { (eval echo configure:14351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14351   rm -rf conftest*
14352   eval "ac_cv_lib_$ac_lib_var=yes"
14353 else
14354   echo "configure: failed program was:" >&5
14355   cat conftest.$ac_ext >&5
14356   rm -rf conftest*
14357   eval "ac_cv_lib_$ac_lib_var=no"
14358 fi
14359 rm -f conftest*
14360 LIBS="$ac_save_LIBS"
14361
14362 fi
14363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14364   echo "$ac_t""yes" 1>&6
14365   have_setproctitle=yes
14366                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14367 else
14368   echo "$ac_t""no" 1>&6
14369 have_setproctitle=no
14370                         LIBOBJS="$LIBOBJS setproctitle.o"
14371                         LIBSRCS="$LIBSRCS setproctitle.c"
14372 fi
14373
14374 fi
14375
14376
14377         if test $have_setproctitle = yes ; then
14378                 cat >> confdefs.h <<\EOF
14379 #define HAVE_SETPROCTITLE 1
14380 EOF
14381
14382         fi
14383 fi
14384
14385 if test $ol_enable_slp != no ; then
14386         for ac_hdr in slp.h 
14387 do
14388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14390 echo "configure:14391: checking for $ac_hdr" >&5
14391 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14392   echo $ac_n "(cached) $ac_c" 1>&6
14393 else
14394   cat > conftest.$ac_ext <<EOF
14395 #line 14396 "configure"
14396 #include "confdefs.h"
14397 #include <$ac_hdr>
14398 EOF
14399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14400 { (eval echo configure:14401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14402 if test -z "$ac_err"; then
14403   rm -rf conftest*
14404   eval "ac_cv_header_$ac_safe=yes"
14405 else
14406   echo "$ac_err" >&5
14407   echo "configure: failed program was:" >&5
14408   cat conftest.$ac_ext >&5
14409   rm -rf conftest*
14410   eval "ac_cv_header_$ac_safe=no"
14411 fi
14412 rm -f conftest*
14413 fi
14414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14415   echo "$ac_t""yes" 1>&6
14416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14417   cat >> confdefs.h <<EOF
14418 #define $ac_tr_hdr 1
14419 EOF
14420  
14421 else
14422   echo "$ac_t""no" 1>&6
14423 fi
14424 done
14425
14426
14427         if test $ac_cv_header_slp_h = yes ; then
14428                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
14429 echo "configure:14430: checking for SLPOpen in -lslp" >&5
14430 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
14431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14432   echo $ac_n "(cached) $ac_c" 1>&6
14433 else
14434   ac_save_LIBS="$LIBS"
14435 LIBS="-lslp  $LIBS"
14436 cat > conftest.$ac_ext <<EOF
14437 #line 14438 "configure"
14438 #include "confdefs.h"
14439 /* Override any gcc2 internal prototype to avoid an error.  */
14440 /* We use char because int might match the return type of a gcc2
14441     builtin and then its argument prototype would still apply.  */
14442 char SLPOpen();
14443
14444 int main() {
14445 SLPOpen()
14446 ; return 0; }
14447 EOF
14448 if { (eval echo configure:14449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14449   rm -rf conftest*
14450   eval "ac_cv_lib_$ac_lib_var=yes"
14451 else
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -rf conftest*
14455   eval "ac_cv_lib_$ac_lib_var=no"
14456 fi
14457 rm -f conftest*
14458 LIBS="$ac_save_LIBS"
14459
14460 fi
14461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14462   echo "$ac_t""yes" 1>&6
14463   have_slp=yes
14464 else
14465   echo "$ac_t""no" 1>&6
14466 have_slp=no
14467 fi
14468
14469                 if test $have_slp = yes ; then
14470                         cat >> confdefs.h <<\EOF
14471 #define HAVE_SLP 1
14472 EOF
14473
14474                         SLAPD_SLP_LIBS=-lslp
14475                 fi
14476
14477         elif test $ol_enable_slp = yes ; then
14478                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
14479         fi
14480 fi
14481
14482 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14483 echo "configure:14484: checking for ANSI C header files" >&5
14484 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14485   echo $ac_n "(cached) $ac_c" 1>&6
14486 else
14487   cat > conftest.$ac_ext <<EOF
14488 #line 14489 "configure"
14489 #include "confdefs.h"
14490 #include <stdlib.h>
14491 #include <stdarg.h>
14492 #include <string.h>
14493 #include <float.h>
14494 EOF
14495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14496 { (eval echo configure:14497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14498 if test -z "$ac_err"; then
14499   rm -rf conftest*
14500   ac_cv_header_stdc=yes
14501 else
14502   echo "$ac_err" >&5
14503   echo "configure: failed program was:" >&5
14504   cat conftest.$ac_ext >&5
14505   rm -rf conftest*
14506   ac_cv_header_stdc=no
14507 fi
14508 rm -f conftest*
14509
14510 if test $ac_cv_header_stdc = yes; then
14511   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14512 cat > conftest.$ac_ext <<EOF
14513 #line 14514 "configure"
14514 #include "confdefs.h"
14515 #include <string.h>
14516 EOF
14517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14518   egrep "memchr" >/dev/null 2>&1; then
14519   :
14520 else
14521   rm -rf conftest*
14522   ac_cv_header_stdc=no
14523 fi
14524 rm -f conftest*
14525
14526 fi
14527
14528 if test $ac_cv_header_stdc = yes; then
14529   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14530 cat > conftest.$ac_ext <<EOF
14531 #line 14532 "configure"
14532 #include "confdefs.h"
14533 #include <stdlib.h>
14534 EOF
14535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14536   egrep "free" >/dev/null 2>&1; then
14537   :
14538 else
14539   rm -rf conftest*
14540   ac_cv_header_stdc=no
14541 fi
14542 rm -f conftest*
14543
14544 fi
14545
14546 if test $ac_cv_header_stdc = yes; then
14547   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14548 if test "$cross_compiling" = yes; then
14549   :
14550 else
14551   cat > conftest.$ac_ext <<EOF
14552 #line 14553 "configure"
14553 #include "confdefs.h"
14554 #include <ctype.h>
14555 #if ((' ' & 0x0FF) == 0x020)
14556 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14557 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14558 #else
14559 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14560  || ('j' <= (c) && (c) <= 'r') \
14561  || ('s' <= (c) && (c) <= 'z'))
14562 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14563 #endif
14564 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14565 int main () { int i; for (i = 0; i < 256; i++)
14566 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14567 exit (0); }
14568
14569 EOF
14570 if { (eval echo configure:14571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14571 then
14572   :
14573 else
14574   echo "configure: failed program was:" >&5
14575   cat conftest.$ac_ext >&5
14576   rm -fr conftest*
14577   ac_cv_header_stdc=no
14578 fi
14579 rm -fr conftest*
14580 fi
14581
14582 fi
14583 fi
14584
14585 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14586 if test $ac_cv_header_stdc = yes; then
14587   cat >> confdefs.h <<\EOF
14588 #define STDC_HEADERS 1
14589 EOF
14590
14591 fi
14592
14593 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14594 echo "configure:14595: checking for mode_t" >&5
14595 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14596   echo $ac_n "(cached) $ac_c" 1>&6
14597 else
14598   cat > conftest.$ac_ext <<EOF
14599 #line 14600 "configure"
14600 #include "confdefs.h"
14601 #include <sys/types.h>
14602 #if STDC_HEADERS
14603 #include <stdlib.h>
14604 #include <stddef.h>
14605 #endif
14606
14607 EOF
14608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14609   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14610   rm -rf conftest*
14611   eval "ac_cv_type_mode_t=yes"
14612 else
14613   rm -rf conftest*
14614   eval "ac_cv_type_mode_t=no"
14615 fi
14616 rm -f conftest*
14617
14618 fi
14619 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14620   echo "$ac_t""yes" 1>&6
14621 else
14622   echo "$ac_t""no" 1>&6
14623   cat >> confdefs.h <<EOF
14624 #define mode_t int
14625 EOF
14626
14627 fi
14628
14629 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14630 echo "configure:14631: checking for off_t" >&5
14631 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14632   echo $ac_n "(cached) $ac_c" 1>&6
14633 else
14634   cat > conftest.$ac_ext <<EOF
14635 #line 14636 "configure"
14636 #include "confdefs.h"
14637 #include <sys/types.h>
14638 #if STDC_HEADERS
14639 #include <stdlib.h>
14640 #include <stddef.h>
14641 #endif
14642
14643 EOF
14644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14645   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14646   rm -rf conftest*
14647   eval "ac_cv_type_off_t=yes"
14648 else
14649   rm -rf conftest*
14650   eval "ac_cv_type_off_t=no"
14651 fi
14652 rm -f conftest*
14653
14654 fi
14655 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14656   echo "$ac_t""yes" 1>&6
14657 else
14658   echo "$ac_t""no" 1>&6
14659   cat >> confdefs.h <<EOF
14660 #define off_t long
14661 EOF
14662
14663 fi
14664
14665 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14666 echo "configure:14667: checking for pid_t" >&5
14667 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14668   echo $ac_n "(cached) $ac_c" 1>&6
14669 else
14670   cat > conftest.$ac_ext <<EOF
14671 #line 14672 "configure"
14672 #include "confdefs.h"
14673 #include <sys/types.h>
14674 #if STDC_HEADERS
14675 #include <stdlib.h>
14676 #include <stddef.h>
14677 #endif
14678
14679 EOF
14680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14681   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14682   rm -rf conftest*
14683   eval "ac_cv_type_pid_t=yes"
14684 else
14685   rm -rf conftest*
14686   eval "ac_cv_type_pid_t=no"
14687 fi
14688 rm -f conftest*
14689
14690 fi
14691 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14692   echo "$ac_t""yes" 1>&6
14693 else
14694   echo "$ac_t""no" 1>&6
14695   cat >> confdefs.h <<EOF
14696 #define pid_t int
14697 EOF
14698
14699 fi
14700
14701 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14702 echo "configure:14703: checking for ptrdiff_t" >&5
14703 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14704   echo $ac_n "(cached) $ac_c" 1>&6
14705 else
14706   cat > conftest.$ac_ext <<EOF
14707 #line 14708 "configure"
14708 #include "confdefs.h"
14709 #include <stddef.h>
14710 int main() {
14711 ptrdiff_t p
14712 ; return 0; }
14713 EOF
14714 if { (eval echo configure:14715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14715   rm -rf conftest*
14716   am_cv_type_ptrdiff_t=yes
14717 else
14718   echo "configure: failed program was:" >&5
14719   cat conftest.$ac_ext >&5
14720   rm -rf conftest*
14721   am_cv_type_ptrdiff_t=no
14722 fi
14723 rm -f conftest*
14724 fi
14725
14726 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14727    if test $am_cv_type_ptrdiff_t = yes; then
14728      cat >> confdefs.h <<\EOF
14729 #define HAVE_PTRDIFF_T 1
14730 EOF
14731
14732    fi
14733
14734 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14735 echo "configure:14736: checking return type of signal handlers" >&5
14736 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14737   echo $ac_n "(cached) $ac_c" 1>&6
14738 else
14739   cat > conftest.$ac_ext <<EOF
14740 #line 14741 "configure"
14741 #include "confdefs.h"
14742 #include <sys/types.h>
14743 #include <signal.h>
14744 #ifdef signal
14745 #undef signal
14746 #endif
14747 #ifdef __cplusplus
14748 extern "C" void (*signal (int, void (*)(int)))(int);
14749 #else
14750 void (*signal ()) ();
14751 #endif
14752
14753 int main() {
14754 int i;
14755 ; return 0; }
14756 EOF
14757 if { (eval echo configure:14758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14758   rm -rf conftest*
14759   ac_cv_type_signal=void
14760 else
14761   echo "configure: failed program was:" >&5
14762   cat conftest.$ac_ext >&5
14763   rm -rf conftest*
14764   ac_cv_type_signal=int
14765 fi
14766 rm -f conftest*
14767 fi
14768
14769 echo "$ac_t""$ac_cv_type_signal" 1>&6
14770 cat >> confdefs.h <<EOF
14771 #define RETSIGTYPE $ac_cv_type_signal
14772 EOF
14773
14774
14775 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14776 echo "configure:14777: checking for size_t" >&5
14777 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14778   echo $ac_n "(cached) $ac_c" 1>&6
14779 else
14780   cat > conftest.$ac_ext <<EOF
14781 #line 14782 "configure"
14782 #include "confdefs.h"
14783 #include <sys/types.h>
14784 #if STDC_HEADERS
14785 #include <stdlib.h>
14786 #include <stddef.h>
14787 #endif
14788
14789 EOF
14790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14791   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14792   rm -rf conftest*
14793   eval "ac_cv_type_size_t=yes"
14794 else
14795   rm -rf conftest*
14796   eval "ac_cv_type_size_t=no"
14797 fi
14798 rm -f conftest*
14799
14800 fi
14801 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14802   echo "$ac_t""yes" 1>&6
14803 else
14804   echo "$ac_t""no" 1>&6
14805   cat >> confdefs.h <<EOF
14806 #define size_t unsigned
14807 EOF
14808
14809 fi
14810
14811
14812 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14813 echo "configure:14814: checking for ssize_t" >&5
14814 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14815   echo $ac_n "(cached) $ac_c" 1>&6
14816 else
14817   cat > conftest.$ac_ext <<EOF
14818 #line 14819 "configure"
14819 #include "confdefs.h"
14820 #include <sys/types.h>
14821 #if STDC_HEADERS
14822 #include <stdlib.h>
14823 #include <stddef.h>
14824 #endif
14825
14826 EOF
14827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14828   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14829   rm -rf conftest*
14830   eval "ac_cv_type_ssize_t=yes"
14831 else
14832   rm -rf conftest*
14833   eval "ac_cv_type_ssize_t=no"
14834 fi
14835 rm -f conftest*
14836
14837 fi
14838 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14839   echo "$ac_t""yes" 1>&6
14840 else
14841   echo "$ac_t""no" 1>&6
14842   cat >> confdefs.h <<EOF
14843 #define ssize_t signed int
14844 EOF
14845
14846 fi
14847
14848 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14849 echo "configure:14850: checking for caddr_t" >&5
14850 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14851   echo $ac_n "(cached) $ac_c" 1>&6
14852 else
14853   cat > conftest.$ac_ext <<EOF
14854 #line 14855 "configure"
14855 #include "confdefs.h"
14856 #include <sys/types.h>
14857 #if STDC_HEADERS
14858 #include <stdlib.h>
14859 #include <stddef.h>
14860 #endif
14861
14862 EOF
14863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14864   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14865   rm -rf conftest*
14866   eval "ac_cv_type_caddr_t=yes"
14867 else
14868   rm -rf conftest*
14869   eval "ac_cv_type_caddr_t=no"
14870 fi
14871 rm -f conftest*
14872
14873 fi
14874 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14875   echo "$ac_t""yes" 1>&6
14876 else
14877   echo "$ac_t""no" 1>&6
14878   cat >> confdefs.h <<EOF
14879 #define caddr_t char *
14880 EOF
14881
14882 fi
14883
14884
14885 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14886 echo "configure:14887: checking for socklen_t" >&5
14887 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14888   echo $ac_n "(cached) $ac_c" 1>&6
14889 else
14890   cat > conftest.$ac_ext <<EOF
14891 #line 14892 "configure"
14892 #include "confdefs.h"
14893
14894 #ifdef HAVE_SYS_TYPES_H
14895 #include <sys/types.h>
14896 #endif
14897 #ifdef HAVE_SYS_SOCKET_H
14898 #include <sys/socket.h>
14899 #endif
14900
14901 int main() {
14902 socklen_t len;
14903 ; return 0; }
14904 EOF
14905 if { (eval echo configure:14906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14906   rm -rf conftest*
14907   ol_cv_type_socklen_t=yes
14908 else
14909   echo "configure: failed program was:" >&5
14910   cat conftest.$ac_ext >&5
14911   rm -rf conftest*
14912   ol_cv_type_socklen_t=no
14913 fi
14914 rm -f conftest*
14915 fi
14916
14917 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14918   if test $ol_cv_type_socklen_t = no; then
14919     cat >> confdefs.h <<\EOF
14920 #define socklen_t int
14921 EOF
14922
14923   fi
14924  
14925 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14926 echo "configure:14927: checking for member st_blksize in aggregate type struct stat" >&5
14927 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14928   echo $ac_n "(cached) $ac_c" 1>&6
14929 else
14930   cat > conftest.$ac_ext <<EOF
14931 #line 14932 "configure"
14932 #include "confdefs.h"
14933 #include <sys/types.h>
14934 #include <sys/stat.h>
14935 int main() {
14936 struct stat foo; foo.st_blksize;
14937 ; return 0; }
14938 EOF
14939 if { (eval echo configure:14940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14940   rm -rf conftest*
14941   ac_cv_c_struct_member_st_blksize=yes
14942 else
14943   echo "configure: failed program was:" >&5
14944   cat conftest.$ac_ext >&5
14945   rm -rf conftest*
14946   ac_cv_c_struct_member_st_blksize=no
14947 fi
14948 rm -f conftest*
14949 fi
14950
14951 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14952 st_blksize="$ac_cv_c_struct_member_st_blksize"
14953 if test $ac_cv_c_struct_member_st_blksize = yes; then
14954   cat >> confdefs.h <<\EOF
14955 #define HAVE_ST_BLKSIZE 1
14956 EOF
14957
14958 fi
14959
14960 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14961 echo "configure:14962: checking whether time.h and sys/time.h may both be included" >&5
14962 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14963   echo $ac_n "(cached) $ac_c" 1>&6
14964 else
14965   cat > conftest.$ac_ext <<EOF
14966 #line 14967 "configure"
14967 #include "confdefs.h"
14968 #include <sys/types.h>
14969 #include <sys/time.h>
14970 #include <time.h>
14971 int main() {
14972 struct tm *tp;
14973 ; return 0; }
14974 EOF
14975 if { (eval echo configure:14976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14976   rm -rf conftest*
14977   ac_cv_header_time=yes
14978 else
14979   echo "configure: failed program was:" >&5
14980   cat conftest.$ac_ext >&5
14981   rm -rf conftest*
14982   ac_cv_header_time=no
14983 fi
14984 rm -f conftest*
14985 fi
14986
14987 echo "$ac_t""$ac_cv_header_time" 1>&6
14988 if test $ac_cv_header_time = yes; then
14989   cat >> confdefs.h <<\EOF
14990 #define TIME_WITH_SYS_TIME 1
14991 EOF
14992
14993 fi
14994
14995 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14996 echo "configure:14997: checking whether struct tm is in sys/time.h or time.h" >&5
14997 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14998   echo $ac_n "(cached) $ac_c" 1>&6
14999 else
15000   cat > conftest.$ac_ext <<EOF
15001 #line 15002 "configure"
15002 #include "confdefs.h"
15003 #include <sys/types.h>
15004 #include <time.h>
15005 int main() {
15006 struct tm *tp; tp->tm_sec;
15007 ; return 0; }
15008 EOF
15009 if { (eval echo configure:15010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15010   rm -rf conftest*
15011   ac_cv_struct_tm=time.h
15012 else
15013   echo "configure: failed program was:" >&5
15014   cat conftest.$ac_ext >&5
15015   rm -rf conftest*
15016   ac_cv_struct_tm=sys/time.h
15017 fi
15018 rm -f conftest*
15019 fi
15020
15021 echo "$ac_t""$ac_cv_struct_tm" 1>&6
15022 if test $ac_cv_struct_tm = sys/time.h; then
15023   cat >> confdefs.h <<\EOF
15024 #define TM_IN_SYS_TIME 1
15025 EOF
15026
15027 fi
15028
15029 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
15030 echo "configure:15031: checking for uid_t in sys/types.h" >&5
15031 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
15032   echo $ac_n "(cached) $ac_c" 1>&6
15033 else
15034   cat > conftest.$ac_ext <<EOF
15035 #line 15036 "configure"
15036 #include "confdefs.h"
15037 #include <sys/types.h>
15038 EOF
15039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15040   egrep "uid_t" >/dev/null 2>&1; then
15041   rm -rf conftest*
15042   ac_cv_type_uid_t=yes
15043 else
15044   rm -rf conftest*
15045   ac_cv_type_uid_t=no
15046 fi
15047 rm -f conftest*
15048
15049 fi
15050
15051 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
15052 if test $ac_cv_type_uid_t = no; then
15053   cat >> confdefs.h <<\EOF
15054 #define uid_t int
15055 EOF
15056
15057   cat >> confdefs.h <<\EOF
15058 #define gid_t int
15059 EOF
15060
15061 fi
15062
15063 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
15064 echo "configure:15065: checking for sig_atomic_t" >&5
15065 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
15066   echo $ac_n "(cached) $ac_c" 1>&6
15067 else
15068   cat > conftest.$ac_ext <<EOF
15069 #line 15070 "configure"
15070 #include "confdefs.h"
15071 #include <signal.h>
15072 int main() {
15073 sig_atomic_t atomic;
15074 ; return 0; }
15075 EOF
15076 if { (eval echo configure:15077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15077   rm -rf conftest*
15078   ol_cv_type_sig_atomic_t=yes
15079 else
15080   echo "configure: failed program was:" >&5
15081   cat conftest.$ac_ext >&5
15082   rm -rf conftest*
15083   ol_cv_type_sig_atomic_t=no
15084 fi
15085 rm -f conftest*
15086 fi
15087
15088 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
15089   if test $ol_cv_type_sig_atomic_t = no; then
15090     cat >> confdefs.h <<\EOF
15091 #define sig_atomic_t int
15092 EOF
15093
15094   fi
15095  
15096
15097
15098 # test for pw_gecos in struct passwd
15099 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
15100 echo "configure:15101: checking struct passwd for pw_gecos" >&5
15101 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
15102   echo $ac_n "(cached) $ac_c" 1>&6
15103 else
15104   
15105         cat > conftest.$ac_ext <<EOF
15106 #line 15107 "configure"
15107 #include "confdefs.h"
15108 #include <pwd.h>
15109 int main() {
15110
15111         struct passwd pwd;
15112         pwd.pw_gecos = pwd.pw_name;
15113
15114 ; return 0; }
15115 EOF
15116 if { (eval echo configure:15117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15117   rm -rf conftest*
15118   ol_cv_struct_passwd_pw_gecos=yes
15119 else
15120   echo "configure: failed program was:" >&5
15121   cat conftest.$ac_ext >&5
15122   rm -rf conftest*
15123   ol_cv_struct_passwd_pw_gecos=no
15124 fi
15125 rm -f conftest*
15126 fi
15127
15128 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
15129 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
15130         cat >> confdefs.h <<\EOF
15131 #define HAVE_PW_GECOS 1
15132 EOF
15133
15134 fi
15135
15136 # test for pw_passwd in struct passwd
15137 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
15138 echo "configure:15139: checking struct passwd for pw_passwd" >&5
15139 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
15140   echo $ac_n "(cached) $ac_c" 1>&6
15141 else
15142   
15143         cat > conftest.$ac_ext <<EOF
15144 #line 15145 "configure"
15145 #include "confdefs.h"
15146 #include <pwd.h>
15147 int main() {
15148
15149         struct passwd pwd;
15150         pwd.pw_passwd = pwd.pw_name;
15151
15152 ; return 0; }
15153 EOF
15154 if { (eval echo configure:15155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15155   rm -rf conftest*
15156   ol_cv_struct_passwd_pw_passwd=yes
15157 else
15158   echo "configure: failed program was:" >&5
15159   cat conftest.$ac_ext >&5
15160   rm -rf conftest*
15161   ol_cv_struct_passwd_pw_passwd=no
15162 fi
15163 rm -f conftest*
15164 fi
15165
15166 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
15167 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
15168         cat >> confdefs.h <<\EOF
15169 #define HAVE_PW_PASSWD 1
15170 EOF
15171
15172 fi
15173
15174
15175 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
15176 echo "configure:15177: checking if toupper() requires islower()" >&5
15177 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
15178   echo $ac_n "(cached) $ac_c" 1>&6
15179 else
15180   
15181         if test "$cross_compiling" = yes; then
15182   ol_cv_c_upper_lower=safe
15183 else
15184   cat > conftest.$ac_ext <<EOF
15185 #line 15186 "configure"
15186 #include "confdefs.h"
15187
15188 #include <ctype.h>
15189 main()
15190 {
15191         if ('C' == toupper('C'))
15192                 exit(0);
15193         else
15194                 exit(1);
15195 }
15196 EOF
15197 if { (eval echo configure:15198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15198 then
15199   ol_cv_c_upper_lower=no
15200 else
15201   echo "configure: failed program was:" >&5
15202   cat conftest.$ac_ext >&5
15203   rm -fr conftest*
15204   ol_cv_c_upper_lower=yes
15205 fi
15206 rm -fr conftest*
15207 fi
15208
15209 fi
15210
15211 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
15212 if test $ol_cv_c_upper_lower != no ; then
15213         cat >> confdefs.h <<\EOF
15214 #define C_UPPER_LOWER 1
15215 EOF
15216
15217 fi
15218
15219 echo $ac_n "checking for working const""... $ac_c" 1>&6
15220 echo "configure:15221: checking for working const" >&5
15221 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
15222   echo $ac_n "(cached) $ac_c" 1>&6
15223 else
15224   cat > conftest.$ac_ext <<EOF
15225 #line 15226 "configure"
15226 #include "confdefs.h"
15227
15228 int main() {
15229
15230 /* Ultrix mips cc rejects this.  */
15231 typedef int charset[2]; const charset x;
15232 /* SunOS 4.1.1 cc rejects this.  */
15233 char const *const *ccp;
15234 char **p;
15235 /* NEC SVR4.0.2 mips cc rejects this.  */
15236 struct point {int x, y;};
15237 static struct point const zero = {0,0};
15238 /* AIX XL C 1.02.0.0 rejects this.
15239    It does not let you subtract one const X* pointer from another in an arm
15240    of an if-expression whose if-part is not a constant expression */
15241 const char *g = "string";
15242 ccp = &g + (g ? g-g : 0);
15243 /* HPUX 7.0 cc rejects these. */
15244 ++ccp;
15245 p = (char**) ccp;
15246 ccp = (char const *const *) p;
15247 { /* SCO 3.2v4 cc rejects this.  */
15248   char *t;
15249   char const *s = 0 ? (char *) 0 : (char const *) 0;
15250
15251   *t++ = 0;
15252 }
15253 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15254   int x[] = {25, 17};
15255   const int *foo = &x[0];
15256   ++foo;
15257 }
15258 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15259   typedef const int *iptr;
15260   iptr p = 0;
15261   ++p;
15262 }
15263 { /* AIX XL C 1.02.0.0 rejects this saying
15264      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15265   struct s { int j; const int *ap[3]; };
15266   struct s *b; b->j = 5;
15267 }
15268 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15269   const int foo = 10;
15270 }
15271
15272 ; return 0; }
15273 EOF
15274 if { (eval echo configure:15275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15275   rm -rf conftest*
15276   ac_cv_c_const=yes
15277 else
15278   echo "configure: failed program was:" >&5
15279   cat conftest.$ac_ext >&5
15280   rm -rf conftest*
15281   ac_cv_c_const=no
15282 fi
15283 rm -f conftest*
15284 fi
15285
15286 echo "$ac_t""$ac_cv_c_const" 1>&6
15287 if test $ac_cv_c_const = no; then
15288   cat >> confdefs.h <<\EOF
15289 #define const 
15290 EOF
15291
15292 fi
15293
15294 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
15295 echo "configure:15296: checking if compiler understands volatile" >&5
15296 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
15297   echo $ac_n "(cached) $ac_c" 1>&6
15298 else
15299   cat > conftest.$ac_ext <<EOF
15300 #line 15301 "configure"
15301 #include "confdefs.h"
15302 int x, y, z;
15303 int main() {
15304 volatile int a; int * volatile b = x ? &y : &z;
15305       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
15306       *b = 0;
15307 ; return 0; }
15308 EOF
15309 if { (eval echo configure:15310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15310   rm -rf conftest*
15311   ol_cv_c_volatile=yes
15312 else
15313   echo "configure: failed program was:" >&5
15314   cat conftest.$ac_ext >&5
15315   rm -rf conftest*
15316   ol_cv_c_volatile=no
15317 fi
15318 rm -f conftest*
15319 fi
15320
15321 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15322   if test $ol_cv_c_volatile = yes; then
15323     : 
15324   else
15325     cat >> confdefs.h <<\EOF
15326 #define volatile 
15327 EOF
15328
15329   fi
15330  
15331
15332 if test $cross_compiling = yes ; then
15333         cat >> confdefs.h <<\EOF
15334 #define CROSS_COMPILING 1
15335 EOF
15336
15337 else
15338         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15339 echo "configure:15340: checking whether byte ordering is bigendian" >&5
15340 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15341   echo $ac_n "(cached) $ac_c" 1>&6
15342 else
15343   ac_cv_c_bigendian=unknown
15344 # See if sys/param.h defines the BYTE_ORDER macro.
15345 cat > conftest.$ac_ext <<EOF
15346 #line 15347 "configure"
15347 #include "confdefs.h"
15348 #include <sys/types.h>
15349 #include <sys/param.h>
15350 int main() {
15351
15352 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15353  bogus endian macros
15354 #endif
15355 ; return 0; }
15356 EOF
15357 if { (eval echo configure:15358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15358   rm -rf conftest*
15359   # It does; now see whether it defined to BIG_ENDIAN or not.
15360 cat > conftest.$ac_ext <<EOF
15361 #line 15362 "configure"
15362 #include "confdefs.h"
15363 #include <sys/types.h>
15364 #include <sys/param.h>
15365 int main() {
15366
15367 #if BYTE_ORDER != BIG_ENDIAN
15368  not big endian
15369 #endif
15370 ; return 0; }
15371 EOF
15372 if { (eval echo configure:15373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15373   rm -rf conftest*
15374   ac_cv_c_bigendian=yes
15375 else
15376   echo "configure: failed program was:" >&5
15377   cat conftest.$ac_ext >&5
15378   rm -rf conftest*
15379   ac_cv_c_bigendian=no
15380 fi
15381 rm -f conftest*
15382 else
15383   echo "configure: failed program was:" >&5
15384   cat conftest.$ac_ext >&5
15385 fi
15386 rm -f conftest*
15387 if test $ac_cv_c_bigendian = unknown; then
15388 if test "$cross_compiling" = yes; then
15389     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15390 else
15391   cat > conftest.$ac_ext <<EOF
15392 #line 15393 "configure"
15393 #include "confdefs.h"
15394 main () {
15395   /* Are we little or big endian?  From Harbison&Steele.  */
15396   union
15397   {
15398     long l;
15399     char c[sizeof (long)];
15400   } u;
15401   u.l = 1;
15402   exit (u.c[sizeof (long) - 1] == 1);
15403 }
15404 EOF
15405 if { (eval echo configure:15406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15406 then
15407   ac_cv_c_bigendian=no
15408 else
15409   echo "configure: failed program was:" >&5
15410   cat conftest.$ac_ext >&5
15411   rm -fr conftest*
15412   ac_cv_c_bigendian=yes
15413 fi
15414 rm -fr conftest*
15415 fi
15416
15417 fi
15418 fi
15419
15420 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15421 if test $ac_cv_c_bigendian = yes; then
15422   cat >> confdefs.h <<\EOF
15423 #define WORDS_BIGENDIAN 1
15424 EOF
15425
15426 fi
15427
15428 fi
15429
15430 echo $ac_n "checking size of short""... $ac_c" 1>&6
15431 echo "configure:15432: checking size of short" >&5 
15432 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15433   echo $ac_n "(cached) $ac_c" 1>&6
15434 else
15435   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15436   cat > conftest.$ac_ext <<EOF
15437 #line 15438 "configure"
15438 #include "confdefs.h"
15439 #include "confdefs.h" 
15440 #include <sys/types.h> 
15441  
15442
15443 int main() {
15444 switch (0) case 0: case (sizeof (short) == $ac_size):;
15445 ; return 0; }
15446 EOF
15447 if { (eval echo configure:15448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15448   rm -rf conftest*
15449   ac_cv_sizeof_short=$ac_size
15450 else
15451   echo "configure: failed program was:" >&5
15452   cat conftest.$ac_ext >&5
15453 fi
15454 rm -f conftest* 
15455   if test x$ac_cv_sizeof_short != x ; then break; fi 
15456 done 
15457
15458 fi
15459  
15460 if test x$ac_cv_sizeof_short = x ; then 
15461   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15462 fi 
15463 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15464 cat >> confdefs.h <<EOF
15465 #define SIZEOF_SHORT $ac_cv_sizeof_short
15466 EOF
15467  
15468  
15469 echo $ac_n "checking size of int""... $ac_c" 1>&6
15470 echo "configure:15471: checking size of int" >&5 
15471 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15472   echo $ac_n "(cached) $ac_c" 1>&6
15473 else
15474   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15475   cat > conftest.$ac_ext <<EOF
15476 #line 15477 "configure"
15477 #include "confdefs.h"
15478 #include "confdefs.h" 
15479 #include <sys/types.h> 
15480  
15481
15482 int main() {
15483 switch (0) case 0: case (sizeof (int) == $ac_size):;
15484 ; return 0; }
15485 EOF
15486 if { (eval echo configure:15487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15487   rm -rf conftest*
15488   ac_cv_sizeof_int=$ac_size
15489 else
15490   echo "configure: failed program was:" >&5
15491   cat conftest.$ac_ext >&5
15492 fi
15493 rm -f conftest* 
15494   if test x$ac_cv_sizeof_int != x ; then break; fi 
15495 done 
15496
15497 fi
15498  
15499 if test x$ac_cv_sizeof_int = x ; then 
15500   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15501 fi 
15502 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15503 cat >> confdefs.h <<EOF
15504 #define SIZEOF_INT $ac_cv_sizeof_int
15505 EOF
15506  
15507  
15508 echo $ac_n "checking size of long""... $ac_c" 1>&6
15509 echo "configure:15510: checking size of long" >&5 
15510 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15511   echo $ac_n "(cached) $ac_c" 1>&6
15512 else
15513   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15514   cat > conftest.$ac_ext <<EOF
15515 #line 15516 "configure"
15516 #include "confdefs.h"
15517 #include "confdefs.h" 
15518 #include <sys/types.h> 
15519  
15520
15521 int main() {
15522 switch (0) case 0: case (sizeof (long) == $ac_size):;
15523 ; return 0; }
15524 EOF
15525 if { (eval echo configure:15526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15526   rm -rf conftest*
15527   ac_cv_sizeof_long=$ac_size
15528 else
15529   echo "configure: failed program was:" >&5
15530   cat conftest.$ac_ext >&5
15531 fi
15532 rm -f conftest* 
15533   if test x$ac_cv_sizeof_long != x ; then break; fi 
15534 done 
15535
15536 fi
15537  
15538 if test x$ac_cv_sizeof_long = x ; then 
15539   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15540 fi 
15541 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15542 cat >> confdefs.h <<EOF
15543 #define SIZEOF_LONG $ac_cv_sizeof_long
15544 EOF
15545  
15546
15547
15548 if test "$ac_cv_sizeof_int" -lt 4 ; then
15549         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15550
15551         cat >> confdefs.h <<\EOF
15552 #define LBER_INT_T long
15553 EOF
15554
15555 else
15556         cat >> confdefs.h <<\EOF
15557 #define LBER_INT_T int
15558 EOF
15559
15560 fi
15561
15562 cat >> confdefs.h <<\EOF
15563 #define LBER_LEN_T long
15564 EOF
15565
15566 cat >> confdefs.h <<\EOF
15567 #define LBER_SOCKET_T int
15568 EOF
15569
15570 cat >> confdefs.h <<\EOF
15571 #define LBER_TAG_T long
15572 EOF
15573
15574
15575 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15576 echo "configure:15577: checking for 8-bit clean memcmp" >&5
15577 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15578   echo $ac_n "(cached) $ac_c" 1>&6
15579 else
15580   if test "$cross_compiling" = yes; then
15581   ac_cv_func_memcmp_clean=no
15582 else
15583   cat > conftest.$ac_ext <<EOF
15584 #line 15585 "configure"
15585 #include "confdefs.h"
15586
15587 main()
15588 {
15589   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15590   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15591 }
15592
15593 EOF
15594 if { (eval echo configure:15595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15595 then
15596   ac_cv_func_memcmp_clean=yes
15597 else
15598   echo "configure: failed program was:" >&5
15599   cat conftest.$ac_ext >&5
15600   rm -fr conftest*
15601   ac_cv_func_memcmp_clean=no
15602 fi
15603 rm -fr conftest*
15604 fi
15605
15606 fi
15607
15608 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15609 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15610
15611 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15612 echo "configure:15613: checking for strftime" >&5
15613 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15614   echo $ac_n "(cached) $ac_c" 1>&6
15615 else
15616   cat > conftest.$ac_ext <<EOF
15617 #line 15618 "configure"
15618 #include "confdefs.h"
15619 /* System header to define __stub macros and hopefully few prototypes,
15620     which can conflict with char strftime(); below.  */
15621 #include <assert.h>
15622 /* Override any gcc2 internal prototype to avoid an error.  */
15623 /* We use char because int might match the return type of a gcc2
15624     builtin and then its argument prototype would still apply.  */
15625 char strftime();
15626 char (*f)();
15627
15628 int main() {
15629
15630 /* The GNU C library defines this for functions which it implements
15631     to always fail with ENOSYS.  Some functions are actually named
15632     something starting with __ and the normal name is an alias.  */
15633 #if defined (__stub_strftime) || defined (__stub___strftime)
15634 choke me
15635 #else
15636 f = strftime;
15637 #endif
15638
15639 ; return 0; }
15640 EOF
15641 if { (eval echo configure:15642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15642   rm -rf conftest*
15643   eval "ac_cv_func_strftime=yes"
15644 else
15645   echo "configure: failed program was:" >&5
15646   cat conftest.$ac_ext >&5
15647   rm -rf conftest*
15648   eval "ac_cv_func_strftime=no"
15649 fi
15650 rm -f conftest*
15651 fi
15652
15653 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15654   echo "$ac_t""yes" 1>&6
15655   cat >> confdefs.h <<\EOF
15656 #define HAVE_STRFTIME 1
15657 EOF
15658
15659 else
15660   echo "$ac_t""no" 1>&6
15661 # strftime is in -lintl on SCO UNIX.
15662 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15663 echo "configure:15664: checking for strftime in -lintl" >&5
15664 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15665 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15666   echo $ac_n "(cached) $ac_c" 1>&6
15667 else
15668   ac_save_LIBS="$LIBS"
15669 LIBS="-lintl  $LIBS"
15670 cat > conftest.$ac_ext <<EOF
15671 #line 15672 "configure"
15672 #include "confdefs.h"
15673 /* Override any gcc2 internal prototype to avoid an error.  */
15674 /* We use char because int might match the return type of a gcc2
15675     builtin and then its argument prototype would still apply.  */
15676 char strftime();
15677
15678 int main() {
15679 strftime()
15680 ; return 0; }
15681 EOF
15682 if { (eval echo configure:15683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15683   rm -rf conftest*
15684   eval "ac_cv_lib_$ac_lib_var=yes"
15685 else
15686   echo "configure: failed program was:" >&5
15687   cat conftest.$ac_ext >&5
15688   rm -rf conftest*
15689   eval "ac_cv_lib_$ac_lib_var=no"
15690 fi
15691 rm -f conftest*
15692 LIBS="$ac_save_LIBS"
15693
15694 fi
15695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15696   echo "$ac_t""yes" 1>&6
15697   cat >> confdefs.h <<\EOF
15698 #define HAVE_STRFTIME 1
15699 EOF
15700
15701 LIBS="-lintl $LIBS"
15702 else
15703   echo "$ac_t""no" 1>&6
15704 fi
15705
15706 fi
15707
15708
15709 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15710 echo "configure:15711: checking for inet_aton()" >&5
15711 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15712   echo $ac_n "(cached) $ac_c" 1>&6
15713 else
15714   cat > conftest.$ac_ext <<EOF
15715 #line 15716 "configure"
15716 #include "confdefs.h"
15717
15718 #ifdef HAVE_SYS_TYPES_H
15719 #       include <sys/types.h>
15720 #endif
15721 #ifdef HAVE_SYS_SOCKET_H
15722 #       include <sys/socket.h>
15723 #       ifdef HAVE_SYS_SELECT_H
15724 #               include <sys/select.h>
15725 #       endif
15726 #       include <netinet/in.h>
15727 #       ifdef HAVE_ARPA_INET_H
15728 #               include <arpa/inet.h>
15729 #       endif
15730 #endif
15731
15732 int main() {
15733 struct in_addr in;
15734 int rc = inet_aton( "255.255.255.255", &in );
15735 ; return 0; }
15736 EOF
15737 if { (eval echo configure:15738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15738   rm -rf conftest*
15739   ol_cv_func_inet_aton=yes
15740 else
15741   echo "configure: failed program was:" >&5
15742   cat conftest.$ac_ext >&5
15743   rm -rf conftest*
15744   ol_cv_func_inet_aton=no
15745 fi
15746 rm -f conftest*
15747 fi
15748
15749 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15750   if test $ol_cv_func_inet_aton != no; then
15751     cat >> confdefs.h <<\EOF
15752 #define HAVE_INET_ATON 1
15753 EOF
15754
15755   fi
15756  
15757
15758 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15759 echo "configure:15760: checking for _spawnlp" >&5
15760 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15761   echo $ac_n "(cached) $ac_c" 1>&6
15762 else
15763   cat > conftest.$ac_ext <<EOF
15764 #line 15765 "configure"
15765 #include "confdefs.h"
15766 /* System header to define __stub macros and hopefully few prototypes,
15767     which can conflict with char _spawnlp(); below.  */
15768 #include <assert.h>
15769 /* Override any gcc2 internal prototype to avoid an error.  */
15770 /* We use char because int might match the return type of a gcc2
15771     builtin and then its argument prototype would still apply.  */
15772 char _spawnlp();
15773 char (*f)();
15774
15775 int main() {
15776
15777 /* The GNU C library defines this for functions which it implements
15778     to always fail with ENOSYS.  Some functions are actually named
15779     something starting with __ and the normal name is an alias.  */
15780 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15781 choke me
15782 #else
15783 f = _spawnlp;
15784 #endif
15785
15786 ; return 0; }
15787 EOF
15788 if { (eval echo configure:15789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15789   rm -rf conftest*
15790   eval "ac_cv_func__spawnlp=yes"
15791 else
15792   echo "configure: failed program was:" >&5
15793   cat conftest.$ac_ext >&5
15794   rm -rf conftest*
15795   eval "ac_cv_func__spawnlp=no"
15796 fi
15797 rm -f conftest*
15798 fi
15799
15800 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15801   echo "$ac_t""yes" 1>&6
15802   cat >> confdefs.h <<\EOF
15803 #define HAVE_SPAWNLP 1
15804 EOF
15805
15806 else
15807   echo "$ac_t""no" 1>&6
15808 fi
15809
15810
15811 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15812 echo "configure:15813: checking for _snprintf" >&5
15813 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15814   echo $ac_n "(cached) $ac_c" 1>&6
15815 else
15816   cat > conftest.$ac_ext <<EOF
15817 #line 15818 "configure"
15818 #include "confdefs.h"
15819 /* System header to define __stub macros and hopefully few prototypes,
15820     which can conflict with char _snprintf(); below.  */
15821 #include <assert.h>
15822 /* Override any gcc2 internal prototype to avoid an error.  */
15823 /* We use char because int might match the return type of a gcc2
15824     builtin and then its argument prototype would still apply.  */
15825 char _snprintf();
15826 char (*f)();
15827
15828 int main() {
15829
15830 /* The GNU C library defines this for functions which it implements
15831     to always fail with ENOSYS.  Some functions are actually named
15832     something starting with __ and the normal name is an alias.  */
15833 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15834 choke me
15835 #else
15836 f = _snprintf;
15837 #endif
15838
15839 ; return 0; }
15840 EOF
15841 if { (eval echo configure:15842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15842   rm -rf conftest*
15843   eval "ac_cv_func__snprintf=yes"
15844 else
15845   echo "configure: failed program was:" >&5
15846   cat conftest.$ac_ext >&5
15847   rm -rf conftest*
15848   eval "ac_cv_func__snprintf=no"
15849 fi
15850 rm -f conftest*
15851 fi
15852
15853 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15854   echo "$ac_t""yes" 1>&6
15855   ac_cv_func_snprintf=yes
15856         cat >> confdefs.h <<\EOF
15857 #define snprintf _snprintf
15858 EOF
15859
15860
15861 else
15862   echo "$ac_t""no" 1>&6
15863 fi
15864
15865
15866 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15867 echo "configure:15868: checking for _vsnprintf" >&5
15868 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15869   echo $ac_n "(cached) $ac_c" 1>&6
15870 else
15871   cat > conftest.$ac_ext <<EOF
15872 #line 15873 "configure"
15873 #include "confdefs.h"
15874 /* System header to define __stub macros and hopefully few prototypes,
15875     which can conflict with char _vsnprintf(); below.  */
15876 #include <assert.h>
15877 /* Override any gcc2 internal prototype to avoid an error.  */
15878 /* We use char because int might match the return type of a gcc2
15879     builtin and then its argument prototype would still apply.  */
15880 char _vsnprintf();
15881 char (*f)();
15882
15883 int main() {
15884
15885 /* The GNU C library defines this for functions which it implements
15886     to always fail with ENOSYS.  Some functions are actually named
15887     something starting with __ and the normal name is an alias.  */
15888 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15889 choke me
15890 #else
15891 f = _vsnprintf;
15892 #endif
15893
15894 ; return 0; }
15895 EOF
15896 if { (eval echo configure:15897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15897   rm -rf conftest*
15898   eval "ac_cv_func__vsnprintf=yes"
15899 else
15900   echo "configure: failed program was:" >&5
15901   cat conftest.$ac_ext >&5
15902   rm -rf conftest*
15903   eval "ac_cv_func__vsnprintf=no"
15904 fi
15905 rm -f conftest*
15906 fi
15907
15908 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15909   echo "$ac_t""yes" 1>&6
15910   ac_cv_func_vsnprintf=yes
15911         cat >> confdefs.h <<\EOF
15912 #define vsnprintf _vsnprintf
15913 EOF
15914
15915
15916 else
15917   echo "$ac_t""no" 1>&6
15918 fi
15919
15920
15921 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15922 echo "configure:15923: checking for vprintf" >&5
15923 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15924   echo $ac_n "(cached) $ac_c" 1>&6
15925 else
15926   cat > conftest.$ac_ext <<EOF
15927 #line 15928 "configure"
15928 #include "confdefs.h"
15929 /* System header to define __stub macros and hopefully few prototypes,
15930     which can conflict with char vprintf(); below.  */
15931 #include <assert.h>
15932 /* Override any gcc2 internal prototype to avoid an error.  */
15933 /* We use char because int might match the return type of a gcc2
15934     builtin and then its argument prototype would still apply.  */
15935 char vprintf();
15936 char (*f)();
15937
15938 int main() {
15939
15940 /* The GNU C library defines this for functions which it implements
15941     to always fail with ENOSYS.  Some functions are actually named
15942     something starting with __ and the normal name is an alias.  */
15943 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15944 choke me
15945 #else
15946 f = vprintf;
15947 #endif
15948
15949 ; return 0; }
15950 EOF
15951 if { (eval echo configure:15952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15952   rm -rf conftest*
15953   eval "ac_cv_func_vprintf=yes"
15954 else
15955   echo "configure: failed program was:" >&5
15956   cat conftest.$ac_ext >&5
15957   rm -rf conftest*
15958   eval "ac_cv_func_vprintf=no"
15959 fi
15960 rm -f conftest*
15961 fi
15962
15963 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15964   echo "$ac_t""yes" 1>&6
15965   cat >> confdefs.h <<\EOF
15966 #define HAVE_VPRINTF 1
15967 EOF
15968
15969 else
15970   echo "$ac_t""no" 1>&6
15971 fi
15972
15973 if test "$ac_cv_func_vprintf" != yes; then
15974 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15975 echo "configure:15976: checking for _doprnt" >&5
15976 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15977   echo $ac_n "(cached) $ac_c" 1>&6
15978 else
15979   cat > conftest.$ac_ext <<EOF
15980 #line 15981 "configure"
15981 #include "confdefs.h"
15982 /* System header to define __stub macros and hopefully few prototypes,
15983     which can conflict with char _doprnt(); below.  */
15984 #include <assert.h>
15985 /* Override any gcc2 internal prototype to avoid an error.  */
15986 /* We use char because int might match the return type of a gcc2
15987     builtin and then its argument prototype would still apply.  */
15988 char _doprnt();
15989 char (*f)();
15990
15991 int main() {
15992
15993 /* The GNU C library defines this for functions which it implements
15994     to always fail with ENOSYS.  Some functions are actually named
15995     something starting with __ and the normal name is an alias.  */
15996 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15997 choke me
15998 #else
15999 f = _doprnt;
16000 #endif
16001
16002 ; return 0; }
16003 EOF
16004 if { (eval echo configure:16005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16005   rm -rf conftest*
16006   eval "ac_cv_func__doprnt=yes"
16007 else
16008   echo "configure: failed program was:" >&5
16009   cat conftest.$ac_ext >&5
16010   rm -rf conftest*
16011   eval "ac_cv_func__doprnt=no"
16012 fi
16013 rm -f conftest*
16014 fi
16015
16016 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
16017   echo "$ac_t""yes" 1>&6
16018   cat >> confdefs.h <<\EOF
16019 #define HAVE_DOPRNT 1
16020 EOF
16021
16022 else
16023   echo "$ac_t""no" 1>&6
16024 fi
16025
16026 fi
16027
16028
16029 if test $ac_cv_func_vprintf = yes ; then
16030                 for ac_func in vsnprintf vsprintf
16031 do
16032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16033 echo "configure:16034: checking for $ac_func" >&5
16034 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16035   echo $ac_n "(cached) $ac_c" 1>&6
16036 else
16037   cat > conftest.$ac_ext <<EOF
16038 #line 16039 "configure"
16039 #include "confdefs.h"
16040 /* System header to define __stub macros and hopefully few prototypes,
16041     which can conflict with char $ac_func(); below.  */
16042 #include <assert.h>
16043 /* Override any gcc2 internal prototype to avoid an error.  */
16044 /* We use char because int might match the return type of a gcc2
16045     builtin and then its argument prototype would still apply.  */
16046 char $ac_func();
16047 char (*f)();
16048
16049 int main() {
16050
16051 /* The GNU C library defines this for functions which it implements
16052     to always fail with ENOSYS.  Some functions are actually named
16053     something starting with __ and the normal name is an alias.  */
16054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16055 choke me
16056 #else
16057 f = $ac_func;
16058 #endif
16059
16060 ; return 0; }
16061 EOF
16062 if { (eval echo configure:16063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16063   rm -rf conftest*
16064   eval "ac_cv_func_$ac_func=yes"
16065 else
16066   echo "configure: failed program was:" >&5
16067   cat conftest.$ac_ext >&5
16068   rm -rf conftest*
16069   eval "ac_cv_func_$ac_func=no"
16070 fi
16071 rm -f conftest*
16072 fi
16073
16074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16075   echo "$ac_t""yes" 1>&6
16076     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16077   cat >> confdefs.h <<EOF
16078 #define $ac_tr_func 1
16079 EOF
16080  
16081 else
16082   echo "$ac_t""no" 1>&6
16083 fi
16084 done
16085
16086 fi
16087
16088 for ac_func in \
16089         bcopy                   \
16090         closesocket             \
16091         chroot                  \
16092         endgrent                \
16093         endpwent                \
16094         fcntl                   \
16095         flock                   \
16096         getdtablesize   \
16097         getgrgid                \
16098         gethostname             \
16099         getpass                 \
16100         getpassphrase   \
16101         getpwuid                \
16102         getpwnam                \
16103         getspnam                \
16104         gettimeofday    \
16105         initgroups              \
16106         lockf                   \
16107         memcpy                  \
16108         memmove                 \
16109         mkstemp                 \
16110         pipe                    \
16111         read                    \
16112         recv                    \
16113         recvfrom                \
16114         setpwfile               \
16115         setgid                  \
16116         setegid                 \
16117         setsid                  \
16118         setuid                  \
16119         seteuid                 \
16120         sigaction               \
16121         signal                  \
16122         sigset                  \
16123         snprintf                \
16124         strdup                  \
16125         strerror                \
16126         strpbrk                 \
16127         strrchr                 \
16128         strsep                  \
16129         strstr                  \
16130         strtol                  \
16131         strtoul                 \
16132         strspn                  \
16133         sysconf                 \
16134         waitpid                 \
16135         wait4                   \
16136         write                   \
16137         send                    \
16138         sendto                  \
16139
16140 do
16141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16142 echo "configure:16143: checking for $ac_func" >&5
16143 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16144   echo $ac_n "(cached) $ac_c" 1>&6
16145 else
16146   cat > conftest.$ac_ext <<EOF
16147 #line 16148 "configure"
16148 #include "confdefs.h"
16149 /* System header to define __stub macros and hopefully few prototypes,
16150     which can conflict with char $ac_func(); below.  */
16151 #include <assert.h>
16152 /* Override any gcc2 internal prototype to avoid an error.  */
16153 /* We use char because int might match the return type of a gcc2
16154     builtin and then its argument prototype would still apply.  */
16155 char $ac_func();
16156 char (*f)();
16157
16158 int main() {
16159
16160 /* The GNU C library defines this for functions which it implements
16161     to always fail with ENOSYS.  Some functions are actually named
16162     something starting with __ and the normal name is an alias.  */
16163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16164 choke me
16165 #else
16166 f = $ac_func;
16167 #endif
16168
16169 ; return 0; }
16170 EOF
16171 if { (eval echo configure:16172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16172   rm -rf conftest*
16173   eval "ac_cv_func_$ac_func=yes"
16174 else
16175   echo "configure: failed program was:" >&5
16176   cat conftest.$ac_ext >&5
16177   rm -rf conftest*
16178   eval "ac_cv_func_$ac_func=no"
16179 fi
16180 rm -f conftest*
16181 fi
16182
16183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16184   echo "$ac_t""yes" 1>&6
16185     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16186   cat >> confdefs.h <<EOF
16187 #define $ac_tr_func 1
16188 EOF
16189  
16190 else
16191   echo "$ac_t""no" 1>&6
16192 fi
16193 done
16194
16195
16196 for ac_func in getopt tempnam
16197 do
16198 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16199 echo "configure:16200: checking for $ac_func" >&5
16200 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16201   echo $ac_n "(cached) $ac_c" 1>&6
16202 else
16203   cat > conftest.$ac_ext <<EOF
16204 #line 16205 "configure"
16205 #include "confdefs.h"
16206 /* System header to define __stub macros and hopefully few prototypes,
16207     which can conflict with char $ac_func(); below.  */
16208 #include <assert.h>
16209 /* Override any gcc2 internal prototype to avoid an error.  */
16210 /* We use char because int might match the return type of a gcc2
16211     builtin and then its argument prototype would still apply.  */
16212 char $ac_func();
16213 char (*f)();
16214
16215 int main() {
16216
16217 /* The GNU C library defines this for functions which it implements
16218     to always fail with ENOSYS.  Some functions are actually named
16219     something starting with __ and the normal name is an alias.  */
16220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16221 choke me
16222 #else
16223 f = $ac_func;
16224 #endif
16225
16226 ; return 0; }
16227 EOF
16228 if { (eval echo configure:16229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16229   rm -rf conftest*
16230   eval "ac_cv_func_$ac_func=yes"
16231 else
16232   echo "configure: failed program was:" >&5
16233   cat conftest.$ac_ext >&5
16234   rm -rf conftest*
16235   eval "ac_cv_func_$ac_func=no"
16236 fi
16237 rm -f conftest*
16238 fi
16239
16240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16241   echo "$ac_t""yes" 1>&6
16242     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16243   cat >> confdefs.h <<EOF
16244 #define $ac_tr_func 1
16245 EOF
16246  
16247 else
16248   echo "$ac_t""no" 1>&6
16249 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16250 fi
16251 done
16252
16253
16254
16255 if test "$ac_cv_func_getopt" != yes; then
16256     LIBSRCS="$LIBSRCS getopt.c"
16257 fi
16258
16259 if test "$ac_cv_func_tempnam" != yes; then
16260     LIBSRCS="$LIBSRCS tempnam.c"
16261 fi
16262
16263 # Check Configuration
16264 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
16265 echo "configure:16266: checking declaration of sys_errlist" >&5
16266 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
16267   echo $ac_n "(cached) $ac_c" 1>&6
16268 else
16269   
16270         cat > conftest.$ac_ext <<EOF
16271 #line 16272 "configure"
16272 #include "confdefs.h"
16273
16274 #include <stdio.h>
16275 #include <sys/types.h>
16276 #include <errno.h>
16277 #ifdef WINNT
16278 #include <stdlib.h>
16279 #endif 
16280 int main() {
16281 char *c = (char *) *sys_errlist
16282 ; return 0; }
16283 EOF
16284 if { (eval echo configure:16285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16285   rm -rf conftest*
16286   ol_cv_dcl_sys_errlist=yes
16287         ol_cv_have_sys_errlist=yes
16288 else
16289   echo "configure: failed program was:" >&5
16290   cat conftest.$ac_ext >&5
16291   rm -rf conftest*
16292   ol_cv_dcl_sys_errlist=no
16293 fi
16294 rm -f conftest*
16295 fi
16296
16297 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
16298 #
16299 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16300 if test $ol_cv_dcl_sys_errlist = no ; then
16301         cat >> confdefs.h <<\EOF
16302 #define DECL_SYS_ERRLIST 1
16303 EOF
16304
16305
16306         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
16307 echo "configure:16308: checking existence of sys_errlist" >&5
16308 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16309   echo $ac_n "(cached) $ac_c" 1>&6
16310 else
16311   
16312                 cat > conftest.$ac_ext <<EOF
16313 #line 16314 "configure"
16314 #include "confdefs.h"
16315 #include <errno.h>
16316 int main() {
16317 char *c = (char *) *sys_errlist
16318 ; return 0; }
16319 EOF
16320 if { (eval echo configure:16321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16321   rm -rf conftest*
16322   ol_cv_have_sys_errlist=yes
16323 else
16324   echo "configure: failed program was:" >&5
16325   cat conftest.$ac_ext >&5
16326   rm -rf conftest*
16327   ol_cv_have_sys_errlist=no
16328 fi
16329 rm -f conftest*
16330 fi
16331
16332 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16333 fi
16334 if test $ol_cv_have_sys_errlist = yes ; then
16335         cat >> confdefs.h <<\EOF
16336 #define HAVE_SYS_ERRLIST 1
16337 EOF
16338
16339 fi
16340
16341
16342
16343 if test "$ol_enable_debug" != no ; then
16344         cat >> confdefs.h <<\EOF
16345 #define LDAP_DEBUG 1
16346 EOF
16347
16348 fi
16349 if test "$ol_enable_syslog" = yes ; then
16350         cat >> confdefs.h <<\EOF
16351 #define LDAP_SYSLOG 1
16352 EOF
16353
16354 fi
16355 if test "$ol_enable_cache" = no ; then
16356         cat >> confdefs.h <<\EOF
16357 #define LDAP_NOCACHE 1
16358 EOF
16359
16360 fi
16361 if test "$ol_link_kbind" != no ; then
16362         cat >> confdefs.h <<\EOF
16363 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16364 EOF
16365
16366 fi
16367 if test "$ol_enable_proctitle" != no ; then
16368         cat >> confdefs.h <<\EOF
16369 #define LDAP_PROCTITLE 1
16370 EOF
16371
16372 fi
16373 if test "$ol_enable_referrals" != no ; then
16374         cat >> confdefs.h <<\EOF
16375 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16376 EOF
16377
16378 fi
16379 if test "$ol_enable_local" != no; then
16380         cat >> confdefs.h <<\EOF
16381 #define LDAP_PF_LOCAL 1
16382 EOF
16383
16384 fi
16385 if test "$ol_link_ipv6" != no; then
16386         cat >> confdefs.h <<\EOF
16387 #define LDAP_PF_INET6 1
16388 EOF
16389
16390 fi
16391 if test "$ol_enable_cleartext" != no ; then
16392         cat >> confdefs.h <<\EOF
16393 #define SLAPD_CLEARTEXT 1
16394 EOF
16395
16396 fi
16397 if test "$ol_enable_crypt" != no ; then
16398         cat >> confdefs.h <<\EOF
16399 #define SLAPD_CRYPT 1
16400 EOF
16401
16402 fi
16403 if test "$ol_link_kpasswd" != no ; then
16404         cat >> confdefs.h <<\EOF
16405 #define SLAPD_KPASSWD 1
16406 EOF
16407
16408 fi
16409 if test "$ol_link_spasswd" != no ; then
16410         cat >> confdefs.h <<\EOF
16411 #define SLAPD_SPASSWD 1
16412 EOF
16413
16414 fi
16415 if test "$ol_enable_phonetic" != no ; then
16416         cat >> confdefs.h <<\EOF
16417 #define SLAPD_PHONETIC 1
16418 EOF
16419
16420 fi
16421 if test "$ol_enable_rlookups" != no ; then
16422         cat >> confdefs.h <<\EOF
16423 #define SLAPD_RLOOKUPS 1
16424 EOF
16425
16426 fi
16427 if test "$ol_enable_aci" != no ; then
16428         cat >> confdefs.h <<\EOF
16429 #define SLAPD_ACI_ENABLED 1
16430 EOF
16431
16432 fi
16433
16434 if test "$ol_link_modules" != no ; then
16435         cat >> confdefs.h <<\EOF
16436 #define SLAPD_MODULES 1
16437 EOF
16438
16439         BUILD_SLAPD=yes
16440         SLAPD_MODULES_LDFLAGS="-dlopen self"
16441 fi
16442
16443 if test "$ol_enable_bdb" != no ; then
16444         cat >> confdefs.h <<\EOF
16445 #define SLAPD_BDB 1
16446 EOF
16447
16448         BUILD_SLAPD=yes
16449         BUILD_BDB=yes
16450         if test "$ol_with_bdb_module" != static ; then
16451                 cat >> confdefs.h <<\EOF
16452 #define SLAPD_BDB_DYNAMIC 1
16453 EOF
16454
16455                 BUILD_BDB=mod
16456                 BUILD_BDB_DYNAMIC=shared
16457                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16458         fi
16459 fi
16460
16461 if test "$ol_link_dnssrv" != no ; then
16462         cat >> confdefs.h <<\EOF
16463 #define SLAPD_DNSSRV 1
16464 EOF
16465
16466         BUILD_SLAPD=yes
16467         BUILD_DNSSRV=yes
16468         if test "$ol_with_dnssrv_module" != static ; then
16469                 cat >> confdefs.h <<\EOF
16470 #define SLAPD_DNSSRV_DYNAMIC 1
16471 EOF
16472
16473                 BUILD_DNSSRV=mod
16474                 BUILD_DNSSRV_DYNAMIC=shared
16475                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16476         fi
16477 fi
16478
16479 if test "$ol_enable_ldap" != no ; then
16480         cat >> confdefs.h <<\EOF
16481 #define SLAPD_LDAP 1
16482 EOF
16483
16484         BUILD_SLAPD=yes
16485         BUILD_LDAP=yes
16486         if test "$ol_with_ldap_module" != static ; then
16487                 cat >> confdefs.h <<\EOF
16488 #define SLAPD_LDAP_DYNAMIC 1
16489 EOF
16490
16491                 BUILD_LDAP=mod
16492                 BUILD_LDAP_DYNAMIC=shared
16493                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16494         fi
16495 fi
16496
16497 if test "$ol_link_ldbm" != no ; then
16498         cat >> confdefs.h <<\EOF
16499 #define SLAPD_LDBM 1
16500 EOF
16501
16502         BUILD_SLAPD=yes
16503         BUILD_LDBM=yes
16504         if test "$ol_with_ldbm_module" != static ; then
16505                 cat >> confdefs.h <<\EOF
16506 #define SLAPD_LDBM_DYNAMIC 1
16507 EOF
16508
16509                 BUILD_LDBM=mod
16510                 BUILD_LDBM_DYNAMIC=shared
16511                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16512         fi
16513 fi
16514
16515 if test "$ol_enable_passwd" != no ; then
16516         cat >> confdefs.h <<\EOF
16517 #define SLAPD_PASSWD 1
16518 EOF
16519
16520         BUILD_SLAPD=yes
16521         BUILD_PASSWD=yes
16522         if test "$ol_with_passwd_module" != static ; then
16523                 cat >> confdefs.h <<\EOF
16524 #define SLAPD_PASSWD_DYNAMIC 1
16525 EOF
16526
16527                 BUILD_PASSWD=mod
16528                 BUILD_PASSWD_DYNAMIC=shared
16529                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16530         fi
16531 fi
16532
16533 if test "$ol_link_perl" != no ; then
16534         cat >> confdefs.h <<\EOF
16535 #define SLAPD_PERL 1
16536 EOF
16537
16538         BUILD_SLAPD=yes
16539         BUILD_PERL=yes
16540         if test "$ol_with_perl_module" != static ; then
16541                 cat >> confdefs.h <<\EOF
16542 #define SLAPD_PERL_DYNAMIC 1
16543 EOF
16544
16545                 BUILD_PERL=mod
16546                 BUILD_PERL_DYNAMIC=shared
16547                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16548         fi
16549 fi
16550
16551 if test "$ol_enable_shell" != no ; then
16552         cat >> confdefs.h <<\EOF
16553 #define SLAPD_SHELL 1
16554 EOF
16555
16556         BUILD_SLAPD=yes
16557         BUILD_SHELL=yes
16558         if test "$ol_with_shell_module" != static ; then
16559                 cat >> confdefs.h <<\EOF
16560 #define SLAPD_SHELL_DYNAMIC 1
16561 EOF
16562
16563                 BUILD_SHELL=mod
16564                 BUILD_SHELL_DYNAMIC=shared
16565                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16566         fi
16567 fi
16568
16569 if test "$ol_enable_tcl" != no ; then
16570         cat >> confdefs.h <<\EOF
16571 #define SLAPD_TCL 1
16572 EOF
16573
16574         BUILD_SLAPD=yes
16575         BUILD_TCL=yes
16576         if test "$ol_with_tcl_module" != static; then
16577                 cat >> confdefs.h <<\EOF
16578 #define SLAPD_TCL_DYNAMIC 1
16579 EOF
16580
16581                 BUILD_TCL=mod
16582                 BUILD_TCL_DYNAMIC=shared
16583                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16584         fi
16585 fi
16586
16587 if test "$ol_link_sql" != no ; then
16588         cat >> confdefs.h <<\EOF
16589 #define SLAPD_SQL 1
16590 EOF
16591
16592         BUILD_SLAPD=yes
16593         BUILD_SQL=yes
16594         if test "$ol_with_sql_module" != static; then
16595                 cat >> confdefs.h <<\EOF
16596 #define SLAPD_SQL_DYNAMIC 1
16597 EOF
16598
16599                 BUILD_SQL=mod
16600                 BUILD_SQL_DYNAMIC=shared
16601                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16602         fi
16603 fi
16604
16605 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16606         $BUILD_SLAPD = yes ; then
16607         BUILD_SLURPD=yes
16608 fi
16609
16610
16611 if test "$LINK_BINS_DYNAMIC" = yes; then
16612     LIB_LINKAGE=DYN
16613     LT_LIB_LINKAGE=shared
16614 else
16615     LIB_LINKAGE=STAT
16616     LT_LIB_LINKAGE=static
16617 fi
16618
16619 if test "$ac_cv_mingw32" = yes ; then
16620     PLAT=NT
16621     DYN_EXT=dll
16622 else
16623     PLAT=UNIX
16624     DYN_EXT=so
16625 fi
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635   
16636   
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 trap '' 1 2 15
16691
16692 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16693
16694 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16695 # Let make expand exec_prefix.
16696 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16697
16698 # Any assignment to VPATH causes Sun make to only execute
16699 # the first set of double-colon rules, so remove it if not needed.
16700 # If there is a colon in the path, we need to keep it.
16701 if test "x$srcdir" = x.; then
16702   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16703 fi
16704
16705 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16706
16707 DEFS=-DHAVE_CONFIG_H
16708
16709 # Without the "./", some shells look in PATH for config.status.
16710 : ${CONFIG_STATUS=./config.status}
16711
16712 echo creating $CONFIG_STATUS
16713 rm -f $CONFIG_STATUS
16714 cat > $CONFIG_STATUS <<EOF
16715 #! /bin/sh
16716 # Generated automatically by configure.
16717 # Run this file to recreate the current configuration.
16718 # This directory was configured as follows,
16719 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16720 #
16721 # $0 $ac_configure_args
16722 #
16723 # Compiler output produced by configure, useful for debugging
16724 # configure, is in ./config.log if it exists.
16725
16726 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16727 for ac_option
16728 do
16729   case "\$ac_option" in
16730   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16731     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16732     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16733   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16734     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16735     exit 0 ;;
16736   -help | --help | --hel | --he | --h)
16737     echo "\$ac_cs_usage"; exit 0 ;;
16738   *) echo "\$ac_cs_usage"; exit 1 ;;
16739   esac
16740 done
16741
16742 ac_given_srcdir=$srcdir
16743 ac_given_INSTALL="$INSTALL"
16744
16745 trap 'rm -fr `echo "\
16746 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16747 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16748 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16749 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16750 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16751 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16752 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16753 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16754 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16755 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16756 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16757 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16758 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16759 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16760 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16761 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16762 include/Makefile:build/top.mk:include/Makefile.in \
16763 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16764 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16765 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16766 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16767 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16768 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16769 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16770 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16771 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16772 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16773 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16774 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16775 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16776 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16777 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16778 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16779 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16780 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16781 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16782 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16783 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16784 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16785 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16786 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16787 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16788 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16789 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16790 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16791  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16792 EOF
16793 cat >> $CONFIG_STATUS <<EOF
16794
16795 # Protect against being on the right side of a sed subst in config.status.
16796 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16797  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16798 $ac_vpsub
16799 $extrasub
16800 s%@SHELL@%$SHELL%g
16801 s%@CFLAGS@%$CFLAGS%g
16802 s%@CPPFLAGS@%$CPPFLAGS%g
16803 s%@CXXFLAGS@%$CXXFLAGS%g
16804 s%@FFLAGS@%$FFLAGS%g
16805 s%@DEFS@%$DEFS%g
16806 s%@LDFLAGS@%$LDFLAGS%g
16807 s%@LIBS@%$LIBS%g
16808 s%@exec_prefix@%$exec_prefix%g
16809 s%@prefix@%$prefix%g
16810 s%@program_transform_name@%$program_transform_name%g
16811 s%@bindir@%$bindir%g
16812 s%@sbindir@%$sbindir%g
16813 s%@libexecdir@%$libexecdir%g
16814 s%@datadir@%$datadir%g
16815 s%@sysconfdir@%$sysconfdir%g
16816 s%@sharedstatedir@%$sharedstatedir%g
16817 s%@localstatedir@%$localstatedir%g
16818 s%@libdir@%$libdir%g
16819 s%@includedir@%$includedir%g
16820 s%@oldincludedir@%$oldincludedir%g
16821 s%@infodir@%$infodir%g
16822 s%@mandir@%$mandir%g
16823 s%@host@%$host%g
16824 s%@host_alias@%$host_alias%g
16825 s%@host_cpu@%$host_cpu%g
16826 s%@host_vendor@%$host_vendor%g
16827 s%@host_os@%$host_os%g
16828 s%@target@%$target%g
16829 s%@target_alias@%$target_alias%g
16830 s%@target_cpu@%$target_cpu%g
16831 s%@target_vendor@%$target_vendor%g
16832 s%@target_os@%$target_os%g
16833 s%@build@%$build%g
16834 s%@build_alias@%$build_alias%g
16835 s%@build_cpu@%$build_cpu%g
16836 s%@build_vendor@%$build_vendor%g
16837 s%@build_os@%$build_os%g
16838 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16839 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16840 s%@INSTALL_DATA@%$INSTALL_DATA%g
16841 s%@PACKAGE@%$PACKAGE%g
16842 s%@VERSION@%$VERSION%g
16843 s%@ACLOCAL@%$ACLOCAL%g
16844 s%@AUTOCONF@%$AUTOCONF%g
16845 s%@AUTOMAKE@%$AUTOMAKE%g
16846 s%@AUTOHEADER@%$AUTOHEADER%g
16847 s%@MAKEINFO@%$MAKEINFO%g
16848 s%@install_sh@%$install_sh%g
16849 s%@AMTAR@%$AMTAR%g
16850 s%@AWK@%$AWK%g
16851 s%@AMTARFLAGS@%$AMTARFLAGS%g
16852 s%@SET_MAKE@%$SET_MAKE%g
16853 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16854 s%@top_builddir@%$top_builddir%g
16855 s%@ldap_subdir@%$ldap_subdir%g
16856 s%@CC@%$CC%g
16857 s%@RANLIB@%$RANLIB%g
16858 s%@LN_S@%$LN_S%g
16859 s%@DLLTOOL@%$DLLTOOL%g
16860 s%@AS@%$AS%g
16861 s%@OBJDUMP@%$OBJDUMP%g
16862 s%@LIBTOOL@%$LIBTOOL%g
16863 s%@LN_H@%$LN_H%g
16864 s%@SENDMAIL@%$SENDMAIL%g
16865 s%@EDITOR@%$EDITOR%g
16866 s%@FINGER@%$FINGER%g
16867 s%@PERLBIN@%$PERLBIN%g
16868 s%@CPP@%$CPP%g
16869 s%@EXEEXT@%$EXEEXT%g
16870 s%@OBJEXT@%$OBJEXT%g
16871 s%@OL_MKDEP@%$OL_MKDEP%g
16872 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16873 s%@LIBOBJS@%$LIBOBJS%g
16874 s%@LIBSRCS@%$LIBSRCS%g
16875 s%@PLAT@%$PLAT%g
16876 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16877 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16878 s%@DYN_EXT@%$DYN_EXT%g
16879 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16880 s%@BUILD_BDB@%$BUILD_BDB%g
16881 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16882 s%@BUILD_LDAP@%$BUILD_LDAP%g
16883 s%@BUILD_LDBM@%$BUILD_LDBM%g
16884 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16885 s%@BUILD_PERL@%$BUILD_PERL%g
16886 s%@BUILD_SHELL@%$BUILD_SHELL%g
16887 s%@BUILD_SQL@%$BUILD_SQL%g
16888 s%@BUILD_TCL@%$BUILD_TCL%g
16889 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16890 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16891 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16892 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16893 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16894 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16895 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16896 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16897 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16898 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16899 s%@LDAP_LIBS@%$LDAP_LIBS%g
16900 s%@LDIF_LIBS@%$LDIF_LIBS%g
16901 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16902 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16903 s%@LDBM_LIBS@%$LDBM_LIBS%g
16904 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16905 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16906 s%@WRAP_LIBS@%$WRAP_LIBS%g
16907 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16908 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16909 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16910 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16911 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16912 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16913 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16914 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16915 s%@KRB4_LIBS@%$KRB4_LIBS%g
16916 s%@KRB5_LIBS@%$KRB5_LIBS%g
16917 s%@READLINE_LIBS@%$READLINE_LIBS%g
16918 s%@SASL_LIBS@%$SASL_LIBS%g
16919 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16920 s%@TLS_LIBS@%$TLS_LIBS%g
16921 s%@MODULES_LIBS@%$MODULES_LIBS%g
16922 s%@AUTH_LIBS@%$AUTH_LIBS%g
16923 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
16924 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16925 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16926 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16927
16928 CEOF
16929 EOF
16930
16931 cat >> $CONFIG_STATUS <<\EOF
16932
16933 # Split the substitutions into bite-sized pieces for seds with
16934 # small command number limits, like on Digital OSF/1 and HP-UX.
16935 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16936 ac_file=1 # Number of current file.
16937 ac_beg=1 # First line for current file.
16938 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16939 ac_more_lines=:
16940 ac_sed_cmds=""
16941 while $ac_more_lines; do
16942   if test $ac_beg -gt 1; then
16943     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16944   else
16945     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16946   fi
16947   if test ! -s conftest.s$ac_file; then
16948     ac_more_lines=false
16949     rm -f conftest.s$ac_file
16950   else
16951     if test -z "$ac_sed_cmds"; then
16952       ac_sed_cmds="sed -f conftest.s$ac_file"
16953     else
16954       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16955     fi
16956     ac_file=`expr $ac_file + 1`
16957     ac_beg=$ac_end
16958     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16959   fi
16960 done
16961 if test -z "$ac_sed_cmds"; then
16962   ac_sed_cmds=cat
16963 fi
16964 EOF
16965
16966 cat >> $CONFIG_STATUS <<EOF
16967
16968 CONFIG_FILES=\${CONFIG_FILES-"\
16969 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16970 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16971 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16972 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16973 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16974 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16975 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16976 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16977 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16978 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16979 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16980 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16981 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16982 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16983 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16984 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16985 include/Makefile:build/top.mk:include/Makefile.in \
16986 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16987 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16988 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16989 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16990 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16991 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16992 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16993 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16994 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16995 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16996 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16997 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16998 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16999 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17000 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17001 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17002 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
17003 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17004 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17005 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
17006 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17007 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17008 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17009 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17010 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17011 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17012 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17013 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
17014 "}
17015 EOF
17016 cat >> $CONFIG_STATUS <<\EOF
17017 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
17018   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17019   case "$ac_file" in
17020   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17021        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17022   *) ac_file_in="${ac_file}.in" ;;
17023   esac
17024
17025   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
17026
17027   # Remove last slash and all that follows it.  Not all systems have dirname.
17028   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17029   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17030     # The file is in a subdirectory.
17031     test ! -d "$ac_dir" && mkdir "$ac_dir"
17032     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
17033     # A "../" for each directory in $ac_dir_suffix.
17034     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
17035   else
17036     ac_dir_suffix= ac_dots=
17037   fi
17038
17039   case "$ac_given_srcdir" in
17040   .)  srcdir=.
17041       if test -z "$ac_dots"; then top_srcdir=.
17042       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
17043   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
17044   *) # Relative path.
17045     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
17046     top_srcdir="$ac_dots$ac_given_srcdir" ;;
17047   esac
17048
17049   case "$ac_given_INSTALL" in
17050   [/$]*) INSTALL="$ac_given_INSTALL" ;;
17051   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
17052   esac
17053
17054   echo creating "$ac_file"
17055   rm -f "$ac_file"
17056   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
17057   case "$ac_file" in
17058   *[Mm]akefile*) ac_comsub="1i\\
17059 # $configure_input" ;;
17060   *) ac_comsub= ;;
17061   esac
17062
17063   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17064   sed -e "$ac_comsub
17065 s%@configure_input@%$configure_input%g
17066 s%@srcdir@%$srcdir%g
17067 s%@top_srcdir@%$top_srcdir%g
17068 s%@INSTALL@%$INSTALL%g
17069 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
17070 fi; done
17071 rm -f conftest.s*
17072
17073 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17074 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17075 #
17076 # ac_d sets the value in "#define NAME VALUE" lines.
17077 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17078 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
17079 ac_dC='\3'
17080 ac_dD='%g'
17081 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17082 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17083 ac_uB='\([      ]\)%\1#\2define\3'
17084 ac_uC=' '
17085 ac_uD='\4%g'
17086 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17087 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17088 ac_eB='$%\1#\2define\3'
17089 ac_eC=' '
17090 ac_eD='%g'
17091
17092 if test "${CONFIG_HEADERS+set}" != set; then
17093 EOF
17094 cat >> $CONFIG_STATUS <<EOF
17095   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
17096 EOF
17097 cat >> $CONFIG_STATUS <<\EOF
17098 fi
17099 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17100   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17101   case "$ac_file" in
17102   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17103        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17104   *) ac_file_in="${ac_file}.in" ;;
17105   esac
17106
17107   echo creating $ac_file
17108
17109   rm -f conftest.frag conftest.in conftest.out
17110   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17111   cat $ac_file_inputs > conftest.in
17112
17113 EOF
17114
17115 # Transform confdefs.h into a sed script conftest.vals that substitutes
17116 # the proper values into config.h.in to produce config.h.  And first:
17117 # Protect against being on the right side of a sed subst in config.status.
17118 # Protect against being in an unquoted here document in config.status.
17119 rm -f conftest.vals
17120 cat > conftest.hdr <<\EOF
17121 s/[\\&%]/\\&/g
17122 s%[\\$`]%\\&%g
17123 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17124 s%ac_d%ac_u%gp
17125 s%ac_u%ac_e%gp
17126 EOF
17127 sed -n -f conftest.hdr confdefs.h > conftest.vals
17128 rm -f conftest.hdr
17129
17130 # This sed command replaces #undef with comments.  This is necessary, for
17131 # example, in the case of _POSIX_SOURCE, which is predefined and required
17132 # on some systems where configure will not decide to define it.
17133 cat >> conftest.vals <<\EOF
17134 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17135 EOF
17136
17137 # Break up conftest.vals because some shells have a limit on
17138 # the size of here documents, and old seds have small limits too.
17139
17140 rm -f conftest.tail
17141 while :
17142 do
17143   ac_lines=`grep -c . conftest.vals`
17144   # grep -c gives empty output for an empty file on some AIX systems.
17145   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17146   # Write a limited-size here document to conftest.frag.
17147   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17148   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17149   echo 'CEOF
17150   sed -f conftest.frag conftest.in > conftest.out
17151   rm -f conftest.in
17152   mv conftest.out conftest.in
17153 ' >> $CONFIG_STATUS
17154   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17155   rm -f conftest.vals
17156   mv conftest.tail conftest.vals
17157 done
17158 rm -f conftest.vals
17159
17160 cat >> $CONFIG_STATUS <<\EOF
17161   rm -f conftest.frag conftest.h
17162   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17163   cat conftest.in >> conftest.h
17164   rm -f conftest.in
17165   if cmp -s $ac_file conftest.h 2>/dev/null; then
17166     echo "$ac_file is unchanged"
17167     rm -f conftest.h
17168   else
17169     # Remove last slash and all that follows it.  Not all systems have dirname.
17170       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17171       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17172       # The file is in a subdirectory.
17173       test ! -d "$ac_dir" && mkdir "$ac_dir"
17174     fi
17175     rm -f $ac_file
17176     mv conftest.h $ac_file
17177   fi
17178 fi; done
17179
17180 EOF
17181 cat >> $CONFIG_STATUS <<EOF
17182
17183 EOF
17184 cat >> $CONFIG_STATUS <<\EOF
17185
17186 date > stamp-h
17187 echo Please \"make depend\" to build dependencies
17188
17189 exit 0
17190 EOF
17191 chmod +x $CONFIG_STATUS
17192 rm -fr confdefs* $ac_clean_files
17193 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
17194