]> git.sur5r.net Git - openldap/blob - configure
ITS#717 kbind fixes
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.323 2000/08/29 22:03:29 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug          enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog         enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle      enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache          enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-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-cleartext    enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd      enable kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster  enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-rlookups     enable reverse lookups (auto)"
81 ac_help="$ac_help
82     --enable-aci          enable per-object ACIs (no)"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support (no)"
85 ac_help="$ac_help
86     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
87 ac_help="$ac_help
88     --enable-dnssrv       enable dnssrv backend (no)"
89 ac_help="$ac_help
90     --with-dnssrv-module  module type (static)"
91 ac_help="$ac_help
92     --enable-ldap         enable ldap backend (no)"
93 ac_help="$ac_help
94     --with-ldap-module    module type (static)"
95 ac_help="$ac_help
96     --enable-ldbm         enable ldbm backend (yes)"
97 ac_help="$ac_help
98     --with-ldbm-api       with LDBM API (auto)"
99 ac_help="$ac_help
100     --with-ldbm-module    module type (static)"
101 ac_help="$ac_help
102     --with-ldbm-type      use LDBM type (auto)"
103 ac_help="$ac_help
104     --enable-passwd       enable passwd backend (no)"
105 ac_help="$ac_help
106     --with-passwd-module  module type (static)"
107 ac_help="$ac_help
108     --enable-perl         enable perl backend (no)"
109 ac_help="$ac_help
110     --with-perl-module    module type (static)"
111 ac_help="$ac_help
112     --enable-shell        enable shell backend (no)"
113 ac_help="$ac_help
114     --with-shell-module   module type (static)"
115 ac_help="$ac_help
116     --enable-sql          enable sql backend (no)"
117 ac_help="$ac_help
118     --with-sql-module     module type (static)"
119 ac_help="$ac_help
120     --enable-tcl          enable tcl backend (no)"
121 ac_help="$ac_help
122     --with-tcl-module     module type (static)"
123 ac_help="$ac_help
124 SLURPD (Replication Daemon) Options:"
125 ac_help="$ac_help
126   --enable-slurpd         enable building slurpd (auto)"
127 ac_help="$ac_help
128 Library Generation & Linking Options"
129 ac_help="$ac_help
130   --enable-static[=PKGS]  build static libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-shared[=PKGS]  build shared libraries [default=yes]"
133 ac_help="$ac_help
134   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
135 ac_help="$ac_help
136   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
137 ac_help="$ac_help
138   --disable-libtool-lock  avoid locking (might break parallel builds)"
139
140 # Initialize some variables set by options.
141 # The variables have the same names as the options, with
142 # dashes changed to underlines.
143 build=NONE
144 cache_file=./config.cache
145 exec_prefix=NONE
146 host=NONE
147 no_create=
148 nonopt=NONE
149 no_recursion=
150 prefix=NONE
151 program_prefix=NONE
152 program_suffix=NONE
153 program_transform_name=s,x,x,
154 silent=
155 site=
156 srcdir=
157 target=NONE
158 verbose=
159 x_includes=NONE
160 x_libraries=NONE
161 bindir='${exec_prefix}/bin'
162 sbindir='${exec_prefix}/sbin'
163 libexecdir='${exec_prefix}/libexec'
164 datadir='${prefix}/share'
165 sysconfdir='${prefix}/etc'
166 sharedstatedir='${prefix}/com'
167 localstatedir='${prefix}/var'
168 libdir='${exec_prefix}/lib'
169 includedir='${prefix}/include'
170 oldincludedir='/usr/include'
171 infodir='${prefix}/info'
172 mandir='${prefix}/man'
173
174 # Initialize some other variables.
175 subdirs=
176 MFLAGS= MAKEFLAGS=
177 SHELL=${CONFIG_SHELL-/bin/sh}
178 # Maximum number of lines to put in a shell here document.
179 ac_max_here_lines=12
180
181 ac_prev=
182 for ac_option
183 do
184
185   # If the previous option needs an argument, assign it.
186   if test -n "$ac_prev"; then
187     eval "$ac_prev=\$ac_option"
188     ac_prev=
189     continue
190   fi
191
192   case "$ac_option" in
193   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
194   *) ac_optarg= ;;
195   esac
196
197   # Accept the important Cygnus configure options, so we can diagnose typos.
198
199   case "$ac_option" in
200
201   -bindir | --bindir | --bindi | --bind | --bin | --bi)
202     ac_prev=bindir ;;
203   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
204     bindir="$ac_optarg" ;;
205
206   -build | --build | --buil | --bui | --bu)
207     ac_prev=build ;;
208   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
209     build="$ac_optarg" ;;
210
211   -cache-file | --cache-file | --cache-fil | --cache-fi \
212   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
213     ac_prev=cache_file ;;
214   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
215   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
216     cache_file="$ac_optarg" ;;
217
218   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
219     ac_prev=datadir ;;
220   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
221   | --da=*)
222     datadir="$ac_optarg" ;;
223
224   -disable-* | --disable-*)
225     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
226     # Reject names that are not valid shell variable names.
227     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
228       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
229     fi
230     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
231     eval "enable_${ac_feature}=no" ;;
232
233   -enable-* | --enable-*)
234     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
235     # Reject names that are not valid shell variable names.
236     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
237       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
238     fi
239     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
240     case "$ac_option" in
241       *=*) ;;
242       *) ac_optarg=yes ;;
243     esac
244     eval "enable_${ac_feature}='$ac_optarg'" ;;
245
246   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
247   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
248   | --exec | --exe | --ex)
249     ac_prev=exec_prefix ;;
250   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
251   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
252   | --exec=* | --exe=* | --ex=*)
253     exec_prefix="$ac_optarg" ;;
254
255   -gas | --gas | --ga | --g)
256     # Obsolete; use --with-gas.
257     with_gas=yes ;;
258
259   -help | --help | --hel | --he)
260     # Omit some internal or obsolete options to make the list less imposing.
261     # This message is too long to be a string in the A/UX 3.1 sh.
262     cat << EOF
263 Usage: configure [options] [host]
264 Options: [defaults in brackets after descriptions]
265 Configuration:
266   --cache-file=FILE       cache test results in FILE
267   --help                  print this message
268   --no-create             do not create output files
269   --quiet, --silent       do not print \`checking...' messages
270   --version               print the version of autoconf that created configure
271 Directory and file names:
272   --prefix=PREFIX         install architecture-independent files in PREFIX
273                           [$ac_default_prefix]
274   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
275                           [same as prefix]
276   --bindir=DIR            user executables in DIR [EPREFIX/bin]
277   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
278   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
279   --datadir=DIR           read-only architecture-independent data in DIR
280                           [PREFIX/share]
281   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
282   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
283                           [PREFIX/com]
284   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
285   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
286   --includedir=DIR        C header files in DIR [PREFIX/include]
287   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
288   --infodir=DIR           info documentation in DIR [PREFIX/info]
289   --mandir=DIR            man documentation in DIR [PREFIX/man]
290   --srcdir=DIR            find the sources in DIR [configure dir or ..]
291   --program-prefix=PREFIX prepend PREFIX to installed program names
292   --program-suffix=SUFFIX append SUFFIX to installed program names
293   --program-transform-name=PROGRAM
294                           run sed PROGRAM on installed program names
295 EOF
296     cat << EOF
297 Host type:
298   --build=BUILD           configure for building on BUILD [BUILD=HOST]
299   --host=HOST             configure for HOST [guessed]
300   --target=TARGET         configure for TARGET [TARGET=HOST]
301 Features and packages:
302   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
303   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
304   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
305   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
306   --x-includes=DIR        X include files are in DIR
307   --x-libraries=DIR       X library files are in DIR
308 EOF
309     if test -n "$ac_help"; then
310       echo "--enable and --with options recognized:$ac_help"
311     fi
312     exit 0 ;;
313
314   -host | --host | --hos | --ho)
315     ac_prev=host ;;
316   -host=* | --host=* | --hos=* | --ho=*)
317     host="$ac_optarg" ;;
318
319   -includedir | --includedir | --includedi | --included | --include \
320   | --includ | --inclu | --incl | --inc)
321     ac_prev=includedir ;;
322   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
323   | --includ=* | --inclu=* | --incl=* | --inc=*)
324     includedir="$ac_optarg" ;;
325
326   -infodir | --infodir | --infodi | --infod | --info | --inf)
327     ac_prev=infodir ;;
328   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
329     infodir="$ac_optarg" ;;
330
331   -libdir | --libdir | --libdi | --libd)
332     ac_prev=libdir ;;
333   -libdir=* | --libdir=* | --libdi=* | --libd=*)
334     libdir="$ac_optarg" ;;
335
336   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
337   | --libexe | --libex | --libe)
338     ac_prev=libexecdir ;;
339   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
340   | --libexe=* | --libex=* | --libe=*)
341     libexecdir="$ac_optarg" ;;
342
343   -localstatedir | --localstatedir | --localstatedi | --localstated \
344   | --localstate | --localstat | --localsta | --localst \
345   | --locals | --local | --loca | --loc | --lo)
346     ac_prev=localstatedir ;;
347   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
348   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
349   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
350     localstatedir="$ac_optarg" ;;
351
352   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
353     ac_prev=mandir ;;
354   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
355     mandir="$ac_optarg" ;;
356
357   -nfp | --nfp | --nf)
358     # Obsolete; use --without-fp.
359     with_fp=no ;;
360
361   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
362   | --no-cr | --no-c)
363     no_create=yes ;;
364
365   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
366   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
367     no_recursion=yes ;;
368
369   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
370   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
371   | --oldin | --oldi | --old | --ol | --o)
372     ac_prev=oldincludedir ;;
373   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
374   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
375   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
376     oldincludedir="$ac_optarg" ;;
377
378   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
379     ac_prev=prefix ;;
380   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
381     prefix="$ac_optarg" ;;
382
383   -program-prefix | --program-prefix | --program-prefi | --program-pref \
384   | --program-pre | --program-pr | --program-p)
385     ac_prev=program_prefix ;;
386   -program-prefix=* | --program-prefix=* | --program-prefi=* \
387   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
388     program_prefix="$ac_optarg" ;;
389
390   -program-suffix | --program-suffix | --program-suffi | --program-suff \
391   | --program-suf | --program-su | --program-s)
392     ac_prev=program_suffix ;;
393   -program-suffix=* | --program-suffix=* | --program-suffi=* \
394   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
395     program_suffix="$ac_optarg" ;;
396
397   -program-transform-name | --program-transform-name \
398   | --program-transform-nam | --program-transform-na \
399   | --program-transform-n | --program-transform- \
400   | --program-transform | --program-transfor \
401   | --program-transfo | --program-transf \
402   | --program-trans | --program-tran \
403   | --progr-tra | --program-tr | --program-t)
404     ac_prev=program_transform_name ;;
405   -program-transform-name=* | --program-transform-name=* \
406   | --program-transform-nam=* | --program-transform-na=* \
407   | --program-transform-n=* | --program-transform-=* \
408   | --program-transform=* | --program-transfor=* \
409   | --program-transfo=* | --program-transf=* \
410   | --program-trans=* | --program-tran=* \
411   | --progr-tra=* | --program-tr=* | --program-t=*)
412     program_transform_name="$ac_optarg" ;;
413
414   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
415   | -silent | --silent | --silen | --sile | --sil)
416     silent=yes ;;
417
418   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
419     ac_prev=sbindir ;;
420   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
421   | --sbi=* | --sb=*)
422     sbindir="$ac_optarg" ;;
423
424   -sharedstatedir | --sharedstatedir | --sharedstatedi \
425   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
426   | --sharedst | --shareds | --shared | --share | --shar \
427   | --sha | --sh)
428     ac_prev=sharedstatedir ;;
429   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
430   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
431   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
432   | --sha=* | --sh=*)
433     sharedstatedir="$ac_optarg" ;;
434
435   -site | --site | --sit)
436     ac_prev=site ;;
437   -site=* | --site=* | --sit=*)
438     site="$ac_optarg" ;;
439
440   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
441     ac_prev=srcdir ;;
442   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
443     srcdir="$ac_optarg" ;;
444
445   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
446   | --syscon | --sysco | --sysc | --sys | --sy)
447     ac_prev=sysconfdir ;;
448   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
449   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
450     sysconfdir="$ac_optarg" ;;
451
452   -target | --target | --targe | --targ | --tar | --ta | --t)
453     ac_prev=target ;;
454   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
455     target="$ac_optarg" ;;
456
457   -v | -verbose | --verbose | --verbos | --verbo | --verb)
458     verbose=yes ;;
459
460   -version | --version | --versio | --versi | --vers)
461     echo "configure generated by autoconf version 2.13.1"
462     exit 0 ;;
463
464   -with-* | --with-*)
465     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
466     # Reject names that are not valid shell variable names.
467     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
468       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
469     fi
470     ac_package=`echo $ac_package| sed 's/-/_/g'`
471     case "$ac_option" in
472       *=*) ;;
473       *) ac_optarg=yes ;;
474     esac
475     eval "with_${ac_package}='$ac_optarg'" ;;
476
477   -without-* | --without-*)
478     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
479     # Reject names that are not valid shell variable names.
480     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
481       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
482     fi
483     ac_package=`echo $ac_package| sed 's/-/_/g'`
484     eval "with_${ac_package}=no" ;;
485
486   --x)
487     # Obsolete; use --with-x.
488     with_x=yes ;;
489
490   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
491   | --x-incl | --x-inc | --x-in | --x-i)
492     ac_prev=x_includes ;;
493   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
494   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
495     x_includes="$ac_optarg" ;;
496
497   -x-libraries | --x-libraries | --x-librarie | --x-librari \
498   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
499     ac_prev=x_libraries ;;
500   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
501   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
502     x_libraries="$ac_optarg" ;;
503
504   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
505     ;;
506
507   *)
508     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
509       echo "configure: warning: $ac_option: invalid host type" 1>&2
510     fi
511     if test "x$nonopt" != xNONE; then
512       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
513     fi
514     nonopt="$ac_option"
515     ;;
516
517   esac
518 done
519
520 if test -n "$ac_prev"; then
521   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
522 fi
523
524 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
525
526 # File descriptor usage:
527 # 0 standard input
528 # 1 file creation
529 # 2 errors and warnings
530 # 3 some systems may open it to /dev/tty
531 # 4 used on the Kubota Titan
532 # 6 checking for... messages and results
533 # 5 compiler messages saved in config.log
534 if test "$silent" = yes; then
535   exec 6>/dev/null
536 else
537   exec 6>&1
538 fi
539 exec 5>./config.log
540
541 echo "\
542 This file contains any messages produced by compilers while
543 running configure, to aid debugging if configure makes a mistake.
544 " 1>&5
545
546 # Strip out --no-create and --no-recursion so they do not pile up.
547 # Also quote any args containing shell metacharacters.
548 ac_configure_args=
549 for ac_arg
550 do
551   case "$ac_arg" in
552   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
553   | --no-cr | --no-c) ;;
554   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
555   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
556   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
557   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
558   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
559   esac
560 done
561
562 # NLS nuisances.
563 # Only set these to C if already set.  These must not be set unconditionally
564 # because not all systems understand e.g. LANG=C (notably SCO).
565 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
566 # Non-C LC_CTYPE values break the ctype check.
567 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
568 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
569 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
570 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
571
572 # confdefs.h avoids OS command line length limits that DEFS can exceed.
573 rm -rf conftest* confdefs.h
574 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
575 echo > confdefs.h
576
577 # A filename unique to this package, relative to the directory that
578 # configure is in, which we can look for to find out if srcdir is correct.
579 ac_unique_file=build/version
580
581 # Find the source files, if location was not specified.
582 if test -z "$srcdir"; then
583   ac_srcdir_defaulted=yes
584   # Try the directory containing this script, then its parent.
585   ac_prog=$0
586   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
587   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
588   srcdir=$ac_confdir
589   if test ! -r $srcdir/$ac_unique_file; then
590     srcdir=..
591   fi
592 else
593   ac_srcdir_defaulted=no
594 fi
595 if test ! -r $srcdir/$ac_unique_file; then
596   if test "$ac_srcdir_defaulted" = yes; then
597     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
598   else
599     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
600   fi
601 fi
602 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
603
604 # Prefer explicitly selected file to automatically selected ones.
605 if test -z "$CONFIG_SITE"; then
606   if test "x$prefix" != xNONE; then
607     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
608   else
609     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
610   fi
611 fi
612 for ac_site_file in $CONFIG_SITE; do
613   if test -r "$ac_site_file"; then
614     echo "loading site script $ac_site_file"
615     . "$ac_site_file"
616   fi
617 done
618
619
620 ac_ext=c
621 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
622 ac_cpp='$CPP $CPPFLAGS'
623 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
624 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
625 cross_compiling=$ac_cv_prog_cc_cross
626
627 ac_exeext=
628 ac_objext=o
629 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
630   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
631   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
632     ac_n= ac_c='
633 ' ac_t='        '
634   else
635     ac_n=-n ac_c= ac_t=
636   fi
637 else
638   ac_n= ac_c='\c' ac_t=
639 fi
640
641
642 # set unset (borrowed from autoconf 2.14a)
643 if (unset FOO) >/dev/null 2>&1; then
644   ol_unset=unset
645 else
646   ol_unset=false
647 fi
648 # unset CDPATH
649 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
650
651 ac_aux_dir=
652 for ac_dir in build $srcdir/build; do
653   if test -f $ac_dir/install-sh; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/install-sh -c"
656     break
657   elif test -f $ac_dir/install.sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install.sh -c"
660     break
661   elif test -f $ac_dir/shtool; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/shtool install -c"
664     break
665   fi
666 done
667 if test -z "$ac_aux_dir"; then
668   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
669 fi
670 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
671 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
672 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
673
674 OL_VERSION=`cat $ac_aux_dir/version`
675 if test -z "$OL_VERSION"; then
676         { echo "configure: error: could not determine version" 1>&2; exit 1; }
677 fi
678
679 echo "Configuring OpenLDAP $OL_VERSION ..."
680
681
682 echo $ac_n "checking host system type""... $ac_c" 1>&6
683 echo "configure:684: checking host system type" >&5
684 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
685
686 # Make sure we can run config.sub.
687   if $ac_config_sub sun4 >/dev/null 2>&1; then :
688     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
689   fi
690
691   ac_cv_host_alias=$host
692   case "$ac_cv_host_alias" in
693   NONE)
694     case $nonopt in
695     NONE)
696       if ac_cv_host_alias=`$ac_config_guess`; then :
697       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
698       fi ;;
699     *) ac_cv_host_alias=$nonopt ;;
700     esac ;;
701   esac
702
703   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
704   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
705   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
706   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
707 else
708   echo $ac_n "(cached) $ac_c" 1>&6
709 fi
710
711 echo "$ac_t""$ac_cv_host" 1>&6
712
713 host=$ac_cv_host
714 host_alias=$ac_cv_host_alias
715 host_cpu=$ac_cv_host_cpu
716 host_vendor=$ac_cv_host_vendor
717 host_os=$ac_cv_host_os
718
719
720
721
722
723 echo $ac_n "checking target system type""... $ac_c" 1>&6
724 echo "configure:725: checking target system type" >&5
725 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
726
727 # Make sure we can run config.sub.
728   if $ac_config_sub sun4 >/dev/null 2>&1; then :
729     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
730   fi
731
732   ac_cv_target_alias=$target
733   case "$ac_cv_target_alias" in
734   NONE)
735     case $nonopt in
736     NONE)
737       ac_cv_target_alias=$host_alias ;;
738
739     *) ac_cv_target_alias=$nonopt ;;
740     esac ;;
741   esac
742
743   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
744   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
745   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
746   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
747 else
748   echo $ac_n "(cached) $ac_c" 1>&6
749 fi
750
751 echo "$ac_t""$ac_cv_target" 1>&6
752
753 target=$ac_cv_target
754 target_alias=$ac_cv_target_alias
755 target_cpu=$ac_cv_target_cpu
756 target_vendor=$ac_cv_target_vendor
757 target_os=$ac_cv_target_os
758
759
760
761
762
763 echo $ac_n "checking build system type""... $ac_c" 1>&6
764 echo "configure:765: checking build system type" >&5
765 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
766
767 # Make sure we can run config.sub.
768   if $ac_config_sub sun4 >/dev/null 2>&1; then :
769     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
770   fi
771
772   ac_cv_build_alias=$build
773   case "$ac_cv_build_alias" in
774   NONE)
775     case $nonopt in
776     NONE)
777       ac_cv_build_alias=$host_alias ;;
778
779     *) ac_cv_build_alias=$nonopt ;;
780     esac ;;
781   esac
782
783   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
784   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
785   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
786   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
787 else
788   echo $ac_n "(cached) $ac_c" 1>&6
789 fi
790
791 echo "$ac_t""$ac_cv_build" 1>&6
792
793 build=$ac_cv_build
794 build_alias=$ac_cv_build_alias
795 build_cpu=$ac_cv_build_cpu
796 build_vendor=$ac_cv_build_vendor
797 build_os=$ac_cv_build_os
798
799
800
801
802
803 # Do some error checking and defaulting for the host and target type.
804 # The inputs are:
805 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
806 #
807 # The rules are:
808 # 1. You are not allowed to specify --host, --target, and nonopt at the
809 #    same time.
810 # 2. Host defaults to nonopt.
811 # 3. If nonopt is not specified, then host defaults to the current host,
812 #    as determined by config.guess.
813 # 4. Target and build default to nonopt.
814 # 5. If nonopt is not specified, then target and build default to host.
815
816 # The aliases save the names the user supplied, while $host etc.
817 # will get canonicalized.
818 case $host---$target---$nonopt in
819 NONE---*---* | *---NONE---* | *---*---NONE) ;;
820 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
821 esac
822
823 test "$host_alias" != "$target_alias" &&
824   test "$program_prefix$program_suffix$program_transform_name" = \
825     NONENONEs,x,x, &&
826   program_prefix=${target_alias}-
827
828
829 # Find a good install program.  We prefer a C program (faster),
830 # so one script is as good as another.  But avoid the broken or
831 # incompatible versions:
832 # SysV /etc/install, /usr/sbin/install
833 # SunOS /usr/etc/install
834 # IRIX /sbin/install
835 # AIX /bin/install
836 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
837 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
838 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
839 # ./install, which can be erroneously created by make from ./install.sh.
840 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
841 echo "configure:842: checking for a BSD compatible install" >&5
842 if test -z "$INSTALL"; then
843 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
844   echo $ac_n "(cached) $ac_c" 1>&6
845 else
846     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
847   for ac_dir in $PATH; do
848     # Account for people who put trailing slashes in PATH elements.
849     case "$ac_dir/" in
850     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
851     *)
852       # OSF1 and SCO ODT 3.0 have their own names for install.
853       # Don't use installbsd from OSF since it installs stuff as root
854       # by default.
855       for ac_prog in ginstall scoinst install; do
856         if test -f $ac_dir/$ac_prog; then
857           if test $ac_prog = install &&
858             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
859             # AIX install.  It has an incompatible calling convention.
860             :
861           elif test $ac_prog = install &&
862             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # program-specific install script used by HP pwplus--don't use.
864             :
865           else
866             ac_cv_path_install="$ac_dir/$ac_prog -c"
867             break 2
868           fi
869         fi
870       done
871       ;;
872     esac
873   done
874   IFS="$ac_save_IFS"
875
876 fi
877   if test "${ac_cv_path_install+set}" = set; then
878     INSTALL="$ac_cv_path_install"
879   else
880     # As a last resort, use the slow shell script.  We don't cache a
881     # path for INSTALL within a source directory, because that will
882     # break other packages using the cache if that directory is
883     # removed, or if the path is relative.
884     INSTALL="$ac_install_sh"
885   fi
886 fi
887 echo "$ac_t""$INSTALL" 1>&6
888
889 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
890 # It thinks the first close brace ends the variable substitution.
891 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
892
893 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
894
895 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
896
897 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
898 echo "configure:899: checking whether build environment is sane" >&5
899 # Just in case
900 sleep 1
901 echo timestamp > conftestfile
902 # Do `set' in a subshell so we don't clobber the current shell's
903 # arguments.  Must try -L first in case configure is actually a
904 # symlink; some systems play weird games with the mod time of symlinks
905 # (eg FreeBSD returns the mod time of the symlink's containing
906 # directory).
907 if (
908    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
909    if test "$*" = "X"; then
910       # -L didn't work.
911       set X `ls -t $srcdir/configure conftestfile`
912    fi
913    if test "$*" != "X $srcdir/configure conftestfile" \
914       && test "$*" != "X conftestfile $srcdir/configure"; then
915
916       # If neither matched, then we have a broken ls.  This can happen
917       # if, for instance, CONFIG_SHELL is bash and it inherits a
918       # broken ls alias from the environment.  This has actually
919       # happened.  Such a system could not be considered "sane".
920       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
921 alias in your environment" 1>&2; exit 1; }
922    fi
923
924    test "$2" = conftestfile
925    )
926 then
927    # Ok.
928    :
929 else
930    { echo "configure: error: newly created file is older than distributed files!
931 Check your system clock" 1>&2; exit 1; }
932 fi
933 rm -f conftest*
934 echo "$ac_t""yes" 1>&6
935 if test "$program_transform_name" = s,x,x,; then
936   program_transform_name=
937 else
938   # Double any \ or $.  echo might interpret backslashes.
939   cat <<\EOF_SED > conftestsed
940 s,\\,\\\\,g; s,\$,$$,g
941 EOF_SED
942   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
943   rm -f conftestsed
944 fi
945 test "$program_prefix" != NONE &&
946   program_transform_name="s,^,${program_prefix},;$program_transform_name"
947 # Use a double $ so make ignores it.
948 test "$program_suffix" != NONE &&
949   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
950
951 # sed with no file args requires a program.
952 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
953
954 for ac_prog in mawk gawk nawk awk
955 do
956 # Extract the first word of "$ac_prog", so it can be a program name with args.
957 set dummy $ac_prog; ac_word=$2
958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
959 echo "configure:960: checking for $ac_word" >&5
960 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
961   echo $ac_n "(cached) $ac_c" 1>&6
962 else
963   if test -n "$AWK"; then
964   ac_cv_prog_AWK="$AWK" # Let the user override the test.
965 else
966   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
967   ac_dummy="$PATH"
968   for ac_dir in $ac_dummy; do
969     test -z "$ac_dir" && ac_dir=.
970     if test -f $ac_dir/$ac_word; then
971       ac_cv_prog_AWK="$ac_prog"
972       break
973     fi
974   done
975   IFS="$ac_save_ifs"
976 fi
977 fi
978 AWK="$ac_cv_prog_AWK"
979 if test -n "$AWK"; then
980   echo "$ac_t""$AWK" 1>&6
981 else
982   echo "$ac_t""no" 1>&6
983 fi
984
985 test -n "$AWK" && break
986 done
987
988 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
989 echo "configure:990: checking whether ${MAKE-make} sets \${MAKE}" >&5
990 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
991 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
992   echo $ac_n "(cached) $ac_c" 1>&6
993 else
994   cat > conftestmake <<\EOF
995 all:
996         @echo 'ac_maketemp="${MAKE}"'
997 EOF
998 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
999 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1000 if test -n "$ac_maketemp"; then
1001   eval ac_cv_prog_make_${ac_make}_set=yes
1002 else
1003   eval ac_cv_prog_make_${ac_make}_set=no
1004 fi
1005 rm -f conftestmake
1006 fi
1007 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1008   echo "$ac_t""yes" 1>&6
1009   SET_MAKE=
1010 else
1011   echo "$ac_t""no" 1>&6
1012   SET_MAKE="MAKE=${MAKE-make}"
1013 fi
1014
1015
1016
1017 PACKAGE=OpenLDAP
1018
1019 VERSION=$OL_VERSION
1020
1021 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1022   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1023 fi
1024
1025
1026
1027 missing_dir=`cd $ac_aux_dir && pwd`
1028 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1029 echo "configure:1030: checking for working aclocal" >&5
1030 # Run test in a subshell; some versions of sh will print an error if
1031 # an executable is not found, even if stderr is redirected.
1032 # Redirect stdin to placate older versions of autoconf.  Sigh.
1033 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1034    ACLOCAL=aclocal
1035    echo "$ac_t""found" 1>&6
1036 else
1037    ACLOCAL="$missing_dir/missing aclocal"
1038    echo "$ac_t""missing" 1>&6
1039 fi
1040
1041 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1042 echo "configure:1043: checking for working autoconf" >&5
1043 # Run test in a subshell; some versions of sh will print an error if
1044 # an executable is not found, even if stderr is redirected.
1045 # Redirect stdin to placate older versions of autoconf.  Sigh.
1046 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1047    AUTOCONF=autoconf
1048    echo "$ac_t""found" 1>&6
1049 else
1050    AUTOCONF="$missing_dir/missing autoconf"
1051    echo "$ac_t""missing" 1>&6
1052 fi
1053
1054 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1055 echo "configure:1056: checking for working automake" >&5
1056 # Run test in a subshell; some versions of sh will print an error if
1057 # an executable is not found, even if stderr is redirected.
1058 # Redirect stdin to placate older versions of autoconf.  Sigh.
1059 if (automake --version) < /dev/null > /dev/null 2>&1; then
1060    AUTOMAKE=automake
1061    echo "$ac_t""found" 1>&6
1062 else
1063    AUTOMAKE="$missing_dir/missing automake"
1064    echo "$ac_t""missing" 1>&6
1065 fi
1066
1067 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1068 echo "configure:1069: checking for working autoheader" >&5
1069 # Run test in a subshell; some versions of sh will print an error if
1070 # an executable is not found, even if stderr is redirected.
1071 # Redirect stdin to placate older versions of autoconf.  Sigh.
1072 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1073    AUTOHEADER=autoheader
1074    echo "$ac_t""found" 1>&6
1075 else
1076    AUTOHEADER="$missing_dir/missing autoheader"
1077    echo "$ac_t""missing" 1>&6
1078 fi
1079
1080 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1081 echo "configure:1082: checking for working makeinfo" >&5
1082 # Run test in a subshell; some versions of sh will print an error if
1083 # an executable is not found, even if stderr is redirected.
1084 # Redirect stdin to placate older versions of autoconf.  Sigh.
1085 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1086    MAKEINFO=makeinfo
1087    echo "$ac_t""found" 1>&6
1088 else
1089    MAKEINFO="$missing_dir/missing makeinfo"
1090    echo "$ac_t""missing" 1>&6
1091 fi
1092
1093 install_sh="$missing_dir/install-sh"
1094 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1095
1096 for ac_prog in gnutar gtar tar
1097 do
1098 # Extract the first word of "$ac_prog", so it can be a program name with args.
1099 set dummy $ac_prog; ac_word=$2
1100 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1101 echo "configure:1102: checking for $ac_word" >&5
1102 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105   if test -n "$AMTAR"; then
1106   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1107 else
1108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1109   ac_dummy="$PATH"
1110   for ac_dir in $ac_dummy; do
1111     test -z "$ac_dir" && ac_dir=.
1112     if test -f $ac_dir/$ac_word; then
1113       ac_cv_prog_AMTAR="$ac_prog"
1114       break
1115     fi
1116   done
1117   IFS="$ac_save_ifs"
1118 fi
1119 fi
1120 AMTAR="$ac_cv_prog_AMTAR"
1121 if test -n "$AMTAR"; then
1122   echo "$ac_t""$AMTAR" 1>&6
1123 else
1124   echo "$ac_t""no" 1>&6
1125 fi
1126
1127 test -n "$AMTAR" && break
1128 done
1129
1130
1131 AMTARFLAGS=
1132 if test -n "$AMTAR"; then
1133   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1134         AMTARFLAGS=o
1135   fi
1136 fi
1137
1138
1139
1140 cat >> confdefs.h <<EOF
1141 #define OPENLDAP_PACKAGE "$PACKAGE"
1142 EOF
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_VERSION "$VERSION"
1146 EOF
1147
1148
1149
1150
1151 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1152 echo "configure:1153: checking configure arguments" >&5
1153
1154
1155 top_builddir=`pwd`
1156
1157 ldap_subdir="/openldap"
1158
1159 # Check whether --with-subdir or --without-subdir was given.
1160 if test "${with_subdir+set}" = set; then
1161   withval="$with_subdir"
1162   case "$withval" in
1163         no) ldap_subdir=""
1164                 ;;
1165         yes)
1166                 ;;
1167         /*|\\*)
1168                 ldap_subdir="$withval"
1169                 ;;
1170         *)
1171                 ldap_subdir="/$withval"
1172                 ;;
1173 esac
1174
1175 fi
1176
1177
1178 # OpenLDAP --enable-debug
1179         # Check whether --enable-debug or --disable-debug was given.
1180 if test "${enable_debug+set}" = set; then
1181   enableval="$enable_debug"
1182   
1183         ol_arg=invalid
1184         for ol_val in auto yes no ; do
1185                 if test "$enableval" = "$ol_val" ; then
1186                         ol_arg="$ol_val"
1187                 fi
1188         done
1189         if test "$ol_arg" = "invalid" ; then
1190                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1191         fi
1192         ol_enable_debug="$ol_arg"
1193
1194 else
1195         ol_enable_debug="yes"
1196 fi
1197 # end --enable-debug
1198 # OpenLDAP --enable-syslog
1199         # Check whether --enable-syslog or --disable-syslog was given.
1200 if test "${enable_syslog+set}" = set; then
1201   enableval="$enable_syslog"
1202   
1203         ol_arg=invalid
1204         for ol_val in auto yes no ; do
1205                 if test "$enableval" = "$ol_val" ; then
1206                         ol_arg="$ol_val"
1207                 fi
1208         done
1209         if test "$ol_arg" = "invalid" ; then
1210                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1211         fi
1212         ol_enable_syslog="$ol_arg"
1213
1214 else
1215         ol_enable_syslog="auto"
1216 fi
1217 # end --enable-syslog
1218 # OpenLDAP --enable-proctitle
1219         # Check whether --enable-proctitle or --disable-proctitle was given.
1220 if test "${enable_proctitle+set}" = set; then
1221   enableval="$enable_proctitle"
1222   
1223         ol_arg=invalid
1224         for ol_val in auto yes no ; do
1225                 if test "$enableval" = "$ol_val" ; then
1226                         ol_arg="$ol_val"
1227                 fi
1228         done
1229         if test "$ol_arg" = "invalid" ; then
1230                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1231         fi
1232         ol_enable_proctitle="$ol_arg"
1233
1234 else
1235         ol_enable_proctitle="yes"
1236 fi
1237 # end --enable-proctitle
1238 # OpenLDAP --enable-cache
1239         # Check whether --enable-cache or --disable-cache was given.
1240 if test "${enable_cache+set}" = set; then
1241   enableval="$enable_cache"
1242   
1243         ol_arg=invalid
1244         for ol_val in auto yes no ; do
1245                 if test "$enableval" = "$ol_val" ; then
1246                         ol_arg="$ol_val"
1247                 fi
1248         done
1249         if test "$ol_arg" = "invalid" ; then
1250                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1251         fi
1252         ol_enable_cache="$ol_arg"
1253
1254 else
1255         ol_enable_cache="yes"
1256 fi
1257 # end --enable-cache
1258 # OpenLDAP --enable-referrals
1259         # Check whether --enable-referrals or --disable-referrals was given.
1260 if test "${enable_referrals+set}" = set; then
1261   enableval="$enable_referrals"
1262   
1263         ol_arg=invalid
1264         for ol_val in auto yes no ; do
1265                 if test "$enableval" = "$ol_val" ; then
1266                         ol_arg="$ol_val"
1267                 fi
1268         done
1269         if test "$ol_arg" = "invalid" ; then
1270                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1271         fi
1272         ol_enable_referrals="$ol_arg"
1273
1274 else
1275         ol_enable_referrals="yes"
1276 fi
1277 # end --enable-referrals
1278 # OpenLDAP --enable-kbind
1279         # Check whether --enable-kbind or --disable-kbind was given.
1280 if test "${enable_kbind+set}" = set; then
1281   enableval="$enable_kbind"
1282   
1283         ol_arg=invalid
1284         for ol_val in auto yes no ; do
1285                 if test "$enableval" = "$ol_val" ; then
1286                         ol_arg="$ol_val"
1287                 fi
1288         done
1289         if test "$ol_arg" = "invalid" ; then
1290                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1291         fi
1292         ol_enable_kbind="$ol_arg"
1293
1294 else
1295         ol_enable_kbind="auto"
1296 fi
1297 # end --enable-kbind
1298 # OpenLDAP --enable-ipv6
1299         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1300 if test "${enable_ipv6+set}" = set; then
1301   enableval="$enable_ipv6"
1302   
1303         ol_arg=invalid
1304         for ol_val in auto yes no ; do
1305                 if test "$enableval" = "$ol_val" ; then
1306                         ol_arg="$ol_val"
1307                 fi
1308         done
1309         if test "$ol_arg" = "invalid" ; then
1310                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1311         fi
1312         ol_enable_ipv6="$ol_arg"
1313
1314 else
1315         ol_enable_ipv6="auto"
1316 fi
1317 # end --enable-ipv6
1318 # OpenLDAP --enable-local
1319         # Check whether --enable-local or --disable-local was given.
1320 if test "${enable_local+set}" = set; then
1321   enableval="$enable_local"
1322   
1323         ol_arg=invalid
1324         for ol_val in auto yes no ; do
1325                 if test "$enableval" = "$ol_val" ; then
1326                         ol_arg="$ol_val"
1327                 fi
1328         done
1329         if test "$ol_arg" = "invalid" ; then
1330                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1331         fi
1332         ol_enable_local="$ol_arg"
1333
1334 else
1335         ol_enable_local="auto"
1336 fi
1337 # end --enable-local
1338 # OpenLDAP --enable-x_compile
1339         # Check whether --enable-x_compile or --disable-x_compile was given.
1340 if test "${enable_x_compile+set}" = set; then
1341   enableval="$enable_x_compile"
1342   
1343         ol_arg=invalid
1344         for ol_val in yes no ; do
1345                 if test "$enableval" = "$ol_val" ; then
1346                         ol_arg="$ol_val"
1347                 fi
1348         done
1349         if test "$ol_arg" = "invalid" ; then
1350                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1351         fi
1352         ol_enable_x_compile="$ol_arg"
1353
1354 else
1355         ol_enable_x_compile="no"
1356 fi
1357 # end --enable-x_compile
1358
1359
1360 # OpenLDAP --with-cyrus_sasl
1361         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1362 if test "${with_cyrus_sasl+set}" = set; then
1363   withval="$with_cyrus_sasl"
1364   
1365         ol_arg=invalid
1366         for ol_val in auto yes no  ; do
1367                 if test "$withval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1373         fi
1374         ol_with_cyrus_sasl="$ol_arg"
1375
1376 else
1377         ol_with_cyrus_sasl="auto"
1378 fi
1379 # end --with-cyrus_sasl
1380
1381 # OpenLDAP --with-fetch
1382         # Check whether --with-fetch or --without-fetch was given.
1383 if test "${with_fetch+set}" = set; then
1384   withval="$with_fetch"
1385   
1386         ol_arg=invalid
1387         for ol_val in auto yes no  ; do
1388                 if test "$withval" = "$ol_val" ; then
1389                         ol_arg="$ol_val"
1390                 fi
1391         done
1392         if test "$ol_arg" = "invalid" ; then
1393                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1394         fi
1395         ol_with_fetch="$ol_arg"
1396
1397 else
1398         ol_with_fetch="auto"
1399 fi
1400 # end --with-fetch
1401
1402 # OpenLDAP --with-kerberos
1403         # Check whether --with-kerberos or --without-kerberos was given.
1404 if test "${with_kerberos+set}" = set; then
1405   withval="$with_kerberos"
1406   
1407         ol_arg=invalid
1408         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1409                 if test "$withval" = "$ol_val" ; then
1410                         ol_arg="$ol_val"
1411                 fi
1412         done
1413         if test "$ol_arg" = "invalid" ; then
1414                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1415         fi
1416         ol_with_kerberos="$ol_arg"
1417
1418 else
1419         ol_with_kerberos="auto"
1420 fi
1421 # end --with-kerberos
1422
1423 # OpenLDAP --with-readline
1424         # Check whether --with-readline or --without-readline was given.
1425 if test "${with_readline+set}" = set; then
1426   withval="$with_readline"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto yes no  ; do
1430                 if test "$withval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1436         fi
1437         ol_with_readline="$ol_arg"
1438
1439 else
1440         ol_with_readline="auto"
1441 fi
1442 # end --with-readline
1443
1444 # OpenLDAP --with-threads
1445         # Check whether --with-threads or --without-threads was given.
1446 if test "${with_threads+set}" = set; then
1447   withval="$with_threads"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1451                 if test "$withval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1457         fi
1458         ol_with_threads="$ol_arg"
1459
1460 else
1461         ol_with_threads="auto"
1462 fi
1463 # end --with-threads
1464
1465 # OpenLDAP --with-tls
1466         # Check whether --with-tls or --without-tls was given.
1467 if test "${with_tls+set}" = set; then
1468   withval="$with_tls"
1469   
1470         ol_arg=invalid
1471         for ol_val in auto ssleay openssl yes no  ; do
1472                 if test "$withval" = "$ol_val" ; then
1473                         ol_arg="$ol_val"
1474                 fi
1475         done
1476         if test "$ol_arg" = "invalid" ; then
1477                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1478         fi
1479         ol_with_tls="$ol_arg"
1480
1481 else
1482         ol_with_tls="auto"
1483 fi
1484 # end --with-tls
1485
1486 # OpenLDAP --with-yielding_select
1487         # Check whether --with-yielding_select or --without-yielding_select was given.
1488 if test "${with_yielding_select+set}" = set; then
1489   withval="$with_yielding_select"
1490   
1491         ol_arg=invalid
1492         for ol_val in auto yes no manual  ; do
1493                 if test "$withval" = "$ol_val" ; then
1494                         ol_arg="$ol_val"
1495                 fi
1496         done
1497         if test "$ol_arg" = "invalid" ; then
1498                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1499         fi
1500         ol_with_yielding_select="$ol_arg"
1501
1502 else
1503         ol_with_yielding_select="auto"
1504 fi
1505 # end --with-yielding_select
1506
1507
1508
1509 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1510 if test "${with_xxslapdoptions+set}" = set; then
1511   withval="$with_xxslapdoptions"
1512   :
1513 fi
1514
1515 # OpenLDAP --enable-slapd
1516         # Check whether --enable-slapd or --disable-slapd was given.
1517 if test "${enable_slapd+set}" = set; then
1518   enableval="$enable_slapd"
1519   
1520         ol_arg=invalid
1521         for ol_val in auto yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1528         fi
1529         ol_enable_slapd="$ol_arg"
1530
1531 else
1532         ol_enable_slapd="yes"
1533 fi
1534 # end --enable-slapd
1535 # OpenLDAP --enable-cleartext
1536         # Check whether --enable-cleartext or --disable-cleartext was given.
1537 if test "${enable_cleartext+set}" = set; then
1538   enableval="$enable_cleartext"
1539   
1540         ol_arg=invalid
1541         for ol_val in auto yes no ; do
1542                 if test "$enableval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1548         fi
1549         ol_enable_cleartext="$ol_arg"
1550
1551 else
1552         ol_enable_cleartext="yes"
1553 fi
1554 # end --enable-cleartext
1555 # OpenLDAP --enable-crypt
1556         # Check whether --enable-crypt or --disable-crypt was given.
1557 if test "${enable_crypt+set}" = set; then
1558   enableval="$enable_crypt"
1559   
1560         ol_arg=invalid
1561         for ol_val in auto yes no ; do
1562                 if test "$enableval" = "$ol_val" ; then
1563                         ol_arg="$ol_val"
1564                 fi
1565         done
1566         if test "$ol_arg" = "invalid" ; then
1567                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1568         fi
1569         ol_enable_crypt="$ol_arg"
1570
1571 else
1572         ol_enable_crypt="auto"
1573 fi
1574 # end --enable-crypt
1575 # OpenLDAP --enable-kpasswd
1576         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1577 if test "${enable_kpasswd+set}" = set; then
1578   enableval="$enable_kpasswd"
1579   
1580         ol_arg=invalid
1581         for ol_val in auto yes no ; do
1582                 if test "$enableval" = "$ol_val" ; then
1583                         ol_arg="$ol_val"
1584                 fi
1585         done
1586         if test "$ol_arg" = "invalid" ; then
1587                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1588         fi
1589         ol_enable_kpasswd="$ol_arg"
1590
1591 else
1592         ol_enable_kpasswd="no"
1593 fi
1594 # end --enable-kpasswd
1595 # OpenLDAP --enable-spasswd
1596         # Check whether --enable-spasswd or --disable-spasswd was given.
1597 if test "${enable_spasswd+set}" = set; then
1598   enableval="$enable_spasswd"
1599   
1600         ol_arg=invalid
1601         for ol_val in auto yes no ; do
1602                 if test "$enableval" = "$ol_val" ; then
1603                         ol_arg="$ol_val"
1604                 fi
1605         done
1606         if test "$ol_arg" = "invalid" ; then
1607                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1608         fi
1609         ol_enable_spasswd="$ol_arg"
1610
1611 else
1612         ol_enable_spasswd="no"
1613 fi
1614 # end --enable-spasswd
1615 # OpenLDAP --enable-modules
1616         # Check whether --enable-modules or --disable-modules was given.
1617 if test "${enable_modules+set}" = set; then
1618   enableval="$enable_modules"
1619   
1620         ol_arg=invalid
1621         for ol_val in auto yes no ; do
1622                 if test "$enableval" = "$ol_val" ; then
1623                         ol_arg="$ol_val"
1624                 fi
1625         done
1626         if test "$ol_arg" = "invalid" ; then
1627                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1628         fi
1629         ol_enable_modules="$ol_arg"
1630
1631 else
1632         ol_enable_modules="no"
1633 fi
1634 # end --enable-modules
1635 # OpenLDAP --enable-multimaster
1636         # Check whether --enable-multimaster or --disable-multimaster was given.
1637 if test "${enable_multimaster+set}" = set; then
1638   enableval="$enable_multimaster"
1639   
1640         ol_arg=invalid
1641         for ol_val in auto yes no ; do
1642                 if test "$enableval" = "$ol_val" ; then
1643                         ol_arg="$ol_val"
1644                 fi
1645         done
1646         if test "$ol_arg" = "invalid" ; then
1647                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1648         fi
1649         ol_enable_multimaster="$ol_arg"
1650
1651 else
1652         ol_enable_multimaster="no"
1653 fi
1654 # end --enable-multimaster
1655 # OpenLDAP --enable-phonetic
1656         # Check whether --enable-phonetic or --disable-phonetic was given.
1657 if test "${enable_phonetic+set}" = set; then
1658   enableval="$enable_phonetic"
1659   
1660         ol_arg=invalid
1661         for ol_val in auto yes no ; do
1662                 if test "$enableval" = "$ol_val" ; then
1663                         ol_arg="$ol_val"
1664                 fi
1665         done
1666         if test "$ol_arg" = "invalid" ; then
1667                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1668         fi
1669         ol_enable_phonetic="$ol_arg"
1670
1671 else
1672         ol_enable_phonetic="no"
1673 fi
1674 # end --enable-phonetic
1675 # OpenLDAP --enable-rlookups
1676         # Check whether --enable-rlookups or --disable-rlookups was given.
1677 if test "${enable_rlookups+set}" = set; then
1678   enableval="$enable_rlookups"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no ; do
1682                 if test "$enableval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1688         fi
1689         ol_enable_rlookups="$ol_arg"
1690
1691 else
1692         ol_enable_rlookups="auto"
1693 fi
1694 # end --enable-rlookups
1695 # OpenLDAP --enable-aci
1696         # Check whether --enable-aci or --disable-aci was given.
1697 if test "${enable_aci+set}" = set; then
1698   enableval="$enable_aci"
1699   
1700         ol_arg=invalid
1701         for ol_val in auto yes no ; do
1702                 if test "$enableval" = "$ol_val" ; then
1703                         ol_arg="$ol_val"
1704                 fi
1705         done
1706         if test "$ol_arg" = "invalid" ; then
1707                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1708         fi
1709         ol_enable_aci="$ol_arg"
1710
1711 else
1712         ol_enable_aci="no"
1713 fi
1714 # end --enable-aci
1715 # OpenLDAP --enable-wrappers
1716         # Check whether --enable-wrappers or --disable-wrappers was given.
1717 if test "${enable_wrappers+set}" = set; then
1718   enableval="$enable_wrappers"
1719   
1720         ol_arg=invalid
1721         for ol_val in auto yes no ; do
1722                 if test "$enableval" = "$ol_val" ; then
1723                         ol_arg="$ol_val"
1724                 fi
1725         done
1726         if test "$ol_arg" = "invalid" ; then
1727                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1728         fi
1729         ol_enable_wrappers="$ol_arg"
1730
1731 else
1732         ol_enable_wrappers="no"
1733 fi
1734 # end --enable-wrappers
1735 # OpenLDAP --enable-dynamic
1736         # Check whether --enable-dynamic or --disable-dynamic was given.
1737 if test "${enable_dynamic+set}" = set; then
1738   enableval="$enable_dynamic"
1739   
1740         ol_arg=invalid
1741         for ol_val in auto yes no ; do
1742                 if test "$enableval" = "$ol_val" ; then
1743                         ol_arg="$ol_val"
1744                 fi
1745         done
1746         if test "$ol_arg" = "invalid" ; then
1747                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1748         fi
1749         ol_enable_dynamic="$ol_arg"
1750
1751 else
1752         ol_enable_dynamic="no"
1753 fi
1754 # end --enable-dynamic
1755
1756 # OpenLDAP --enable-dnssrv
1757         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1758 if test "${enable_dnssrv+set}" = set; then
1759   enableval="$enable_dnssrv"
1760   
1761         ol_arg=invalid
1762         for ol_val in auto yes no ; do
1763                 if test "$enableval" = "$ol_val" ; then
1764                         ol_arg="$ol_val"
1765                 fi
1766         done
1767         if test "$ol_arg" = "invalid" ; then
1768                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1769         fi
1770         ol_enable_dnssrv="$ol_arg"
1771
1772 else
1773         ol_enable_dnssrv="no"
1774 fi
1775 # end --enable-dnssrv
1776 # OpenLDAP --with-dnssrv_module
1777         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1778 if test "${with_dnssrv_module+set}" = set; then
1779   withval="$with_dnssrv_module"
1780   
1781         ol_arg=invalid
1782         for ol_val in static dynamic ; do
1783                 if test "$withval" = "$ol_val" ; then
1784                         ol_arg="$ol_val"
1785                 fi
1786         done
1787         if test "$ol_arg" = "invalid" ; then
1788                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1789         fi
1790         ol_with_dnssrv_module="$ol_arg"
1791
1792 else
1793         ol_with_dnssrv_module="static"
1794 fi
1795 # end --with-dnssrv_module
1796
1797 # OpenLDAP --enable-ldap
1798         # Check whether --enable-ldap or --disable-ldap was given.
1799 if test "${enable_ldap+set}" = set; then
1800   enableval="$enable_ldap"
1801   
1802         ol_arg=invalid
1803         for ol_val in auto yes no ; do
1804                 if test "$enableval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1810         fi
1811         ol_enable_ldap="$ol_arg"
1812
1813 else
1814         ol_enable_ldap="no"
1815 fi
1816 # end --enable-ldap
1817 # OpenLDAP --with-ldap_module
1818         # Check whether --with-ldap_module or --without-ldap_module was given.
1819 if test "${with_ldap_module+set}" = set; then
1820   withval="$with_ldap_module"
1821   
1822         ol_arg=invalid
1823         for ol_val in static dynamic ; do
1824                 if test "$withval" = "$ol_val" ; then
1825                         ol_arg="$ol_val"
1826                 fi
1827         done
1828         if test "$ol_arg" = "invalid" ; then
1829                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1830         fi
1831         ol_with_ldap_module="$ol_arg"
1832
1833 else
1834         ol_with_ldap_module="static"
1835 fi
1836 # end --with-ldap_module
1837
1838 # OpenLDAP --enable-ldbm
1839         # Check whether --enable-ldbm or --disable-ldbm was given.
1840 if test "${enable_ldbm+set}" = set; then
1841   enableval="$enable_ldbm"
1842   
1843         ol_arg=invalid
1844         for ol_val in auto yes no ; do
1845                 if test "$enableval" = "$ol_val" ; then
1846                         ol_arg="$ol_val"
1847                 fi
1848         done
1849         if test "$ol_arg" = "invalid" ; then
1850                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1851         fi
1852         ol_enable_ldbm="$ol_arg"
1853
1854 else
1855         ol_enable_ldbm="yes"
1856 fi
1857 # end --enable-ldbm
1858 # OpenLDAP --with-ldbm_api
1859         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1860 if test "${with_ldbm_api+set}" = set; then
1861   withval="$with_ldbm_api"
1862   
1863         ol_arg=invalid
1864         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1865                 if test "$withval" = "$ol_val" ; then
1866                         ol_arg="$ol_val"
1867                 fi
1868         done
1869         if test "$ol_arg" = "invalid" ; then
1870                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1871         fi
1872         ol_with_ldbm_api="$ol_arg"
1873
1874 else
1875         ol_with_ldbm_api="auto"
1876 fi
1877 # end --with-ldbm_api
1878
1879 # OpenLDAP --with-ldbm_module
1880         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1881 if test "${with_ldbm_module+set}" = set; then
1882   withval="$with_ldbm_module"
1883   
1884         ol_arg=invalid
1885         for ol_val in static dynamic ; do
1886                 if test "$withval" = "$ol_val" ; then
1887                         ol_arg="$ol_val"
1888                 fi
1889         done
1890         if test "$ol_arg" = "invalid" ; then
1891                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1892         fi
1893         ol_with_ldbm_module="$ol_arg"
1894
1895 else
1896         ol_with_ldbm_module="static"
1897 fi
1898 # end --with-ldbm_module
1899
1900 # OpenLDAP --with-ldbm_type
1901         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1902 if test "${with_ldbm_type+set}" = set; then
1903   withval="$with_ldbm_type"
1904   
1905         ol_arg=invalid
1906         for ol_val in auto btree hash ; do
1907                 if test "$withval" = "$ol_val" ; then
1908                         ol_arg="$ol_val"
1909                 fi
1910         done
1911         if test "$ol_arg" = "invalid" ; then
1912                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1913         fi
1914         ol_with_ldbm_type="$ol_arg"
1915
1916 else
1917         ol_with_ldbm_type="auto"
1918 fi
1919 # end --with-ldbm_type
1920
1921 # OpenLDAP --enable-passwd
1922         # Check whether --enable-passwd or --disable-passwd was given.
1923 if test "${enable_passwd+set}" = set; then
1924   enableval="$enable_passwd"
1925   
1926         ol_arg=invalid
1927         for ol_val in auto yes no ; do
1928                 if test "$enableval" = "$ol_val" ; then
1929                         ol_arg="$ol_val"
1930                 fi
1931         done
1932         if test "$ol_arg" = "invalid" ; then
1933                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1934         fi
1935         ol_enable_passwd="$ol_arg"
1936
1937 else
1938         ol_enable_passwd="no"
1939 fi
1940 # end --enable-passwd
1941 # OpenLDAP --with-passwd_module
1942         # Check whether --with-passwd_module or --without-passwd_module was given.
1943 if test "${with_passwd_module+set}" = set; then
1944   withval="$with_passwd_module"
1945   
1946         ol_arg=invalid
1947         for ol_val in static dynamic ; do
1948                 if test "$withval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1954         fi
1955         ol_with_passwd_module="$ol_arg"
1956
1957 else
1958         ol_with_passwd_module="static"
1959 fi
1960 # end --with-passwd_module
1961
1962 # OpenLDAP --enable-perl
1963         # Check whether --enable-perl or --disable-perl was given.
1964 if test "${enable_perl+set}" = set; then
1965   enableval="$enable_perl"
1966   
1967         ol_arg=invalid
1968         for ol_val in auto yes no ; do
1969                 if test "$enableval" = "$ol_val" ; then
1970                         ol_arg="$ol_val"
1971                 fi
1972         done
1973         if test "$ol_arg" = "invalid" ; then
1974                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1975         fi
1976         ol_enable_perl="$ol_arg"
1977
1978 else
1979         ol_enable_perl="no"
1980 fi
1981 # end --enable-perl
1982 # OpenLDAP --with-perl_module
1983         # Check whether --with-perl_module or --without-perl_module was given.
1984 if test "${with_perl_module+set}" = set; then
1985   withval="$with_perl_module"
1986   
1987         ol_arg=invalid
1988         for ol_val in static dynamic ; do
1989                 if test "$withval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1995         fi
1996         ol_with_perl_module="$ol_arg"
1997
1998 else
1999         ol_with_perl_module="static"
2000 fi
2001 # end --with-perl_module
2002
2003 # OpenLDAP --enable-shell
2004         # Check whether --enable-shell or --disable-shell was given.
2005 if test "${enable_shell+set}" = set; then
2006   enableval="$enable_shell"
2007   
2008         ol_arg=invalid
2009         for ol_val in auto yes no ; do
2010                 if test "$enableval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2016         fi
2017         ol_enable_shell="$ol_arg"
2018
2019 else
2020         ol_enable_shell="no"
2021 fi
2022 # end --enable-shell
2023 # OpenLDAP --with-shell_module
2024         # Check whether --with-shell_module or --without-shell_module was given.
2025 if test "${with_shell_module+set}" = set; then
2026   withval="$with_shell_module"
2027   
2028         ol_arg=invalid
2029         for ol_val in static dynamic ; do
2030                 if test "$withval" = "$ol_val" ; then
2031                         ol_arg="$ol_val"
2032                 fi
2033         done
2034         if test "$ol_arg" = "invalid" ; then
2035                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2036         fi
2037         ol_with_shell_module="$ol_arg"
2038
2039 else
2040         ol_with_shell_module="static"
2041 fi
2042 # end --with-shell_module
2043
2044 # OpenLDAP --enable-sql
2045         # Check whether --enable-sql or --disable-sql was given.
2046 if test "${enable_sql+set}" = set; then
2047   enableval="$enable_sql"
2048   
2049         ol_arg=invalid
2050         for ol_val in auto yes no ; do
2051                 if test "$enableval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2057         fi
2058         ol_enable_sql="$ol_arg"
2059
2060 else
2061         ol_enable_sql="no"
2062 fi
2063 # end --enable-sql
2064 # OpenLDAP --with-sql_module
2065         # Check whether --with-sql_module or --without-sql_module was given.
2066 if test "${with_sql_module+set}" = set; then
2067   withval="$with_sql_module"
2068   
2069         ol_arg=invalid
2070         for ol_val in static dynamic ; do
2071                 if test "$withval" = "$ol_val" ; then
2072                         ol_arg="$ol_val"
2073                 fi
2074         done
2075         if test "$ol_arg" = "invalid" ; then
2076                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2077         fi
2078         ol_with_sql_module="$ol_arg"
2079
2080 else
2081         ol_with_sql_module="static"
2082 fi
2083 # end --with-sql_module
2084
2085 # OpenLDAP --enable-tcl
2086         # Check whether --enable-tcl or --disable-tcl was given.
2087 if test "${enable_tcl+set}" = set; then
2088   enableval="$enable_tcl"
2089   
2090         ol_arg=invalid
2091         for ol_val in auto yes no ; do
2092                 if test "$enableval" = "$ol_val" ; then
2093                         ol_arg="$ol_val"
2094                 fi
2095         done
2096         if test "$ol_arg" = "invalid" ; then
2097                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2098         fi
2099         ol_enable_tcl="$ol_arg"
2100
2101 else
2102         ol_enable_tcl="no"
2103 fi
2104 # end --enable-tcl
2105 # OpenLDAP --with-tcl_module
2106         # Check whether --with-tcl_module or --without-tcl_module was given.
2107 if test "${with_tcl_module+set}" = set; then
2108   withval="$with_tcl_module"
2109   
2110         ol_arg=invalid
2111         for ol_val in static dynamic ; do
2112                 if test "$withval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2118         fi
2119         ol_with_tcl_module="$ol_arg"
2120
2121 else
2122         ol_with_tcl_module="static"
2123 fi
2124 # end --with-tcl_module
2125
2126
2127 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2128 if test "${with_xxslurpdoptions+set}" = set; then
2129   withval="$with_xxslurpdoptions"
2130   :
2131 fi
2132
2133 # OpenLDAP --enable-slurpd
2134         # Check whether --enable-slurpd or --disable-slurpd was given.
2135 if test "${enable_slurpd+set}" = set; then
2136   enableval="$enable_slurpd"
2137   
2138         ol_arg=invalid
2139         for ol_val in auto yes no ; do
2140                 if test "$enableval" = "$ol_val" ; then
2141                         ol_arg="$ol_val"
2142                 fi
2143         done
2144         if test "$ol_arg" = "invalid" ; then
2145                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2146         fi
2147         ol_enable_slurpd="$ol_arg"
2148
2149 else
2150         ol_enable_slurpd="auto"
2151 fi
2152 # end --enable-slurpd
2153
2154 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2155 if test "${with_xxliboptions+set}" = set; then
2156   withval="$with_xxliboptions"
2157   :
2158 fi
2159
2160 # Check whether --enable-static or --disable-static was given.
2161 if test "${enable_static+set}" = set; then
2162   enableval="$enable_static"
2163   p=${PACKAGE-default}
2164 case "$enableval" in
2165 yes) enable_static=yes ;;
2166 no) enable_static=no ;;
2167 *)
2168   enable_static=no
2169   # Look at the argument we got.  We use all the common list separators.
2170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2171   for pkg in $enableval; do
2172     if test "X$pkg" = "X$p"; then
2173       enable_static=yes
2174     fi
2175   done
2176   IFS="$ac_save_ifs"
2177   ;;
2178 esac
2179 else
2180   enable_static=yes
2181 fi
2182
2183 # Check whether --enable-shared or --disable-shared was given.
2184 if test "${enable_shared+set}" = set; then
2185   enableval="$enable_shared"
2186   p=${PACKAGE-default}
2187 case "$enableval" in
2188 yes) enable_shared=yes ;;
2189 no) enable_shared=no ;;
2190 *)
2191   enable_shared=no
2192   # Look at the argument we got.  We use all the common list separators.
2193   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2194   for pkg in $enableval; do
2195     if test "X$pkg" = "X$p"; then
2196       enable_shared=yes
2197     fi
2198   done
2199   IFS="$ac_save_ifs"
2200   ;;
2201 esac
2202 else
2203   enable_shared=yes
2204 fi
2205
2206
2207
2208 # validate options
2209 if test $ol_enable_slapd = no ; then
2210                 if test $ol_enable_dnssrv = yes ; then
2211                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2212         fi
2213         if test $ol_enable_ldap = yes ; then
2214                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2215         fi
2216         if test $ol_enable_ldbm = yes ; then
2217                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2218         fi
2219         if test $ol_enable_passwd = yes ; then
2220                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2221         fi
2222         if test $ol_enable_perl = yes ; then
2223                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2224         fi
2225         if test $ol_enable_shell = yes ; then
2226                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2227         fi
2228         if test $ol_enable_tcl = yes ; then
2229                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2230         fi
2231         if test $ol_enable_sql = yes ; then
2232                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2233         fi
2234         if test $ol_enable_modules = yes ; then
2235                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2236         fi
2237         if test $ol_enable_multimaster = yes ; then
2238                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2239         fi
2240         if test $ol_enable_wrappers = yes ; then
2241                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2242         fi
2243         if test $ol_enable_phonetic = yes ; then
2244                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2245         fi
2246         if test $ol_enable_rlookups = yes ; then
2247                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2248         fi
2249         if test $ol_enable_aci = yes ; then
2250                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2251         fi
2252         if test $ol_with_ldbm_api != auto ; then
2253                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2254         fi
2255         if test $ol_with_ldbm_type != auto ; then
2256                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2257         fi
2258         if test $ol_with_dnssrv_module != static ; then
2259                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2260         fi
2261         if test $ol_with_ldap_module != static ; then
2262                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2263         fi
2264         if test $ol_with_ldbm_module != static ; then
2265                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2266         fi
2267         if test $ol_with_passwd_module != static ; then
2268                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2269         fi
2270         if test $ol_with_perl_module != static ; then
2271                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2272         fi
2273         if test $ol_with_shell_module != static ; then
2274                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2275         fi
2276         if test $ol_with_tcl_module != static ; then
2277                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2278         fi
2279         if test $ol_with_sql_module != static ; then
2280                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2281         fi
2282         if test $ol_enable_slurpd = yes ; then
2283                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2284         fi
2285
2286         # force settings to no
2287         ol_enable_dnssrv=no
2288         ol_enable_ldap=no
2289         ol_enable_ldbm=no
2290         ol_enable_passwd=no
2291         ol_enable_perl=no
2292         ol_enable_shell=no
2293         ol_enable_tcl=no
2294         ol_enable_sql=no
2295
2296         ol_enable_modules=no
2297         ol_enable_multimaster=no
2298         ol_enable_phonetic=no
2299         ol_enable_rlookups=no
2300         ol_enable_aci=no
2301         ol_enable_wrappers=no
2302         ol_enable_dynamic=no
2303
2304         ol_with_ldbm_api=no
2305         ol_with_ldbm_type=no
2306
2307         ol_with_dnssrv_module=static
2308         ol_with_ldap_module=static
2309         ol_with_ldbm_module=static
2310         ol_with_passwd_module=static
2311         ol_with_perl_module=static
2312         ol_with_shell_module=static
2313         ol_with_tcl_module=static
2314         ol_with_sql_module=static
2315
2316         ol_enable_slurpd=no
2317
2318 elif test $ol_enable_ldbm = no ; then
2319         
2320         if test $ol_with_ldbm_api != auto ; then
2321                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2322         fi
2323
2324         if test $ol_with_ldbm_type != auto ; then
2325                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2326         fi
2327
2328         if test $ol_with_ldbm_module != static ; then
2329                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2330         fi
2331
2332         if test $ol_enable_modules != yes -a \
2333                 $ol_enable_dnssrv = no -a \
2334                 $ol_enable_ldap = no -a \
2335                 $ol_enable_passwd = no -a \
2336                 $ol_enable_perl = no -a \
2337                 $ol_enable_shell = no -a \
2338                 $ol_enable_sql = no -a \
2339                 $ol_enable_tcl = no ; then
2340                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2341         fi
2342
2343         ol_with_ldbm_api=no
2344         ol_with_ldbm_type=no
2345         ol_with_ldbm_module=static
2346
2347 else
2348                 if test $ol_with_ldbm_api = gdbm -a \
2349                 $ol_with_ldbm_type = btree ; then
2350                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2351         fi
2352         if test $ol_with_ldbm_api = mdbm -a \
2353                 $ol_with_ldbm_type = btree ; then
2354                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2355         fi
2356         if test $ol_with_ldbm_api = ndbm -a \
2357                 $ol_with_ldbm_type = btree ; then
2358                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2359         fi
2360 fi
2361
2362 if test $ol_enable_slurpd = yes ; then
2363                 if test $ol_with_threads = no ; then
2364                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2365         fi
2366 fi
2367
2368 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2369         if test $ol_with_kerberos = no ; then
2370                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2371         fi
2372         ol_with_kerberos=yes
2373 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2374         if test $ol_with_kerberos != no -a $ol_with_kerberos != no ; then
2375                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2376         fi
2377         ol_with_kerberos=no
2378 fi
2379
2380 if test $ol_enable_spasswd = yes ; then
2381         if test $ol_with_cyrus_sasl = no ; then
2382                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2383         fi
2384         ol_link_spasswd=yes
2385 fi
2386
2387 echo "$ac_t""done" 1>&6
2388
2389 LDAP_LIBS=
2390 LDIF_LIBS=
2391 LDBM_LIBS=
2392 LTHREAD_LIBS=
2393 LUTIL_LIBS=
2394
2395 SLAPD_LIBS=
2396 SLURPD_LIBS=
2397
2398 BUILD_SLAPD=no
2399 BUILD_SLURPD=no
2400
2401 BUILD_THREAD=no
2402
2403 BUILD_DNSSRV=no
2404 BUILD_LDAP=no
2405 BUILD_LDBM=no
2406 BUILD_PASSWD=no
2407 BUILD_PERL=no
2408 BUILD_SHELL=no
2409 BUILD_SQL=no
2410 BUILD_TCL=no
2411
2412 BUILD_DNSSRV_DYNAMIC=static
2413 BUILD_LDAP_DYNAMIC=static
2414 BUILD_LDBM_DYNAMIC=static
2415 BUILD_PASSWD_DYNAMIC=static
2416 BUILD_PERL_DYNAMIC=static
2417 BUILD_SHELL_DYNAMIC=static
2418 BUILD_TCL_DYNAMIC=static
2419 BUILD_SQL_DYNAMIC=static
2420
2421 SLAPD_MODULES_LDFLAGS=
2422 SLAPD_MODULES_CPPFLAGS=
2423 SLAPD_MODULES_LIST=
2424
2425 SLAPD_PERL_LDFLAGS=
2426 MOD_PERL_LDFLAGS=
2427 PERL_CPPFLAGS=
2428
2429 SLAPD_SQL_LDFLAGS=
2430 SLAPD_SQL_LIBS=
2431 SLAPD_SQL_INCLUDES=
2432
2433 MOD_TCL_LIB=
2434 KRB4_LIBS=
2435 KRB5_LIBS=
2436 READLINE_LIBS=
2437 SASL_LIBS=
2438 TERMCAP_LIBS=
2439 TLS_LIBS=
2440 MODULES_LIBS=
2441 AUTH_LIBS=
2442
2443
2444
2445 cat >> confdefs.h <<\EOF
2446 #define HAVE_MKVERSION 1
2447 EOF
2448
2449
2450
2451
2452 ol_aix_threads=no
2453 case "$target" in
2454 *-*-aix*)       if test -z "$CC" ; then
2455                 case "$ol_with_threads" in
2456                 auto | yes |  posix) ol_aix_threads=yes ;;
2457                 esac
2458         fi
2459 ;;
2460 esac
2461
2462 if test $ol_aix_threads = yes ; then
2463         if test -z "${CC}" ; then
2464                 for ac_prog in cc_r xlc_r cc
2465 do
2466 # Extract the first word of "$ac_prog", so it can be a program name with args.
2467 set dummy $ac_prog; ac_word=$2
2468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2469 echo "configure:2470: checking for $ac_word" >&5
2470 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2471   echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473   if test -n "$CC"; then
2474   ac_cv_prog_CC="$CC" # Let the user override the test.
2475 else
2476   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2477   ac_dummy="$PATH"
2478   for ac_dir in $ac_dummy; do
2479     test -z "$ac_dir" && ac_dir=.
2480     if test -f $ac_dir/$ac_word; then
2481       ac_cv_prog_CC="$ac_prog"
2482       break
2483     fi
2484   done
2485   IFS="$ac_save_ifs"
2486 fi
2487 fi
2488 CC="$ac_cv_prog_CC"
2489 if test -n "$CC"; then
2490   echo "$ac_t""$CC" 1>&6
2491 else
2492   echo "$ac_t""no" 1>&6
2493 fi
2494
2495 test -n "$CC" && break
2496 done
2497
2498
2499                 if test "$CC" = cc ; then
2500                                                 if test $ol_with_threads != auto ; then
2501                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2502                         else
2503                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2504                         fi
2505                         ol_with_threads=no
2506                 fi
2507         fi
2508
2509         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2510                 ol_with_threads=posix
2511                 ol_cv_pthread_create=yes
2512         fi
2513 fi
2514
2515 if test -z "${CC}"; then
2516         for ac_prog in cc
2517 do
2518 # Extract the first word of "$ac_prog", so it can be a program name with args.
2519 set dummy $ac_prog; ac_word=$2
2520 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2521 echo "configure:2522: checking for $ac_word" >&5
2522 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2523   echo $ac_n "(cached) $ac_c" 1>&6
2524 else
2525   if test -n "$CC"; then
2526   ac_cv_prog_CC="$CC" # Let the user override the test.
2527 else
2528   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2529   ac_dummy="$PATH"
2530   for ac_dir in $ac_dummy; do
2531     test -z "$ac_dir" && ac_dir=.
2532     if test -f $ac_dir/$ac_word; then
2533       ac_cv_prog_CC="$ac_prog"
2534       break
2535     fi
2536   done
2537   IFS="$ac_save_ifs"
2538 fi
2539 fi
2540 CC="$ac_cv_prog_CC"
2541 if test -n "$CC"; then
2542   echo "$ac_t""$CC" 1>&6
2543 else
2544   echo "$ac_t""no" 1>&6
2545 fi
2546
2547 test -n "$CC" && break
2548 done
2549
2550 fi
2551
2552
2553
2554
2555 # Check whether --enable-fast-install or --disable-fast-install was given.
2556 if test "${enable_fast_install+set}" = set; then
2557   enableval="$enable_fast_install"
2558   p=${PACKAGE-default}
2559 case "$enableval" in
2560 yes) enable_fast_install=yes ;;
2561 no) enable_fast_install=no ;;
2562 *)
2563   enable_fast_install=no
2564   # Look at the argument we got.  We use all the common list separators.
2565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2566   for pkg in $enableval; do
2567     if test "X$pkg" = "X$p"; then
2568       enable_fast_install=yes
2569     fi
2570   done
2571   IFS="$ac_save_ifs"
2572   ;;
2573 esac
2574 else
2575   enable_fast_install=yes
2576 fi
2577
2578 # Extract the first word of "ranlib", so it can be a program name with args.
2579 set dummy ranlib; ac_word=$2
2580 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2581 echo "configure:2582: checking for $ac_word" >&5
2582 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   if test -n "$RANLIB"; then
2586   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2587 else
2588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2589   ac_dummy="$PATH"
2590   for ac_dir in $ac_dummy; do
2591     test -z "$ac_dir" && ac_dir=.
2592     if test -f $ac_dir/$ac_word; then
2593       ac_cv_prog_RANLIB="ranlib"
2594       break
2595     fi
2596   done
2597   IFS="$ac_save_ifs"
2598   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2599 fi
2600 fi
2601 RANLIB="$ac_cv_prog_RANLIB"
2602 if test -n "$RANLIB"; then
2603   echo "$ac_t""$RANLIB" 1>&6
2604 else
2605   echo "$ac_t""no" 1>&6
2606 fi
2607
2608 # Extract the first word of "gcc", so it can be a program name with args.
2609 set dummy gcc; ac_word=$2
2610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2611 echo "configure:2612: checking for $ac_word" >&5
2612 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2613   echo $ac_n "(cached) $ac_c" 1>&6
2614 else
2615   if test -n "$CC"; then
2616   ac_cv_prog_CC="$CC" # Let the user override the test.
2617 else
2618   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2619   ac_dummy="$PATH"
2620   for ac_dir in $ac_dummy; do
2621     test -z "$ac_dir" && ac_dir=.
2622     if test -f $ac_dir/$ac_word; then
2623       ac_cv_prog_CC="gcc"
2624       break
2625     fi
2626   done
2627   IFS="$ac_save_ifs"
2628 fi
2629 fi
2630 CC="$ac_cv_prog_CC"
2631 if test -n "$CC"; then
2632   echo "$ac_t""$CC" 1>&6
2633 else
2634   echo "$ac_t""no" 1>&6
2635 fi
2636
2637 if test -z "$CC"; then
2638   # Extract the first word of "cc", so it can be a program name with args.
2639 set dummy cc; ac_word=$2
2640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2641 echo "configure:2642: checking for $ac_word" >&5
2642 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2643   echo $ac_n "(cached) $ac_c" 1>&6
2644 else
2645   if test -n "$CC"; then
2646   ac_cv_prog_CC="$CC" # Let the user override the test.
2647 else
2648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2649   ac_prog_rejected=no
2650   ac_dummy="$PATH"
2651   for ac_dir in $ac_dummy; do
2652     test -z "$ac_dir" && ac_dir=.
2653     if test -f $ac_dir/$ac_word; then
2654       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2655         ac_prog_rejected=yes
2656         continue
2657       fi
2658       ac_cv_prog_CC="cc"
2659       break
2660     fi
2661   done
2662   IFS="$ac_save_ifs"
2663 if test $ac_prog_rejected = yes; then
2664   # We found a bogon in the path, so make sure we never use it.
2665   set dummy $ac_cv_prog_CC
2666   shift
2667   if test $# -gt 0; then
2668     # We chose a different compiler from the bogus one.
2669     # However, it has the same basename, so the bogon will be chosen
2670     # first if we set CC to just the basename; use the full file name.
2671     shift
2672     set dummy "$ac_dir/$ac_word" "$@"
2673     shift
2674     ac_cv_prog_CC="$@"
2675   fi
2676 fi
2677 fi
2678 fi
2679 CC="$ac_cv_prog_CC"
2680 if test -n "$CC"; then
2681   echo "$ac_t""$CC" 1>&6
2682 else
2683   echo "$ac_t""no" 1>&6
2684 fi
2685
2686   if test -z "$CC"; then
2687     case "`uname -s`" in
2688     *win32* | *WIN32* | *CYGWIN*)
2689       # Extract the first word of "cl", so it can be a program name with args.
2690 set dummy cl; ac_word=$2
2691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2692 echo "configure:2693: checking for $ac_word" >&5
2693 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2694   echo $ac_n "(cached) $ac_c" 1>&6
2695 else
2696   if test -n "$CC"; then
2697   ac_cv_prog_CC="$CC" # Let the user override the test.
2698 else
2699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2700   ac_dummy="$PATH"
2701   for ac_dir in $ac_dummy; do
2702     test -z "$ac_dir" && ac_dir=.
2703     if test -f $ac_dir/$ac_word; then
2704       ac_cv_prog_CC="cl"
2705       break
2706     fi
2707   done
2708   IFS="$ac_save_ifs"
2709 fi
2710 fi
2711 CC="$ac_cv_prog_CC"
2712 if test -n "$CC"; then
2713   echo "$ac_t""$CC" 1>&6
2714 else
2715   echo "$ac_t""no" 1>&6
2716 fi
2717  ;;
2718     esac
2719   fi
2720   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2721 fi
2722
2723 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2724 echo "configure:2725: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2725
2726 ac_ext=c
2727 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2728 ac_cpp='$CPP $CPPFLAGS'
2729 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2730 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2731 cross_compiling=$ac_cv_prog_cc_cross
2732
2733 cat > conftest.$ac_ext << EOF
2734
2735 #line 2736 "configure"
2736 #include "confdefs.h"
2737
2738 main(){return(0);}
2739 EOF
2740 if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2741   ac_cv_prog_cc_works=yes
2742   # If we can't run a trivial program, we are probably using a cross compiler.
2743   if (./conftest; exit) 2>/dev/null; then
2744     ac_cv_prog_cc_cross=no
2745   else
2746     ac_cv_prog_cc_cross=yes
2747   fi
2748 else
2749   echo "configure: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751   ac_cv_prog_cc_works=no
2752 fi
2753 rm -fr conftest*
2754 ac_ext=c
2755 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2756 ac_cpp='$CPP $CPPFLAGS'
2757 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2758 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2759 cross_compiling=$ac_cv_prog_cc_cross
2760
2761 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2762 if test $ac_cv_prog_cc_works = no; then
2763   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2764 fi
2765 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2766 echo "configure:2767: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2767 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2768 cross_compiling=$ac_cv_prog_cc_cross
2769
2770 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2771 echo "configure:2772: checking whether we are using GNU C" >&5
2772 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2773   echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775   cat > conftest.c <<EOF
2776 #ifdef __GNUC__
2777   yes;
2778 #endif
2779 EOF
2780 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2781   ac_cv_prog_gcc=yes
2782 else
2783   ac_cv_prog_gcc=no
2784 fi
2785 fi
2786
2787 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2788
2789 if test $ac_cv_prog_gcc = yes; then
2790   GCC=yes
2791 else
2792   GCC=
2793 fi
2794
2795 ac_test_CFLAGS="${CFLAGS+set}"
2796 ac_save_CFLAGS="$CFLAGS"
2797 CFLAGS=
2798 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2799 echo "configure:2800: checking whether ${CC-cc} accepts -g" >&5
2800 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803   echo 'void f(){}' > conftest.c
2804 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2805   ac_cv_prog_cc_g=yes
2806 else
2807   ac_cv_prog_cc_g=no
2808 fi
2809 rm -f conftest*
2810
2811 fi
2812
2813 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2814 if test "$ac_test_CFLAGS" = set; then
2815   CFLAGS="$ac_save_CFLAGS"
2816 elif test $ac_cv_prog_cc_g = yes; then
2817   if test "$GCC" = yes; then
2818     CFLAGS="-g -O2"
2819   else
2820     CFLAGS="-g"
2821   fi
2822 else
2823   if test "$GCC" = yes; then
2824     CFLAGS="-O2"
2825   else
2826     CFLAGS=
2827   fi
2828 fi
2829
2830 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2831 if test "${with_gnu_ld+set}" = set; then
2832   withval="$with_gnu_ld"
2833   test "$withval" = no || with_gnu_ld=yes
2834 else
2835   with_gnu_ld=no
2836 fi
2837
2838 ac_prog=ld
2839 if test "$ac_cv_prog_gcc" = yes; then
2840   # Check if gcc -print-prog-name=ld gives a path.
2841   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2842 echo "configure:2843: checking for ld used by GCC" >&5
2843   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2844   case "$ac_prog" in
2845     # Accept absolute paths.
2846     [\\/]* | [A-Za-z]:[\\/]*)
2847       re_direlt='/[^/][^/]*/\.\./'
2848       # Canonicalize the path of ld
2849       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2850       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2851         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2852       done
2853       test -z "$LD" && LD="$ac_prog"
2854       ;;
2855   "")
2856     # If it fails, then pretend we aren't using GCC.
2857     ac_prog=ld
2858     ;;
2859   *)
2860     # If it is relative, then search for the first ld in PATH.
2861     with_gnu_ld=unknown
2862     ;;
2863   esac
2864 elif test "$with_gnu_ld" = yes; then
2865   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2866 echo "configure:2867: checking for GNU ld" >&5
2867 else
2868   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2869 echo "configure:2870: checking for non-GNU ld" >&5
2870 fi
2871 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2872   echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874   if test -z "$LD"; then
2875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2876   for ac_dir in $PATH; do
2877     test -z "$ac_dir" && ac_dir=.
2878     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2879       ac_cv_path_LD="$ac_dir/$ac_prog"
2880       # Check to see if the program is GNU ld.  I'd rather use --version,
2881       # but apparently some GNU ld's only accept -v.
2882       # Break only if it was the GNU/non-GNU ld that we prefer.
2883       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2884         test "$with_gnu_ld" != no && break
2885       else
2886         test "$with_gnu_ld" != yes && break
2887       fi
2888     fi
2889   done
2890   IFS="$ac_save_ifs"
2891 else
2892   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2893 fi
2894 fi
2895
2896 LD="$ac_cv_path_LD"
2897 if test -n "$LD"; then
2898   echo "$ac_t""$LD" 1>&6
2899 else
2900   echo "$ac_t""no" 1>&6
2901 fi
2902 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2903 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2904 echo "configure:2905: checking if the linker ($LD) is GNU ld" >&5
2905 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2909 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2910   ac_cv_prog_gnu_ld=yes
2911 else
2912   ac_cv_prog_gnu_ld=no
2913 fi
2914 fi
2915
2916 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2917
2918
2919 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2920 echo "configure:2921: checking for BSD-compatible nm" >&5
2921 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2922   echo $ac_n "(cached) $ac_c" 1>&6
2923 else
2924   if test -n "$NM"; then
2925   # Let the user override the test.
2926   ac_cv_path_NM="$NM"
2927 else
2928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2929   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2930     test -z "$ac_dir" && ac_dir=.
2931     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2932       # Check to see if the nm accepts a BSD-compat flag.
2933       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2934       #   nm: unknown option "B" ignored
2935       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2936         ac_cv_path_NM="$ac_dir/nm -B"
2937         break
2938       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2939         ac_cv_path_NM="$ac_dir/nm -p"
2940         break
2941       else
2942         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2943         continue # so that we can try to find one that supports BSD flags
2944       fi
2945     fi
2946   done
2947   IFS="$ac_save_ifs"
2948   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2949 fi
2950 fi
2951
2952 NM="$ac_cv_path_NM"
2953 echo "$ac_t""$NM" 1>&6
2954
2955 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2956 echo "configure:2957: checking whether ln -s works" >&5
2957 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2958   echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960   rm -f conftestdata
2961 if ln -s X conftestdata 2>/dev/null
2962 then
2963   rm -f conftestdata
2964   ac_cv_prog_LN_S="ln -s"
2965 else
2966   ac_cv_prog_LN_S=ln
2967 fi
2968 fi
2969 LN_S="$ac_cv_prog_LN_S"
2970 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2971   echo "$ac_t""yes" 1>&6
2972 else
2973   echo "$ac_t""no" 1>&6
2974 fi
2975
2976 if test $host != $build; then
2977   ac_tool_prefix=${host_alias}-
2978 else
2979   ac_tool_prefix=
2980 fi
2981
2982
2983 case "$target" in
2984 NONE) lt_target="$host" ;;
2985 *) lt_target="$target" ;;
2986 esac
2987
2988 # Check for any special flags to pass to ltconfig.
2989 libtool_flags="--cache-file=$cache_file"
2990 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2991 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2992 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2993 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2994 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2995 libtool_flags="$libtool_flags --enable-dlopen"
2996 libtool_flags="$libtool_flags --enable-win32-dll"
2997 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2998 if test "${enable_libtool_lock+set}" = set; then
2999   enableval="$enable_libtool_lock"
3000   :
3001 fi
3002
3003 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3004 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3005
3006 # Some flags need to be propagated to the compiler or linker for good
3007 # libtool support.
3008 case "$lt_target" in
3009 *-*-irix6*)
3010   # Find out which ABI we are using.
3011   echo '#line 3012 "configure"' > conftest.$ac_ext
3012   if { (eval echo configure:3013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3013     case "`/usr/bin/file conftest.o`" in
3014     *32-bit*)
3015       LD="${LD-ld} -32"
3016       ;;
3017     *N32*)
3018       LD="${LD-ld} -n32"
3019       ;;
3020     *64-bit*)
3021       LD="${LD-ld} -64"
3022       ;;
3023     esac
3024   fi
3025   rm -rf conftest*
3026   ;;
3027
3028 *-*-sco3.2v5*)
3029   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3030   SAVE_CFLAGS="$CFLAGS"
3031   CFLAGS="$CFLAGS -belf"
3032   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3033 echo "configure:3034: checking whether the C compiler needs -belf" >&5
3034 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3035   echo $ac_n "(cached) $ac_c" 1>&6
3036 else
3037   cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3040
3041 int main() {
3042
3043 ; return 0; }
3044 EOF
3045 if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3046   rm -rf conftest*
3047   lt_cv_cc_needs_belf=yes
3048 else
3049   echo "configure: failed program was:" >&5
3050   cat conftest.$ac_ext >&5
3051   rm -rf conftest*
3052   lt_cv_cc_needs_belf=no
3053 fi
3054 rm -f conftest*
3055 fi
3056
3057 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3058   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3059     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3060     CFLAGS="$SAVE_CFLAGS"
3061   fi
3062   ;;
3063
3064 *-*-cygwin* | *-*-mingw*)
3065   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3066 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3068 echo "configure:3069: checking for $ac_word" >&5
3069 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3070   echo $ac_n "(cached) $ac_c" 1>&6
3071 else
3072   if test -n "$DLLTOOL"; then
3073   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3074 else
3075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3076   ac_dummy="$PATH"
3077   for ac_dir in $ac_dummy; do
3078     test -z "$ac_dir" && ac_dir=.
3079     if test -f $ac_dir/$ac_word; then
3080       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3081       break
3082     fi
3083   done
3084   IFS="$ac_save_ifs"
3085 fi
3086 fi
3087 DLLTOOL="$ac_cv_prog_DLLTOOL"
3088 if test -n "$DLLTOOL"; then
3089   echo "$ac_t""$DLLTOOL" 1>&6
3090 else
3091   echo "$ac_t""no" 1>&6
3092 fi
3093
3094
3095 if test -z "$ac_cv_prog_DLLTOOL"; then
3096 if test -n "$ac_tool_prefix"; then
3097   # Extract the first word of "dlltool", so it can be a program name with args.
3098 set dummy dlltool; ac_word=$2
3099 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3100 echo "configure:3101: checking for $ac_word" >&5
3101 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   if test -n "$DLLTOOL"; then
3105   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3106 else
3107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3108   ac_dummy="$PATH"
3109   for ac_dir in $ac_dummy; do
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/$ac_word; then
3112       ac_cv_prog_DLLTOOL="dlltool"
3113       break
3114     fi
3115   done
3116   IFS="$ac_save_ifs"
3117   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3118 fi
3119 fi
3120 DLLTOOL="$ac_cv_prog_DLLTOOL"
3121 if test -n "$DLLTOOL"; then
3122   echo "$ac_t""$DLLTOOL" 1>&6
3123 else
3124   echo "$ac_t""no" 1>&6
3125 fi
3126
3127 else
3128   DLLTOOL="false"
3129 fi
3130 fi
3131
3132   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3133 set dummy ${ac_tool_prefix}as; ac_word=$2
3134 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3135 echo "configure:3136: checking for $ac_word" >&5
3136 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3137   echo $ac_n "(cached) $ac_c" 1>&6
3138 else
3139   if test -n "$AS"; then
3140   ac_cv_prog_AS="$AS" # Let the user override the test.
3141 else
3142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3143   ac_dummy="$PATH"
3144   for ac_dir in $ac_dummy; do
3145     test -z "$ac_dir" && ac_dir=.
3146     if test -f $ac_dir/$ac_word; then
3147       ac_cv_prog_AS="${ac_tool_prefix}as"
3148       break
3149     fi
3150   done
3151   IFS="$ac_save_ifs"
3152 fi
3153 fi
3154 AS="$ac_cv_prog_AS"
3155 if test -n "$AS"; then
3156   echo "$ac_t""$AS" 1>&6
3157 else
3158   echo "$ac_t""no" 1>&6
3159 fi
3160
3161
3162 if test -z "$ac_cv_prog_AS"; then
3163 if test -n "$ac_tool_prefix"; then
3164   # Extract the first word of "as", so it can be a program name with args.
3165 set dummy as; 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_AS+set}\" = set"; then
3169   echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171   if test -n "$AS"; then
3172   ac_cv_prog_AS="$AS" # 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_AS="as"
3180       break
3181     fi
3182   done
3183   IFS="$ac_save_ifs"
3184   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3185 fi
3186 fi
3187 AS="$ac_cv_prog_AS"
3188 if test -n "$AS"; then
3189   echo "$ac_t""$AS" 1>&6
3190 else
3191   echo "$ac_t""no" 1>&6
3192 fi
3193
3194 else
3195   AS="false"
3196 fi
3197 fi
3198
3199   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3200 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3201 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3202 echo "configure:3203: checking for $ac_word" >&5
3203 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3204   echo $ac_n "(cached) $ac_c" 1>&6
3205 else
3206   if test -n "$OBJDUMP"; then
3207   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3208 else
3209   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3210   ac_dummy="$PATH"
3211   for ac_dir in $ac_dummy; do
3212     test -z "$ac_dir" && ac_dir=.
3213     if test -f $ac_dir/$ac_word; then
3214       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3215       break
3216     fi
3217   done
3218   IFS="$ac_save_ifs"
3219 fi
3220 fi
3221 OBJDUMP="$ac_cv_prog_OBJDUMP"
3222 if test -n "$OBJDUMP"; then
3223   echo "$ac_t""$OBJDUMP" 1>&6
3224 else
3225   echo "$ac_t""no" 1>&6
3226 fi
3227
3228
3229 if test -z "$ac_cv_prog_OBJDUMP"; then
3230 if test -n "$ac_tool_prefix"; then
3231   # Extract the first word of "objdump", so it can be a program name with args.
3232 set dummy objdump; 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_OBJDUMP+set}\" = set"; then
3236   echo $ac_n "(cached) $ac_c" 1>&6
3237 else
3238   if test -n "$OBJDUMP"; then
3239   ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="objdump"
3247       break
3248     fi
3249   done
3250   IFS="$ac_save_ifs"
3251   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3252 fi
3253 fi
3254 OBJDUMP="$ac_cv_prog_OBJDUMP"
3255 if test -n "$OBJDUMP"; then
3256   echo "$ac_t""$OBJDUMP" 1>&6
3257 else
3258   echo "$ac_t""no" 1>&6
3259 fi
3260
3261 else
3262   OBJDUMP="false"
3263 fi
3264 fi
3265
3266   ;;
3267
3268 esac
3269
3270
3271 # Save cache, so that ltconfig can load it
3272
3273
3274 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3275 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3276 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3277 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3278 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3279 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3280 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3281 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3282
3283 # Reload cache, that may have been modified by ltconfig
3284
3285
3286 # This can be used to rebuild libtool when needed
3287 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3288
3289 # Always use our own libtool.
3290 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3291
3292 # Redirect the config.log output again, so that the ltconfig log is not
3293 # clobbered by the next message.
3294 exec 5>>./config.log
3295
3296
3297 for ac_prog in mawk gawk nawk awk
3298 do
3299 # Extract the first word of "$ac_prog", so it can be a program name with args.
3300 set dummy $ac_prog; ac_word=$2
3301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3302 echo "configure:3303: checking for $ac_word" >&5
3303 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3304   echo $ac_n "(cached) $ac_c" 1>&6
3305 else
3306   if test -n "$AWK"; then
3307   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3308 else
3309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3310   ac_dummy="$PATH"
3311   for ac_dir in $ac_dummy; do
3312     test -z "$ac_dir" && ac_dir=.
3313     if test -f $ac_dir/$ac_word; then
3314       ac_cv_prog_AWK="$ac_prog"
3315       break
3316     fi
3317   done
3318   IFS="$ac_save_ifs"
3319 fi
3320 fi
3321 AWK="$ac_cv_prog_AWK"
3322 if test -n "$AWK"; then
3323   echo "$ac_t""$AWK" 1>&6
3324 else
3325   echo "$ac_t""no" 1>&6
3326 fi
3327
3328 test -n "$AWK" && break
3329 done
3330
3331 # test for ln hardlink support
3332 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3333 echo "configure:3334: checking whether ln works" >&5
3334 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   rm -f conftest.src conftest.dst
3338 echo "conftest" > conftest.src
3339 if ln conftest.src conftest.dst 2>/dev/null
3340 then
3341   ol_cv_prog_LN_H="ln"
3342 else
3343   ol_cv_prog_LN_H="cp"
3344 fi
3345 rm -f conftest.src conftest.dst
3346
3347 fi
3348 LN_H="$ol_cv_prog_LN_H"
3349 if test "$ol_cv_prog_LN_H" = "ln"; then
3350         echo "$ac_t""yes" 1>&6
3351 else
3352         echo "$ac_t""no" 1>&6
3353 fi
3354
3355 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3356 echo "configure:3357: checking whether ln -s works" >&5
3357 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3358   echo $ac_n "(cached) $ac_c" 1>&6
3359 else
3360   rm -f conftestdata
3361 if ln -s X conftestdata 2>/dev/null
3362 then
3363   rm -f conftestdata
3364   ac_cv_prog_LN_S="ln -s"
3365 else
3366   ac_cv_prog_LN_S=ln
3367 fi
3368 fi
3369 LN_S="$ac_cv_prog_LN_S"
3370 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3371   echo "$ac_t""yes" 1>&6
3372 else
3373   echo "$ac_t""no" 1>&6
3374 fi
3375
3376
3377 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3378         LN_S="$LN_H"
3379 fi
3380
3381 # Extract the first word of "sendmail", so it can be a program name with args.
3382 set dummy sendmail; ac_word=$2
3383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3384 echo "configure:3385: checking for $ac_word" >&5
3385 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   case "$SENDMAIL" in
3389   /*)
3390   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3391   ;;
3392   ?:/*)
3393   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3394   ;;
3395   *)
3396   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3397   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3398   for ac_dir in $ac_dummy; do 
3399     test -z "$ac_dir" && ac_dir=.
3400     if test -f $ac_dir/$ac_word; then
3401       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3402       break
3403     fi
3404   done
3405   IFS="$ac_save_ifs"
3406   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3407   ;;
3408 esac
3409 fi
3410 SENDMAIL="$ac_cv_path_SENDMAIL"
3411 if test -n "$SENDMAIL"; then
3412   echo "$ac_t""$SENDMAIL" 1>&6
3413 else
3414   echo "$ac_t""no" 1>&6
3415 fi
3416
3417 # Extract the first word of "vi", so it can be a program name with args.
3418 set dummy vi; ac_word=$2
3419 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3420 echo "configure:3421: checking for $ac_word" >&5
3421 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   case "$EDITOR" in
3425   /*)
3426   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3427   ;;
3428   ?:/*)
3429   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3430   ;;
3431   *)
3432   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3433   ac_dummy="$PATH:/usr/ucb"
3434   for ac_dir in $ac_dummy; do 
3435     test -z "$ac_dir" && ac_dir=.
3436     if test -f $ac_dir/$ac_word; then
3437       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3438       break
3439     fi
3440   done
3441   IFS="$ac_save_ifs"
3442   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3443   ;;
3444 esac
3445 fi
3446 EDITOR="$ac_cv_path_EDITOR"
3447 if test -n "$EDITOR"; then
3448   echo "$ac_t""$EDITOR" 1>&6
3449 else
3450   echo "$ac_t""no" 1>&6
3451 fi
3452
3453 # Extract the first word of "finger", so it can be a program name with args.
3454 set dummy finger; ac_word=$2
3455 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3456 echo "configure:3457: checking for $ac_word" >&5
3457 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   case "$FINGER" in
3461   /*)
3462   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3463   ;;
3464   ?:/*)
3465   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3466   ;;
3467   *)
3468   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3469   ac_dummy="$PATH:/usr/ucb"
3470   for ac_dir in $ac_dummy; do 
3471     test -z "$ac_dir" && ac_dir=.
3472     if test -f $ac_dir/$ac_word; then
3473       ac_cv_path_FINGER="$ac_dir/$ac_word"
3474       break
3475     fi
3476   done
3477   IFS="$ac_save_ifs"
3478   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3479   ;;
3480 esac
3481 fi
3482 FINGER="$ac_cv_path_FINGER"
3483 if test -n "$FINGER"; then
3484   echo "$ac_t""$FINGER" 1>&6
3485 else
3486   echo "$ac_t""no" 1>&6
3487 fi
3488
3489
3490 ol_link_perl=no
3491 if test $ol_enable_perl != no ; then
3492         # Extract the first word of "perl", so it can be a program name with args.
3493 set dummy perl; ac_word=$2
3494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3495 echo "configure:3496: checking for $ac_word" >&5
3496 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   case "$PERLBIN" in
3500   /*)
3501   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3502   ;;
3503   ?:/*)
3504   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3505   ;;
3506   *)
3507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3508   ac_dummy="$PATH"
3509   for ac_dir in $ac_dummy; do 
3510     test -z "$ac_dir" && ac_dir=.
3511     if test -f $ac_dir/$ac_word; then
3512       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3513       break
3514     fi
3515   done
3516   IFS="$ac_save_ifs"
3517   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3518   ;;
3519 esac
3520 fi
3521 PERLBIN="$ac_cv_path_PERLBIN"
3522 if test -n "$PERLBIN"; then
3523   echo "$ac_t""$PERLBIN" 1>&6
3524 else
3525   echo "$ac_t""no" 1>&6
3526 fi
3527
3528
3529         if test "no$PERLBIN" = "no" ; then
3530                 if test $ol_enable_perl = yes ; then
3531                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3532                 fi
3533
3534         else
3535                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3536                 if test x"$ol_with_perl_module" = "xstatic" ; then
3537                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3538                 else
3539                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3540                 fi
3541                                 ol_link_perl=yes
3542         fi
3543 fi
3544
3545 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3546 echo "configure:3547: checking how to run the C preprocessor" >&5
3547 # On Suns, sometimes $CPP names a directory.
3548 if test -n "$CPP" && test -d "$CPP"; then
3549   CPP=
3550 fi
3551 if test -z "$CPP"; then
3552 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555     # This must be in double quotes, not single quotes, because CPP may get
3556   # substituted into the Makefile and "${CC-cc}" will confuse make.
3557   CPP="${CC-cc} -E"
3558   # On the NeXT, cc -E runs the code through the compiler's parser,
3559   # not just through cpp.
3560   cat > conftest.$ac_ext <<EOF
3561 #line 3562 "configure"
3562 #include "confdefs.h"
3563 #include <assert.h>
3564 Syntax Error
3565 EOF
3566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3567 { (eval echo configure:3568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3569 if test -z "$ac_err"; then
3570   :
3571 else
3572   echo "$ac_err" >&5
3573   echo "configure: failed program was:" >&5
3574   cat conftest.$ac_ext >&5
3575   rm -rf conftest*
3576   CPP="${CC-cc} -E -traditional-cpp"
3577   cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 #include <assert.h>
3581 Syntax Error
3582 EOF
3583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3584 { (eval echo configure:3585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3586 if test -z "$ac_err"; then
3587   :
3588 else
3589   echo "$ac_err" >&5
3590   echo "configure: failed program was:" >&5
3591   cat conftest.$ac_ext >&5
3592   rm -rf conftest*
3593   CPP="${CC-cc} -nologo -E"
3594   cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597 #include <assert.h>
3598 Syntax Error
3599 EOF
3600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3601 { (eval echo configure:3602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3603 if test -z "$ac_err"; then
3604   :
3605 else
3606   echo "$ac_err" >&5
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   CPP=/lib/cpp
3611 fi
3612 rm -f conftest*
3613 fi
3614 rm -f conftest*
3615 fi
3616 rm -f conftest*
3617   ac_cv_prog_CPP="$CPP"
3618 fi
3619   CPP="$ac_cv_prog_CPP"
3620 else
3621   ac_cv_prog_CPP="$CPP"
3622 fi
3623 echo "$ac_t""$CPP" 1>&6
3624
3625
3626 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3627         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3628
3629 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3630         echo "configure: warning: programs compiled here do run here..." 1>&2
3631         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3632
3633 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3634         echo "configure: warning: programs compiled here do not run here..." 1>&2
3635         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3636 fi
3637
3638 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3639 echo "configure:3640: checking for AIX" >&5
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #ifdef _AIX
3644   yes
3645 #endif
3646
3647 EOF
3648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3649   egrep "yes" >/dev/null 2>&1; then
3650   rm -rf conftest*
3651   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3652 #define _ALL_SOURCE 1
3653 EOF
3654
3655 else
3656   rm -rf conftest*
3657   echo "$ac_t""no" 1>&6
3658 fi
3659 rm -f conftest*
3660
3661
3662 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3663 echo "configure:3664: checking for POSIXized ISC" >&5
3664 if test -d /etc/conf/kconfig.d &&
3665   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3666 then
3667   echo "$ac_t""yes" 1>&6
3668   ISC=yes # If later tests want to check for ISC.
3669   cat >> confdefs.h <<\EOF
3670 #define _POSIX_SOURCE 1
3671 EOF
3672
3673   if test "$GCC" = yes; then
3674     CC="$CC -posix"
3675   else
3676     CC="$CC -Xp"
3677   fi
3678 else
3679   echo "$ac_t""no" 1>&6
3680   ISC=
3681 fi
3682
3683 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3684 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3685 echo "configure:3686: checking for minix/config.h" >&5
3686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3687   echo $ac_n "(cached) $ac_c" 1>&6
3688 else
3689   cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <minix/config.h>
3693 EOF
3694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3695 { (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3697 if test -z "$ac_err"; then
3698   rm -rf conftest*
3699   eval "ac_cv_header_$ac_safe=yes"
3700 else
3701   echo "$ac_err" >&5
3702   echo "configure: failed program was:" >&5
3703   cat conftest.$ac_ext >&5
3704   rm -rf conftest*
3705   eval "ac_cv_header_$ac_safe=no"
3706 fi
3707 rm -f conftest*
3708 fi
3709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3710   echo "$ac_t""yes" 1>&6
3711   MINIX=yes
3712 else
3713   echo "$ac_t""no" 1>&6
3714 MINIX=
3715 fi
3716
3717 if test "$MINIX" = yes; then
3718   cat >> confdefs.h <<\EOF
3719 #define _POSIX_SOURCE 1
3720 EOF
3721
3722   cat >> confdefs.h <<\EOF
3723 #define _POSIX_1_SOURCE 2
3724 EOF
3725
3726   cat >> confdefs.h <<\EOF
3727 #define _MINIX 1
3728 EOF
3729
3730 fi
3731
3732
3733 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3734 echo "configure:3735: checking for Cygwin environment" >&5
3735 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3736   echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738   cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741
3742 int main() {
3743
3744 #ifndef __CYGWIN__
3745 #define __CYGWIN__ __CYGWIN32__
3746 #endif
3747 return __CYGWIN__;
3748 ; return 0; }
3749 EOF
3750 if { (eval echo configure:3751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3751   rm -rf conftest*
3752   ac_cv_cygwin=yes
3753 else
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ac_cv_cygwin=no
3758 fi
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ac_cv_cygwin" 1>&6
3763 CYGWIN=
3764 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3765 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3766 echo "configure:3767: checking for mingw32 environment" >&5
3767 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773
3774 int main() {
3775 return __MINGW32__;
3776 ; return 0; }
3777 EOF
3778 if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3779   rm -rf conftest*
3780   ac_cv_mingw32=yes
3781 else
3782   echo "configure: failed program was:" >&5
3783   cat conftest.$ac_ext >&5
3784   rm -rf conftest*
3785   ac_cv_mingw32=no
3786 fi
3787 rm -f conftest*
3788 fi
3789
3790 echo "$ac_t""$ac_cv_mingw32" 1>&6
3791 MINGW32=
3792 test "$ac_cv_mingw32" = yes && MINGW32=yes
3793 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3794 echo "configure:3795: checking for EMX OS/2 environment" >&5
3795 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801
3802 int main() {
3803 return __EMX__;
3804 ; return 0; }
3805 EOF
3806 if { (eval echo configure:3807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3807   rm -rf conftest*
3808   ac_cv_emxos2=yes
3809 else
3810   echo "configure: failed program was:" >&5
3811   cat conftest.$ac_ext >&5
3812   rm -rf conftest*
3813   ac_cv_emxos2=no
3814 fi
3815 rm -f conftest*
3816 fi
3817
3818 echo "$ac_t""$ac_cv_emxos2" 1>&6
3819 EMXOS2=
3820 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3821
3822
3823
3824 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3825 echo "configure:3826: checking for executable suffix" >&5
3826 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3827   echo $ac_n "(cached) $ac_c" 1>&6
3828 else
3829   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3830   ac_cv_exeext=.exe
3831 else
3832   rm -f conftest*
3833   echo 'int main () { return 0; }' > conftest.$ac_ext
3834   ac_cv_exeext=
3835   if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3836     for file in conftest.*; do
3837       case $file in
3838       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3839       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3840       esac
3841     done
3842   else
3843     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3844   fi
3845   rm -f conftest*
3846   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3847 fi
3848 fi
3849
3850 EXEEXT=""
3851 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3852 echo "$ac_t""${ac_cv_exeext}" 1>&6
3853 ac_exeext=$EXEEXT
3854
3855 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3856 echo "configure:3857: checking for object suffix" >&5
3857 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3858   echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860   rm -f conftest*
3861 echo 'int i = 1;' > conftest.$ac_ext
3862 if { (eval echo configure:3863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3863   for ac_file in conftest.*; do
3864     case $ac_file in
3865     *.c) ;;
3866     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3867     esac
3868   done
3869 else
3870   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3871 fi
3872 rm -f conftest*
3873 fi
3874
3875 echo "$ac_t""$ac_cv_objext" 1>&6
3876 OBJEXT=$ac_cv_objext
3877 ac_objext=$ac_cv_objext
3878
3879
3880 cat >> confdefs.h <<EOF
3881 #define EXEEXT "${EXEEXT}"
3882 EOF
3883
3884
3885 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3886 echo "configure:3887: checking for be_app in -lbe" >&5
3887 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3889   echo $ac_n "(cached) $ac_c" 1>&6
3890 else
3891   ac_save_LIBS="$LIBS"
3892 LIBS="-lbe -lroot -lnet $LIBS"
3893 cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896 /* Override any gcc2 internal prototype to avoid an error.  */
3897 /* We use char because int might match the return type of a gcc2
3898     builtin and then its argument prototype would still apply.  */
3899 char be_app();
3900
3901 int main() {
3902 be_app()
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3906   rm -rf conftest*
3907   eval "ac_cv_lib_$ac_lib_var=yes"
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   eval "ac_cv_lib_$ac_lib_var=no"
3913 fi
3914 rm -f conftest*
3915 LIBS="$ac_save_LIBS"
3916
3917 fi
3918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3919   echo "$ac_t""yes" 1>&6
3920   LIBS="$LIBS -lbe -lroot -lnet"
3921 else
3922   echo "$ac_t""no" 1>&6
3923 :
3924 fi
3925
3926
3927
3928
3929
3930 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3931 echo "configure:3932: checking for ${CC-cc} option to accept ANSI C" >&5
3932 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3933   echo $ac_n "(cached) $ac_c" 1>&6
3934 else
3935   am_cv_prog_cc_stdc=no
3936 ac_save_CC="$CC"
3937 # Don't try gcc -ansi; that turns off useful extensions and
3938 # breaks some systems' header files.
3939 # AIX                   -qlanglvl=ansi
3940 # Ultrix and OSF/1      -std1
3941 # HP-UX 10.20 and later -Ae
3942 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3943 # SVR4                  -Xc -D__EXTENSIONS__
3944 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3945 do
3946   CC="$ac_save_CC $ac_arg"
3947   cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950 #include <stdarg.h>
3951 #include <stdio.h>
3952 #include <sys/types.h>
3953 #include <sys/stat.h>
3954 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3955 struct buf { int x; };
3956 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3957 static char *e (p, i)
3958      char **p;
3959      int i;
3960 {
3961   return p[i];
3962 }
3963 static char *f (char * (*g) (char **, int), char **p, ...)
3964 {
3965   char *s;
3966   va_list v;
3967   va_start (v,p);
3968   s = g (p, va_arg (v,int));
3969   va_end (v);
3970   return s;
3971 }
3972 int test (int i, double x);
3973 struct s1 {int (*f) (int a);};
3974 struct s2 {int (*f) (double a);};
3975 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3976 int argc;
3977 char **argv;
3978
3979 int main() {
3980
3981 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3982
3983 ; return 0; }
3984 EOF
3985 if { (eval echo configure:3986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3986   rm -rf conftest*
3987   am_cv_prog_cc_stdc="$ac_arg"; break
3988 else
3989   echo "configure: failed program was:" >&5
3990   cat conftest.$ac_ext >&5
3991 fi
3992 rm -f conftest*
3993 done
3994 CC="$ac_save_CC"
3995
3996 fi
3997
3998 if test -z "$am_cv_prog_cc_stdc"; then
3999   echo "$ac_t""none needed" 1>&6
4000 else
4001   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4002 fi
4003 case "x$am_cv_prog_cc_stdc" in
4004   x|xno) ;;
4005   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4006 esac
4007
4008 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4009         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4010 fi
4011
4012 # test for make depend flag
4013 OL_MKDEP=
4014 OL_MKDEP_FLAGS=
4015 if test -z "${MKDEP}"; then
4016         OL_MKDEP="${CC-cc}"
4017         if test -z "${MKDEP_FLAGS}"; then
4018                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4019 echo "configure:4020: checking for ${OL_MKDEP} depend flag" >&5
4020 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4021   echo $ac_n "(cached) $ac_c" 1>&6
4022 else
4023   
4024                         ol_cv_mkdep=no
4025                         for flag in "-M" "-xM"; do
4026                                 cat > conftest.c <<EOF
4027  noCode;
4028 EOF
4029                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4030                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4031                                 then
4032                                         if test ! -f conftest."${ac_object}" ; then
4033                                                 ol_cv_mkdep=$flag
4034                                                 OL_MKDEP_FLAGS="$flag"
4035                                                 break
4036                                         fi
4037                                 fi
4038                         done
4039                         rm -f conftest*
4040                 
4041 fi
4042
4043 echo "$ac_t""$ol_cv_mkdep" 1>&6
4044         else
4045                 cc_cv_mkdep=yes
4046                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4047         fi
4048 else
4049         cc_cv_mkdep=yes
4050         OL_MKDEP="${MKDEP}"
4051         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4052 fi
4053
4054
4055
4056 if test "${ol_cv_mkdep}" = no ; then
4057         # this will soon become an error
4058         echo "configure: warning: do not know how to generate dependencies" 1>&2
4059 fi
4060
4061 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4062 echo "configure:4063: checking for afopen in -ls" >&5
4063 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4065   echo $ac_n "(cached) $ac_c" 1>&6
4066 else
4067   ac_save_LIBS="$LIBS"
4068 LIBS="-ls  $LIBS"
4069 cat > conftest.$ac_ext <<EOF
4070 #line 4071 "configure"
4071 #include "confdefs.h"
4072 /* Override any gcc2 internal prototype to avoid an error.  */
4073 /* We use char because int might match the return type of a gcc2
4074     builtin and then its argument prototype would still apply.  */
4075 char afopen();
4076
4077 int main() {
4078 afopen()
4079 ; return 0; }
4080 EOF
4081 if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4082   rm -rf conftest*
4083   eval "ac_cv_lib_$ac_lib_var=yes"
4084 else
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   eval "ac_cv_lib_$ac_lib_var=no"
4089 fi
4090 rm -f conftest*
4091 LIBS="$ac_save_LIBS"
4092
4093 fi
4094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4095   echo "$ac_t""yes" 1>&6
4096   
4097         AUTH_LIBS=-ls
4098         cat >> confdefs.h <<\EOF
4099 #define HAVE_AIX_SECURITY 1
4100 EOF
4101
4102
4103 else
4104   echo "$ac_t""no" 1>&6
4105 fi
4106
4107
4108
4109 for ac_func in getaddrinfo 
4110 do
4111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4112 echo "configure:4113: checking for $ac_func" >&5
4113 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4114   echo $ac_n "(cached) $ac_c" 1>&6
4115 else
4116   cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 /* System header to define __stub macros and hopefully few prototypes,
4120     which can conflict with char $ac_func(); below.  */
4121 #include <assert.h>
4122 /* Override any gcc2 internal prototype to avoid an error.  */
4123 /* We use char because int might match the return type of a gcc2
4124     builtin and then its argument prototype would still apply.  */
4125 char $ac_func();
4126 char (*f)();
4127
4128 int main() {
4129
4130 /* The GNU C library defines this for functions which it implements
4131     to always fail with ENOSYS.  Some functions are actually named
4132     something starting with __ and the normal name is an alias.  */
4133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4134 choke me
4135 #else
4136 f = $ac_func;
4137 #endif
4138
4139 ; return 0; }
4140 EOF
4141 if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4142   rm -rf conftest*
4143   eval "ac_cv_func_$ac_func=yes"
4144 else
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147   rm -rf conftest*
4148   eval "ac_cv_func_$ac_func=no"
4149 fi
4150 rm -f conftest*
4151 fi
4152
4153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4154   echo "$ac_t""yes" 1>&6
4155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4156   cat >> confdefs.h <<EOF
4157 #define $ac_tr_func 1
4158 EOF
4159  
4160 else
4161   echo "$ac_t""no" 1>&6
4162 fi
4163 done
4164
4165
4166 if test $ac_cv_func_getaddrinfo = no ; then
4167         if test $ol_enable_ipv6 = yes ; then
4168                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4169         fi
4170         ol_enable_ipv6=no
4171 fi
4172
4173 if test $ol_enable_local != no ; then
4174         for ac_hdr in sys/un.h 
4175 do
4176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4178 echo "configure:4179: checking for $ac_hdr" >&5
4179 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 #include <$ac_hdr>
4186 EOF
4187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4188 { (eval echo configure:4189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4190 if test -z "$ac_err"; then
4191   rm -rf conftest*
4192   eval "ac_cv_header_$ac_safe=yes"
4193 else
4194   echo "$ac_err" >&5
4195   echo "configure: failed program was:" >&5
4196   cat conftest.$ac_ext >&5
4197   rm -rf conftest*
4198   eval "ac_cv_header_$ac_safe=no"
4199 fi
4200 rm -f conftest*
4201 fi
4202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4203   echo "$ac_t""yes" 1>&6
4204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4205   cat >> confdefs.h <<EOF
4206 #define $ac_tr_hdr 1
4207 EOF
4208  
4209 else
4210   echo "$ac_t""no" 1>&6
4211 fi
4212 done
4213
4214
4215         if test $ol_enable_local = auto ; then
4216                 ol_enable_local=$ac_cv_header_sys_un_h
4217         elif test $ac_cv_header_sys_un_h = no ; then
4218                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
4219         fi
4220 fi
4221
4222 ol_link_modules=no
4223 if test $ol_enable_modules != no ; then
4224         for ac_hdr in ltdl.h
4225 do
4226 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4227 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4228 echo "configure:4229: checking for $ac_hdr" >&5
4229 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4230   echo $ac_n "(cached) $ac_c" 1>&6
4231 else
4232   cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4235 #include <$ac_hdr>
4236 EOF
4237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4238 { (eval echo configure:4239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4240 if test -z "$ac_err"; then
4241   rm -rf conftest*
4242   eval "ac_cv_header_$ac_safe=yes"
4243 else
4244   echo "$ac_err" >&5
4245   echo "configure: failed program was:" >&5
4246   cat conftest.$ac_ext >&5
4247   rm -rf conftest*
4248   eval "ac_cv_header_$ac_safe=no"
4249 fi
4250 rm -f conftest*
4251 fi
4252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4253   echo "$ac_t""yes" 1>&6
4254     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4255   cat >> confdefs.h <<EOF
4256 #define $ac_tr_hdr 1
4257 EOF
4258  
4259 else
4260   echo "$ac_t""no" 1>&6
4261 fi
4262 done
4263
4264
4265         if test $ac_cv_header_ltdl_h = no ; then
4266                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4267         fi
4268
4269         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4270 echo "configure:4271: checking for lt_dlinit in -lltdl" >&5
4271 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4273   echo $ac_n "(cached) $ac_c" 1>&6
4274 else
4275   ac_save_LIBS="$LIBS"
4276 LIBS="-lltdl  $LIBS"
4277 cat > conftest.$ac_ext <<EOF
4278 #line 4279 "configure"
4279 #include "confdefs.h"
4280 /* Override any gcc2 internal prototype to avoid an error.  */
4281 /* We use char because int might match the return type of a gcc2
4282     builtin and then its argument prototype would still apply.  */
4283 char lt_dlinit();
4284
4285 int main() {
4286 lt_dlinit()
4287 ; return 0; }
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4290   rm -rf conftest*
4291   eval "ac_cv_lib_$ac_lib_var=yes"
4292 else
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_lib_$ac_lib_var=no"
4297 fi
4298 rm -f conftest*
4299 LIBS="$ac_save_LIBS"
4300
4301 fi
4302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4303   echo "$ac_t""yes" 1>&6
4304   
4305             MODULES_LIBS=-lltdl
4306             cat >> confdefs.h <<\EOF
4307 #define HAVE_LIBLTDL 1
4308 EOF
4309
4310         
4311 else
4312   echo "$ac_t""no" 1>&6
4313 fi
4314
4315
4316         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4317                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4318         fi
4319         ol_link_modules=yes
4320 else
4321         ol_with_dnssrv_module=static
4322         ol_with_ldap_module=static
4323         ol_with_ldbm_module=static
4324         ol_with_passwd_module=static
4325         ol_with_perl_module=static
4326         ol_with_shell_module=static
4327         ol_with_tcl_module=static
4328         ol_with_sql_module=static
4329 fi
4330
4331 # test for EBCDIC
4332 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4333 echo "configure:4334: checking for EBCDIC" >&5
4334 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4335   echo $ac_n "(cached) $ac_c" 1>&6
4336 else
4337   
4338         cat > conftest.$ac_ext <<EOF
4339 #line 4340 "configure"
4340 #include "confdefs.h"
4341
4342 #if !('M' == 0xd4)
4343 #include <__ASCII__/generate_error.h>
4344 #endif
4345
4346 EOF
4347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4348 { (eval echo configure:4349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4350 if test -z "$ac_err"; then
4351   rm -rf conftest*
4352   ol_cv_cpp_ebcdic=yes
4353 else
4354   echo "$ac_err" >&5
4355   echo "configure: failed program was:" >&5
4356   cat conftest.$ac_ext >&5
4357   rm -rf conftest*
4358   ol_cv_cpp_ebcdic=no
4359 fi
4360 rm -f conftest*
4361 fi
4362
4363 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4364 if test $ol_cv_cpp_ebcdic = yes ; then
4365         cat >> confdefs.h <<\EOF
4366 #define HAVE_EBCDIC 1
4367 EOF
4368
4369 fi
4370
4371 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4372 echo "configure:4373: checking for ANSI C header files" >&5
4373 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4374   echo $ac_n "(cached) $ac_c" 1>&6
4375 else
4376   cat > conftest.$ac_ext <<EOF
4377 #line 4378 "configure"
4378 #include "confdefs.h"
4379 #include <stdlib.h>
4380 #include <stdarg.h>
4381 #include <string.h>
4382 #include <float.h>
4383 EOF
4384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4385 { (eval echo configure:4386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4387 if test -z "$ac_err"; then
4388   rm -rf conftest*
4389   ol_cv_header_stdc=yes
4390 else
4391   echo "$ac_err" >&5
4392   echo "configure: failed program was:" >&5
4393   cat conftest.$ac_ext >&5
4394   rm -rf conftest*
4395   ol_cv_header_stdc=no
4396 fi
4397 rm -f conftest*
4398
4399 if test $ol_cv_header_stdc = yes; then
4400   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 #include <string.h>
4405 EOF
4406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4407   egrep "memchr" >/dev/null 2>&1; then
4408   :
4409 else
4410   rm -rf conftest*
4411   ol_cv_header_stdc=no
4412 fi
4413 rm -f conftest*
4414
4415 fi
4416
4417 if test $ol_cv_header_stdc = yes; then
4418   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4419 cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422 #include <stdlib.h>
4423 EOF
4424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4425   egrep "free" >/dev/null 2>&1; then
4426   :
4427 else
4428   rm -rf conftest*
4429   ol_cv_header_stdc=no
4430 fi
4431 rm -f conftest*
4432
4433 fi
4434
4435 if test $ol_cv_header_stdc = yes; then
4436   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4437 if test "$cross_compiling" = yes; then
4438   :
4439 else
4440   cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443 #include <ctype.h>
4444 #ifndef HAVE_EBCDIC
4445 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4446 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4447 #else
4448 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4449                 || ('j' <= (c) && (c) <= 'r') \
4450                 || ('s' <= (c) && (c) <= 'z'))
4451 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4452 #endif
4453 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4454 int main () { int i; for (i = 0; i < 256; i++)
4455 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4456 exit (0); }
4457
4458 EOF
4459 if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4460 then
4461   :
4462 else
4463   echo "configure: failed program was:" >&5
4464   cat conftest.$ac_ext >&5
4465   rm -fr conftest*
4466   ol_cv_header_stdc=no
4467 fi
4468 rm -fr conftest*
4469 fi
4470
4471 fi
4472 fi
4473
4474 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4475 if test $ol_cv_header_stdc = yes; then
4476   cat >> confdefs.h <<\EOF
4477 #define STDC_HEADERS 1
4478 EOF
4479
4480 fi
4481 ac_cv_header_stdc=disable
4482
4483
4484 if test $ol_cv_header_stdc != yes; then
4485         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4486 fi
4487
4488 ac_header_dirent=no
4489 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4490 do
4491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4492 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4493 echo "configure:4494: checking for $ac_hdr that defines DIR" >&5
4494 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4495   echo $ac_n "(cached) $ac_c" 1>&6
4496 else
4497   cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 #include <sys/types.h>
4501 #include <$ac_hdr>
4502 int main() {
4503 DIR *dirp = 0;
4504 ; return 0; }
4505 EOF
4506 if { (eval echo configure:4507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4507   rm -rf conftest*
4508   eval "ac_cv_header_dirent_$ac_safe=yes"
4509 else
4510   echo "configure: failed program was:" >&5
4511   cat conftest.$ac_ext >&5
4512   rm -rf conftest*
4513   eval "ac_cv_header_dirent_$ac_safe=no"
4514 fi
4515 rm -f conftest*
4516 fi
4517 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4518   echo "$ac_t""yes" 1>&6
4519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4520   cat >> confdefs.h <<EOF
4521 #define $ac_tr_hdr 1
4522 EOF
4523  ac_header_dirent=$ac_hdr; break
4524 else
4525   echo "$ac_t""no" 1>&6
4526 fi
4527 done
4528 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4529 if test $ac_header_dirent = dirent.h; then
4530 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4531 echo "configure:4532: checking for opendir in -ldir" >&5
4532 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4533 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4534   echo $ac_n "(cached) $ac_c" 1>&6
4535 else
4536   ac_save_LIBS="$LIBS"
4537 LIBS="-ldir  $LIBS"
4538 cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 /* Override any gcc2 internal prototype to avoid an error.  */
4542 /* We use char because int might match the return type of a gcc2
4543     builtin and then its argument prototype would still apply.  */
4544 char opendir();
4545
4546 int main() {
4547 opendir()
4548 ; return 0; }
4549 EOF
4550 if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4551   rm -rf conftest*
4552   eval "ac_cv_lib_$ac_lib_var=yes"
4553 else
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   eval "ac_cv_lib_$ac_lib_var=no"
4558 fi
4559 rm -f conftest*
4560 LIBS="$ac_save_LIBS"
4561
4562 fi
4563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4564   echo "$ac_t""yes" 1>&6
4565   LIBS="$LIBS -ldir"
4566 else
4567   echo "$ac_t""no" 1>&6
4568 fi
4569
4570 else
4571 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4572 echo "configure:4573: checking for opendir in -lx" >&5
4573 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4574 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4575   echo $ac_n "(cached) $ac_c" 1>&6
4576 else
4577   ac_save_LIBS="$LIBS"
4578 LIBS="-lx  $LIBS"
4579 cat > conftest.$ac_ext <<EOF
4580 #line 4581 "configure"
4581 #include "confdefs.h"
4582 /* Override any gcc2 internal prototype to avoid an error.  */
4583 /* We use char because int might match the return type of a gcc2
4584     builtin and then its argument prototype would still apply.  */
4585 char opendir();
4586
4587 int main() {
4588 opendir()
4589 ; return 0; }
4590 EOF
4591 if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4592   rm -rf conftest*
4593   eval "ac_cv_lib_$ac_lib_var=yes"
4594 else
4595   echo "configure: failed program was:" >&5
4596   cat conftest.$ac_ext >&5
4597   rm -rf conftest*
4598   eval "ac_cv_lib_$ac_lib_var=no"
4599 fi
4600 rm -f conftest*
4601 LIBS="$ac_save_LIBS"
4602
4603 fi
4604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4605   echo "$ac_t""yes" 1>&6
4606   LIBS="$LIBS -lx"
4607 else
4608   echo "$ac_t""no" 1>&6
4609 fi
4610
4611 fi
4612
4613 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4614 echo "configure:4615: checking for sys/wait.h that is POSIX.1 compatible" >&5
4615 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4616   echo $ac_n "(cached) $ac_c" 1>&6
4617 else
4618   cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 #include <sys/types.h>
4622 #include <sys/wait.h>
4623 #ifndef WEXITSTATUS
4624 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4625 #endif
4626 #ifndef WIFEXITED
4627 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4628 #endif
4629 int main() {
4630 int s;
4631 wait (&s);
4632 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4633 ; return 0; }
4634 EOF
4635 if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4636   rm -rf conftest*
4637   ac_cv_header_sys_wait_h=yes
4638 else
4639   echo "configure: failed program was:" >&5
4640   cat conftest.$ac_ext >&5
4641   rm -rf conftest*
4642   ac_cv_header_sys_wait_h=no
4643 fi
4644 rm -f conftest*
4645 fi
4646
4647 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4648 if test $ac_cv_header_sys_wait_h = yes; then
4649   cat >> confdefs.h <<\EOF
4650 #define HAVE_SYS_WAIT_H 1
4651 EOF
4652
4653 fi
4654
4655 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4656 echo "configure:4657: checking POSIX termios" >&5
4657 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4658   echo $ac_n "(cached) $ac_c" 1>&6
4659 else
4660   cat > conftest.$ac_ext <<EOF
4661 #line 4662 "configure"
4662 #include "confdefs.h"
4663 #include <sys/types.h>
4664 #include <unistd.h>
4665 #include <termios.h>
4666 int main() {
4667 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4668    tcgetattr(0, 0);
4669 ; return 0; }
4670 EOF
4671 if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4672   rm -rf conftest*
4673   am_cv_sys_posix_termios=yes
4674 else
4675   echo "configure: failed program was:" >&5
4676   cat conftest.$ac_ext >&5
4677   rm -rf conftest*
4678   am_cv_sys_posix_termios=no
4679 fi
4680 rm -f conftest*
4681 fi
4682
4683 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4684
4685
4686  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4687 echo "configure:4688: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4688 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4692
4693   gwinsz_in_termios_h=no
4694   if test $am_cv_sys_posix_termios = yes; then
4695     cat > conftest.$ac_ext <<EOF
4696 #line 4697 "configure"
4697 #include "confdefs.h"
4698 #include <sys/types.h>
4699 #     include <termios.h>
4700 #     ifdef TIOCGWINSZ
4701         yes
4702 #     endif
4703     
4704 EOF
4705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4706   egrep "yes" >/dev/null 2>&1; then
4707   rm -rf conftest*
4708   gwinsz_in_termios_h=yes
4709 fi
4710 rm -f conftest*
4711
4712   fi
4713
4714   if test $gwinsz_in_termios_h = no; then
4715     cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 #include <sys/types.h>
4719 #     include <sys/ioctl.h>
4720 #     ifdef TIOCGWINSZ
4721         yes
4722 #     endif
4723     
4724 EOF
4725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4726   egrep "yes" >/dev/null 2>&1; then
4727   rm -rf conftest*
4728   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4729 fi
4730 rm -f conftest*
4731
4732   fi
4733   
4734 fi
4735
4736 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4737   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4738     cat >> confdefs.h <<\EOF
4739 #define GWINSZ_IN_SYS_IOCTL 1
4740 EOF
4741
4742   fi
4743
4744 if test $am_cv_sys_posix_termios = yes ; then
4745         cat >> confdefs.h <<\EOF
4746 #define HAVE_POSIX_TERMIOS 1
4747 EOF
4748
4749 fi
4750
4751 for ac_hdr in \
4752         arpa/inet.h             \
4753         arpa/nameser.h  \
4754         assert.h                \
4755         conio.h                 \
4756         crypt.h                 \
4757         direct.h                \
4758         errno.h                 \
4759         fcntl.h                 \
4760         filio.h                 \
4761         getopt.h                \
4762         grp.h                   \
4763         io.h                    \
4764         libutil.h               \
4765         limits.h                \
4766         locale.h                \
4767         netinet/tcp.h   \
4768         malloc.h                \
4769         memory.h                \
4770         psap.h                  \
4771         pwd.h                   \
4772         process.h               \
4773         resolv.h                \
4774         sgtty.h                 \
4775         shadow.h                \
4776         stddef.h                \
4777         string.h                \
4778         strings.h               \
4779         sysexits.h              \
4780         sys/file.h              \
4781         sys/filio.h             \
4782         sys/errno.h             \
4783         sys/ioctl.h             \
4784         sys/param.h             \
4785         sys/resource.h  \
4786         sys/select.h    \
4787         sys/socket.h    \
4788         sys/syslog.h    \
4789         sys/time.h              \
4790         sys/types.h             \
4791         syslog.h                \
4792         termios.h               \
4793         unistd.h                \
4794         winsock.h               \
4795
4796 do
4797 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4798 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4799 echo "configure:4800: checking for $ac_hdr" >&5
4800 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   cat > conftest.$ac_ext <<EOF
4804 #line 4805 "configure"
4805 #include "confdefs.h"
4806 #include <$ac_hdr>
4807 EOF
4808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4809 { (eval echo configure:4810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4811 if test -z "$ac_err"; then
4812   rm -rf conftest*
4813   eval "ac_cv_header_$ac_safe=yes"
4814 else
4815   echo "$ac_err" >&5
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818   rm -rf conftest*
4819   eval "ac_cv_header_$ac_safe=no"
4820 fi
4821 rm -f conftest*
4822 fi
4823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4824   echo "$ac_t""yes" 1>&6
4825     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4826   cat >> confdefs.h <<EOF
4827 #define $ac_tr_hdr 1
4828 EOF
4829  
4830 else
4831   echo "$ac_t""no" 1>&6
4832 fi
4833 done
4834
4835
4836
4837
4838 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4839 echo "configure:4840: checking for sigset in -lV3" >&5
4840 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4841 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4842   echo $ac_n "(cached) $ac_c" 1>&6
4843 else
4844   ac_save_LIBS="$LIBS"
4845 LIBS="-lV3  $LIBS"
4846 cat > conftest.$ac_ext <<EOF
4847 #line 4848 "configure"
4848 #include "confdefs.h"
4849 /* Override any gcc2 internal prototype to avoid an error.  */
4850 /* We use char because int might match the return type of a gcc2
4851     builtin and then its argument prototype would still apply.  */
4852 char sigset();
4853
4854 int main() {
4855 sigset()
4856 ; return 0; }
4857 EOF
4858 if { (eval echo configure:4859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4859   rm -rf conftest*
4860   eval "ac_cv_lib_$ac_lib_var=yes"
4861 else
4862   echo "configure: failed program was:" >&5
4863   cat conftest.$ac_ext >&5
4864   rm -rf conftest*
4865   eval "ac_cv_lib_$ac_lib_var=no"
4866 fi
4867 rm -f conftest*
4868 LIBS="$ac_save_LIBS"
4869
4870 fi
4871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4872   echo "$ac_t""yes" 1>&6
4873     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4874     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4875   cat >> confdefs.h <<EOF
4876 #define $ac_tr_lib 1
4877 EOF
4878
4879   LIBS="-lV3 $LIBS"
4880
4881 else
4882   echo "$ac_t""no" 1>&6
4883 fi
4884
4885
4886 if test $ac_cv_header_winsock_h = yes; then
4887         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4888 echo "configure:4889: checking for winsock" >&5
4889 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4890   echo $ac_n "(cached) $ac_c" 1>&6
4891 else
4892   cat > conftest.$ac_ext <<EOF
4893 #line 4894 "configure"
4894 #include "confdefs.h"
4895 #include <winsock.h>
4896 int main() {
4897
4898                         socket(0,0,0);
4899                         select(0,NULL,NULL,NULL,NULL);
4900                         closesocket(0);
4901                         gethostname(NULL,0);
4902         
4903 ; return 0; }
4904 EOF
4905 if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4906   rm -rf conftest*
4907   ol_cv_winsock=yes
4908 else
4909   echo "configure: failed program was:" >&5
4910   cat conftest.$ac_ext >&5
4911   rm -rf conftest*
4912   ol_cv_winsock=no
4913 fi
4914 rm -f conftest*]
4915 fi
4916
4917 echo "$ac_t""$ol_cv_winsock" 1>&6
4918
4919         if test $ol_cv_winsock = yes ; then
4920                 cat >> confdefs.h <<\EOF
4921 #define HAVE_WINSOCK 1
4922 EOF
4923
4924                 ac_cv_func_socket=yes
4925                 ac_cv_func_select=yes
4926                 ac_cv_func_closesocket=yes
4927                 ac_cv_func_gethostname=yes
4928         fi
4929 fi
4930
4931
4932 echo $ac_n "checking for socket""... $ac_c" 1>&6
4933 echo "configure:4934: checking for socket" >&5
4934 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4935   echo $ac_n "(cached) $ac_c" 1>&6
4936 else
4937   cat > conftest.$ac_ext <<EOF
4938 #line 4939 "configure"
4939 #include "confdefs.h"
4940 /* System header to define __stub macros and hopefully few prototypes,
4941     which can conflict with char socket(); below.  */
4942 #include <assert.h>
4943 /* Override any gcc2 internal prototype to avoid an error.  */
4944 /* We use char because int might match the return type of a gcc2
4945     builtin and then its argument prototype would still apply.  */
4946 char socket();
4947 char (*f)();
4948
4949 int main() {
4950
4951 /* The GNU C library defines this for functions which it implements
4952     to always fail with ENOSYS.  Some functions are actually named
4953     something starting with __ and the normal name is an alias.  */
4954 #if defined (__stub_socket) || defined (__stub___socket)
4955 choke me
4956 #else
4957 f = socket;
4958 #endif
4959
4960 ; return 0; }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4963   rm -rf conftest*
4964   eval "ac_cv_func_socket=yes"
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -rf conftest*
4969   eval "ac_cv_func_socket=no"
4970 fi
4971 rm -f conftest*
4972 fi
4973
4974 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4975   echo "$ac_t""yes" 1>&6
4976   :
4977 else
4978   echo "$ac_t""no" 1>&6
4979         
4980         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4981 echo "configure:4982: checking for main in -lsocket" >&5
4982 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4984   echo $ac_n "(cached) $ac_c" 1>&6
4985 else
4986   ac_save_LIBS="$LIBS"
4987 LIBS="-lsocket  $LIBS"
4988 cat > conftest.$ac_ext <<EOF
4989 #line 4990 "configure"
4990 #include "confdefs.h"
4991
4992 int main() {
4993 main()
4994 ; return 0; }
4995 EOF
4996 if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4997   rm -rf conftest*
4998   eval "ac_cv_lib_$ac_lib_var=yes"
4999 else
5000   echo "configure: failed program was:" >&5
5001   cat conftest.$ac_ext >&5
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=no"
5004 fi
5005 rm -f conftest*
5006 LIBS="$ac_save_LIBS"
5007
5008 fi
5009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5010   echo "$ac_t""yes" 1>&6
5011     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5012     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5013   cat >> confdefs.h <<EOF
5014 #define $ac_tr_lib 1
5015 EOF
5016
5017   LIBS="-lsocket $LIBS"
5018
5019 else
5020   echo "$ac_t""no" 1>&6
5021 fi
5022
5023         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5024 echo "configure:5025: checking for main in -lnet" >&5
5025 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5027   echo $ac_n "(cached) $ac_c" 1>&6
5028 else
5029   ac_save_LIBS="$LIBS"
5030 LIBS="-lnet  $LIBS"
5031 cat > conftest.$ac_ext <<EOF
5032 #line 5033 "configure"
5033 #include "confdefs.h"
5034
5035 int main() {
5036 main()
5037 ; return 0; }
5038 EOF
5039 if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5040   rm -rf conftest*
5041   eval "ac_cv_lib_$ac_lib_var=yes"
5042 else
5043   echo "configure: failed program was:" >&5
5044   cat conftest.$ac_ext >&5
5045   rm -rf conftest*
5046   eval "ac_cv_lib_$ac_lib_var=no"
5047 fi
5048 rm -f conftest*
5049 LIBS="$ac_save_LIBS"
5050
5051 fi
5052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5053   echo "$ac_t""yes" 1>&6
5054     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5055     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5056   cat >> confdefs.h <<EOF
5057 #define $ac_tr_lib 1
5058 EOF
5059
5060   LIBS="-lnet $LIBS"
5061
5062 else
5063   echo "$ac_t""no" 1>&6
5064 fi
5065
5066         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5067 echo "configure:5068: checking for main in -lnsl_s" >&5
5068 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5069 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072   ac_save_LIBS="$LIBS"
5073 LIBS="-lnsl_s  $LIBS"
5074 cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077
5078 int main() {
5079 main()
5080 ; return 0; }
5081 EOF
5082 if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5083   rm -rf conftest*
5084   eval "ac_cv_lib_$ac_lib_var=yes"
5085 else
5086   echo "configure: failed program was:" >&5
5087   cat conftest.$ac_ext >&5
5088   rm -rf conftest*
5089   eval "ac_cv_lib_$ac_lib_var=no"
5090 fi
5091 rm -f conftest*
5092 LIBS="$ac_save_LIBS"
5093
5094 fi
5095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5096   echo "$ac_t""yes" 1>&6
5097     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5098     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5099   cat >> confdefs.h <<EOF
5100 #define $ac_tr_lib 1
5101 EOF
5102
5103   LIBS="-lnsl_s $LIBS"
5104
5105 else
5106   echo "$ac_t""no" 1>&6
5107 fi
5108
5109         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5110 echo "configure:5111: checking for main in -lnsl" >&5
5111 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5113   echo $ac_n "(cached) $ac_c" 1>&6
5114 else
5115   ac_save_LIBS="$LIBS"
5116 LIBS="-lnsl  $LIBS"
5117 cat > conftest.$ac_ext <<EOF
5118 #line 5119 "configure"
5119 #include "confdefs.h"
5120
5121 int main() {
5122 main()
5123 ; return 0; }
5124 EOF
5125 if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5126   rm -rf conftest*
5127   eval "ac_cv_lib_$ac_lib_var=yes"
5128 else
5129   echo "configure: failed program was:" >&5
5130   cat conftest.$ac_ext >&5
5131   rm -rf conftest*
5132   eval "ac_cv_lib_$ac_lib_var=no"
5133 fi
5134 rm -f conftest*
5135 LIBS="$ac_save_LIBS"
5136
5137 fi
5138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5139   echo "$ac_t""yes" 1>&6
5140     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5141     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5142   cat >> confdefs.h <<EOF
5143 #define $ac_tr_lib 1
5144 EOF
5145
5146   LIBS="-lnsl $LIBS"
5147
5148 else
5149   echo "$ac_t""no" 1>&6
5150 fi
5151
5152         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5153 echo "configure:5154: checking for socket in -linet" >&5
5154 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   ac_save_LIBS="$LIBS"
5159 LIBS="-linet  $LIBS"
5160 cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 /* Override any gcc2 internal prototype to avoid an error.  */
5164 /* We use char because int might match the return type of a gcc2
5165     builtin and then its argument prototype would still apply.  */
5166 char socket();
5167
5168 int main() {
5169 socket()
5170 ; return 0; }
5171 EOF
5172 if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5173   rm -rf conftest*
5174   eval "ac_cv_lib_$ac_lib_var=yes"
5175 else
5176   echo "configure: failed program was:" >&5
5177   cat conftest.$ac_ext >&5
5178   rm -rf conftest*
5179   eval "ac_cv_lib_$ac_lib_var=no"
5180 fi
5181 rm -f conftest*
5182 LIBS="$ac_save_LIBS"
5183
5184 fi
5185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5186   echo "$ac_t""yes" 1>&6
5187     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5188     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5189   cat >> confdefs.h <<EOF
5190 #define $ac_tr_lib 1
5191 EOF
5192
5193   LIBS="-linet $LIBS"
5194
5195 else
5196   echo "$ac_t""no" 1>&6
5197 fi
5198
5199         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5200 echo "configure:5201: checking for main in -lgen" >&5
5201 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5203   echo $ac_n "(cached) $ac_c" 1>&6
5204 else
5205   ac_save_LIBS="$LIBS"
5206 LIBS="-lgen  $LIBS"
5207 cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210
5211 int main() {
5212 main()
5213 ; return 0; }
5214 EOF
5215 if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5216   rm -rf conftest*
5217   eval "ac_cv_lib_$ac_lib_var=yes"
5218 else
5219   echo "configure: failed program was:" >&5
5220   cat conftest.$ac_ext >&5
5221   rm -rf conftest*
5222   eval "ac_cv_lib_$ac_lib_var=no"
5223 fi
5224 rm -f conftest*
5225 LIBS="$ac_save_LIBS"
5226
5227 fi
5228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5229   echo "$ac_t""yes" 1>&6
5230     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5231     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5232   cat >> confdefs.h <<EOF
5233 #define $ac_tr_lib 1
5234 EOF
5235
5236   LIBS="-lgen $LIBS"
5237
5238 else
5239   echo "$ac_t""no" 1>&6
5240 fi
5241
5242
5243 fi
5244
5245
5246 echo $ac_n "checking for select""... $ac_c" 1>&6
5247 echo "configure:5248: checking for select" >&5
5248 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5249   echo $ac_n "(cached) $ac_c" 1>&6
5250 else
5251   cat > conftest.$ac_ext <<EOF
5252 #line 5253 "configure"
5253 #include "confdefs.h"
5254 /* System header to define __stub macros and hopefully few prototypes,
5255     which can conflict with char select(); below.  */
5256 #include <assert.h>
5257 /* Override any gcc2 internal prototype to avoid an error.  */
5258 /* We use char because int might match the return type of a gcc2
5259     builtin and then its argument prototype would still apply.  */
5260 char select();
5261 char (*f)();
5262
5263 int main() {
5264
5265 /* The GNU C library defines this for functions which it implements
5266     to always fail with ENOSYS.  Some functions are actually named
5267     something starting with __ and the normal name is an alias.  */
5268 #if defined (__stub_select) || defined (__stub___select)
5269 choke me
5270 #else
5271 f = select;
5272 #endif
5273
5274 ; return 0; }
5275 EOF
5276 if { (eval echo configure:5277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5277   rm -rf conftest*
5278   eval "ac_cv_func_select=yes"
5279 else
5280   echo "configure: failed program was:" >&5
5281   cat conftest.$ac_ext >&5
5282   rm -rf conftest*
5283   eval "ac_cv_func_select=no"
5284 fi
5285 rm -f conftest*
5286 fi
5287
5288 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5289   echo "$ac_t""yes" 1>&6
5290   :
5291 else
5292   echo "$ac_t""no" 1>&6
5293 { echo "configure: error: select() required." 1>&2; exit 1; }
5294 fi
5295
5296
5297 if test "${ac_cv_header_winsock_h}" != yes; then
5298                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5299 echo "configure:5300: checking types of arguments for select()" >&5
5300  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5301   echo $ac_n "(cached) $ac_c" 1>&6
5302 else
5303    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5304   echo $ac_n "(cached) $ac_c" 1>&6
5305 else
5306     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5307   echo $ac_n "(cached) $ac_c" 1>&6
5308 else
5309      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5310      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5311       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5312        cat > conftest.$ac_ext <<EOF
5313 #line 5314 "configure"
5314 #include "confdefs.h"
5315 #ifdef HAVE_SYS_TYPES_H
5316 #include <sys/types.h>
5317 #endif
5318 #ifdef HAVE_SYS_TIME_H
5319 #include <sys/time.h>
5320 #endif
5321 #ifdef HAVE_SYS_SELECT_H
5322 #include <sys/select.h>
5323 #endif
5324 #ifdef HAVE_SYS_SOCKET_H
5325 #include <sys/socket.h>
5326 #endif
5327 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);
5328 int main() {
5329
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5333   rm -rf conftest*
5334           ac_not_found=no ; break 3
5335 else
5336   echo "configure: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338   rm -rf conftest*
5339   ac_not_found=yes
5340 fi
5341 rm -f conftest*
5342       done
5343      done
5344     done
5345    
5346 fi
5347   
5348 fi
5349  
5350 fi
5351  if test "$ac_not_found" = yes; then
5352   ac_cv_func_select_arg1=int 
5353   ac_cv_func_select_arg234='int *' 
5354   ac_cv_func_select_arg5='struct timeval *'
5355  fi
5356  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5357  cat >> confdefs.h <<EOF
5358 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5359 EOF
5360
5361  cat >> confdefs.h <<EOF
5362 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5363 EOF
5364
5365  cat >> confdefs.h <<EOF
5366 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5367 EOF
5368
5369
5370 fi
5371
5372
5373 for ac_hdr in regex.h 
5374 do
5375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5377 echo "configure:5378: checking for $ac_hdr" >&5
5378 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5379   echo $ac_n "(cached) $ac_c" 1>&6
5380 else
5381   cat > conftest.$ac_ext <<EOF
5382 #line 5383 "configure"
5383 #include "confdefs.h"
5384 #include <$ac_hdr>
5385 EOF
5386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5387 { (eval echo configure:5388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5389 if test -z "$ac_err"; then
5390   rm -rf conftest*
5391   eval "ac_cv_header_$ac_safe=yes"
5392 else
5393   echo "$ac_err" >&5
5394   echo "configure: failed program was:" >&5
5395   cat conftest.$ac_ext >&5
5396   rm -rf conftest*
5397   eval "ac_cv_header_$ac_safe=no"
5398 fi
5399 rm -f conftest*
5400 fi
5401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5402   echo "$ac_t""yes" 1>&6
5403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5404   cat >> confdefs.h <<EOF
5405 #define $ac_tr_hdr 1
5406 EOF
5407  
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411 done
5412
5413 if test "$ac_cv_header_regex_h" != yes ; then
5414         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5415 fi
5416 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5417 echo "configure:5418: checking for regfree" >&5
5418 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5419   echo $ac_n "(cached) $ac_c" 1>&6
5420 else
5421   cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 /* System header to define __stub macros and hopefully few prototypes,
5425     which can conflict with char regfree(); below.  */
5426 #include <assert.h>
5427 /* Override any gcc2 internal prototype to avoid an error.  */
5428 /* We use char because int might match the return type of a gcc2
5429     builtin and then its argument prototype would still apply.  */
5430 char regfree();
5431 char (*f)();
5432
5433 int main() {
5434
5435 /* The GNU C library defines this for functions which it implements
5436     to always fail with ENOSYS.  Some functions are actually named
5437     something starting with __ and the normal name is an alias.  */
5438 #if defined (__stub_regfree) || defined (__stub___regfree)
5439 choke me
5440 #else
5441 f = regfree;
5442 #endif
5443
5444 ; return 0; }
5445 EOF
5446 if { (eval echo configure:5447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5447   rm -rf conftest*
5448   eval "ac_cv_func_regfree=yes"
5449 else
5450   echo "configure: failed program was:" >&5
5451   cat conftest.$ac_ext >&5
5452   rm -rf conftest*
5453   eval "ac_cv_func_regfree=no"
5454 fi
5455 rm -f conftest*
5456 fi
5457
5458 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5459   echo "$ac_t""yes" 1>&6
5460   :
5461 else
5462   echo "$ac_t""no" 1>&6
5463 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5464 fi
5465
5466
5467
5468 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5469 echo "configure:5470: checking for compatible POSIX regex" >&5
5470 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5471   echo $ac_n "(cached) $ac_c" 1>&6
5472 else
5473   
5474         if test "$cross_compiling" = yes; then
5475   ol_cv_c_posix_regex=cross
5476 else
5477   cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5480
5481 #include <sys/types.h>
5482 #include <regex.h>
5483 static char *pattern, *string;
5484 main()
5485 {
5486         int rc;
5487         regex_t re;
5488
5489         pattern = "^A";
5490
5491         if(regcomp(&re, pattern, 0)) {
5492                 return -1;
5493         }
5494         
5495         string = "ALL MATCH";
5496         
5497         rc = regexec(&re, string, 0, (void*)0, 0);
5498
5499         regfree(&re);
5500
5501         return rc;
5502 }
5503 EOF
5504 if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5505 then
5506   ol_cv_c_posix_regex=yes
5507 else
5508   echo "configure: failed program was:" >&5
5509   cat conftest.$ac_ext >&5
5510   rm -fr conftest*
5511   ol_cv_c_posix_regex=no
5512 fi
5513 rm -fr conftest*
5514 fi
5515
5516 fi
5517
5518 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5519
5520 if test "$ol_cv_c_posix_regex" = no ; then
5521         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5522 fi
5523
5524 ol_link_dnssrv=no
5525 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5526 echo "configure:5527: checking for res_query" >&5
5527 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5528   echo $ac_n "(cached) $ac_c" 1>&6
5529 else
5530   cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 /* System header to define __stub macros and hopefully few prototypes,
5534     which can conflict with char res_query(); below.  */
5535 #include <assert.h>
5536 /* Override any gcc2 internal prototype to avoid an error.  */
5537 /* We use char because int might match the return type of a gcc2
5538     builtin and then its argument prototype would still apply.  */
5539 char res_query();
5540 char (*f)();
5541
5542 int main() {
5543
5544 /* The GNU C library defines this for functions which it implements
5545     to always fail with ENOSYS.  Some functions are actually named
5546     something starting with __ and the normal name is an alias.  */
5547 #if defined (__stub_res_query) || defined (__stub___res_query)
5548 choke me
5549 #else
5550 f = res_query;
5551 #endif
5552
5553 ; return 0; }
5554 EOF
5555 if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5556   rm -rf conftest*
5557   eval "ac_cv_func_res_query=yes"
5558 else
5559   echo "configure: failed program was:" >&5
5560   cat conftest.$ac_ext >&5
5561   rm -rf conftest*
5562   eval "ac_cv_func_res_query=no"
5563 fi
5564 rm -f conftest*
5565 fi
5566
5567 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5568   echo "$ac_t""yes" 1>&6
5569   :
5570 else
5571   echo "$ac_t""no" 1>&6
5572 fi
5573
5574 if test $ac_cv_func_res_query = no ; then 
5575         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5576 echo "configure:5577: checking for res_query in -lbind" >&5
5577 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5579   echo $ac_n "(cached) $ac_c" 1>&6
5580 else
5581   ac_save_LIBS="$LIBS"
5582 LIBS="-lbind  $LIBS"
5583 cat > conftest.$ac_ext <<EOF
5584 #line 5585 "configure"
5585 #include "confdefs.h"
5586 /* Override any gcc2 internal prototype to avoid an error.  */
5587 /* We use char because int might match the return type of a gcc2
5588     builtin and then its argument prototype would still apply.  */
5589 char res_query();
5590
5591 int main() {
5592 res_query()
5593 ; return 0; }
5594 EOF
5595 if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5596   rm -rf conftest*
5597   eval "ac_cv_lib_$ac_lib_var=yes"
5598 else
5599   echo "configure: failed program was:" >&5
5600   cat conftest.$ac_ext >&5
5601   rm -rf conftest*
5602   eval "ac_cv_lib_$ac_lib_var=no"
5603 fi
5604 rm -f conftest*
5605 LIBS="$ac_save_LIBS"
5606
5607 fi
5608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5609   echo "$ac_t""yes" 1>&6
5610     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5611     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5612   cat >> confdefs.h <<EOF
5613 #define $ac_tr_lib 1
5614 EOF
5615
5616   LIBS="-lbind $LIBS"
5617
5618 else
5619   echo "$ac_t""no" 1>&6
5620 fi
5621
5622         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5623 fi
5624
5625 if test $ac_cv_func_res_query = no ; then 
5626         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5627 echo "configure:5628: checking for __res_query in -lbind" >&5
5628 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5630   echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632   ac_save_LIBS="$LIBS"
5633 LIBS="-lbind  $LIBS"
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 /* Override any gcc2 internal prototype to avoid an error.  */
5638 /* We use char because int might match the return type of a gcc2
5639     builtin and then its argument prototype would still apply.  */
5640 char __res_query();
5641
5642 int main() {
5643 __res_query()
5644 ; return 0; }
5645 EOF
5646 if { (eval echo configure:5647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5647   rm -rf conftest*
5648   eval "ac_cv_lib_$ac_lib_var=yes"
5649 else
5650   echo "configure: failed program was:" >&5
5651   cat conftest.$ac_ext >&5
5652   rm -rf conftest*
5653   eval "ac_cv_lib_$ac_lib_var=no"
5654 fi
5655 rm -f conftest*
5656 LIBS="$ac_save_LIBS"
5657
5658 fi
5659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5660   echo "$ac_t""yes" 1>&6
5661     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5662     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5663   cat >> confdefs.h <<EOF
5664 #define $ac_tr_lib 1
5665 EOF
5666
5667   LIBS="-lbind $LIBS"
5668
5669 else
5670   echo "$ac_t""no" 1>&6
5671 fi
5672
5673         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5674 fi
5675
5676 if test $ac_cv_func_res_query = no ; then 
5677         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5678 echo "configure:5679: checking for res_query in -lresolv" >&5
5679 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5681   echo $ac_n "(cached) $ac_c" 1>&6
5682 else
5683   ac_save_LIBS="$LIBS"
5684 LIBS="-lresolv  $LIBS"
5685 cat > conftest.$ac_ext <<EOF
5686 #line 5687 "configure"
5687 #include "confdefs.h"
5688 /* Override any gcc2 internal prototype to avoid an error.  */
5689 /* We use char because int might match the return type of a gcc2
5690     builtin and then its argument prototype would still apply.  */
5691 char res_query();
5692
5693 int main() {
5694 res_query()
5695 ; return 0; }
5696 EOF
5697 if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5698   rm -rf conftest*
5699   eval "ac_cv_lib_$ac_lib_var=yes"
5700 else
5701   echo "configure: failed program was:" >&5
5702   cat conftest.$ac_ext >&5
5703   rm -rf conftest*
5704   eval "ac_cv_lib_$ac_lib_var=no"
5705 fi
5706 rm -f conftest*
5707 LIBS="$ac_save_LIBS"
5708
5709 fi
5710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5711   echo "$ac_t""yes" 1>&6
5712     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5713     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5714   cat >> confdefs.h <<EOF
5715 #define $ac_tr_lib 1
5716 EOF
5717
5718   LIBS="-lresolv $LIBS"
5719
5720 else
5721   echo "$ac_t""no" 1>&6
5722 fi
5723
5724         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5725 fi
5726
5727 if test "$ac_cv_func_res_query" = yes ; then
5728         cat >> confdefs.h <<\EOF
5729 #define HAVE_RES_QUERY 1
5730 EOF
5731
5732
5733         if test $ol_enable_dnssrv != no ; then
5734                 ol_link_dnssrv=yes
5735         fi
5736 fi
5737
5738 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5739         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5740 fi
5741
5742 ol_link_kbind=no
5743 ol_link_kpasswd=no
5744 ol_link_krb5=no
5745 ol_link_krb4=no
5746
5747 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5748         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5749         -o $ol_with_kerberos = k425 ; then
5750
5751         for ac_hdr in krb5.h
5752 do
5753 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5754 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5755 echo "configure:5756: checking for $ac_hdr" >&5
5756 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5757   echo $ac_n "(cached) $ac_c" 1>&6
5758 else
5759   cat > conftest.$ac_ext <<EOF
5760 #line 5761 "configure"
5761 #include "confdefs.h"
5762 #include <$ac_hdr>
5763 EOF
5764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5765 { (eval echo configure:5766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5767 if test -z "$ac_err"; then
5768   rm -rf conftest*
5769   eval "ac_cv_header_$ac_safe=yes"
5770 else
5771   echo "$ac_err" >&5
5772   echo "configure: failed program was:" >&5
5773   cat conftest.$ac_ext >&5
5774   rm -rf conftest*
5775   eval "ac_cv_header_$ac_safe=no"
5776 fi
5777 rm -f conftest*
5778 fi
5779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5780   echo "$ac_t""yes" 1>&6
5781     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5782   cat >> confdefs.h <<EOF
5783 #define $ac_tr_hdr 1
5784 EOF
5785  
5786 else
5787   echo "$ac_t""no" 1>&6
5788 fi
5789 done
5790
5791
5792         if test $ac_cv_header_krb5_h = yes ; then
5793                                 for ac_hdr in heim_err.h
5794 do
5795 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5796 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5797 echo "configure:5798: checking for $ac_hdr" >&5
5798 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5799   echo $ac_n "(cached) $ac_c" 1>&6
5800 else
5801   cat > conftest.$ac_ext <<EOF
5802 #line 5803 "configure"
5803 #include "confdefs.h"
5804 #include <$ac_hdr>
5805 EOF
5806 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5807 { (eval echo configure:5808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5808 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5809 if test -z "$ac_err"; then
5810   rm -rf conftest*
5811   eval "ac_cv_header_$ac_safe=yes"
5812 else
5813   echo "$ac_err" >&5
5814   echo "configure: failed program was:" >&5
5815   cat conftest.$ac_ext >&5
5816   rm -rf conftest*
5817   eval "ac_cv_header_$ac_safe=no"
5818 fi
5819 rm -f conftest*
5820 fi
5821 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5822   echo "$ac_t""yes" 1>&6
5823     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5824   cat >> confdefs.h <<EOF
5825 #define $ac_tr_hdr 1
5826 EOF
5827  
5828 else
5829   echo "$ac_t""no" 1>&6
5830 fi
5831 done
5832
5833                 if test $ac_cv_header_heim_err_h = yes ; then
5834                         krb5_impl=heimdal
5835                 else
5836                         krb5_impl=mit
5837                 fi
5838
5839                 if test $krb5_impl = mit; then
5840                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5841 echo "configure:5842: checking for main in -lkrb5" >&5
5842 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5843 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   ac_save_LIBS="$LIBS"
5847 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5848 cat > conftest.$ac_ext <<EOF
5849 #line 5850 "configure"
5850 #include "confdefs.h"
5851
5852 int main() {
5853 main()
5854 ; return 0; }
5855 EOF
5856 if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5857   rm -rf conftest*
5858   eval "ac_cv_lib_$ac_lib_var=yes"
5859 else
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   eval "ac_cv_lib_$ac_lib_var=no"
5864 fi
5865 rm -f conftest*
5866 LIBS="$ac_save_LIBS"
5867
5868 fi
5869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5870   echo "$ac_t""yes" 1>&6
5871   have_krb5=yes
5872                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5873 else
5874   echo "$ac_t""no" 1>&6
5875 have_krb5=no
5876 fi
5877
5878
5879                 elif test $krb5_impl = heimdal; then
5880                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5881 echo "configure:5882: checking for main in -lkrb5" >&5
5882 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5883 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5884   echo $ac_n "(cached) $ac_c" 1>&6
5885 else
5886   ac_save_LIBS="$LIBS"
5887 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5888 cat > conftest.$ac_ext <<EOF
5889 #line 5890 "configure"
5890 #include "confdefs.h"
5891
5892 int main() {
5893 main()
5894 ; return 0; }
5895 EOF
5896 if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5897   rm -rf conftest*
5898   eval "ac_cv_lib_$ac_lib_var=yes"
5899 else
5900   echo "configure: failed program was:" >&5
5901   cat conftest.$ac_ext >&5
5902   rm -rf conftest*
5903   eval "ac_cv_lib_$ac_lib_var=no"
5904 fi
5905 rm -f conftest*
5906 LIBS="$ac_save_LIBS"
5907
5908 fi
5909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5910   echo "$ac_t""yes" 1>&6
5911   have_krb5=yes
5912                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5913 else
5914   echo "$ac_t""no" 1>&6
5915 have_krb5=no
5916 fi
5917
5918
5919                         cat >> confdefs.h <<\EOF
5920 #define HAVE_HEIMDAL_KERBEROS 1
5921 EOF
5922
5923                 else
5924                         have_krb5=no
5925                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5926                 fi
5927
5928                 if test $have_krb5 = yes ; then
5929                         ol_link_krb5=yes
5930
5931                         cat >> confdefs.h <<\EOF
5932 #define HAVE_KRB5 1
5933 EOF
5934
5935
5936                         if test $ol_enable_kpasswd != no ; then
5937                                 ol_link_kpasswd=yes;
5938                         fi
5939
5940                         if test $ol_with_kerberos = k5only ; then
5941                                 ol_with_kerberos=found
5942                         fi
5943
5944                 elif test $ol_with_kerberos != auto ; then
5945                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5946                 fi
5947
5948         fi
5949 fi
5950
5951 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
5952         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5953
5954         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5955 do
5956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5958 echo "configure:5959: checking for $ac_hdr" >&5
5959 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5960   echo $ac_n "(cached) $ac_c" 1>&6
5961 else
5962   cat > conftest.$ac_ext <<EOF
5963 #line 5964 "configure"
5964 #include "confdefs.h"
5965 #include <$ac_hdr>
5966 EOF
5967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5968 { (eval echo configure:5969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5970 if test -z "$ac_err"; then
5971   rm -rf conftest*
5972   eval "ac_cv_header_$ac_safe=yes"
5973 else
5974   echo "$ac_err" >&5
5975   echo "configure: failed program was:" >&5
5976   cat conftest.$ac_ext >&5
5977   rm -rf conftest*
5978   eval "ac_cv_header_$ac_safe=no"
5979 fi
5980 rm -f conftest*
5981 fi
5982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5983   echo "$ac_t""yes" 1>&6
5984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5985   cat >> confdefs.h <<EOF
5986 #define $ac_tr_hdr 1
5987 EOF
5988  
5989 else
5990   echo "$ac_t""no" 1>&6
5991 fi
5992 done
5993
5994
5995         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5996                 if test $krb5_impl = mit; then
5997                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5998 echo "configure:5999: checking for main in -lkrb4" >&5
5999 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6001   echo $ac_n "(cached) $ac_c" 1>&6
6002 else
6003   ac_save_LIBS="$LIBS"
6004 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6005 cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008
6009 int main() {
6010 main()
6011 ; return 0; }
6012 EOF
6013 if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6014   rm -rf conftest*
6015   eval "ac_cv_lib_$ac_lib_var=yes"
6016 else
6017   echo "configure: failed program was:" >&5
6018   cat conftest.$ac_ext >&5
6019   rm -rf conftest*
6020   eval "ac_cv_lib_$ac_lib_var=no"
6021 fi
6022 rm -f conftest*
6023 LIBS="$ac_save_LIBS"
6024
6025 fi
6026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6027   echo "$ac_t""yes" 1>&6
6028   have_k425=yes
6029                                 KRB4_LIBS="-lkrb4 -ldes425"
6030 else
6031   echo "$ac_t""no" 1>&6
6032 have_k425=no
6033 fi
6034
6035
6036                 elif test $krb5_impl = heimdal; then
6037                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6038 echo "configure:6039: checking for main in -lkrb4" >&5
6039 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6040 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6041   echo $ac_n "(cached) $ac_c" 1>&6
6042 else
6043   ac_save_LIBS="$LIBS"
6044 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6045 cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048
6049 int main() {
6050 main()
6051 ; return 0; }
6052 EOF
6053 if { (eval echo configure:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6054   rm -rf conftest*
6055   eval "ac_cv_lib_$ac_lib_var=yes"
6056 else
6057   echo "configure: failed program was:" >&5
6058   cat conftest.$ac_ext >&5
6059   rm -rf conftest*
6060   eval "ac_cv_lib_$ac_lib_var=no"
6061 fi
6062 rm -f conftest*
6063 LIBS="$ac_save_LIBS"
6064
6065 fi
6066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6067   echo "$ac_t""yes" 1>&6
6068   have_k425=yes
6069                                 KRB4_LIBS="-lkrb4"
6070 else
6071   echo "$ac_t""no" 1>&6
6072 have_k425=no
6073 fi
6074
6075
6076                 else
6077                         have_425=no
6078                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6079                 fi
6080
6081                 if test $have_k425 = yes ; then
6082                         ol_with_kerberos=found
6083                         ol_link_krb4=yes
6084
6085                         cat >> confdefs.h <<\EOF
6086 #define HAVE_KRB425 1
6087 EOF
6088
6089                         cat >> confdefs.h <<\EOF
6090 #define HAVE_KRB4 1
6091 EOF
6092
6093
6094                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6095 echo "configure:6096: checking for des_debug in Kerberos libraries" >&5
6096 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6097   echo $ac_n "(cached) $ac_c" 1>&6
6098 else
6099   
6100                                                                 save_LIBS="$LIBS"
6101                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6102                                 cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105
6106 #include <kerberosIV/krb.h>
6107 #include <kerberosIV/des.h>
6108 extern int des_debug;
6109
6110 int main() {
6111
6112 des_debug = 1;
6113
6114 ; return 0; }
6115 EOF
6116 if { (eval echo configure:6117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6117   rm -rf conftest*
6118   ol_cv_var_des_debug=yes
6119 else
6120   echo "configure: failed program was:" >&5
6121   cat conftest.$ac_ext >&5
6122   rm -rf conftest*
6123   ol_cv_var_des_debug=no
6124 fi
6125 rm -f conftest*
6126                                                                 LIBS="$save_LIBS"
6127                         
6128 fi
6129
6130 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6131
6132                         if test $ol_cv_var_des_debug = yes ; then
6133                                 cat >> confdefs.h <<\EOF
6134 #define HAVE_DES_DEBUG 1
6135 EOF
6136
6137                         fi
6138
6139                         LIBS="$save_LIBS"
6140                 fi
6141         fi
6142 fi
6143
6144 if test $ol_link_krb5 = yes ; then
6145         ol_with_kerberos=found
6146 fi
6147
6148 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6149         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6150
6151         for ac_hdr in krb.h des.h krb-archaeology.h 
6152 do
6153 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6154 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6155 echo "configure:6156: checking for $ac_hdr" >&5
6156 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6157   echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159   cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6162 #include <$ac_hdr>
6163 EOF
6164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6165 { (eval echo configure:6166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6167 if test -z "$ac_err"; then
6168   rm -rf conftest*
6169   eval "ac_cv_header_$ac_safe=yes"
6170 else
6171   echo "$ac_err" >&5
6172   echo "configure: failed program was:" >&5
6173   cat conftest.$ac_ext >&5
6174   rm -rf conftest*
6175   eval "ac_cv_header_$ac_safe=no"
6176 fi
6177 rm -f conftest*
6178 fi
6179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6180   echo "$ac_t""yes" 1>&6
6181     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6182   cat >> confdefs.h <<EOF
6183 #define $ac_tr_hdr 1
6184 EOF
6185  
6186 else
6187   echo "$ac_t""no" 1>&6
6188 fi
6189 done
6190
6191
6192         if test $ac_cv_header_krb_h = yes ; then
6193                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6194 echo "configure:6195: checking for main in -lkrb" >&5
6195 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6197   echo $ac_n "(cached) $ac_c" 1>&6
6198 else
6199   ac_save_LIBS="$LIBS"
6200 LIBS="-lkrb -ldes $LIBS"
6201 cat > conftest.$ac_ext <<EOF
6202 #line 6203 "configure"
6203 #include "confdefs.h"
6204
6205 int main() {
6206 main()
6207 ; return 0; }
6208 EOF
6209 if { (eval echo configure:6210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6210   rm -rf conftest*
6211   eval "ac_cv_lib_$ac_lib_var=yes"
6212 else
6213   echo "configure: failed program was:" >&5
6214   cat conftest.$ac_ext >&5
6215   rm -rf conftest*
6216   eval "ac_cv_lib_$ac_lib_var=no"
6217 fi
6218 rm -f conftest*
6219 LIBS="$ac_save_LIBS"
6220
6221 fi
6222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6223   echo "$ac_t""yes" 1>&6
6224   have_k4=yes
6225 else
6226   echo "$ac_t""no" 1>&6
6227 have_k4=no
6228 fi
6229
6230
6231                 if test $have_k4 = yes ; then
6232                         ol_with_kerberos=found
6233                         ol_link_krb4=yes
6234
6235                         cat >> confdefs.h <<\EOF
6236 #define HAVE_KRB4 1
6237 EOF
6238
6239
6240                         KRB4_LIBS="-lkrb -ldes"
6241
6242                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6243                                 cat >> confdefs.h <<\EOF
6244 #define HAVE_KTH_KERBEROS 1
6245 EOF
6246
6247                         fi
6248                 fi
6249         fi
6250 fi
6251
6252 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6253         ol_link_kpasswd=yes
6254 fi
6255
6256 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6257         ol_link_kbind=yes
6258
6259 elif test $ol_enable_kbind = yes ; then
6260         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6261 fi
6262
6263 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6264         cat >> confdefs.h <<\EOF
6265 #define HAVE_KERBEROS 1
6266 EOF
6267
6268
6269 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6270         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6271 fi
6272
6273 ol_link_tls=no
6274 if test $ol_with_tls != no ; then
6275         for ac_hdr in openssl/ssl.h ssl.h
6276 do
6277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6279 echo "configure:6280: checking for $ac_hdr" >&5
6280 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6281   echo $ac_n "(cached) $ac_c" 1>&6
6282 else
6283   cat > conftest.$ac_ext <<EOF
6284 #line 6285 "configure"
6285 #include "confdefs.h"
6286 #include <$ac_hdr>
6287 EOF
6288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6289 { (eval echo configure:6290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6291 if test -z "$ac_err"; then
6292   rm -rf conftest*
6293   eval "ac_cv_header_$ac_safe=yes"
6294 else
6295   echo "$ac_err" >&5
6296   echo "configure: failed program was:" >&5
6297   cat conftest.$ac_ext >&5
6298   rm -rf conftest*
6299   eval "ac_cv_header_$ac_safe=no"
6300 fi
6301 rm -f conftest*
6302 fi
6303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6304   echo "$ac_t""yes" 1>&6
6305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6306   cat >> confdefs.h <<EOF
6307 #define $ac_tr_hdr 1
6308 EOF
6309  
6310 else
6311   echo "$ac_t""no" 1>&6
6312 fi
6313 done
6314
6315         
6316         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6317                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6318 echo "configure:6319: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6319 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6321   echo $ac_n "(cached) $ac_c" 1>&6
6322 else
6323   ac_save_LIBS="$LIBS"
6324 LIBS="-lssl -lcrypto $LIBS"
6325 cat > conftest.$ac_ext <<EOF
6326 #line 6327 "configure"
6327 #include "confdefs.h"
6328 /* Override any gcc2 internal prototype to avoid an error.  */
6329 /* We use char because int might match the return type of a gcc2
6330     builtin and then its argument prototype would still apply.  */
6331 char SSLeay_add_ssl_algorithms();
6332
6333 int main() {
6334 SSLeay_add_ssl_algorithms()
6335 ; return 0; }
6336 EOF
6337 if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6338   rm -rf conftest*
6339   eval "ac_cv_lib_$ac_lib_var=yes"
6340 else
6341   echo "configure: failed program was:" >&5
6342   cat conftest.$ac_ext >&5
6343   rm -rf conftest*
6344   eval "ac_cv_lib_$ac_lib_var=no"
6345 fi
6346 rm -f conftest*
6347 LIBS="$ac_save_LIBS"
6348
6349 fi
6350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6351   echo "$ac_t""yes" 1>&6
6352   have_ssleay=yes
6353                         need_rsaref=no
6354 else
6355   echo "$ac_t""no" 1>&6
6356 have_ssleay=no
6357 fi
6358
6359                         
6360                 if test $have_ssleay = no ; then
6361                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6362 echo "configure:6363: checking for SSL_library_init in -lssl" >&5
6363 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6365   echo $ac_n "(cached) $ac_c" 1>&6
6366 else
6367   ac_save_LIBS="$LIBS"
6368 LIBS="-lssl -lcrypto $LIBS"
6369 cat > conftest.$ac_ext <<EOF
6370 #line 6371 "configure"
6371 #include "confdefs.h"
6372 /* Override any gcc2 internal prototype to avoid an error.  */
6373 /* We use char because int might match the return type of a gcc2
6374     builtin and then its argument prototype would still apply.  */
6375 char SSL_library_init();
6376
6377 int main() {
6378 SSL_library_init()
6379 ; return 0; }
6380 EOF
6381 if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6382   rm -rf conftest*
6383   eval "ac_cv_lib_$ac_lib_var=yes"
6384 else
6385   echo "configure: failed program was:" >&5
6386   cat conftest.$ac_ext >&5
6387   rm -rf conftest*
6388   eval "ac_cv_lib_$ac_lib_var=no"
6389 fi
6390 rm -f conftest*
6391 LIBS="$ac_save_LIBS"
6392
6393 fi
6394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6395   echo "$ac_t""yes" 1>&6
6396   have_ssleay=yes
6397                                 need_rsaref=no
6398 else
6399   echo "$ac_t""no" 1>&6
6400 have_ssleay=no
6401 fi
6402
6403                 fi
6404
6405                 if test $have_ssleay = no ; then
6406                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6407 echo "configure:6408: checking for ssl3_accept in -lssl" >&5
6408 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6410   echo $ac_n "(cached) $ac_c" 1>&6
6411 else
6412   ac_save_LIBS="$LIBS"
6413 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6414 cat > conftest.$ac_ext <<EOF
6415 #line 6416 "configure"
6416 #include "confdefs.h"
6417 /* Override any gcc2 internal prototype to avoid an error.  */
6418 /* We use char because int might match the return type of a gcc2
6419     builtin and then its argument prototype would still apply.  */
6420 char ssl3_accept();
6421
6422 int main() {
6423 ssl3_accept()
6424 ; return 0; }
6425 EOF
6426 if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6427   rm -rf conftest*
6428   eval "ac_cv_lib_$ac_lib_var=yes"
6429 else
6430   echo "configure: failed program was:" >&5
6431   cat conftest.$ac_ext >&5
6432   rm -rf conftest*
6433   eval "ac_cv_lib_$ac_lib_var=no"
6434 fi
6435 rm -f conftest*
6436 LIBS="$ac_save_LIBS"
6437
6438 fi
6439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6440   echo "$ac_t""yes" 1>&6
6441   have_ssleay=yes
6442                                 need_rsaref=yes
6443 else
6444   echo "$ac_t""no" 1>&6
6445 have_ssleay=no
6446 fi
6447
6448                 fi
6449
6450                 if test $have_ssleay = yes ; then
6451                         ol_with_tls=found
6452                         ol_link_tls=yes
6453
6454                         cat >> confdefs.h <<\EOF
6455 #define HAVE_SSLEAY 1
6456 EOF
6457
6458
6459                         if test $need_rsaref = yes; then
6460                                 cat >> confdefs.h <<\EOF
6461 #define HAVE_RSAREF 1
6462 EOF
6463
6464
6465                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6466                         else
6467                                 TLS_LIBS="-lssl -lcrypto"
6468                         fi
6469                 fi
6470         fi
6471
6472 else
6473         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6474 fi
6475
6476 if test $ol_link_tls = yes ; then
6477         cat >> confdefs.h <<\EOF
6478 #define HAVE_TLS 1
6479 EOF
6480
6481
6482 elif test $ol_with_tls = auto ; then
6483         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6484         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6485
6486 elif test $ol_with_tls != no ; then
6487         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6488 fi
6489
6490 for ac_func in \
6491         ctime_r                 \
6492         gethostbyname_r gethostbyaddr_r \
6493
6494 do
6495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6496 echo "configure:6497: checking for $ac_func" >&5
6497 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6498   echo $ac_n "(cached) $ac_c" 1>&6
6499 else
6500   cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 /* System header to define __stub macros and hopefully few prototypes,
6504     which can conflict with char $ac_func(); below.  */
6505 #include <assert.h>
6506 /* Override any gcc2 internal prototype to avoid an error.  */
6507 /* We use char because int might match the return type of a gcc2
6508     builtin and then its argument prototype would still apply.  */
6509 char $ac_func();
6510 char (*f)();
6511
6512 int main() {
6513
6514 /* The GNU C library defines this for functions which it implements
6515     to always fail with ENOSYS.  Some functions are actually named
6516     something starting with __ and the normal name is an alias.  */
6517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6518 choke me
6519 #else
6520 f = $ac_func;
6521 #endif
6522
6523 ; return 0; }
6524 EOF
6525 if { (eval echo configure:6526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6526   rm -rf conftest*
6527   eval "ac_cv_func_$ac_func=yes"
6528 else
6529   echo "configure: failed program was:" >&5
6530   cat conftest.$ac_ext >&5
6531   rm -rf conftest*
6532   eval "ac_cv_func_$ac_func=no"
6533 fi
6534 rm -f conftest*
6535 fi
6536
6537 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6538   echo "$ac_t""yes" 1>&6
6539     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6540   cat >> confdefs.h <<EOF
6541 #define $ac_tr_func 1
6542 EOF
6543  
6544 else
6545   echo "$ac_t""no" 1>&6
6546 fi
6547 done
6548
6549
6550 if test "$ac_cv_func_ctime_r" = no ; then
6551         ol_cv_func_ctime_r_nargs=0
6552 else
6553         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6554 echo "configure:6555: checking number of arguments of ctime_r" >&5
6555 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6556   echo $ac_n "(cached) $ac_c" 1>&6
6557 else
6558   cat > conftest.$ac_ext <<EOF
6559 #line 6560 "configure"
6560 #include "confdefs.h"
6561 #include <time.h>
6562 int main() {
6563 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6564 ; return 0; }
6565 EOF
6566 if { (eval echo configure:6567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6567   rm -rf conftest*
6568   ol_cv_func_ctime_r_nargs3=yes
6569 else
6570   echo "configure: failed program was:" >&5
6571   cat conftest.$ac_ext >&5
6572   rm -rf conftest*
6573   ol_cv_func_ctime_r_nargs3=no
6574 fi
6575 rm -f conftest*
6576
6577         cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 #include <time.h>
6581 int main() {
6582 time_t ti; char *buffer; ctime_r(&ti,buffer);
6583 ; return 0; }
6584 EOF
6585 if { (eval echo configure:6586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6586   rm -rf conftest*
6587   ol_cv_func_ctime_r_nargs2=yes
6588 else
6589   echo "configure: failed program was:" >&5
6590   cat conftest.$ac_ext >&5
6591   rm -rf conftest*
6592   ol_cv_func_ctime_r_nargs2=no
6593 fi
6594 rm -f conftest*
6595
6596         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6597                 $ol_cv_func_ctime_r_nargs2 = no ; then
6598
6599                 ol_cv_func_ctime_r_nargs=3
6600
6601         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6602                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6603
6604                 ol_cv_func_ctime_r_nargs=2
6605
6606         else
6607                 ol_cv_func_ctime_r_nargs=0
6608         fi
6609   
6610 fi
6611
6612 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6613
6614   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6615         cat >> confdefs.h <<EOF
6616 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6617 EOF
6618
6619   fi
6620
6621 fi
6622
6623 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6624         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6625 echo "configure:6626: checking number of arguments of gethostbyname_r" >&5
6626 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6627   echo $ac_n "(cached) $ac_c" 1>&6
6628 else
6629   cat > conftest.$ac_ext <<EOF
6630 #line 6631 "configure"
6631 #include "confdefs.h"
6632 #include <sys/types.h>
6633 #include <sys/socket.h>
6634 #include <netinet/in.h>
6635 #include <netdb.h>
6636 #define BUFSIZE (sizeof(struct hostent)+10)
6637 int main() {
6638 struct hostent hent; char buffer[BUFSIZE];
6639                 int bufsize=BUFSIZE;int h_errno;
6640                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6641                         buffer, bufsize, &h_errno);
6642 ; return 0; }
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6645   rm -rf conftest*
6646   ol_cv_func_gethostbyname_r_nargs5=yes
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -rf conftest*
6651   ol_cv_func_gethostbyname_r_nargs5=no
6652 fi
6653 rm -f conftest*
6654
6655         cat > conftest.$ac_ext <<EOF
6656 #line 6657 "configure"
6657 #include "confdefs.h"
6658 #include <sys/types.h>
6659 #include <sys/socket.h>
6660 #include <netinet/in.h>
6661 #include <netdb.h>
6662 #define BUFSIZE (sizeof(struct hostent)+10)
6663 int main() {
6664 struct hostent hent;struct hostent *rhent;
6665                 char buffer[BUFSIZE];
6666                 int bufsize=BUFSIZE;int h_errno;
6667                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6668                         &rhent, &h_errno);
6669 ; return 0; }
6670 EOF
6671 if { (eval echo configure:6672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6672   rm -rf conftest*
6673   ol_cv_func_gethostbyname_r_nargs6=yes
6674 else
6675   echo "configure: failed program was:" >&5
6676   cat conftest.$ac_ext >&5
6677   rm -rf conftest*
6678   ol_cv_func_gethostbyname_r_nargs6=no
6679 fi
6680 rm -f conftest*
6681
6682         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6683                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6684
6685                 ol_cv_func_gethostbyname_r_nargs=5
6686
6687         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6688                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6689
6690                 ol_cv_func_gethostbyname_r_nargs=6
6691
6692         else
6693                 ol_cv_func_gethostbyname_r_nargs=0
6694         fi
6695   
6696 fi
6697
6698 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6699   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6700         cat >> confdefs.h <<EOF
6701 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6702 EOF
6703
6704   fi
6705
6706 else
6707         ol_cv_func_gethostbyname_r_nargs=0
6708 fi
6709  
6710 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6711         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6712 echo "configure:6713: checking number of arguments of gethostbyaddr_r" >&5
6713 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6714   echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716   cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 #include <sys/types.h>
6720 #include <sys/socket.h>
6721 #include <netinet/in.h>
6722 #include <netdb.h>
6723 #define BUFSIZE (sizeof(struct hostent)+10)
6724 int main() {
6725 struct hostent hent; char buffer[BUFSIZE]; 
6726             struct in_addr add;
6727             size_t alen=sizeof(struct in_addr);
6728             int bufsize=BUFSIZE;int h_errno;
6729                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6730                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6731 ; return 0; }
6732 EOF
6733 if { (eval echo configure:6734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6734   rm -rf conftest*
6735   ol_cv_func_gethostbyaddr_r_nargs7=yes
6736 else
6737   echo "configure: failed program was:" >&5
6738   cat conftest.$ac_ext >&5
6739   rm -rf conftest*
6740   ol_cv_func_gethostbyaddr_r_nargs7=no
6741 fi
6742 rm -f conftest*
6743
6744         cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 #include <sys/types.h>
6748 #include <sys/socket.h>
6749 #include <netinet/in.h>
6750 #include <netdb.h>
6751 #define BUFSIZE (sizeof(struct hostent)+10)
6752 int main() {
6753 struct hostent hent;
6754                 struct hostent *rhent; char buffer[BUFSIZE]; 
6755                 struct in_addr add;
6756                 size_t alen=sizeof(struct in_addr);
6757                 int bufsize=BUFSIZE;int h_errno;
6758                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6759                         alen, AF_INET, &hent, buffer, bufsize, 
6760                         &rhent, &h_errno);
6761 ; return 0; }
6762 EOF
6763 if { (eval echo configure:6764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6764   rm -rf conftest*
6765   ol_cv_func_gethostbyaddr_r_nargs8=yes
6766 else
6767   echo "configure: failed program was:" >&5
6768   cat conftest.$ac_ext >&5
6769   rm -rf conftest*
6770   ol_cv_func_gethostbyaddr_r_nargs8=no
6771 fi
6772 rm -f conftest*
6773
6774         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6775                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6776
6777                 ol_cv_func_gethostbyaddr_r_nargs=7
6778
6779         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6780                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6781
6782                 ol_cv_func_gethostbyaddr_r_nargs=8
6783
6784         else
6785                 ol_cv_func_gethostbyaddr_r_nargs=0
6786         fi
6787   
6788 fi
6789
6790 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6791   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6792     cat >> confdefs.h <<EOF
6793 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6794 EOF
6795
6796   fi
6797
6798 else
6799         ol_cv_func_gethostbyaddr_r_nargs=0
6800 fi
6801
6802 if test "$ac_cv_func_ctime_r" = yes \
6803         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6804         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6805         -a "$ac_cv_func_gethostbyname_r" = yes \
6806         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6807         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6808         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6809         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6810         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6811         ; then
6812  
6813         cat >> confdefs.h <<\EOF
6814 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6815 EOF
6816
6817 fi
6818
6819 ol_link_threads=no
6820
6821 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6822         -o $ol_with_threads = nt ; then
6823
6824         
6825         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6826 echo "configure:6827: checking for NT Threads" >&5
6827 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6828   echo $ac_n "(cached) $ac_c" 1>&6
6829 else
6830   
6831                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6832 echo "configure:6833: checking for _beginthread" >&5
6833 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6834   echo $ac_n "(cached) $ac_c" 1>&6
6835 else
6836   cat > conftest.$ac_ext <<EOF
6837 #line 6838 "configure"
6838 #include "confdefs.h"
6839 /* System header to define __stub macros and hopefully few prototypes,
6840     which can conflict with char _beginthread(); below.  */
6841 #include <assert.h>
6842 /* Override any gcc2 internal prototype to avoid an error.  */
6843 /* We use char because int might match the return type of a gcc2
6844     builtin and then its argument prototype would still apply.  */
6845 char _beginthread();
6846 char (*f)();
6847
6848 int main() {
6849
6850 /* The GNU C library defines this for functions which it implements
6851     to always fail with ENOSYS.  Some functions are actually named
6852     something starting with __ and the normal name is an alias.  */
6853 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6854 choke me
6855 #else
6856 f = _beginthread;
6857 #endif
6858
6859 ; return 0; }
6860 EOF
6861 if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6862   rm -rf conftest*
6863   eval "ac_cv_func__beginthread=yes"
6864 else
6865   echo "configure: failed program was:" >&5
6866   cat conftest.$ac_ext >&5
6867   rm -rf conftest*
6868   eval "ac_cv_func__beginthread=no"
6869 fi
6870 rm -f conftest*
6871 fi
6872
6873 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6874   echo "$ac_t""yes" 1>&6
6875   ol_cv_nt_threads=yes
6876 else
6877   echo "$ac_t""no" 1>&6
6878 ol_cv_nt_threads=no
6879 fi
6880
6881         
6882 fi
6883
6884 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6885
6886         if test $ol_cv_nt_threads = yes ; then
6887                 cat >> confdefs.h <<\EOF
6888 #define HAVE_NT_THREADS 1
6889 EOF
6890
6891         fi
6892
6893
6894         if test "$ol_cv_nt_threads" = yes ; then
6895         ol_link_threads=nt
6896         ol_with_threads=found
6897         ol_with_yielding_select=yes
6898
6899                 cat >> confdefs.h <<\EOF
6900 #define HAVE_NT_SERVICE_MANAGER 1
6901 EOF
6902
6903                 cat >> confdefs.h <<\EOF
6904 #define HAVE_NT_EVENT_LOG 1
6905 EOF
6906
6907         fi
6908
6909         if test $ol_with_threads = nt ; then
6910                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6911         fi
6912 fi
6913
6914 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6915         -o $ol_with_threads = posix ; then
6916
6917         for ac_hdr in pthread.h
6918 do
6919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6921 echo "configure:6922: checking for $ac_hdr" >&5
6922 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6923   echo $ac_n "(cached) $ac_c" 1>&6
6924 else
6925   cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928 #include <$ac_hdr>
6929 EOF
6930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6931 { (eval echo configure:6932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6933 if test -z "$ac_err"; then
6934   rm -rf conftest*
6935   eval "ac_cv_header_$ac_safe=yes"
6936 else
6937   echo "$ac_err" >&5
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -rf conftest*
6941   eval "ac_cv_header_$ac_safe=no"
6942 fi
6943 rm -f conftest*
6944 fi
6945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6946   echo "$ac_t""yes" 1>&6
6947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6948   cat >> confdefs.h <<EOF
6949 #define $ac_tr_hdr 1
6950 EOF
6951  
6952 else
6953   echo "$ac_t""no" 1>&6
6954 fi
6955 done
6956
6957
6958         if test $ac_cv_header_pthread_h = yes ; then
6959                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6960 echo "configure:6961: checking POSIX thread version" >&5
6961 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6962   echo $ac_n "(cached) $ac_c" 1>&6
6963 else
6964   
6965         cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968
6969 #               include <pthread.h>
6970                 /* this check could be improved */
6971 #               ifdef PTHREAD_ONCE_INIT
6972                         pthread_version_final;
6973 #               endif
6974         
6975 EOF
6976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6977   egrep "pthread_version_final" >/dev/null 2>&1; then
6978   rm -rf conftest*
6979   ol_pthread_final=yes
6980 else
6981   rm -rf conftest*
6982   ol_pthread_final=no
6983 fi
6984 rm -f conftest*
6985
6986
6987         cat > conftest.$ac_ext <<EOF
6988 #line 6989 "configure"
6989 #include "confdefs.h"
6990
6991 #               include <pthread.h>
6992                 /* this check could be improved */
6993 #               ifdef pthread_once_init
6994                         pthread_version_draft4;
6995 #               endif
6996         
6997 EOF
6998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6999   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7000   rm -rf conftest*
7001   ol_pthread_draft4=yes
7002 else
7003   rm -rf conftest*
7004   ol_pthread_draft4=no
7005 fi
7006 rm -f conftest*
7007
7008
7009         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7010                 ol_cv_pthread_version=final
7011         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7012                 ol_cv_pthread_version=draft4
7013         else
7014                 ol_cv_pthread_version=unknown
7015         fi
7016
7017 fi
7018
7019 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7020
7021
7022                 if test $ol_cv_pthread_version = final ; then
7023                         cat >> confdefs.h <<\EOF
7024 #define HAVE_PTHREADS_FINAL 1
7025 EOF
7026
7027                 elif test $ol_cv_pthread_version = draft4 ; then
7028                         cat >> confdefs.h <<\EOF
7029 #define HAVE_PTHREADS_D4 1
7030 EOF
7031
7032                 else
7033                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7034                 fi
7035
7036                 # consider threads found
7037                 ol_with_threads=found
7038
7039                 
7040         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7041 echo "configure:7042: checking for LinuxThreads pthread.h" >&5
7042 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 #include <pthread.h>
7049 EOF
7050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7051   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7052   rm -rf conftest*
7053   ol_cv_header_linux_threads=yes
7054 else
7055   rm -rf conftest*
7056   ol_cv_header_linux_threads=no
7057 fi
7058 rm -f conftest*
7059
7060                 
7061 fi
7062
7063 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7064         if test $ol_cv_header_linux_threads = yes; then
7065                 cat >> confdefs.h <<\EOF
7066 #define HAVE_LINUX_THREADS 1
7067 EOF
7068
7069         fi
7070
7071                 
7072         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7073 echo "configure:7074: checking for GNU Pth pthread.h" >&5
7074 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7075   echo $ac_n "(cached) $ac_c" 1>&6
7076 else
7077   cat > conftest.$ac_ext <<EOF
7078 #line 7079 "configure"
7079 #include "confdefs.h"
7080 #include <pthread.h>
7081 #ifdef _POSIX_THREAD_IS_GNU_PTH
7082         __gnu_pth__;
7083 #endif
7084
7085 EOF
7086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7087   egrep "__gnu_pth__" >/dev/null 2>&1; then
7088   rm -rf conftest*
7089   ol_cv_header_gnu_pth_pthread_h=yes
7090 else
7091   rm -rf conftest*
7092   ol_cv_header_gnu_pth_pthread_h=no
7093 fi
7094 rm -f conftest*
7095
7096                 
7097 fi
7098
7099 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7100
7101
7102                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7103                         for ac_hdr in sched.h
7104 do
7105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7107 echo "configure:7108: checking for $ac_hdr" >&5
7108 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7109   echo $ac_n "(cached) $ac_c" 1>&6
7110 else
7111   cat > conftest.$ac_ext <<EOF
7112 #line 7113 "configure"
7113 #include "confdefs.h"
7114 #include <$ac_hdr>
7115 EOF
7116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7117 { (eval echo configure:7118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7119 if test -z "$ac_err"; then
7120   rm -rf conftest*
7121   eval "ac_cv_header_$ac_safe=yes"
7122 else
7123   echo "$ac_err" >&5
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -rf conftest*
7127   eval "ac_cv_header_$ac_safe=no"
7128 fi
7129 rm -f conftest*
7130 fi
7131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7132   echo "$ac_t""yes" 1>&6
7133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7134   cat >> confdefs.h <<EOF
7135 #define $ac_tr_hdr 1
7136 EOF
7137  
7138 else
7139   echo "$ac_t""no" 1>&6
7140 fi
7141 done
7142
7143                 fi
7144
7145                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7146                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7147 echo "configure:7148: checking for pthread_create in default libraries" >&5
7148 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7149   echo $ac_n "(cached) $ac_c" 1>&6
7150 else
7151   
7152                 if test "$cross_compiling" = yes; then
7153   cat > conftest.$ac_ext <<EOF
7154 #line 7155 "configure"
7155 #include "confdefs.h"
7156 /* pthread test headers */
7157 #include <pthread.h>
7158 #ifndef NULL
7159 #define NULL (void*)0
7160 #endif
7161
7162 static void *task(p)
7163         void *p;
7164 {
7165         return (void *) (p == NULL);
7166 }
7167
7168 int main() {
7169
7170         /* pthread test function */
7171         pthread_t t;
7172         int status;
7173 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7174         /* This system (e.g. AIX) defaults detached; must override */
7175         pthread_attr_t attr;
7176
7177         status = pthread_attr_init(&attr);
7178         if( status ) exit( status );
7179
7180         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7181         if( status ) exit( status );
7182
7183 #define ATTR    &attr
7184 #else
7185 #if HAVE_PTHREADS_D4
7186 #define ATTR    pthread_attr_default
7187 #else
7188 #define ATTR    NULL
7189 #endif
7190 #endif
7191         /* make sure pthread_create() isn't just a stub */
7192         status = pthread_create(&t, ATTR, task, NULL);
7193         if( status ) exit( status );
7194
7195         /* make sure pthread_detach() isn't just a stub */
7196 #if HAVE_PTHREADS_D4
7197         status = pthread_detach( &t );
7198 #else
7199         status = pthread_detach( t );
7200 #endif
7201
7202 #ifdef HAVE_LINUX_THREADS
7203         pthread_kill_other_threads_np();
7204 #endif
7205
7206         exit( status );
7207
7208 ; return 0; }
7209 EOF
7210 if { (eval echo configure:7211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7211   rm -rf conftest*
7212   ol_cv_pthread_create=yes
7213 else
7214   echo "configure: failed program was:" >&5
7215   cat conftest.$ac_ext >&5
7216   rm -rf conftest*
7217   ol_cv_pthread_create=no
7218 fi
7219 rm -f conftest*
7220 else
7221   cat > conftest.$ac_ext <<EOF
7222 #line 7223 "configure"
7223 #include "confdefs.h"
7224 /* pthread test headers */
7225 #include <pthread.h>
7226 #ifndef NULL
7227 #define NULL (void*)0
7228 #endif
7229
7230 static void *task(p)
7231         void *p;
7232 {
7233         return (void *) (p == NULL);
7234 }
7235
7236
7237 int main(argc, argv)
7238         int argc;
7239         char **argv;
7240 {
7241
7242         /* pthread test function */
7243         pthread_t t;
7244         int status;
7245 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7246         /* This system (e.g. AIX) defaults detached; must override */
7247         pthread_attr_t attr;
7248
7249         status = pthread_attr_init(&attr);
7250         if( status ) exit( status );
7251
7252         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7253         if( status ) exit( status );
7254
7255 #define ATTR    &attr
7256 #else
7257 #if HAVE_PTHREADS_D4
7258 #define ATTR    pthread_attr_default
7259 #else
7260 #define ATTR    NULL
7261 #endif
7262 #endif
7263         /* make sure pthread_create() isn't just a stub */
7264         status = pthread_create(&t, ATTR, task, NULL);
7265         if( status ) exit( status );
7266
7267         /* make sure pthread_detach() isn't just a stub */
7268 #if HAVE_PTHREADS_D4
7269         status = pthread_detach( &t );
7270 #else
7271         status = pthread_detach( t );
7272 #endif
7273
7274 #ifdef HAVE_LINUX_THREADS
7275         pthread_kill_other_threads_np();
7276 #endif
7277
7278         exit( status );
7279
7280 }
7281
7282 EOF
7283 if { (eval echo configure:7284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7284 then
7285   ol_cv_pthread_create=yes
7286 else
7287   echo "configure: failed program was:" >&5
7288   cat conftest.$ac_ext >&5
7289   rm -fr conftest*
7290   ol_cv_pthread_create=no
7291 fi
7292 rm -fr conftest*
7293 fi
7294
7295 fi
7296
7297 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7298
7299                 if test $ol_cv_pthread_create != no ; then
7300                         ol_link_threads=posix
7301                         ol_link_pthreads=""
7302                 fi
7303                 
7304                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7305 if test "$ol_link_threads" = no ; then
7306         # try -kthread
7307         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7308 echo "configure:7309: checking for pthread link with -kthread" >&5
7309 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7310   echo $ac_n "(cached) $ac_c" 1>&6
7311 else
7312   
7313                 # save the flags
7314                 ol_LIBS="$LIBS"
7315                 LIBS="-kthread $LIBS"
7316
7317                 if test "$cross_compiling" = yes; then
7318   cat > conftest.$ac_ext <<EOF
7319 #line 7320 "configure"
7320 #include "confdefs.h"
7321 /* pthread test headers */
7322 #include <pthread.h>
7323 #ifndef NULL
7324 #define NULL (void*)0
7325 #endif
7326
7327 static void *task(p)
7328         void *p;
7329 {
7330         return (void *) (p == NULL);
7331 }
7332
7333 int main() {
7334
7335         /* pthread test function */
7336         pthread_t t;
7337         int status;
7338 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7339         /* This system (e.g. AIX) defaults detached; must override */
7340         pthread_attr_t attr;
7341
7342         status = pthread_attr_init(&attr);
7343         if( status ) exit( status );
7344
7345         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7346         if( status ) exit( status );
7347
7348 #define ATTR    &attr
7349 #else
7350 #if HAVE_PTHREADS_D4
7351 #define ATTR    pthread_attr_default
7352 #else
7353 #define ATTR    NULL
7354 #endif
7355 #endif
7356         /* make sure pthread_create() isn't just a stub */
7357         status = pthread_create(&t, ATTR, task, NULL);
7358         if( status ) exit( status );
7359
7360         /* make sure pthread_detach() isn't just a stub */
7361 #if HAVE_PTHREADS_D4
7362         status = pthread_detach( &t );
7363 #else
7364         status = pthread_detach( t );
7365 #endif
7366
7367 #ifdef HAVE_LINUX_THREADS
7368         pthread_kill_other_threads_np();
7369 #endif
7370
7371         exit( status );
7372
7373 ; return 0; }
7374 EOF
7375 if { (eval echo configure:7376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7376   rm -rf conftest*
7377   ol_cv_pthread_kthread=yes
7378 else
7379   echo "configure: failed program was:" >&5
7380   cat conftest.$ac_ext >&5
7381   rm -rf conftest*
7382   ol_cv_pthread_kthread=no
7383 fi
7384 rm -f conftest*
7385 else
7386   cat > conftest.$ac_ext <<EOF
7387 #line 7388 "configure"
7388 #include "confdefs.h"
7389 /* pthread test headers */
7390 #include <pthread.h>
7391 #ifndef NULL
7392 #define NULL (void*)0
7393 #endif
7394
7395 static void *task(p)
7396         void *p;
7397 {
7398         return (void *) (p == NULL);
7399 }
7400
7401
7402 int main(argc, argv)
7403         int argc;
7404         char **argv;
7405 {
7406
7407         /* pthread test function */
7408         pthread_t t;
7409         int status;
7410 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7411         /* This system (e.g. AIX) defaults detached; must override */
7412         pthread_attr_t attr;
7413
7414         status = pthread_attr_init(&attr);
7415         if( status ) exit( status );
7416
7417         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7418         if( status ) exit( status );
7419
7420 #define ATTR    &attr
7421 #else
7422 #if HAVE_PTHREADS_D4
7423 #define ATTR    pthread_attr_default
7424 #else
7425 #define ATTR    NULL
7426 #endif
7427 #endif
7428         /* make sure pthread_create() isn't just a stub */
7429         status = pthread_create(&t, ATTR, task, NULL);
7430         if( status ) exit( status );
7431
7432         /* make sure pthread_detach() isn't just a stub */
7433 #if HAVE_PTHREADS_D4
7434         status = pthread_detach( &t );
7435 #else
7436         status = pthread_detach( t );
7437 #endif
7438
7439 #ifdef HAVE_LINUX_THREADS
7440         pthread_kill_other_threads_np();
7441 #endif
7442
7443         exit( status );
7444
7445 }
7446
7447 EOF
7448 if { (eval echo configure:7449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7449 then
7450   ol_cv_pthread_kthread=yes
7451 else
7452   echo "configure: failed program was:" >&5
7453   cat conftest.$ac_ext >&5
7454   rm -fr conftest*
7455   ol_cv_pthread_kthread=no
7456 fi
7457 rm -fr conftest*
7458 fi
7459
7460
7461                 # restore the LIBS
7462                 LIBS="$ol_LIBS"
7463         
7464 fi
7465
7466 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7467
7468         if test $ol_cv_pthread_kthread = yes ; then
7469                 ol_link_pthreads="-kthread"
7470                 ol_link_threads=posix
7471         fi
7472 fi
7473
7474                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7475 if test "$ol_link_threads" = no ; then
7476         # try -pthread
7477         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7478 echo "configure:7479: checking for pthread link with -pthread" >&5
7479 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7480   echo $ac_n "(cached) $ac_c" 1>&6
7481 else
7482   
7483                 # save the flags
7484                 ol_LIBS="$LIBS"
7485                 LIBS="-pthread $LIBS"
7486
7487                 if test "$cross_compiling" = yes; then
7488   cat > conftest.$ac_ext <<EOF
7489 #line 7490 "configure"
7490 #include "confdefs.h"
7491 /* pthread test headers */
7492 #include <pthread.h>
7493 #ifndef NULL
7494 #define NULL (void*)0
7495 #endif
7496
7497 static void *task(p)
7498         void *p;
7499 {
7500         return (void *) (p == NULL);
7501 }
7502
7503 int main() {
7504
7505         /* pthread test function */
7506         pthread_t t;
7507         int status;
7508 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7509         /* This system (e.g. AIX) defaults detached; must override */
7510         pthread_attr_t attr;
7511
7512         status = pthread_attr_init(&attr);
7513         if( status ) exit( status );
7514
7515         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7516         if( status ) exit( status );
7517
7518 #define ATTR    &attr
7519 #else
7520 #if HAVE_PTHREADS_D4
7521 #define ATTR    pthread_attr_default
7522 #else
7523 #define ATTR    NULL
7524 #endif
7525 #endif
7526         /* make sure pthread_create() isn't just a stub */
7527         status = pthread_create(&t, ATTR, task, NULL);
7528         if( status ) exit( status );
7529
7530         /* make sure pthread_detach() isn't just a stub */
7531 #if HAVE_PTHREADS_D4
7532         status = pthread_detach( &t );
7533 #else
7534         status = pthread_detach( t );
7535 #endif
7536
7537 #ifdef HAVE_LINUX_THREADS
7538         pthread_kill_other_threads_np();
7539 #endif
7540
7541         exit( status );
7542
7543 ; return 0; }
7544 EOF
7545 if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7546   rm -rf conftest*
7547   ol_cv_pthread_pthread=yes
7548 else
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -rf conftest*
7552   ol_cv_pthread_pthread=no
7553 fi
7554 rm -f conftest*
7555 else
7556   cat > conftest.$ac_ext <<EOF
7557 #line 7558 "configure"
7558 #include "confdefs.h"
7559 /* pthread test headers */
7560 #include <pthread.h>
7561 #ifndef NULL
7562 #define NULL (void*)0
7563 #endif
7564
7565 static void *task(p)
7566         void *p;
7567 {
7568         return (void *) (p == NULL);
7569 }
7570
7571
7572 int main(argc, argv)
7573         int argc;
7574         char **argv;
7575 {
7576
7577         /* pthread test function */
7578         pthread_t t;
7579         int status;
7580 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7581         /* This system (e.g. AIX) defaults detached; must override */
7582         pthread_attr_t attr;
7583
7584         status = pthread_attr_init(&attr);
7585         if( status ) exit( status );
7586
7587         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7588         if( status ) exit( status );
7589
7590 #define ATTR    &attr
7591 #else
7592 #if HAVE_PTHREADS_D4
7593 #define ATTR    pthread_attr_default
7594 #else
7595 #define ATTR    NULL
7596 #endif
7597 #endif
7598         /* make sure pthread_create() isn't just a stub */
7599         status = pthread_create(&t, ATTR, task, NULL);
7600         if( status ) exit( status );
7601
7602         /* make sure pthread_detach() isn't just a stub */
7603 #if HAVE_PTHREADS_D4
7604         status = pthread_detach( &t );
7605 #else
7606         status = pthread_detach( t );
7607 #endif
7608
7609 #ifdef HAVE_LINUX_THREADS
7610         pthread_kill_other_threads_np();
7611 #endif
7612
7613         exit( status );
7614
7615 }
7616
7617 EOF
7618 if { (eval echo configure:7619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7619 then
7620   ol_cv_pthread_pthread=yes
7621 else
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -fr conftest*
7625   ol_cv_pthread_pthread=no
7626 fi
7627 rm -fr conftest*
7628 fi
7629
7630
7631                 # restore the LIBS
7632                 LIBS="$ol_LIBS"
7633         
7634 fi
7635
7636 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7637
7638         if test $ol_cv_pthread_pthread = yes ; then
7639                 ol_link_pthreads="-pthread"
7640                 ol_link_threads=posix
7641         fi
7642 fi
7643
7644                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7645 if test "$ol_link_threads" = no ; then
7646         # try -pthreads
7647         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7648 echo "configure:7649: checking for pthread link with -pthreads" >&5
7649 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7650   echo $ac_n "(cached) $ac_c" 1>&6
7651 else
7652   
7653                 # save the flags
7654                 ol_LIBS="$LIBS"
7655                 LIBS="-pthreads $LIBS"
7656
7657                 if test "$cross_compiling" = yes; then
7658   cat > conftest.$ac_ext <<EOF
7659 #line 7660 "configure"
7660 #include "confdefs.h"
7661 /* pthread test headers */
7662 #include <pthread.h>
7663 #ifndef NULL
7664 #define NULL (void*)0
7665 #endif
7666
7667 static void *task(p)
7668         void *p;
7669 {
7670         return (void *) (p == NULL);
7671 }
7672
7673 int main() {
7674
7675         /* pthread test function */
7676         pthread_t t;
7677         int status;
7678 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7679         /* This system (e.g. AIX) defaults detached; must override */
7680         pthread_attr_t attr;
7681
7682         status = pthread_attr_init(&attr);
7683         if( status ) exit( status );
7684
7685         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7686         if( status ) exit( status );
7687
7688 #define ATTR    &attr
7689 #else
7690 #if HAVE_PTHREADS_D4
7691 #define ATTR    pthread_attr_default
7692 #else
7693 #define ATTR    NULL
7694 #endif
7695 #endif
7696         /* make sure pthread_create() isn't just a stub */
7697         status = pthread_create(&t, ATTR, task, NULL);
7698         if( status ) exit( status );
7699
7700         /* make sure pthread_detach() isn't just a stub */
7701 #if HAVE_PTHREADS_D4
7702         status = pthread_detach( &t );
7703 #else
7704         status = pthread_detach( t );
7705 #endif
7706
7707 #ifdef HAVE_LINUX_THREADS
7708         pthread_kill_other_threads_np();
7709 #endif
7710
7711         exit( status );
7712
7713 ; return 0; }
7714 EOF
7715 if { (eval echo configure:7716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7716   rm -rf conftest*
7717   ol_cv_pthread_pthreads=yes
7718 else
7719   echo "configure: failed program was:" >&5
7720   cat conftest.$ac_ext >&5
7721   rm -rf conftest*
7722   ol_cv_pthread_pthreads=no
7723 fi
7724 rm -f conftest*
7725 else
7726   cat > conftest.$ac_ext <<EOF
7727 #line 7728 "configure"
7728 #include "confdefs.h"
7729 /* pthread test headers */
7730 #include <pthread.h>
7731 #ifndef NULL
7732 #define NULL (void*)0
7733 #endif
7734
7735 static void *task(p)
7736         void *p;
7737 {
7738         return (void *) (p == NULL);
7739 }
7740
7741
7742 int main(argc, argv)
7743         int argc;
7744         char **argv;
7745 {
7746
7747         /* pthread test function */
7748         pthread_t t;
7749         int status;
7750 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7751         /* This system (e.g. AIX) defaults detached; must override */
7752         pthread_attr_t attr;
7753
7754         status = pthread_attr_init(&attr);
7755         if( status ) exit( status );
7756
7757         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7758         if( status ) exit( status );
7759
7760 #define ATTR    &attr
7761 #else
7762 #if HAVE_PTHREADS_D4
7763 #define ATTR    pthread_attr_default
7764 #else
7765 #define ATTR    NULL
7766 #endif
7767 #endif
7768         /* make sure pthread_create() isn't just a stub */
7769         status = pthread_create(&t, ATTR, task, NULL);
7770         if( status ) exit( status );
7771
7772         /* make sure pthread_detach() isn't just a stub */
7773 #if HAVE_PTHREADS_D4
7774         status = pthread_detach( &t );
7775 #else
7776         status = pthread_detach( t );
7777 #endif
7778
7779 #ifdef HAVE_LINUX_THREADS
7780         pthread_kill_other_threads_np();
7781 #endif
7782
7783         exit( status );
7784
7785 }
7786
7787 EOF
7788 if { (eval echo configure:7789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7789 then
7790   ol_cv_pthread_pthreads=yes
7791 else
7792   echo "configure: failed program was:" >&5
7793   cat conftest.$ac_ext >&5
7794   rm -fr conftest*
7795   ol_cv_pthread_pthreads=no
7796 fi
7797 rm -fr conftest*
7798 fi
7799
7800
7801                 # restore the LIBS
7802                 LIBS="$ol_LIBS"
7803         
7804 fi
7805
7806 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7807
7808         if test $ol_cv_pthread_pthreads = yes ; then
7809                 ol_link_pthreads="-pthreads"
7810                 ol_link_threads=posix
7811         fi
7812 fi
7813
7814                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7815 if test "$ol_link_threads" = no ; then
7816         # try -mthreads
7817         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7818 echo "configure:7819: checking for pthread link with -mthreads" >&5
7819 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7820   echo $ac_n "(cached) $ac_c" 1>&6
7821 else
7822   
7823                 # save the flags
7824                 ol_LIBS="$LIBS"
7825                 LIBS="-mthreads $LIBS"
7826
7827                 if test "$cross_compiling" = yes; then
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 /* pthread test headers */
7832 #include <pthread.h>
7833 #ifndef NULL
7834 #define NULL (void*)0
7835 #endif
7836
7837 static void *task(p)
7838         void *p;
7839 {
7840         return (void *) (p == NULL);
7841 }
7842
7843 int main() {
7844
7845         /* pthread test function */
7846         pthread_t t;
7847         int status;
7848 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7849         /* This system (e.g. AIX) defaults detached; must override */
7850         pthread_attr_t attr;
7851
7852         status = pthread_attr_init(&attr);
7853         if( status ) exit( status );
7854
7855         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7856         if( status ) exit( status );
7857
7858 #define ATTR    &attr
7859 #else
7860 #if HAVE_PTHREADS_D4
7861 #define ATTR    pthread_attr_default
7862 #else
7863 #define ATTR    NULL
7864 #endif
7865 #endif
7866         /* make sure pthread_create() isn't just a stub */
7867         status = pthread_create(&t, ATTR, task, NULL);
7868         if( status ) exit( status );
7869
7870         /* make sure pthread_detach() isn't just a stub */
7871 #if HAVE_PTHREADS_D4
7872         status = pthread_detach( &t );
7873 #else
7874         status = pthread_detach( t );
7875 #endif
7876
7877 #ifdef HAVE_LINUX_THREADS
7878         pthread_kill_other_threads_np();
7879 #endif
7880
7881         exit( status );
7882
7883 ; return 0; }
7884 EOF
7885 if { (eval echo configure:7886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7886   rm -rf conftest*
7887   ol_cv_pthread_mthreads=yes
7888 else
7889   echo "configure: failed program was:" >&5
7890   cat conftest.$ac_ext >&5
7891   rm -rf conftest*
7892   ol_cv_pthread_mthreads=no
7893 fi
7894 rm -f conftest*
7895 else
7896   cat > conftest.$ac_ext <<EOF
7897 #line 7898 "configure"
7898 #include "confdefs.h"
7899 /* pthread test headers */
7900 #include <pthread.h>
7901 #ifndef NULL
7902 #define NULL (void*)0
7903 #endif
7904
7905 static void *task(p)
7906         void *p;
7907 {
7908         return (void *) (p == NULL);
7909 }
7910
7911
7912 int main(argc, argv)
7913         int argc;
7914         char **argv;
7915 {
7916
7917         /* pthread test function */
7918         pthread_t t;
7919         int status;
7920 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7921         /* This system (e.g. AIX) defaults detached; must override */
7922         pthread_attr_t attr;
7923
7924         status = pthread_attr_init(&attr);
7925         if( status ) exit( status );
7926
7927         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7928         if( status ) exit( status );
7929
7930 #define ATTR    &attr
7931 #else
7932 #if HAVE_PTHREADS_D4
7933 #define ATTR    pthread_attr_default
7934 #else
7935 #define ATTR    NULL
7936 #endif
7937 #endif
7938         /* make sure pthread_create() isn't just a stub */
7939         status = pthread_create(&t, ATTR, task, NULL);
7940         if( status ) exit( status );
7941
7942         /* make sure pthread_detach() isn't just a stub */
7943 #if HAVE_PTHREADS_D4
7944         status = pthread_detach( &t );
7945 #else
7946         status = pthread_detach( t );
7947 #endif
7948
7949 #ifdef HAVE_LINUX_THREADS
7950         pthread_kill_other_threads_np();
7951 #endif
7952
7953         exit( status );
7954
7955 }
7956
7957 EOF
7958 if { (eval echo configure:7959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7959 then
7960   ol_cv_pthread_mthreads=yes
7961 else
7962   echo "configure: failed program was:" >&5
7963   cat conftest.$ac_ext >&5
7964   rm -fr conftest*
7965   ol_cv_pthread_mthreads=no
7966 fi
7967 rm -fr conftest*
7968 fi
7969
7970
7971                 # restore the LIBS
7972                 LIBS="$ol_LIBS"
7973         
7974 fi
7975
7976 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7977
7978         if test $ol_cv_pthread_mthreads = yes ; then
7979                 ol_link_pthreads="-mthreads"
7980                 ol_link_threads=posix
7981         fi
7982 fi
7983
7984                 # Pthread try link: -thread (ol_cv_pthread_thread)
7985 if test "$ol_link_threads" = no ; then
7986         # try -thread
7987         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7988 echo "configure:7989: checking for pthread link with -thread" >&5
7989 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   
7993                 # save the flags
7994                 ol_LIBS="$LIBS"
7995                 LIBS="-thread $LIBS"
7996
7997                 if test "$cross_compiling" = yes; then
7998   cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 /* pthread test headers */
8002 #include <pthread.h>
8003 #ifndef NULL
8004 #define NULL (void*)0
8005 #endif
8006
8007 static void *task(p)
8008         void *p;
8009 {
8010         return (void *) (p == NULL);
8011 }
8012
8013 int main() {
8014
8015         /* pthread test function */
8016         pthread_t t;
8017         int status;
8018 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8019         /* This system (e.g. AIX) defaults detached; must override */
8020         pthread_attr_t attr;
8021
8022         status = pthread_attr_init(&attr);
8023         if( status ) exit( status );
8024
8025         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8026         if( status ) exit( status );
8027
8028 #define ATTR    &attr
8029 #else
8030 #if HAVE_PTHREADS_D4
8031 #define ATTR    pthread_attr_default
8032 #else
8033 #define ATTR    NULL
8034 #endif
8035 #endif
8036         /* make sure pthread_create() isn't just a stub */
8037         status = pthread_create(&t, ATTR, task, NULL);
8038         if( status ) exit( status );
8039
8040         /* make sure pthread_detach() isn't just a stub */
8041 #if HAVE_PTHREADS_D4
8042         status = pthread_detach( &t );
8043 #else
8044         status = pthread_detach( t );
8045 #endif
8046
8047 #ifdef HAVE_LINUX_THREADS
8048         pthread_kill_other_threads_np();
8049 #endif
8050
8051         exit( status );
8052
8053 ; return 0; }
8054 EOF
8055 if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8056   rm -rf conftest*
8057   ol_cv_pthread_thread=yes
8058 else
8059   echo "configure: failed program was:" >&5
8060   cat conftest.$ac_ext >&5
8061   rm -rf conftest*
8062   ol_cv_pthread_thread=no
8063 fi
8064 rm -f conftest*
8065 else
8066   cat > conftest.$ac_ext <<EOF
8067 #line 8068 "configure"
8068 #include "confdefs.h"
8069 /* pthread test headers */
8070 #include <pthread.h>
8071 #ifndef NULL
8072 #define NULL (void*)0
8073 #endif
8074
8075 static void *task(p)
8076         void *p;
8077 {
8078         return (void *) (p == NULL);
8079 }
8080
8081
8082 int main(argc, argv)
8083         int argc;
8084         char **argv;
8085 {
8086
8087         /* pthread test function */
8088         pthread_t t;
8089         int status;
8090 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8091         /* This system (e.g. AIX) defaults detached; must override */
8092         pthread_attr_t attr;
8093
8094         status = pthread_attr_init(&attr);
8095         if( status ) exit( status );
8096
8097         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8098         if( status ) exit( status );
8099
8100 #define ATTR    &attr
8101 #else
8102 #if HAVE_PTHREADS_D4
8103 #define ATTR    pthread_attr_default
8104 #else
8105 #define ATTR    NULL
8106 #endif
8107 #endif
8108         /* make sure pthread_create() isn't just a stub */
8109         status = pthread_create(&t, ATTR, task, NULL);
8110         if( status ) exit( status );
8111
8112         /* make sure pthread_detach() isn't just a stub */
8113 #if HAVE_PTHREADS_D4
8114         status = pthread_detach( &t );
8115 #else
8116         status = pthread_detach( t );
8117 #endif
8118
8119 #ifdef HAVE_LINUX_THREADS
8120         pthread_kill_other_threads_np();
8121 #endif
8122
8123         exit( status );
8124
8125 }
8126
8127 EOF
8128 if { (eval echo configure:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8129 then
8130   ol_cv_pthread_thread=yes
8131 else
8132   echo "configure: failed program was:" >&5
8133   cat conftest.$ac_ext >&5
8134   rm -fr conftest*
8135   ol_cv_pthread_thread=no
8136 fi
8137 rm -fr conftest*
8138 fi
8139
8140
8141                 # restore the LIBS
8142                 LIBS="$ol_LIBS"
8143         
8144 fi
8145
8146 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8147
8148         if test $ol_cv_pthread_thread = yes ; then
8149                 ol_link_pthreads="-thread"
8150                 ol_link_threads=posix
8151         fi
8152 fi
8153
8154
8155                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8156 if test "$ol_link_threads" = no ; then
8157         # try -lpthread -lmach -lexc -lc_r
8158         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8159 echo "configure:8160: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8160 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8161   echo $ac_n "(cached) $ac_c" 1>&6
8162 else
8163   
8164                 # save the flags
8165                 ol_LIBS="$LIBS"
8166                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8167
8168                 if test "$cross_compiling" = yes; then
8169   cat > conftest.$ac_ext <<EOF
8170 #line 8171 "configure"
8171 #include "confdefs.h"
8172 /* pthread test headers */
8173 #include <pthread.h>
8174 #ifndef NULL
8175 #define NULL (void*)0
8176 #endif
8177
8178 static void *task(p)
8179         void *p;
8180 {
8181         return (void *) (p == NULL);
8182 }
8183
8184 int main() {
8185
8186         /* pthread test function */
8187         pthread_t t;
8188         int status;
8189 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8190         /* This system (e.g. AIX) defaults detached; must override */
8191         pthread_attr_t attr;
8192
8193         status = pthread_attr_init(&attr);
8194         if( status ) exit( status );
8195
8196         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8197         if( status ) exit( status );
8198
8199 #define ATTR    &attr
8200 #else
8201 #if HAVE_PTHREADS_D4
8202 #define ATTR    pthread_attr_default
8203 #else
8204 #define ATTR    NULL
8205 #endif
8206 #endif
8207         /* make sure pthread_create() isn't just a stub */
8208         status = pthread_create(&t, ATTR, task, NULL);
8209         if( status ) exit( status );
8210
8211         /* make sure pthread_detach() isn't just a stub */
8212 #if HAVE_PTHREADS_D4
8213         status = pthread_detach( &t );
8214 #else
8215         status = pthread_detach( t );
8216 #endif
8217
8218 #ifdef HAVE_LINUX_THREADS
8219         pthread_kill_other_threads_np();
8220 #endif
8221
8222         exit( status );
8223
8224 ; return 0; }
8225 EOF
8226 if { (eval echo configure:8227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8227   rm -rf conftest*
8228   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8229 else
8230   echo "configure: failed program was:" >&5
8231   cat conftest.$ac_ext >&5
8232   rm -rf conftest*
8233   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8234 fi
8235 rm -f conftest*
8236 else
8237   cat > conftest.$ac_ext <<EOF
8238 #line 8239 "configure"
8239 #include "confdefs.h"
8240 /* pthread test headers */
8241 #include <pthread.h>
8242 #ifndef NULL
8243 #define NULL (void*)0
8244 #endif
8245
8246 static void *task(p)
8247         void *p;
8248 {
8249         return (void *) (p == NULL);
8250 }
8251
8252
8253 int main(argc, argv)
8254         int argc;
8255         char **argv;
8256 {
8257
8258         /* pthread test function */
8259         pthread_t t;
8260         int status;
8261 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8262         /* This system (e.g. AIX) defaults detached; must override */
8263         pthread_attr_t attr;
8264
8265         status = pthread_attr_init(&attr);
8266         if( status ) exit( status );
8267
8268         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8269         if( status ) exit( status );
8270
8271 #define ATTR    &attr
8272 #else
8273 #if HAVE_PTHREADS_D4
8274 #define ATTR    pthread_attr_default
8275 #else
8276 #define ATTR    NULL
8277 #endif
8278 #endif
8279         /* make sure pthread_create() isn't just a stub */
8280         status = pthread_create(&t, ATTR, task, NULL);
8281         if( status ) exit( status );
8282
8283         /* make sure pthread_detach() isn't just a stub */
8284 #if HAVE_PTHREADS_D4
8285         status = pthread_detach( &t );
8286 #else
8287         status = pthread_detach( t );
8288 #endif
8289
8290 #ifdef HAVE_LINUX_THREADS
8291         pthread_kill_other_threads_np();
8292 #endif
8293
8294         exit( status );
8295
8296 }
8297
8298 EOF
8299 if { (eval echo configure:8300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8300 then
8301   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8302 else
8303   echo "configure: failed program was:" >&5
8304   cat conftest.$ac_ext >&5
8305   rm -fr conftest*
8306   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8307 fi
8308 rm -fr conftest*
8309 fi
8310
8311
8312                 # restore the LIBS
8313                 LIBS="$ol_LIBS"
8314         
8315 fi
8316
8317 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8318
8319         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8320                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8321                 ol_link_threads=posix
8322         fi
8323 fi
8324
8325                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8326 if test "$ol_link_threads" = no ; then
8327         # try -lpthread -lmach -lexc
8328         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8329 echo "configure:8330: checking for pthread link with -lpthread -lmach -lexc" >&5
8330 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8331   echo $ac_n "(cached) $ac_c" 1>&6
8332 else
8333   
8334                 # save the flags
8335                 ol_LIBS="$LIBS"
8336                 LIBS="-lpthread -lmach -lexc $LIBS"
8337
8338                 if test "$cross_compiling" = yes; then
8339   cat > conftest.$ac_ext <<EOF
8340 #line 8341 "configure"
8341 #include "confdefs.h"
8342 /* pthread test headers */
8343 #include <pthread.h>
8344 #ifndef NULL
8345 #define NULL (void*)0
8346 #endif
8347
8348 static void *task(p)
8349         void *p;
8350 {
8351         return (void *) (p == NULL);
8352 }
8353
8354 int main() {
8355
8356         /* pthread test function */
8357         pthread_t t;
8358         int status;
8359 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8360         /* This system (e.g. AIX) defaults detached; must override */
8361         pthread_attr_t attr;
8362
8363         status = pthread_attr_init(&attr);
8364         if( status ) exit( status );
8365
8366         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8367         if( status ) exit( status );
8368
8369 #define ATTR    &attr
8370 #else
8371 #if HAVE_PTHREADS_D4
8372 #define ATTR    pthread_attr_default
8373 #else
8374 #define ATTR    NULL
8375 #endif
8376 #endif
8377         /* make sure pthread_create() isn't just a stub */
8378         status = pthread_create(&t, ATTR, task, NULL);
8379         if( status ) exit( status );
8380
8381         /* make sure pthread_detach() isn't just a stub */
8382 #if HAVE_PTHREADS_D4
8383         status = pthread_detach( &t );
8384 #else
8385         status = pthread_detach( t );
8386 #endif
8387
8388 #ifdef HAVE_LINUX_THREADS
8389         pthread_kill_other_threads_np();
8390 #endif
8391
8392         exit( status );
8393
8394 ; return 0; }
8395 EOF
8396 if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8397   rm -rf conftest*
8398   ol_cv_pthread_lpthread_lmach_lexc=yes
8399 else
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -rf conftest*
8403   ol_cv_pthread_lpthread_lmach_lexc=no
8404 fi
8405 rm -f conftest*
8406 else
8407   cat > conftest.$ac_ext <<EOF
8408 #line 8409 "configure"
8409 #include "confdefs.h"
8410 /* pthread test headers */
8411 #include <pthread.h>
8412 #ifndef NULL
8413 #define NULL (void*)0
8414 #endif
8415
8416 static void *task(p)
8417         void *p;
8418 {
8419         return (void *) (p == NULL);
8420 }
8421
8422
8423 int main(argc, argv)
8424         int argc;
8425         char **argv;
8426 {
8427
8428         /* pthread test function */
8429         pthread_t t;
8430         int status;
8431 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8432         /* This system (e.g. AIX) defaults detached; must override */
8433         pthread_attr_t attr;
8434
8435         status = pthread_attr_init(&attr);
8436         if( status ) exit( status );
8437
8438         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8439         if( status ) exit( status );
8440
8441 #define ATTR    &attr
8442 #else
8443 #if HAVE_PTHREADS_D4
8444 #define ATTR    pthread_attr_default
8445 #else
8446 #define ATTR    NULL
8447 #endif
8448 #endif
8449         /* make sure pthread_create() isn't just a stub */
8450         status = pthread_create(&t, ATTR, task, NULL);
8451         if( status ) exit( status );
8452
8453         /* make sure pthread_detach() isn't just a stub */
8454 #if HAVE_PTHREADS_D4
8455         status = pthread_detach( &t );
8456 #else
8457         status = pthread_detach( t );
8458 #endif
8459
8460 #ifdef HAVE_LINUX_THREADS
8461         pthread_kill_other_threads_np();
8462 #endif
8463
8464         exit( status );
8465
8466 }
8467
8468 EOF
8469 if { (eval echo configure:8470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8470 then
8471   ol_cv_pthread_lpthread_lmach_lexc=yes
8472 else
8473   echo "configure: failed program was:" >&5
8474   cat conftest.$ac_ext >&5
8475   rm -fr conftest*
8476   ol_cv_pthread_lpthread_lmach_lexc=no
8477 fi
8478 rm -fr conftest*
8479 fi
8480
8481
8482                 # restore the LIBS
8483                 LIBS="$ol_LIBS"
8484         
8485 fi
8486
8487 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8488
8489         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8490                 ol_link_pthreads="-lpthread -lmach -lexc"
8491                 ol_link_threads=posix
8492         fi
8493 fi
8494
8495
8496                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8497 if test "$ol_link_threads" = no ; then
8498         # try -lpthread -Wl,-woff,85
8499         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8500 echo "configure:8501: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8501 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8502   echo $ac_n "(cached) $ac_c" 1>&6
8503 else
8504   
8505                 # save the flags
8506                 ol_LIBS="$LIBS"
8507                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8508
8509                 if test "$cross_compiling" = yes; then
8510   cat > conftest.$ac_ext <<EOF
8511 #line 8512 "configure"
8512 #include "confdefs.h"
8513 /* pthread test headers */
8514 #include <pthread.h>
8515 #ifndef NULL
8516 #define NULL (void*)0
8517 #endif
8518
8519 static void *task(p)
8520         void *p;
8521 {
8522         return (void *) (p == NULL);
8523 }
8524
8525 int main() {
8526
8527         /* pthread test function */
8528         pthread_t t;
8529         int status;
8530 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8531         /* This system (e.g. AIX) defaults detached; must override */
8532         pthread_attr_t attr;
8533
8534         status = pthread_attr_init(&attr);
8535         if( status ) exit( status );
8536
8537         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8538         if( status ) exit( status );
8539
8540 #define ATTR    &attr
8541 #else
8542 #if HAVE_PTHREADS_D4
8543 #define ATTR    pthread_attr_default
8544 #else
8545 #define ATTR    NULL
8546 #endif
8547 #endif
8548         /* make sure pthread_create() isn't just a stub */
8549         status = pthread_create(&t, ATTR, task, NULL);
8550         if( status ) exit( status );
8551
8552         /* make sure pthread_detach() isn't just a stub */
8553 #if HAVE_PTHREADS_D4
8554         status = pthread_detach( &t );
8555 #else
8556         status = pthread_detach( t );
8557 #endif
8558
8559 #ifdef HAVE_LINUX_THREADS
8560         pthread_kill_other_threads_np();
8561 #endif
8562
8563         exit( status );
8564
8565 ; return 0; }
8566 EOF
8567 if { (eval echo configure:8568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8568   rm -rf conftest*
8569   ol_cv_pthread_lib_lpthread_woff=yes
8570 else
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   ol_cv_pthread_lib_lpthread_woff=no
8575 fi
8576 rm -f conftest*
8577 else
8578   cat > conftest.$ac_ext <<EOF
8579 #line 8580 "configure"
8580 #include "confdefs.h"
8581 /* pthread test headers */
8582 #include <pthread.h>
8583 #ifndef NULL
8584 #define NULL (void*)0
8585 #endif
8586
8587 static void *task(p)
8588         void *p;
8589 {
8590         return (void *) (p == NULL);
8591 }
8592
8593
8594 int main(argc, argv)
8595         int argc;
8596         char **argv;
8597 {
8598
8599         /* pthread test function */
8600         pthread_t t;
8601         int status;
8602 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8603         /* This system (e.g. AIX) defaults detached; must override */
8604         pthread_attr_t attr;
8605
8606         status = pthread_attr_init(&attr);
8607         if( status ) exit( status );
8608
8609         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8610         if( status ) exit( status );
8611
8612 #define ATTR    &attr
8613 #else
8614 #if HAVE_PTHREADS_D4
8615 #define ATTR    pthread_attr_default
8616 #else
8617 #define ATTR    NULL
8618 #endif
8619 #endif
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         /* make sure pthread_detach() isn't just a stub */
8625 #if HAVE_PTHREADS_D4
8626         status = pthread_detach( &t );
8627 #else
8628         status = pthread_detach( t );
8629 #endif
8630
8631 #ifdef HAVE_LINUX_THREADS
8632         pthread_kill_other_threads_np();
8633 #endif
8634
8635         exit( status );
8636
8637 }
8638
8639 EOF
8640 if { (eval echo configure:8641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8641 then
8642   ol_cv_pthread_lib_lpthread_woff=yes
8643 else
8644   echo "configure: failed program was:" >&5
8645   cat conftest.$ac_ext >&5
8646   rm -fr conftest*
8647   ol_cv_pthread_lib_lpthread_woff=no
8648 fi
8649 rm -fr conftest*
8650 fi
8651
8652
8653                 # restore the LIBS
8654                 LIBS="$ol_LIBS"
8655         
8656 fi
8657
8658 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8659
8660         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8661                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8662                 ol_link_threads=posix
8663         fi
8664 fi
8665
8666
8667                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8668 if test "$ol_link_threads" = no ; then
8669         # try -lpthread
8670         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8671 echo "configure:8672: checking for pthread link with -lpthread" >&5
8672 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8673   echo $ac_n "(cached) $ac_c" 1>&6
8674 else
8675   
8676                 # save the flags
8677                 ol_LIBS="$LIBS"
8678                 LIBS="-lpthread $LIBS"
8679
8680                 if test "$cross_compiling" = yes; then
8681   cat > conftest.$ac_ext <<EOF
8682 #line 8683 "configure"
8683 #include "confdefs.h"
8684 /* pthread test headers */
8685 #include <pthread.h>
8686 #ifndef NULL
8687 #define NULL (void*)0
8688 #endif
8689
8690 static void *task(p)
8691         void *p;
8692 {
8693         return (void *) (p == NULL);
8694 }
8695
8696 int main() {
8697
8698         /* pthread test function */
8699         pthread_t t;
8700         int status;
8701 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8702         /* This system (e.g. AIX) defaults detached; must override */
8703         pthread_attr_t attr;
8704
8705         status = pthread_attr_init(&attr);
8706         if( status ) exit( status );
8707
8708         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8709         if( status ) exit( status );
8710
8711 #define ATTR    &attr
8712 #else
8713 #if HAVE_PTHREADS_D4
8714 #define ATTR    pthread_attr_default
8715 #else
8716 #define ATTR    NULL
8717 #endif
8718 #endif
8719         /* make sure pthread_create() isn't just a stub */
8720         status = pthread_create(&t, ATTR, task, NULL);
8721         if( status ) exit( status );
8722
8723         /* make sure pthread_detach() isn't just a stub */
8724 #if HAVE_PTHREADS_D4
8725         status = pthread_detach( &t );
8726 #else
8727         status = pthread_detach( t );
8728 #endif
8729
8730 #ifdef HAVE_LINUX_THREADS
8731         pthread_kill_other_threads_np();
8732 #endif
8733
8734         exit( status );
8735
8736 ; return 0; }
8737 EOF
8738 if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8739   rm -rf conftest*
8740   ol_cv_pthread_lpthread=yes
8741 else
8742   echo "configure: failed program was:" >&5
8743   cat conftest.$ac_ext >&5
8744   rm -rf conftest*
8745   ol_cv_pthread_lpthread=no
8746 fi
8747 rm -f conftest*
8748 else
8749   cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752 /* pthread test headers */
8753 #include <pthread.h>
8754 #ifndef NULL
8755 #define NULL (void*)0
8756 #endif
8757
8758 static void *task(p)
8759         void *p;
8760 {
8761         return (void *) (p == NULL);
8762 }
8763
8764
8765 int main(argc, argv)
8766         int argc;
8767         char **argv;
8768 {
8769
8770         /* pthread test function */
8771         pthread_t t;
8772         int status;
8773 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8774         /* This system (e.g. AIX) defaults detached; must override */
8775         pthread_attr_t attr;
8776
8777         status = pthread_attr_init(&attr);
8778         if( status ) exit( status );
8779
8780         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8781         if( status ) exit( status );
8782
8783 #define ATTR    &attr
8784 #else
8785 #if HAVE_PTHREADS_D4
8786 #define ATTR    pthread_attr_default
8787 #else
8788 #define ATTR    NULL
8789 #endif
8790 #endif
8791         /* make sure pthread_create() isn't just a stub */
8792         status = pthread_create(&t, ATTR, task, NULL);
8793         if( status ) exit( status );
8794
8795         /* make sure pthread_detach() isn't just a stub */
8796 #if HAVE_PTHREADS_D4
8797         status = pthread_detach( &t );
8798 #else
8799         status = pthread_detach( t );
8800 #endif
8801
8802 #ifdef HAVE_LINUX_THREADS
8803         pthread_kill_other_threads_np();
8804 #endif
8805
8806         exit( status );
8807
8808 }
8809
8810 EOF
8811 if { (eval echo configure:8812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8812 then
8813   ol_cv_pthread_lpthread=yes
8814 else
8815   echo "configure: failed program was:" >&5
8816   cat conftest.$ac_ext >&5
8817   rm -fr conftest*
8818   ol_cv_pthread_lpthread=no
8819 fi
8820 rm -fr conftest*
8821 fi
8822
8823
8824                 # restore the LIBS
8825                 LIBS="$ol_LIBS"
8826         
8827 fi
8828
8829 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8830
8831         if test $ol_cv_pthread_lpthread = yes ; then
8832                 ol_link_pthreads="-lpthread"
8833                 ol_link_threads=posix
8834         fi
8835 fi
8836
8837                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8838 if test "$ol_link_threads" = no ; then
8839         # try -lc_r
8840         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8841 echo "configure:8842: checking for pthread link with -lc_r" >&5
8842 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8843   echo $ac_n "(cached) $ac_c" 1>&6
8844 else
8845   
8846                 # save the flags
8847                 ol_LIBS="$LIBS"
8848                 LIBS="-lc_r $LIBS"
8849
8850                 if test "$cross_compiling" = yes; then
8851   cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854 /* pthread test headers */
8855 #include <pthread.h>
8856 #ifndef NULL
8857 #define NULL (void*)0
8858 #endif
8859
8860 static void *task(p)
8861         void *p;
8862 {
8863         return (void *) (p == NULL);
8864 }
8865
8866 int main() {
8867
8868         /* pthread test function */
8869         pthread_t t;
8870         int status;
8871 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8872         /* This system (e.g. AIX) defaults detached; must override */
8873         pthread_attr_t attr;
8874
8875         status = pthread_attr_init(&attr);
8876         if( status ) exit( status );
8877
8878         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8879         if( status ) exit( status );
8880
8881 #define ATTR    &attr
8882 #else
8883 #if HAVE_PTHREADS_D4
8884 #define ATTR    pthread_attr_default
8885 #else
8886 #define ATTR    NULL
8887 #endif
8888 #endif
8889         /* make sure pthread_create() isn't just a stub */
8890         status = pthread_create(&t, ATTR, task, NULL);
8891         if( status ) exit( status );
8892
8893         /* make sure pthread_detach() isn't just a stub */
8894 #if HAVE_PTHREADS_D4
8895         status = pthread_detach( &t );
8896 #else
8897         status = pthread_detach( t );
8898 #endif
8899
8900 #ifdef HAVE_LINUX_THREADS
8901         pthread_kill_other_threads_np();
8902 #endif
8903
8904         exit( status );
8905
8906 ; return 0; }
8907 EOF
8908 if { (eval echo configure:8909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8909   rm -rf conftest*
8910   ol_cv_pthread_lc_r=yes
8911 else
8912   echo "configure: failed program was:" >&5
8913   cat conftest.$ac_ext >&5
8914   rm -rf conftest*
8915   ol_cv_pthread_lc_r=no
8916 fi
8917 rm -f conftest*
8918 else
8919   cat > conftest.$ac_ext <<EOF
8920 #line 8921 "configure"
8921 #include "confdefs.h"
8922 /* pthread test headers */
8923 #include <pthread.h>
8924 #ifndef NULL
8925 #define NULL (void*)0
8926 #endif
8927
8928 static void *task(p)
8929         void *p;
8930 {
8931         return (void *) (p == NULL);
8932 }
8933
8934
8935 int main(argc, argv)
8936         int argc;
8937         char **argv;
8938 {
8939
8940         /* pthread test function */
8941         pthread_t t;
8942         int status;
8943 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8944         /* This system (e.g. AIX) defaults detached; must override */
8945         pthread_attr_t attr;
8946
8947         status = pthread_attr_init(&attr);
8948         if( status ) exit( status );
8949
8950         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8951         if( status ) exit( status );
8952
8953 #define ATTR    &attr
8954 #else
8955 #if HAVE_PTHREADS_D4
8956 #define ATTR    pthread_attr_default
8957 #else
8958 #define ATTR    NULL
8959 #endif
8960 #endif
8961         /* make sure pthread_create() isn't just a stub */
8962         status = pthread_create(&t, ATTR, task, NULL);
8963         if( status ) exit( status );
8964
8965         /* make sure pthread_detach() isn't just a stub */
8966 #if HAVE_PTHREADS_D4
8967         status = pthread_detach( &t );
8968 #else
8969         status = pthread_detach( t );
8970 #endif
8971
8972 #ifdef HAVE_LINUX_THREADS
8973         pthread_kill_other_threads_np();
8974 #endif
8975
8976         exit( status );
8977
8978 }
8979
8980 EOF
8981 if { (eval echo configure:8982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8982 then
8983   ol_cv_pthread_lc_r=yes
8984 else
8985   echo "configure: failed program was:" >&5
8986   cat conftest.$ac_ext >&5
8987   rm -fr conftest*
8988   ol_cv_pthread_lc_r=no
8989 fi
8990 rm -fr conftest*
8991 fi
8992
8993
8994                 # restore the LIBS
8995                 LIBS="$ol_LIBS"
8996         
8997 fi
8998
8999 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9000
9001         if test $ol_cv_pthread_lc_r = yes ; then
9002                 ol_link_pthreads="-lc_r"
9003                 ol_link_threads=posix
9004         fi
9005 fi
9006
9007
9008                 # Pthread try link: -threads (ol_cv_pthread_threads)
9009 if test "$ol_link_threads" = no ; then
9010         # try -threads
9011         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9012 echo "configure:9013: checking for pthread link with -threads" >&5
9013 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9014   echo $ac_n "(cached) $ac_c" 1>&6
9015 else
9016   
9017                 # save the flags
9018                 ol_LIBS="$LIBS"
9019                 LIBS="-threads $LIBS"
9020
9021                 if test "$cross_compiling" = yes; then
9022   cat > conftest.$ac_ext <<EOF
9023 #line 9024 "configure"
9024 #include "confdefs.h"
9025 /* pthread test headers */
9026 #include <pthread.h>
9027 #ifndef NULL
9028 #define NULL (void*)0
9029 #endif
9030
9031 static void *task(p)
9032         void *p;
9033 {
9034         return (void *) (p == NULL);
9035 }
9036
9037 int main() {
9038
9039         /* pthread test function */
9040         pthread_t t;
9041         int status;
9042 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9043         /* This system (e.g. AIX) defaults detached; must override */
9044         pthread_attr_t attr;
9045
9046         status = pthread_attr_init(&attr);
9047         if( status ) exit( status );
9048
9049         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9050         if( status ) exit( status );
9051
9052 #define ATTR    &attr
9053 #else
9054 #if HAVE_PTHREADS_D4
9055 #define ATTR    pthread_attr_default
9056 #else
9057 #define ATTR    NULL
9058 #endif
9059 #endif
9060         /* make sure pthread_create() isn't just a stub */
9061         status = pthread_create(&t, ATTR, task, NULL);
9062         if( status ) exit( status );
9063
9064         /* make sure pthread_detach() isn't just a stub */
9065 #if HAVE_PTHREADS_D4
9066         status = pthread_detach( &t );
9067 #else
9068         status = pthread_detach( t );
9069 #endif
9070
9071 #ifdef HAVE_LINUX_THREADS
9072         pthread_kill_other_threads_np();
9073 #endif
9074
9075         exit( status );
9076
9077 ; return 0; }
9078 EOF
9079 if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9080   rm -rf conftest*
9081   ol_cv_pthread_threads=yes
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   ol_cv_pthread_threads=no
9087 fi
9088 rm -f conftest*
9089 else
9090   cat > conftest.$ac_ext <<EOF
9091 #line 9092 "configure"
9092 #include "confdefs.h"
9093 /* pthread test headers */
9094 #include <pthread.h>
9095 #ifndef NULL
9096 #define NULL (void*)0
9097 #endif
9098
9099 static void *task(p)
9100         void *p;
9101 {
9102         return (void *) (p == NULL);
9103 }
9104
9105
9106 int main(argc, argv)
9107         int argc;
9108         char **argv;
9109 {
9110
9111         /* pthread test function */
9112         pthread_t t;
9113         int status;
9114 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9115         /* This system (e.g. AIX) defaults detached; must override */
9116         pthread_attr_t attr;
9117
9118         status = pthread_attr_init(&attr);
9119         if( status ) exit( status );
9120
9121         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9122         if( status ) exit( status );
9123
9124 #define ATTR    &attr
9125 #else
9126 #if HAVE_PTHREADS_D4
9127 #define ATTR    pthread_attr_default
9128 #else
9129 #define ATTR    NULL
9130 #endif
9131 #endif
9132         /* make sure pthread_create() isn't just a stub */
9133         status = pthread_create(&t, ATTR, task, NULL);
9134         if( status ) exit( status );
9135
9136         /* make sure pthread_detach() isn't just a stub */
9137 #if HAVE_PTHREADS_D4
9138         status = pthread_detach( &t );
9139 #else
9140         status = pthread_detach( t );
9141 #endif
9142
9143 #ifdef HAVE_LINUX_THREADS
9144         pthread_kill_other_threads_np();
9145 #endif
9146
9147         exit( status );
9148
9149 }
9150
9151 EOF
9152 if { (eval echo configure:9153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9153 then
9154   ol_cv_pthread_threads=yes
9155 else
9156   echo "configure: failed program was:" >&5
9157   cat conftest.$ac_ext >&5
9158   rm -fr conftest*
9159   ol_cv_pthread_threads=no
9160 fi
9161 rm -fr conftest*
9162 fi
9163
9164
9165                 # restore the LIBS
9166                 LIBS="$ol_LIBS"
9167         
9168 fi
9169
9170 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9171
9172         if test $ol_cv_pthread_threads = yes ; then
9173                 ol_link_pthreads="-threads"
9174                 ol_link_threads=posix
9175         fi
9176 fi
9177
9178
9179                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9180 if test "$ol_link_threads" = no ; then
9181         # try -lpthreads -lmach -lexc -lc_r
9182         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9183 echo "configure:9184: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9184 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9185   echo $ac_n "(cached) $ac_c" 1>&6
9186 else
9187   
9188                 # save the flags
9189                 ol_LIBS="$LIBS"
9190                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9191
9192                 if test "$cross_compiling" = yes; then
9193   cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 /* pthread test headers */
9197 #include <pthread.h>
9198 #ifndef NULL
9199 #define NULL (void*)0
9200 #endif
9201
9202 static void *task(p)
9203         void *p;
9204 {
9205         return (void *) (p == NULL);
9206 }
9207
9208 int main() {
9209
9210         /* pthread test function */
9211         pthread_t t;
9212         int status;
9213 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9214         /* This system (e.g. AIX) defaults detached; must override */
9215         pthread_attr_t attr;
9216
9217         status = pthread_attr_init(&attr);
9218         if( status ) exit( status );
9219
9220         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9221         if( status ) exit( status );
9222
9223 #define ATTR    &attr
9224 #else
9225 #if HAVE_PTHREADS_D4
9226 #define ATTR    pthread_attr_default
9227 #else
9228 #define ATTR    NULL
9229 #endif
9230 #endif
9231         /* make sure pthread_create() isn't just a stub */
9232         status = pthread_create(&t, ATTR, task, NULL);
9233         if( status ) exit( status );
9234
9235         /* make sure pthread_detach() isn't just a stub */
9236 #if HAVE_PTHREADS_D4
9237         status = pthread_detach( &t );
9238 #else
9239         status = pthread_detach( t );
9240 #endif
9241
9242 #ifdef HAVE_LINUX_THREADS
9243         pthread_kill_other_threads_np();
9244 #endif
9245
9246         exit( status );
9247
9248 ; return 0; }
9249 EOF
9250 if { (eval echo configure:9251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9251   rm -rf conftest*
9252   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9253 else
9254   echo "configure: failed program was:" >&5
9255   cat conftest.$ac_ext >&5
9256   rm -rf conftest*
9257   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9258 fi
9259 rm -f conftest*
9260 else
9261   cat > conftest.$ac_ext <<EOF
9262 #line 9263 "configure"
9263 #include "confdefs.h"
9264 /* pthread test headers */
9265 #include <pthread.h>
9266 #ifndef NULL
9267 #define NULL (void*)0
9268 #endif
9269
9270 static void *task(p)
9271         void *p;
9272 {
9273         return (void *) (p == NULL);
9274 }
9275
9276
9277 int main(argc, argv)
9278         int argc;
9279         char **argv;
9280 {
9281
9282         /* pthread test function */
9283         pthread_t t;
9284         int status;
9285 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9286         /* This system (e.g. AIX) defaults detached; must override */
9287         pthread_attr_t attr;
9288
9289         status = pthread_attr_init(&attr);
9290         if( status ) exit( status );
9291
9292         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9293         if( status ) exit( status );
9294
9295 #define ATTR    &attr
9296 #else
9297 #if HAVE_PTHREADS_D4
9298 #define ATTR    pthread_attr_default
9299 #else
9300 #define ATTR    NULL
9301 #endif
9302 #endif
9303         /* make sure pthread_create() isn't just a stub */
9304         status = pthread_create(&t, ATTR, task, NULL);
9305         if( status ) exit( status );
9306
9307         /* make sure pthread_detach() isn't just a stub */
9308 #if HAVE_PTHREADS_D4
9309         status = pthread_detach( &t );
9310 #else
9311         status = pthread_detach( t );
9312 #endif
9313
9314 #ifdef HAVE_LINUX_THREADS
9315         pthread_kill_other_threads_np();
9316 #endif
9317
9318         exit( status );
9319
9320 }
9321
9322 EOF
9323 if { (eval echo configure:9324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9324 then
9325   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9326 else
9327   echo "configure: failed program was:" >&5
9328   cat conftest.$ac_ext >&5
9329   rm -fr conftest*
9330   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9331 fi
9332 rm -fr conftest*
9333 fi
9334
9335
9336                 # restore the LIBS
9337                 LIBS="$ol_LIBS"
9338         
9339 fi
9340
9341 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9342
9343         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9344                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9345                 ol_link_threads=posix
9346         fi
9347 fi
9348
9349                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9350 if test "$ol_link_threads" = no ; then
9351         # try -lpthreads -lmach -lexc
9352         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9353 echo "configure:9354: checking for pthread link with -lpthreads -lmach -lexc" >&5
9354 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   
9358                 # save the flags
9359                 ol_LIBS="$LIBS"
9360                 LIBS="-lpthreads -lmach -lexc $LIBS"
9361
9362                 if test "$cross_compiling" = yes; then
9363   cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* pthread test headers */
9367 #include <pthread.h>
9368 #ifndef NULL
9369 #define NULL (void*)0
9370 #endif
9371
9372 static void *task(p)
9373         void *p;
9374 {
9375         return (void *) (p == NULL);
9376 }
9377
9378 int main() {
9379
9380         /* pthread test function */
9381         pthread_t t;
9382         int status;
9383 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9384         /* This system (e.g. AIX) defaults detached; must override */
9385         pthread_attr_t attr;
9386
9387         status = pthread_attr_init(&attr);
9388         if( status ) exit( status );
9389
9390         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9391         if( status ) exit( status );
9392
9393 #define ATTR    &attr
9394 #else
9395 #if HAVE_PTHREADS_D4
9396 #define ATTR    pthread_attr_default
9397 #else
9398 #define ATTR    NULL
9399 #endif
9400 #endif
9401         /* make sure pthread_create() isn't just a stub */
9402         status = pthread_create(&t, ATTR, task, NULL);
9403         if( status ) exit( status );
9404
9405         /* make sure pthread_detach() isn't just a stub */
9406 #if HAVE_PTHREADS_D4
9407         status = pthread_detach( &t );
9408 #else
9409         status = pthread_detach( t );
9410 #endif
9411
9412 #ifdef HAVE_LINUX_THREADS
9413         pthread_kill_other_threads_np();
9414 #endif
9415
9416         exit( status );
9417
9418 ; return 0; }
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9421   rm -rf conftest*
9422   ol_cv_pthread_lpthreads_lmach_lexc=yes
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -rf conftest*
9427   ol_cv_pthread_lpthreads_lmach_lexc=no
9428 fi
9429 rm -f conftest*
9430 else
9431   cat > conftest.$ac_ext <<EOF
9432 #line 9433 "configure"
9433 #include "confdefs.h"
9434 /* pthread test headers */
9435 #include <pthread.h>
9436 #ifndef NULL
9437 #define NULL (void*)0
9438 #endif
9439
9440 static void *task(p)
9441         void *p;
9442 {
9443         return (void *) (p == NULL);
9444 }
9445
9446
9447 int main(argc, argv)
9448         int argc;
9449         char **argv;
9450 {
9451
9452         /* pthread test function */
9453         pthread_t t;
9454         int status;
9455 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9456         /* This system (e.g. AIX) defaults detached; must override */
9457         pthread_attr_t attr;
9458
9459         status = pthread_attr_init(&attr);
9460         if( status ) exit( status );
9461
9462         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9463         if( status ) exit( status );
9464
9465 #define ATTR    &attr
9466 #else
9467 #if HAVE_PTHREADS_D4
9468 #define ATTR    pthread_attr_default
9469 #else
9470 #define ATTR    NULL
9471 #endif
9472 #endif
9473         /* make sure pthread_create() isn't just a stub */
9474         status = pthread_create(&t, ATTR, task, NULL);
9475         if( status ) exit( status );
9476
9477         /* make sure pthread_detach() isn't just a stub */
9478 #if HAVE_PTHREADS_D4
9479         status = pthread_detach( &t );
9480 #else
9481         status = pthread_detach( t );
9482 #endif
9483
9484 #ifdef HAVE_LINUX_THREADS
9485         pthread_kill_other_threads_np();
9486 #endif
9487
9488         exit( status );
9489
9490 }
9491
9492 EOF
9493 if { (eval echo configure:9494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9494 then
9495   ol_cv_pthread_lpthreads_lmach_lexc=yes
9496 else
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -fr conftest*
9500   ol_cv_pthread_lpthreads_lmach_lexc=no
9501 fi
9502 rm -fr conftest*
9503 fi
9504
9505
9506                 # restore the LIBS
9507                 LIBS="$ol_LIBS"
9508         
9509 fi
9510
9511 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9512
9513         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9514                 ol_link_pthreads="-lpthreads -lmach -lexc"
9515                 ol_link_threads=posix
9516         fi
9517 fi
9518
9519                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9520 if test "$ol_link_threads" = no ; then
9521         # try -lpthreads -lexc
9522         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9523 echo "configure:9524: checking for pthread link with -lpthreads -lexc" >&5
9524 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9525   echo $ac_n "(cached) $ac_c" 1>&6
9526 else
9527   
9528                 # save the flags
9529                 ol_LIBS="$LIBS"
9530                 LIBS="-lpthreads -lexc $LIBS"
9531
9532                 if test "$cross_compiling" = yes; then
9533   cat > conftest.$ac_ext <<EOF
9534 #line 9535 "configure"
9535 #include "confdefs.h"
9536 /* pthread test headers */
9537 #include <pthread.h>
9538 #ifndef NULL
9539 #define NULL (void*)0
9540 #endif
9541
9542 static void *task(p)
9543         void *p;
9544 {
9545         return (void *) (p == NULL);
9546 }
9547
9548 int main() {
9549
9550         /* pthread test function */
9551         pthread_t t;
9552         int status;
9553 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9554         /* This system (e.g. AIX) defaults detached; must override */
9555         pthread_attr_t attr;
9556
9557         status = pthread_attr_init(&attr);
9558         if( status ) exit( status );
9559
9560         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9561         if( status ) exit( status );
9562
9563 #define ATTR    &attr
9564 #else
9565 #if HAVE_PTHREADS_D4
9566 #define ATTR    pthread_attr_default
9567 #else
9568 #define ATTR    NULL
9569 #endif
9570 #endif
9571         /* make sure pthread_create() isn't just a stub */
9572         status = pthread_create(&t, ATTR, task, NULL);
9573         if( status ) exit( status );
9574
9575         /* make sure pthread_detach() isn't just a stub */
9576 #if HAVE_PTHREADS_D4
9577         status = pthread_detach( &t );
9578 #else
9579         status = pthread_detach( t );
9580 #endif
9581
9582 #ifdef HAVE_LINUX_THREADS
9583         pthread_kill_other_threads_np();
9584 #endif
9585
9586         exit( status );
9587
9588 ; return 0; }
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9591   rm -rf conftest*
9592   ol_cv_pthread_lpthreads_lexc=yes
9593 else
9594   echo "configure: failed program was:" >&5
9595   cat conftest.$ac_ext >&5
9596   rm -rf conftest*
9597   ol_cv_pthread_lpthreads_lexc=no
9598 fi
9599 rm -f conftest*
9600 else
9601   cat > conftest.$ac_ext <<EOF
9602 #line 9603 "configure"
9603 #include "confdefs.h"
9604 /* pthread test headers */
9605 #include <pthread.h>
9606 #ifndef NULL
9607 #define NULL (void*)0
9608 #endif
9609
9610 static void *task(p)
9611         void *p;
9612 {
9613         return (void *) (p == NULL);
9614 }
9615
9616
9617 int main(argc, argv)
9618         int argc;
9619         char **argv;
9620 {
9621
9622         /* pthread test function */
9623         pthread_t t;
9624         int status;
9625 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9626         /* This system (e.g. AIX) defaults detached; must override */
9627         pthread_attr_t attr;
9628
9629         status = pthread_attr_init(&attr);
9630         if( status ) exit( status );
9631
9632         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9633         if( status ) exit( status );
9634
9635 #define ATTR    &attr
9636 #else
9637 #if HAVE_PTHREADS_D4
9638 #define ATTR    pthread_attr_default
9639 #else
9640 #define ATTR    NULL
9641 #endif
9642 #endif
9643         /* make sure pthread_create() isn't just a stub */
9644         status = pthread_create(&t, ATTR, task, NULL);
9645         if( status ) exit( status );
9646
9647         /* make sure pthread_detach() isn't just a stub */
9648 #if HAVE_PTHREADS_D4
9649         status = pthread_detach( &t );
9650 #else
9651         status = pthread_detach( t );
9652 #endif
9653
9654 #ifdef HAVE_LINUX_THREADS
9655         pthread_kill_other_threads_np();
9656 #endif
9657
9658         exit( status );
9659
9660 }
9661
9662 EOF
9663 if { (eval echo configure:9664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9664 then
9665   ol_cv_pthread_lpthreads_lexc=yes
9666 else
9667   echo "configure: failed program was:" >&5
9668   cat conftest.$ac_ext >&5
9669   rm -fr conftest*
9670   ol_cv_pthread_lpthreads_lexc=no
9671 fi
9672 rm -fr conftest*
9673 fi
9674
9675
9676                 # restore the LIBS
9677                 LIBS="$ol_LIBS"
9678         
9679 fi
9680
9681 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9682
9683         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9684                 ol_link_pthreads="-lpthreads -lexc"
9685                 ol_link_threads=posix
9686         fi
9687 fi
9688
9689
9690                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9691 if test "$ol_link_threads" = no ; then
9692         # try -lpthreads
9693         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9694 echo "configure:9695: checking for pthread link with -lpthreads" >&5
9695 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9696   echo $ac_n "(cached) $ac_c" 1>&6
9697 else
9698   
9699                 # save the flags
9700                 ol_LIBS="$LIBS"
9701                 LIBS="-lpthreads $LIBS"
9702
9703                 if test "$cross_compiling" = yes; then
9704   cat > conftest.$ac_ext <<EOF
9705 #line 9706 "configure"
9706 #include "confdefs.h"
9707 /* pthread test headers */
9708 #include <pthread.h>
9709 #ifndef NULL
9710 #define NULL (void*)0
9711 #endif
9712
9713 static void *task(p)
9714         void *p;
9715 {
9716         return (void *) (p == NULL);
9717 }
9718
9719 int main() {
9720
9721         /* pthread test function */
9722         pthread_t t;
9723         int status;
9724 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9725         /* This system (e.g. AIX) defaults detached; must override */
9726         pthread_attr_t attr;
9727
9728         status = pthread_attr_init(&attr);
9729         if( status ) exit( status );
9730
9731         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9732         if( status ) exit( status );
9733
9734 #define ATTR    &attr
9735 #else
9736 #if HAVE_PTHREADS_D4
9737 #define ATTR    pthread_attr_default
9738 #else
9739 #define ATTR    NULL
9740 #endif
9741 #endif
9742         /* make sure pthread_create() isn't just a stub */
9743         status = pthread_create(&t, ATTR, task, NULL);
9744         if( status ) exit( status );
9745
9746         /* make sure pthread_detach() isn't just a stub */
9747 #if HAVE_PTHREADS_D4
9748         status = pthread_detach( &t );
9749 #else
9750         status = pthread_detach( t );
9751 #endif
9752
9753 #ifdef HAVE_LINUX_THREADS
9754         pthread_kill_other_threads_np();
9755 #endif
9756
9757         exit( status );
9758
9759 ; return 0; }
9760 EOF
9761 if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9762   rm -rf conftest*
9763   ol_cv_pthread_lib_lpthreads=yes
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767   rm -rf conftest*
9768   ol_cv_pthread_lib_lpthreads=no
9769 fi
9770 rm -f conftest*
9771 else
9772   cat > conftest.$ac_ext <<EOF
9773 #line 9774 "configure"
9774 #include "confdefs.h"
9775 /* pthread test headers */
9776 #include <pthread.h>
9777 #ifndef NULL
9778 #define NULL (void*)0
9779 #endif
9780
9781 static void *task(p)
9782         void *p;
9783 {
9784         return (void *) (p == NULL);
9785 }
9786
9787
9788 int main(argc, argv)
9789         int argc;
9790         char **argv;
9791 {
9792
9793         /* pthread test function */
9794         pthread_t t;
9795         int status;
9796 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9797         /* This system (e.g. AIX) defaults detached; must override */
9798         pthread_attr_t attr;
9799
9800         status = pthread_attr_init(&attr);
9801         if( status ) exit( status );
9802
9803         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9804         if( status ) exit( status );
9805
9806 #define ATTR    &attr
9807 #else
9808 #if HAVE_PTHREADS_D4
9809 #define ATTR    pthread_attr_default
9810 #else
9811 #define ATTR    NULL
9812 #endif
9813 #endif
9814         /* make sure pthread_create() isn't just a stub */
9815         status = pthread_create(&t, ATTR, task, NULL);
9816         if( status ) exit( status );
9817
9818         /* make sure pthread_detach() isn't just a stub */
9819 #if HAVE_PTHREADS_D4
9820         status = pthread_detach( &t );
9821 #else
9822         status = pthread_detach( t );
9823 #endif
9824
9825 #ifdef HAVE_LINUX_THREADS
9826         pthread_kill_other_threads_np();
9827 #endif
9828
9829         exit( status );
9830
9831 }
9832
9833 EOF
9834 if { (eval echo configure:9835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9835 then
9836   ol_cv_pthread_lib_lpthreads=yes
9837 else
9838   echo "configure: failed program was:" >&5
9839   cat conftest.$ac_ext >&5
9840   rm -fr conftest*
9841   ol_cv_pthread_lib_lpthreads=no
9842 fi
9843 rm -fr conftest*
9844 fi
9845
9846
9847                 # restore the LIBS
9848                 LIBS="$ol_LIBS"
9849         
9850 fi
9851
9852 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9853
9854         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9855                 ol_link_pthreads="-lpthreads"
9856                 ol_link_threads=posix
9857         fi
9858 fi
9859
9860
9861                 if test $ol_link_threads != no ; then
9862                         cat >> confdefs.h <<\EOF
9863 #define HAVE_PTHREADS 1
9864 EOF
9865
9866
9867                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9868
9869                                                 save_CPPFLAGS="$CPPFLAGS"
9870                         save_LIBS="$LIBS"
9871                         LIBS="$LTHREAD_LIBS $LIBS"
9872
9873                                                                                                 for ac_func in sched_yield pthread_yield
9874 do
9875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9876 echo "configure:9877: checking for $ac_func" >&5
9877 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9878   echo $ac_n "(cached) $ac_c" 1>&6
9879 else
9880   cat > conftest.$ac_ext <<EOF
9881 #line 9882 "configure"
9882 #include "confdefs.h"
9883 /* System header to define __stub macros and hopefully few prototypes,
9884     which can conflict with char $ac_func(); below.  */
9885 #include <assert.h>
9886 /* Override any gcc2 internal prototype to avoid an error.  */
9887 /* We use char because int might match the return type of a gcc2
9888     builtin and then its argument prototype would still apply.  */
9889 char $ac_func();
9890 char (*f)();
9891
9892 int main() {
9893
9894 /* The GNU C library defines this for functions which it implements
9895     to always fail with ENOSYS.  Some functions are actually named
9896     something starting with __ and the normal name is an alias.  */
9897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9898 choke me
9899 #else
9900 f = $ac_func;
9901 #endif
9902
9903 ; return 0; }
9904 EOF
9905 if { (eval echo configure:9906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9906   rm -rf conftest*
9907   eval "ac_cv_func_$ac_func=yes"
9908 else
9909   echo "configure: failed program was:" >&5
9910   cat conftest.$ac_ext >&5
9911   rm -rf conftest*
9912   eval "ac_cv_func_$ac_func=no"
9913 fi
9914 rm -f conftest*
9915 fi
9916
9917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9918   echo "$ac_t""yes" 1>&6
9919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9920   cat >> confdefs.h <<EOF
9921 #define $ac_tr_func 1
9922 EOF
9923  
9924 else
9925   echo "$ac_t""no" 1>&6
9926 fi
9927 done
9928
9929
9930                         if test $ac_cv_func_sched_yield = no -a \
9931                                 $ac_cv_func_pthread_yield = no ; then
9932                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9933 echo "configure:9934: checking for sched_yield in -lrt" >&5
9934 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9936   echo $ac_n "(cached) $ac_c" 1>&6
9937 else
9938   ac_save_LIBS="$LIBS"
9939 LIBS="-lrt  $LIBS"
9940 cat > conftest.$ac_ext <<EOF
9941 #line 9942 "configure"
9942 #include "confdefs.h"
9943 /* Override any gcc2 internal prototype to avoid an error.  */
9944 /* We use char because int might match the return type of a gcc2
9945     builtin and then its argument prototype would still apply.  */
9946 char sched_yield();
9947
9948 int main() {
9949 sched_yield()
9950 ; return 0; }
9951 EOF
9952 if { (eval echo configure:9953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9953   rm -rf conftest*
9954   eval "ac_cv_lib_$ac_lib_var=yes"
9955 else
9956   echo "configure: failed program was:" >&5
9957   cat conftest.$ac_ext >&5
9958   rm -rf conftest*
9959   eval "ac_cv_lib_$ac_lib_var=no"
9960 fi
9961 rm -f conftest*
9962 LIBS="$ac_save_LIBS"
9963
9964 fi
9965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9966   echo "$ac_t""yes" 1>&6
9967   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9968                                         cat >> confdefs.h <<\EOF
9969 #define HAVE_SCHED_YIELD 1
9970 EOF
9971
9972                                         ac_cv_func_sched_yield=yes
9973 else
9974   echo "$ac_t""no" 1>&6
9975 ac_cv_func_sched_yield=no
9976 fi
9977
9978                         fi
9979                         if test $ac_cv_func_sched_yield = no -a \
9980                                 $ac_cv_func_pthread_yield = no ; then
9981                                                                                                 for ac_func in thr_yield
9982 do
9983 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9984 echo "configure:9985: checking for $ac_func" >&5
9985 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9986   echo $ac_n "(cached) $ac_c" 1>&6
9987 else
9988   cat > conftest.$ac_ext <<EOF
9989 #line 9990 "configure"
9990 #include "confdefs.h"
9991 /* System header to define __stub macros and hopefully few prototypes,
9992     which can conflict with char $ac_func(); below.  */
9993 #include <assert.h>
9994 /* Override any gcc2 internal prototype to avoid an error.  */
9995 /* We use char because int might match the return type of a gcc2
9996     builtin and then its argument prototype would still apply.  */
9997 char $ac_func();
9998 char (*f)();
9999
10000 int main() {
10001
10002 /* The GNU C library defines this for functions which it implements
10003     to always fail with ENOSYS.  Some functions are actually named
10004     something starting with __ and the normal name is an alias.  */
10005 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10006 choke me
10007 #else
10008 f = $ac_func;
10009 #endif
10010
10011 ; return 0; }
10012 EOF
10013 if { (eval echo configure:10014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10014   rm -rf conftest*
10015   eval "ac_cv_func_$ac_func=yes"
10016 else
10017   echo "configure: failed program was:" >&5
10018   cat conftest.$ac_ext >&5
10019   rm -rf conftest*
10020   eval "ac_cv_func_$ac_func=no"
10021 fi
10022 rm -f conftest*
10023 fi
10024
10025 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10026   echo "$ac_t""yes" 1>&6
10027     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10028   cat >> confdefs.h <<EOF
10029 #define $ac_tr_func 1
10030 EOF
10031  
10032 else
10033   echo "$ac_t""no" 1>&6
10034 fi
10035 done
10036
10037                         fi
10038                         if test $ac_cv_func_sched_yield = no -a \
10039                                 $ac_cv_func_pthread_yield = no -a \
10040                                 "$ac_cv_func_thr_yield" = no ; then
10041                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10042                         fi
10043
10044                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10045 do
10046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10047 echo "configure:10048: checking for $ac_func" >&5
10048 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10049   echo $ac_n "(cached) $ac_c" 1>&6
10050 else
10051   cat > conftest.$ac_ext <<EOF
10052 #line 10053 "configure"
10053 #include "confdefs.h"
10054 /* System header to define __stub macros and hopefully few prototypes,
10055     which can conflict with char $ac_func(); below.  */
10056 #include <assert.h>
10057 /* Override any gcc2 internal prototype to avoid an error.  */
10058 /* We use char because int might match the return type of a gcc2
10059     builtin and then its argument prototype would still apply.  */
10060 char $ac_func();
10061 char (*f)();
10062
10063 int main() {
10064
10065 /* The GNU C library defines this for functions which it implements
10066     to always fail with ENOSYS.  Some functions are actually named
10067     something starting with __ and the normal name is an alias.  */
10068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10069 choke me
10070 #else
10071 f = $ac_func;
10072 #endif
10073
10074 ; return 0; }
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10077   rm -rf conftest*
10078   eval "ac_cv_func_$ac_func=yes"
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -rf conftest*
10083   eval "ac_cv_func_$ac_func=no"
10084 fi
10085 rm -f conftest*
10086 fi
10087
10088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10089   echo "$ac_t""yes" 1>&6
10090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10091   cat >> confdefs.h <<EOF
10092 #define $ac_tr_func 1
10093 EOF
10094  
10095 else
10096   echo "$ac_t""no" 1>&6
10097 fi
10098 done
10099
10100
10101                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10102 echo "configure:10103: checking for pthread_detach with <pthread.h>" >&5
10103 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10104   echo $ac_n "(cached) $ac_c" 1>&6
10105 else
10106   
10107                                                                 cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110
10111 #include <pthread.h>
10112 #ifndef NULL
10113 #define NULL (void*)0
10114 #endif
10115
10116 int main() {
10117 pthread_detach(NULL);
10118 ; return 0; }
10119 EOF
10120 if { (eval echo configure:10121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10121   rm -rf conftest*
10122   ol_cv_func_pthread_detach=yes
10123 else
10124   echo "configure: failed program was:" >&5
10125   cat conftest.$ac_ext >&5
10126   rm -rf conftest*
10127   ol_cv_func_pthread_detach=no
10128 fi
10129 rm -f conftest*
10130                         
10131 fi
10132
10133 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10134
10135                         if test $ol_cv_func_pthread_detach = no ; then
10136                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10137                         fi
10138
10139                         cat >> confdefs.h <<\EOF
10140 #define HAVE_PTHREAD_DETACH 1
10141 EOF
10142
10143
10144                                                 for ac_func in \
10145                                 pthread_setconcurrency \
10146                                 pthread_getconcurrency \
10147                                 thr_setconcurrency \
10148                                 thr_getconcurrency \
10149                         
10150 do
10151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10152 echo "configure:10153: checking for $ac_func" >&5
10153 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10154   echo $ac_n "(cached) $ac_c" 1>&6
10155 else
10156   cat > conftest.$ac_ext <<EOF
10157 #line 10158 "configure"
10158 #include "confdefs.h"
10159 /* System header to define __stub macros and hopefully few prototypes,
10160     which can conflict with char $ac_func(); below.  */
10161 #include <assert.h>
10162 /* Override any gcc2 internal prototype to avoid an error.  */
10163 /* We use char because int might match the return type of a gcc2
10164     builtin and then its argument prototype would still apply.  */
10165 char $ac_func();
10166 char (*f)();
10167
10168 int main() {
10169
10170 /* The GNU C library defines this for functions which it implements
10171     to always fail with ENOSYS.  Some functions are actually named
10172     something starting with __ and the normal name is an alias.  */
10173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10174 choke me
10175 #else
10176 f = $ac_func;
10177 #endif
10178
10179 ; return 0; }
10180 EOF
10181 if { (eval echo configure:10182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10182   rm -rf conftest*
10183   eval "ac_cv_func_$ac_func=yes"
10184 else
10185   echo "configure: failed program was:" >&5
10186   cat conftest.$ac_ext >&5
10187   rm -rf conftest*
10188   eval "ac_cv_func_$ac_func=no"
10189 fi
10190 rm -f conftest*
10191 fi
10192
10193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10194   echo "$ac_t""yes" 1>&6
10195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10196   cat >> confdefs.h <<EOF
10197 #define $ac_tr_func 1
10198 EOF
10199  
10200 else
10201   echo "$ac_t""no" 1>&6
10202 fi
10203 done
10204
10205
10206                         
10207         for ac_func in pthread_kill_other_threads_np
10208 do
10209 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10210 echo "configure:10211: checking for $ac_func" >&5
10211 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10212   echo $ac_n "(cached) $ac_c" 1>&6
10213 else
10214   cat > conftest.$ac_ext <<EOF
10215 #line 10216 "configure"
10216 #include "confdefs.h"
10217 /* System header to define __stub macros and hopefully few prototypes,
10218     which can conflict with char $ac_func(); below.  */
10219 #include <assert.h>
10220 /* Override any gcc2 internal prototype to avoid an error.  */
10221 /* We use char because int might match the return type of a gcc2
10222     builtin and then its argument prototype would still apply.  */
10223 char $ac_func();
10224 char (*f)();
10225
10226 int main() {
10227
10228 /* The GNU C library defines this for functions which it implements
10229     to always fail with ENOSYS.  Some functions are actually named
10230     something starting with __ and the normal name is an alias.  */
10231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10232 choke me
10233 #else
10234 f = $ac_func;
10235 #endif
10236
10237 ; return 0; }
10238 EOF
10239 if { (eval echo configure:10240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10240   rm -rf conftest*
10241   eval "ac_cv_func_$ac_func=yes"
10242 else
10243   echo "configure: failed program was:" >&5
10244   cat conftest.$ac_ext >&5
10245   rm -rf conftest*
10246   eval "ac_cv_func_$ac_func=no"
10247 fi
10248 rm -f conftest*
10249 fi
10250
10251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10252   echo "$ac_t""yes" 1>&6
10253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10254   cat >> confdefs.h <<EOF
10255 #define $ac_tr_func 1
10256 EOF
10257  
10258 else
10259   echo "$ac_t""no" 1>&6
10260 fi
10261 done
10262
10263         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10264 echo "configure:10265: checking for LinuxThreads implementation" >&5
10265 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10266   echo $ac_n "(cached) $ac_c" 1>&6
10267 else
10268   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10269 fi
10270
10271 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10272
10273                         
10274         
10275         
10276         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10277 echo "configure:10278: checking for LinuxThreads consistency" >&5
10278 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10279   echo $ac_n "(cached) $ac_c" 1>&6
10280 else
10281   
10282                 if test $ol_cv_header_linux_threads = yes -a \
10283                         $ol_cv_sys_linux_threads = yes; then
10284                         ol_cv_linux_threads=yes
10285                 elif test $ol_cv_header_linux_threads = no -a \
10286                         $ol_cv_sys_linux_threads = no; then
10287                         ol_cv_linux_threads=no
10288                 else
10289                         ol_cv_linux_threads=error
10290                 fi
10291         
10292 fi
10293
10294 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10295
10296
10297                         if test $ol_cv_linux_threads = error; then
10298                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10299                         fi
10300
10301                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10302 echo "configure:10303: checking if pthread_create() works" >&5
10303 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10304   echo $ac_n "(cached) $ac_c" 1>&6
10305 else
10306   
10307                         if test "$cross_compiling" = yes; then
10308                                 ol_cv_pthread_create_works=yes
10309 else
10310   cat > conftest.$ac_ext <<EOF
10311 #line 10312 "configure"
10312 #include "confdefs.h"
10313 /* pthread test headers */
10314 #include <pthread.h>
10315 #ifndef NULL
10316 #define NULL (void*)0
10317 #endif
10318
10319 static void *task(p)
10320         void *p;
10321 {
10322         return (void *) (p == NULL);
10323 }
10324
10325
10326 int main(argc, argv)
10327         int argc;
10328         char **argv;
10329 {
10330
10331         /* pthread test function */
10332         pthread_t t;
10333         int status;
10334 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10335         /* This system (e.g. AIX) defaults detached; must override */
10336         pthread_attr_t attr;
10337
10338         status = pthread_attr_init(&attr);
10339         if( status ) exit( status );
10340
10341         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10342         if( status ) exit( status );
10343
10344 #define ATTR    &attr
10345 #else
10346 #if HAVE_PTHREADS_D4
10347 #define ATTR    pthread_attr_default
10348 #else
10349 #define ATTR    NULL
10350 #endif
10351 #endif
10352         /* make sure pthread_create() isn't just a stub */
10353         status = pthread_create(&t, ATTR, task, NULL);
10354         if( status ) exit( status );
10355
10356         /* make sure pthread_detach() isn't just a stub */
10357 #if HAVE_PTHREADS_D4
10358         status = pthread_detach( &t );
10359 #else
10360         status = pthread_detach( t );
10361 #endif
10362
10363 #ifdef HAVE_LINUX_THREADS
10364         pthread_kill_other_threads_np();
10365 #endif
10366
10367         exit( status );
10368
10369 }
10370
10371 EOF
10372 if { (eval echo configure:10373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10373 then
10374   ol_cv_pthread_create_works=yes
10375 else
10376   echo "configure: failed program was:" >&5
10377   cat conftest.$ac_ext >&5
10378   rm -fr conftest*
10379   ol_cv_pthread_create_works=no
10380 fi
10381 rm -fr conftest*
10382 fi
10383
10384 fi
10385
10386 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10387
10388                         if test $ol_cv_pthread_create_works = no ; then
10389                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10390                         fi
10391
10392                                                 if test $ol_with_yielding_select = auto ; then
10393                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10394 echo "configure:10395: checking if select yields when using pthreads" >&5
10395 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10396   echo $ac_n "(cached) $ac_c" 1>&6
10397 else
10398   
10399                                 if test "$cross_compiling" = yes; then
10400   ol_cv_pthread_select_yields=cross
10401 else
10402   cat > conftest.$ac_ext <<EOF
10403 #line 10404 "configure"
10404 #include "confdefs.h"
10405
10406 #include <sys/types.h>
10407 #include <sys/time.h>
10408 #include <unistd.h>
10409 #include <pthread.h>
10410 #ifndef NULL
10411 #define NULL (void*) 0
10412 #endif
10413
10414 static int fildes[2];
10415
10416 static void *task(p)
10417         void *p;
10418 {
10419         int i;
10420         struct timeval tv;
10421
10422         fd_set rfds;
10423
10424         tv.tv_sec=10;
10425         tv.tv_usec=0;
10426
10427         FD_ZERO(&rfds);
10428         FD_SET(fildes[0], &rfds);
10429
10430         /* we're not interested in any fds */
10431         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10432
10433         if(i < 0) {
10434                 perror("select");
10435                 exit(10);
10436         }
10437
10438         exit(0); /* if we exit here, the select blocked the whole process */
10439 }
10440
10441 int main(argc, argv)
10442         int argc;
10443         char **argv;
10444 {
10445         pthread_t t;
10446
10447         /* create a pipe to select */
10448         if(pipe(&fildes[0])) {
10449                 perror("select");
10450                 exit(1);
10451         }
10452
10453 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10454         (void) pthread_setconcurrency(2);
10455 #else
10456 #ifdef HAVE_THR_SETCONCURRENCY
10457         /* Set Solaris LWP concurrency to 2 */
10458         thr_setconcurrency(2);
10459 #endif
10460 #endif
10461
10462 #if HAVE_PTHREADS_D4
10463         pthread_create(&t, pthread_attr_default, task, NULL);
10464 #else
10465         pthread_create(&t, NULL, task, NULL);
10466 #endif
10467
10468 #if HAVE_SCHED_YIELD
10469         sched_yield();  /* make sure task runs first */
10470 #else
10471 #ifdef HAVE_PTHREAD_YIELD
10472         pthread_yield();        /* make sure task runs first */
10473 #endif
10474 #endif
10475
10476         exit(2);
10477 }
10478 EOF
10479 if { (eval echo configure:10480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10480 then
10481   ol_cv_pthread_select_yields=no
10482 else
10483   echo "configure: failed program was:" >&5
10484   cat conftest.$ac_ext >&5
10485   rm -fr conftest*
10486   ol_cv_pthread_select_yields=yes
10487 fi
10488 rm -fr conftest*
10489 fi
10490
10491 fi
10492
10493 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10494
10495                                 if test $ol_cv_pthread_select_yields = cross ; then
10496                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10497                                 fi
10498
10499                                 if test $ol_cv_pthread_select_yields = yes ; then
10500                                         ol_with_yielding_select=yes
10501                                 fi
10502                         fi
10503
10504                                                 CPPFLAGS="$save_CPPFLAGS"
10505                         LIBS="$save_LIBS"
10506                 else
10507                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10508                 fi
10509         fi
10510
10511         if test $ol_with_threads = posix ; then
10512                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10513         fi
10514 fi
10515
10516 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10517         -o $ol_with_threads = mach ; then
10518
10519                 for ac_hdr in mach/cthreads.h
10520 do
10521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10523 echo "configure:10524: checking for $ac_hdr" >&5
10524 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10525   echo $ac_n "(cached) $ac_c" 1>&6
10526 else
10527   cat > conftest.$ac_ext <<EOF
10528 #line 10529 "configure"
10529 #include "confdefs.h"
10530 #include <$ac_hdr>
10531 EOF
10532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10533 { (eval echo configure:10534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10535 if test -z "$ac_err"; then
10536   rm -rf conftest*
10537   eval "ac_cv_header_$ac_safe=yes"
10538 else
10539   echo "$ac_err" >&5
10540   echo "configure: failed program was:" >&5
10541   cat conftest.$ac_ext >&5
10542   rm -rf conftest*
10543   eval "ac_cv_header_$ac_safe=no"
10544 fi
10545 rm -f conftest*
10546 fi
10547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10548   echo "$ac_t""yes" 1>&6
10549     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10550   cat >> confdefs.h <<EOF
10551 #define $ac_tr_hdr 1
10552 EOF
10553  
10554 else
10555   echo "$ac_t""no" 1>&6
10556 fi
10557 done
10558
10559         if test $ac_cv_header_mach_cthreads_h = yes ; then
10560                 ol_with_threads=found
10561
10562                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10563 echo "configure:10564: checking for cthread_fork" >&5
10564 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10565   echo $ac_n "(cached) $ac_c" 1>&6
10566 else
10567   cat > conftest.$ac_ext <<EOF
10568 #line 10569 "configure"
10569 #include "confdefs.h"
10570 /* System header to define __stub macros and hopefully few prototypes,
10571     which can conflict with char cthread_fork(); below.  */
10572 #include <assert.h>
10573 /* Override any gcc2 internal prototype to avoid an error.  */
10574 /* We use char because int might match the return type of a gcc2
10575     builtin and then its argument prototype would still apply.  */
10576 char cthread_fork();
10577 char (*f)();
10578
10579 int main() {
10580
10581 /* The GNU C library defines this for functions which it implements
10582     to always fail with ENOSYS.  Some functions are actually named
10583     something starting with __ and the normal name is an alias.  */
10584 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10585 choke me
10586 #else
10587 f = cthread_fork;
10588 #endif
10589
10590 ; return 0; }
10591 EOF
10592 if { (eval echo configure:10593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10593   rm -rf conftest*
10594   eval "ac_cv_func_cthread_fork=yes"
10595 else
10596   echo "configure: failed program was:" >&5
10597   cat conftest.$ac_ext >&5
10598   rm -rf conftest*
10599   eval "ac_cv_func_cthread_fork=no"
10600 fi
10601 rm -f conftest*
10602 fi
10603
10604 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10605   echo "$ac_t""yes" 1>&6
10606   ol_link_threads=yes
10607 else
10608   echo "$ac_t""no" 1>&6
10609 fi
10610
10611
10612                 if test $ol_link_threads = no ; then
10613                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10614 echo "configure:10615: checking for cthread_fork with -all_load" >&5
10615 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10616   echo $ac_n "(cached) $ac_c" 1>&6
10617 else
10618   
10619                                                                 save_LIBS="$LIBS"
10620                                 LIBS="-all_load $LIBS"
10621                                 cat > conftest.$ac_ext <<EOF
10622 #line 10623 "configure"
10623 #include "confdefs.h"
10624 #include <mach/cthreads.h>
10625 int main() {
10626
10627                                         cthread_fork((void *)0, (void *)0);
10628                                         
10629 ; return 0; }
10630 EOF
10631 if { (eval echo configure:10632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10632   rm -rf conftest*
10633   ol_cv_cthread_all_load=yes
10634 else
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -rf conftest*
10638   ol_cv_cthread_all_load=no
10639 fi
10640 rm -f conftest*
10641                                                                 LIBS="$save_LIBS"
10642                         
10643 fi
10644
10645 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10646
10647                         if test $ol_cv_cthread_all_load = yes ; then
10648                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10649                                 ol_link_threads=mach
10650                         fi
10651                 fi
10652
10653                 if test $ol_link_threads != no ; then
10654                         : check for cthread specific functionality here
10655                         cat >> confdefs.h <<\EOF
10656 #define HAVE_MACH_CTHREADS 1
10657 EOF
10658
10659                 else
10660                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10661                 fi
10662         fi
10663
10664         if test $ol_with_threads = mach ; then
10665                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10666         fi
10667 fi
10668
10669 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10670         -o $ol_with_threads = pth ; then
10671
10672         for ac_hdr in pth.h
10673 do
10674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10675 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10676 echo "configure:10677: checking for $ac_hdr" >&5
10677 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10678   echo $ac_n "(cached) $ac_c" 1>&6
10679 else
10680   cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683 #include <$ac_hdr>
10684 EOF
10685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10686 { (eval echo configure:10687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10688 if test -z "$ac_err"; then
10689   rm -rf conftest*
10690   eval "ac_cv_header_$ac_safe=yes"
10691 else
10692   echo "$ac_err" >&5
10693   echo "configure: failed program was:" >&5
10694   cat conftest.$ac_ext >&5
10695   rm -rf conftest*
10696   eval "ac_cv_header_$ac_safe=no"
10697 fi
10698 rm -f conftest*
10699 fi
10700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10701   echo "$ac_t""yes" 1>&6
10702     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10703   cat >> confdefs.h <<EOF
10704 #define $ac_tr_hdr 1
10705 EOF
10706  
10707 else
10708   echo "$ac_t""no" 1>&6
10709 fi
10710 done
10711
10712
10713         if test $ac_cv_header_pth_h = yes ; then
10714                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10715 echo "configure:10716: checking for pth_version in -lpth" >&5
10716 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10718   echo $ac_n "(cached) $ac_c" 1>&6
10719 else
10720   ac_save_LIBS="$LIBS"
10721 LIBS="-lpth  $LIBS"
10722 cat > conftest.$ac_ext <<EOF
10723 #line 10724 "configure"
10724 #include "confdefs.h"
10725 /* Override any gcc2 internal prototype to avoid an error.  */
10726 /* We use char because int might match the return type of a gcc2
10727     builtin and then its argument prototype would still apply.  */
10728 char pth_version();
10729
10730 int main() {
10731 pth_version()
10732 ; return 0; }
10733 EOF
10734 if { (eval echo configure:10735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10735   rm -rf conftest*
10736   eval "ac_cv_lib_$ac_lib_var=yes"
10737 else
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -rf conftest*
10741   eval "ac_cv_lib_$ac_lib_var=no"
10742 fi
10743 rm -f conftest*
10744 LIBS="$ac_save_LIBS"
10745
10746 fi
10747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10748   echo "$ac_t""yes" 1>&6
10749   have_pth=yes
10750 else
10751   echo "$ac_t""no" 1>&6
10752 have_pth=no
10753 fi
10754
10755
10756                 if test $have_pth = yes ; then
10757                         cat >> confdefs.h <<\EOF
10758 #define HAVE_GNU_PTH 1
10759 EOF
10760
10761                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10762                         ol_link_threads=pth
10763
10764                         if test $ol_with_yielding_select = auto ; then
10765                                 ol_with_yielding_select=yes
10766                         fi
10767                 fi
10768         fi
10769 fi
10770
10771 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10772         -o $ol_with_threads = lwp ; then
10773
10774                 for ac_hdr in thread.h synch.h
10775 do
10776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10778 echo "configure:10779: checking for $ac_hdr" >&5
10779 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10780   echo $ac_n "(cached) $ac_c" 1>&6
10781 else
10782   cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785 #include <$ac_hdr>
10786 EOF
10787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10788 { (eval echo configure:10789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10790 if test -z "$ac_err"; then
10791   rm -rf conftest*
10792   eval "ac_cv_header_$ac_safe=yes"
10793 else
10794   echo "$ac_err" >&5
10795   echo "configure: failed program was:" >&5
10796   cat conftest.$ac_ext >&5
10797   rm -rf conftest*
10798   eval "ac_cv_header_$ac_safe=no"
10799 fi
10800 rm -f conftest*
10801 fi
10802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10803   echo "$ac_t""yes" 1>&6
10804     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10805   cat >> confdefs.h <<EOF
10806 #define $ac_tr_hdr 1
10807 EOF
10808  
10809 else
10810   echo "$ac_t""no" 1>&6
10811 fi
10812 done
10813
10814         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10815                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10816 echo "configure:10817: checking for thr_create in -lthread" >&5
10817 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10818 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10819   echo $ac_n "(cached) $ac_c" 1>&6
10820 else
10821   ac_save_LIBS="$LIBS"
10822 LIBS="-lthread  $LIBS"
10823 cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826 /* Override any gcc2 internal prototype to avoid an error.  */
10827 /* We use char because int might match the return type of a gcc2
10828     builtin and then its argument prototype would still apply.  */
10829 char thr_create();
10830
10831 int main() {
10832 thr_create()
10833 ; return 0; }
10834 EOF
10835 if { (eval echo configure:10836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10836   rm -rf conftest*
10837   eval "ac_cv_lib_$ac_lib_var=yes"
10838 else
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_lib_$ac_lib_var=no"
10843 fi
10844 rm -f conftest*
10845 LIBS="$ac_save_LIBS"
10846
10847 fi
10848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10849   echo "$ac_t""yes" 1>&6
10850   have_thr=yes
10851 else
10852   echo "$ac_t""no" 1>&6
10853 have_thr=no
10854 fi
10855
10856
10857                 if test $have_thr = yes ; then
10858                         cat >> confdefs.h <<\EOF
10859 #define HAVE_THR 1
10860 EOF
10861
10862                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10863                         ol_link_threads=thr
10864
10865                         if test $ol_with_yielding_select = auto ; then
10866                                 ol_with_yielding_select=yes
10867                         fi
10868
10869                                                 for ac_func in \
10870                                 thr_setconcurrency \
10871                                 thr_getconcurrency \
10872                         
10873 do
10874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10875 echo "configure:10876: checking for $ac_func" >&5
10876 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10877   echo $ac_n "(cached) $ac_c" 1>&6
10878 else
10879   cat > conftest.$ac_ext <<EOF
10880 #line 10881 "configure"
10881 #include "confdefs.h"
10882 /* System header to define __stub macros and hopefully few prototypes,
10883     which can conflict with char $ac_func(); below.  */
10884 #include <assert.h>
10885 /* Override any gcc2 internal prototype to avoid an error.  */
10886 /* We use char because int might match the return type of a gcc2
10887     builtin and then its argument prototype would still apply.  */
10888 char $ac_func();
10889 char (*f)();
10890
10891 int main() {
10892
10893 /* The GNU C library defines this for functions which it implements
10894     to always fail with ENOSYS.  Some functions are actually named
10895     something starting with __ and the normal name is an alias.  */
10896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10897 choke me
10898 #else
10899 f = $ac_func;
10900 #endif
10901
10902 ; return 0; }
10903 EOF
10904 if { (eval echo configure:10905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10905   rm -rf conftest*
10906   eval "ac_cv_func_$ac_func=yes"
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_func_$ac_func=no"
10912 fi
10913 rm -f conftest*
10914 fi
10915
10916 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10917   echo "$ac_t""yes" 1>&6
10918     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10919   cat >> confdefs.h <<EOF
10920 #define $ac_tr_func 1
10921 EOF
10922  
10923 else
10924   echo "$ac_t""no" 1>&6
10925 fi
10926 done
10927
10928                 fi
10929         fi
10930
10931                 for ac_hdr in lwp/lwp.h
10932 do
10933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10935 echo "configure:10936: checking for $ac_hdr" >&5
10936 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10937   echo $ac_n "(cached) $ac_c" 1>&6
10938 else
10939   cat > conftest.$ac_ext <<EOF
10940 #line 10941 "configure"
10941 #include "confdefs.h"
10942 #include <$ac_hdr>
10943 EOF
10944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10945 { (eval echo configure:10946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10947 if test -z "$ac_err"; then
10948   rm -rf conftest*
10949   eval "ac_cv_header_$ac_safe=yes"
10950 else
10951   echo "$ac_err" >&5
10952   echo "configure: failed program was:" >&5
10953   cat conftest.$ac_ext >&5
10954   rm -rf conftest*
10955   eval "ac_cv_header_$ac_safe=no"
10956 fi
10957 rm -f conftest*
10958 fi
10959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10960   echo "$ac_t""yes" 1>&6
10961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10962   cat >> confdefs.h <<EOF
10963 #define $ac_tr_hdr 1
10964 EOF
10965  
10966 else
10967   echo "$ac_t""no" 1>&6
10968 fi
10969 done
10970
10971         if test $ac_cv_header_lwp_lwp_h = yes ; then
10972                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10973 echo "configure:10974: checking for lwp_create in -llwp" >&5
10974 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10975 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10976   echo $ac_n "(cached) $ac_c" 1>&6
10977 else
10978   ac_save_LIBS="$LIBS"
10979 LIBS="-llwp  $LIBS"
10980 cat > conftest.$ac_ext <<EOF
10981 #line 10982 "configure"
10982 #include "confdefs.h"
10983 /* Override any gcc2 internal prototype to avoid an error.  */
10984 /* We use char because int might match the return type of a gcc2
10985     builtin and then its argument prototype would still apply.  */
10986 char lwp_create();
10987
10988 int main() {
10989 lwp_create()
10990 ; return 0; }
10991 EOF
10992 if { (eval echo configure:10993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10993   rm -rf conftest*
10994   eval "ac_cv_lib_$ac_lib_var=yes"
10995 else
10996   echo "configure: failed program was:" >&5
10997   cat conftest.$ac_ext >&5
10998   rm -rf conftest*
10999   eval "ac_cv_lib_$ac_lib_var=no"
11000 fi
11001 rm -f conftest*
11002 LIBS="$ac_save_LIBS"
11003
11004 fi
11005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11006   echo "$ac_t""yes" 1>&6
11007   have_lwp=yes
11008 else
11009   echo "$ac_t""no" 1>&6
11010 have_lwp=no
11011 fi
11012
11013
11014                 if test $have_lwp = yes ; then
11015                         cat >> confdefs.h <<\EOF
11016 #define HAVE_LWP 1
11017 EOF
11018
11019                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11020                         ol_link_threads=lwp
11021
11022                         if test $ol_with_yielding_select = auto ; then
11023                                 ol_with_yielding_select=no
11024                         fi
11025                 fi
11026         fi
11027 fi
11028
11029 if test $ol_with_yielding_select = yes ; then
11030         cat >> confdefs.h <<\EOF
11031 #define HAVE_YIELDING_SELECT 1
11032 EOF
11033
11034 fi
11035
11036 if test $ol_with_threads = manual ; then
11037                 ol_link_threads=yes
11038
11039         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11040
11041         for ac_hdr in pthread.h sched.h
11042 do
11043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11045 echo "configure:11046: checking for $ac_hdr" >&5
11046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11047   echo $ac_n "(cached) $ac_c" 1>&6
11048 else
11049   cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11052 #include <$ac_hdr>
11053 EOF
11054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11055 { (eval echo configure:11056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11057 if test -z "$ac_err"; then
11058   rm -rf conftest*
11059   eval "ac_cv_header_$ac_safe=yes"
11060 else
11061   echo "$ac_err" >&5
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -rf conftest*
11065   eval "ac_cv_header_$ac_safe=no"
11066 fi
11067 rm -f conftest*
11068 fi
11069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11070   echo "$ac_t""yes" 1>&6
11071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11072   cat >> confdefs.h <<EOF
11073 #define $ac_tr_hdr 1
11074 EOF
11075  
11076 else
11077   echo "$ac_t""no" 1>&6
11078 fi
11079 done
11080
11081         for ac_func in sched_yield pthread_yield
11082 do
11083 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11084 echo "configure:11085: checking for $ac_func" >&5
11085 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11086   echo $ac_n "(cached) $ac_c" 1>&6
11087 else
11088   cat > conftest.$ac_ext <<EOF
11089 #line 11090 "configure"
11090 #include "confdefs.h"
11091 /* System header to define __stub macros and hopefully few prototypes,
11092     which can conflict with char $ac_func(); below.  */
11093 #include <assert.h>
11094 /* Override any gcc2 internal prototype to avoid an error.  */
11095 /* We use char because int might match the return type of a gcc2
11096     builtin and then its argument prototype would still apply.  */
11097 char $ac_func();
11098 char (*f)();
11099
11100 int main() {
11101
11102 /* The GNU C library defines this for functions which it implements
11103     to always fail with ENOSYS.  Some functions are actually named
11104     something starting with __ and the normal name is an alias.  */
11105 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11106 choke me
11107 #else
11108 f = $ac_func;
11109 #endif
11110
11111 ; return 0; }
11112 EOF
11113 if { (eval echo configure:11114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11114   rm -rf conftest*
11115   eval "ac_cv_func_$ac_func=yes"
11116 else
11117   echo "configure: failed program was:" >&5
11118   cat conftest.$ac_ext >&5
11119   rm -rf conftest*
11120   eval "ac_cv_func_$ac_func=no"
11121 fi
11122 rm -f conftest*
11123 fi
11124
11125 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11126   echo "$ac_t""yes" 1>&6
11127     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11128   cat >> confdefs.h <<EOF
11129 #define $ac_tr_func 1
11130 EOF
11131  
11132 else
11133   echo "$ac_t""no" 1>&6
11134 fi
11135 done
11136
11137         
11138         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11139 echo "configure:11140: checking for LinuxThreads pthread.h" >&5
11140 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11141   echo $ac_n "(cached) $ac_c" 1>&6
11142 else
11143   cat > conftest.$ac_ext <<EOF
11144 #line 11145 "configure"
11145 #include "confdefs.h"
11146 #include <pthread.h>
11147 EOF
11148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11149   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11150   rm -rf conftest*
11151   ol_cv_header_linux_threads=yes
11152 else
11153   rm -rf conftest*
11154   ol_cv_header_linux_threads=no
11155 fi
11156 rm -f conftest*
11157
11158                 
11159 fi
11160
11161 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11162         if test $ol_cv_header_linux_threads = yes; then
11163                 cat >> confdefs.h <<\EOF
11164 #define HAVE_LINUX_THREADS 1
11165 EOF
11166
11167         fi
11168
11169
11170         for ac_hdr in mach/cthreads.h
11171 do
11172 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11173 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11174 echo "configure:11175: checking for $ac_hdr" >&5
11175 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11176   echo $ac_n "(cached) $ac_c" 1>&6
11177 else
11178   cat > conftest.$ac_ext <<EOF
11179 #line 11180 "configure"
11180 #include "confdefs.h"
11181 #include <$ac_hdr>
11182 EOF
11183 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11184 { (eval echo configure:11185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11185 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11186 if test -z "$ac_err"; then
11187   rm -rf conftest*
11188   eval "ac_cv_header_$ac_safe=yes"
11189 else
11190   echo "$ac_err" >&5
11191   echo "configure: failed program was:" >&5
11192   cat conftest.$ac_ext >&5
11193   rm -rf conftest*
11194   eval "ac_cv_header_$ac_safe=no"
11195 fi
11196 rm -f conftest*
11197 fi
11198 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11199   echo "$ac_t""yes" 1>&6
11200     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11201   cat >> confdefs.h <<EOF
11202 #define $ac_tr_hdr 1
11203 EOF
11204  
11205 else
11206   echo "$ac_t""no" 1>&6
11207 fi
11208 done
11209
11210         for ac_hdr in lwp/lwp.h
11211 do
11212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11214 echo "configure:11215: checking for $ac_hdr" >&5
11215 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11216   echo $ac_n "(cached) $ac_c" 1>&6
11217 else
11218   cat > conftest.$ac_ext <<EOF
11219 #line 11220 "configure"
11220 #include "confdefs.h"
11221 #include <$ac_hdr>
11222 EOF
11223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11224 { (eval echo configure:11225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11226 if test -z "$ac_err"; then
11227   rm -rf conftest*
11228   eval "ac_cv_header_$ac_safe=yes"
11229 else
11230   echo "$ac_err" >&5
11231   echo "configure: failed program was:" >&5
11232   cat conftest.$ac_ext >&5
11233   rm -rf conftest*
11234   eval "ac_cv_header_$ac_safe=no"
11235 fi
11236 rm -f conftest*
11237 fi
11238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11239   echo "$ac_t""yes" 1>&6
11240     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11241   cat >> confdefs.h <<EOF
11242 #define $ac_tr_hdr 1
11243 EOF
11244  
11245 else
11246   echo "$ac_t""no" 1>&6
11247 fi
11248 done
11249
11250         for ac_hdr in thread.h synch.h
11251 do
11252 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11253 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11254 echo "configure:11255: checking for $ac_hdr" >&5
11255 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11256   echo $ac_n "(cached) $ac_c" 1>&6
11257 else
11258   cat > conftest.$ac_ext <<EOF
11259 #line 11260 "configure"
11260 #include "confdefs.h"
11261 #include <$ac_hdr>
11262 EOF
11263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11264 { (eval echo configure:11265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11266 if test -z "$ac_err"; then
11267   rm -rf conftest*
11268   eval "ac_cv_header_$ac_safe=yes"
11269 else
11270   echo "$ac_err" >&5
11271   echo "configure: failed program was:" >&5
11272   cat conftest.$ac_ext >&5
11273   rm -rf conftest*
11274   eval "ac_cv_header_$ac_safe=no"
11275 fi
11276 rm -f conftest*
11277 fi
11278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11279   echo "$ac_t""yes" 1>&6
11280     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11281   cat >> confdefs.h <<EOF
11282 #define $ac_tr_hdr 1
11283 EOF
11284  
11285 else
11286   echo "$ac_t""no" 1>&6
11287 fi
11288 done
11289
11290 fi
11291
11292 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11293                         cat >> confdefs.h <<\EOF
11294 #define REENTRANT 1
11295 EOF
11296
11297         cat >> confdefs.h <<\EOF
11298 #define _REENTRANT 1
11299 EOF
11300
11301         cat >> confdefs.h <<\EOF
11302 #define THREAD_SAFE 1
11303 EOF
11304
11305         cat >> confdefs.h <<\EOF
11306 #define _THREAD_SAFE 1
11307 EOF
11308
11309         cat >> confdefs.h <<\EOF
11310 #define THREADSAFE 1
11311 EOF
11312
11313         cat >> confdefs.h <<\EOF
11314 #define _THREADSAFE 1
11315 EOF
11316
11317         cat >> confdefs.h <<\EOF
11318 #define _SGI_MP_SOURCE 1
11319 EOF
11320
11321
11322                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11323 echo "configure:11324: checking for thread specific errno" >&5
11324 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11325   echo $ac_n "(cached) $ac_c" 1>&6
11326 else
11327   
11328                 cat > conftest.$ac_ext <<EOF
11329 #line 11330 "configure"
11330 #include "confdefs.h"
11331 #include <errno.h>
11332 int main() {
11333 errno = 0;
11334 ; return 0; }
11335 EOF
11336 if { (eval echo configure:11337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11337   rm -rf conftest*
11338   ol_cv_errno_thread_specific=yes
11339 else
11340   echo "configure: failed program was:" >&5
11341   cat conftest.$ac_ext >&5
11342   rm -rf conftest*
11343   ol_cv_errno_thread_specific=no
11344 fi
11345 rm -f conftest*
11346         
11347 fi
11348
11349 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11350
11351                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11352 echo "configure:11353: checking for thread specific h_errno" >&5
11353 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11354   echo $ac_n "(cached) $ac_c" 1>&6
11355 else
11356   
11357                 cat > conftest.$ac_ext <<EOF
11358 #line 11359 "configure"
11359 #include "confdefs.h"
11360 #include <netdb.h>
11361 int main() {
11362 h_errno = 0;
11363 ; return 0; }
11364 EOF
11365 if { (eval echo configure:11366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11366   rm -rf conftest*
11367   ol_cv_h_errno_thread_specific=yes
11368 else
11369   echo "configure: failed program was:" >&5
11370   cat conftest.$ac_ext >&5
11371   rm -rf conftest*
11372   ol_cv_h_errno_thread_specific=no
11373 fi
11374 rm -f conftest*
11375         
11376 fi
11377
11378 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11379
11380         if test $ol_cv_errno_thread_specific != yes \
11381                 -o $ol_cv_h_errno_thread_specific != yes ; then
11382                 LIBS="$LTHREAD_LIBS $LIBS"
11383                 LTHREAD_LIBS=""
11384         fi
11385
11386 fi  
11387
11388 if test $ol_link_threads = no ; then
11389         if test $ol_with_threads = yes ; then
11390                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11391         fi
11392
11393         if test $ol_with_threads = auto ; then
11394                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11395                 ol_with_threads=no
11396         fi
11397
11398         cat >> confdefs.h <<\EOF
11399 #define NO_THREADS 1
11400 EOF
11401
11402         LTHREAD_LIBS=""
11403 fi
11404
11405 if test $ol_link_threads != no ; then
11406         cat >> confdefs.h <<\EOF
11407 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11408 EOF
11409
11410 fi
11411
11412 ol_link_ldbm=no 
11413
11414 if test $ol_with_ldbm_api = auto \
11415         -o $ol_with_ldbm_api = berkeley \
11416         -o $ol_with_ldbm_api = bcompat ; then
11417
11418         if test $ol_with_ldbm_api = bcompat; then \
11419                 ol_cv_berkeley_db=no
11420 for ac_hdr in db_185.h db.h
11421 do
11422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11424 echo "configure:11425: checking for $ac_hdr" >&5
11425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11426   echo $ac_n "(cached) $ac_c" 1>&6
11427 else
11428   cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431 #include <$ac_hdr>
11432 EOF
11433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11434 { (eval echo configure:11435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11436 if test -z "$ac_err"; then
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=yes"
11439 else
11440   echo "$ac_err" >&5
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   eval "ac_cv_header_$ac_safe=no"
11445 fi
11446 rm -f conftest*
11447 fi
11448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11449   echo "$ac_t""yes" 1>&6
11450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11451   cat >> confdefs.h <<EOF
11452 #define $ac_tr_hdr 1
11453 EOF
11454  
11455 else
11456   echo "$ac_t""no" 1>&6
11457 fi
11458 done
11459
11460 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11461         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11462 echo "configure:11463: checking if Berkeley DB header compatibility" >&5
11463 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11464   echo $ac_n "(cached) $ac_c" 1>&6
11465 else
11466   
11467                 cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470
11471 #if HAVE_DB_185_H
11472 #       include <db_185.h>
11473 #else
11474 #       include <db.h>
11475 #endif
11476
11477  /* this check could be improved */
11478 #ifndef DB_VERSION_MAJOR
11479 #       define DB_VERSION_MAJOR 1
11480 #endif
11481
11482 #if DB_VERSION_MAJOR == 1 
11483         __db_version_1
11484 #endif
11485
11486 EOF
11487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11488   egrep "__db_version_1" >/dev/null 2>&1; then
11489   rm -rf conftest*
11490   ol_cv_header_db1=yes
11491 else
11492   rm -rf conftest*
11493   ol_cv_header_db1=no
11494 fi
11495 rm -f conftest*
11496
11497 fi
11498
11499 echo "$ac_t""$ol_cv_header_db1" 1>&6
11500
11501         if test ol_cv_header_db1=yes ; then
11502                 ol_cv_lib_db=no
11503 if test $ol_cv_lib_db = no ; then
11504         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11505 echo "configure:11506: checking for Berkeley DB link (default)" >&5
11506 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11507   echo $ac_n "(cached) $ac_c" 1>&6
11508 else
11509   
11510         ol_DB_LIB=
11511         ol_LIBS=$LIBS
11512         LIBS="$ol_DB_LIB $LIBS"
11513
11514         cat > conftest.$ac_ext <<EOF
11515 #line 11516 "configure"
11516 #include "confdefs.h"
11517
11518 #ifdef HAVE_DB_185_H
11519 # include <db_185.h>
11520 #else
11521 # include <db.h>
11522 #endif
11523
11524 #ifndef DB_VERSION_MAJOR
11525 # define DB_VERSION_MAJOR 1
11526 #endif
11527
11528 #ifndef NULL
11529 #define NULL ((void*)0)
11530 #endif
11531
11532 int main() {
11533
11534 #if DB_VERSION_MAJOR > 2
11535         db_env_create( NULL, 0 );
11536 #elif DB_VERSION_MAJOR > 1
11537         db_appexit( NULL );
11538 #else
11539         (void) dbopen( NULL, 0, 0, 0, NULL);
11540 #endif
11541
11542 ; return 0; }
11543 EOF
11544 if { (eval echo configure:11545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11545   rm -rf conftest*
11546   ol_cv_db_none=yes
11547 else
11548   echo "configure: failed program was:" >&5
11549   cat conftest.$ac_ext >&5
11550   rm -rf conftest*
11551   ol_cv_db_none=no
11552 fi
11553 rm -f conftest*
11554
11555         LIBS="$ol_LIBS"
11556
11557 fi
11558
11559 echo "$ac_t""$ol_cv_db_none" 1>&6
11560
11561         if test $ol_cv_db_none = yes ; then
11562                 ol_cv_lib_db=yes
11563         fi
11564 fi
11565
11566 if test $ol_cv_lib_db = no ; then
11567         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11568 echo "configure:11569: checking for Berkeley DB link (-ldb)" >&5
11569 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11570   echo $ac_n "(cached) $ac_c" 1>&6
11571 else
11572   
11573         ol_DB_LIB=-ldb
11574         ol_LIBS=$LIBS
11575         LIBS="$ol_DB_LIB $LIBS"
11576
11577         cat > conftest.$ac_ext <<EOF
11578 #line 11579 "configure"
11579 #include "confdefs.h"
11580
11581 #ifdef HAVE_DB_185_H
11582 # include <db_185.h>
11583 #else
11584 # include <db.h>
11585 #endif
11586
11587 #ifndef DB_VERSION_MAJOR
11588 # define DB_VERSION_MAJOR 1
11589 #endif
11590
11591 #ifndef NULL
11592 #define NULL ((void*)0)
11593 #endif
11594
11595 int main() {
11596
11597 #if DB_VERSION_MAJOR > 2
11598         db_env_create( NULL, 0 );
11599 #elif DB_VERSION_MAJOR > 1
11600         db_appexit( NULL );
11601 #else
11602         (void) dbopen( NULL, 0, 0, 0, NULL);
11603 #endif
11604
11605 ; return 0; }
11606 EOF
11607 if { (eval echo configure:11608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11608   rm -rf conftest*
11609   ol_cv_db_db=yes
11610 else
11611   echo "configure: failed program was:" >&5
11612   cat conftest.$ac_ext >&5
11613   rm -rf conftest*
11614   ol_cv_db_db=no
11615 fi
11616 rm -f conftest*
11617
11618         LIBS="$ol_LIBS"
11619
11620 fi
11621
11622 echo "$ac_t""$ol_cv_db_db" 1>&6
11623
11624         if test $ol_cv_db_db = yes ; then
11625                 ol_cv_lib_db=-ldb
11626         fi
11627 fi
11628
11629 if test $ol_cv_lib_db = no ; then
11630         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11631 echo "configure:11632: checking for Berkeley DB link (-ldb3)" >&5
11632 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11633   echo $ac_n "(cached) $ac_c" 1>&6
11634 else
11635   
11636         ol_DB_LIB=-ldb3
11637         ol_LIBS=$LIBS
11638         LIBS="$ol_DB_LIB $LIBS"
11639
11640         cat > conftest.$ac_ext <<EOF
11641 #line 11642 "configure"
11642 #include "confdefs.h"
11643
11644 #ifdef HAVE_DB_185_H
11645 # include <db_185.h>
11646 #else
11647 # include <db.h>
11648 #endif
11649
11650 #ifndef DB_VERSION_MAJOR
11651 # define DB_VERSION_MAJOR 1
11652 #endif
11653
11654 #ifndef NULL
11655 #define NULL ((void*)0)
11656 #endif
11657
11658 int main() {
11659
11660 #if DB_VERSION_MAJOR > 2
11661         db_env_create( NULL, 0 );
11662 #elif DB_VERSION_MAJOR > 1
11663         db_appexit( NULL );
11664 #else
11665         (void) dbopen( NULL, 0, 0, 0, NULL);
11666 #endif
11667
11668 ; return 0; }
11669 EOF
11670 if { (eval echo configure:11671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11671   rm -rf conftest*
11672   ol_cv_db_db3=yes
11673 else
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676   rm -rf conftest*
11677   ol_cv_db_db3=no
11678 fi
11679 rm -f conftest*
11680
11681         LIBS="$ol_LIBS"
11682
11683 fi
11684
11685 echo "$ac_t""$ol_cv_db_db3" 1>&6
11686
11687         if test $ol_cv_db_db3 = yes ; then
11688                 ol_cv_lib_db=-ldb3
11689         fi
11690 fi
11691
11692 if test $ol_cv_lib_db = no ; then
11693         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11694 echo "configure:11695: checking for Berkeley DB link (-ldb2)" >&5
11695 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11696   echo $ac_n "(cached) $ac_c" 1>&6
11697 else
11698   
11699         ol_DB_LIB=-ldb2
11700         ol_LIBS=$LIBS
11701         LIBS="$ol_DB_LIB $LIBS"
11702
11703         cat > conftest.$ac_ext <<EOF
11704 #line 11705 "configure"
11705 #include "confdefs.h"
11706
11707 #ifdef HAVE_DB_185_H
11708 # include <db_185.h>
11709 #else
11710 # include <db.h>
11711 #endif
11712
11713 #ifndef DB_VERSION_MAJOR
11714 # define DB_VERSION_MAJOR 1
11715 #endif
11716
11717 #ifndef NULL
11718 #define NULL ((void*)0)
11719 #endif
11720
11721 int main() {
11722
11723 #if DB_VERSION_MAJOR > 2
11724         db_env_create( NULL, 0 );
11725 #elif DB_VERSION_MAJOR > 1
11726         db_appexit( NULL );
11727 #else
11728         (void) dbopen( NULL, 0, 0, 0, NULL);
11729 #endif
11730
11731 ; return 0; }
11732 EOF
11733 if { (eval echo configure:11734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11734   rm -rf conftest*
11735   ol_cv_db_db2=yes
11736 else
11737   echo "configure: failed program was:" >&5
11738   cat conftest.$ac_ext >&5
11739   rm -rf conftest*
11740   ol_cv_db_db2=no
11741 fi
11742 rm -f conftest*
11743
11744         LIBS="$ol_LIBS"
11745
11746 fi
11747
11748 echo "$ac_t""$ol_cv_db_db2" 1>&6
11749
11750         if test $ol_cv_db_db2 = yes ; then
11751                 ol_cv_lib_db=-ldb2
11752         fi
11753 fi
11754
11755 if test $ol_cv_lib_db = no ; then
11756         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11757 echo "configure:11758: checking for Berkeley DB link (-ldb1)" >&5
11758 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11759   echo $ac_n "(cached) $ac_c" 1>&6
11760 else
11761   
11762         ol_DB_LIB=-ldb1
11763         ol_LIBS=$LIBS
11764         LIBS="$ol_DB_LIB $LIBS"
11765
11766         cat > conftest.$ac_ext <<EOF
11767 #line 11768 "configure"
11768 #include "confdefs.h"
11769
11770 #ifdef HAVE_DB_185_H
11771 # include <db_185.h>
11772 #else
11773 # include <db.h>
11774 #endif
11775
11776 #ifndef DB_VERSION_MAJOR
11777 # define DB_VERSION_MAJOR 1
11778 #endif
11779
11780 #ifndef NULL
11781 #define NULL ((void*)0)
11782 #endif
11783
11784 int main() {
11785
11786 #if DB_VERSION_MAJOR > 2
11787         db_env_create( NULL, 0 );
11788 #elif DB_VERSION_MAJOR > 1
11789         db_appexit( NULL );
11790 #else
11791         (void) dbopen( NULL, 0, 0, 0, NULL);
11792 #endif
11793
11794 ; return 0; }
11795 EOF
11796 if { (eval echo configure:11797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11797   rm -rf conftest*
11798   ol_cv_db_db1=yes
11799 else
11800   echo "configure: failed program was:" >&5
11801   cat conftest.$ac_ext >&5
11802   rm -rf conftest*
11803   ol_cv_db_db1=no
11804 fi
11805 rm -f conftest*
11806
11807         LIBS="$ol_LIBS"
11808
11809 fi
11810
11811 echo "$ac_t""$ol_cv_db_db1" 1>&6
11812
11813         if test $ol_cv_db_db1 = yes ; then
11814                 ol_cv_lib_db=-ldb1
11815         fi
11816 fi
11817
11818
11819                 if test "$ol_cv_lib_db" != no ; then
11820                         ol_cv_berkeley_db=yes
11821                 fi
11822         fi
11823 fi
11824
11825         else
11826                 ol_cv_berkeley_db=no
11827 for ac_hdr in db.h
11828 do
11829 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11830 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11831 echo "configure:11832: checking for $ac_hdr" >&5
11832 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11833   echo $ac_n "(cached) $ac_c" 1>&6
11834 else
11835   cat > conftest.$ac_ext <<EOF
11836 #line 11837 "configure"
11837 #include "confdefs.h"
11838 #include <$ac_hdr>
11839 EOF
11840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11841 { (eval echo configure:11842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11843 if test -z "$ac_err"; then
11844   rm -rf conftest*
11845   eval "ac_cv_header_$ac_safe=yes"
11846 else
11847   echo "$ac_err" >&5
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850   rm -rf conftest*
11851   eval "ac_cv_header_$ac_safe=no"
11852 fi
11853 rm -f conftest*
11854 fi
11855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11856   echo "$ac_t""yes" 1>&6
11857     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11858   cat >> confdefs.h <<EOF
11859 #define $ac_tr_hdr 1
11860 EOF
11861  
11862 else
11863   echo "$ac_t""no" 1>&6
11864 fi
11865 done
11866
11867 if test $ac_cv_header_db_h = yes; then
11868         ol_cv_lib_db=no
11869 if test $ol_cv_lib_db = no ; then
11870         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11871 echo "configure:11872: checking for Berkeley DB link (default)" >&5
11872 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11873   echo $ac_n "(cached) $ac_c" 1>&6
11874 else
11875   
11876         ol_DB_LIB=
11877         ol_LIBS=$LIBS
11878         LIBS="$ol_DB_LIB $LIBS"
11879
11880         cat > conftest.$ac_ext <<EOF
11881 #line 11882 "configure"
11882 #include "confdefs.h"
11883
11884 #ifdef HAVE_DB_185_H
11885 # include <db_185.h>
11886 #else
11887 # include <db.h>
11888 #endif
11889
11890 #ifndef DB_VERSION_MAJOR
11891 # define DB_VERSION_MAJOR 1
11892 #endif
11893
11894 #ifndef NULL
11895 #define NULL ((void*)0)
11896 #endif
11897
11898 int main() {
11899
11900 #if DB_VERSION_MAJOR > 2
11901         db_env_create( NULL, 0 );
11902 #elif DB_VERSION_MAJOR > 1
11903         db_appexit( NULL );
11904 #else
11905         (void) dbopen( NULL, 0, 0, 0, NULL);
11906 #endif
11907
11908 ; return 0; }
11909 EOF
11910 if { (eval echo configure:11911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11911   rm -rf conftest*
11912   ol_cv_db_none=yes
11913 else
11914   echo "configure: failed program was:" >&5
11915   cat conftest.$ac_ext >&5
11916   rm -rf conftest*
11917   ol_cv_db_none=no
11918 fi
11919 rm -f conftest*
11920
11921         LIBS="$ol_LIBS"
11922
11923 fi
11924
11925 echo "$ac_t""$ol_cv_db_none" 1>&6
11926
11927         if test $ol_cv_db_none = yes ; then
11928                 ol_cv_lib_db=yes
11929         fi
11930 fi
11931
11932 if test $ol_cv_lib_db = no ; then
11933         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11934 echo "configure:11935: checking for Berkeley DB link (-ldb)" >&5
11935 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11936   echo $ac_n "(cached) $ac_c" 1>&6
11937 else
11938   
11939         ol_DB_LIB=-ldb
11940         ol_LIBS=$LIBS
11941         LIBS="$ol_DB_LIB $LIBS"
11942
11943         cat > conftest.$ac_ext <<EOF
11944 #line 11945 "configure"
11945 #include "confdefs.h"
11946
11947 #ifdef HAVE_DB_185_H
11948 # include <db_185.h>
11949 #else
11950 # include <db.h>
11951 #endif
11952
11953 #ifndef DB_VERSION_MAJOR
11954 # define DB_VERSION_MAJOR 1
11955 #endif
11956
11957 #ifndef NULL
11958 #define NULL ((void*)0)
11959 #endif
11960
11961 int main() {
11962
11963 #if DB_VERSION_MAJOR > 2
11964         db_env_create( NULL, 0 );
11965 #elif DB_VERSION_MAJOR > 1
11966         db_appexit( NULL );
11967 #else
11968         (void) dbopen( NULL, 0, 0, 0, NULL);
11969 #endif
11970
11971 ; return 0; }
11972 EOF
11973 if { (eval echo configure:11974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11974   rm -rf conftest*
11975   ol_cv_db_db=yes
11976 else
11977   echo "configure: failed program was:" >&5
11978   cat conftest.$ac_ext >&5
11979   rm -rf conftest*
11980   ol_cv_db_db=no
11981 fi
11982 rm -f conftest*
11983
11984         LIBS="$ol_LIBS"
11985
11986 fi
11987
11988 echo "$ac_t""$ol_cv_db_db" 1>&6
11989
11990         if test $ol_cv_db_db = yes ; then
11991                 ol_cv_lib_db=-ldb
11992         fi
11993 fi
11994
11995 if test $ol_cv_lib_db = no ; then
11996         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11997 echo "configure:11998: checking for Berkeley DB link (-ldb3)" >&5
11998 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11999   echo $ac_n "(cached) $ac_c" 1>&6
12000 else
12001   
12002         ol_DB_LIB=-ldb3
12003         ol_LIBS=$LIBS
12004         LIBS="$ol_DB_LIB $LIBS"
12005
12006         cat > conftest.$ac_ext <<EOF
12007 #line 12008 "configure"
12008 #include "confdefs.h"
12009
12010 #ifdef HAVE_DB_185_H
12011 # include <db_185.h>
12012 #else
12013 # include <db.h>
12014 #endif
12015
12016 #ifndef DB_VERSION_MAJOR
12017 # define DB_VERSION_MAJOR 1
12018 #endif
12019
12020 #ifndef NULL
12021 #define NULL ((void*)0)
12022 #endif
12023
12024 int main() {
12025
12026 #if DB_VERSION_MAJOR > 2
12027         db_env_create( NULL, 0 );
12028 #elif DB_VERSION_MAJOR > 1
12029         db_appexit( NULL );
12030 #else
12031         (void) dbopen( NULL, 0, 0, 0, NULL);
12032 #endif
12033
12034 ; return 0; }
12035 EOF
12036 if { (eval echo configure:12037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12037   rm -rf conftest*
12038   ol_cv_db_db3=yes
12039 else
12040   echo "configure: failed program was:" >&5
12041   cat conftest.$ac_ext >&5
12042   rm -rf conftest*
12043   ol_cv_db_db3=no
12044 fi
12045 rm -f conftest*
12046
12047         LIBS="$ol_LIBS"
12048
12049 fi
12050
12051 echo "$ac_t""$ol_cv_db_db3" 1>&6
12052
12053         if test $ol_cv_db_db3 = yes ; then
12054                 ol_cv_lib_db=-ldb3
12055         fi
12056 fi
12057
12058 if test $ol_cv_lib_db = no ; then
12059         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12060 echo "configure:12061: checking for Berkeley DB link (-ldb2)" >&5
12061 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12062   echo $ac_n "(cached) $ac_c" 1>&6
12063 else
12064   
12065         ol_DB_LIB=-ldb2
12066         ol_LIBS=$LIBS
12067         LIBS="$ol_DB_LIB $LIBS"
12068
12069         cat > conftest.$ac_ext <<EOF
12070 #line 12071 "configure"
12071 #include "confdefs.h"
12072
12073 #ifdef HAVE_DB_185_H
12074 # include <db_185.h>
12075 #else
12076 # include <db.h>
12077 #endif
12078
12079 #ifndef DB_VERSION_MAJOR
12080 # define DB_VERSION_MAJOR 1
12081 #endif
12082
12083 #ifndef NULL
12084 #define NULL ((void*)0)
12085 #endif
12086
12087 int main() {
12088
12089 #if DB_VERSION_MAJOR > 2
12090         db_env_create( NULL, 0 );
12091 #elif DB_VERSION_MAJOR > 1
12092         db_appexit( NULL );
12093 #else
12094         (void) dbopen( NULL, 0, 0, 0, NULL);
12095 #endif
12096
12097 ; return 0; }
12098 EOF
12099 if { (eval echo configure:12100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12100   rm -rf conftest*
12101   ol_cv_db_db2=yes
12102 else
12103   echo "configure: failed program was:" >&5
12104   cat conftest.$ac_ext >&5
12105   rm -rf conftest*
12106   ol_cv_db_db2=no
12107 fi
12108 rm -f conftest*
12109
12110         LIBS="$ol_LIBS"
12111
12112 fi
12113
12114 echo "$ac_t""$ol_cv_db_db2" 1>&6
12115
12116         if test $ol_cv_db_db2 = yes ; then
12117                 ol_cv_lib_db=-ldb2
12118         fi
12119 fi
12120
12121 if test $ol_cv_lib_db = no ; then
12122         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12123 echo "configure:12124: checking for Berkeley DB link (-ldb1)" >&5
12124 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12125   echo $ac_n "(cached) $ac_c" 1>&6
12126 else
12127   
12128         ol_DB_LIB=-ldb1
12129         ol_LIBS=$LIBS
12130         LIBS="$ol_DB_LIB $LIBS"
12131
12132         cat > conftest.$ac_ext <<EOF
12133 #line 12134 "configure"
12134 #include "confdefs.h"
12135
12136 #ifdef HAVE_DB_185_H
12137 # include <db_185.h>
12138 #else
12139 # include <db.h>
12140 #endif
12141
12142 #ifndef DB_VERSION_MAJOR
12143 # define DB_VERSION_MAJOR 1
12144 #endif
12145
12146 #ifndef NULL
12147 #define NULL ((void*)0)
12148 #endif
12149
12150 int main() {
12151
12152 #if DB_VERSION_MAJOR > 2
12153         db_env_create( NULL, 0 );
12154 #elif DB_VERSION_MAJOR > 1
12155         db_appexit( NULL );
12156 #else
12157         (void) dbopen( NULL, 0, 0, 0, NULL);
12158 #endif
12159
12160 ; return 0; }
12161 EOF
12162 if { (eval echo configure:12163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12163   rm -rf conftest*
12164   ol_cv_db_db1=yes
12165 else
12166   echo "configure: failed program was:" >&5
12167   cat conftest.$ac_ext >&5
12168   rm -rf conftest*
12169   ol_cv_db_db1=no
12170 fi
12171 rm -f conftest*
12172
12173         LIBS="$ol_LIBS"
12174
12175 fi
12176
12177 echo "$ac_t""$ol_cv_db_db1" 1>&6
12178
12179         if test $ol_cv_db_db1 = yes ; then
12180                 ol_cv_lib_db=-ldb1
12181         fi
12182 fi
12183
12184
12185         if test "$ol_cv_lib_db" != no ; then
12186                 ol_cv_berkeley_db=yes
12187                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12188 echo "configure:12189: checking for Berkeley DB thread support" >&5
12189 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12190   echo $ac_n "(cached) $ac_c" 1>&6
12191 else
12192   
12193         ol_LIBS="$LIBS"
12194         if test $ol_cv_lib_db != yes ; then
12195                 LIBS="$ol_cv_lib_db"
12196         fi
12197
12198         if test "$cross_compiling" = yes; then
12199   ol_cv_berkeley_db_thread=cross
12200 else
12201   cat > conftest.$ac_ext <<EOF
12202 #line 12203 "configure"
12203 #include "confdefs.h"
12204
12205 #ifdef HAVE_DB_185_H
12206         choke me;
12207 #else
12208 #include <db.h>
12209 #endif
12210 #ifndef NULL
12211 #define NULL ((void *)0)
12212 #endif
12213 main()
12214 {
12215         int rc;
12216         u_int32_t flags = DB_CREATE | DB_THREAD;
12217
12218 #if DB_VERSION_MAJOR > 2
12219         DB_ENV *env = NULL;
12220
12221         rc = db_env_create( &env, 0 );
12222
12223         if( rc == 0 ) {
12224 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12225                 rc = env->open( env, NULL, flags, 0 );
12226 #else
12227                 rc = env->open( env, NULL, NULL, flags, 0 );
12228 #endif
12229         }
12230
12231 #else
12232         DB_ENV env;
12233         memset( &env, '\0', sizeof(env) );
12234
12235         rc = db_appinit( NULL, NULL, &env, flags );
12236
12237         if( rc == 0 ) {
12238                 db_appexit( &env );
12239         }
12240 #endif
12241 #if DB_VERSION_MAJOR > 2
12242 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12243         env->remove( env, NULL, DB_FORCE);
12244 #else
12245         env->remove( env, NULL, NULL, DB_FORCE);
12246 #endif
12247 #endif
12248
12249         return rc;
12250 }
12251 EOF
12252 if { (eval echo configure:12253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12253 then
12254   ol_cv_berkeley_db_thread=yes
12255 else
12256   echo "configure: failed program was:" >&5
12257   cat conftest.$ac_ext >&5
12258   rm -fr conftest*
12259   ol_cv_berkeley_db_thread=no
12260 fi
12261 rm -fr conftest*
12262 fi
12263
12264
12265         LIBS="$ol_LIBS"
12266
12267         if test $ol_cv_berkeley_db_thread != no ; then
12268                 cat >> confdefs.h <<\EOF
12269 #define HAVE_BERKELEY_DB_THREAD 1
12270 EOF
12271
12272         fi
12273
12274 fi
12275
12276 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12277         fi
12278 fi
12279
12280         fi
12281
12282         if test $ol_cv_berkeley_db != no ; then
12283                 cat >> confdefs.h <<\EOF
12284 #define HAVE_BERKELEY_DB 1
12285 EOF
12286
12287
12288                 ol_link_ldbm=berkeley
12289                 ol_with_ldbm_api=db
12290
12291                 if test $ol_with_ldbm_type = hash ; then
12292                         cat >> confdefs.h <<\EOF
12293 #define LDBM_USE_DBHASH 1
12294 EOF
12295
12296                 else
12297                         cat >> confdefs.h <<\EOF
12298 #define LDBM_USE_DBBTREE 1
12299 EOF
12300
12301                 fi
12302
12303                                                 if test $ol_cv_lib_db != yes ; then
12304                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12305                 fi
12306         fi
12307 fi
12308
12309 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12310         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12311         ol_with_ldbm_api=none
12312 fi
12313
12314 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12315         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12316 echo "configure:12317: checking for MDBM library" >&5
12317 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12318   echo $ac_n "(cached) $ac_c" 1>&6
12319 else
12320         ol_LIBS="$LIBS"
12321         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12322 echo "configure:12323: checking for mdbm_set_chain" >&5
12323 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12324   echo $ac_n "(cached) $ac_c" 1>&6
12325 else
12326   cat > conftest.$ac_ext <<EOF
12327 #line 12328 "configure"
12328 #include "confdefs.h"
12329 /* System header to define __stub macros and hopefully few prototypes,
12330     which can conflict with char mdbm_set_chain(); below.  */
12331 #include <assert.h>
12332 /* Override any gcc2 internal prototype to avoid an error.  */
12333 /* We use char because int might match the return type of a gcc2
12334     builtin and then its argument prototype would still apply.  */
12335 char mdbm_set_chain();
12336 char (*f)();
12337
12338 int main() {
12339
12340 /* The GNU C library defines this for functions which it implements
12341     to always fail with ENOSYS.  Some functions are actually named
12342     something starting with __ and the normal name is an alias.  */
12343 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12344 choke me
12345 #else
12346 f = mdbm_set_chain;
12347 #endif
12348
12349 ; return 0; }
12350 EOF
12351 if { (eval echo configure:12352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12352   rm -rf conftest*
12353   eval "ac_cv_func_mdbm_set_chain=yes"
12354 else
12355   echo "configure: failed program was:" >&5
12356   cat conftest.$ac_ext >&5
12357   rm -rf conftest*
12358   eval "ac_cv_func_mdbm_set_chain=no"
12359 fi
12360 rm -f conftest*
12361 fi
12362
12363 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12364   echo "$ac_t""yes" 1>&6
12365   ol_cv_lib_mdbm=yes
12366 else
12367   echo "$ac_t""no" 1>&6
12368
12369                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12370 echo "configure:12371: checking for mdbm_set_chain in -lmdbm" >&5
12371 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12373   echo $ac_n "(cached) $ac_c" 1>&6
12374 else
12375   ac_save_LIBS="$LIBS"
12376 LIBS="-lmdbm  $LIBS"
12377 cat > conftest.$ac_ext <<EOF
12378 #line 12379 "configure"
12379 #include "confdefs.h"
12380 /* Override any gcc2 internal prototype to avoid an error.  */
12381 /* We use char because int might match the return type of a gcc2
12382     builtin and then its argument prototype would still apply.  */
12383 char mdbm_set_chain();
12384
12385 int main() {
12386 mdbm_set_chain()
12387 ; return 0; }
12388 EOF
12389 if { (eval echo configure:12390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12390   rm -rf conftest*
12391   eval "ac_cv_lib_$ac_lib_var=yes"
12392 else
12393   echo "configure: failed program was:" >&5
12394   cat conftest.$ac_ext >&5
12395   rm -rf conftest*
12396   eval "ac_cv_lib_$ac_lib_var=no"
12397 fi
12398 rm -f conftest*
12399 LIBS="$ac_save_LIBS"
12400
12401 fi
12402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12403   echo "$ac_t""yes" 1>&6
12404   ol_cv_lib_mdbm=-lmdbm
12405 else
12406   echo "$ac_t""no" 1>&6
12407 ol_cv_lib_mdbm=no
12408 fi
12409
12410         
12411 fi
12412
12413         LIBS="$ol_LIBS"
12414
12415 fi
12416
12417 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12418
12419
12420  for ac_hdr in mdbm.h
12421 do
12422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12424 echo "configure:12425: checking for $ac_hdr" >&5
12425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12426   echo $ac_n "(cached) $ac_c" 1>&6
12427 else
12428   cat > conftest.$ac_ext <<EOF
12429 #line 12430 "configure"
12430 #include "confdefs.h"
12431 #include <$ac_hdr>
12432 EOF
12433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12434 { (eval echo configure:12435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12436 if test -z "$ac_err"; then
12437   rm -rf conftest*
12438   eval "ac_cv_header_$ac_safe=yes"
12439 else
12440   echo "$ac_err" >&5
12441   echo "configure: failed program was:" >&5
12442   cat conftest.$ac_ext >&5
12443   rm -rf conftest*
12444   eval "ac_cv_header_$ac_safe=no"
12445 fi
12446 rm -f conftest*
12447 fi
12448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12449   echo "$ac_t""yes" 1>&6
12450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12451   cat >> confdefs.h <<EOF
12452 #define $ac_tr_hdr 1
12453 EOF
12454  
12455 else
12456   echo "$ac_t""no" 1>&6
12457 fi
12458 done
12459
12460  echo $ac_n "checking for db""... $ac_c" 1>&6
12461 echo "configure:12462: checking for db" >&5
12462 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12463   echo $ac_n "(cached) $ac_c" 1>&6
12464 else
12465   
12466         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12467                 ol_cv_mdbm=no
12468         else
12469                 ol_cv_mdbm=yes
12470         fi
12471
12472 fi
12473
12474 echo "$ac_t""$ol_cv_mdbm" 1>&6
12475  if test $ol_cv_mdbm = yes ; then
12476         cat >> confdefs.h <<\EOF
12477 #define HAVE_MDBM 1
12478 EOF
12479
12480  fi
12481
12482
12483         if test $ol_cv_mdbm = yes ; then
12484                 ol_link_ldbm=mdbm
12485                 ol_with_ldbm_api=mdbm
12486                 if test $ol_cv_lib_mdbm != yes ; then
12487                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12488                 fi
12489         fi
12490 fi
12491
12492 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12493         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12494 echo "configure:12495: checking for GDBM library" >&5
12495 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12496   echo $ac_n "(cached) $ac_c" 1>&6
12497 else
12498         ol_LIBS="$LIBS"
12499         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12500 echo "configure:12501: checking for gdbm_open" >&5
12501 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12502   echo $ac_n "(cached) $ac_c" 1>&6
12503 else
12504   cat > conftest.$ac_ext <<EOF
12505 #line 12506 "configure"
12506 #include "confdefs.h"
12507 /* System header to define __stub macros and hopefully few prototypes,
12508     which can conflict with char gdbm_open(); below.  */
12509 #include <assert.h>
12510 /* Override any gcc2 internal prototype to avoid an error.  */
12511 /* We use char because int might match the return type of a gcc2
12512     builtin and then its argument prototype would still apply.  */
12513 char gdbm_open();
12514 char (*f)();
12515
12516 int main() {
12517
12518 /* The GNU C library defines this for functions which it implements
12519     to always fail with ENOSYS.  Some functions are actually named
12520     something starting with __ and the normal name is an alias.  */
12521 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12522 choke me
12523 #else
12524 f = gdbm_open;
12525 #endif
12526
12527 ; return 0; }
12528 EOF
12529 if { (eval echo configure:12530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12530   rm -rf conftest*
12531   eval "ac_cv_func_gdbm_open=yes"
12532 else
12533   echo "configure: failed program was:" >&5
12534   cat conftest.$ac_ext >&5
12535   rm -rf conftest*
12536   eval "ac_cv_func_gdbm_open=no"
12537 fi
12538 rm -f conftest*
12539 fi
12540
12541 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12542   echo "$ac_t""yes" 1>&6
12543   ol_cv_lib_gdbm=yes
12544 else
12545   echo "$ac_t""no" 1>&6
12546
12547                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12548 echo "configure:12549: checking for gdbm_open in -lgdbm" >&5
12549 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12551   echo $ac_n "(cached) $ac_c" 1>&6
12552 else
12553   ac_save_LIBS="$LIBS"
12554 LIBS="-lgdbm  $LIBS"
12555 cat > conftest.$ac_ext <<EOF
12556 #line 12557 "configure"
12557 #include "confdefs.h"
12558 /* Override any gcc2 internal prototype to avoid an error.  */
12559 /* We use char because int might match the return type of a gcc2
12560     builtin and then its argument prototype would still apply.  */
12561 char gdbm_open();
12562
12563 int main() {
12564 gdbm_open()
12565 ; return 0; }
12566 EOF
12567 if { (eval echo configure:12568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12568   rm -rf conftest*
12569   eval "ac_cv_lib_$ac_lib_var=yes"
12570 else
12571   echo "configure: failed program was:" >&5
12572   cat conftest.$ac_ext >&5
12573   rm -rf conftest*
12574   eval "ac_cv_lib_$ac_lib_var=no"
12575 fi
12576 rm -f conftest*
12577 LIBS="$ac_save_LIBS"
12578
12579 fi
12580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12581   echo "$ac_t""yes" 1>&6
12582   ol_cv_lib_gdbm=-lgdbm
12583 else
12584   echo "$ac_t""no" 1>&6
12585 ol_cv_lib_gdbm=no
12586 fi
12587
12588         
12589 fi
12590
12591         LIBS="$ol_LIBS"
12592
12593 fi
12594
12595 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12596
12597
12598  for ac_hdr in gdbm.h
12599 do
12600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12602 echo "configure:12603: checking for $ac_hdr" >&5
12603 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12604   echo $ac_n "(cached) $ac_c" 1>&6
12605 else
12606   cat > conftest.$ac_ext <<EOF
12607 #line 12608 "configure"
12608 #include "confdefs.h"
12609 #include <$ac_hdr>
12610 EOF
12611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12612 { (eval echo configure:12613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12614 if test -z "$ac_err"; then
12615   rm -rf conftest*
12616   eval "ac_cv_header_$ac_safe=yes"
12617 else
12618   echo "$ac_err" >&5
12619   echo "configure: failed program was:" >&5
12620   cat conftest.$ac_ext >&5
12621   rm -rf conftest*
12622   eval "ac_cv_header_$ac_safe=no"
12623 fi
12624 rm -f conftest*
12625 fi
12626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12627   echo "$ac_t""yes" 1>&6
12628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12629   cat >> confdefs.h <<EOF
12630 #define $ac_tr_hdr 1
12631 EOF
12632  
12633 else
12634   echo "$ac_t""no" 1>&6
12635 fi
12636 done
12637
12638  echo $ac_n "checking for db""... $ac_c" 1>&6
12639 echo "configure:12640: checking for db" >&5
12640 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12641   echo $ac_n "(cached) $ac_c" 1>&6
12642 else
12643   
12644         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12645                 ol_cv_gdbm=no
12646         else
12647                 ol_cv_gdbm=yes
12648         fi
12649
12650 fi
12651
12652 echo "$ac_t""$ol_cv_gdbm" 1>&6
12653  if test $ol_cv_gdbm = yes ; then
12654         cat >> confdefs.h <<\EOF
12655 #define HAVE_GDBM 1
12656 EOF
12657
12658  fi
12659
12660
12661         if test $ol_cv_gdbm = yes ; then
12662                 ol_link_ldbm=gdbm
12663                 ol_with_ldbm_api=gdbm
12664
12665                 if test $ol_cv_lib_gdbm != yes ; then
12666                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12667                 fi
12668         fi
12669 fi
12670
12671 if test $ol_with_ldbm_api = ndbm ; then
12672         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12673 echo "configure:12674: checking for NDBM library" >&5
12674 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12675   echo $ac_n "(cached) $ac_c" 1>&6
12676 else
12677         ol_LIBS="$LIBS"
12678         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12679 echo "configure:12680: checking for dbm_open" >&5
12680 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12681   echo $ac_n "(cached) $ac_c" 1>&6
12682 else
12683   cat > conftest.$ac_ext <<EOF
12684 #line 12685 "configure"
12685 #include "confdefs.h"
12686 /* System header to define __stub macros and hopefully few prototypes,
12687     which can conflict with char dbm_open(); below.  */
12688 #include <assert.h>
12689 /* Override any gcc2 internal prototype to avoid an error.  */
12690 /* We use char because int might match the return type of a gcc2
12691     builtin and then its argument prototype would still apply.  */
12692 char dbm_open();
12693 char (*f)();
12694
12695 int main() {
12696
12697 /* The GNU C library defines this for functions which it implements
12698     to always fail with ENOSYS.  Some functions are actually named
12699     something starting with __ and the normal name is an alias.  */
12700 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12701 choke me
12702 #else
12703 f = dbm_open;
12704 #endif
12705
12706 ; return 0; }
12707 EOF
12708 if { (eval echo configure:12709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12709   rm -rf conftest*
12710   eval "ac_cv_func_dbm_open=yes"
12711 else
12712   echo "configure: failed program was:" >&5
12713   cat conftest.$ac_ext >&5
12714   rm -rf conftest*
12715   eval "ac_cv_func_dbm_open=no"
12716 fi
12717 rm -f conftest*
12718 fi
12719
12720 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12721   echo "$ac_t""yes" 1>&6
12722   ol_cv_lib_ndbm=yes
12723 else
12724   echo "$ac_t""no" 1>&6
12725
12726                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12727 echo "configure:12728: checking for dbm_open in -lndbm" >&5
12728 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12729 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12730   echo $ac_n "(cached) $ac_c" 1>&6
12731 else
12732   ac_save_LIBS="$LIBS"
12733 LIBS="-lndbm  $LIBS"
12734 cat > conftest.$ac_ext <<EOF
12735 #line 12736 "configure"
12736 #include "confdefs.h"
12737 /* Override any gcc2 internal prototype to avoid an error.  */
12738 /* We use char because int might match the return type of a gcc2
12739     builtin and then its argument prototype would still apply.  */
12740 char dbm_open();
12741
12742 int main() {
12743 dbm_open()
12744 ; return 0; }
12745 EOF
12746 if { (eval echo configure:12747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12747   rm -rf conftest*
12748   eval "ac_cv_lib_$ac_lib_var=yes"
12749 else
12750   echo "configure: failed program was:" >&5
12751   cat conftest.$ac_ext >&5
12752   rm -rf conftest*
12753   eval "ac_cv_lib_$ac_lib_var=no"
12754 fi
12755 rm -f conftest*
12756 LIBS="$ac_save_LIBS"
12757
12758 fi
12759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12760   echo "$ac_t""yes" 1>&6
12761   ol_cv_lib_ndbm=-lndbm
12762 else
12763   echo "$ac_t""no" 1>&6
12764
12765                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12766 echo "configure:12767: checking for dbm_open in -ldbm" >&5
12767 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12768 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12769   echo $ac_n "(cached) $ac_c" 1>&6
12770 else
12771   ac_save_LIBS="$LIBS"
12772 LIBS="-ldbm  $LIBS"
12773 cat > conftest.$ac_ext <<EOF
12774 #line 12775 "configure"
12775 #include "confdefs.h"
12776 /* Override any gcc2 internal prototype to avoid an error.  */
12777 /* We use char because int might match the return type of a gcc2
12778     builtin and then its argument prototype would still apply.  */
12779 char dbm_open();
12780
12781 int main() {
12782 dbm_open()
12783 ; return 0; }
12784 EOF
12785 if { (eval echo configure:12786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12786   rm -rf conftest*
12787   eval "ac_cv_lib_$ac_lib_var=yes"
12788 else
12789   echo "configure: failed program was:" >&5
12790   cat conftest.$ac_ext >&5
12791   rm -rf conftest*
12792   eval "ac_cv_lib_$ac_lib_var=no"
12793 fi
12794 rm -f conftest*
12795 LIBS="$ac_save_LIBS"
12796
12797 fi
12798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12799   echo "$ac_t""yes" 1>&6
12800   ol_cv_lib_ndbm=-ldbm
12801 else
12802   echo "$ac_t""no" 1>&6
12803 ol_cv_lib_ndbm=no
12804 fi
12805                 
12806 fi
12807
12808         
12809 fi
12810
12811         LIBS="$ol_LIBS"
12812
12813 fi
12814
12815 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12816
12817
12818  for ac_hdr in ndbm.h
12819 do
12820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12822 echo "configure:12823: checking for $ac_hdr" >&5
12823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12824   echo $ac_n "(cached) $ac_c" 1>&6
12825 else
12826   cat > conftest.$ac_ext <<EOF
12827 #line 12828 "configure"
12828 #include "confdefs.h"
12829 #include <$ac_hdr>
12830 EOF
12831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12832 { (eval echo configure:12833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12834 if test -z "$ac_err"; then
12835   rm -rf conftest*
12836   eval "ac_cv_header_$ac_safe=yes"
12837 else
12838   echo "$ac_err" >&5
12839   echo "configure: failed program was:" >&5
12840   cat conftest.$ac_ext >&5
12841   rm -rf conftest*
12842   eval "ac_cv_header_$ac_safe=no"
12843 fi
12844 rm -f conftest*
12845 fi
12846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12847   echo "$ac_t""yes" 1>&6
12848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12849   cat >> confdefs.h <<EOF
12850 #define $ac_tr_hdr 1
12851 EOF
12852  
12853 else
12854   echo "$ac_t""no" 1>&6
12855 fi
12856 done
12857
12858  echo $ac_n "checking for db""... $ac_c" 1>&6
12859 echo "configure:12860: checking for db" >&5
12860 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12861   echo $ac_n "(cached) $ac_c" 1>&6
12862 else
12863   
12864         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12865                 ol_cv_ndbm=no
12866         else
12867                 ol_cv_ndbm=yes
12868         fi
12869
12870 fi
12871
12872 echo "$ac_t""$ol_cv_ndbm" 1>&6
12873  if test $ol_cv_ndbm = yes ; then
12874         cat >> confdefs.h <<\EOF
12875 #define HAVE_NDBM 1
12876 EOF
12877
12878  fi
12879
12880
12881         if test $ol_cv_ndbm = yes ; then
12882                 ol_link_ldbm=ndbm
12883                 ol_with_ldbm_api=ndbm
12884
12885                 if test $ol_cv_lib_ndbm != yes ; then
12886                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12887                 fi
12888         fi
12889 fi
12890
12891 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12892         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12893         if test $ol_enable_ldbm = yes ; then
12894                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12895         fi
12896
12897         echo "configure: warning: disabling LDBM" 1>&2
12898         ol_enable_ldbm=no
12899 fi
12900
12901 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12902         LINK_BINS_DYNAMIC="yes"
12903 else
12904         LINK_BINS_DYNAMIC="no"
12905 fi
12906
12907 if test $ol_enable_wrappers != no ; then
12908         for ac_hdr in tcpd.h
12909 do
12910 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12911 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12912 echo "configure:12913: checking for $ac_hdr" >&5
12913 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12914   echo $ac_n "(cached) $ac_c" 1>&6
12915 else
12916   cat > conftest.$ac_ext <<EOF
12917 #line 12918 "configure"
12918 #include "confdefs.h"
12919 #include <$ac_hdr>
12920 EOF
12921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12922 { (eval echo configure:12923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12924 if test -z "$ac_err"; then
12925   rm -rf conftest*
12926   eval "ac_cv_header_$ac_safe=yes"
12927 else
12928   echo "$ac_err" >&5
12929   echo "configure: failed program was:" >&5
12930   cat conftest.$ac_ext >&5
12931   rm -rf conftest*
12932   eval "ac_cv_header_$ac_safe=no"
12933 fi
12934 rm -f conftest*
12935 fi
12936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12937   echo "$ac_t""yes" 1>&6
12938     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12939   cat >> confdefs.h <<EOF
12940 #define $ac_tr_hdr 1
12941 EOF
12942  
12943 else
12944   echo "$ac_t""no" 1>&6
12945 fi
12946 done
12947
12948
12949         if test $ac_cv_header_tcpd_h != yes ; then
12950                 have_wrappers=no
12951         else
12952                 cat > conftest.$ac_ext <<EOF
12953 #line 12954 "configure"
12954 #include "confdefs.h"
12955
12956 int allow_severity = 0;
12957 int deny_severity  = 0;
12958                 
12959 int main() {
12960 hosts_access()
12961 ; return 0; }
12962 EOF
12963 if { (eval echo configure:12964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12964   rm -rf conftest*
12965   have_wrappers=yes
12966 else
12967   echo "configure: failed program was:" >&5
12968   cat conftest.$ac_ext >&5
12969   rm -rf conftest*
12970   have_wrappers=no
12971 fi
12972 rm -f conftest*
12973         fi
12974
12975         if test $have_wrappers = yes ; then
12976                 cat >> confdefs.h <<\EOF
12977 #define HAVE_TCPD 1
12978 EOF
12979
12980                 WRAP_LIBS="-lwrap"
12981
12982                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12983 echo "configure:12984: checking for main in -lnsl" >&5
12984 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12986   echo $ac_n "(cached) $ac_c" 1>&6
12987 else
12988   ac_save_LIBS="$LIBS"
12989 LIBS="-lnsl  $LIBS"
12990 cat > conftest.$ac_ext <<EOF
12991 #line 12992 "configure"
12992 #include "confdefs.h"
12993
12994 int main() {
12995 main()
12996 ; return 0; }
12997 EOF
12998 if { (eval echo configure:12999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12999   rm -rf conftest*
13000   eval "ac_cv_lib_$ac_lib_var=yes"
13001 else
13002   echo "configure: failed program was:" >&5
13003   cat conftest.$ac_ext >&5
13004   rm -rf conftest*
13005   eval "ac_cv_lib_$ac_lib_var=no"
13006 fi
13007 rm -f conftest*
13008 LIBS="$ac_save_LIBS"
13009
13010 fi
13011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13012   echo "$ac_t""yes" 1>&6
13013     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13015   cat >> confdefs.h <<EOF
13016 #define $ac_tr_lib 1
13017 EOF
13018
13019   LIBS="-lnsl $LIBS"
13020
13021 else
13022   echo "$ac_t""no" 1>&6
13023 fi
13024
13025         else
13026                 echo "configure: warning: could not find -lwrap" 1>&2
13027                 if test $ol_enable_wrappers = yes ; then
13028                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13029                 fi
13030
13031                 echo "configure: warning: disabling wrappers support" 1>&2
13032                 ol_enable_wrappers=no
13033                 WRAP_LIBS=""
13034         fi
13035 fi
13036
13037 if test $ol_enable_syslog != no ; then
13038         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13039 echo "configure:13040: checking for openlog" >&5
13040 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13041   echo $ac_n "(cached) $ac_c" 1>&6
13042 else
13043   cat > conftest.$ac_ext <<EOF
13044 #line 13045 "configure"
13045 #include "confdefs.h"
13046 /* System header to define __stub macros and hopefully few prototypes,
13047     which can conflict with char openlog(); below.  */
13048 #include <assert.h>
13049 /* Override any gcc2 internal prototype to avoid an error.  */
13050 /* We use char because int might match the return type of a gcc2
13051     builtin and then its argument prototype would still apply.  */
13052 char openlog();
13053 char (*f)();
13054
13055 int main() {
13056
13057 /* The GNU C library defines this for functions which it implements
13058     to always fail with ENOSYS.  Some functions are actually named
13059     something starting with __ and the normal name is an alias.  */
13060 #if defined (__stub_openlog) || defined (__stub___openlog)
13061 choke me
13062 #else
13063 f = openlog;
13064 #endif
13065
13066 ; return 0; }
13067 EOF
13068 if { (eval echo configure:13069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13069   rm -rf conftest*
13070   eval "ac_cv_func_openlog=yes"
13071 else
13072   echo "configure: failed program was:" >&5
13073   cat conftest.$ac_ext >&5
13074   rm -rf conftest*
13075   eval "ac_cv_func_openlog=no"
13076 fi
13077 rm -f conftest*
13078 fi
13079
13080 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13081   echo "$ac_t""yes" 1>&6
13082   :
13083 else
13084   echo "$ac_t""no" 1>&6
13085 fi
13086
13087         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13088                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13089         fi
13090         ol_enable_syslog=$ac_cv_func_openlog
13091 fi
13092
13093
13094 ol_link_sql=no
13095 if test $ol_enable_sql != no ; then
13096         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13097 echo "configure:13098: checking for SQLDriverConnect in -liodbc" >&5
13098 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13100   echo $ac_n "(cached) $ac_c" 1>&6
13101 else
13102   ac_save_LIBS="$LIBS"
13103 LIBS="-liodbc  $LIBS"
13104 cat > conftest.$ac_ext <<EOF
13105 #line 13106 "configure"
13106 #include "confdefs.h"
13107 /* Override any gcc2 internal prototype to avoid an error.  */
13108 /* We use char because int might match the return type of a gcc2
13109     builtin and then its argument prototype would still apply.  */
13110 char SQLDriverConnect();
13111
13112 int main() {
13113 SQLDriverConnect()
13114 ; return 0; }
13115 EOF
13116 if { (eval echo configure:13117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13117   rm -rf conftest*
13118   eval "ac_cv_lib_$ac_lib_var=yes"
13119 else
13120   echo "configure: failed program was:" >&5
13121   cat conftest.$ac_ext >&5
13122   rm -rf conftest*
13123   eval "ac_cv_lib_$ac_lib_var=no"
13124 fi
13125 rm -f conftest*
13126 LIBS="$ac_save_LIBS"
13127
13128 fi
13129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13130   echo "$ac_t""yes" 1>&6
13131   have_iodbc=yes
13132 else
13133   echo "$ac_t""no" 1>&6
13134 have_iodbc=no
13135 fi
13136
13137         if test $have_iodbc = yes ; then
13138                 ol_link_sql="-liodbc"
13139         else
13140                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13141 echo "configure:13142: checking for SQLDriverConnect in -lodbc" >&5
13142 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13143 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13144   echo $ac_n "(cached) $ac_c" 1>&6
13145 else
13146   ac_save_LIBS="$LIBS"
13147 LIBS="-lodbc  $LIBS"
13148 cat > conftest.$ac_ext <<EOF
13149 #line 13150 "configure"
13150 #include "confdefs.h"
13151 /* Override any gcc2 internal prototype to avoid an error.  */
13152 /* We use char because int might match the return type of a gcc2
13153     builtin and then its argument prototype would still apply.  */
13154 char SQLDriverConnect();
13155
13156 int main() {
13157 SQLDriverConnect()
13158 ; return 0; }
13159 EOF
13160 if { (eval echo configure:13161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13161   rm -rf conftest*
13162   eval "ac_cv_lib_$ac_lib_var=yes"
13163 else
13164   echo "configure: failed program was:" >&5
13165   cat conftest.$ac_ext >&5
13166   rm -rf conftest*
13167   eval "ac_cv_lib_$ac_lib_var=no"
13168 fi
13169 rm -f conftest*
13170 LIBS="$ac_save_LIBS"
13171
13172 fi
13173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13174   echo "$ac_t""yes" 1>&6
13175   have_odbc=yes
13176 else
13177   echo "$ac_t""no" 1>&6
13178 have_odbc=no
13179 fi
13180
13181                 if test $have_odbc = yes ; then
13182                         ol_link_sql="-lodbc"
13183                 fi
13184         fi
13185
13186         if test $ol_link_sql != no ; then
13187                 SLAPD_SQL_LIBS="$ol_link_sql"
13188
13189         elif test $ol_enable_sql != auto ; then
13190                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13191         fi
13192 fi
13193
13194 if test $ol_enable_tcl != no ; then
13195         for ac_hdr in tcl.h
13196 do
13197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13199 echo "configure:13200: checking for $ac_hdr" >&5
13200 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13201   echo $ac_n "(cached) $ac_c" 1>&6
13202 else
13203   cat > conftest.$ac_ext <<EOF
13204 #line 13205 "configure"
13205 #include "confdefs.h"
13206 #include <$ac_hdr>
13207 EOF
13208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13209 { (eval echo configure:13210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13211 if test -z "$ac_err"; then
13212   rm -rf conftest*
13213   eval "ac_cv_header_$ac_safe=yes"
13214 else
13215   echo "$ac_err" >&5
13216   echo "configure: failed program was:" >&5
13217   cat conftest.$ac_ext >&5
13218   rm -rf conftest*
13219   eval "ac_cv_header_$ac_safe=no"
13220 fi
13221 rm -f conftest*
13222 fi
13223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13224   echo "$ac_t""yes" 1>&6
13225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13226   cat >> confdefs.h <<EOF
13227 #define $ac_tr_hdr 1
13228 EOF
13229  
13230 else
13231   echo "$ac_t""no" 1>&6
13232 fi
13233 done
13234
13235
13236         if test $ac_cv_header_tcl_h != yes ; then
13237                 have_tcl=no
13238         else
13239                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13240                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13241 echo "configure:13242: checking for main in -l$lib" >&5
13242 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13243 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13244   echo $ac_n "(cached) $ac_c" 1>&6
13245 else
13246   ac_save_LIBS="$LIBS"
13247 LIBS="-l$lib  $LIBS"
13248 cat > conftest.$ac_ext <<EOF
13249 #line 13250 "configure"
13250 #include "confdefs.h"
13251
13252 int main() {
13253 main()
13254 ; return 0; }
13255 EOF
13256 if { (eval echo configure:13257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13257   rm -rf conftest*
13258   eval "ac_cv_lib_$ac_lib_var=yes"
13259 else
13260   echo "configure: failed program was:" >&5
13261   cat conftest.$ac_ext >&5
13262   rm -rf conftest*
13263   eval "ac_cv_lib_$ac_lib_var=no"
13264 fi
13265 rm -f conftest*
13266 LIBS="$ac_save_LIBS"
13267
13268 fi
13269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13270   echo "$ac_t""yes" 1>&6
13271   have_tcl=yes
13272                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13273                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13274                            else
13275                                MOD_TCL_LIB="-l${lib}"
13276                            fi;break
13277 else
13278   echo "$ac_t""no" 1>&6
13279 have_tcl=no
13280 fi
13281
13282                 done
13283         fi
13284
13285         if test $have_tcl != yes ; then
13286                 echo "configure: warning: could not find -ltcl" 1>&2
13287                 if test $ol_enable_tcl = yes ; then
13288                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13289                 fi
13290
13291                 ol_enable_tcl=no
13292         fi
13293 fi
13294
13295 ol_link_termcap=no
13296 for ac_hdr in termcap.h ncurses.h
13297 do
13298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13300 echo "configure:13301: checking for $ac_hdr" >&5
13301 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13302   echo $ac_n "(cached) $ac_c" 1>&6
13303 else
13304   cat > conftest.$ac_ext <<EOF
13305 #line 13306 "configure"
13306 #include "confdefs.h"
13307 #include <$ac_hdr>
13308 EOF
13309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13310 { (eval echo configure:13311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13312 if test -z "$ac_err"; then
13313   rm -rf conftest*
13314   eval "ac_cv_header_$ac_safe=yes"
13315 else
13316   echo "$ac_err" >&5
13317   echo "configure: failed program was:" >&5
13318   cat conftest.$ac_ext >&5
13319   rm -rf conftest*
13320   eval "ac_cv_header_$ac_safe=no"
13321 fi
13322 rm -f conftest*
13323 fi
13324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13325   echo "$ac_t""yes" 1>&6
13326     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13327   cat >> confdefs.h <<EOF
13328 #define $ac_tr_hdr 1
13329 EOF
13330  
13331 else
13332   echo "$ac_t""no" 1>&6
13333 fi
13334 done
13335
13336
13337 if test $ol_link_termcap = no ; then
13338         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13339 echo "configure:13340: checking for tputs in -ltermcap" >&5
13340 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13341 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13342   echo $ac_n "(cached) $ac_c" 1>&6
13343 else
13344   ac_save_LIBS="$LIBS"
13345 LIBS="-ltermcap  $LIBS"
13346 cat > conftest.$ac_ext <<EOF
13347 #line 13348 "configure"
13348 #include "confdefs.h"
13349 /* Override any gcc2 internal prototype to avoid an error.  */
13350 /* We use char because int might match the return type of a gcc2
13351     builtin and then its argument prototype would still apply.  */
13352 char tputs();
13353
13354 int main() {
13355 tputs()
13356 ; return 0; }
13357 EOF
13358 if { (eval echo configure:13359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13359   rm -rf conftest*
13360   eval "ac_cv_lib_$ac_lib_var=yes"
13361 else
13362   echo "configure: failed program was:" >&5
13363   cat conftest.$ac_ext >&5
13364   rm -rf conftest*
13365   eval "ac_cv_lib_$ac_lib_var=no"
13366 fi
13367 rm -f conftest*
13368 LIBS="$ac_save_LIBS"
13369
13370 fi
13371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13372   echo "$ac_t""yes" 1>&6
13373   have_termcap=yes
13374 else
13375   echo "$ac_t""no" 1>&6
13376 have_termcap=no
13377 fi
13378
13379         if test $have_termcap = yes ; then
13380                 cat >> confdefs.h <<\EOF
13381 #define HAVE_TERMCAP 1
13382 EOF
13383
13384                 ol_link_termcap=yes
13385                 TERMCAP_LIBS=-ltermcap
13386         fi
13387 fi
13388
13389 if test $ol_link_termcap = no ; then
13390         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13391 echo "configure:13392: checking for initscr in -lncurses" >&5
13392 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13393 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13394   echo $ac_n "(cached) $ac_c" 1>&6
13395 else
13396   ac_save_LIBS="$LIBS"
13397 LIBS="-lncurses  $LIBS"
13398 cat > conftest.$ac_ext <<EOF
13399 #line 13400 "configure"
13400 #include "confdefs.h"
13401 /* Override any gcc2 internal prototype to avoid an error.  */
13402 /* We use char because int might match the return type of a gcc2
13403     builtin and then its argument prototype would still apply.  */
13404 char initscr();
13405
13406 int main() {
13407 initscr()
13408 ; return 0; }
13409 EOF
13410 if { (eval echo configure:13411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13411   rm -rf conftest*
13412   eval "ac_cv_lib_$ac_lib_var=yes"
13413 else
13414   echo "configure: failed program was:" >&5
13415   cat conftest.$ac_ext >&5
13416   rm -rf conftest*
13417   eval "ac_cv_lib_$ac_lib_var=no"
13418 fi
13419 rm -f conftest*
13420 LIBS="$ac_save_LIBS"
13421
13422 fi
13423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13424   echo "$ac_t""yes" 1>&6
13425   have_ncurses=yes
13426 else
13427   echo "$ac_t""no" 1>&6
13428 have_ncurses=no
13429 fi
13430
13431         if test $have_ncurses = yes ; then
13432                 cat >> confdefs.h <<\EOF
13433 #define HAVE_NCURSES 1
13434 EOF
13435
13436                 ol_link_termcap=yes
13437                 TERMCAP_LIBS=-lncurses
13438         fi
13439 fi
13440
13441 if test $ol_link_termcap = no ; then
13442         cat >> confdefs.h <<\EOF
13443 #define NO_TERMCAP 1
13444 EOF
13445
13446         TERMCAP_LIBS=
13447 fi
13448
13449 ol_link_sasl=no
13450 ol_link_spasswd=no
13451 if test $ol_with_cyrus_sasl != no ; then
13452         for ac_hdr in sasl.h
13453 do
13454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13456 echo "configure:13457: checking for $ac_hdr" >&5
13457 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13458   echo $ac_n "(cached) $ac_c" 1>&6
13459 else
13460   cat > conftest.$ac_ext <<EOF
13461 #line 13462 "configure"
13462 #include "confdefs.h"
13463 #include <$ac_hdr>
13464 EOF
13465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13466 { (eval echo configure:13467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13468 if test -z "$ac_err"; then
13469   rm -rf conftest*
13470   eval "ac_cv_header_$ac_safe=yes"
13471 else
13472   echo "$ac_err" >&5
13473   echo "configure: failed program was:" >&5
13474   cat conftest.$ac_ext >&5
13475   rm -rf conftest*
13476   eval "ac_cv_header_$ac_safe=no"
13477 fi
13478 rm -f conftest*
13479 fi
13480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13481   echo "$ac_t""yes" 1>&6
13482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13483   cat >> confdefs.h <<EOF
13484 #define $ac_tr_hdr 1
13485 EOF
13486  
13487 else
13488   echo "$ac_t""no" 1>&6
13489 fi
13490 done
13491
13492
13493         if test $ac_cv_header_sasl_h = yes ; then
13494                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13495 echo "configure:13496: checking for sasl_client_init in -lsasl" >&5
13496 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13498   echo $ac_n "(cached) $ac_c" 1>&6
13499 else
13500   ac_save_LIBS="$LIBS"
13501 LIBS="-lsasl  $LIBS"
13502 cat > conftest.$ac_ext <<EOF
13503 #line 13504 "configure"
13504 #include "confdefs.h"
13505 /* Override any gcc2 internal prototype to avoid an error.  */
13506 /* We use char because int might match the return type of a gcc2
13507     builtin and then its argument prototype would still apply.  */
13508 char sasl_client_init();
13509
13510 int main() {
13511 sasl_client_init()
13512 ; return 0; }
13513 EOF
13514 if { (eval echo configure:13515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13515   rm -rf conftest*
13516   eval "ac_cv_lib_$ac_lib_var=yes"
13517 else
13518   echo "configure: failed program was:" >&5
13519   cat conftest.$ac_ext >&5
13520   rm -rf conftest*
13521   eval "ac_cv_lib_$ac_lib_var=no"
13522 fi
13523 rm -f conftest*
13524 LIBS="$ac_save_LIBS"
13525
13526 fi
13527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13528   echo "$ac_t""yes" 1>&6
13529   have_cyrus_sasl=yes
13530 else
13531   echo "$ac_t""no" 1>&6
13532 have_cyrus_sasl=no
13533 fi
13534
13535
13536                 if test $have_cyrus_sasl != no ; then
13537                         SASL_LIBS="-lsasl"
13538                         cat >> confdefs.h <<\EOF
13539 #define HAVE_CYRUS_SASL 1
13540 EOF
13541
13542                         ol_link_sasl=yes
13543                 fi
13544         fi
13545
13546         if test $ol_link_sasl = no ; then
13547                 if test $ol_with_cyrus_sasl != auto ; then
13548                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13549                 else
13550                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13551                         echo "configure: warning: SASL authentication not supported!" 1>&2
13552                         if test $ol_link_tls = no ; then
13553                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13554                         fi
13555                 fi
13556         fi
13557 else
13558         echo "configure: warning: SASL authentication not supported!" 1>&2
13559         if test $ol_link_tls = no ; then
13560                 echo "configure: warning: Strong authentication not supported!" 1>&2
13561         fi
13562 fi
13563
13564 if test $cross_compiling != yes ; then
13565         dev=no
13566         if test -r /dev/urandom ; then
13567                 dev="/dev/urandom";
13568         elif test -r /idev/urandom ; then
13569                 dev="/idev/urandom";
13570         elif test -r /dev/srandom ; then
13571                 dev="/dev/srandom";
13572         elif test -r /dev/random ; then
13573                 dev="/dev/random";
13574         elif test -r /idev/random ; then
13575                 dev="/idev/random";
13576         fi
13577
13578         if test $dev != no ; then
13579                 cat >> confdefs.h <<EOF
13580 #define URANDOM_DEVICE "$dev"
13581 EOF
13582
13583         fi
13584 fi
13585
13586 ol_link_fetch=no
13587 if test $ol_with_fetch != no ; then
13588         ol_LIBS=$LIBS
13589 LIBS="-lfetch -lcom_err $LIBS"
13590 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13591 echo "configure:13592: checking fetch(3) library" >&5
13592 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13593   echo $ac_n "(cached) $ac_c" 1>&6
13594 else
13595   
13596         cat > conftest.$ac_ext <<EOF
13597 #line 13598 "configure"
13598 #include "confdefs.h"
13599
13600 #include <sys/param.h>
13601 #include <stdio.h>
13602 #include <fetch.h>
13603 int main() {
13604 struct url *u = fetchParseURL("file:///"); 
13605 ; return 0; }
13606 EOF
13607 if { (eval echo configure:13608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13608   rm -rf conftest*
13609   ol_cv_lib_fetch=yes
13610 else
13611   echo "configure: failed program was:" >&5
13612   cat conftest.$ac_ext >&5
13613   rm -rf conftest*
13614   ol_cv_lib_fetch=no
13615 fi
13616 rm -f conftest*
13617 fi
13618
13619 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13620 LIBS=$ol_LIBS
13621 if test $ol_cv_lib_fetch != no ; then
13622         ol_link_fetch="-lfetch -lcom_err"
13623         cat >> confdefs.h <<\EOF
13624 #define HAVE_FETCH 1
13625 EOF
13626
13627 fi
13628
13629
13630         if test $ol_cv_lib_fetch != no ; then
13631                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13632                 ol_link_fetch=freebsd
13633
13634         elif test $ol_with_fetch != auto ; then
13635                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13636         fi 
13637 fi
13638
13639 ol_link_readline=no
13640 if test $ol_with_readline != no ; then
13641         for ac_hdr in readline/readline.h readline/history.h
13642 do
13643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13645 echo "configure:13646: checking for $ac_hdr" >&5
13646 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13647   echo $ac_n "(cached) $ac_c" 1>&6
13648 else
13649   cat > conftest.$ac_ext <<EOF
13650 #line 13651 "configure"
13651 #include "confdefs.h"
13652 #include <$ac_hdr>
13653 EOF
13654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13655 { (eval echo configure:13656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13657 if test -z "$ac_err"; then
13658   rm -rf conftest*
13659   eval "ac_cv_header_$ac_safe=yes"
13660 else
13661   echo "$ac_err" >&5
13662   echo "configure: failed program was:" >&5
13663   cat conftest.$ac_ext >&5
13664   rm -rf conftest*
13665   eval "ac_cv_header_$ac_safe=no"
13666 fi
13667 rm -f conftest*
13668 fi
13669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13670   echo "$ac_t""yes" 1>&6
13671     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13672   cat >> confdefs.h <<EOF
13673 #define $ac_tr_hdr 1
13674 EOF
13675  
13676 else
13677   echo "$ac_t""no" 1>&6
13678 fi
13679 done
13680
13681
13682         if test $ac_cv_header_readline_readline_h = yes ; then
13683                 save_LIBS="$LIBS"
13684                 LIBS="$TERMCAP_LIBS $LIBS"
13685                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13686 echo "configure:13687: checking for readline in -lreadline" >&5
13687 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13689   echo $ac_n "(cached) $ac_c" 1>&6
13690 else
13691   ac_save_LIBS="$LIBS"
13692 LIBS="-lreadline  $LIBS"
13693 cat > conftest.$ac_ext <<EOF
13694 #line 13695 "configure"
13695 #include "confdefs.h"
13696 /* Override any gcc2 internal prototype to avoid an error.  */
13697 /* We use char because int might match the return type of a gcc2
13698     builtin and then its argument prototype would still apply.  */
13699 char readline();
13700
13701 int main() {
13702 readline()
13703 ; return 0; }
13704 EOF
13705 if { (eval echo configure:13706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13706   rm -rf conftest*
13707   eval "ac_cv_lib_$ac_lib_var=yes"
13708 else
13709   echo "configure: failed program was:" >&5
13710   cat conftest.$ac_ext >&5
13711   rm -rf conftest*
13712   eval "ac_cv_lib_$ac_lib_var=no"
13713 fi
13714 rm -f conftest*
13715 LIBS="$ac_save_LIBS"
13716
13717 fi
13718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13719   echo "$ac_t""yes" 1>&6
13720   have_readline=yes
13721 else
13722   echo "$ac_t""no" 1>&6
13723 have_readline=no
13724 fi
13725
13726                 LIBS="$save_LIBS"
13727                         
13728                 if test $have_readline = yes ; then
13729                         ol_with_readline=found
13730                         ol_link_readline=yes
13731
13732                         READLINE_LIBS="-lreadline"
13733                 fi
13734         fi
13735 fi
13736
13737 if test $ol_link_readline = yes ; then
13738         cat >> confdefs.h <<\EOF
13739 #define HAVE_READLINE 1
13740 EOF
13741
13742 fi
13743
13744
13745 if test $ol_enable_crypt != no ; then
13746         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13747 echo "configure:13748: checking for crypt" >&5
13748 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13749   echo $ac_n "(cached) $ac_c" 1>&6
13750 else
13751   cat > conftest.$ac_ext <<EOF
13752 #line 13753 "configure"
13753 #include "confdefs.h"
13754 /* System header to define __stub macros and hopefully few prototypes,
13755     which can conflict with char crypt(); below.  */
13756 #include <assert.h>
13757 /* Override any gcc2 internal prototype to avoid an error.  */
13758 /* We use char because int might match the return type of a gcc2
13759     builtin and then its argument prototype would still apply.  */
13760 char crypt();
13761 char (*f)();
13762
13763 int main() {
13764
13765 /* The GNU C library defines this for functions which it implements
13766     to always fail with ENOSYS.  Some functions are actually named
13767     something starting with __ and the normal name is an alias.  */
13768 #if defined (__stub_crypt) || defined (__stub___crypt)
13769 choke me
13770 #else
13771 f = crypt;
13772 #endif
13773
13774 ; return 0; }
13775 EOF
13776 if { (eval echo configure:13777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13777   rm -rf conftest*
13778   eval "ac_cv_func_crypt=yes"
13779 else
13780   echo "configure: failed program was:" >&5
13781   cat conftest.$ac_ext >&5
13782   rm -rf conftest*
13783   eval "ac_cv_func_crypt=no"
13784 fi
13785 rm -f conftest*
13786 fi
13787
13788 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13789   echo "$ac_t""yes" 1>&6
13790   have_crypt=yes
13791 else
13792   echo "$ac_t""no" 1>&6
13793
13794                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13795 echo "configure:13796: checking for crypt in -lcrypt" >&5
13796 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13797 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13798   echo $ac_n "(cached) $ac_c" 1>&6
13799 else
13800   ac_save_LIBS="$LIBS"
13801 LIBS="-lcrypt  $LIBS"
13802 cat > conftest.$ac_ext <<EOF
13803 #line 13804 "configure"
13804 #include "confdefs.h"
13805 /* Override any gcc2 internal prototype to avoid an error.  */
13806 /* We use char because int might match the return type of a gcc2
13807     builtin and then its argument prototype would still apply.  */
13808 char crypt();
13809
13810 int main() {
13811 crypt()
13812 ; return 0; }
13813 EOF
13814 if { (eval echo configure:13815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13815   rm -rf conftest*
13816   eval "ac_cv_lib_$ac_lib_var=yes"
13817 else
13818   echo "configure: failed program was:" >&5
13819   cat conftest.$ac_ext >&5
13820   rm -rf conftest*
13821   eval "ac_cv_lib_$ac_lib_var=no"
13822 fi
13823 rm -f conftest*
13824 LIBS="$ac_save_LIBS"
13825
13826 fi
13827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13828   echo "$ac_t""yes" 1>&6
13829   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13830                         have_crypt=yes
13831 else
13832   echo "$ac_t""no" 1>&6
13833 have_crypt=no
13834 fi
13835
13836 fi
13837
13838
13839         if test $have_crypt = yes ; then
13840                 cat >> confdefs.h <<\EOF
13841 #define HAVE_CRYPT 1
13842 EOF
13843
13844         else
13845                 echo "configure: warning: could not find crypt" 1>&2
13846                 if test $ol_enable_crypt = yes ; then
13847                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13848                 fi
13849
13850                 echo "configure: warning: disabling crypt support" 1>&2
13851                 ol_enable_crypt=no
13852         fi
13853 fi
13854
13855 if test $ol_enable_proctitle != no ; then
13856         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13857 echo "configure:13858: checking for setproctitle" >&5
13858 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13859   echo $ac_n "(cached) $ac_c" 1>&6
13860 else
13861   cat > conftest.$ac_ext <<EOF
13862 #line 13863 "configure"
13863 #include "confdefs.h"
13864 /* System header to define __stub macros and hopefully few prototypes,
13865     which can conflict with char setproctitle(); below.  */
13866 #include <assert.h>
13867 /* Override any gcc2 internal prototype to avoid an error.  */
13868 /* We use char because int might match the return type of a gcc2
13869     builtin and then its argument prototype would still apply.  */
13870 char setproctitle();
13871 char (*f)();
13872
13873 int main() {
13874
13875 /* The GNU C library defines this for functions which it implements
13876     to always fail with ENOSYS.  Some functions are actually named
13877     something starting with __ and the normal name is an alias.  */
13878 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13879 choke me
13880 #else
13881 f = setproctitle;
13882 #endif
13883
13884 ; return 0; }
13885 EOF
13886 if { (eval echo configure:13887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13887   rm -rf conftest*
13888   eval "ac_cv_func_setproctitle=yes"
13889 else
13890   echo "configure: failed program was:" >&5
13891   cat conftest.$ac_ext >&5
13892   rm -rf conftest*
13893   eval "ac_cv_func_setproctitle=no"
13894 fi
13895 rm -f conftest*
13896 fi
13897
13898 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13899   echo "$ac_t""yes" 1>&6
13900   have_setproctitle=yes
13901 else
13902   echo "$ac_t""no" 1>&6
13903
13904                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13905 echo "configure:13906: checking for setproctitle in -lutil" >&5
13906 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13908   echo $ac_n "(cached) $ac_c" 1>&6
13909 else
13910   ac_save_LIBS="$LIBS"
13911 LIBS="-lutil  $LIBS"
13912 cat > conftest.$ac_ext <<EOF
13913 #line 13914 "configure"
13914 #include "confdefs.h"
13915 /* Override any gcc2 internal prototype to avoid an error.  */
13916 /* We use char because int might match the return type of a gcc2
13917     builtin and then its argument prototype would still apply.  */
13918 char setproctitle();
13919
13920 int main() {
13921 setproctitle()
13922 ; return 0; }
13923 EOF
13924 if { (eval echo configure:13925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13925   rm -rf conftest*
13926   eval "ac_cv_lib_$ac_lib_var=yes"
13927 else
13928   echo "configure: failed program was:" >&5
13929   cat conftest.$ac_ext >&5
13930   rm -rf conftest*
13931   eval "ac_cv_lib_$ac_lib_var=no"
13932 fi
13933 rm -f conftest*
13934 LIBS="$ac_save_LIBS"
13935
13936 fi
13937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13938   echo "$ac_t""yes" 1>&6
13939   have_setproctitle=yes
13940                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13941 else
13942   echo "$ac_t""no" 1>&6
13943 have_setproctitle=no
13944                         LIBOBJS="$LIBOBJS setproctitle.o"
13945                         LIBSRCS="$LIBSRCS setproctitle.c"
13946 fi
13947
13948 fi
13949
13950
13951         if test $have_setproctitle = yes ; then
13952                 cat >> confdefs.h <<\EOF
13953 #define HAVE_SETPROCTITLE 1
13954 EOF
13955
13956         fi
13957 fi
13958
13959 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13960 echo "configure:13961: checking for ANSI C header files" >&5
13961 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13962   echo $ac_n "(cached) $ac_c" 1>&6
13963 else
13964   cat > conftest.$ac_ext <<EOF
13965 #line 13966 "configure"
13966 #include "confdefs.h"
13967 #include <stdlib.h>
13968 #include <stdarg.h>
13969 #include <string.h>
13970 #include <float.h>
13971 EOF
13972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13973 { (eval echo configure:13974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13975 if test -z "$ac_err"; then
13976   rm -rf conftest*
13977   ac_cv_header_stdc=yes
13978 else
13979   echo "$ac_err" >&5
13980   echo "configure: failed program was:" >&5
13981   cat conftest.$ac_ext >&5
13982   rm -rf conftest*
13983   ac_cv_header_stdc=no
13984 fi
13985 rm -f conftest*
13986
13987 if test $ac_cv_header_stdc = yes; then
13988   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13989 cat > conftest.$ac_ext <<EOF
13990 #line 13991 "configure"
13991 #include "confdefs.h"
13992 #include <string.h>
13993 EOF
13994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13995   egrep "memchr" >/dev/null 2>&1; then
13996   :
13997 else
13998   rm -rf conftest*
13999   ac_cv_header_stdc=no
14000 fi
14001 rm -f conftest*
14002
14003 fi
14004
14005 if test $ac_cv_header_stdc = yes; then
14006   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14007 cat > conftest.$ac_ext <<EOF
14008 #line 14009 "configure"
14009 #include "confdefs.h"
14010 #include <stdlib.h>
14011 EOF
14012 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14013   egrep "free" >/dev/null 2>&1; then
14014   :
14015 else
14016   rm -rf conftest*
14017   ac_cv_header_stdc=no
14018 fi
14019 rm -f conftest*
14020
14021 fi
14022
14023 if test $ac_cv_header_stdc = yes; then
14024   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14025 if test "$cross_compiling" = yes; then
14026   :
14027 else
14028   cat > conftest.$ac_ext <<EOF
14029 #line 14030 "configure"
14030 #include "confdefs.h"
14031 #include <ctype.h>
14032 #if ((' ' & 0x0FF) == 0x020)
14033 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14034 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14035 #else
14036 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14037  || ('j' <= (c) && (c) <= 'r') \
14038  || ('s' <= (c) && (c) <= 'z'))
14039 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14040 #endif
14041 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14042 int main () { int i; for (i = 0; i < 256; i++)
14043 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14044 exit (0); }
14045
14046 EOF
14047 if { (eval echo configure:14048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14048 then
14049   :
14050 else
14051   echo "configure: failed program was:" >&5
14052   cat conftest.$ac_ext >&5
14053   rm -fr conftest*
14054   ac_cv_header_stdc=no
14055 fi
14056 rm -fr conftest*
14057 fi
14058
14059 fi
14060 fi
14061
14062 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14063 if test $ac_cv_header_stdc = yes; then
14064   cat >> confdefs.h <<\EOF
14065 #define STDC_HEADERS 1
14066 EOF
14067
14068 fi
14069
14070 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14071 echo "configure:14072: checking for mode_t" >&5
14072 if eval "test \"\${ac_cv_type_mode_t+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 <sys/types.h>
14079 #if STDC_HEADERS
14080 #include <stdlib.h>
14081 #include <stddef.h>
14082 #endif
14083
14084 EOF
14085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14086   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14087   rm -rf conftest*
14088   eval "ac_cv_type_mode_t=yes"
14089 else
14090   rm -rf conftest*
14091   eval "ac_cv_type_mode_t=no"
14092 fi
14093 rm -f conftest*
14094
14095 fi
14096 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14097   echo "$ac_t""yes" 1>&6
14098 else
14099   echo "$ac_t""no" 1>&6
14100   cat >> confdefs.h <<EOF
14101 #define mode_t int
14102 EOF
14103
14104 fi
14105
14106 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14107 echo "configure:14108: checking for off_t" >&5
14108 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14109   echo $ac_n "(cached) $ac_c" 1>&6
14110 else
14111   cat > conftest.$ac_ext <<EOF
14112 #line 14113 "configure"
14113 #include "confdefs.h"
14114 #include <sys/types.h>
14115 #if STDC_HEADERS
14116 #include <stdlib.h>
14117 #include <stddef.h>
14118 #endif
14119
14120 EOF
14121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14122   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14123   rm -rf conftest*
14124   eval "ac_cv_type_off_t=yes"
14125 else
14126   rm -rf conftest*
14127   eval "ac_cv_type_off_t=no"
14128 fi
14129 rm -f conftest*
14130
14131 fi
14132 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14133   echo "$ac_t""yes" 1>&6
14134 else
14135   echo "$ac_t""no" 1>&6
14136   cat >> confdefs.h <<EOF
14137 #define off_t long
14138 EOF
14139
14140 fi
14141
14142 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14143 echo "configure:14144: checking for pid_t" >&5
14144 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14145   echo $ac_n "(cached) $ac_c" 1>&6
14146 else
14147   cat > conftest.$ac_ext <<EOF
14148 #line 14149 "configure"
14149 #include "confdefs.h"
14150 #include <sys/types.h>
14151 #if STDC_HEADERS
14152 #include <stdlib.h>
14153 #include <stddef.h>
14154 #endif
14155
14156 EOF
14157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14158   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14159   rm -rf conftest*
14160   eval "ac_cv_type_pid_t=yes"
14161 else
14162   rm -rf conftest*
14163   eval "ac_cv_type_pid_t=no"
14164 fi
14165 rm -f conftest*
14166
14167 fi
14168 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14169   echo "$ac_t""yes" 1>&6
14170 else
14171   echo "$ac_t""no" 1>&6
14172   cat >> confdefs.h <<EOF
14173 #define pid_t int
14174 EOF
14175
14176 fi
14177
14178 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14179 echo "configure:14180: checking for ptrdiff_t" >&5
14180 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14181   echo $ac_n "(cached) $ac_c" 1>&6
14182 else
14183   cat > conftest.$ac_ext <<EOF
14184 #line 14185 "configure"
14185 #include "confdefs.h"
14186 #include <stddef.h>
14187 int main() {
14188 ptrdiff_t p
14189 ; return 0; }
14190 EOF
14191 if { (eval echo configure:14192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14192   rm -rf conftest*
14193   am_cv_type_ptrdiff_t=yes
14194 else
14195   echo "configure: failed program was:" >&5
14196   cat conftest.$ac_ext >&5
14197   rm -rf conftest*
14198   am_cv_type_ptrdiff_t=no
14199 fi
14200 rm -f conftest*
14201 fi
14202
14203 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14204    if test $am_cv_type_ptrdiff_t = yes; then
14205      cat >> confdefs.h <<\EOF
14206 #define HAVE_PTRDIFF_T 1
14207 EOF
14208
14209    fi
14210
14211 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14212 echo "configure:14213: checking return type of signal handlers" >&5
14213 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14214   echo $ac_n "(cached) $ac_c" 1>&6
14215 else
14216   cat > conftest.$ac_ext <<EOF
14217 #line 14218 "configure"
14218 #include "confdefs.h"
14219 #include <sys/types.h>
14220 #include <signal.h>
14221 #ifdef signal
14222 #undef signal
14223 #endif
14224 #ifdef __cplusplus
14225 extern "C" void (*signal (int, void (*)(int)))(int);
14226 #else
14227 void (*signal ()) ();
14228 #endif
14229
14230 int main() {
14231 int i;
14232 ; return 0; }
14233 EOF
14234 if { (eval echo configure:14235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14235   rm -rf conftest*
14236   ac_cv_type_signal=void
14237 else
14238   echo "configure: failed program was:" >&5
14239   cat conftest.$ac_ext >&5
14240   rm -rf conftest*
14241   ac_cv_type_signal=int
14242 fi
14243 rm -f conftest*
14244 fi
14245
14246 echo "$ac_t""$ac_cv_type_signal" 1>&6
14247 cat >> confdefs.h <<EOF
14248 #define RETSIGTYPE $ac_cv_type_signal
14249 EOF
14250
14251
14252 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14253 echo "configure:14254: checking for size_t" >&5
14254 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14255   echo $ac_n "(cached) $ac_c" 1>&6
14256 else
14257   cat > conftest.$ac_ext <<EOF
14258 #line 14259 "configure"
14259 #include "confdefs.h"
14260 #include <sys/types.h>
14261 #if STDC_HEADERS
14262 #include <stdlib.h>
14263 #include <stddef.h>
14264 #endif
14265
14266 EOF
14267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14268   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14269   rm -rf conftest*
14270   eval "ac_cv_type_size_t=yes"
14271 else
14272   rm -rf conftest*
14273   eval "ac_cv_type_size_t=no"
14274 fi
14275 rm -f conftest*
14276
14277 fi
14278 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14279   echo "$ac_t""yes" 1>&6
14280 else
14281   echo "$ac_t""no" 1>&6
14282   cat >> confdefs.h <<EOF
14283 #define size_t unsigned
14284 EOF
14285
14286 fi
14287
14288
14289 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14290 echo "configure:14291: checking for ssize_t" >&5
14291 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14292   echo $ac_n "(cached) $ac_c" 1>&6
14293 else
14294   cat > conftest.$ac_ext <<EOF
14295 #line 14296 "configure"
14296 #include "confdefs.h"
14297 #include <sys/types.h>
14298 #if STDC_HEADERS
14299 #include <stdlib.h>
14300 #include <stddef.h>
14301 #endif
14302
14303 EOF
14304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14305   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14306   rm -rf conftest*
14307   eval "ac_cv_type_ssize_t=yes"
14308 else
14309   rm -rf conftest*
14310   eval "ac_cv_type_ssize_t=no"
14311 fi
14312 rm -f conftest*
14313
14314 fi
14315 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14316   echo "$ac_t""yes" 1>&6
14317 else
14318   echo "$ac_t""no" 1>&6
14319   cat >> confdefs.h <<EOF
14320 #define ssize_t signed int
14321 EOF
14322
14323 fi
14324
14325 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14326 echo "configure:14327: checking for caddr_t" >&5
14327 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14328   echo $ac_n "(cached) $ac_c" 1>&6
14329 else
14330   cat > conftest.$ac_ext <<EOF
14331 #line 14332 "configure"
14332 #include "confdefs.h"
14333 #include <sys/types.h>
14334 #if STDC_HEADERS
14335 #include <stdlib.h>
14336 #include <stddef.h>
14337 #endif
14338
14339 EOF
14340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14341   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14342   rm -rf conftest*
14343   eval "ac_cv_type_caddr_t=yes"
14344 else
14345   rm -rf conftest*
14346   eval "ac_cv_type_caddr_t=no"
14347 fi
14348 rm -f conftest*
14349
14350 fi
14351 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14352   echo "$ac_t""yes" 1>&6
14353 else
14354   echo "$ac_t""no" 1>&6
14355   cat >> confdefs.h <<EOF
14356 #define caddr_t char *
14357 EOF
14358
14359 fi
14360
14361
14362 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14363 echo "configure:14364: checking for socklen_t" >&5
14364 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14365   echo $ac_n "(cached) $ac_c" 1>&6
14366 else
14367   cat > conftest.$ac_ext <<EOF
14368 #line 14369 "configure"
14369 #include "confdefs.h"
14370
14371 #ifdef HAVE_SYS_TYPES_H
14372 #include <sys/types.h>
14373 #endif
14374 #ifdef HAVE_SYS_SOCKET_H
14375 #include <sys/socket.h>
14376 #endif
14377
14378 int main() {
14379 socklen_t len;
14380 ; return 0; }
14381 EOF
14382 if { (eval echo configure:14383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14383   rm -rf conftest*
14384   ol_cv_type_socklen_t=yes
14385 else
14386   echo "configure: failed program was:" >&5
14387   cat conftest.$ac_ext >&5
14388   rm -rf conftest*
14389   ol_cv_type_socklen_t=no
14390 fi
14391 rm -f conftest*
14392 fi
14393
14394 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14395   if test $ol_cv_type_socklen_t = no; then
14396     cat >> confdefs.h <<\EOF
14397 #define socklen_t int
14398 EOF
14399
14400   fi
14401  
14402 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14403 echo "configure:14404: checking for member st_blksize in aggregate type struct stat" >&5
14404 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14405   echo $ac_n "(cached) $ac_c" 1>&6
14406 else
14407   cat > conftest.$ac_ext <<EOF
14408 #line 14409 "configure"
14409 #include "confdefs.h"
14410 #include <sys/types.h>
14411 #include <sys/stat.h>
14412 int main() {
14413 struct stat foo; foo.st_blksize;
14414 ; return 0; }
14415 EOF
14416 if { (eval echo configure:14417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14417   rm -rf conftest*
14418   ac_cv_c_struct_member_st_blksize=yes
14419 else
14420   echo "configure: failed program was:" >&5
14421   cat conftest.$ac_ext >&5
14422   rm -rf conftest*
14423   ac_cv_c_struct_member_st_blksize=no
14424 fi
14425 rm -f conftest*
14426 fi
14427
14428 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14429 st_blksize="$ac_cv_c_struct_member_st_blksize"
14430 if test $ac_cv_c_struct_member_st_blksize = yes; then
14431   cat >> confdefs.h <<\EOF
14432 #define HAVE_ST_BLKSIZE 1
14433 EOF
14434
14435 fi
14436
14437 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14438 echo "configure:14439: checking whether time.h and sys/time.h may both be included" >&5
14439 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14440   echo $ac_n "(cached) $ac_c" 1>&6
14441 else
14442   cat > conftest.$ac_ext <<EOF
14443 #line 14444 "configure"
14444 #include "confdefs.h"
14445 #include <sys/types.h>
14446 #include <sys/time.h>
14447 #include <time.h>
14448 int main() {
14449 struct tm *tp;
14450 ; return 0; }
14451 EOF
14452 if { (eval echo configure:14453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14453   rm -rf conftest*
14454   ac_cv_header_time=yes
14455 else
14456   echo "configure: failed program was:" >&5
14457   cat conftest.$ac_ext >&5
14458   rm -rf conftest*
14459   ac_cv_header_time=no
14460 fi
14461 rm -f conftest*
14462 fi
14463
14464 echo "$ac_t""$ac_cv_header_time" 1>&6
14465 if test $ac_cv_header_time = yes; then
14466   cat >> confdefs.h <<\EOF
14467 #define TIME_WITH_SYS_TIME 1
14468 EOF
14469
14470 fi
14471
14472 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14473 echo "configure:14474: checking whether struct tm is in sys/time.h or time.h" >&5
14474 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14475   echo $ac_n "(cached) $ac_c" 1>&6
14476 else
14477   cat > conftest.$ac_ext <<EOF
14478 #line 14479 "configure"
14479 #include "confdefs.h"
14480 #include <sys/types.h>
14481 #include <time.h>
14482 int main() {
14483 struct tm *tp; tp->tm_sec;
14484 ; return 0; }
14485 EOF
14486 if { (eval echo configure:14487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14487   rm -rf conftest*
14488   ac_cv_struct_tm=time.h
14489 else
14490   echo "configure: failed program was:" >&5
14491   cat conftest.$ac_ext >&5
14492   rm -rf conftest*
14493   ac_cv_struct_tm=sys/time.h
14494 fi
14495 rm -f conftest*
14496 fi
14497
14498 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14499 if test $ac_cv_struct_tm = sys/time.h; then
14500   cat >> confdefs.h <<\EOF
14501 #define TM_IN_SYS_TIME 1
14502 EOF
14503
14504 fi
14505
14506 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14507 echo "configure:14508: checking for uid_t in sys/types.h" >&5
14508 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14509   echo $ac_n "(cached) $ac_c" 1>&6
14510 else
14511   cat > conftest.$ac_ext <<EOF
14512 #line 14513 "configure"
14513 #include "confdefs.h"
14514 #include <sys/types.h>
14515 EOF
14516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14517   egrep "uid_t" >/dev/null 2>&1; then
14518   rm -rf conftest*
14519   ac_cv_type_uid_t=yes
14520 else
14521   rm -rf conftest*
14522   ac_cv_type_uid_t=no
14523 fi
14524 rm -f conftest*
14525
14526 fi
14527
14528 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14529 if test $ac_cv_type_uid_t = no; then
14530   cat >> confdefs.h <<\EOF
14531 #define uid_t int
14532 EOF
14533
14534   cat >> confdefs.h <<\EOF
14535 #define gid_t int
14536 EOF
14537
14538 fi
14539
14540 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14541 echo "configure:14542: checking for sig_atomic_t" >&5
14542 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14543   echo $ac_n "(cached) $ac_c" 1>&6
14544 else
14545   cat > conftest.$ac_ext <<EOF
14546 #line 14547 "configure"
14547 #include "confdefs.h"
14548 #include <signal.h>
14549 int main() {
14550 sig_atomic_t atomic;
14551 ; return 0; }
14552 EOF
14553 if { (eval echo configure:14554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14554   rm -rf conftest*
14555   ol_cv_type_sig_atomic_t=yes
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -rf conftest*
14560   ol_cv_type_sig_atomic_t=no
14561 fi
14562 rm -f conftest*
14563 fi
14564
14565 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14566   if test $ol_cv_type_sig_atomic_t = no; then
14567     cat >> confdefs.h <<\EOF
14568 #define sig_atomic_t int
14569 EOF
14570
14571   fi
14572  
14573
14574
14575 # test for pw_gecos in struct passwd
14576 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14577 echo "configure:14578: checking struct passwd for pw_gecos" >&5
14578 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14579   echo $ac_n "(cached) $ac_c" 1>&6
14580 else
14581   
14582         cat > conftest.$ac_ext <<EOF
14583 #line 14584 "configure"
14584 #include "confdefs.h"
14585 #include <pwd.h>
14586 int main() {
14587
14588         struct passwd pwd;
14589         pwd.pw_gecos = pwd.pw_name;
14590
14591 ; return 0; }
14592 EOF
14593 if { (eval echo configure:14594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14594   rm -rf conftest*
14595   ol_cv_struct_passwd_pw_gecos=yes
14596 else
14597   echo "configure: failed program was:" >&5
14598   cat conftest.$ac_ext >&5
14599   rm -rf conftest*
14600   ol_cv_struct_passwd_pw_gecos=no
14601 fi
14602 rm -f conftest*
14603 fi
14604
14605 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14606 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14607         cat >> confdefs.h <<\EOF
14608 #define HAVE_PW_GECOS 1
14609 EOF
14610
14611 fi
14612
14613 # test for pw_passwd in struct passwd
14614 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14615 echo "configure:14616: checking struct passwd for pw_passwd" >&5
14616 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14617   echo $ac_n "(cached) $ac_c" 1>&6
14618 else
14619   
14620         cat > conftest.$ac_ext <<EOF
14621 #line 14622 "configure"
14622 #include "confdefs.h"
14623 #include <pwd.h>
14624 int main() {
14625
14626         struct passwd pwd;
14627         pwd.pw_passwd = pwd.pw_name;
14628
14629 ; return 0; }
14630 EOF
14631 if { (eval echo configure:14632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14632   rm -rf conftest*
14633   ol_cv_struct_passwd_pw_passwd=yes
14634 else
14635   echo "configure: failed program was:" >&5
14636   cat conftest.$ac_ext >&5
14637   rm -rf conftest*
14638   ol_cv_struct_passwd_pw_passwd=no
14639 fi
14640 rm -f conftest*
14641 fi
14642
14643 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14644 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14645         cat >> confdefs.h <<\EOF
14646 #define HAVE_PW_PASSWD 1
14647 EOF
14648
14649 fi
14650
14651
14652 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14653 echo "configure:14654: checking if toupper() requires islower()" >&5
14654 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14655   echo $ac_n "(cached) $ac_c" 1>&6
14656 else
14657   
14658         if test "$cross_compiling" = yes; then
14659   ol_cv_c_upper_lower=safe
14660 else
14661   cat > conftest.$ac_ext <<EOF
14662 #line 14663 "configure"
14663 #include "confdefs.h"
14664
14665 #include <ctype.h>
14666 main()
14667 {
14668         if ('C' == toupper('C'))
14669                 exit(0);
14670         else
14671                 exit(1);
14672 }
14673 EOF
14674 if { (eval echo configure:14675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14675 then
14676   ol_cv_c_upper_lower=no
14677 else
14678   echo "configure: failed program was:" >&5
14679   cat conftest.$ac_ext >&5
14680   rm -fr conftest*
14681   ol_cv_c_upper_lower=yes
14682 fi
14683 rm -fr conftest*
14684 fi
14685
14686 fi
14687
14688 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14689 if test $ol_cv_c_upper_lower != no ; then
14690         cat >> confdefs.h <<\EOF
14691 #define C_UPPER_LOWER 1
14692 EOF
14693
14694 fi
14695
14696 echo $ac_n "checking for working const""... $ac_c" 1>&6
14697 echo "configure:14698: checking for working const" >&5
14698 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14699   echo $ac_n "(cached) $ac_c" 1>&6
14700 else
14701   cat > conftest.$ac_ext <<EOF
14702 #line 14703 "configure"
14703 #include "confdefs.h"
14704
14705 int main() {
14706
14707 /* Ultrix mips cc rejects this.  */
14708 typedef int charset[2]; const charset x;
14709 /* SunOS 4.1.1 cc rejects this.  */
14710 char const *const *ccp;
14711 char **p;
14712 /* NEC SVR4.0.2 mips cc rejects this.  */
14713 struct point {int x, y;};
14714 static struct point const zero = {0,0};
14715 /* AIX XL C 1.02.0.0 rejects this.
14716    It does not let you subtract one const X* pointer from another in an arm
14717    of an if-expression whose if-part is not a constant expression */
14718 const char *g = "string";
14719 ccp = &g + (g ? g-g : 0);
14720 /* HPUX 7.0 cc rejects these. */
14721 ++ccp;
14722 p = (char**) ccp;
14723 ccp = (char const *const *) p;
14724 { /* SCO 3.2v4 cc rejects this.  */
14725   char *t;
14726   char const *s = 0 ? (char *) 0 : (char const *) 0;
14727
14728   *t++ = 0;
14729 }
14730 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14731   int x[] = {25, 17};
14732   const int *foo = &x[0];
14733   ++foo;
14734 }
14735 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14736   typedef const int *iptr;
14737   iptr p = 0;
14738   ++p;
14739 }
14740 { /* AIX XL C 1.02.0.0 rejects this saying
14741      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14742   struct s { int j; const int *ap[3]; };
14743   struct s *b; b->j = 5;
14744 }
14745 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14746   const int foo = 10;
14747 }
14748
14749 ; return 0; }
14750 EOF
14751 if { (eval echo configure:14752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14752   rm -rf conftest*
14753   ac_cv_c_const=yes
14754 else
14755   echo "configure: failed program was:" >&5
14756   cat conftest.$ac_ext >&5
14757   rm -rf conftest*
14758   ac_cv_c_const=no
14759 fi
14760 rm -f conftest*
14761 fi
14762
14763 echo "$ac_t""$ac_cv_c_const" 1>&6
14764 if test $ac_cv_c_const = no; then
14765   cat >> confdefs.h <<\EOF
14766 #define const 
14767 EOF
14768
14769 fi
14770
14771 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14772 echo "configure:14773: checking if compiler understands volatile" >&5
14773 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14774   echo $ac_n "(cached) $ac_c" 1>&6
14775 else
14776   cat > conftest.$ac_ext <<EOF
14777 #line 14778 "configure"
14778 #include "confdefs.h"
14779 int x, y, z;
14780 int main() {
14781 volatile int a; int * volatile b = x ? &y : &z;
14782       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14783       *b = 0;
14784 ; return 0; }
14785 EOF
14786 if { (eval echo configure:14787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14787   rm -rf conftest*
14788   ol_cv_c_volatile=yes
14789 else
14790   echo "configure: failed program was:" >&5
14791   cat conftest.$ac_ext >&5
14792   rm -rf conftest*
14793   ol_cv_c_volatile=no
14794 fi
14795 rm -f conftest*
14796 fi
14797
14798 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14799   if test $ol_cv_c_volatile = yes; then
14800     : 
14801   else
14802     cat >> confdefs.h <<\EOF
14803 #define volatile 
14804 EOF
14805
14806   fi
14807  
14808
14809 if test $cross_compiling = yes ; then
14810         cat >> confdefs.h <<\EOF
14811 #define CROSS_COMPILING 1
14812 EOF
14813
14814 else
14815         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14816 echo "configure:14817: checking whether byte ordering is bigendian" >&5
14817 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14818   echo $ac_n "(cached) $ac_c" 1>&6
14819 else
14820   ac_cv_c_bigendian=unknown
14821 # See if sys/param.h defines the BYTE_ORDER macro.
14822 cat > conftest.$ac_ext <<EOF
14823 #line 14824 "configure"
14824 #include "confdefs.h"
14825 #include <sys/types.h>
14826 #include <sys/param.h>
14827 int main() {
14828
14829 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14830  bogus endian macros
14831 #endif
14832 ; return 0; }
14833 EOF
14834 if { (eval echo configure:14835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14835   rm -rf conftest*
14836   # It does; now see whether it defined to BIG_ENDIAN or not.
14837 cat > conftest.$ac_ext <<EOF
14838 #line 14839 "configure"
14839 #include "confdefs.h"
14840 #include <sys/types.h>
14841 #include <sys/param.h>
14842 int main() {
14843
14844 #if BYTE_ORDER != BIG_ENDIAN
14845  not big endian
14846 #endif
14847 ; return 0; }
14848 EOF
14849 if { (eval echo configure:14850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14850   rm -rf conftest*
14851   ac_cv_c_bigendian=yes
14852 else
14853   echo "configure: failed program was:" >&5
14854   cat conftest.$ac_ext >&5
14855   rm -rf conftest*
14856   ac_cv_c_bigendian=no
14857 fi
14858 rm -f conftest*
14859 else
14860   echo "configure: failed program was:" >&5
14861   cat conftest.$ac_ext >&5
14862 fi
14863 rm -f conftest*
14864 if test $ac_cv_c_bigendian = unknown; then
14865 if test "$cross_compiling" = yes; then
14866     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14867 else
14868   cat > conftest.$ac_ext <<EOF
14869 #line 14870 "configure"
14870 #include "confdefs.h"
14871 main () {
14872   /* Are we little or big endian?  From Harbison&Steele.  */
14873   union
14874   {
14875     long l;
14876     char c[sizeof (long)];
14877   } u;
14878   u.l = 1;
14879   exit (u.c[sizeof (long) - 1] == 1);
14880 }
14881 EOF
14882 if { (eval echo configure:14883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14883 then
14884   ac_cv_c_bigendian=no
14885 else
14886   echo "configure: failed program was:" >&5
14887   cat conftest.$ac_ext >&5
14888   rm -fr conftest*
14889   ac_cv_c_bigendian=yes
14890 fi
14891 rm -fr conftest*
14892 fi
14893
14894 fi
14895 fi
14896
14897 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14898 if test $ac_cv_c_bigendian = yes; then
14899   cat >> confdefs.h <<\EOF
14900 #define WORDS_BIGENDIAN 1
14901 EOF
14902
14903 fi
14904
14905 fi
14906
14907 echo $ac_n "checking size of short""... $ac_c" 1>&6
14908 echo "configure:14909: checking size of short" >&5 
14909 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14910   echo $ac_n "(cached) $ac_c" 1>&6
14911 else
14912   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14913   cat > conftest.$ac_ext <<EOF
14914 #line 14915 "configure"
14915 #include "confdefs.h"
14916 #include "confdefs.h" 
14917 #include <sys/types.h> 
14918  
14919
14920 int main() {
14921 switch (0) case 0: case (sizeof (short) == $ac_size):;
14922 ; return 0; }
14923 EOF
14924 if { (eval echo configure:14925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14925   rm -rf conftest*
14926   ac_cv_sizeof_short=$ac_size
14927 else
14928   echo "configure: failed program was:" >&5
14929   cat conftest.$ac_ext >&5
14930 fi
14931 rm -f conftest* 
14932   if test x$ac_cv_sizeof_short != x ; then break; fi 
14933 done 
14934
14935 fi
14936  
14937 if test x$ac_cv_sizeof_short = x ; then 
14938   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14939 fi 
14940 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14941 cat >> confdefs.h <<EOF
14942 #define SIZEOF_SHORT $ac_cv_sizeof_short
14943 EOF
14944  
14945  
14946 echo $ac_n "checking size of int""... $ac_c" 1>&6
14947 echo "configure:14948: checking size of int" >&5 
14948 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14949   echo $ac_n "(cached) $ac_c" 1>&6
14950 else
14951   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14952   cat > conftest.$ac_ext <<EOF
14953 #line 14954 "configure"
14954 #include "confdefs.h"
14955 #include "confdefs.h" 
14956 #include <sys/types.h> 
14957  
14958
14959 int main() {
14960 switch (0) case 0: case (sizeof (int) == $ac_size):;
14961 ; return 0; }
14962 EOF
14963 if { (eval echo configure:14964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14964   rm -rf conftest*
14965   ac_cv_sizeof_int=$ac_size
14966 else
14967   echo "configure: failed program was:" >&5
14968   cat conftest.$ac_ext >&5
14969 fi
14970 rm -f conftest* 
14971   if test x$ac_cv_sizeof_int != x ; then break; fi 
14972 done 
14973
14974 fi
14975  
14976 if test x$ac_cv_sizeof_int = x ; then 
14977   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14978 fi 
14979 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14980 cat >> confdefs.h <<EOF
14981 #define SIZEOF_INT $ac_cv_sizeof_int
14982 EOF
14983  
14984  
14985 echo $ac_n "checking size of long""... $ac_c" 1>&6
14986 echo "configure:14987: checking size of long" >&5 
14987 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14988   echo $ac_n "(cached) $ac_c" 1>&6
14989 else
14990   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14991   cat > conftest.$ac_ext <<EOF
14992 #line 14993 "configure"
14993 #include "confdefs.h"
14994 #include "confdefs.h" 
14995 #include <sys/types.h> 
14996  
14997
14998 int main() {
14999 switch (0) case 0: case (sizeof (long) == $ac_size):;
15000 ; return 0; }
15001 EOF
15002 if { (eval echo configure:15003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15003   rm -rf conftest*
15004   ac_cv_sizeof_long=$ac_size
15005 else
15006   echo "configure: failed program was:" >&5
15007   cat conftest.$ac_ext >&5
15008 fi
15009 rm -f conftest* 
15010   if test x$ac_cv_sizeof_long != x ; then break; fi 
15011 done 
15012
15013 fi
15014  
15015 if test x$ac_cv_sizeof_long = x ; then 
15016   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15017 fi 
15018 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15019 cat >> confdefs.h <<EOF
15020 #define SIZEOF_LONG $ac_cv_sizeof_long
15021 EOF
15022  
15023
15024
15025 if test "$ac_cv_sizeof_int" -lt 4 ; then
15026         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15027
15028         cat >> confdefs.h <<\EOF
15029 #define LBER_INT_T long
15030 EOF
15031
15032 else
15033         cat >> confdefs.h <<\EOF
15034 #define LBER_INT_T int
15035 EOF
15036
15037 fi
15038
15039 cat >> confdefs.h <<\EOF
15040 #define LBER_LEN_T long
15041 EOF
15042
15043 cat >> confdefs.h <<\EOF
15044 #define LBER_SOCKET_T int
15045 EOF
15046
15047 cat >> confdefs.h <<\EOF
15048 #define LBER_TAG_T long
15049 EOF
15050
15051
15052 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15053 echo "configure:15054: checking for 8-bit clean memcmp" >&5
15054 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15055   echo $ac_n "(cached) $ac_c" 1>&6
15056 else
15057   if test "$cross_compiling" = yes; then
15058   ac_cv_func_memcmp_clean=no
15059 else
15060   cat > conftest.$ac_ext <<EOF
15061 #line 15062 "configure"
15062 #include "confdefs.h"
15063
15064 main()
15065 {
15066   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15067   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15068 }
15069
15070 EOF
15071 if { (eval echo configure:15072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15072 then
15073   ac_cv_func_memcmp_clean=yes
15074 else
15075   echo "configure: failed program was:" >&5
15076   cat conftest.$ac_ext >&5
15077   rm -fr conftest*
15078   ac_cv_func_memcmp_clean=no
15079 fi
15080 rm -fr conftest*
15081 fi
15082
15083 fi
15084
15085 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15086 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15087
15088 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15089 echo "configure:15090: checking for strftime" >&5
15090 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15091   echo $ac_n "(cached) $ac_c" 1>&6
15092 else
15093   cat > conftest.$ac_ext <<EOF
15094 #line 15095 "configure"
15095 #include "confdefs.h"
15096 /* System header to define __stub macros and hopefully few prototypes,
15097     which can conflict with char strftime(); below.  */
15098 #include <assert.h>
15099 /* Override any gcc2 internal prototype to avoid an error.  */
15100 /* We use char because int might match the return type of a gcc2
15101     builtin and then its argument prototype would still apply.  */
15102 char strftime();
15103 char (*f)();
15104
15105 int main() {
15106
15107 /* The GNU C library defines this for functions which it implements
15108     to always fail with ENOSYS.  Some functions are actually named
15109     something starting with __ and the normal name is an alias.  */
15110 #if defined (__stub_strftime) || defined (__stub___strftime)
15111 choke me
15112 #else
15113 f = strftime;
15114 #endif
15115
15116 ; return 0; }
15117 EOF
15118 if { (eval echo configure:15119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15119   rm -rf conftest*
15120   eval "ac_cv_func_strftime=yes"
15121 else
15122   echo "configure: failed program was:" >&5
15123   cat conftest.$ac_ext >&5
15124   rm -rf conftest*
15125   eval "ac_cv_func_strftime=no"
15126 fi
15127 rm -f conftest*
15128 fi
15129
15130 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15131   echo "$ac_t""yes" 1>&6
15132   cat >> confdefs.h <<\EOF
15133 #define HAVE_STRFTIME 1
15134 EOF
15135
15136 else
15137   echo "$ac_t""no" 1>&6
15138 # strftime is in -lintl on SCO UNIX.
15139 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15140 echo "configure:15141: checking for strftime in -lintl" >&5
15141 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15143   echo $ac_n "(cached) $ac_c" 1>&6
15144 else
15145   ac_save_LIBS="$LIBS"
15146 LIBS="-lintl  $LIBS"
15147 cat > conftest.$ac_ext <<EOF
15148 #line 15149 "configure"
15149 #include "confdefs.h"
15150 /* Override any gcc2 internal prototype to avoid an error.  */
15151 /* We use char because int might match the return type of a gcc2
15152     builtin and then its argument prototype would still apply.  */
15153 char strftime();
15154
15155 int main() {
15156 strftime()
15157 ; return 0; }
15158 EOF
15159 if { (eval echo configure:15160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15160   rm -rf conftest*
15161   eval "ac_cv_lib_$ac_lib_var=yes"
15162 else
15163   echo "configure: failed program was:" >&5
15164   cat conftest.$ac_ext >&5
15165   rm -rf conftest*
15166   eval "ac_cv_lib_$ac_lib_var=no"
15167 fi
15168 rm -f conftest*
15169 LIBS="$ac_save_LIBS"
15170
15171 fi
15172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15173   echo "$ac_t""yes" 1>&6
15174   cat >> confdefs.h <<\EOF
15175 #define HAVE_STRFTIME 1
15176 EOF
15177
15178 LIBS="-lintl $LIBS"
15179 else
15180   echo "$ac_t""no" 1>&6
15181 fi
15182
15183 fi
15184
15185
15186 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15187 echo "configure:15188: checking for inet_aton()" >&5
15188 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15189   echo $ac_n "(cached) $ac_c" 1>&6
15190 else
15191   cat > conftest.$ac_ext <<EOF
15192 #line 15193 "configure"
15193 #include "confdefs.h"
15194
15195 #ifdef HAVE_SYS_TYPES_H
15196 #       include <sys/types.h>
15197 #endif
15198 #ifdef HAVE_SYS_SOCKET_H
15199 #       include <sys/socket.h>
15200 #       ifdef HAVE_SYS_SELECT_H
15201 #               include <sys/select.h>
15202 #       endif
15203 #       include <netinet/in.h>
15204 #       ifdef HAVE_ARPA_INET_H
15205 #               include <arpa/inet.h>
15206 #       endif
15207 #endif
15208
15209 int main() {
15210 struct in_addr in;
15211 int rc = inet_aton( "255.255.255.255", &in );
15212 ; return 0; }
15213 EOF
15214 if { (eval echo configure:15215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15215   rm -rf conftest*
15216   ol_cv_func_inet_aton=yes
15217 else
15218   echo "configure: failed program was:" >&5
15219   cat conftest.$ac_ext >&5
15220   rm -rf conftest*
15221   ol_cv_func_inet_aton=no
15222 fi
15223 rm -f conftest*
15224 fi
15225
15226 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15227   if test $ol_cv_func_inet_aton != no; then
15228     cat >> confdefs.h <<\EOF
15229 #define HAVE_INET_ATON 1
15230 EOF
15231
15232   fi
15233  
15234
15235 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15236 echo "configure:15237: checking for _spawnlp" >&5
15237 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15238   echo $ac_n "(cached) $ac_c" 1>&6
15239 else
15240   cat > conftest.$ac_ext <<EOF
15241 #line 15242 "configure"
15242 #include "confdefs.h"
15243 /* System header to define __stub macros and hopefully few prototypes,
15244     which can conflict with char _spawnlp(); below.  */
15245 #include <assert.h>
15246 /* Override any gcc2 internal prototype to avoid an error.  */
15247 /* We use char because int might match the return type of a gcc2
15248     builtin and then its argument prototype would still apply.  */
15249 char _spawnlp();
15250 char (*f)();
15251
15252 int main() {
15253
15254 /* The GNU C library defines this for functions which it implements
15255     to always fail with ENOSYS.  Some functions are actually named
15256     something starting with __ and the normal name is an alias.  */
15257 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15258 choke me
15259 #else
15260 f = _spawnlp;
15261 #endif
15262
15263 ; return 0; }
15264 EOF
15265 if { (eval echo configure:15266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15266   rm -rf conftest*
15267   eval "ac_cv_func__spawnlp=yes"
15268 else
15269   echo "configure: failed program was:" >&5
15270   cat conftest.$ac_ext >&5
15271   rm -rf conftest*
15272   eval "ac_cv_func__spawnlp=no"
15273 fi
15274 rm -f conftest*
15275 fi
15276
15277 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15278   echo "$ac_t""yes" 1>&6
15279   cat >> confdefs.h <<\EOF
15280 #define HAVE_SPAWNLP 1
15281 EOF
15282
15283 else
15284   echo "$ac_t""no" 1>&6
15285 fi
15286
15287
15288 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15289 echo "configure:15290: checking for _snprintf" >&5
15290 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15291   echo $ac_n "(cached) $ac_c" 1>&6
15292 else
15293   cat > conftest.$ac_ext <<EOF
15294 #line 15295 "configure"
15295 #include "confdefs.h"
15296 /* System header to define __stub macros and hopefully few prototypes,
15297     which can conflict with char _snprintf(); below.  */
15298 #include <assert.h>
15299 /* Override any gcc2 internal prototype to avoid an error.  */
15300 /* We use char because int might match the return type of a gcc2
15301     builtin and then its argument prototype would still apply.  */
15302 char _snprintf();
15303 char (*f)();
15304
15305 int main() {
15306
15307 /* The GNU C library defines this for functions which it implements
15308     to always fail with ENOSYS.  Some functions are actually named
15309     something starting with __ and the normal name is an alias.  */
15310 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15311 choke me
15312 #else
15313 f = _snprintf;
15314 #endif
15315
15316 ; return 0; }
15317 EOF
15318 if { (eval echo configure:15319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15319   rm -rf conftest*
15320   eval "ac_cv_func__snprintf=yes"
15321 else
15322   echo "configure: failed program was:" >&5
15323   cat conftest.$ac_ext >&5
15324   rm -rf conftest*
15325   eval "ac_cv_func__snprintf=no"
15326 fi
15327 rm -f conftest*
15328 fi
15329
15330 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15331   echo "$ac_t""yes" 1>&6
15332   ac_cv_func_snprintf=yes
15333         cat >> confdefs.h <<\EOF
15334 #define snprintf _snprintf
15335 EOF
15336
15337
15338 else
15339   echo "$ac_t""no" 1>&6
15340 fi
15341
15342
15343 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15344 echo "configure:15345: checking for _vsnprintf" >&5
15345 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15346   echo $ac_n "(cached) $ac_c" 1>&6
15347 else
15348   cat > conftest.$ac_ext <<EOF
15349 #line 15350 "configure"
15350 #include "confdefs.h"
15351 /* System header to define __stub macros and hopefully few prototypes,
15352     which can conflict with char _vsnprintf(); below.  */
15353 #include <assert.h>
15354 /* Override any gcc2 internal prototype to avoid an error.  */
15355 /* We use char because int might match the return type of a gcc2
15356     builtin and then its argument prototype would still apply.  */
15357 char _vsnprintf();
15358 char (*f)();
15359
15360 int main() {
15361
15362 /* The GNU C library defines this for functions which it implements
15363     to always fail with ENOSYS.  Some functions are actually named
15364     something starting with __ and the normal name is an alias.  */
15365 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15366 choke me
15367 #else
15368 f = _vsnprintf;
15369 #endif
15370
15371 ; return 0; }
15372 EOF
15373 if { (eval echo configure:15374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15374   rm -rf conftest*
15375   eval "ac_cv_func__vsnprintf=yes"
15376 else
15377   echo "configure: failed program was:" >&5
15378   cat conftest.$ac_ext >&5
15379   rm -rf conftest*
15380   eval "ac_cv_func__vsnprintf=no"
15381 fi
15382 rm -f conftest*
15383 fi
15384
15385 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15386   echo "$ac_t""yes" 1>&6
15387   ac_cv_func_vsnprintf=yes
15388         cat >> confdefs.h <<\EOF
15389 #define vsnprintf _vsnprintf
15390 EOF
15391
15392
15393 else
15394   echo "$ac_t""no" 1>&6
15395 fi
15396
15397
15398 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15399 echo "configure:15400: checking for vprintf" >&5
15400 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15401   echo $ac_n "(cached) $ac_c" 1>&6
15402 else
15403   cat > conftest.$ac_ext <<EOF
15404 #line 15405 "configure"
15405 #include "confdefs.h"
15406 /* System header to define __stub macros and hopefully few prototypes,
15407     which can conflict with char vprintf(); below.  */
15408 #include <assert.h>
15409 /* Override any gcc2 internal prototype to avoid an error.  */
15410 /* We use char because int might match the return type of a gcc2
15411     builtin and then its argument prototype would still apply.  */
15412 char vprintf();
15413 char (*f)();
15414
15415 int main() {
15416
15417 /* The GNU C library defines this for functions which it implements
15418     to always fail with ENOSYS.  Some functions are actually named
15419     something starting with __ and the normal name is an alias.  */
15420 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15421 choke me
15422 #else
15423 f = vprintf;
15424 #endif
15425
15426 ; return 0; }
15427 EOF
15428 if { (eval echo configure:15429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15429   rm -rf conftest*
15430   eval "ac_cv_func_vprintf=yes"
15431 else
15432   echo "configure: failed program was:" >&5
15433   cat conftest.$ac_ext >&5
15434   rm -rf conftest*
15435   eval "ac_cv_func_vprintf=no"
15436 fi
15437 rm -f conftest*
15438 fi
15439
15440 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15441   echo "$ac_t""yes" 1>&6
15442   cat >> confdefs.h <<\EOF
15443 #define HAVE_VPRINTF 1
15444 EOF
15445
15446 else
15447   echo "$ac_t""no" 1>&6
15448 fi
15449
15450 if test "$ac_cv_func_vprintf" != yes; then
15451 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15452 echo "configure:15453: checking for _doprnt" >&5
15453 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15454   echo $ac_n "(cached) $ac_c" 1>&6
15455 else
15456   cat > conftest.$ac_ext <<EOF
15457 #line 15458 "configure"
15458 #include "confdefs.h"
15459 /* System header to define __stub macros and hopefully few prototypes,
15460     which can conflict with char _doprnt(); below.  */
15461 #include <assert.h>
15462 /* Override any gcc2 internal prototype to avoid an error.  */
15463 /* We use char because int might match the return type of a gcc2
15464     builtin and then its argument prototype would still apply.  */
15465 char _doprnt();
15466 char (*f)();
15467
15468 int main() {
15469
15470 /* The GNU C library defines this for functions which it implements
15471     to always fail with ENOSYS.  Some functions are actually named
15472     something starting with __ and the normal name is an alias.  */
15473 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15474 choke me
15475 #else
15476 f = _doprnt;
15477 #endif
15478
15479 ; return 0; }
15480 EOF
15481 if { (eval echo configure:15482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15482   rm -rf conftest*
15483   eval "ac_cv_func__doprnt=yes"
15484 else
15485   echo "configure: failed program was:" >&5
15486   cat conftest.$ac_ext >&5
15487   rm -rf conftest*
15488   eval "ac_cv_func__doprnt=no"
15489 fi
15490 rm -f conftest*
15491 fi
15492
15493 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15494   echo "$ac_t""yes" 1>&6
15495   cat >> confdefs.h <<\EOF
15496 #define HAVE_DOPRNT 1
15497 EOF
15498
15499 else
15500   echo "$ac_t""no" 1>&6
15501 fi
15502
15503 fi
15504
15505
15506 if test $ac_cv_func_vprintf = yes ; then
15507                 for ac_func in vsnprintf vsprintf
15508 do
15509 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15510 echo "configure:15511: checking for $ac_func" >&5
15511 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15512   echo $ac_n "(cached) $ac_c" 1>&6
15513 else
15514   cat > conftest.$ac_ext <<EOF
15515 #line 15516 "configure"
15516 #include "confdefs.h"
15517 /* System header to define __stub macros and hopefully few prototypes,
15518     which can conflict with char $ac_func(); below.  */
15519 #include <assert.h>
15520 /* Override any gcc2 internal prototype to avoid an error.  */
15521 /* We use char because int might match the return type of a gcc2
15522     builtin and then its argument prototype would still apply.  */
15523 char $ac_func();
15524 char (*f)();
15525
15526 int main() {
15527
15528 /* The GNU C library defines this for functions which it implements
15529     to always fail with ENOSYS.  Some functions are actually named
15530     something starting with __ and the normal name is an alias.  */
15531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15532 choke me
15533 #else
15534 f = $ac_func;
15535 #endif
15536
15537 ; return 0; }
15538 EOF
15539 if { (eval echo configure:15540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15540   rm -rf conftest*
15541   eval "ac_cv_func_$ac_func=yes"
15542 else
15543   echo "configure: failed program was:" >&5
15544   cat conftest.$ac_ext >&5
15545   rm -rf conftest*
15546   eval "ac_cv_func_$ac_func=no"
15547 fi
15548 rm -f conftest*
15549 fi
15550
15551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15552   echo "$ac_t""yes" 1>&6
15553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15554   cat >> confdefs.h <<EOF
15555 #define $ac_tr_func 1
15556 EOF
15557  
15558 else
15559   echo "$ac_t""no" 1>&6
15560 fi
15561 done
15562
15563 fi
15564
15565 for ac_func in \
15566         bcopy                   \
15567         closesocket             \
15568         chroot                  \
15569         endgrent                \
15570         endpwent                \
15571         flock                   \
15572         getdtablesize   \
15573         getgrgid                \
15574         gethostname             \
15575         getpass                 \
15576         getpassphrase   \
15577         getpwuid                \
15578         getpwnam                \
15579         getspnam                \
15580         gettimeofday    \
15581         initgroups              \
15582         lockf                   \
15583         memcpy                  \
15584         memmove                 \
15585         mkstemp                 \
15586         pipe                    \
15587         read                    \
15588         recv                    \
15589         recvfrom                \
15590         setpwfile               \
15591         setgid                  \
15592         setegid                 \
15593         setsid                  \
15594         setuid                  \
15595         seteuid                 \
15596         sigaction               \
15597         signal                  \
15598         sigset                  \
15599         snprintf                \
15600         strdup                  \
15601         strerror                \
15602         strpbrk                 \
15603         strrchr                 \
15604         strsep                  \
15605         strstr                  \
15606         strtol                  \
15607         strtoul                 \
15608         strspn                  \
15609         sysconf                 \
15610         waitpid                 \
15611         wait4                   \
15612         write                   \
15613         send                    \
15614         sendto                  \
15615
15616 do
15617 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15618 echo "configure:15619: checking for $ac_func" >&5
15619 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15620   echo $ac_n "(cached) $ac_c" 1>&6
15621 else
15622   cat > conftest.$ac_ext <<EOF
15623 #line 15624 "configure"
15624 #include "confdefs.h"
15625 /* System header to define __stub macros and hopefully few prototypes,
15626     which can conflict with char $ac_func(); below.  */
15627 #include <assert.h>
15628 /* Override any gcc2 internal prototype to avoid an error.  */
15629 /* We use char because int might match the return type of a gcc2
15630     builtin and then its argument prototype would still apply.  */
15631 char $ac_func();
15632 char (*f)();
15633
15634 int main() {
15635
15636 /* The GNU C library defines this for functions which it implements
15637     to always fail with ENOSYS.  Some functions are actually named
15638     something starting with __ and the normal name is an alias.  */
15639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15640 choke me
15641 #else
15642 f = $ac_func;
15643 #endif
15644
15645 ; return 0; }
15646 EOF
15647 if { (eval echo configure:15648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15648   rm -rf conftest*
15649   eval "ac_cv_func_$ac_func=yes"
15650 else
15651   echo "configure: failed program was:" >&5
15652   cat conftest.$ac_ext >&5
15653   rm -rf conftest*
15654   eval "ac_cv_func_$ac_func=no"
15655 fi
15656 rm -f conftest*
15657 fi
15658
15659 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15660   echo "$ac_t""yes" 1>&6
15661     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15662   cat >> confdefs.h <<EOF
15663 #define $ac_tr_func 1
15664 EOF
15665  
15666 else
15667   echo "$ac_t""no" 1>&6
15668 fi
15669 done
15670
15671
15672 for ac_func in getopt tempnam
15673 do
15674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15675 echo "configure:15676: checking for $ac_func" >&5
15676 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15677   echo $ac_n "(cached) $ac_c" 1>&6
15678 else
15679   cat > conftest.$ac_ext <<EOF
15680 #line 15681 "configure"
15681 #include "confdefs.h"
15682 /* System header to define __stub macros and hopefully few prototypes,
15683     which can conflict with char $ac_func(); below.  */
15684 #include <assert.h>
15685 /* Override any gcc2 internal prototype to avoid an error.  */
15686 /* We use char because int might match the return type of a gcc2
15687     builtin and then its argument prototype would still apply.  */
15688 char $ac_func();
15689 char (*f)();
15690
15691 int main() {
15692
15693 /* The GNU C library defines this for functions which it implements
15694     to always fail with ENOSYS.  Some functions are actually named
15695     something starting with __ and the normal name is an alias.  */
15696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15697 choke me
15698 #else
15699 f = $ac_func;
15700 #endif
15701
15702 ; return 0; }
15703 EOF
15704 if { (eval echo configure:15705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15705   rm -rf conftest*
15706   eval "ac_cv_func_$ac_func=yes"
15707 else
15708   echo "configure: failed program was:" >&5
15709   cat conftest.$ac_ext >&5
15710   rm -rf conftest*
15711   eval "ac_cv_func_$ac_func=no"
15712 fi
15713 rm -f conftest*
15714 fi
15715
15716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15717   echo "$ac_t""yes" 1>&6
15718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15719   cat >> confdefs.h <<EOF
15720 #define $ac_tr_func 1
15721 EOF
15722  
15723 else
15724   echo "$ac_t""no" 1>&6
15725 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15726 fi
15727 done
15728
15729
15730
15731 if test "$ac_cv_func_getopt" != yes; then
15732     LIBSRCS="$LIBSRCS getopt.c"
15733 fi
15734
15735 if test "$ac_cv_func_tempnam" != yes; then
15736     LIBSRCS="$LIBSRCS tempnam.c"
15737 fi
15738
15739 # Check Configuration
15740 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15741 echo "configure:15742: checking declaration of sys_errlist" >&5
15742 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15743   echo $ac_n "(cached) $ac_c" 1>&6
15744 else
15745   
15746         cat > conftest.$ac_ext <<EOF
15747 #line 15748 "configure"
15748 #include "confdefs.h"
15749
15750 #include <stdio.h>
15751 #include <sys/types.h>
15752 #include <errno.h>
15753 #ifdef WINNT
15754 #include <stdlib.h>
15755 #endif 
15756 int main() {
15757 char *c = (char *) *sys_errlist
15758 ; return 0; }
15759 EOF
15760 if { (eval echo configure:15761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15761   rm -rf conftest*
15762   ol_cv_dcl_sys_errlist=yes
15763         ol_cv_have_sys_errlist=yes
15764 else
15765   echo "configure: failed program was:" >&5
15766   cat conftest.$ac_ext >&5
15767   rm -rf conftest*
15768   ol_cv_dcl_sys_errlist=no
15769 fi
15770 rm -f conftest*
15771 fi
15772
15773 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15774 #
15775 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15776 if test $ol_cv_dcl_sys_errlist = no ; then
15777         cat >> confdefs.h <<\EOF
15778 #define DECL_SYS_ERRLIST 1
15779 EOF
15780
15781
15782         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15783 echo "configure:15784: checking existence of sys_errlist" >&5
15784 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15785   echo $ac_n "(cached) $ac_c" 1>&6
15786 else
15787   
15788                 cat > conftest.$ac_ext <<EOF
15789 #line 15790 "configure"
15790 #include "confdefs.h"
15791 #include <errno.h>
15792 int main() {
15793 char *c = (char *) *sys_errlist
15794 ; return 0; }
15795 EOF
15796 if { (eval echo configure:15797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15797   rm -rf conftest*
15798   ol_cv_have_sys_errlist=yes
15799 else
15800   echo "configure: failed program was:" >&5
15801   cat conftest.$ac_ext >&5
15802   rm -rf conftest*
15803   ol_cv_have_sys_errlist=no
15804 fi
15805 rm -f conftest*
15806 fi
15807
15808 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15809 fi
15810 if test $ol_cv_have_sys_errlist = yes ; then
15811         cat >> confdefs.h <<\EOF
15812 #define HAVE_SYS_ERRLIST 1
15813 EOF
15814
15815 fi
15816
15817
15818
15819 if test "$ol_enable_debug" != no ; then
15820         cat >> confdefs.h <<\EOF
15821 #define LDAP_DEBUG 1
15822 EOF
15823
15824 fi
15825 if test "$ol_enable_syslog" = yes ; then
15826         cat >> confdefs.h <<\EOF
15827 #define LDAP_SYSLOG 1
15828 EOF
15829
15830 fi
15831 if test "$ol_enable_libui" = yes ; then
15832         cat >> confdefs.h <<\EOF
15833 #define LDAP_LIBUI 1
15834 EOF
15835
15836 fi
15837 if test "$ol_enable_cache" = no ; then
15838         cat >> confdefs.h <<\EOF
15839 #define LDAP_NOCACHE 1
15840 EOF
15841
15842 fi
15843 if test "$ol_link_kbind" != no ; then
15844         cat >> confdefs.h <<\EOF
15845 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15846 EOF
15847
15848 fi
15849 if test "$ol_enable_proctitle" != no ; then
15850         cat >> confdefs.h <<\EOF
15851 #define LDAP_PROCTITLE 1
15852 EOF
15853
15854 fi
15855 if test "$ol_enable_referrals" != no ; then
15856         cat >> confdefs.h <<\EOF
15857 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15858 EOF
15859
15860 fi
15861 if test "$ol_enable_local" != no; then
15862         cat >> confdefs.h <<\EOF
15863 #define LDAP_PF_LOCAL 1
15864 EOF
15865
15866 fi
15867 if test "$ol_enable_ipv6" != no; then
15868         cat >> confdefs.h <<\EOF
15869 #define LDAP_PF_INET6 1
15870 EOF
15871
15872 fi
15873 if test "$ol_enable_cleartext" != no ; then
15874         cat >> confdefs.h <<\EOF
15875 #define SLAPD_CLEARTEXT 1
15876 EOF
15877
15878 fi
15879 if test "$ol_enable_crypt" != no ; then
15880         cat >> confdefs.h <<\EOF
15881 #define SLAPD_CRYPT 1
15882 EOF
15883
15884 fi
15885 if test "$ol_link_kpasswd" != no ; then
15886         cat >> confdefs.h <<\EOF
15887 #define SLAPD_KPASSWD 1
15888 EOF
15889
15890 fi
15891 if test "$ol_link_spasswd" != no ; then
15892         cat >> confdefs.h <<\EOF
15893 #define SLAPD_SPASSWD 1
15894 EOF
15895
15896 fi
15897 if test "$ol_enable_multimaster" != no ; then
15898         cat >> confdefs.h <<\EOF
15899 #define SLAPD_MULTIMASTER 1
15900 EOF
15901
15902 fi
15903 if test "$ol_enable_phonetic" != no ; then
15904         cat >> confdefs.h <<\EOF
15905 #define SLAPD_PHONETIC 1
15906 EOF
15907
15908 fi
15909 if test "$ol_enable_rlookups" != no ; then
15910         cat >> confdefs.h <<\EOF
15911 #define SLAPD_RLOOKUPS 1
15912 EOF
15913
15914 fi
15915 if test "$ol_enable_aci" != no ; then
15916         cat >> confdefs.h <<\EOF
15917 #define SLAPD_ACI_ENABLED 1
15918 EOF
15919
15920 fi
15921
15922 if test "$ol_link_modules" != no ; then
15923         cat >> confdefs.h <<\EOF
15924 #define SLAPD_MODULES 1
15925 EOF
15926
15927         BUILD_SLAPD=yes
15928         SLAPD_MODULES_LDFLAGS="-dlopen self"
15929 fi
15930
15931 if test "$ol_link_dnssrv" != no ; then
15932         cat >> confdefs.h <<\EOF
15933 #define SLAPD_DNSSRV 1
15934 EOF
15935
15936         BUILD_SLAPD=yes
15937         BUILD_DNSSRV=yes
15938         if test "$ol_with_dnssrv_module" != static ; then
15939                 cat >> confdefs.h <<\EOF
15940 #define SLAPD_DNSSRV_DYNAMIC 1
15941 EOF
15942
15943                 BUILD_DNSSRV=mod
15944                 BUILD_DNSSRV_DYNAMIC=shared
15945                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15946         fi
15947 fi
15948
15949 if test "$ol_enable_ldap" != no ; then
15950         cat >> confdefs.h <<\EOF
15951 #define SLAPD_LDAP 1
15952 EOF
15953
15954         BUILD_SLAPD=yes
15955         BUILD_LDAP=yes
15956         if test "$ol_with_ldap_module" != static ; then
15957                 cat >> confdefs.h <<\EOF
15958 #define SLAPD_LDAP_DYNAMIC 1
15959 EOF
15960
15961                 BUILD_LDAP=mod
15962                 BUILD_LDAP_DYNAMIC=shared
15963                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15964         fi
15965 fi
15966
15967 if test "$ol_link_ldbm" != no ; then
15968         cat >> confdefs.h <<\EOF
15969 #define SLAPD_LDBM 1
15970 EOF
15971
15972         BUILD_SLAPD=yes
15973         BUILD_LDBM=yes
15974         if test "$ol_with_ldbm_module" != static ; then
15975                 cat >> confdefs.h <<\EOF
15976 #define SLAPD_LDBM_DYNAMIC 1
15977 EOF
15978
15979                 BUILD_LDBM=mod
15980                 BUILD_LDBM_DYNAMIC=shared
15981                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15982         fi
15983 fi
15984
15985 if test "$ol_enable_passwd" != no ; then
15986         cat >> confdefs.h <<\EOF
15987 #define SLAPD_PASSWD 1
15988 EOF
15989
15990         BUILD_SLAPD=yes
15991         BUILD_PASSWD=yes
15992         if test "$ol_with_passwd_module" != static ; then
15993                 cat >> confdefs.h <<\EOF
15994 #define SLAPD_PASSWD_DYNAMIC 1
15995 EOF
15996
15997                 BUILD_PASSWD=mod
15998                 BUILD_PASSWD_DYNAMIC=shared
15999                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16000         fi
16001 fi
16002
16003 if test "$ol_link_perl" != no ; then
16004         cat >> confdefs.h <<\EOF
16005 #define SLAPD_PERL 1
16006 EOF
16007
16008         BUILD_SLAPD=yes
16009         BUILD_PERL=yes
16010         if test "$ol_with_perl_module" != static ; then
16011                 cat >> confdefs.h <<\EOF
16012 #define SLAPD_PERL_DYNAMIC 1
16013 EOF
16014
16015                 BUILD_PERL=mod
16016                 BUILD_PERL_DYNAMIC=shared
16017                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16018         fi
16019 fi
16020
16021 if test "$ol_enable_shell" != no ; then
16022         cat >> confdefs.h <<\EOF
16023 #define SLAPD_SHELL 1
16024 EOF
16025
16026         BUILD_SLAPD=yes
16027         BUILD_SHELL=yes
16028         if test "$ol_with_shell_module" != static ; then
16029                 cat >> confdefs.h <<\EOF
16030 #define SLAPD_SHELL_DYNAMIC 1
16031 EOF
16032
16033                 BUILD_SHELL=mod
16034                 BUILD_SHELL_DYNAMIC=shared
16035                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16036         fi
16037 fi
16038
16039 if test "$ol_enable_tcl" != no ; then
16040         cat >> confdefs.h <<\EOF
16041 #define SLAPD_TCL 1
16042 EOF
16043
16044         BUILD_SLAPD=yes
16045         BUILD_TCL=yes
16046         if test "$ol_with_tcl_module" != static; then
16047                 cat >> confdefs.h <<\EOF
16048 #define SLAPD_TCL_DYNAMIC 1
16049 EOF
16050
16051                 BUILD_TCL=mod
16052                 BUILD_TCL_DYNAMIC=shared
16053                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16054         fi
16055 fi
16056
16057 if test "$ol_link_sql" != no ; then
16058         cat >> confdefs.h <<\EOF
16059 #define SLAPD_SQL 1
16060 EOF
16061
16062         BUILD_SLAPD=yes
16063         BUILD_SQL=yes
16064         if test "$ol_with_sql_module" != static; then
16065                 cat >> confdefs.h <<\EOF
16066 #define SLAPD_SQL_DYNAMIC 1
16067 EOF
16068
16069                 BUILD_SQL=mod
16070                 BUILD_SQL_DYNAMIC=shared
16071                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16072         fi
16073 fi
16074
16075 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16076         $BUILD_SLAPD = yes ; then
16077         BUILD_SLURPD=yes
16078 fi
16079
16080
16081 if test "$LINK_BINS_DYNAMIC" = yes; then
16082     LIB_LINKAGE=DYN
16083     LT_LIB_LINKAGE=shared
16084 else
16085     LIB_LINKAGE=STAT
16086     LT_LIB_LINKAGE=static
16087 fi
16088
16089 if test "$ac_cv_mingw32" = yes ; then
16090     PLAT=NT
16091     DYN_EXT=dll
16092 else
16093     PLAT=UNIX
16094     DYN_EXT=so
16095 fi
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105   
16106   
16107   
16108   
16109   
16110   
16111   
16112   
16113   
16114   
16115   
16116   
16117   
16118   
16119   
16120   
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156 trap '' 1 2 15
16157
16158 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16159
16160 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16161 # Let make expand exec_prefix.
16162 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16163
16164 # Any assignment to VPATH causes Sun make to only execute
16165 # the first set of double-colon rules, so remove it if not needed.
16166 # If there is a colon in the path, we need to keep it.
16167 if test "x$srcdir" = x.; then
16168   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16169 fi
16170
16171 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16172
16173 DEFS=-DHAVE_CONFIG_H
16174
16175 # Without the "./", some shells look in PATH for config.status.
16176 : ${CONFIG_STATUS=./config.status}
16177
16178 echo creating $CONFIG_STATUS
16179 rm -f $CONFIG_STATUS
16180 cat > $CONFIG_STATUS <<EOF
16181 #! /bin/sh
16182 # Generated automatically by configure.
16183 # Run this file to recreate the current configuration.
16184 # This directory was configured as follows,
16185 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16186 #
16187 # $0 $ac_configure_args
16188 #
16189 # Compiler output produced by configure, useful for debugging
16190 # configure, is in ./config.log if it exists.
16191
16192 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16193 for ac_option
16194 do
16195   case "\$ac_option" in
16196   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16197     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16198     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16199   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16200     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16201     exit 0 ;;
16202   -help | --help | --hel | --he | --h)
16203     echo "\$ac_cs_usage"; exit 0 ;;
16204   *) echo "\$ac_cs_usage"; exit 1 ;;
16205   esac
16206 done
16207
16208 ac_given_srcdir=$srcdir
16209 ac_given_INSTALL="$INSTALL"
16210
16211 trap 'rm -fr `echo "\
16212 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16213 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16214 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16215 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16216 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16217 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16218 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16219 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16220 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16221 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16222 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16223 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16224 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16225 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16226 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16227 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16228 include/Makefile:build/top.mk:include/Makefile.in \
16229 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16230 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16231 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16232 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16233 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16234 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16235 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16236 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16237 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16238 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16239 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16240 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16241 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16242 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16243 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16244 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16245 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16246 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16247 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16248 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16249 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16250 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16251 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16252 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16253 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16254 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16255 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16256  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16257 EOF
16258 cat >> $CONFIG_STATUS <<EOF
16259
16260 # Protect against being on the right side of a sed subst in config.status.
16261 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16262  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16263 $ac_vpsub
16264 $extrasub
16265 s%@SHELL@%$SHELL%g
16266 s%@CFLAGS@%$CFLAGS%g
16267 s%@CPPFLAGS@%$CPPFLAGS%g
16268 s%@CXXFLAGS@%$CXXFLAGS%g
16269 s%@FFLAGS@%$FFLAGS%g
16270 s%@DEFS@%$DEFS%g
16271 s%@LDFLAGS@%$LDFLAGS%g
16272 s%@LIBS@%$LIBS%g
16273 s%@exec_prefix@%$exec_prefix%g
16274 s%@prefix@%$prefix%g
16275 s%@program_transform_name@%$program_transform_name%g
16276 s%@bindir@%$bindir%g
16277 s%@sbindir@%$sbindir%g
16278 s%@libexecdir@%$libexecdir%g
16279 s%@datadir@%$datadir%g
16280 s%@sysconfdir@%$sysconfdir%g
16281 s%@sharedstatedir@%$sharedstatedir%g
16282 s%@localstatedir@%$localstatedir%g
16283 s%@libdir@%$libdir%g
16284 s%@includedir@%$includedir%g
16285 s%@oldincludedir@%$oldincludedir%g
16286 s%@infodir@%$infodir%g
16287 s%@mandir@%$mandir%g
16288 s%@host@%$host%g
16289 s%@host_alias@%$host_alias%g
16290 s%@host_cpu@%$host_cpu%g
16291 s%@host_vendor@%$host_vendor%g
16292 s%@host_os@%$host_os%g
16293 s%@target@%$target%g
16294 s%@target_alias@%$target_alias%g
16295 s%@target_cpu@%$target_cpu%g
16296 s%@target_vendor@%$target_vendor%g
16297 s%@target_os@%$target_os%g
16298 s%@build@%$build%g
16299 s%@build_alias@%$build_alias%g
16300 s%@build_cpu@%$build_cpu%g
16301 s%@build_vendor@%$build_vendor%g
16302 s%@build_os@%$build_os%g
16303 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16304 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16305 s%@INSTALL_DATA@%$INSTALL_DATA%g
16306 s%@PACKAGE@%$PACKAGE%g
16307 s%@VERSION@%$VERSION%g
16308 s%@ACLOCAL@%$ACLOCAL%g
16309 s%@AUTOCONF@%$AUTOCONF%g
16310 s%@AUTOMAKE@%$AUTOMAKE%g
16311 s%@AUTOHEADER@%$AUTOHEADER%g
16312 s%@MAKEINFO@%$MAKEINFO%g
16313 s%@install_sh@%$install_sh%g
16314 s%@AMTAR@%$AMTAR%g
16315 s%@AWK@%$AWK%g
16316 s%@AMTARFLAGS@%$AMTARFLAGS%g
16317 s%@SET_MAKE@%$SET_MAKE%g
16318 s%@top_builddir@%$top_builddir%g
16319 s%@ldap_subdir@%$ldap_subdir%g
16320 s%@CC@%$CC%g
16321 s%@RANLIB@%$RANLIB%g
16322 s%@LN_S@%$LN_S%g
16323 s%@DLLTOOL@%$DLLTOOL%g
16324 s%@AS@%$AS%g
16325 s%@OBJDUMP@%$OBJDUMP%g
16326 s%@LIBTOOL@%$LIBTOOL%g
16327 s%@LN_H@%$LN_H%g
16328 s%@SENDMAIL@%$SENDMAIL%g
16329 s%@EDITOR@%$EDITOR%g
16330 s%@FINGER@%$FINGER%g
16331 s%@PERLBIN@%$PERLBIN%g
16332 s%@CPP@%$CPP%g
16333 s%@EXEEXT@%$EXEEXT%g
16334 s%@OBJEXT@%$OBJEXT%g
16335 s%@OL_MKDEP@%$OL_MKDEP%g
16336 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16337 s%@LIBOBJS@%$LIBOBJS%g
16338 s%@LIBSRCS@%$LIBSRCS%g
16339 s%@PLAT@%$PLAT%g
16340 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16341 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16342 s%@DYN_EXT@%$DYN_EXT%g
16343 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16344 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16345 s%@BUILD_LDAP@%$BUILD_LDAP%g
16346 s%@BUILD_LDBM@%$BUILD_LDBM%g
16347 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16348 s%@BUILD_PERL@%$BUILD_PERL%g
16349 s%@BUILD_SHELL@%$BUILD_SHELL%g
16350 s%@BUILD_SQL@%$BUILD_SQL%g
16351 s%@BUILD_TCL@%$BUILD_TCL%g
16352 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16353 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16354 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16355 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16356 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16357 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16358 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16359 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16360 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16361 s%@LDAP_LIBS@%$LDAP_LIBS%g
16362 s%@LDIF_LIBS@%$LDIF_LIBS%g
16363 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16364 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16365 s%@LDBM_LIBS@%$LDBM_LIBS%g
16366 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16367 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16368 s%@WRAP_LIBS@%$WRAP_LIBS%g
16369 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16370 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16371 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16372 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16373 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16374 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16375 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16376 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16377 s%@KRB4_LIBS@%$KRB4_LIBS%g
16378 s%@KRB5_LIBS@%$KRB5_LIBS%g
16379 s%@READLINE_LIBS@%$READLINE_LIBS%g
16380 s%@SASL_LIBS@%$SASL_LIBS%g
16381 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16382 s%@TLS_LIBS@%$TLS_LIBS%g
16383 s%@MODULES_LIBS@%$MODULES_LIBS%g
16384 s%@AUTH_LIBS@%$AUTH_LIBS%g
16385 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16386 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16387 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16388
16389 CEOF
16390 EOF
16391
16392 cat >> $CONFIG_STATUS <<\EOF
16393
16394 # Split the substitutions into bite-sized pieces for seds with
16395 # small command number limits, like on Digital OSF/1 and HP-UX.
16396 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16397 ac_file=1 # Number of current file.
16398 ac_beg=1 # First line for current file.
16399 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16400 ac_more_lines=:
16401 ac_sed_cmds=""
16402 while $ac_more_lines; do
16403   if test $ac_beg -gt 1; then
16404     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16405   else
16406     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16407   fi
16408   if test ! -s conftest.s$ac_file; then
16409     ac_more_lines=false
16410     rm -f conftest.s$ac_file
16411   else
16412     if test -z "$ac_sed_cmds"; then
16413       ac_sed_cmds="sed -f conftest.s$ac_file"
16414     else
16415       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16416     fi
16417     ac_file=`expr $ac_file + 1`
16418     ac_beg=$ac_end
16419     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16420   fi
16421 done
16422 if test -z "$ac_sed_cmds"; then
16423   ac_sed_cmds=cat
16424 fi
16425 EOF
16426
16427 cat >> $CONFIG_STATUS <<EOF
16428
16429 CONFIG_FILES=\${CONFIG_FILES-"\
16430 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16431 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16432 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16433 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16434 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16435 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16436 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16437 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16438 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16439 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16440 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16441 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16442 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16443 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16444 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16445 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16446 include/Makefile:build/top.mk:include/Makefile.in \
16447 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16448 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16449 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16450 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16451 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16452 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16453 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16454 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16455 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16456 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16457 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16458 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16459 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16460 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16461 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16462 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16463 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16464 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16465 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16466 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16467 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16468 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16469 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16470 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16471 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16472 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16473 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16474 "}
16475 EOF
16476 cat >> $CONFIG_STATUS <<\EOF
16477 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16478   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16479   case "$ac_file" in
16480   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16481        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16482   *) ac_file_in="${ac_file}.in" ;;
16483   esac
16484
16485   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16486
16487   # Remove last slash and all that follows it.  Not all systems have dirname.
16488   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16489   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16490     # The file is in a subdirectory.
16491     test ! -d "$ac_dir" && mkdir "$ac_dir"
16492     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16493     # A "../" for each directory in $ac_dir_suffix.
16494     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16495   else
16496     ac_dir_suffix= ac_dots=
16497   fi
16498
16499   case "$ac_given_srcdir" in
16500   .)  srcdir=.
16501       if test -z "$ac_dots"; then top_srcdir=.
16502       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16503   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16504   *) # Relative path.
16505     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16506     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16507   esac
16508
16509   case "$ac_given_INSTALL" in
16510   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16511   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16512   esac
16513
16514   echo creating "$ac_file"
16515   rm -f "$ac_file"
16516   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16517   case "$ac_file" in
16518   *[Mm]akefile*) ac_comsub="1i\\
16519 # $configure_input" ;;
16520   *) ac_comsub= ;;
16521   esac
16522
16523   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16524   sed -e "$ac_comsub
16525 s%@configure_input@%$configure_input%g
16526 s%@srcdir@%$srcdir%g
16527 s%@top_srcdir@%$top_srcdir%g
16528 s%@INSTALL@%$INSTALL%g
16529 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16530 fi; done
16531 rm -f conftest.s*
16532
16533 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16534 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16535 #
16536 # ac_d sets the value in "#define NAME VALUE" lines.
16537 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16538 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16539 ac_dC='\3'
16540 ac_dD='%g'
16541 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16542 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16543 ac_uB='\([      ]\)%\1#\2define\3'
16544 ac_uC=' '
16545 ac_uD='\4%g'
16546 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16547 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16548 ac_eB='$%\1#\2define\3'
16549 ac_eC=' '
16550 ac_eD='%g'
16551
16552 if test "${CONFIG_HEADERS+set}" != set; then
16553 EOF
16554 cat >> $CONFIG_STATUS <<EOF
16555   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16556 EOF
16557 cat >> $CONFIG_STATUS <<\EOF
16558 fi
16559 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16560   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16561   case "$ac_file" in
16562   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16563        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16564   *) ac_file_in="${ac_file}.in" ;;
16565   esac
16566
16567   echo creating $ac_file
16568
16569   rm -f conftest.frag conftest.in conftest.out
16570   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16571   cat $ac_file_inputs > conftest.in
16572
16573 EOF
16574
16575 # Transform confdefs.h into a sed script conftest.vals that substitutes
16576 # the proper values into config.h.in to produce config.h.  And first:
16577 # Protect against being on the right side of a sed subst in config.status.
16578 # Protect against being in an unquoted here document in config.status.
16579 rm -f conftest.vals
16580 cat > conftest.hdr <<\EOF
16581 s/[\\&%]/\\&/g
16582 s%[\\$`]%\\&%g
16583 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16584 s%ac_d%ac_u%gp
16585 s%ac_u%ac_e%gp
16586 EOF
16587 sed -n -f conftest.hdr confdefs.h > conftest.vals
16588 rm -f conftest.hdr
16589
16590 # This sed command replaces #undef with comments.  This is necessary, for
16591 # example, in the case of _POSIX_SOURCE, which is predefined and required
16592 # on some systems where configure will not decide to define it.
16593 cat >> conftest.vals <<\EOF
16594 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16595 EOF
16596
16597 # Break up conftest.vals because some shells have a limit on
16598 # the size of here documents, and old seds have small limits too.
16599
16600 rm -f conftest.tail
16601 while :
16602 do
16603   ac_lines=`grep -c . conftest.vals`
16604   # grep -c gives empty output for an empty file on some AIX systems.
16605   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16606   # Write a limited-size here document to conftest.frag.
16607   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16608   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16609   echo 'CEOF
16610   sed -f conftest.frag conftest.in > conftest.out
16611   rm -f conftest.in
16612   mv conftest.out conftest.in
16613 ' >> $CONFIG_STATUS
16614   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16615   rm -f conftest.vals
16616   mv conftest.tail conftest.vals
16617 done
16618 rm -f conftest.vals
16619
16620 cat >> $CONFIG_STATUS <<\EOF
16621   rm -f conftest.frag conftest.h
16622   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16623   cat conftest.in >> conftest.h
16624   rm -f conftest.in
16625   if cmp -s $ac_file conftest.h 2>/dev/null; then
16626     echo "$ac_file is unchanged"
16627     rm -f conftest.h
16628   else
16629     # Remove last slash and all that follows it.  Not all systems have dirname.
16630       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16631       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16632       # The file is in a subdirectory.
16633       test ! -d "$ac_dir" && mkdir "$ac_dir"
16634     fi
16635     rm -f $ac_file
16636     mv conftest.h $ac_file
16637   fi
16638 fi; done
16639
16640 EOF
16641 cat >> $CONFIG_STATUS <<EOF
16642
16643 EOF
16644 cat >> $CONFIG_STATUS <<\EOF
16645
16646 date > stamp-h
16647 echo Please \"make depend\" to build dependencies
16648
16649 exit 0
16650 EOF
16651 chmod +x $CONFIG_STATUS
16652 rm -fr confdefs* $ac_clean_files
16653 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16654