]> git.sur5r.net Git - openldap/blob - configure
Validate ber on get/set option calls
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.329 2000/09/14 19:01:26 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 (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-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.sh
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 eval `$ac_aux_dir/version.sh`
675 if test -z "$OL_STRING"; then
676         { echo "configure: error: could not determine version" 1>&2; exit 1; }
677 fi
678
679 echo "Configuring $OL_STRING ..."
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=$OL_PACKAGE
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 cat >> confdefs.h <<EOF
1150 #define LDAP_VENDOR_VERSION $OL_API_INC
1151 EOF
1152
1153 cat >> confdefs.h <<EOF
1154 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1155 EOF
1156
1157 cat >> confdefs.h <<EOF
1158 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1159 EOF
1160
1161 cat >> confdefs.h <<EOF
1162 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1163 EOF
1164
1165
1166 OPENLDAP_LIBVERSION=$OL_API_LIB
1167
1168
1169
1170
1171 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1172 echo "configure:1173: checking configure arguments" >&5
1173
1174
1175 top_builddir=`pwd`
1176
1177 ldap_subdir="/openldap"
1178
1179 # Check whether --with-subdir or --without-subdir was given.
1180 if test "${with_subdir+set}" = set; then
1181   withval="$with_subdir"
1182   case "$withval" in
1183         no) ldap_subdir=""
1184                 ;;
1185         yes)
1186                 ;;
1187         /*|\\*)
1188                 ldap_subdir="$withval"
1189                 ;;
1190         *)
1191                 ldap_subdir="/$withval"
1192                 ;;
1193 esac
1194
1195 fi
1196
1197
1198 # OpenLDAP --enable-debug
1199         # Check whether --enable-debug or --disable-debug was given.
1200 if test "${enable_debug+set}" = set; then
1201   enableval="$enable_debug"
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-debug" 1>&2; exit 1; }
1211         fi
1212         ol_enable_debug="$ol_arg"
1213
1214 else
1215         ol_enable_debug="yes"
1216 fi
1217 # end --enable-debug
1218 # OpenLDAP --enable-syslog
1219         # Check whether --enable-syslog or --disable-syslog was given.
1220 if test "${enable_syslog+set}" = set; then
1221   enableval="$enable_syslog"
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-syslog" 1>&2; exit 1; }
1231         fi
1232         ol_enable_syslog="$ol_arg"
1233
1234 else
1235         ol_enable_syslog="auto"
1236 fi
1237 # end --enable-syslog
1238 # OpenLDAP --enable-proctitle
1239         # Check whether --enable-proctitle or --disable-proctitle was given.
1240 if test "${enable_proctitle+set}" = set; then
1241   enableval="$enable_proctitle"
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-proctitle" 1>&2; exit 1; }
1251         fi
1252         ol_enable_proctitle="$ol_arg"
1253
1254 else
1255         ol_enable_proctitle="yes"
1256 fi
1257 # end --enable-proctitle
1258 # OpenLDAP --enable-cache
1259         # Check whether --enable-cache or --disable-cache was given.
1260 if test "${enable_cache+set}" = set; then
1261   enableval="$enable_cache"
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-cache" 1>&2; exit 1; }
1271         fi
1272         ol_enable_cache="$ol_arg"
1273
1274 else
1275         ol_enable_cache="yes"
1276 fi
1277 # end --enable-cache
1278 # OpenLDAP --enable-referrals
1279         # Check whether --enable-referrals or --disable-referrals was given.
1280 if test "${enable_referrals+set}" = set; then
1281   enableval="$enable_referrals"
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-referrals" 1>&2; exit 1; }
1291         fi
1292         ol_enable_referrals="$ol_arg"
1293
1294 else
1295         ol_enable_referrals="yes"
1296 fi
1297 # end --enable-referrals
1298 # OpenLDAP --enable-kbind
1299         # Check whether --enable-kbind or --disable-kbind was given.
1300 if test "${enable_kbind+set}" = set; then
1301   enableval="$enable_kbind"
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-kbind" 1>&2; exit 1; }
1311         fi
1312         ol_enable_kbind="$ol_arg"
1313
1314 else
1315         ol_enable_kbind="no"
1316 fi
1317 # end --enable-kbind
1318 # OpenLDAP --enable-ipv6
1319         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1320 if test "${enable_ipv6+set}" = set; then
1321   enableval="$enable_ipv6"
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-ipv6" 1>&2; exit 1; }
1331         fi
1332         ol_enable_ipv6="$ol_arg"
1333
1334 else
1335         ol_enable_ipv6="auto"
1336 fi
1337 # end --enable-ipv6
1338 # OpenLDAP --enable-local
1339         # Check whether --enable-local or --disable-local was given.
1340 if test "${enable_local+set}" = set; then
1341   enableval="$enable_local"
1342   
1343         ol_arg=invalid
1344         for ol_val in auto 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-local" 1>&2; exit 1; }
1351         fi
1352         ol_enable_local="$ol_arg"
1353
1354 else
1355         ol_enable_local="auto"
1356 fi
1357 # end --enable-local
1358 # OpenLDAP --enable-x_compile
1359         # Check whether --enable-x_compile or --disable-x_compile was given.
1360 if test "${enable_x_compile+set}" = set; then
1361   enableval="$enable_x_compile"
1362   
1363         ol_arg=invalid
1364         for ol_val in yes no ; do
1365                 if test "$enableval" = "$ol_val" ; then
1366                         ol_arg="$ol_val"
1367                 fi
1368         done
1369         if test "$ol_arg" = "invalid" ; then
1370                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1371         fi
1372         ol_enable_x_compile="$ol_arg"
1373
1374 else
1375         ol_enable_x_compile="no"
1376 fi
1377 # end --enable-x_compile
1378
1379
1380 # OpenLDAP --with-cyrus_sasl
1381         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1382 if test "${with_cyrus_sasl+set}" = set; then
1383   withval="$with_cyrus_sasl"
1384   
1385         ol_arg=invalid
1386         for ol_val in auto yes no  ; do
1387                 if test "$withval" = "$ol_val" ; then
1388                         ol_arg="$ol_val"
1389                 fi
1390         done
1391         if test "$ol_arg" = "invalid" ; then
1392                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1393         fi
1394         ol_with_cyrus_sasl="$ol_arg"
1395
1396 else
1397         ol_with_cyrus_sasl="auto"
1398 fi
1399 # end --with-cyrus_sasl
1400
1401 # OpenLDAP --with-fetch
1402         # Check whether --with-fetch or --without-fetch was given.
1403 if test "${with_fetch+set}" = set; then
1404   withval="$with_fetch"
1405   
1406         ol_arg=invalid
1407         for ol_val in auto yes no  ; do
1408                 if test "$withval" = "$ol_val" ; then
1409                         ol_arg="$ol_val"
1410                 fi
1411         done
1412         if test "$ol_arg" = "invalid" ; then
1413                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1414         fi
1415         ol_with_fetch="$ol_arg"
1416
1417 else
1418         ol_with_fetch="auto"
1419 fi
1420 # end --with-fetch
1421
1422 # OpenLDAP --with-kerberos
1423         # Check whether --with-kerberos or --without-kerberos was given.
1424 if test "${with_kerberos+set}" = set; then
1425   withval="$with_kerberos"
1426   
1427         ol_arg=invalid
1428         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1429                 if test "$withval" = "$ol_val" ; then
1430                         ol_arg="$ol_val"
1431                 fi
1432         done
1433         if test "$ol_arg" = "invalid" ; then
1434                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1435         fi
1436         ol_with_kerberos="$ol_arg"
1437
1438 else
1439         ol_with_kerberos="auto"
1440 fi
1441 # end --with-kerberos
1442
1443 # OpenLDAP --with-readline
1444         # Check whether --with-readline or --without-readline was given.
1445 if test "${with_readline+set}" = set; then
1446   withval="$with_readline"
1447   
1448         ol_arg=invalid
1449         for ol_val in auto yes no  ; do
1450                 if test "$withval" = "$ol_val" ; then
1451                         ol_arg="$ol_val"
1452                 fi
1453         done
1454         if test "$ol_arg" = "invalid" ; then
1455                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1456         fi
1457         ol_with_readline="$ol_arg"
1458
1459 else
1460         ol_with_readline="auto"
1461 fi
1462 # end --with-readline
1463
1464 # OpenLDAP --with-threads
1465         # Check whether --with-threads or --without-threads was given.
1466 if test "${with_threads+set}" = set; then
1467   withval="$with_threads"
1468   
1469         ol_arg=invalid
1470         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1471                 if test "$withval" = "$ol_val" ; then
1472                         ol_arg="$ol_val"
1473                 fi
1474         done
1475         if test "$ol_arg" = "invalid" ; then
1476                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1477         fi
1478         ol_with_threads="$ol_arg"
1479
1480 else
1481         ol_with_threads="auto"
1482 fi
1483 # end --with-threads
1484
1485 # OpenLDAP --with-tls
1486         # Check whether --with-tls or --without-tls was given.
1487 if test "${with_tls+set}" = set; then
1488   withval="$with_tls"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto ssleay openssl yes no  ; do
1492                 if test "$withval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1498         fi
1499         ol_with_tls="$ol_arg"
1500
1501 else
1502         ol_with_tls="auto"
1503 fi
1504 # end --with-tls
1505
1506 # OpenLDAP --with-yielding_select
1507         # Check whether --with-yielding_select or --without-yielding_select was given.
1508 if test "${with_yielding_select+set}" = set; then
1509   withval="$with_yielding_select"
1510   
1511         ol_arg=invalid
1512         for ol_val in auto yes no manual  ; do
1513                 if test "$withval" = "$ol_val" ; then
1514                         ol_arg="$ol_val"
1515                 fi
1516         done
1517         if test "$ol_arg" = "invalid" ; then
1518                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1519         fi
1520         ol_with_yielding_select="$ol_arg"
1521
1522 else
1523         ol_with_yielding_select="auto"
1524 fi
1525 # end --with-yielding_select
1526
1527
1528
1529 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1530 if test "${with_xxslapdoptions+set}" = set; then
1531   withval="$with_xxslapdoptions"
1532   :
1533 fi
1534
1535 # OpenLDAP --enable-slapd
1536         # Check whether --enable-slapd or --disable-slapd was given.
1537 if test "${enable_slapd+set}" = set; then
1538   enableval="$enable_slapd"
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-slapd" 1>&2; exit 1; }
1548         fi
1549         ol_enable_slapd="$ol_arg"
1550
1551 else
1552         ol_enable_slapd="yes"
1553 fi
1554 # end --enable-slapd
1555 # OpenLDAP --enable-cleartext
1556         # Check whether --enable-cleartext or --disable-cleartext was given.
1557 if test "${enable_cleartext+set}" = set; then
1558   enableval="$enable_cleartext"
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-cleartext" 1>&2; exit 1; }
1568         fi
1569         ol_enable_cleartext="$ol_arg"
1570
1571 else
1572         ol_enable_cleartext="yes"
1573 fi
1574 # end --enable-cleartext
1575 # OpenLDAP --enable-crypt
1576         # Check whether --enable-crypt or --disable-crypt was given.
1577 if test "${enable_crypt+set}" = set; then
1578   enableval="$enable_crypt"
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-crypt" 1>&2; exit 1; }
1588         fi
1589         ol_enable_crypt="$ol_arg"
1590
1591 else
1592         ol_enable_crypt="auto"
1593 fi
1594 # end --enable-crypt
1595 # OpenLDAP --enable-kpasswd
1596         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1597 if test "${enable_kpasswd+set}" = set; then
1598   enableval="$enable_kpasswd"
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-kpasswd" 1>&2; exit 1; }
1608         fi
1609         ol_enable_kpasswd="$ol_arg"
1610
1611 else
1612         ol_enable_kpasswd="no"
1613 fi
1614 # end --enable-kpasswd
1615 # OpenLDAP --enable-spasswd
1616         # Check whether --enable-spasswd or --disable-spasswd was given.
1617 if test "${enable_spasswd+set}" = set; then
1618   enableval="$enable_spasswd"
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-spasswd" 1>&2; exit 1; }
1628         fi
1629         ol_enable_spasswd="$ol_arg"
1630
1631 else
1632         ol_enable_spasswd="no"
1633 fi
1634 # end --enable-spasswd
1635 # OpenLDAP --enable-modules
1636         # Check whether --enable-modules or --disable-modules was given.
1637 if test "${enable_modules+set}" = set; then
1638   enableval="$enable_modules"
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-modules" 1>&2; exit 1; }
1648         fi
1649         ol_enable_modules="$ol_arg"
1650
1651 else
1652         ol_enable_modules="no"
1653 fi
1654 # end --enable-modules
1655 # OpenLDAP --enable-multimaster
1656         # Check whether --enable-multimaster or --disable-multimaster was given.
1657 if test "${enable_multimaster+set}" = set; then
1658   enableval="$enable_multimaster"
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-multimaster" 1>&2; exit 1; }
1668         fi
1669         ol_enable_multimaster="$ol_arg"
1670
1671 else
1672         ol_enable_multimaster="no"
1673 fi
1674 # end --enable-multimaster
1675 # OpenLDAP --enable-phonetic
1676         # Check whether --enable-phonetic or --disable-phonetic was given.
1677 if test "${enable_phonetic+set}" = set; then
1678   enableval="$enable_phonetic"
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-phonetic" 1>&2; exit 1; }
1688         fi
1689         ol_enable_phonetic="$ol_arg"
1690
1691 else
1692         ol_enable_phonetic="no"
1693 fi
1694 # end --enable-phonetic
1695 # OpenLDAP --enable-rlookups
1696         # Check whether --enable-rlookups or --disable-rlookups was given.
1697 if test "${enable_rlookups+set}" = set; then
1698   enableval="$enable_rlookups"
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-rlookups" 1>&2; exit 1; }
1708         fi
1709         ol_enable_rlookups="$ol_arg"
1710
1711 else
1712         ol_enable_rlookups="auto"
1713 fi
1714 # end --enable-rlookups
1715 # OpenLDAP --enable-aci
1716         # Check whether --enable-aci or --disable-aci was given.
1717 if test "${enable_aci+set}" = set; then
1718   enableval="$enable_aci"
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-aci" 1>&2; exit 1; }
1728         fi
1729         ol_enable_aci="$ol_arg"
1730
1731 else
1732         ol_enable_aci="no"
1733 fi
1734 # end --enable-aci
1735 # OpenLDAP --enable-wrappers
1736         # Check whether --enable-wrappers or --disable-wrappers was given.
1737 if test "${enable_wrappers+set}" = set; then
1738   enableval="$enable_wrappers"
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-wrappers" 1>&2; exit 1; }
1748         fi
1749         ol_enable_wrappers="$ol_arg"
1750
1751 else
1752         ol_enable_wrappers="no"
1753 fi
1754 # end --enable-wrappers
1755 # OpenLDAP --enable-dynamic
1756         # Check whether --enable-dynamic or --disable-dynamic was given.
1757 if test "${enable_dynamic+set}" = set; then
1758   enableval="$enable_dynamic"
1759   
1760         ol_arg=invalid
1761         for ol_val in auto yes no ; do
1762                 if test "$enableval" = "$ol_val" ; then
1763                         ol_arg="$ol_val"
1764                 fi
1765         done
1766         if test "$ol_arg" = "invalid" ; then
1767                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1768         fi
1769         ol_enable_dynamic="$ol_arg"
1770
1771 else
1772         ol_enable_dynamic="no"
1773 fi
1774 # end --enable-dynamic
1775
1776 # OpenLDAP --enable-dnssrv
1777         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1778 if test "${enable_dnssrv+set}" = set; then
1779   enableval="$enable_dnssrv"
1780   
1781         ol_arg=invalid
1782         for ol_val in auto yes no ; do
1783                 if test "$enableval" = "$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 $enableval for --enable-dnssrv" 1>&2; exit 1; }
1789         fi
1790         ol_enable_dnssrv="$ol_arg"
1791
1792 else
1793         ol_enable_dnssrv="no"
1794 fi
1795 # end --enable-dnssrv
1796 # OpenLDAP --with-dnssrv_module
1797         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1798 if test "${with_dnssrv_module+set}" = set; then
1799   withval="$with_dnssrv_module"
1800   
1801         ol_arg=invalid
1802         for ol_val in static dynamic ; do
1803                 if test "$withval" = "$ol_val" ; then
1804                         ol_arg="$ol_val"
1805                 fi
1806         done
1807         if test "$ol_arg" = "invalid" ; then
1808                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1809         fi
1810         ol_with_dnssrv_module="$ol_arg"
1811
1812 else
1813         ol_with_dnssrv_module="static"
1814 fi
1815 # end --with-dnssrv_module
1816
1817 # OpenLDAP --enable-ldap
1818         # Check whether --enable-ldap or --disable-ldap was given.
1819 if test "${enable_ldap+set}" = set; then
1820   enableval="$enable_ldap"
1821   
1822         ol_arg=invalid
1823         for ol_val in auto yes no ; do
1824                 if test "$enableval" = "$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 $enableval for --enable-ldap" 1>&2; exit 1; }
1830         fi
1831         ol_enable_ldap="$ol_arg"
1832
1833 else
1834         ol_enable_ldap="no"
1835 fi
1836 # end --enable-ldap
1837 # OpenLDAP --with-ldap_module
1838         # Check whether --with-ldap_module or --without-ldap_module was given.
1839 if test "${with_ldap_module+set}" = set; then
1840   withval="$with_ldap_module"
1841   
1842         ol_arg=invalid
1843         for ol_val in static dynamic ; do
1844                 if test "$withval" = "$ol_val" ; then
1845                         ol_arg="$ol_val"
1846                 fi
1847         done
1848         if test "$ol_arg" = "invalid" ; then
1849                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1850         fi
1851         ol_with_ldap_module="$ol_arg"
1852
1853 else
1854         ol_with_ldap_module="static"
1855 fi
1856 # end --with-ldap_module
1857
1858 # OpenLDAP --enable-ldbm
1859         # Check whether --enable-ldbm or --disable-ldbm was given.
1860 if test "${enable_ldbm+set}" = set; then
1861   enableval="$enable_ldbm"
1862   
1863         ol_arg=invalid
1864         for ol_val in auto yes no ; do
1865                 if test "$enableval" = "$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 $enableval for --enable-ldbm" 1>&2; exit 1; }
1871         fi
1872         ol_enable_ldbm="$ol_arg"
1873
1874 else
1875         ol_enable_ldbm="yes"
1876 fi
1877 # end --enable-ldbm
1878 # OpenLDAP --with-ldbm_api
1879         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1880 if test "${with_ldbm_api+set}" = set; then
1881   withval="$with_ldbm_api"
1882   
1883         ol_arg=invalid
1884         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1885                 if test "$withval" = "$ol_val" ; then
1886                         ol_arg="$ol_val"
1887                 fi
1888         done
1889         if test "$ol_arg" = "invalid" ; then
1890                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1891         fi
1892         ol_with_ldbm_api="$ol_arg"
1893
1894 else
1895         ol_with_ldbm_api="auto"
1896 fi
1897 # end --with-ldbm_api
1898
1899 # OpenLDAP --with-ldbm_module
1900         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1901 if test "${with_ldbm_module+set}" = set; then
1902   withval="$with_ldbm_module"
1903   
1904         ol_arg=invalid
1905         for ol_val in static dynamic ; do
1906                 if test "$withval" = "$ol_val" ; then
1907                         ol_arg="$ol_val"
1908                 fi
1909         done
1910         if test "$ol_arg" = "invalid" ; then
1911                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1912         fi
1913         ol_with_ldbm_module="$ol_arg"
1914
1915 else
1916         ol_with_ldbm_module="static"
1917 fi
1918 # end --with-ldbm_module
1919
1920 # OpenLDAP --with-ldbm_type
1921         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1922 if test "${with_ldbm_type+set}" = set; then
1923   withval="$with_ldbm_type"
1924   
1925         ol_arg=invalid
1926         for ol_val in auto btree hash ; do
1927                 if test "$withval" = "$ol_val" ; then
1928                         ol_arg="$ol_val"
1929                 fi
1930         done
1931         if test "$ol_arg" = "invalid" ; then
1932                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1933         fi
1934         ol_with_ldbm_type="$ol_arg"
1935
1936 else
1937         ol_with_ldbm_type="auto"
1938 fi
1939 # end --with-ldbm_type
1940
1941 # OpenLDAP --enable-passwd
1942         # Check whether --enable-passwd or --disable-passwd was given.
1943 if test "${enable_passwd+set}" = set; then
1944   enableval="$enable_passwd"
1945   
1946         ol_arg=invalid
1947         for ol_val in auto yes no ; do
1948                 if test "$enableval" = "$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 $enableval for --enable-passwd" 1>&2; exit 1; }
1954         fi
1955         ol_enable_passwd="$ol_arg"
1956
1957 else
1958         ol_enable_passwd="no"
1959 fi
1960 # end --enable-passwd
1961 # OpenLDAP --with-passwd_module
1962         # Check whether --with-passwd_module or --without-passwd_module was given.
1963 if test "${with_passwd_module+set}" = set; then
1964   withval="$with_passwd_module"
1965   
1966         ol_arg=invalid
1967         for ol_val in static dynamic ; do
1968                 if test "$withval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1974         fi
1975         ol_with_passwd_module="$ol_arg"
1976
1977 else
1978         ol_with_passwd_module="static"
1979 fi
1980 # end --with-passwd_module
1981
1982 # OpenLDAP --enable-perl
1983         # Check whether --enable-perl or --disable-perl was given.
1984 if test "${enable_perl+set}" = set; then
1985   enableval="$enable_perl"
1986   
1987         ol_arg=invalid
1988         for ol_val in auto yes no ; do
1989                 if test "$enableval" = "$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 $enableval for --enable-perl" 1>&2; exit 1; }
1995         fi
1996         ol_enable_perl="$ol_arg"
1997
1998 else
1999         ol_enable_perl="no"
2000 fi
2001 # end --enable-perl
2002 # OpenLDAP --with-perl_module
2003         # Check whether --with-perl_module or --without-perl_module was given.
2004 if test "${with_perl_module+set}" = set; then
2005   withval="$with_perl_module"
2006   
2007         ol_arg=invalid
2008         for ol_val in static dynamic ; do
2009                 if test "$withval" = "$ol_val" ; then
2010                         ol_arg="$ol_val"
2011                 fi
2012         done
2013         if test "$ol_arg" = "invalid" ; then
2014                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2015         fi
2016         ol_with_perl_module="$ol_arg"
2017
2018 else
2019         ol_with_perl_module="static"
2020 fi
2021 # end --with-perl_module
2022
2023 # OpenLDAP --enable-shell
2024         # Check whether --enable-shell or --disable-shell was given.
2025 if test "${enable_shell+set}" = set; then
2026   enableval="$enable_shell"
2027   
2028         ol_arg=invalid
2029         for ol_val in auto yes no ; do
2030                 if test "$enableval" = "$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 $enableval for --enable-shell" 1>&2; exit 1; }
2036         fi
2037         ol_enable_shell="$ol_arg"
2038
2039 else
2040         ol_enable_shell="no"
2041 fi
2042 # end --enable-shell
2043 # OpenLDAP --with-shell_module
2044         # Check whether --with-shell_module or --without-shell_module was given.
2045 if test "${with_shell_module+set}" = set; then
2046   withval="$with_shell_module"
2047   
2048         ol_arg=invalid
2049         for ol_val in static dynamic ; do
2050                 if test "$withval" = "$ol_val" ; then
2051                         ol_arg="$ol_val"
2052                 fi
2053         done
2054         if test "$ol_arg" = "invalid" ; then
2055                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2056         fi
2057         ol_with_shell_module="$ol_arg"
2058
2059 else
2060         ol_with_shell_module="static"
2061 fi
2062 # end --with-shell_module
2063
2064 # OpenLDAP --enable-sql
2065         # Check whether --enable-sql or --disable-sql was given.
2066 if test "${enable_sql+set}" = set; then
2067   enableval="$enable_sql"
2068   
2069         ol_arg=invalid
2070         for ol_val in auto yes no ; do
2071                 if test "$enableval" = "$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 $enableval for --enable-sql" 1>&2; exit 1; }
2077         fi
2078         ol_enable_sql="$ol_arg"
2079
2080 else
2081         ol_enable_sql="no"
2082 fi
2083 # end --enable-sql
2084 # OpenLDAP --with-sql_module
2085         # Check whether --with-sql_module or --without-sql_module was given.
2086 if test "${with_sql_module+set}" = set; then
2087   withval="$with_sql_module"
2088   
2089         ol_arg=invalid
2090         for ol_val in static dynamic ; do
2091                 if test "$withval" = "$ol_val" ; then
2092                         ol_arg="$ol_val"
2093                 fi
2094         done
2095         if test "$ol_arg" = "invalid" ; then
2096                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2097         fi
2098         ol_with_sql_module="$ol_arg"
2099
2100 else
2101         ol_with_sql_module="static"
2102 fi
2103 # end --with-sql_module
2104
2105 # OpenLDAP --enable-tcl
2106         # Check whether --enable-tcl or --disable-tcl was given.
2107 if test "${enable_tcl+set}" = set; then
2108   enableval="$enable_tcl"
2109   
2110         ol_arg=invalid
2111         for ol_val in auto yes no ; do
2112                 if test "$enableval" = "$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 $enableval for --enable-tcl" 1>&2; exit 1; }
2118         fi
2119         ol_enable_tcl="$ol_arg"
2120
2121 else
2122         ol_enable_tcl="no"
2123 fi
2124 # end --enable-tcl
2125 # OpenLDAP --with-tcl_module
2126         # Check whether --with-tcl_module or --without-tcl_module was given.
2127 if test "${with_tcl_module+set}" = set; then
2128   withval="$with_tcl_module"
2129   
2130         ol_arg=invalid
2131         for ol_val in static dynamic ; do
2132                 if test "$withval" = "$ol_val" ; then
2133                         ol_arg="$ol_val"
2134                 fi
2135         done
2136         if test "$ol_arg" = "invalid" ; then
2137                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2138         fi
2139         ol_with_tcl_module="$ol_arg"
2140
2141 else
2142         ol_with_tcl_module="static"
2143 fi
2144 # end --with-tcl_module
2145
2146
2147 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2148 if test "${with_xxslurpdoptions+set}" = set; then
2149   withval="$with_xxslurpdoptions"
2150   :
2151 fi
2152
2153 # OpenLDAP --enable-slurpd
2154         # Check whether --enable-slurpd or --disable-slurpd was given.
2155 if test "${enable_slurpd+set}" = set; then
2156   enableval="$enable_slurpd"
2157   
2158         ol_arg=invalid
2159         for ol_val in auto yes no ; do
2160                 if test "$enableval" = "$ol_val" ; then
2161                         ol_arg="$ol_val"
2162                 fi
2163         done
2164         if test "$ol_arg" = "invalid" ; then
2165                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2166         fi
2167         ol_enable_slurpd="$ol_arg"
2168
2169 else
2170         ol_enable_slurpd="auto"
2171 fi
2172 # end --enable-slurpd
2173
2174 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2175 if test "${with_xxliboptions+set}" = set; then
2176   withval="$with_xxliboptions"
2177   :
2178 fi
2179
2180 # Check whether --enable-static or --disable-static was given.
2181 if test "${enable_static+set}" = set; then
2182   enableval="$enable_static"
2183   p=${PACKAGE-default}
2184 case "$enableval" in
2185 yes) enable_static=yes ;;
2186 no) enable_static=no ;;
2187 *)
2188   enable_static=no
2189   # Look at the argument we got.  We use all the common list separators.
2190   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2191   for pkg in $enableval; do
2192     if test "X$pkg" = "X$p"; then
2193       enable_static=yes
2194     fi
2195   done
2196   IFS="$ac_save_ifs"
2197   ;;
2198 esac
2199 else
2200   enable_static=yes
2201 fi
2202
2203 # Check whether --enable-shared or --disable-shared was given.
2204 if test "${enable_shared+set}" = set; then
2205   enableval="$enable_shared"
2206   p=${PACKAGE-default}
2207 case "$enableval" in
2208 yes) enable_shared=yes ;;
2209 no) enable_shared=no ;;
2210 *)
2211   enable_shared=no
2212   # Look at the argument we got.  We use all the common list separators.
2213   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2214   for pkg in $enableval; do
2215     if test "X$pkg" = "X$p"; then
2216       enable_shared=yes
2217     fi
2218   done
2219   IFS="$ac_save_ifs"
2220   ;;
2221 esac
2222 else
2223   enable_shared=yes
2224 fi
2225
2226
2227
2228 # validate options
2229 if test $ol_enable_slapd = no ; then
2230                 if test $ol_enable_dnssrv = yes ; then
2231                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2232         fi
2233         if test $ol_enable_ldap = yes ; then
2234                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2235         fi
2236         if test $ol_enable_ldbm = yes ; then
2237                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2238         fi
2239         if test $ol_enable_passwd = yes ; then
2240                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2241         fi
2242         if test $ol_enable_perl = yes ; then
2243                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2244         fi
2245         if test $ol_enable_shell = yes ; then
2246                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2247         fi
2248         if test $ol_enable_tcl = yes ; then
2249                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2250         fi
2251         if test $ol_enable_sql = yes ; then
2252                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2253         fi
2254         if test $ol_enable_modules = yes ; then
2255                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2256         fi
2257         if test $ol_enable_multimaster = yes ; then
2258                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2259         fi
2260         if test $ol_enable_wrappers = yes ; then
2261                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2262         fi
2263         if test $ol_enable_phonetic = yes ; then
2264                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2265         fi
2266         if test $ol_enable_rlookups = yes ; then
2267                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2268         fi
2269         if test $ol_enable_aci = yes ; then
2270                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2271         fi
2272         if test $ol_with_ldbm_api != auto ; then
2273                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2274         fi
2275         if test $ol_with_ldbm_type != auto ; then
2276                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2277         fi
2278         if test $ol_with_dnssrv_module != static ; then
2279                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2280         fi
2281         if test $ol_with_ldap_module != static ; then
2282                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2283         fi
2284         if test $ol_with_ldbm_module != static ; then
2285                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2286         fi
2287         if test $ol_with_passwd_module != static ; then
2288                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2289         fi
2290         if test $ol_with_perl_module != static ; then
2291                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2292         fi
2293         if test $ol_with_shell_module != static ; then
2294                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2295         fi
2296         if test $ol_with_tcl_module != static ; then
2297                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2298         fi
2299         if test $ol_with_sql_module != static ; then
2300                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2301         fi
2302         if test $ol_enable_slurpd = yes ; then
2303                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2304         fi
2305
2306         # force settings to no
2307         ol_enable_dnssrv=no
2308         ol_enable_ldap=no
2309         ol_enable_ldbm=no
2310         ol_enable_passwd=no
2311         ol_enable_perl=no
2312         ol_enable_shell=no
2313         ol_enable_tcl=no
2314         ol_enable_sql=no
2315
2316         ol_enable_modules=no
2317         ol_enable_multimaster=no
2318         ol_enable_phonetic=no
2319         ol_enable_rlookups=no
2320         ol_enable_aci=no
2321         ol_enable_wrappers=no
2322         ol_enable_dynamic=no
2323
2324         ol_with_ldbm_api=no
2325         ol_with_ldbm_type=no
2326
2327         ol_with_dnssrv_module=static
2328         ol_with_ldap_module=static
2329         ol_with_ldbm_module=static
2330         ol_with_passwd_module=static
2331         ol_with_perl_module=static
2332         ol_with_shell_module=static
2333         ol_with_tcl_module=static
2334         ol_with_sql_module=static
2335
2336         ol_enable_slurpd=no
2337
2338 elif test $ol_enable_ldbm = no ; then
2339         
2340         if test $ol_with_ldbm_api != auto ; then
2341                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2342         fi
2343
2344         if test $ol_with_ldbm_type != auto ; then
2345                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2346         fi
2347
2348         if test $ol_with_ldbm_module != static ; then
2349                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2350         fi
2351
2352         if test $ol_enable_modules != yes -a \
2353                 $ol_enable_dnssrv = no -a \
2354                 $ol_enable_ldap = no -a \
2355                 $ol_enable_passwd = no -a \
2356                 $ol_enable_perl = no -a \
2357                 $ol_enable_shell = no -a \
2358                 $ol_enable_sql = no -a \
2359                 $ol_enable_tcl = no ; then
2360                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2361         fi
2362
2363         ol_with_ldbm_api=no
2364         ol_with_ldbm_type=no
2365         ol_with_ldbm_module=static
2366
2367 else
2368                 if test $ol_with_ldbm_api = gdbm -a \
2369                 $ol_with_ldbm_type = btree ; then
2370                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2371         fi
2372         if test $ol_with_ldbm_api = mdbm -a \
2373                 $ol_with_ldbm_type = btree ; then
2374                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2375         fi
2376         if test $ol_with_ldbm_api = ndbm -a \
2377                 $ol_with_ldbm_type = btree ; then
2378                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2379         fi
2380 fi
2381
2382 if test $ol_enable_slurpd = yes ; then
2383                 if test $ol_with_threads = no ; then
2384                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2385         fi
2386 fi
2387
2388 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2389         if test $ol_with_kerberos = no ; then
2390                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2391         fi
2392         ol_with_kerberos=yes
2393 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2394         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2395                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2396         fi
2397         ol_with_kerberos=no
2398 fi
2399
2400 if test $ol_enable_spasswd = yes ; then
2401         if test $ol_with_cyrus_sasl = no ; then
2402                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2403         fi
2404         ol_link_spasswd=yes
2405 fi
2406
2407 echo "$ac_t""done" 1>&6
2408
2409 LDAP_LIBS=
2410 LDIF_LIBS=
2411 LDBM_LIBS=
2412 LTHREAD_LIBS=
2413 LUTIL_LIBS=
2414
2415 SLAPD_LIBS=
2416 SLURPD_LIBS=
2417
2418 BUILD_SLAPD=no
2419 BUILD_SLURPD=no
2420
2421 BUILD_THREAD=no
2422
2423 BUILD_DNSSRV=no
2424 BUILD_LDAP=no
2425 BUILD_LDBM=no
2426 BUILD_PASSWD=no
2427 BUILD_PERL=no
2428 BUILD_SHELL=no
2429 BUILD_SQL=no
2430 BUILD_TCL=no
2431
2432 BUILD_DNSSRV_DYNAMIC=static
2433 BUILD_LDAP_DYNAMIC=static
2434 BUILD_LDBM_DYNAMIC=static
2435 BUILD_PASSWD_DYNAMIC=static
2436 BUILD_PERL_DYNAMIC=static
2437 BUILD_SHELL_DYNAMIC=static
2438 BUILD_TCL_DYNAMIC=static
2439 BUILD_SQL_DYNAMIC=static
2440
2441 SLAPD_MODULES_LDFLAGS=
2442 SLAPD_MODULES_CPPFLAGS=
2443 SLAPD_MODULES_LIST=
2444
2445 SLAPD_PERL_LDFLAGS=
2446 MOD_PERL_LDFLAGS=
2447 PERL_CPPFLAGS=
2448
2449 SLAPD_SQL_LDFLAGS=
2450 SLAPD_SQL_LIBS=
2451 SLAPD_SQL_INCLUDES=
2452
2453 MOD_TCL_LIB=
2454 KRB4_LIBS=
2455 KRB5_LIBS=
2456 READLINE_LIBS=
2457 SASL_LIBS=
2458 TERMCAP_LIBS=
2459 TLS_LIBS=
2460 MODULES_LIBS=
2461 AUTH_LIBS=
2462
2463
2464
2465 cat >> confdefs.h <<\EOF
2466 #define HAVE_MKVERSION 1
2467 EOF
2468
2469
2470
2471
2472 ol_aix_threads=no
2473 case "$target" in
2474 *-*-aix*)       if test -z "$CC" ; then
2475                 case "$ol_with_threads" in
2476                 auto | yes |  posix) ol_aix_threads=yes ;;
2477                 esac
2478         fi
2479 ;;
2480 esac
2481
2482 if test $ol_aix_threads = yes ; then
2483         if test -z "${CC}" ; then
2484                 for ac_prog in cc_r xlc_r cc
2485 do
2486 # Extract the first word of "$ac_prog", so it can be a program name with args.
2487 set dummy $ac_prog; ac_word=$2
2488 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2489 echo "configure:2490: checking for $ac_word" >&5
2490 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2491   echo $ac_n "(cached) $ac_c" 1>&6
2492 else
2493   if test -n "$CC"; then
2494   ac_cv_prog_CC="$CC" # Let the user override the test.
2495 else
2496   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2497   ac_dummy="$PATH"
2498   for ac_dir in $ac_dummy; do
2499     test -z "$ac_dir" && ac_dir=.
2500     if test -f $ac_dir/$ac_word; then
2501       ac_cv_prog_CC="$ac_prog"
2502       break
2503     fi
2504   done
2505   IFS="$ac_save_ifs"
2506 fi
2507 fi
2508 CC="$ac_cv_prog_CC"
2509 if test -n "$CC"; then
2510   echo "$ac_t""$CC" 1>&6
2511 else
2512   echo "$ac_t""no" 1>&6
2513 fi
2514
2515 test -n "$CC" && break
2516 done
2517
2518
2519                 if test "$CC" = cc ; then
2520                                                 if test $ol_with_threads != auto ; then
2521                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2522                         else
2523                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2524                         fi
2525                         ol_with_threads=no
2526                 fi
2527         fi
2528
2529         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2530                 ol_with_threads=posix
2531                 ol_cv_pthread_create=yes
2532         fi
2533 fi
2534
2535 if test -z "${CC}"; then
2536         for ac_prog in cc
2537 do
2538 # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2541 echo "configure:2542: checking for $ac_word" >&5
2542 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2543   echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545   if test -n "$CC"; then
2546   ac_cv_prog_CC="$CC" # Let the user override the test.
2547 else
2548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2549   ac_dummy="$PATH"
2550   for ac_dir in $ac_dummy; do
2551     test -z "$ac_dir" && ac_dir=.
2552     if test -f $ac_dir/$ac_word; then
2553       ac_cv_prog_CC="$ac_prog"
2554       break
2555     fi
2556   done
2557   IFS="$ac_save_ifs"
2558 fi
2559 fi
2560 CC="$ac_cv_prog_CC"
2561 if test -n "$CC"; then
2562   echo "$ac_t""$CC" 1>&6
2563 else
2564   echo "$ac_t""no" 1>&6
2565 fi
2566
2567 test -n "$CC" && break
2568 done
2569
2570 fi
2571
2572
2573
2574
2575 # Check whether --enable-fast-install or --disable-fast-install was given.
2576 if test "${enable_fast_install+set}" = set; then
2577   enableval="$enable_fast_install"
2578   p=${PACKAGE-default}
2579 case "$enableval" in
2580 yes) enable_fast_install=yes ;;
2581 no) enable_fast_install=no ;;
2582 *)
2583   enable_fast_install=no
2584   # Look at the argument we got.  We use all the common list separators.
2585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2586   for pkg in $enableval; do
2587     if test "X$pkg" = "X$p"; then
2588       enable_fast_install=yes
2589     fi
2590   done
2591   IFS="$ac_save_ifs"
2592   ;;
2593 esac
2594 else
2595   enable_fast_install=yes
2596 fi
2597
2598 # Extract the first word of "ranlib", so it can be a program name with args.
2599 set dummy ranlib; ac_word=$2
2600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2601 echo "configure:2602: checking for $ac_word" >&5
2602 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2603   echo $ac_n "(cached) $ac_c" 1>&6
2604 else
2605   if test -n "$RANLIB"; then
2606   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2607 else
2608   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2609   ac_dummy="$PATH"
2610   for ac_dir in $ac_dummy; do
2611     test -z "$ac_dir" && ac_dir=.
2612     if test -f $ac_dir/$ac_word; then
2613       ac_cv_prog_RANLIB="ranlib"
2614       break
2615     fi
2616   done
2617   IFS="$ac_save_ifs"
2618   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2619 fi
2620 fi
2621 RANLIB="$ac_cv_prog_RANLIB"
2622 if test -n "$RANLIB"; then
2623   echo "$ac_t""$RANLIB" 1>&6
2624 else
2625   echo "$ac_t""no" 1>&6
2626 fi
2627
2628 # Extract the first word of "gcc", so it can be a program name with args.
2629 set dummy gcc; ac_word=$2
2630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2631 echo "configure:2632: checking for $ac_word" >&5
2632 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2633   echo $ac_n "(cached) $ac_c" 1>&6
2634 else
2635   if test -n "$CC"; then
2636   ac_cv_prog_CC="$CC" # Let the user override the test.
2637 else
2638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2639   ac_dummy="$PATH"
2640   for ac_dir in $ac_dummy; do
2641     test -z "$ac_dir" && ac_dir=.
2642     if test -f $ac_dir/$ac_word; then
2643       ac_cv_prog_CC="gcc"
2644       break
2645     fi
2646   done
2647   IFS="$ac_save_ifs"
2648 fi
2649 fi
2650 CC="$ac_cv_prog_CC"
2651 if test -n "$CC"; then
2652   echo "$ac_t""$CC" 1>&6
2653 else
2654   echo "$ac_t""no" 1>&6
2655 fi
2656
2657 if test -z "$CC"; then
2658   # Extract the first word of "cc", so it can be a program name with args.
2659 set dummy cc; ac_word=$2
2660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2661 echo "configure:2662: checking for $ac_word" >&5
2662 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2663   echo $ac_n "(cached) $ac_c" 1>&6
2664 else
2665   if test -n "$CC"; then
2666   ac_cv_prog_CC="$CC" # Let the user override the test.
2667 else
2668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2669   ac_prog_rejected=no
2670   ac_dummy="$PATH"
2671   for ac_dir in $ac_dummy; do
2672     test -z "$ac_dir" && ac_dir=.
2673     if test -f $ac_dir/$ac_word; then
2674       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2675         ac_prog_rejected=yes
2676         continue
2677       fi
2678       ac_cv_prog_CC="cc"
2679       break
2680     fi
2681   done
2682   IFS="$ac_save_ifs"
2683 if test $ac_prog_rejected = yes; then
2684   # We found a bogon in the path, so make sure we never use it.
2685   set dummy $ac_cv_prog_CC
2686   shift
2687   if test $# -gt 0; then
2688     # We chose a different compiler from the bogus one.
2689     # However, it has the same basename, so the bogon will be chosen
2690     # first if we set CC to just the basename; use the full file name.
2691     shift
2692     set dummy "$ac_dir/$ac_word" "$@"
2693     shift
2694     ac_cv_prog_CC="$@"
2695   fi
2696 fi
2697 fi
2698 fi
2699 CC="$ac_cv_prog_CC"
2700 if test -n "$CC"; then
2701   echo "$ac_t""$CC" 1>&6
2702 else
2703   echo "$ac_t""no" 1>&6
2704 fi
2705
2706   if test -z "$CC"; then
2707     case "`uname -s`" in
2708     *win32* | *WIN32* | *CYGWIN*)
2709       # Extract the first word of "cl", so it can be a program name with args.
2710 set dummy cl; ac_word=$2
2711 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2712 echo "configure:2713: checking for $ac_word" >&5
2713 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2714   echo $ac_n "(cached) $ac_c" 1>&6
2715 else
2716   if test -n "$CC"; then
2717   ac_cv_prog_CC="$CC" # Let the user override the test.
2718 else
2719   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2720   ac_dummy="$PATH"
2721   for ac_dir in $ac_dummy; do
2722     test -z "$ac_dir" && ac_dir=.
2723     if test -f $ac_dir/$ac_word; then
2724       ac_cv_prog_CC="cl"
2725       break
2726     fi
2727   done
2728   IFS="$ac_save_ifs"
2729 fi
2730 fi
2731 CC="$ac_cv_prog_CC"
2732 if test -n "$CC"; then
2733   echo "$ac_t""$CC" 1>&6
2734 else
2735   echo "$ac_t""no" 1>&6
2736 fi
2737  ;;
2738     esac
2739   fi
2740   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2741 fi
2742
2743 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2744 echo "configure:2745: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2745
2746 ac_ext=c
2747 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2748 ac_cpp='$CPP $CPPFLAGS'
2749 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2750 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2751 cross_compiling=$ac_cv_prog_cc_cross
2752
2753 cat > conftest.$ac_ext << EOF
2754
2755 #line 2756 "configure"
2756 #include "confdefs.h"
2757
2758 main(){return(0);}
2759 EOF
2760 if { (eval echo configure:2761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2761   ac_cv_prog_cc_works=yes
2762   # If we can't run a trivial program, we are probably using a cross compiler.
2763   if (./conftest; exit) 2>/dev/null; then
2764     ac_cv_prog_cc_cross=no
2765   else
2766     ac_cv_prog_cc_cross=yes
2767   fi
2768 else
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771   ac_cv_prog_cc_works=no
2772 fi
2773 rm -fr conftest*
2774 ac_ext=c
2775 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2776 ac_cpp='$CPP $CPPFLAGS'
2777 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2778 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2779 cross_compiling=$ac_cv_prog_cc_cross
2780
2781 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2782 if test $ac_cv_prog_cc_works = no; then
2783   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2784 fi
2785 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2786 echo "configure:2787: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2787 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2788 cross_compiling=$ac_cv_prog_cc_cross
2789
2790 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2791 echo "configure:2792: checking whether we are using GNU C" >&5
2792 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   cat > conftest.c <<EOF
2796 #ifdef __GNUC__
2797   yes;
2798 #endif
2799 EOF
2800 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2801   ac_cv_prog_gcc=yes
2802 else
2803   ac_cv_prog_gcc=no
2804 fi
2805 fi
2806
2807 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2808
2809 if test $ac_cv_prog_gcc = yes; then
2810   GCC=yes
2811 else
2812   GCC=
2813 fi
2814
2815 ac_test_CFLAGS="${CFLAGS+set}"
2816 ac_save_CFLAGS="$CFLAGS"
2817 CFLAGS=
2818 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2819 echo "configure:2820: checking whether ${CC-cc} accepts -g" >&5
2820 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2821   echo $ac_n "(cached) $ac_c" 1>&6
2822 else
2823   echo 'void f(){}' > conftest.c
2824 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2825   ac_cv_prog_cc_g=yes
2826 else
2827   ac_cv_prog_cc_g=no
2828 fi
2829 rm -f conftest*
2830
2831 fi
2832
2833 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2834 if test "$ac_test_CFLAGS" = set; then
2835   CFLAGS="$ac_save_CFLAGS"
2836 elif test $ac_cv_prog_cc_g = yes; then
2837   if test "$GCC" = yes; then
2838     CFLAGS="-g -O2"
2839   else
2840     CFLAGS="-g"
2841   fi
2842 else
2843   if test "$GCC" = yes; then
2844     CFLAGS="-O2"
2845   else
2846     CFLAGS=
2847   fi
2848 fi
2849
2850 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2851 if test "${with_gnu_ld+set}" = set; then
2852   withval="$with_gnu_ld"
2853   test "$withval" = no || with_gnu_ld=yes
2854 else
2855   with_gnu_ld=no
2856 fi
2857
2858 ac_prog=ld
2859 if test "$ac_cv_prog_gcc" = yes; then
2860   # Check if gcc -print-prog-name=ld gives a path.
2861   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2862 echo "configure:2863: checking for ld used by GCC" >&5
2863   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2864   case "$ac_prog" in
2865     # Accept absolute paths.
2866     [\\/]* | [A-Za-z]:[\\/]*)
2867       re_direlt='/[^/][^/]*/\.\./'
2868       # Canonicalize the path of ld
2869       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2870       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2871         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2872       done
2873       test -z "$LD" && LD="$ac_prog"
2874       ;;
2875   "")
2876     # If it fails, then pretend we aren't using GCC.
2877     ac_prog=ld
2878     ;;
2879   *)
2880     # If it is relative, then search for the first ld in PATH.
2881     with_gnu_ld=unknown
2882     ;;
2883   esac
2884 elif test "$with_gnu_ld" = yes; then
2885   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2886 echo "configure:2887: checking for GNU ld" >&5
2887 else
2888   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2889 echo "configure:2890: checking for non-GNU ld" >&5
2890 fi
2891 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2892   echo $ac_n "(cached) $ac_c" 1>&6
2893 else
2894   if test -z "$LD"; then
2895   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2896   for ac_dir in $PATH; do
2897     test -z "$ac_dir" && ac_dir=.
2898     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2899       ac_cv_path_LD="$ac_dir/$ac_prog"
2900       # Check to see if the program is GNU ld.  I'd rather use --version,
2901       # but apparently some GNU ld's only accept -v.
2902       # Break only if it was the GNU/non-GNU ld that we prefer.
2903       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2904         test "$with_gnu_ld" != no && break
2905       else
2906         test "$with_gnu_ld" != yes && break
2907       fi
2908     fi
2909   done
2910   IFS="$ac_save_ifs"
2911 else
2912   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2913 fi
2914 fi
2915
2916 LD="$ac_cv_path_LD"
2917 if test -n "$LD"; then
2918   echo "$ac_t""$LD" 1>&6
2919 else
2920   echo "$ac_t""no" 1>&6
2921 fi
2922 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2923 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2924 echo "configure:2925: checking if the linker ($LD) is GNU ld" >&5
2925 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2926   echo $ac_n "(cached) $ac_c" 1>&6
2927 else
2928   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2929 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2930   ac_cv_prog_gnu_ld=yes
2931 else
2932   ac_cv_prog_gnu_ld=no
2933 fi
2934 fi
2935
2936 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2937
2938
2939 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2940 echo "configure:2941: checking for BSD-compatible nm" >&5
2941 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2942   echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944   if test -n "$NM"; then
2945   # Let the user override the test.
2946   ac_cv_path_NM="$NM"
2947 else
2948   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2949   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2950     test -z "$ac_dir" && ac_dir=.
2951     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2952       # Check to see if the nm accepts a BSD-compat flag.
2953       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2954       #   nm: unknown option "B" ignored
2955       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2956         ac_cv_path_NM="$ac_dir/nm -B"
2957         break
2958       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2959         ac_cv_path_NM="$ac_dir/nm -p"
2960         break
2961       else
2962         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2963         continue # so that we can try to find one that supports BSD flags
2964       fi
2965     fi
2966   done
2967   IFS="$ac_save_ifs"
2968   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2969 fi
2970 fi
2971
2972 NM="$ac_cv_path_NM"
2973 echo "$ac_t""$NM" 1>&6
2974
2975 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2976 echo "configure:2977: checking whether ln -s works" >&5
2977 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2978   echo $ac_n "(cached) $ac_c" 1>&6
2979 else
2980   rm -f conftestdata
2981 if ln -s X conftestdata 2>/dev/null
2982 then
2983   rm -f conftestdata
2984   ac_cv_prog_LN_S="ln -s"
2985 else
2986   ac_cv_prog_LN_S=ln
2987 fi
2988 fi
2989 LN_S="$ac_cv_prog_LN_S"
2990 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2991   echo "$ac_t""yes" 1>&6
2992 else
2993   echo "$ac_t""no" 1>&6
2994 fi
2995
2996 if test $host != $build; then
2997   ac_tool_prefix=${host_alias}-
2998 else
2999   ac_tool_prefix=
3000 fi
3001
3002
3003 case "$target" in
3004 NONE) lt_target="$host" ;;
3005 *) lt_target="$target" ;;
3006 esac
3007
3008 # Check for any special flags to pass to ltconfig.
3009 libtool_flags="--cache-file=$cache_file"
3010 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3011 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3012 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3013 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3014 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3015 libtool_flags="$libtool_flags --enable-dlopen"
3016 libtool_flags="$libtool_flags --enable-win32-dll"
3017 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3018 if test "${enable_libtool_lock+set}" = set; then
3019   enableval="$enable_libtool_lock"
3020   :
3021 fi
3022
3023 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3024 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3025
3026 # Some flags need to be propagated to the compiler or linker for good
3027 # libtool support.
3028 case "$lt_target" in
3029 *-*-irix6*)
3030   # Find out which ABI we are using.
3031   echo '#line 3032 "configure"' > conftest.$ac_ext
3032   if { (eval echo configure:3033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3033     case "`/usr/bin/file conftest.o`" in
3034     *32-bit*)
3035       LD="${LD-ld} -32"
3036       ;;
3037     *N32*)
3038       LD="${LD-ld} -n32"
3039       ;;
3040     *64-bit*)
3041       LD="${LD-ld} -64"
3042       ;;
3043     esac
3044   fi
3045   rm -rf conftest*
3046   ;;
3047
3048 *-*-sco3.2v5*)
3049   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3050   SAVE_CFLAGS="$CFLAGS"
3051   CFLAGS="$CFLAGS -belf"
3052   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3053 echo "configure:3054: checking whether the C compiler needs -belf" >&5
3054 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3055   echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057   cat > conftest.$ac_ext <<EOF
3058 #line 3059 "configure"
3059 #include "confdefs.h"
3060
3061 int main() {
3062
3063 ; return 0; }
3064 EOF
3065 if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3066   rm -rf conftest*
3067   lt_cv_cc_needs_belf=yes
3068 else
3069   echo "configure: failed program was:" >&5
3070   cat conftest.$ac_ext >&5
3071   rm -rf conftest*
3072   lt_cv_cc_needs_belf=no
3073 fi
3074 rm -f conftest*
3075 fi
3076
3077 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3078   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3079     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3080     CFLAGS="$SAVE_CFLAGS"
3081   fi
3082   ;;
3083
3084 *-*-cygwin* | *-*-mingw*)
3085   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3086 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3087 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3088 echo "configure:3089: checking for $ac_word" >&5
3089 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3090   echo $ac_n "(cached) $ac_c" 1>&6
3091 else
3092   if test -n "$DLLTOOL"; then
3093   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3094 else
3095   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3096   ac_dummy="$PATH"
3097   for ac_dir in $ac_dummy; do
3098     test -z "$ac_dir" && ac_dir=.
3099     if test -f $ac_dir/$ac_word; then
3100       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3101       break
3102     fi
3103   done
3104   IFS="$ac_save_ifs"
3105 fi
3106 fi
3107 DLLTOOL="$ac_cv_prog_DLLTOOL"
3108 if test -n "$DLLTOOL"; then
3109   echo "$ac_t""$DLLTOOL" 1>&6
3110 else
3111   echo "$ac_t""no" 1>&6
3112 fi
3113
3114
3115 if test -z "$ac_cv_prog_DLLTOOL"; then
3116 if test -n "$ac_tool_prefix"; then
3117   # Extract the first word of "dlltool", so it can be a program name with args.
3118 set dummy dlltool; ac_word=$2
3119 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3120 echo "configure:3121: checking for $ac_word" >&5
3121 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3122   echo $ac_n "(cached) $ac_c" 1>&6
3123 else
3124   if test -n "$DLLTOOL"; then
3125   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3126 else
3127   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3128   ac_dummy="$PATH"
3129   for ac_dir in $ac_dummy; do
3130     test -z "$ac_dir" && ac_dir=.
3131     if test -f $ac_dir/$ac_word; then
3132       ac_cv_prog_DLLTOOL="dlltool"
3133       break
3134     fi
3135   done
3136   IFS="$ac_save_ifs"
3137   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3138 fi
3139 fi
3140 DLLTOOL="$ac_cv_prog_DLLTOOL"
3141 if test -n "$DLLTOOL"; then
3142   echo "$ac_t""$DLLTOOL" 1>&6
3143 else
3144   echo "$ac_t""no" 1>&6
3145 fi
3146
3147 else
3148   DLLTOOL="false"
3149 fi
3150 fi
3151
3152   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3153 set dummy ${ac_tool_prefix}as; ac_word=$2
3154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3155 echo "configure:3156: checking for $ac_word" >&5
3156 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159   if test -n "$AS"; then
3160   ac_cv_prog_AS="$AS" # Let the user override the test.
3161 else
3162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3163   ac_dummy="$PATH"
3164   for ac_dir in $ac_dummy; do
3165     test -z "$ac_dir" && ac_dir=.
3166     if test -f $ac_dir/$ac_word; then
3167       ac_cv_prog_AS="${ac_tool_prefix}as"
3168       break
3169     fi
3170   done
3171   IFS="$ac_save_ifs"
3172 fi
3173 fi
3174 AS="$ac_cv_prog_AS"
3175 if test -n "$AS"; then
3176   echo "$ac_t""$AS" 1>&6
3177 else
3178   echo "$ac_t""no" 1>&6
3179 fi
3180
3181
3182 if test -z "$ac_cv_prog_AS"; then
3183 if test -n "$ac_tool_prefix"; then
3184   # Extract the first word of "as", so it can be a program name with args.
3185 set dummy as; ac_word=$2
3186 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3187 echo "configure:3188: checking for $ac_word" >&5
3188 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3189   echo $ac_n "(cached) $ac_c" 1>&6
3190 else
3191   if test -n "$AS"; then
3192   ac_cv_prog_AS="$AS" # Let the user override the test.
3193 else
3194   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3195   ac_dummy="$PATH"
3196   for ac_dir in $ac_dummy; do
3197     test -z "$ac_dir" && ac_dir=.
3198     if test -f $ac_dir/$ac_word; then
3199       ac_cv_prog_AS="as"
3200       break
3201     fi
3202   done
3203   IFS="$ac_save_ifs"
3204   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3205 fi
3206 fi
3207 AS="$ac_cv_prog_AS"
3208 if test -n "$AS"; then
3209   echo "$ac_t""$AS" 1>&6
3210 else
3211   echo "$ac_t""no" 1>&6
3212 fi
3213
3214 else
3215   AS="false"
3216 fi
3217 fi
3218
3219   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3220 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3221 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3222 echo "configure:3223: checking for $ac_word" >&5
3223 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3224   echo $ac_n "(cached) $ac_c" 1>&6
3225 else
3226   if test -n "$OBJDUMP"; then
3227   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3228 else
3229   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3230   ac_dummy="$PATH"
3231   for ac_dir in $ac_dummy; do
3232     test -z "$ac_dir" && ac_dir=.
3233     if test -f $ac_dir/$ac_word; then
3234       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3235       break
3236     fi
3237   done
3238   IFS="$ac_save_ifs"
3239 fi
3240 fi
3241 OBJDUMP="$ac_cv_prog_OBJDUMP"
3242 if test -n "$OBJDUMP"; then
3243   echo "$ac_t""$OBJDUMP" 1>&6
3244 else
3245   echo "$ac_t""no" 1>&6
3246 fi
3247
3248
3249 if test -z "$ac_cv_prog_OBJDUMP"; then
3250 if test -n "$ac_tool_prefix"; then
3251   # Extract the first word of "objdump", so it can be a program name with args.
3252 set dummy objdump; ac_word=$2
3253 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3254 echo "configure:3255: checking for $ac_word" >&5
3255 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3256   echo $ac_n "(cached) $ac_c" 1>&6
3257 else
3258   if test -n "$OBJDUMP"; then
3259   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3260 else
3261   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3262   ac_dummy="$PATH"
3263   for ac_dir in $ac_dummy; do
3264     test -z "$ac_dir" && ac_dir=.
3265     if test -f $ac_dir/$ac_word; then
3266       ac_cv_prog_OBJDUMP="objdump"
3267       break
3268     fi
3269   done
3270   IFS="$ac_save_ifs"
3271   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3272 fi
3273 fi
3274 OBJDUMP="$ac_cv_prog_OBJDUMP"
3275 if test -n "$OBJDUMP"; then
3276   echo "$ac_t""$OBJDUMP" 1>&6
3277 else
3278   echo "$ac_t""no" 1>&6
3279 fi
3280
3281 else
3282   OBJDUMP="false"
3283 fi
3284 fi
3285
3286   ;;
3287
3288 esac
3289
3290
3291 # Save cache, so that ltconfig can load it
3292
3293
3294 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3295 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3296 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3297 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3298 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3299 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3300 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3301 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3302
3303 # Reload cache, that may have been modified by ltconfig
3304
3305
3306 # This can be used to rebuild libtool when needed
3307 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3308
3309 # Always use our own libtool.
3310 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3311
3312 # Redirect the config.log output again, so that the ltconfig log is not
3313 # clobbered by the next message.
3314 exec 5>>./config.log
3315
3316
3317 for ac_prog in mawk gawk nawk awk
3318 do
3319 # Extract the first word of "$ac_prog", so it can be a program name with args.
3320 set dummy $ac_prog; ac_word=$2
3321 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3322 echo "configure:3323: checking for $ac_word" >&5
3323 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3324   echo $ac_n "(cached) $ac_c" 1>&6
3325 else
3326   if test -n "$AWK"; then
3327   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3328 else
3329   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3330   ac_dummy="$PATH"
3331   for ac_dir in $ac_dummy; do
3332     test -z "$ac_dir" && ac_dir=.
3333     if test -f $ac_dir/$ac_word; then
3334       ac_cv_prog_AWK="$ac_prog"
3335       break
3336     fi
3337   done
3338   IFS="$ac_save_ifs"
3339 fi
3340 fi
3341 AWK="$ac_cv_prog_AWK"
3342 if test -n "$AWK"; then
3343   echo "$ac_t""$AWK" 1>&6
3344 else
3345   echo "$ac_t""no" 1>&6
3346 fi
3347
3348 test -n "$AWK" && break
3349 done
3350
3351 # test for ln hardlink support
3352 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3353 echo "configure:3354: checking whether ln works" >&5
3354 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   rm -f conftest.src conftest.dst
3358 echo "conftest" > conftest.src
3359 if ln conftest.src conftest.dst 2>/dev/null
3360 then
3361   ol_cv_prog_LN_H="ln"
3362 else
3363   ol_cv_prog_LN_H="cp"
3364 fi
3365 rm -f conftest.src conftest.dst
3366
3367 fi
3368 LN_H="$ol_cv_prog_LN_H"
3369 if test "$ol_cv_prog_LN_H" = "ln"; then
3370         echo "$ac_t""yes" 1>&6
3371 else
3372         echo "$ac_t""no" 1>&6
3373 fi
3374
3375 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3376 echo "configure:3377: checking whether ln -s works" >&5
3377 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   rm -f conftestdata
3381 if ln -s X conftestdata 2>/dev/null
3382 then
3383   rm -f conftestdata
3384   ac_cv_prog_LN_S="ln -s"
3385 else
3386   ac_cv_prog_LN_S=ln
3387 fi
3388 fi
3389 LN_S="$ac_cv_prog_LN_S"
3390 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3391   echo "$ac_t""yes" 1>&6
3392 else
3393   echo "$ac_t""no" 1>&6
3394 fi
3395
3396
3397 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3398         LN_S="$LN_H"
3399 fi
3400
3401 # Extract the first word of "sendmail", so it can be a program name with args.
3402 set dummy sendmail; ac_word=$2
3403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3404 echo "configure:3405: checking for $ac_word" >&5
3405 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3406   echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408   case "$SENDMAIL" in
3409   /*)
3410   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3411   ;;
3412   ?:/*)
3413   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3414   ;;
3415   *)
3416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3417   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3418   for ac_dir in $ac_dummy; do 
3419     test -z "$ac_dir" && ac_dir=.
3420     if test -f $ac_dir/$ac_word; then
3421       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3422       break
3423     fi
3424   done
3425   IFS="$ac_save_ifs"
3426   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3427   ;;
3428 esac
3429 fi
3430 SENDMAIL="$ac_cv_path_SENDMAIL"
3431 if test -n "$SENDMAIL"; then
3432   echo "$ac_t""$SENDMAIL" 1>&6
3433 else
3434   echo "$ac_t""no" 1>&6
3435 fi
3436
3437 # Extract the first word of "vi", so it can be a program name with args.
3438 set dummy vi; ac_word=$2
3439 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3440 echo "configure:3441: checking for $ac_word" >&5
3441 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3442   echo $ac_n "(cached) $ac_c" 1>&6
3443 else
3444   case "$EDITOR" in
3445   /*)
3446   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3447   ;;
3448   ?:/*)
3449   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3450   ;;
3451   *)
3452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3453   ac_dummy="$PATH:/usr/ucb"
3454   for ac_dir in $ac_dummy; do 
3455     test -z "$ac_dir" && ac_dir=.
3456     if test -f $ac_dir/$ac_word; then
3457       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3458       break
3459     fi
3460   done
3461   IFS="$ac_save_ifs"
3462   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3463   ;;
3464 esac
3465 fi
3466 EDITOR="$ac_cv_path_EDITOR"
3467 if test -n "$EDITOR"; then
3468   echo "$ac_t""$EDITOR" 1>&6
3469 else
3470   echo "$ac_t""no" 1>&6
3471 fi
3472
3473 # Extract the first word of "finger", so it can be a program name with args.
3474 set dummy finger; ac_word=$2
3475 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3476 echo "configure:3477: checking for $ac_word" >&5
3477 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3478   echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480   case "$FINGER" in
3481   /*)
3482   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3483   ;;
3484   ?:/*)
3485   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3486   ;;
3487   *)
3488   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3489   ac_dummy="$PATH:/usr/ucb"
3490   for ac_dir in $ac_dummy; do 
3491     test -z "$ac_dir" && ac_dir=.
3492     if test -f $ac_dir/$ac_word; then
3493       ac_cv_path_FINGER="$ac_dir/$ac_word"
3494       break
3495     fi
3496   done
3497   IFS="$ac_save_ifs"
3498   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3499   ;;
3500 esac
3501 fi
3502 FINGER="$ac_cv_path_FINGER"
3503 if test -n "$FINGER"; then
3504   echo "$ac_t""$FINGER" 1>&6
3505 else
3506   echo "$ac_t""no" 1>&6
3507 fi
3508
3509
3510 ol_link_perl=no
3511 if test $ol_enable_perl != no ; then
3512         # Extract the first word of "perl", so it can be a program name with args.
3513 set dummy perl; ac_word=$2
3514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3515 echo "configure:3516: checking for $ac_word" >&5
3516 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3517   echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519   case "$PERLBIN" in
3520   /*)
3521   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3522   ;;
3523   ?:/*)
3524   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3525   ;;
3526   *)
3527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3528   ac_dummy="$PATH"
3529   for ac_dir in $ac_dummy; do 
3530     test -z "$ac_dir" && ac_dir=.
3531     if test -f $ac_dir/$ac_word; then
3532       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3533       break
3534     fi
3535   done
3536   IFS="$ac_save_ifs"
3537   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3538   ;;
3539 esac
3540 fi
3541 PERLBIN="$ac_cv_path_PERLBIN"
3542 if test -n "$PERLBIN"; then
3543   echo "$ac_t""$PERLBIN" 1>&6
3544 else
3545   echo "$ac_t""no" 1>&6
3546 fi
3547
3548
3549         if test "no$PERLBIN" = "no" ; then
3550                 if test $ol_enable_perl = yes ; then
3551                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3552                 fi
3553
3554         else
3555                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3556                 if test x"$ol_with_perl_module" = "xstatic" ; then
3557                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3558                 else
3559                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3560                 fi
3561                                 ol_link_perl=yes
3562         fi
3563 fi
3564
3565 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3566 echo "configure:3567: checking how to run the C preprocessor" >&5
3567 # On Suns, sometimes $CPP names a directory.
3568 if test -n "$CPP" && test -d "$CPP"; then
3569   CPP=
3570 fi
3571 if test -z "$CPP"; then
3572 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3573   echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575     # This must be in double quotes, not single quotes, because CPP may get
3576   # substituted into the Makefile and "${CC-cc}" will confuse make.
3577   CPP="${CC-cc} -E"
3578   # On the NeXT, cc -E runs the code through the compiler's parser,
3579   # not just through cpp.
3580   cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 #include <assert.h>
3584 Syntax Error
3585 EOF
3586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3587 { (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3589 if test -z "$ac_err"; then
3590   :
3591 else
3592   echo "$ac_err" >&5
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595   rm -rf conftest*
3596   CPP="${CC-cc} -E -traditional-cpp"
3597   cat > conftest.$ac_ext <<EOF
3598 #line 3599 "configure"
3599 #include "confdefs.h"
3600 #include <assert.h>
3601 Syntax Error
3602 EOF
3603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3604 { (eval echo configure:3605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3606 if test -z "$ac_err"; then
3607   :
3608 else
3609   echo "$ac_err" >&5
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -rf conftest*
3613   CPP="${CC-cc} -nologo -E"
3614   cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #include <assert.h>
3618 Syntax Error
3619 EOF
3620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3621 { (eval echo configure:3622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3623 if test -z "$ac_err"; then
3624   :
3625 else
3626   echo "$ac_err" >&5
3627   echo "configure: failed program was:" >&5
3628   cat conftest.$ac_ext >&5
3629   rm -rf conftest*
3630   CPP=/lib/cpp
3631 fi
3632 rm -f conftest*
3633 fi
3634 rm -f conftest*
3635 fi
3636 rm -f conftest*
3637   ac_cv_prog_CPP="$CPP"
3638 fi
3639   CPP="$ac_cv_prog_CPP"
3640 else
3641   ac_cv_prog_CPP="$CPP"
3642 fi
3643 echo "$ac_t""$CPP" 1>&6
3644
3645
3646 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3647         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3648
3649 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3650         echo "configure: warning: programs compiled here do run here..." 1>&2
3651         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3652
3653 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3654         echo "configure: warning: programs compiled here do not run here..." 1>&2
3655         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3656 fi
3657
3658 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3659 echo "configure:3660: checking for AIX" >&5
3660 cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 #ifdef _AIX
3664   yes
3665 #endif
3666
3667 EOF
3668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3669   egrep "yes" >/dev/null 2>&1; then
3670   rm -rf conftest*
3671   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3672 #define _ALL_SOURCE 1
3673 EOF
3674
3675 else
3676   rm -rf conftest*
3677   echo "$ac_t""no" 1>&6
3678 fi
3679 rm -f conftest*
3680
3681
3682 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3683 echo "configure:3684: checking for POSIXized ISC" >&5
3684 if test -d /etc/conf/kconfig.d &&
3685   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3686 then
3687   echo "$ac_t""yes" 1>&6
3688   ISC=yes # If later tests want to check for ISC.
3689   cat >> confdefs.h <<\EOF
3690 #define _POSIX_SOURCE 1
3691 EOF
3692
3693   if test "$GCC" = yes; then
3694     CC="$CC -posix"
3695   else
3696     CC="$CC -Xp"
3697   fi
3698 else
3699   echo "$ac_t""no" 1>&6
3700   ISC=
3701 fi
3702
3703 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3704 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3705 echo "configure:3706: checking for minix/config.h" >&5
3706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3707   echo $ac_n "(cached) $ac_c" 1>&6
3708 else
3709   cat > conftest.$ac_ext <<EOF
3710 #line 3711 "configure"
3711 #include "confdefs.h"
3712 #include <minix/config.h>
3713 EOF
3714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3715 { (eval echo configure:3716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3717 if test -z "$ac_err"; then
3718   rm -rf conftest*
3719   eval "ac_cv_header_$ac_safe=yes"
3720 else
3721   echo "$ac_err" >&5
3722   echo "configure: failed program was:" >&5
3723   cat conftest.$ac_ext >&5
3724   rm -rf conftest*
3725   eval "ac_cv_header_$ac_safe=no"
3726 fi
3727 rm -f conftest*
3728 fi
3729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3730   echo "$ac_t""yes" 1>&6
3731   MINIX=yes
3732 else
3733   echo "$ac_t""no" 1>&6
3734 MINIX=
3735 fi
3736
3737 if test "$MINIX" = yes; then
3738   cat >> confdefs.h <<\EOF
3739 #define _POSIX_SOURCE 1
3740 EOF
3741
3742   cat >> confdefs.h <<\EOF
3743 #define _POSIX_1_SOURCE 2
3744 EOF
3745
3746   cat >> confdefs.h <<\EOF
3747 #define _MINIX 1
3748 EOF
3749
3750 fi
3751
3752
3753 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3754 echo "configure:3755: checking for Cygwin environment" >&5
3755 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3756   echo $ac_n "(cached) $ac_c" 1>&6
3757 else
3758   cat > conftest.$ac_ext <<EOF
3759 #line 3760 "configure"
3760 #include "confdefs.h"
3761
3762 int main() {
3763
3764 #ifndef __CYGWIN__
3765 #define __CYGWIN__ __CYGWIN32__
3766 #endif
3767 return __CYGWIN__;
3768 ; return 0; }
3769 EOF
3770 if { (eval echo configure:3771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3771   rm -rf conftest*
3772   ac_cv_cygwin=yes
3773 else
3774   echo "configure: failed program was:" >&5
3775   cat conftest.$ac_ext >&5
3776   rm -rf conftest*
3777   ac_cv_cygwin=no
3778 fi
3779 rm -f conftest*
3780 fi
3781
3782 echo "$ac_t""$ac_cv_cygwin" 1>&6
3783 CYGWIN=
3784 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3785 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3786 echo "configure:3787: checking for mingw32 environment" >&5
3787 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3788   echo $ac_n "(cached) $ac_c" 1>&6
3789 else
3790   cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3793
3794 int main() {
3795 return __MINGW32__;
3796 ; return 0; }
3797 EOF
3798 if { (eval echo configure:3799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3799   rm -rf conftest*
3800   ac_cv_mingw32=yes
3801 else
3802   echo "configure: failed program was:" >&5
3803   cat conftest.$ac_ext >&5
3804   rm -rf conftest*
3805   ac_cv_mingw32=no
3806 fi
3807 rm -f conftest*
3808 fi
3809
3810 echo "$ac_t""$ac_cv_mingw32" 1>&6
3811 MINGW32=
3812 test "$ac_cv_mingw32" = yes && MINGW32=yes
3813 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3814 echo "configure:3815: checking for EMX OS/2 environment" >&5
3815 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   cat > conftest.$ac_ext <<EOF
3819 #line 3820 "configure"
3820 #include "confdefs.h"
3821
3822 int main() {
3823 return __EMX__;
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3827   rm -rf conftest*
3828   ac_cv_emxos2=yes
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   ac_cv_emxos2=no
3834 fi
3835 rm -f conftest*
3836 fi
3837
3838 echo "$ac_t""$ac_cv_emxos2" 1>&6
3839 EMXOS2=
3840 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3841
3842
3843
3844 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3845 echo "configure:3846: checking for executable suffix" >&5
3846 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3847   echo $ac_n "(cached) $ac_c" 1>&6
3848 else
3849   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3850   ac_cv_exeext=.exe
3851 else
3852   rm -f conftest*
3853   echo 'int main () { return 0; }' > conftest.$ac_ext
3854   ac_cv_exeext=
3855   if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3856     for file in conftest.*; do
3857       case $file in
3858       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3859       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3860       esac
3861     done
3862   else
3863     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3864   fi
3865   rm -f conftest*
3866   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3867 fi
3868 fi
3869
3870 EXEEXT=""
3871 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3872 echo "$ac_t""${ac_cv_exeext}" 1>&6
3873 ac_exeext=$EXEEXT
3874
3875 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3876 echo "configure:3877: checking for object suffix" >&5
3877 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3878   echo $ac_n "(cached) $ac_c" 1>&6
3879 else
3880   rm -f conftest*
3881 echo 'int i = 1;' > conftest.$ac_ext
3882 if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3883   for ac_file in conftest.*; do
3884     case $ac_file in
3885     *.c) ;;
3886     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3887     esac
3888   done
3889 else
3890   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3891 fi
3892 rm -f conftest*
3893 fi
3894
3895 echo "$ac_t""$ac_cv_objext" 1>&6
3896 OBJEXT=$ac_cv_objext
3897 ac_objext=$ac_cv_objext
3898
3899
3900 cat >> confdefs.h <<EOF
3901 #define EXEEXT "${EXEEXT}"
3902 EOF
3903
3904
3905 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3906 echo "configure:3907: checking for be_app in -lbe" >&5
3907 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3908 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3909   echo $ac_n "(cached) $ac_c" 1>&6
3910 else
3911   ac_save_LIBS="$LIBS"
3912 LIBS="-lbe -lroot -lnet $LIBS"
3913 cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916 /* Override any gcc2 internal prototype to avoid an error.  */
3917 /* We use char because int might match the return type of a gcc2
3918     builtin and then its argument prototype would still apply.  */
3919 char be_app();
3920
3921 int main() {
3922 be_app()
3923 ; return 0; }
3924 EOF
3925 if { (eval echo configure:3926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3926   rm -rf conftest*
3927   eval "ac_cv_lib_$ac_lib_var=yes"
3928 else
3929   echo "configure: failed program was:" >&5
3930   cat conftest.$ac_ext >&5
3931   rm -rf conftest*
3932   eval "ac_cv_lib_$ac_lib_var=no"
3933 fi
3934 rm -f conftest*
3935 LIBS="$ac_save_LIBS"
3936
3937 fi
3938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3939   echo "$ac_t""yes" 1>&6
3940   LIBS="$LIBS -lbe -lroot -lnet"
3941 else
3942   echo "$ac_t""no" 1>&6
3943 :
3944 fi
3945
3946
3947
3948
3949
3950 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3951 echo "configure:3952: checking for ${CC-cc} option to accept ANSI C" >&5
3952 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   am_cv_prog_cc_stdc=no
3956 ac_save_CC="$CC"
3957 # Don't try gcc -ansi; that turns off useful extensions and
3958 # breaks some systems' header files.
3959 # AIX                   -qlanglvl=ansi
3960 # Ultrix and OSF/1      -std1
3961 # HP-UX 10.20 and later -Ae
3962 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3963 # SVR4                  -Xc -D__EXTENSIONS__
3964 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3965 do
3966   CC="$ac_save_CC $ac_arg"
3967   cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 #include <stdarg.h>
3971 #include <stdio.h>
3972 #include <sys/types.h>
3973 #include <sys/stat.h>
3974 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3975 struct buf { int x; };
3976 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3977 static char *e (p, i)
3978      char **p;
3979      int i;
3980 {
3981   return p[i];
3982 }
3983 static char *f (char * (*g) (char **, int), char **p, ...)
3984 {
3985   char *s;
3986   va_list v;
3987   va_start (v,p);
3988   s = g (p, va_arg (v,int));
3989   va_end (v);
3990   return s;
3991 }
3992 int test (int i, double x);
3993 struct s1 {int (*f) (int a);};
3994 struct s2 {int (*f) (double a);};
3995 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3996 int argc;
3997 char **argv;
3998
3999 int main() {
4000
4001 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4002
4003 ; return 0; }
4004 EOF
4005 if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4006   rm -rf conftest*
4007   am_cv_prog_cc_stdc="$ac_arg"; break
4008 else
4009   echo "configure: failed program was:" >&5
4010   cat conftest.$ac_ext >&5
4011 fi
4012 rm -f conftest*
4013 done
4014 CC="$ac_save_CC"
4015
4016 fi
4017
4018 if test -z "$am_cv_prog_cc_stdc"; then
4019   echo "$ac_t""none needed" 1>&6
4020 else
4021   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4022 fi
4023 case "x$am_cv_prog_cc_stdc" in
4024   x|xno) ;;
4025   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4026 esac
4027
4028 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4029         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4030 fi
4031
4032 # test for make depend flag
4033 OL_MKDEP=
4034 OL_MKDEP_FLAGS=
4035 if test -z "${MKDEP}"; then
4036         OL_MKDEP="${CC-cc}"
4037         if test -z "${MKDEP_FLAGS}"; then
4038                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4039 echo "configure:4040: checking for ${OL_MKDEP} depend flag" >&5
4040 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4041   echo $ac_n "(cached) $ac_c" 1>&6
4042 else
4043   
4044                         ol_cv_mkdep=no
4045                         for flag in "-M" "-xM"; do
4046                                 cat > conftest.c <<EOF
4047  noCode;
4048 EOF
4049                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4050                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4051                                 then
4052                                         if test ! -f conftest."${ac_object}" ; then
4053                                                 ol_cv_mkdep=$flag
4054                                                 OL_MKDEP_FLAGS="$flag"
4055                                                 break
4056                                         fi
4057                                 fi
4058                         done
4059                         rm -f conftest*
4060                 
4061 fi
4062
4063 echo "$ac_t""$ol_cv_mkdep" 1>&6
4064         else
4065                 cc_cv_mkdep=yes
4066                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4067         fi
4068 else
4069         cc_cv_mkdep=yes
4070         OL_MKDEP="${MKDEP}"
4071         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4072 fi
4073
4074
4075
4076 if test "${ol_cv_mkdep}" = no ; then
4077         # this will soon become an error
4078         echo "configure: warning: do not know how to generate dependencies" 1>&2
4079 fi
4080
4081 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4082 echo "configure:4083: checking for afopen in -ls" >&5
4083 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4085   echo $ac_n "(cached) $ac_c" 1>&6
4086 else
4087   ac_save_LIBS="$LIBS"
4088 LIBS="-ls  $LIBS"
4089 cat > conftest.$ac_ext <<EOF
4090 #line 4091 "configure"
4091 #include "confdefs.h"
4092 /* Override any gcc2 internal prototype to avoid an error.  */
4093 /* We use char because int might match the return type of a gcc2
4094     builtin and then its argument prototype would still apply.  */
4095 char afopen();
4096
4097 int main() {
4098 afopen()
4099 ; return 0; }
4100 EOF
4101 if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4102   rm -rf conftest*
4103   eval "ac_cv_lib_$ac_lib_var=yes"
4104 else
4105   echo "configure: failed program was:" >&5
4106   cat conftest.$ac_ext >&5
4107   rm -rf conftest*
4108   eval "ac_cv_lib_$ac_lib_var=no"
4109 fi
4110 rm -f conftest*
4111 LIBS="$ac_save_LIBS"
4112
4113 fi
4114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4115   echo "$ac_t""yes" 1>&6
4116   
4117         AUTH_LIBS=-ls
4118         cat >> confdefs.h <<\EOF
4119 #define HAVE_AIX_SECURITY 1
4120 EOF
4121
4122
4123 else
4124   echo "$ac_t""no" 1>&6
4125 fi
4126
4127
4128
4129 for ac_func in getaddrinfo 
4130 do
4131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4132 echo "configure:4133: checking for $ac_func" >&5
4133 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 /* System header to define __stub macros and hopefully few prototypes,
4140     which can conflict with char $ac_func(); below.  */
4141 #include <assert.h>
4142 /* Override any gcc2 internal prototype to avoid an error.  */
4143 /* We use char because int might match the return type of a gcc2
4144     builtin and then its argument prototype would still apply.  */
4145 char $ac_func();
4146 char (*f)();
4147
4148 int main() {
4149
4150 /* The GNU C library defines this for functions which it implements
4151     to always fail with ENOSYS.  Some functions are actually named
4152     something starting with __ and the normal name is an alias.  */
4153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4154 choke me
4155 #else
4156 f = $ac_func;
4157 #endif
4158
4159 ; return 0; }
4160 EOF
4161 if { (eval echo configure:4162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4162   rm -rf conftest*
4163   eval "ac_cv_func_$ac_func=yes"
4164 else
4165   echo "configure: failed program was:" >&5
4166   cat conftest.$ac_ext >&5
4167   rm -rf conftest*
4168   eval "ac_cv_func_$ac_func=no"
4169 fi
4170 rm -f conftest*
4171 fi
4172
4173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4174   echo "$ac_t""yes" 1>&6
4175     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4176   cat >> confdefs.h <<EOF
4177 #define $ac_tr_func 1
4178 EOF
4179  
4180 else
4181   echo "$ac_t""no" 1>&6
4182 fi
4183 done
4184
4185
4186 if test $ac_cv_func_getaddrinfo = no ; then
4187         if test $ol_enable_ipv6 = yes ; then
4188                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4189         fi
4190         ol_enable_ipv6=no
4191 fi
4192
4193 if test $ol_enable_local != no ; then
4194         for ac_hdr in sys/un.h 
4195 do
4196 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4197 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4198 echo "configure:4199: checking for $ac_hdr" >&5
4199 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4200   echo $ac_n "(cached) $ac_c" 1>&6
4201 else
4202   cat > conftest.$ac_ext <<EOF
4203 #line 4204 "configure"
4204 #include "confdefs.h"
4205 #include <$ac_hdr>
4206 EOF
4207 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4208 { (eval echo configure:4209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4209 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4210 if test -z "$ac_err"; then
4211   rm -rf conftest*
4212   eval "ac_cv_header_$ac_safe=yes"
4213 else
4214   echo "$ac_err" >&5
4215   echo "configure: failed program was:" >&5
4216   cat conftest.$ac_ext >&5
4217   rm -rf conftest*
4218   eval "ac_cv_header_$ac_safe=no"
4219 fi
4220 rm -f conftest*
4221 fi
4222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4223   echo "$ac_t""yes" 1>&6
4224     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4225   cat >> confdefs.h <<EOF
4226 #define $ac_tr_hdr 1
4227 EOF
4228  
4229 else
4230   echo "$ac_t""no" 1>&6
4231 fi
4232 done
4233
4234
4235         if test $ol_enable_local = auto ; then
4236                 ol_enable_local=$ac_cv_header_sys_un_h
4237         elif test $ac_cv_header_sys_un_h = no ; then
4238                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
4239         fi
4240 fi
4241
4242 ol_link_modules=no
4243 if test $ol_enable_modules != no ; then
4244         for ac_hdr in ltdl.h
4245 do
4246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4248 echo "configure:4249: checking for $ac_hdr" >&5
4249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4250   echo $ac_n "(cached) $ac_c" 1>&6
4251 else
4252   cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 #include <$ac_hdr>
4256 EOF
4257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4258 { (eval echo configure:4259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4260 if test -z "$ac_err"; then
4261   rm -rf conftest*
4262   eval "ac_cv_header_$ac_safe=yes"
4263 else
4264   echo "$ac_err" >&5
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -rf conftest*
4268   eval "ac_cv_header_$ac_safe=no"
4269 fi
4270 rm -f conftest*
4271 fi
4272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4273   echo "$ac_t""yes" 1>&6
4274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4275   cat >> confdefs.h <<EOF
4276 #define $ac_tr_hdr 1
4277 EOF
4278  
4279 else
4280   echo "$ac_t""no" 1>&6
4281 fi
4282 done
4283
4284
4285         if test $ac_cv_header_ltdl_h = no ; then
4286                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4287         fi
4288
4289         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4290 echo "configure:4291: checking for lt_dlinit in -lltdl" >&5
4291 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4292 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4293   echo $ac_n "(cached) $ac_c" 1>&6
4294 else
4295   ac_save_LIBS="$LIBS"
4296 LIBS="-lltdl  $LIBS"
4297 cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300 /* Override any gcc2 internal prototype to avoid an error.  */
4301 /* We use char because int might match the return type of a gcc2
4302     builtin and then its argument prototype would still apply.  */
4303 char lt_dlinit();
4304
4305 int main() {
4306 lt_dlinit()
4307 ; return 0; }
4308 EOF
4309 if { (eval echo configure:4310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4310   rm -rf conftest*
4311   eval "ac_cv_lib_$ac_lib_var=yes"
4312 else
4313   echo "configure: failed program was:" >&5
4314   cat conftest.$ac_ext >&5
4315   rm -rf conftest*
4316   eval "ac_cv_lib_$ac_lib_var=no"
4317 fi
4318 rm -f conftest*
4319 LIBS="$ac_save_LIBS"
4320
4321 fi
4322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4323   echo "$ac_t""yes" 1>&6
4324   
4325             MODULES_LIBS=-lltdl
4326             cat >> confdefs.h <<\EOF
4327 #define HAVE_LIBLTDL 1
4328 EOF
4329
4330         
4331 else
4332   echo "$ac_t""no" 1>&6
4333 fi
4334
4335
4336         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4337                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4338         fi
4339         ol_link_modules=yes
4340 else
4341         ol_with_dnssrv_module=static
4342         ol_with_ldap_module=static
4343         ol_with_ldbm_module=static
4344         ol_with_passwd_module=static
4345         ol_with_perl_module=static
4346         ol_with_shell_module=static
4347         ol_with_tcl_module=static
4348         ol_with_sql_module=static
4349 fi
4350
4351 # test for EBCDIC
4352 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4353 echo "configure:4354: checking for EBCDIC" >&5
4354 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4355   echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357   
4358         cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361
4362 #if !('M' == 0xd4)
4363 #include <__ASCII__/generate_error.h>
4364 #endif
4365
4366 EOF
4367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4368 { (eval echo configure:4369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4370 if test -z "$ac_err"; then
4371   rm -rf conftest*
4372   ol_cv_cpp_ebcdic=yes
4373 else
4374   echo "$ac_err" >&5
4375   echo "configure: failed program was:" >&5
4376   cat conftest.$ac_ext >&5
4377   rm -rf conftest*
4378   ol_cv_cpp_ebcdic=no
4379 fi
4380 rm -f conftest*
4381 fi
4382
4383 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4384 if test $ol_cv_cpp_ebcdic = yes ; then
4385         cat >> confdefs.h <<\EOF
4386 #define HAVE_EBCDIC 1
4387 EOF
4388
4389 fi
4390
4391 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4392 echo "configure:4393: checking for ANSI C header files" >&5
4393 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4394   echo $ac_n "(cached) $ac_c" 1>&6
4395 else
4396   cat > conftest.$ac_ext <<EOF
4397 #line 4398 "configure"
4398 #include "confdefs.h"
4399 #include <stdlib.h>
4400 #include <stdarg.h>
4401 #include <string.h>
4402 #include <float.h>
4403 EOF
4404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4405 { (eval echo configure:4406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4407 if test -z "$ac_err"; then
4408   rm -rf conftest*
4409   ol_cv_header_stdc=yes
4410 else
4411   echo "$ac_err" >&5
4412   echo "configure: failed program was:" >&5
4413   cat conftest.$ac_ext >&5
4414   rm -rf conftest*
4415   ol_cv_header_stdc=no
4416 fi
4417 rm -f conftest*
4418
4419 if test $ol_cv_header_stdc = yes; then
4420   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4421 cat > conftest.$ac_ext <<EOF
4422 #line 4423 "configure"
4423 #include "confdefs.h"
4424 #include <string.h>
4425 EOF
4426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4427   egrep "memchr" >/dev/null 2>&1; then
4428   :
4429 else
4430   rm -rf conftest*
4431   ol_cv_header_stdc=no
4432 fi
4433 rm -f conftest*
4434
4435 fi
4436
4437 if test $ol_cv_header_stdc = yes; then
4438   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4439 cat > conftest.$ac_ext <<EOF
4440 #line 4441 "configure"
4441 #include "confdefs.h"
4442 #include <stdlib.h>
4443 EOF
4444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4445   egrep "free" >/dev/null 2>&1; then
4446   :
4447 else
4448   rm -rf conftest*
4449   ol_cv_header_stdc=no
4450 fi
4451 rm -f conftest*
4452
4453 fi
4454
4455 if test $ol_cv_header_stdc = yes; then
4456   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4457 if test "$cross_compiling" = yes; then
4458   :
4459 else
4460   cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 #include <ctype.h>
4464 #ifndef HAVE_EBCDIC
4465 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4466 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4467 #else
4468 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4469                 || ('j' <= (c) && (c) <= 'r') \
4470                 || ('s' <= (c) && (c) <= 'z'))
4471 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4472 #endif
4473 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4474 int main () { int i; for (i = 0; i < 256; i++)
4475 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4476 exit (0); }
4477
4478 EOF
4479 if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4480 then
4481   :
4482 else
4483   echo "configure: failed program was:" >&5
4484   cat conftest.$ac_ext >&5
4485   rm -fr conftest*
4486   ol_cv_header_stdc=no
4487 fi
4488 rm -fr conftest*
4489 fi
4490
4491 fi
4492 fi
4493
4494 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4495 if test $ol_cv_header_stdc = yes; then
4496   cat >> confdefs.h <<\EOF
4497 #define STDC_HEADERS 1
4498 EOF
4499
4500 fi
4501 ac_cv_header_stdc=disable
4502
4503
4504 if test $ol_cv_header_stdc != yes; then
4505         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4506 fi
4507
4508 ac_header_dirent=no
4509 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4510 do
4511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4512 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4513 echo "configure:4514: checking for $ac_hdr that defines DIR" >&5
4514 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4515   echo $ac_n "(cached) $ac_c" 1>&6
4516 else
4517   cat > conftest.$ac_ext <<EOF
4518 #line 4519 "configure"
4519 #include "confdefs.h"
4520 #include <sys/types.h>
4521 #include <$ac_hdr>
4522 int main() {
4523 DIR *dirp = 0;
4524 ; return 0; }
4525 EOF
4526 if { (eval echo configure:4527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4527   rm -rf conftest*
4528   eval "ac_cv_header_dirent_$ac_safe=yes"
4529 else
4530   echo "configure: failed program was:" >&5
4531   cat conftest.$ac_ext >&5
4532   rm -rf conftest*
4533   eval "ac_cv_header_dirent_$ac_safe=no"
4534 fi
4535 rm -f conftest*
4536 fi
4537 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4538   echo "$ac_t""yes" 1>&6
4539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4540   cat >> confdefs.h <<EOF
4541 #define $ac_tr_hdr 1
4542 EOF
4543  ac_header_dirent=$ac_hdr; break
4544 else
4545   echo "$ac_t""no" 1>&6
4546 fi
4547 done
4548 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4549 if test $ac_header_dirent = dirent.h; then
4550 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4551 echo "configure:4552: checking for opendir in -ldir" >&5
4552 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4554   echo $ac_n "(cached) $ac_c" 1>&6
4555 else
4556   ac_save_LIBS="$LIBS"
4557 LIBS="-ldir  $LIBS"
4558 cat > conftest.$ac_ext <<EOF
4559 #line 4560 "configure"
4560 #include "confdefs.h"
4561 /* Override any gcc2 internal prototype to avoid an error.  */
4562 /* We use char because int might match the return type of a gcc2
4563     builtin and then its argument prototype would still apply.  */
4564 char opendir();
4565
4566 int main() {
4567 opendir()
4568 ; return 0; }
4569 EOF
4570 if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4571   rm -rf conftest*
4572   eval "ac_cv_lib_$ac_lib_var=yes"
4573 else
4574   echo "configure: failed program was:" >&5
4575   cat conftest.$ac_ext >&5
4576   rm -rf conftest*
4577   eval "ac_cv_lib_$ac_lib_var=no"
4578 fi
4579 rm -f conftest*
4580 LIBS="$ac_save_LIBS"
4581
4582 fi
4583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4584   echo "$ac_t""yes" 1>&6
4585   LIBS="$LIBS -ldir"
4586 else
4587   echo "$ac_t""no" 1>&6
4588 fi
4589
4590 else
4591 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4592 echo "configure:4593: checking for opendir in -lx" >&5
4593 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   ac_save_LIBS="$LIBS"
4598 LIBS="-lx  $LIBS"
4599 cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 /* Override any gcc2 internal prototype to avoid an error.  */
4603 /* We use char because int might match the return type of a gcc2
4604     builtin and then its argument prototype would still apply.  */
4605 char opendir();
4606
4607 int main() {
4608 opendir()
4609 ; return 0; }
4610 EOF
4611 if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4612   rm -rf conftest*
4613   eval "ac_cv_lib_$ac_lib_var=yes"
4614 else
4615   echo "configure: failed program was:" >&5
4616   cat conftest.$ac_ext >&5
4617   rm -rf conftest*
4618   eval "ac_cv_lib_$ac_lib_var=no"
4619 fi
4620 rm -f conftest*
4621 LIBS="$ac_save_LIBS"
4622
4623 fi
4624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4625   echo "$ac_t""yes" 1>&6
4626   LIBS="$LIBS -lx"
4627 else
4628   echo "$ac_t""no" 1>&6
4629 fi
4630
4631 fi
4632
4633 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4634 echo "configure:4635: checking for sys/wait.h that is POSIX.1 compatible" >&5
4635 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4636   echo $ac_n "(cached) $ac_c" 1>&6
4637 else
4638   cat > conftest.$ac_ext <<EOF
4639 #line 4640 "configure"
4640 #include "confdefs.h"
4641 #include <sys/types.h>
4642 #include <sys/wait.h>
4643 #ifndef WEXITSTATUS
4644 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4645 #endif
4646 #ifndef WIFEXITED
4647 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4648 #endif
4649 int main() {
4650 int s;
4651 wait (&s);
4652 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4656   rm -rf conftest*
4657   ac_cv_header_sys_wait_h=yes
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   ac_cv_header_sys_wait_h=no
4663 fi
4664 rm -f conftest*
4665 fi
4666
4667 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4668 if test $ac_cv_header_sys_wait_h = yes; then
4669   cat >> confdefs.h <<\EOF
4670 #define HAVE_SYS_WAIT_H 1
4671 EOF
4672
4673 fi
4674
4675 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4676 echo "configure:4677: checking POSIX termios" >&5
4677 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4678   echo $ac_n "(cached) $ac_c" 1>&6
4679 else
4680   cat > conftest.$ac_ext <<EOF
4681 #line 4682 "configure"
4682 #include "confdefs.h"
4683 #include <sys/types.h>
4684 #include <unistd.h>
4685 #include <termios.h>
4686 int main() {
4687 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4688    tcgetattr(0, 0);
4689 ; return 0; }
4690 EOF
4691 if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4692   rm -rf conftest*
4693   am_cv_sys_posix_termios=yes
4694 else
4695   echo "configure: failed program was:" >&5
4696   cat conftest.$ac_ext >&5
4697   rm -rf conftest*
4698   am_cv_sys_posix_termios=no
4699 fi
4700 rm -f conftest*
4701 fi
4702
4703 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4704
4705
4706  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4707 echo "configure:4708: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4708 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4709   echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4712
4713   gwinsz_in_termios_h=no
4714   if test $am_cv_sys_posix_termios = yes; then
4715     cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 #include <sys/types.h>
4719 #     include <termios.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   gwinsz_in_termios_h=yes
4729 fi
4730 rm -f conftest*
4731
4732   fi
4733
4734   if test $gwinsz_in_termios_h = no; then
4735     cat > conftest.$ac_ext <<EOF
4736 #line 4737 "configure"
4737 #include "confdefs.h"
4738 #include <sys/types.h>
4739 #     include <sys/ioctl.h>
4740 #     ifdef TIOCGWINSZ
4741         yes
4742 #     endif
4743     
4744 EOF
4745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4746   egrep "yes" >/dev/null 2>&1; then
4747   rm -rf conftest*
4748   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4749 fi
4750 rm -f conftest*
4751
4752   fi
4753   
4754 fi
4755
4756 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4757   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4758     cat >> confdefs.h <<\EOF
4759 #define GWINSZ_IN_SYS_IOCTL 1
4760 EOF
4761
4762   fi
4763
4764 if test $am_cv_sys_posix_termios = yes ; then
4765         cat >> confdefs.h <<\EOF
4766 #define HAVE_POSIX_TERMIOS 1
4767 EOF
4768
4769 fi
4770
4771 for ac_hdr in \
4772         arpa/inet.h             \
4773         arpa/nameser.h  \
4774         assert.h                \
4775         conio.h                 \
4776         crypt.h                 \
4777         direct.h                \
4778         errno.h                 \
4779         fcntl.h                 \
4780         filio.h                 \
4781         getopt.h                \
4782         grp.h                   \
4783         io.h                    \
4784         libutil.h               \
4785         limits.h                \
4786         locale.h                \
4787         netinet/tcp.h   \
4788         malloc.h                \
4789         memory.h                \
4790         psap.h                  \
4791         pwd.h                   \
4792         process.h               \
4793         resolv.h                \
4794         sgtty.h                 \
4795         shadow.h                \
4796         stddef.h                \
4797         string.h                \
4798         strings.h               \
4799         sysexits.h              \
4800         sys/file.h              \
4801         sys/filio.h             \
4802         sys/errno.h             \
4803         sys/ioctl.h             \
4804         sys/param.h             \
4805         sys/resource.h  \
4806         sys/select.h    \
4807         sys/socket.h    \
4808         sys/syslog.h    \
4809         sys/time.h              \
4810         sys/types.h             \
4811         syslog.h                \
4812         termios.h               \
4813         unistd.h                \
4814         winsock.h               \
4815
4816 do
4817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4819 echo "configure:4820: checking for $ac_hdr" >&5
4820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4821   echo $ac_n "(cached) $ac_c" 1>&6
4822 else
4823   cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826 #include <$ac_hdr>
4827 EOF
4828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4829 { (eval echo configure:4830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4831 if test -z "$ac_err"; then
4832   rm -rf conftest*
4833   eval "ac_cv_header_$ac_safe=yes"
4834 else
4835   echo "$ac_err" >&5
4836   echo "configure: failed program was:" >&5
4837   cat conftest.$ac_ext >&5
4838   rm -rf conftest*
4839   eval "ac_cv_header_$ac_safe=no"
4840 fi
4841 rm -f conftest*
4842 fi
4843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4844   echo "$ac_t""yes" 1>&6
4845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4846   cat >> confdefs.h <<EOF
4847 #define $ac_tr_hdr 1
4848 EOF
4849  
4850 else
4851   echo "$ac_t""no" 1>&6
4852 fi
4853 done
4854
4855
4856
4857
4858 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4859 echo "configure:4860: checking for sigset in -lV3" >&5
4860 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4861 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4862   echo $ac_n "(cached) $ac_c" 1>&6
4863 else
4864   ac_save_LIBS="$LIBS"
4865 LIBS="-lV3  $LIBS"
4866 cat > conftest.$ac_ext <<EOF
4867 #line 4868 "configure"
4868 #include "confdefs.h"
4869 /* Override any gcc2 internal prototype to avoid an error.  */
4870 /* We use char because int might match the return type of a gcc2
4871     builtin and then its argument prototype would still apply.  */
4872 char sigset();
4873
4874 int main() {
4875 sigset()
4876 ; return 0; }
4877 EOF
4878 if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4879   rm -rf conftest*
4880   eval "ac_cv_lib_$ac_lib_var=yes"
4881 else
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884   rm -rf conftest*
4885   eval "ac_cv_lib_$ac_lib_var=no"
4886 fi
4887 rm -f conftest*
4888 LIBS="$ac_save_LIBS"
4889
4890 fi
4891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4892   echo "$ac_t""yes" 1>&6
4893     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4894     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4895   cat >> confdefs.h <<EOF
4896 #define $ac_tr_lib 1
4897 EOF
4898
4899   LIBS="-lV3 $LIBS"
4900
4901 else
4902   echo "$ac_t""no" 1>&6
4903 fi
4904
4905
4906 if test $ac_cv_header_winsock_h = yes; then
4907         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4908 echo "configure:4909: checking for winsock" >&5
4909 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4910   echo $ac_n "(cached) $ac_c" 1>&6
4911 else
4912   cat > conftest.$ac_ext <<EOF
4913 #line 4914 "configure"
4914 #include "confdefs.h"
4915 #include <winsock.h>
4916 int main() {
4917
4918                         socket(0,0,0);
4919                         select(0,NULL,NULL,NULL,NULL);
4920                         closesocket(0);
4921                         gethostname(NULL,0);
4922         
4923 ; return 0; }
4924 EOF
4925 if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4926   rm -rf conftest*
4927   ol_cv_winsock=yes
4928 else
4929   echo "configure: failed program was:" >&5
4930   cat conftest.$ac_ext >&5
4931   rm -rf conftest*
4932   ol_cv_winsock=no
4933 fi
4934 rm -f conftest*]
4935 fi
4936
4937 echo "$ac_t""$ol_cv_winsock" 1>&6
4938
4939         if test $ol_cv_winsock = yes ; then
4940                 cat >> confdefs.h <<\EOF
4941 #define HAVE_WINSOCK 1
4942 EOF
4943
4944                 ac_cv_func_socket=yes
4945                 ac_cv_func_select=yes
4946                 ac_cv_func_closesocket=yes
4947                 ac_cv_func_gethostname=yes
4948         fi
4949 fi
4950
4951
4952 echo $ac_n "checking for socket""... $ac_c" 1>&6
4953 echo "configure:4954: checking for socket" >&5
4954 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4955   echo $ac_n "(cached) $ac_c" 1>&6
4956 else
4957   cat > conftest.$ac_ext <<EOF
4958 #line 4959 "configure"
4959 #include "confdefs.h"
4960 /* System header to define __stub macros and hopefully few prototypes,
4961     which can conflict with char socket(); below.  */
4962 #include <assert.h>
4963 /* Override any gcc2 internal prototype to avoid an error.  */
4964 /* We use char because int might match the return type of a gcc2
4965     builtin and then its argument prototype would still apply.  */
4966 char socket();
4967 char (*f)();
4968
4969 int main() {
4970
4971 /* The GNU C library defines this for functions which it implements
4972     to always fail with ENOSYS.  Some functions are actually named
4973     something starting with __ and the normal name is an alias.  */
4974 #if defined (__stub_socket) || defined (__stub___socket)
4975 choke me
4976 #else
4977 f = socket;
4978 #endif
4979
4980 ; return 0; }
4981 EOF
4982 if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4983   rm -rf conftest*
4984   eval "ac_cv_func_socket=yes"
4985 else
4986   echo "configure: failed program was:" >&5
4987   cat conftest.$ac_ext >&5
4988   rm -rf conftest*
4989   eval "ac_cv_func_socket=no"
4990 fi
4991 rm -f conftest*
4992 fi
4993
4994 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4995   echo "$ac_t""yes" 1>&6
4996   :
4997 else
4998   echo "$ac_t""no" 1>&6
4999         
5000         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5001 echo "configure:5002: checking for main in -lsocket" >&5
5002 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5004   echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006   ac_save_LIBS="$LIBS"
5007 LIBS="-lsocket  $LIBS"
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011
5012 int main() {
5013 main()
5014 ; return 0; }
5015 EOF
5016 if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5017   rm -rf conftest*
5018   eval "ac_cv_lib_$ac_lib_var=yes"
5019 else
5020   echo "configure: failed program was:" >&5
5021   cat conftest.$ac_ext >&5
5022   rm -rf conftest*
5023   eval "ac_cv_lib_$ac_lib_var=no"
5024 fi
5025 rm -f conftest*
5026 LIBS="$ac_save_LIBS"
5027
5028 fi
5029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5030   echo "$ac_t""yes" 1>&6
5031     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5032     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5033   cat >> confdefs.h <<EOF
5034 #define $ac_tr_lib 1
5035 EOF
5036
5037   LIBS="-lsocket $LIBS"
5038
5039 else
5040   echo "$ac_t""no" 1>&6
5041 fi
5042
5043         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5044 echo "configure:5045: checking for main in -lnet" >&5
5045 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5047   echo $ac_n "(cached) $ac_c" 1>&6
5048 else
5049   ac_save_LIBS="$LIBS"
5050 LIBS="-lnet  $LIBS"
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054
5055 int main() {
5056 main()
5057 ; return 0; }
5058 EOF
5059 if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5060   rm -rf conftest*
5061   eval "ac_cv_lib_$ac_lib_var=yes"
5062 else
5063   echo "configure: failed program was:" >&5
5064   cat conftest.$ac_ext >&5
5065   rm -rf conftest*
5066   eval "ac_cv_lib_$ac_lib_var=no"
5067 fi
5068 rm -f conftest*
5069 LIBS="$ac_save_LIBS"
5070
5071 fi
5072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5073   echo "$ac_t""yes" 1>&6
5074     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5075     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5076   cat >> confdefs.h <<EOF
5077 #define $ac_tr_lib 1
5078 EOF
5079
5080   LIBS="-lnet $LIBS"
5081
5082 else
5083   echo "$ac_t""no" 1>&6
5084 fi
5085
5086         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5087 echo "configure:5088: checking for main in -lnsl_s" >&5
5088 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5090   echo $ac_n "(cached) $ac_c" 1>&6
5091 else
5092   ac_save_LIBS="$LIBS"
5093 LIBS="-lnsl_s  $LIBS"
5094 cat > conftest.$ac_ext <<EOF
5095 #line 5096 "configure"
5096 #include "confdefs.h"
5097
5098 int main() {
5099 main()
5100 ; return 0; }
5101 EOF
5102 if { (eval echo configure:5103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5103   rm -rf conftest*
5104   eval "ac_cv_lib_$ac_lib_var=yes"
5105 else
5106   echo "configure: failed program was:" >&5
5107   cat conftest.$ac_ext >&5
5108   rm -rf conftest*
5109   eval "ac_cv_lib_$ac_lib_var=no"
5110 fi
5111 rm -f conftest*
5112 LIBS="$ac_save_LIBS"
5113
5114 fi
5115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5116   echo "$ac_t""yes" 1>&6
5117     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5118     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5119   cat >> confdefs.h <<EOF
5120 #define $ac_tr_lib 1
5121 EOF
5122
5123   LIBS="-lnsl_s $LIBS"
5124
5125 else
5126   echo "$ac_t""no" 1>&6
5127 fi
5128
5129         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5130 echo "configure:5131: checking for main in -lnsl" >&5
5131 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5133   echo $ac_n "(cached) $ac_c" 1>&6
5134 else
5135   ac_save_LIBS="$LIBS"
5136 LIBS="-lnsl  $LIBS"
5137 cat > conftest.$ac_ext <<EOF
5138 #line 5139 "configure"
5139 #include "confdefs.h"
5140
5141 int main() {
5142 main()
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   eval "ac_cv_lib_$ac_lib_var=yes"
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=no"
5153 fi
5154 rm -f conftest*
5155 LIBS="$ac_save_LIBS"
5156
5157 fi
5158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5159   echo "$ac_t""yes" 1>&6
5160     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5162   cat >> confdefs.h <<EOF
5163 #define $ac_tr_lib 1
5164 EOF
5165
5166   LIBS="-lnsl $LIBS"
5167
5168 else
5169   echo "$ac_t""no" 1>&6
5170 fi
5171
5172         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5173 echo "configure:5174: checking for socket in -linet" >&5
5174 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5175 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5176   echo $ac_n "(cached) $ac_c" 1>&6
5177 else
5178   ac_save_LIBS="$LIBS"
5179 LIBS="-linet  $LIBS"
5180 cat > conftest.$ac_ext <<EOF
5181 #line 5182 "configure"
5182 #include "confdefs.h"
5183 /* Override any gcc2 internal prototype to avoid an error.  */
5184 /* We use char because int might match the return type of a gcc2
5185     builtin and then its argument prototype would still apply.  */
5186 char socket();
5187
5188 int main() {
5189 socket()
5190 ; return 0; }
5191 EOF
5192 if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5193   rm -rf conftest*
5194   eval "ac_cv_lib_$ac_lib_var=yes"
5195 else
5196   echo "configure: failed program was:" >&5
5197   cat conftest.$ac_ext >&5
5198   rm -rf conftest*
5199   eval "ac_cv_lib_$ac_lib_var=no"
5200 fi
5201 rm -f conftest*
5202 LIBS="$ac_save_LIBS"
5203
5204 fi
5205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5206   echo "$ac_t""yes" 1>&6
5207     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5208     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5209   cat >> confdefs.h <<EOF
5210 #define $ac_tr_lib 1
5211 EOF
5212
5213   LIBS="-linet $LIBS"
5214
5215 else
5216   echo "$ac_t""no" 1>&6
5217 fi
5218
5219         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5220 echo "configure:5221: checking for main in -lgen" >&5
5221 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225   ac_save_LIBS="$LIBS"
5226 LIBS="-lgen  $LIBS"
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230
5231 int main() {
5232 main()
5233 ; return 0; }
5234 EOF
5235 if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5236   rm -rf conftest*
5237   eval "ac_cv_lib_$ac_lib_var=yes"
5238 else
5239   echo "configure: failed program was:" >&5
5240   cat conftest.$ac_ext >&5
5241   rm -rf conftest*
5242   eval "ac_cv_lib_$ac_lib_var=no"
5243 fi
5244 rm -f conftest*
5245 LIBS="$ac_save_LIBS"
5246
5247 fi
5248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5249   echo "$ac_t""yes" 1>&6
5250     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5251     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5252   cat >> confdefs.h <<EOF
5253 #define $ac_tr_lib 1
5254 EOF
5255
5256   LIBS="-lgen $LIBS"
5257
5258 else
5259   echo "$ac_t""no" 1>&6
5260 fi
5261
5262
5263 fi
5264
5265
5266 echo $ac_n "checking for select""... $ac_c" 1>&6
5267 echo "configure:5268: checking for select" >&5
5268 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5269   echo $ac_n "(cached) $ac_c" 1>&6
5270 else
5271   cat > conftest.$ac_ext <<EOF
5272 #line 5273 "configure"
5273 #include "confdefs.h"
5274 /* System header to define __stub macros and hopefully few prototypes,
5275     which can conflict with char select(); below.  */
5276 #include <assert.h>
5277 /* Override any gcc2 internal prototype to avoid an error.  */
5278 /* We use char because int might match the return type of a gcc2
5279     builtin and then its argument prototype would still apply.  */
5280 char select();
5281 char (*f)();
5282
5283 int main() {
5284
5285 /* The GNU C library defines this for functions which it implements
5286     to always fail with ENOSYS.  Some functions are actually named
5287     something starting with __ and the normal name is an alias.  */
5288 #if defined (__stub_select) || defined (__stub___select)
5289 choke me
5290 #else
5291 f = select;
5292 #endif
5293
5294 ; return 0; }
5295 EOF
5296 if { (eval echo configure:5297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5297   rm -rf conftest*
5298   eval "ac_cv_func_select=yes"
5299 else
5300   echo "configure: failed program was:" >&5
5301   cat conftest.$ac_ext >&5
5302   rm -rf conftest*
5303   eval "ac_cv_func_select=no"
5304 fi
5305 rm -f conftest*
5306 fi
5307
5308 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5309   echo "$ac_t""yes" 1>&6
5310   :
5311 else
5312   echo "$ac_t""no" 1>&6
5313 { echo "configure: error: select() required." 1>&2; exit 1; }
5314 fi
5315
5316
5317 if test "${ac_cv_header_winsock_h}" != yes; then
5318                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5319 echo "configure:5320: checking types of arguments for select()" >&5
5320  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5321   echo $ac_n "(cached) $ac_c" 1>&6
5322 else
5323    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5324   echo $ac_n "(cached) $ac_c" 1>&6
5325 else
5326     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5327   echo $ac_n "(cached) $ac_c" 1>&6
5328 else
5329      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5330      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5331       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5332        cat > conftest.$ac_ext <<EOF
5333 #line 5334 "configure"
5334 #include "confdefs.h"
5335 #ifdef HAVE_SYS_TYPES_H
5336 #include <sys/types.h>
5337 #endif
5338 #ifdef HAVE_SYS_TIME_H
5339 #include <sys/time.h>
5340 #endif
5341 #ifdef HAVE_SYS_SELECT_H
5342 #include <sys/select.h>
5343 #endif
5344 #ifdef HAVE_SYS_SOCKET_H
5345 #include <sys/socket.h>
5346 #endif
5347 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);
5348 int main() {
5349
5350 ; return 0; }
5351 EOF
5352 if { (eval echo configure:5353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5353   rm -rf conftest*
5354           ac_not_found=no ; break 3
5355 else
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358   rm -rf conftest*
5359   ac_not_found=yes
5360 fi
5361 rm -f conftest*
5362       done
5363      done
5364     done
5365    
5366 fi
5367   
5368 fi
5369  
5370 fi
5371  if test "$ac_not_found" = yes; then
5372   ac_cv_func_select_arg1=int 
5373   ac_cv_func_select_arg234='int *' 
5374   ac_cv_func_select_arg5='struct timeval *'
5375  fi
5376  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5377  cat >> confdefs.h <<EOF
5378 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5379 EOF
5380
5381  cat >> confdefs.h <<EOF
5382 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5383 EOF
5384
5385  cat >> confdefs.h <<EOF
5386 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5387 EOF
5388
5389
5390 fi
5391
5392
5393 for ac_hdr in regex.h 
5394 do
5395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5397 echo "configure:5398: checking for $ac_hdr" >&5
5398 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5399   echo $ac_n "(cached) $ac_c" 1>&6
5400 else
5401   cat > conftest.$ac_ext <<EOF
5402 #line 5403 "configure"
5403 #include "confdefs.h"
5404 #include <$ac_hdr>
5405 EOF
5406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5407 { (eval echo configure:5408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5409 if test -z "$ac_err"; then
5410   rm -rf conftest*
5411   eval "ac_cv_header_$ac_safe=yes"
5412 else
5413   echo "$ac_err" >&5
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_header_$ac_safe=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5422   echo "$ac_t""yes" 1>&6
5423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5424   cat >> confdefs.h <<EOF
5425 #define $ac_tr_hdr 1
5426 EOF
5427  
5428 else
5429   echo "$ac_t""no" 1>&6
5430 fi
5431 done
5432
5433 if test "$ac_cv_header_regex_h" != yes ; then
5434         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5435 fi
5436 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5437 echo "configure:5438: checking for regfree" >&5
5438 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5439   echo $ac_n "(cached) $ac_c" 1>&6
5440 else
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444 /* System header to define __stub macros and hopefully few prototypes,
5445     which can conflict with char regfree(); below.  */
5446 #include <assert.h>
5447 /* Override any gcc2 internal prototype to avoid an error.  */
5448 /* We use char because int might match the return type of a gcc2
5449     builtin and then its argument prototype would still apply.  */
5450 char regfree();
5451 char (*f)();
5452
5453 int main() {
5454
5455 /* The GNU C library defines this for functions which it implements
5456     to always fail with ENOSYS.  Some functions are actually named
5457     something starting with __ and the normal name is an alias.  */
5458 #if defined (__stub_regfree) || defined (__stub___regfree)
5459 choke me
5460 #else
5461 f = regfree;
5462 #endif
5463
5464 ; return 0; }
5465 EOF
5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5467   rm -rf conftest*
5468   eval "ac_cv_func_regfree=yes"
5469 else
5470   echo "configure: failed program was:" >&5
5471   cat conftest.$ac_ext >&5
5472   rm -rf conftest*
5473   eval "ac_cv_func_regfree=no"
5474 fi
5475 rm -f conftest*
5476 fi
5477
5478 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5479   echo "$ac_t""yes" 1>&6
5480   :
5481 else
5482   echo "$ac_t""no" 1>&6
5483 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5484 fi
5485
5486
5487
5488 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5489 echo "configure:5490: checking for compatible POSIX regex" >&5
5490 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5491   echo $ac_n "(cached) $ac_c" 1>&6
5492 else
5493   
5494         if test "$cross_compiling" = yes; then
5495   ol_cv_c_posix_regex=cross
5496 else
5497   cat > conftest.$ac_ext <<EOF
5498 #line 5499 "configure"
5499 #include "confdefs.h"
5500
5501 #include <sys/types.h>
5502 #include <regex.h>
5503 static char *pattern, *string;
5504 main()
5505 {
5506         int rc;
5507         regex_t re;
5508
5509         pattern = "^A";
5510
5511         if(regcomp(&re, pattern, 0)) {
5512                 return -1;
5513         }
5514         
5515         string = "ALL MATCH";
5516         
5517         rc = regexec(&re, string, 0, (void*)0, 0);
5518
5519         regfree(&re);
5520
5521         return rc;
5522 }
5523 EOF
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5525 then
5526   ol_cv_c_posix_regex=yes
5527 else
5528   echo "configure: failed program was:" >&5
5529   cat conftest.$ac_ext >&5
5530   rm -fr conftest*
5531   ol_cv_c_posix_regex=no
5532 fi
5533 rm -fr conftest*
5534 fi
5535
5536 fi
5537
5538 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5539
5540 if test "$ol_cv_c_posix_regex" = no ; then
5541         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5542 fi
5543
5544 ol_link_dnssrv=no
5545 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5546 echo "configure:5547: checking for res_query" >&5
5547 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5548   echo $ac_n "(cached) $ac_c" 1>&6
5549 else
5550   cat > conftest.$ac_ext <<EOF
5551 #line 5552 "configure"
5552 #include "confdefs.h"
5553 /* System header to define __stub macros and hopefully few prototypes,
5554     which can conflict with char res_query(); below.  */
5555 #include <assert.h>
5556 /* Override any gcc2 internal prototype to avoid an error.  */
5557 /* We use char because int might match the return type of a gcc2
5558     builtin and then its argument prototype would still apply.  */
5559 char res_query();
5560 char (*f)();
5561
5562 int main() {
5563
5564 /* The GNU C library defines this for functions which it implements
5565     to always fail with ENOSYS.  Some functions are actually named
5566     something starting with __ and the normal name is an alias.  */
5567 #if defined (__stub_res_query) || defined (__stub___res_query)
5568 choke me
5569 #else
5570 f = res_query;
5571 #endif
5572
5573 ; return 0; }
5574 EOF
5575 if { (eval echo configure:5576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5576   rm -rf conftest*
5577   eval "ac_cv_func_res_query=yes"
5578 else
5579   echo "configure: failed program was:" >&5
5580   cat conftest.$ac_ext >&5
5581   rm -rf conftest*
5582   eval "ac_cv_func_res_query=no"
5583 fi
5584 rm -f conftest*
5585 fi
5586
5587 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5588   echo "$ac_t""yes" 1>&6
5589   :
5590 else
5591   echo "$ac_t""no" 1>&6
5592 fi
5593
5594 if test $ac_cv_func_res_query = no ; then 
5595         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5596 echo "configure:5597: checking for res_query in -lbind" >&5
5597 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5598 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5599   echo $ac_n "(cached) $ac_c" 1>&6
5600 else
5601   ac_save_LIBS="$LIBS"
5602 LIBS="-lbind  $LIBS"
5603 cat > conftest.$ac_ext <<EOF
5604 #line 5605 "configure"
5605 #include "confdefs.h"
5606 /* Override any gcc2 internal prototype to avoid an error.  */
5607 /* We use char because int might match the return type of a gcc2
5608     builtin and then its argument prototype would still apply.  */
5609 char res_query();
5610
5611 int main() {
5612 res_query()
5613 ; return 0; }
5614 EOF
5615 if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5616   rm -rf conftest*
5617   eval "ac_cv_lib_$ac_lib_var=yes"
5618 else
5619   echo "configure: failed program was:" >&5
5620   cat conftest.$ac_ext >&5
5621   rm -rf conftest*
5622   eval "ac_cv_lib_$ac_lib_var=no"
5623 fi
5624 rm -f conftest*
5625 LIBS="$ac_save_LIBS"
5626
5627 fi
5628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5629   echo "$ac_t""yes" 1>&6
5630     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5631     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5632   cat >> confdefs.h <<EOF
5633 #define $ac_tr_lib 1
5634 EOF
5635
5636   LIBS="-lbind $LIBS"
5637
5638 else
5639   echo "$ac_t""no" 1>&6
5640 fi
5641
5642         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5643 fi
5644
5645 if test $ac_cv_func_res_query = no ; then 
5646         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5647 echo "configure:5648: checking for __res_query in -lbind" >&5
5648 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5650   echo $ac_n "(cached) $ac_c" 1>&6
5651 else
5652   ac_save_LIBS="$LIBS"
5653 LIBS="-lbind  $LIBS"
5654 cat > conftest.$ac_ext <<EOF
5655 #line 5656 "configure"
5656 #include "confdefs.h"
5657 /* Override any gcc2 internal prototype to avoid an error.  */
5658 /* We use char because int might match the return type of a gcc2
5659     builtin and then its argument prototype would still apply.  */
5660 char __res_query();
5661
5662 int main() {
5663 __res_query()
5664 ; return 0; }
5665 EOF
5666 if { (eval echo configure:5667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=yes"
5669 else
5670   echo "configure: failed program was:" >&5
5671   cat conftest.$ac_ext >&5
5672   rm -rf conftest*
5673   eval "ac_cv_lib_$ac_lib_var=no"
5674 fi
5675 rm -f conftest*
5676 LIBS="$ac_save_LIBS"
5677
5678 fi
5679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5680   echo "$ac_t""yes" 1>&6
5681     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5682     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5683   cat >> confdefs.h <<EOF
5684 #define $ac_tr_lib 1
5685 EOF
5686
5687   LIBS="-lbind $LIBS"
5688
5689 else
5690   echo "$ac_t""no" 1>&6
5691 fi
5692
5693         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5694 fi
5695
5696 if test $ac_cv_func_res_query = no ; then 
5697         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5698 echo "configure:5699: checking for res_query in -lresolv" >&5
5699 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5700 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5701   echo $ac_n "(cached) $ac_c" 1>&6
5702 else
5703   ac_save_LIBS="$LIBS"
5704 LIBS="-lresolv  $LIBS"
5705 cat > conftest.$ac_ext <<EOF
5706 #line 5707 "configure"
5707 #include "confdefs.h"
5708 /* Override any gcc2 internal prototype to avoid an error.  */
5709 /* We use char because int might match the return type of a gcc2
5710     builtin and then its argument prototype would still apply.  */
5711 char res_query();
5712
5713 int main() {
5714 res_query()
5715 ; return 0; }
5716 EOF
5717 if { (eval echo configure:5718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5718   rm -rf conftest*
5719   eval "ac_cv_lib_$ac_lib_var=yes"
5720 else
5721   echo "configure: failed program was:" >&5
5722   cat conftest.$ac_ext >&5
5723   rm -rf conftest*
5724   eval "ac_cv_lib_$ac_lib_var=no"
5725 fi
5726 rm -f conftest*
5727 LIBS="$ac_save_LIBS"
5728
5729 fi
5730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5731   echo "$ac_t""yes" 1>&6
5732     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5733     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5734   cat >> confdefs.h <<EOF
5735 #define $ac_tr_lib 1
5736 EOF
5737
5738   LIBS="-lresolv $LIBS"
5739
5740 else
5741   echo "$ac_t""no" 1>&6
5742 fi
5743
5744         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5745 fi
5746
5747 if test "$ac_cv_func_res_query" = yes ; then
5748         cat >> confdefs.h <<\EOF
5749 #define HAVE_RES_QUERY 1
5750 EOF
5751
5752
5753         if test $ol_enable_dnssrv != no ; then
5754                 ol_link_dnssrv=yes
5755         fi
5756 fi
5757
5758 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5759         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5760 fi
5761
5762 ol_link_kbind=no
5763 ol_link_kpasswd=no
5764 ol_link_krb5=no
5765 ol_link_krb4=no
5766
5767 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5768         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5769         -o $ol_with_kerberos = k425 ; then
5770
5771         for ac_hdr in krb5.h
5772 do
5773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5775 echo "configure:5776: checking for $ac_hdr" >&5
5776 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5777   echo $ac_n "(cached) $ac_c" 1>&6
5778 else
5779   cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782 #include <$ac_hdr>
5783 EOF
5784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5785 { (eval echo configure:5786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5787 if test -z "$ac_err"; then
5788   rm -rf conftest*
5789   eval "ac_cv_header_$ac_safe=yes"
5790 else
5791   echo "$ac_err" >&5
5792   echo "configure: failed program was:" >&5
5793   cat conftest.$ac_ext >&5
5794   rm -rf conftest*
5795   eval "ac_cv_header_$ac_safe=no"
5796 fi
5797 rm -f conftest*
5798 fi
5799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5800   echo "$ac_t""yes" 1>&6
5801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5802   cat >> confdefs.h <<EOF
5803 #define $ac_tr_hdr 1
5804 EOF
5805  
5806 else
5807   echo "$ac_t""no" 1>&6
5808 fi
5809 done
5810
5811
5812         if test $ac_cv_header_krb5_h = yes ; then
5813                                 for ac_hdr in heim_err.h
5814 do
5815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5817 echo "configure:5818: checking for $ac_hdr" >&5
5818 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5819   echo $ac_n "(cached) $ac_c" 1>&6
5820 else
5821   cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 #include <$ac_hdr>
5825 EOF
5826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5827 { (eval echo configure:5828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5829 if test -z "$ac_err"; then
5830   rm -rf conftest*
5831   eval "ac_cv_header_$ac_safe=yes"
5832 else
5833   echo "$ac_err" >&5
5834   echo "configure: failed program was:" >&5
5835   cat conftest.$ac_ext >&5
5836   rm -rf conftest*
5837   eval "ac_cv_header_$ac_safe=no"
5838 fi
5839 rm -f conftest*
5840 fi
5841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5842   echo "$ac_t""yes" 1>&6
5843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5844   cat >> confdefs.h <<EOF
5845 #define $ac_tr_hdr 1
5846 EOF
5847  
5848 else
5849   echo "$ac_t""no" 1>&6
5850 fi
5851 done
5852
5853                 if test $ac_cv_header_heim_err_h = yes ; then
5854                         krb5_impl=heimdal
5855                 else
5856                         krb5_impl=mit
5857                 fi
5858
5859                 if test $krb5_impl = mit; then
5860                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5861 echo "configure:5862: checking for main in -lkrb5" >&5
5862 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5863 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5864   echo $ac_n "(cached) $ac_c" 1>&6
5865 else
5866   ac_save_LIBS="$LIBS"
5867 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5868 cat > conftest.$ac_ext <<EOF
5869 #line 5870 "configure"
5870 #include "confdefs.h"
5871
5872 int main() {
5873 main()
5874 ; return 0; }
5875 EOF
5876 if { (eval echo configure:5877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5877   rm -rf conftest*
5878   eval "ac_cv_lib_$ac_lib_var=yes"
5879 else
5880   echo "configure: failed program was:" >&5
5881   cat conftest.$ac_ext >&5
5882   rm -rf conftest*
5883   eval "ac_cv_lib_$ac_lib_var=no"
5884 fi
5885 rm -f conftest*
5886 LIBS="$ac_save_LIBS"
5887
5888 fi
5889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5890   echo "$ac_t""yes" 1>&6
5891   have_krb5=yes
5892                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5893 else
5894   echo "$ac_t""no" 1>&6
5895 have_krb5=no
5896 fi
5897
5898
5899                 elif test $krb5_impl = heimdal; then
5900                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5901 echo "configure:5902: checking for main in -lkrb5" >&5
5902 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5903 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5904   echo $ac_n "(cached) $ac_c" 1>&6
5905 else
5906   ac_save_LIBS="$LIBS"
5907 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5908 cat > conftest.$ac_ext <<EOF
5909 #line 5910 "configure"
5910 #include "confdefs.h"
5911
5912 int main() {
5913 main()
5914 ; return 0; }
5915 EOF
5916 if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=yes"
5919 else
5920   echo "configure: failed program was:" >&5
5921   cat conftest.$ac_ext >&5
5922   rm -rf conftest*
5923   eval "ac_cv_lib_$ac_lib_var=no"
5924 fi
5925 rm -f conftest*
5926 LIBS="$ac_save_LIBS"
5927
5928 fi
5929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5930   echo "$ac_t""yes" 1>&6
5931   have_krb5=yes
5932                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5933 else
5934   echo "$ac_t""no" 1>&6
5935 have_krb5=no
5936 fi
5937
5938
5939                         cat >> confdefs.h <<\EOF
5940 #define HAVE_HEIMDAL_KERBEROS 1
5941 EOF
5942
5943                 else
5944                         have_krb5=no
5945                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5946                 fi
5947
5948                 if test $have_krb5 = yes ; then
5949                         ol_link_krb5=yes
5950
5951                         cat >> confdefs.h <<\EOF
5952 #define HAVE_KRB5 1
5953 EOF
5954
5955
5956                         if test $ol_enable_kpasswd != no ; then
5957                                 ol_link_kpasswd=yes;
5958                         fi
5959
5960                         if test $ol_with_kerberos = k5only ; then
5961                                 ol_with_kerberos=found
5962                         fi
5963
5964                 elif test $ol_with_kerberos != auto ; then
5965                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5966                 fi
5967
5968         fi
5969 fi
5970
5971 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
5972         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5973
5974         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5975 do
5976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5978 echo "configure:5979: checking for $ac_hdr" >&5
5979 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5980   echo $ac_n "(cached) $ac_c" 1>&6
5981 else
5982   cat > conftest.$ac_ext <<EOF
5983 #line 5984 "configure"
5984 #include "confdefs.h"
5985 #include <$ac_hdr>
5986 EOF
5987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5988 { (eval echo configure:5989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5990 if test -z "$ac_err"; then
5991   rm -rf conftest*
5992   eval "ac_cv_header_$ac_safe=yes"
5993 else
5994   echo "$ac_err" >&5
5995   echo "configure: failed program was:" >&5
5996   cat conftest.$ac_ext >&5
5997   rm -rf conftest*
5998   eval "ac_cv_header_$ac_safe=no"
5999 fi
6000 rm -f conftest*
6001 fi
6002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6003   echo "$ac_t""yes" 1>&6
6004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6005   cat >> confdefs.h <<EOF
6006 #define $ac_tr_hdr 1
6007 EOF
6008  
6009 else
6010   echo "$ac_t""no" 1>&6
6011 fi
6012 done
6013
6014
6015         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6016                 if test $krb5_impl = mit; then
6017                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6018 echo "configure:6019: checking for main in -lkrb4" >&5
6019 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6020 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6021   echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023   ac_save_LIBS="$LIBS"
6024 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6025 cat > conftest.$ac_ext <<EOF
6026 #line 6027 "configure"
6027 #include "confdefs.h"
6028
6029 int main() {
6030 main()
6031 ; return 0; }
6032 EOF
6033 if { (eval echo configure:6034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6034   rm -rf conftest*
6035   eval "ac_cv_lib_$ac_lib_var=yes"
6036 else
6037   echo "configure: failed program was:" >&5
6038   cat conftest.$ac_ext >&5
6039   rm -rf conftest*
6040   eval "ac_cv_lib_$ac_lib_var=no"
6041 fi
6042 rm -f conftest*
6043 LIBS="$ac_save_LIBS"
6044
6045 fi
6046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6047   echo "$ac_t""yes" 1>&6
6048   have_k425=yes
6049                                 KRB4_LIBS="-lkrb4 -ldes425"
6050 else
6051   echo "$ac_t""no" 1>&6
6052 have_k425=no
6053 fi
6054
6055
6056                 elif test $krb5_impl = heimdal; then
6057                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6058 echo "configure:6059: checking for main in -lkrb4" >&5
6059 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6061   echo $ac_n "(cached) $ac_c" 1>&6
6062 else
6063   ac_save_LIBS="$LIBS"
6064 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6065 cat > conftest.$ac_ext <<EOF
6066 #line 6067 "configure"
6067 #include "confdefs.h"
6068
6069 int main() {
6070 main()
6071 ; return 0; }
6072 EOF
6073 if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6074   rm -rf conftest*
6075   eval "ac_cv_lib_$ac_lib_var=yes"
6076 else
6077   echo "configure: failed program was:" >&5
6078   cat conftest.$ac_ext >&5
6079   rm -rf conftest*
6080   eval "ac_cv_lib_$ac_lib_var=no"
6081 fi
6082 rm -f conftest*
6083 LIBS="$ac_save_LIBS"
6084
6085 fi
6086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6087   echo "$ac_t""yes" 1>&6
6088   have_k425=yes
6089                                 KRB4_LIBS="-lkrb4"
6090 else
6091   echo "$ac_t""no" 1>&6
6092 have_k425=no
6093 fi
6094
6095
6096                 else
6097                         have_425=no
6098                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6099                 fi
6100
6101                 if test $have_k425 = yes ; then
6102                         ol_with_kerberos=found
6103                         ol_link_krb4=yes
6104
6105                         cat >> confdefs.h <<\EOF
6106 #define HAVE_KRB425 1
6107 EOF
6108
6109                         cat >> confdefs.h <<\EOF
6110 #define HAVE_KRB4 1
6111 EOF
6112
6113
6114                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6115 echo "configure:6116: checking for des_debug in Kerberos libraries" >&5
6116 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6117   echo $ac_n "(cached) $ac_c" 1>&6
6118 else
6119   
6120                                                                 save_LIBS="$LIBS"
6121                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6122                                 cat > conftest.$ac_ext <<EOF
6123 #line 6124 "configure"
6124 #include "confdefs.h"
6125
6126 #include <kerberosIV/krb.h>
6127 #include <kerberosIV/des.h>
6128 extern int des_debug;
6129
6130 int main() {
6131
6132 des_debug = 1;
6133
6134 ; return 0; }
6135 EOF
6136 if { (eval echo configure:6137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6137   rm -rf conftest*
6138   ol_cv_var_des_debug=yes
6139 else
6140   echo "configure: failed program was:" >&5
6141   cat conftest.$ac_ext >&5
6142   rm -rf conftest*
6143   ol_cv_var_des_debug=no
6144 fi
6145 rm -f conftest*
6146                                                                 LIBS="$save_LIBS"
6147                         
6148 fi
6149
6150 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6151
6152                         if test $ol_cv_var_des_debug = yes ; then
6153                                 cat >> confdefs.h <<\EOF
6154 #define HAVE_DES_DEBUG 1
6155 EOF
6156
6157                         fi
6158
6159                         LIBS="$save_LIBS"
6160                 fi
6161         fi
6162 fi
6163
6164 if test $ol_link_krb5 = yes ; then
6165         ol_with_kerberos=found
6166 fi
6167
6168 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6169         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6170
6171         for ac_hdr in krb.h des.h krb-archaeology.h 
6172 do
6173 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6174 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6175 echo "configure:6176: checking for $ac_hdr" >&5
6176 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   cat > conftest.$ac_ext <<EOF
6180 #line 6181 "configure"
6181 #include "confdefs.h"
6182 #include <$ac_hdr>
6183 EOF
6184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6185 { (eval echo configure:6186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6187 if test -z "$ac_err"; then
6188   rm -rf conftest*
6189   eval "ac_cv_header_$ac_safe=yes"
6190 else
6191   echo "$ac_err" >&5
6192   echo "configure: failed program was:" >&5
6193   cat conftest.$ac_ext >&5
6194   rm -rf conftest*
6195   eval "ac_cv_header_$ac_safe=no"
6196 fi
6197 rm -f conftest*
6198 fi
6199 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6200   echo "$ac_t""yes" 1>&6
6201     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6202   cat >> confdefs.h <<EOF
6203 #define $ac_tr_hdr 1
6204 EOF
6205  
6206 else
6207   echo "$ac_t""no" 1>&6
6208 fi
6209 done
6210
6211
6212         if test $ac_cv_header_krb_h = yes ; then
6213                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6214 echo "configure:6215: checking for main in -lkrb" >&5
6215 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   ac_save_LIBS="$LIBS"
6220 LIBS="-lkrb -ldes $LIBS"
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224
6225 int main() {
6226 main()
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6230   rm -rf conftest*
6231   eval "ac_cv_lib_$ac_lib_var=yes"
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   eval "ac_cv_lib_$ac_lib_var=no"
6237 fi
6238 rm -f conftest*
6239 LIBS="$ac_save_LIBS"
6240
6241 fi
6242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6243   echo "$ac_t""yes" 1>&6
6244   have_k4=yes
6245 else
6246   echo "$ac_t""no" 1>&6
6247 have_k4=no
6248 fi
6249
6250
6251                 if test $have_k4 = yes ; then
6252                         ol_with_kerberos=found
6253                         ol_link_krb4=yes
6254
6255                         cat >> confdefs.h <<\EOF
6256 #define HAVE_KRB4 1
6257 EOF
6258
6259
6260                         KRB4_LIBS="-lkrb -ldes"
6261
6262                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6263                                 cat >> confdefs.h <<\EOF
6264 #define HAVE_KTH_KERBEROS 1
6265 EOF
6266
6267                         fi
6268                 fi
6269         fi
6270 fi
6271
6272 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6273         ol_link_kpasswd=yes
6274 fi
6275
6276 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6277         ol_link_kbind=yes
6278
6279 elif test $ol_enable_kbind = yes ; then
6280         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6281 fi
6282
6283 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6284         cat >> confdefs.h <<\EOF
6285 #define HAVE_KERBEROS 1
6286 EOF
6287
6288
6289 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6290         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6291 fi
6292
6293 ol_link_tls=no
6294 if test $ol_with_tls != no ; then
6295         for ac_hdr in openssl/ssl.h ssl.h
6296 do
6297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6299 echo "configure:6300: checking for $ac_hdr" >&5
6300 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6301   echo $ac_n "(cached) $ac_c" 1>&6
6302 else
6303   cat > conftest.$ac_ext <<EOF
6304 #line 6305 "configure"
6305 #include "confdefs.h"
6306 #include <$ac_hdr>
6307 EOF
6308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6309 { (eval echo configure:6310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6311 if test -z "$ac_err"; then
6312   rm -rf conftest*
6313   eval "ac_cv_header_$ac_safe=yes"
6314 else
6315   echo "$ac_err" >&5
6316   echo "configure: failed program was:" >&5
6317   cat conftest.$ac_ext >&5
6318   rm -rf conftest*
6319   eval "ac_cv_header_$ac_safe=no"
6320 fi
6321 rm -f conftest*
6322 fi
6323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6324   echo "$ac_t""yes" 1>&6
6325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6326   cat >> confdefs.h <<EOF
6327 #define $ac_tr_hdr 1
6328 EOF
6329  
6330 else
6331   echo "$ac_t""no" 1>&6
6332 fi
6333 done
6334
6335         
6336         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6337                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6338 echo "configure:6339: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6339 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6341   echo $ac_n "(cached) $ac_c" 1>&6
6342 else
6343   ac_save_LIBS="$LIBS"
6344 LIBS="-lssl -lcrypto $LIBS"
6345 cat > conftest.$ac_ext <<EOF
6346 #line 6347 "configure"
6347 #include "confdefs.h"
6348 /* Override any gcc2 internal prototype to avoid an error.  */
6349 /* We use char because int might match the return type of a gcc2
6350     builtin and then its argument prototype would still apply.  */
6351 char SSLeay_add_ssl_algorithms();
6352
6353 int main() {
6354 SSLeay_add_ssl_algorithms()
6355 ; return 0; }
6356 EOF
6357 if { (eval echo configure:6358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6358   rm -rf conftest*
6359   eval "ac_cv_lib_$ac_lib_var=yes"
6360 else
6361   echo "configure: failed program was:" >&5
6362   cat conftest.$ac_ext >&5
6363   rm -rf conftest*
6364   eval "ac_cv_lib_$ac_lib_var=no"
6365 fi
6366 rm -f conftest*
6367 LIBS="$ac_save_LIBS"
6368
6369 fi
6370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6371   echo "$ac_t""yes" 1>&6
6372   have_ssleay=yes
6373                         need_rsaref=no
6374 else
6375   echo "$ac_t""no" 1>&6
6376 have_ssleay=no
6377 fi
6378
6379                         
6380                 if test $have_ssleay = no ; then
6381                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6382 echo "configure:6383: checking for SSL_library_init in -lssl" >&5
6383 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6384 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6385   echo $ac_n "(cached) $ac_c" 1>&6
6386 else
6387   ac_save_LIBS="$LIBS"
6388 LIBS="-lssl -lcrypto $LIBS"
6389 cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6392 /* Override any gcc2 internal prototype to avoid an error.  */
6393 /* We use char because int might match the return type of a gcc2
6394     builtin and then its argument prototype would still apply.  */
6395 char SSL_library_init();
6396
6397 int main() {
6398 SSL_library_init()
6399 ; return 0; }
6400 EOF
6401 if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6402   rm -rf conftest*
6403   eval "ac_cv_lib_$ac_lib_var=yes"
6404 else
6405   echo "configure: failed program was:" >&5
6406   cat conftest.$ac_ext >&5
6407   rm -rf conftest*
6408   eval "ac_cv_lib_$ac_lib_var=no"
6409 fi
6410 rm -f conftest*
6411 LIBS="$ac_save_LIBS"
6412
6413 fi
6414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6415   echo "$ac_t""yes" 1>&6
6416   have_ssleay=yes
6417                                 need_rsaref=no
6418 else
6419   echo "$ac_t""no" 1>&6
6420 have_ssleay=no
6421 fi
6422
6423                 fi
6424
6425                 if test $have_ssleay = no ; then
6426                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6427 echo "configure:6428: checking for ssl3_accept in -lssl" >&5
6428 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6430   echo $ac_n "(cached) $ac_c" 1>&6
6431 else
6432   ac_save_LIBS="$LIBS"
6433 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6434 cat > conftest.$ac_ext <<EOF
6435 #line 6436 "configure"
6436 #include "confdefs.h"
6437 /* Override any gcc2 internal prototype to avoid an error.  */
6438 /* We use char because int might match the return type of a gcc2
6439     builtin and then its argument prototype would still apply.  */
6440 char ssl3_accept();
6441
6442 int main() {
6443 ssl3_accept()
6444 ; return 0; }
6445 EOF
6446 if { (eval echo configure:6447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6447   rm -rf conftest*
6448   eval "ac_cv_lib_$ac_lib_var=yes"
6449 else
6450   echo "configure: failed program was:" >&5
6451   cat conftest.$ac_ext >&5
6452   rm -rf conftest*
6453   eval "ac_cv_lib_$ac_lib_var=no"
6454 fi
6455 rm -f conftest*
6456 LIBS="$ac_save_LIBS"
6457
6458 fi
6459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6460   echo "$ac_t""yes" 1>&6
6461   have_ssleay=yes
6462                                 need_rsaref=yes
6463 else
6464   echo "$ac_t""no" 1>&6
6465 have_ssleay=no
6466 fi
6467
6468                 fi
6469
6470                 if test $have_ssleay = yes ; then
6471                         ol_with_tls=found
6472                         ol_link_tls=yes
6473
6474                         cat >> confdefs.h <<\EOF
6475 #define HAVE_SSLEAY 1
6476 EOF
6477
6478
6479                         if test $need_rsaref = yes; then
6480                                 cat >> confdefs.h <<\EOF
6481 #define HAVE_RSAREF 1
6482 EOF
6483
6484
6485                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6486                         else
6487                                 TLS_LIBS="-lssl -lcrypto"
6488                         fi
6489                 fi
6490         fi
6491
6492 else
6493         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6494 fi
6495
6496 if test $ol_link_tls = yes ; then
6497         cat >> confdefs.h <<\EOF
6498 #define HAVE_TLS 1
6499 EOF
6500
6501
6502 elif test $ol_with_tls = auto ; then
6503         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6504         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6505
6506 elif test $ol_with_tls != no ; then
6507         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6508 fi
6509
6510 for ac_func in \
6511         ctime_r                 \
6512         gethostbyname_r gethostbyaddr_r \
6513
6514 do
6515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6516 echo "configure:6517: checking for $ac_func" >&5
6517 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6518   echo $ac_n "(cached) $ac_c" 1>&6
6519 else
6520   cat > conftest.$ac_ext <<EOF
6521 #line 6522 "configure"
6522 #include "confdefs.h"
6523 /* System header to define __stub macros and hopefully few prototypes,
6524     which can conflict with char $ac_func(); below.  */
6525 #include <assert.h>
6526 /* Override any gcc2 internal prototype to avoid an error.  */
6527 /* We use char because int might match the return type of a gcc2
6528     builtin and then its argument prototype would still apply.  */
6529 char $ac_func();
6530 char (*f)();
6531
6532 int main() {
6533
6534 /* The GNU C library defines this for functions which it implements
6535     to always fail with ENOSYS.  Some functions are actually named
6536     something starting with __ and the normal name is an alias.  */
6537 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6538 choke me
6539 #else
6540 f = $ac_func;
6541 #endif
6542
6543 ; return 0; }
6544 EOF
6545 if { (eval echo configure:6546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6546   rm -rf conftest*
6547   eval "ac_cv_func_$ac_func=yes"
6548 else
6549   echo "configure: failed program was:" >&5
6550   cat conftest.$ac_ext >&5
6551   rm -rf conftest*
6552   eval "ac_cv_func_$ac_func=no"
6553 fi
6554 rm -f conftest*
6555 fi
6556
6557 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6558   echo "$ac_t""yes" 1>&6
6559     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6560   cat >> confdefs.h <<EOF
6561 #define $ac_tr_func 1
6562 EOF
6563  
6564 else
6565   echo "$ac_t""no" 1>&6
6566 fi
6567 done
6568
6569
6570 if test "$ac_cv_func_ctime_r" = no ; then
6571         ol_cv_func_ctime_r_nargs=0
6572 else
6573         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6574 echo "configure:6575: checking number of arguments of ctime_r" >&5
6575 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6576   echo $ac_n "(cached) $ac_c" 1>&6
6577 else
6578   cat > conftest.$ac_ext <<EOF
6579 #line 6580 "configure"
6580 #include "confdefs.h"
6581 #include <time.h>
6582 int main() {
6583 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6584 ; return 0; }
6585 EOF
6586 if { (eval echo configure:6587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6587   rm -rf conftest*
6588   ol_cv_func_ctime_r_nargs3=yes
6589 else
6590   echo "configure: failed program was:" >&5
6591   cat conftest.$ac_ext >&5
6592   rm -rf conftest*
6593   ol_cv_func_ctime_r_nargs3=no
6594 fi
6595 rm -f conftest*
6596
6597         cat > conftest.$ac_ext <<EOF
6598 #line 6599 "configure"
6599 #include "confdefs.h"
6600 #include <time.h>
6601 int main() {
6602 time_t ti; char *buffer; ctime_r(&ti,buffer);
6603 ; return 0; }
6604 EOF
6605 if { (eval echo configure:6606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6606   rm -rf conftest*
6607   ol_cv_func_ctime_r_nargs2=yes
6608 else
6609   echo "configure: failed program was:" >&5
6610   cat conftest.$ac_ext >&5
6611   rm -rf conftest*
6612   ol_cv_func_ctime_r_nargs2=no
6613 fi
6614 rm -f conftest*
6615
6616         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6617                 $ol_cv_func_ctime_r_nargs2 = no ; then
6618
6619                 ol_cv_func_ctime_r_nargs=3
6620
6621         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6622                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6623
6624                 ol_cv_func_ctime_r_nargs=2
6625
6626         else
6627                 ol_cv_func_ctime_r_nargs=0
6628         fi
6629   
6630 fi
6631
6632 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6633
6634   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6635         cat >> confdefs.h <<EOF
6636 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6637 EOF
6638
6639   fi
6640
6641 fi
6642
6643 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6644         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6645 echo "configure:6646: checking number of arguments of gethostbyname_r" >&5
6646 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6647   echo $ac_n "(cached) $ac_c" 1>&6
6648 else
6649   cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 #include <sys/types.h>
6653 #include <sys/socket.h>
6654 #include <netinet/in.h>
6655 #include <netdb.h>
6656 #define BUFSIZE (sizeof(struct hostent)+10)
6657 int main() {
6658 struct hostent hent; char buffer[BUFSIZE];
6659                 int bufsize=BUFSIZE;int h_errno;
6660                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6661                         buffer, bufsize, &h_errno);
6662 ; return 0; }
6663 EOF
6664 if { (eval echo configure:6665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6665   rm -rf conftest*
6666   ol_cv_func_gethostbyname_r_nargs5=yes
6667 else
6668   echo "configure: failed program was:" >&5
6669   cat conftest.$ac_ext >&5
6670   rm -rf conftest*
6671   ol_cv_func_gethostbyname_r_nargs5=no
6672 fi
6673 rm -f conftest*
6674
6675         cat > conftest.$ac_ext <<EOF
6676 #line 6677 "configure"
6677 #include "confdefs.h"
6678 #include <sys/types.h>
6679 #include <sys/socket.h>
6680 #include <netinet/in.h>
6681 #include <netdb.h>
6682 #define BUFSIZE (sizeof(struct hostent)+10)
6683 int main() {
6684 struct hostent hent;struct hostent *rhent;
6685                 char buffer[BUFSIZE];
6686                 int bufsize=BUFSIZE;int h_errno;
6687                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6688                         &rhent, &h_errno);
6689 ; return 0; }
6690 EOF
6691 if { (eval echo configure:6692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6692   rm -rf conftest*
6693   ol_cv_func_gethostbyname_r_nargs6=yes
6694 else
6695   echo "configure: failed program was:" >&5
6696   cat conftest.$ac_ext >&5
6697   rm -rf conftest*
6698   ol_cv_func_gethostbyname_r_nargs6=no
6699 fi
6700 rm -f conftest*
6701
6702         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6703                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6704
6705                 ol_cv_func_gethostbyname_r_nargs=5
6706
6707         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6708                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6709
6710                 ol_cv_func_gethostbyname_r_nargs=6
6711
6712         else
6713                 ol_cv_func_gethostbyname_r_nargs=0
6714         fi
6715   
6716 fi
6717
6718 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6719   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6720         cat >> confdefs.h <<EOF
6721 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6722 EOF
6723
6724   fi
6725
6726 else
6727         ol_cv_func_gethostbyname_r_nargs=0
6728 fi
6729  
6730 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6731         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6732 echo "configure:6733: checking number of arguments of gethostbyaddr_r" >&5
6733 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6734   echo $ac_n "(cached) $ac_c" 1>&6
6735 else
6736   cat > conftest.$ac_ext <<EOF
6737 #line 6738 "configure"
6738 #include "confdefs.h"
6739 #include <sys/types.h>
6740 #include <sys/socket.h>
6741 #include <netinet/in.h>
6742 #include <netdb.h>
6743 #define BUFSIZE (sizeof(struct hostent)+10)
6744 int main() {
6745 struct hostent hent; char buffer[BUFSIZE]; 
6746             struct in_addr add;
6747             size_t alen=sizeof(struct in_addr);
6748             int bufsize=BUFSIZE;int h_errno;
6749                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6750                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6754   rm -rf conftest*
6755   ol_cv_func_gethostbyaddr_r_nargs7=yes
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   ol_cv_func_gethostbyaddr_r_nargs7=no
6761 fi
6762 rm -f conftest*
6763
6764         cat > conftest.$ac_ext <<EOF
6765 #line 6766 "configure"
6766 #include "confdefs.h"
6767 #include <sys/types.h>
6768 #include <sys/socket.h>
6769 #include <netinet/in.h>
6770 #include <netdb.h>
6771 #define BUFSIZE (sizeof(struct hostent)+10)
6772 int main() {
6773 struct hostent hent;
6774                 struct hostent *rhent; char buffer[BUFSIZE]; 
6775                 struct in_addr add;
6776                 size_t alen=sizeof(struct in_addr);
6777                 int bufsize=BUFSIZE;int h_errno;
6778                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6779                         alen, AF_INET, &hent, buffer, bufsize, 
6780                         &rhent, &h_errno);
6781 ; return 0; }
6782 EOF
6783 if { (eval echo configure:6784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6784   rm -rf conftest*
6785   ol_cv_func_gethostbyaddr_r_nargs8=yes
6786 else
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789   rm -rf conftest*
6790   ol_cv_func_gethostbyaddr_r_nargs8=no
6791 fi
6792 rm -f conftest*
6793
6794         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6795                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6796
6797                 ol_cv_func_gethostbyaddr_r_nargs=7
6798
6799         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6800                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6801
6802                 ol_cv_func_gethostbyaddr_r_nargs=8
6803
6804         else
6805                 ol_cv_func_gethostbyaddr_r_nargs=0
6806         fi
6807   
6808 fi
6809
6810 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6811   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6812     cat >> confdefs.h <<EOF
6813 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6814 EOF
6815
6816   fi
6817
6818 else
6819         ol_cv_func_gethostbyaddr_r_nargs=0
6820 fi
6821
6822 if test "$ac_cv_func_ctime_r" = yes \
6823         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6824         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6825         -a "$ac_cv_func_gethostbyname_r" = yes \
6826         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6827         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6828         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6829         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6830         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6831         ; then
6832  
6833         cat >> confdefs.h <<\EOF
6834 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6835 EOF
6836
6837 fi
6838
6839 ol_link_threads=no
6840
6841 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6842         -o $ol_with_threads = nt ; then
6843
6844         
6845         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6846 echo "configure:6847: checking for NT Threads" >&5
6847 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6848   echo $ac_n "(cached) $ac_c" 1>&6
6849 else
6850   
6851                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6852 echo "configure:6853: checking for _beginthread" >&5
6853 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 /* System header to define __stub macros and hopefully few prototypes,
6860     which can conflict with char _beginthread(); below.  */
6861 #include <assert.h>
6862 /* Override any gcc2 internal prototype to avoid an error.  */
6863 /* We use char because int might match the return type of a gcc2
6864     builtin and then its argument prototype would still apply.  */
6865 char _beginthread();
6866 char (*f)();
6867
6868 int main() {
6869
6870 /* The GNU C library defines this for functions which it implements
6871     to always fail with ENOSYS.  Some functions are actually named
6872     something starting with __ and the normal name is an alias.  */
6873 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6874 choke me
6875 #else
6876 f = _beginthread;
6877 #endif
6878
6879 ; return 0; }
6880 EOF
6881 if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6882   rm -rf conftest*
6883   eval "ac_cv_func__beginthread=yes"
6884 else
6885   echo "configure: failed program was:" >&5
6886   cat conftest.$ac_ext >&5
6887   rm -rf conftest*
6888   eval "ac_cv_func__beginthread=no"
6889 fi
6890 rm -f conftest*
6891 fi
6892
6893 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6894   echo "$ac_t""yes" 1>&6
6895   ol_cv_nt_threads=yes
6896 else
6897   echo "$ac_t""no" 1>&6
6898 ol_cv_nt_threads=no
6899 fi
6900
6901         
6902 fi
6903
6904 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6905
6906         if test $ol_cv_nt_threads = yes ; then
6907                 cat >> confdefs.h <<\EOF
6908 #define HAVE_NT_THREADS 1
6909 EOF
6910
6911         fi
6912
6913
6914         if test "$ol_cv_nt_threads" = yes ; then
6915         ol_link_threads=nt
6916         ol_with_threads=found
6917         ol_with_yielding_select=yes
6918
6919                 cat >> confdefs.h <<\EOF
6920 #define HAVE_NT_SERVICE_MANAGER 1
6921 EOF
6922
6923                 cat >> confdefs.h <<\EOF
6924 #define HAVE_NT_EVENT_LOG 1
6925 EOF
6926
6927         fi
6928
6929         if test $ol_with_threads = nt ; then
6930                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6931         fi
6932 fi
6933
6934 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6935         -o $ol_with_threads = posix ; then
6936
6937         for ac_hdr in pthread.h
6938 do
6939 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6940 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6941 echo "configure:6942: checking for $ac_hdr" >&5
6942 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6943   echo $ac_n "(cached) $ac_c" 1>&6
6944 else
6945   cat > conftest.$ac_ext <<EOF
6946 #line 6947 "configure"
6947 #include "confdefs.h"
6948 #include <$ac_hdr>
6949 EOF
6950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6951 { (eval echo configure:6952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6953 if test -z "$ac_err"; then
6954   rm -rf conftest*
6955   eval "ac_cv_header_$ac_safe=yes"
6956 else
6957   echo "$ac_err" >&5
6958   echo "configure: failed program was:" >&5
6959   cat conftest.$ac_ext >&5
6960   rm -rf conftest*
6961   eval "ac_cv_header_$ac_safe=no"
6962 fi
6963 rm -f conftest*
6964 fi
6965 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6966   echo "$ac_t""yes" 1>&6
6967     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6968   cat >> confdefs.h <<EOF
6969 #define $ac_tr_hdr 1
6970 EOF
6971  
6972 else
6973   echo "$ac_t""no" 1>&6
6974 fi
6975 done
6976
6977
6978         if test $ac_cv_header_pthread_h = yes ; then
6979                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6980 echo "configure:6981: checking POSIX thread version" >&5
6981 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6982   echo $ac_n "(cached) $ac_c" 1>&6
6983 else
6984   
6985         cat > conftest.$ac_ext <<EOF
6986 #line 6987 "configure"
6987 #include "confdefs.h"
6988
6989 #               include <pthread.h>
6990                 /* this check could be improved */
6991 #               ifdef PTHREAD_ONCE_INIT
6992                         pthread_version_final;
6993 #               endif
6994         
6995 EOF
6996 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6997   egrep "pthread_version_final" >/dev/null 2>&1; then
6998   rm -rf conftest*
6999   ol_pthread_final=yes
7000 else
7001   rm -rf conftest*
7002   ol_pthread_final=no
7003 fi
7004 rm -f conftest*
7005
7006
7007         cat > conftest.$ac_ext <<EOF
7008 #line 7009 "configure"
7009 #include "confdefs.h"
7010
7011 #               include <pthread.h>
7012                 /* this check could be improved */
7013 #               ifdef pthread_once_init
7014                         pthread_version_draft4;
7015 #               endif
7016         
7017 EOF
7018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7019   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7020   rm -rf conftest*
7021   ol_pthread_draft4=yes
7022 else
7023   rm -rf conftest*
7024   ol_pthread_draft4=no
7025 fi
7026 rm -f conftest*
7027
7028
7029         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7030                 ol_cv_pthread_version=final
7031         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7032                 ol_cv_pthread_version=draft4
7033         else
7034                 ol_cv_pthread_version=unknown
7035         fi
7036
7037 fi
7038
7039 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7040
7041
7042                 if test $ol_cv_pthread_version = final ; then
7043                         cat >> confdefs.h <<\EOF
7044 #define HAVE_PTHREADS_FINAL 1
7045 EOF
7046
7047                 elif test $ol_cv_pthread_version = draft4 ; then
7048                         cat >> confdefs.h <<\EOF
7049 #define HAVE_PTHREADS_D4 1
7050 EOF
7051
7052                 else
7053                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7054                 fi
7055
7056                 # consider threads found
7057                 ol_with_threads=found
7058
7059                 
7060         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7061 echo "configure:7062: checking for LinuxThreads pthread.h" >&5
7062 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7063   echo $ac_n "(cached) $ac_c" 1>&6
7064 else
7065   cat > conftest.$ac_ext <<EOF
7066 #line 7067 "configure"
7067 #include "confdefs.h"
7068 #include <pthread.h>
7069 EOF
7070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7071   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7072   rm -rf conftest*
7073   ol_cv_header_linux_threads=yes
7074 else
7075   rm -rf conftest*
7076   ol_cv_header_linux_threads=no
7077 fi
7078 rm -f conftest*
7079
7080                 
7081 fi
7082
7083 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7084         if test $ol_cv_header_linux_threads = yes; then
7085                 cat >> confdefs.h <<\EOF
7086 #define HAVE_LINUX_THREADS 1
7087 EOF
7088
7089         fi
7090
7091                 
7092         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7093 echo "configure:7094: checking for GNU Pth pthread.h" >&5
7094 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7095   echo $ac_n "(cached) $ac_c" 1>&6
7096 else
7097   cat > conftest.$ac_ext <<EOF
7098 #line 7099 "configure"
7099 #include "confdefs.h"
7100 #include <pthread.h>
7101 #ifdef _POSIX_THREAD_IS_GNU_PTH
7102         __gnu_pth__;
7103 #endif
7104
7105 EOF
7106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7107   egrep "__gnu_pth__" >/dev/null 2>&1; then
7108   rm -rf conftest*
7109   ol_cv_header_gnu_pth_pthread_h=yes
7110 else
7111   rm -rf conftest*
7112   ol_cv_header_gnu_pth_pthread_h=no
7113 fi
7114 rm -f conftest*
7115
7116                 
7117 fi
7118
7119 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7120
7121
7122                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7123                         for ac_hdr in sched.h
7124 do
7125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7127 echo "configure:7128: checking for $ac_hdr" >&5
7128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7129   echo $ac_n "(cached) $ac_c" 1>&6
7130 else
7131   cat > conftest.$ac_ext <<EOF
7132 #line 7133 "configure"
7133 #include "confdefs.h"
7134 #include <$ac_hdr>
7135 EOF
7136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7137 { (eval echo configure:7138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7139 if test -z "$ac_err"; then
7140   rm -rf conftest*
7141   eval "ac_cv_header_$ac_safe=yes"
7142 else
7143   echo "$ac_err" >&5
7144   echo "configure: failed program was:" >&5
7145   cat conftest.$ac_ext >&5
7146   rm -rf conftest*
7147   eval "ac_cv_header_$ac_safe=no"
7148 fi
7149 rm -f conftest*
7150 fi
7151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7152   echo "$ac_t""yes" 1>&6
7153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7154   cat >> confdefs.h <<EOF
7155 #define $ac_tr_hdr 1
7156 EOF
7157  
7158 else
7159   echo "$ac_t""no" 1>&6
7160 fi
7161 done
7162
7163                 fi
7164
7165                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7166                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7167 echo "configure:7168: checking for pthread_create in default libraries" >&5
7168 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7169   echo $ac_n "(cached) $ac_c" 1>&6
7170 else
7171   
7172                 if test "$cross_compiling" = yes; then
7173   cat > conftest.$ac_ext <<EOF
7174 #line 7175 "configure"
7175 #include "confdefs.h"
7176 /* pthread test headers */
7177 #include <pthread.h>
7178 #ifndef NULL
7179 #define NULL (void*)0
7180 #endif
7181
7182 static void *task(p)
7183         void *p;
7184 {
7185         return (void *) (p == NULL);
7186 }
7187
7188 int main() {
7189
7190         /* pthread test function */
7191         pthread_t t;
7192         int status;
7193 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7194         /* This system (e.g. AIX) defaults detached; must override */
7195         pthread_attr_t attr;
7196
7197         status = pthread_attr_init(&attr);
7198         if( status ) exit( status );
7199
7200         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7201         if( status ) exit( status );
7202
7203 #define ATTR    &attr
7204 #else
7205 #if HAVE_PTHREADS_D4
7206 #define ATTR    pthread_attr_default
7207 #else
7208 #define ATTR    NULL
7209 #endif
7210 #endif
7211         /* make sure pthread_create() isn't just a stub */
7212         status = pthread_create(&t, ATTR, task, NULL);
7213         if( status ) exit( status );
7214
7215         /* make sure pthread_detach() isn't just a stub */
7216 #if HAVE_PTHREADS_D4
7217         status = pthread_detach( &t );
7218 #else
7219         status = pthread_detach( t );
7220 #endif
7221
7222 #ifdef HAVE_LINUX_THREADS
7223         pthread_kill_other_threads_np();
7224 #endif
7225
7226         exit( status );
7227
7228 ; return 0; }
7229 EOF
7230 if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7231   rm -rf conftest*
7232   ol_cv_pthread_create=yes
7233 else
7234   echo "configure: failed program was:" >&5
7235   cat conftest.$ac_ext >&5
7236   rm -rf conftest*
7237   ol_cv_pthread_create=no
7238 fi
7239 rm -f conftest*
7240 else
7241   cat > conftest.$ac_ext <<EOF
7242 #line 7243 "configure"
7243 #include "confdefs.h"
7244 /* pthread test headers */
7245 #include <pthread.h>
7246 #ifndef NULL
7247 #define NULL (void*)0
7248 #endif
7249
7250 static void *task(p)
7251         void *p;
7252 {
7253         return (void *) (p == NULL);
7254 }
7255
7256
7257 int main(argc, argv)
7258         int argc;
7259         char **argv;
7260 {
7261
7262         /* pthread test function */
7263         pthread_t t;
7264         int status;
7265 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7266         /* This system (e.g. AIX) defaults detached; must override */
7267         pthread_attr_t attr;
7268
7269         status = pthread_attr_init(&attr);
7270         if( status ) exit( status );
7271
7272         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7273         if( status ) exit( status );
7274
7275 #define ATTR    &attr
7276 #else
7277 #if HAVE_PTHREADS_D4
7278 #define ATTR    pthread_attr_default
7279 #else
7280 #define ATTR    NULL
7281 #endif
7282 #endif
7283         /* make sure pthread_create() isn't just a stub */
7284         status = pthread_create(&t, ATTR, task, NULL);
7285         if( status ) exit( status );
7286
7287         /* make sure pthread_detach() isn't just a stub */
7288 #if HAVE_PTHREADS_D4
7289         status = pthread_detach( &t );
7290 #else
7291         status = pthread_detach( t );
7292 #endif
7293
7294 #ifdef HAVE_LINUX_THREADS
7295         pthread_kill_other_threads_np();
7296 #endif
7297
7298         exit( status );
7299
7300 }
7301
7302 EOF
7303 if { (eval echo configure:7304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7304 then
7305   ol_cv_pthread_create=yes
7306 else
7307   echo "configure: failed program was:" >&5
7308   cat conftest.$ac_ext >&5
7309   rm -fr conftest*
7310   ol_cv_pthread_create=no
7311 fi
7312 rm -fr conftest*
7313 fi
7314
7315 fi
7316
7317 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7318
7319                 if test $ol_cv_pthread_create != no ; then
7320                         ol_link_threads=posix
7321                         ol_link_pthreads=""
7322                 fi
7323                 
7324                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7325 if test "$ol_link_threads" = no ; then
7326         # try -kthread
7327         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7328 echo "configure:7329: checking for pthread link with -kthread" >&5
7329 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7330   echo $ac_n "(cached) $ac_c" 1>&6
7331 else
7332   
7333                 # save the flags
7334                 ol_LIBS="$LIBS"
7335                 LIBS="-kthread $LIBS"
7336
7337                 if test "$cross_compiling" = yes; then
7338   cat > conftest.$ac_ext <<EOF
7339 #line 7340 "configure"
7340 #include "confdefs.h"
7341 /* pthread test headers */
7342 #include <pthread.h>
7343 #ifndef NULL
7344 #define NULL (void*)0
7345 #endif
7346
7347 static void *task(p)
7348         void *p;
7349 {
7350         return (void *) (p == NULL);
7351 }
7352
7353 int main() {
7354
7355         /* pthread test function */
7356         pthread_t t;
7357         int status;
7358 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7359         /* This system (e.g. AIX) defaults detached; must override */
7360         pthread_attr_t attr;
7361
7362         status = pthread_attr_init(&attr);
7363         if( status ) exit( status );
7364
7365         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7366         if( status ) exit( status );
7367
7368 #define ATTR    &attr
7369 #else
7370 #if HAVE_PTHREADS_D4
7371 #define ATTR    pthread_attr_default
7372 #else
7373 #define ATTR    NULL
7374 #endif
7375 #endif
7376         /* make sure pthread_create() isn't just a stub */
7377         status = pthread_create(&t, ATTR, task, NULL);
7378         if( status ) exit( status );
7379
7380         /* make sure pthread_detach() isn't just a stub */
7381 #if HAVE_PTHREADS_D4
7382         status = pthread_detach( &t );
7383 #else
7384         status = pthread_detach( t );
7385 #endif
7386
7387 #ifdef HAVE_LINUX_THREADS
7388         pthread_kill_other_threads_np();
7389 #endif
7390
7391         exit( status );
7392
7393 ; return 0; }
7394 EOF
7395 if { (eval echo configure:7396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7396   rm -rf conftest*
7397   ol_cv_pthread_kthread=yes
7398 else
7399   echo "configure: failed program was:" >&5
7400   cat conftest.$ac_ext >&5
7401   rm -rf conftest*
7402   ol_cv_pthread_kthread=no
7403 fi
7404 rm -f conftest*
7405 else
7406   cat > conftest.$ac_ext <<EOF
7407 #line 7408 "configure"
7408 #include "confdefs.h"
7409 /* pthread test headers */
7410 #include <pthread.h>
7411 #ifndef NULL
7412 #define NULL (void*)0
7413 #endif
7414
7415 static void *task(p)
7416         void *p;
7417 {
7418         return (void *) (p == NULL);
7419 }
7420
7421
7422 int main(argc, argv)
7423         int argc;
7424         char **argv;
7425 {
7426
7427         /* pthread test function */
7428         pthread_t t;
7429         int status;
7430 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7431         /* This system (e.g. AIX) defaults detached; must override */
7432         pthread_attr_t attr;
7433
7434         status = pthread_attr_init(&attr);
7435         if( status ) exit( status );
7436
7437         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7438         if( status ) exit( status );
7439
7440 #define ATTR    &attr
7441 #else
7442 #if HAVE_PTHREADS_D4
7443 #define ATTR    pthread_attr_default
7444 #else
7445 #define ATTR    NULL
7446 #endif
7447 #endif
7448         /* make sure pthread_create() isn't just a stub */
7449         status = pthread_create(&t, ATTR, task, NULL);
7450         if( status ) exit( status );
7451
7452         /* make sure pthread_detach() isn't just a stub */
7453 #if HAVE_PTHREADS_D4
7454         status = pthread_detach( &t );
7455 #else
7456         status = pthread_detach( t );
7457 #endif
7458
7459 #ifdef HAVE_LINUX_THREADS
7460         pthread_kill_other_threads_np();
7461 #endif
7462
7463         exit( status );
7464
7465 }
7466
7467 EOF
7468 if { (eval echo configure:7469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7469 then
7470   ol_cv_pthread_kthread=yes
7471 else
7472   echo "configure: failed program was:" >&5
7473   cat conftest.$ac_ext >&5
7474   rm -fr conftest*
7475   ol_cv_pthread_kthread=no
7476 fi
7477 rm -fr conftest*
7478 fi
7479
7480
7481                 # restore the LIBS
7482                 LIBS="$ol_LIBS"
7483         
7484 fi
7485
7486 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7487
7488         if test $ol_cv_pthread_kthread = yes ; then
7489                 ol_link_pthreads="-kthread"
7490                 ol_link_threads=posix
7491         fi
7492 fi
7493
7494                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7495 if test "$ol_link_threads" = no ; then
7496         # try -pthread
7497         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7498 echo "configure:7499: checking for pthread link with -pthread" >&5
7499 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   
7503                 # save the flags
7504                 ol_LIBS="$LIBS"
7505                 LIBS="-pthread $LIBS"
7506
7507                 if test "$cross_compiling" = yes; then
7508   cat > conftest.$ac_ext <<EOF
7509 #line 7510 "configure"
7510 #include "confdefs.h"
7511 /* pthread test headers */
7512 #include <pthread.h>
7513 #ifndef NULL
7514 #define NULL (void*)0
7515 #endif
7516
7517 static void *task(p)
7518         void *p;
7519 {
7520         return (void *) (p == NULL);
7521 }
7522
7523 int main() {
7524
7525         /* pthread test function */
7526         pthread_t t;
7527         int status;
7528 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7529         /* This system (e.g. AIX) defaults detached; must override */
7530         pthread_attr_t attr;
7531
7532         status = pthread_attr_init(&attr);
7533         if( status ) exit( status );
7534
7535         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7536         if( status ) exit( status );
7537
7538 #define ATTR    &attr
7539 #else
7540 #if HAVE_PTHREADS_D4
7541 #define ATTR    pthread_attr_default
7542 #else
7543 #define ATTR    NULL
7544 #endif
7545 #endif
7546         /* make sure pthread_create() isn't just a stub */
7547         status = pthread_create(&t, ATTR, task, NULL);
7548         if( status ) exit( status );
7549
7550         /* make sure pthread_detach() isn't just a stub */
7551 #if HAVE_PTHREADS_D4
7552         status = pthread_detach( &t );
7553 #else
7554         status = pthread_detach( t );
7555 #endif
7556
7557 #ifdef HAVE_LINUX_THREADS
7558         pthread_kill_other_threads_np();
7559 #endif
7560
7561         exit( status );
7562
7563 ; return 0; }
7564 EOF
7565 if { (eval echo configure:7566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7566   rm -rf conftest*
7567   ol_cv_pthread_pthread=yes
7568 else
7569   echo "configure: failed program was:" >&5
7570   cat conftest.$ac_ext >&5
7571   rm -rf conftest*
7572   ol_cv_pthread_pthread=no
7573 fi
7574 rm -f conftest*
7575 else
7576   cat > conftest.$ac_ext <<EOF
7577 #line 7578 "configure"
7578 #include "confdefs.h"
7579 /* pthread test headers */
7580 #include <pthread.h>
7581 #ifndef NULL
7582 #define NULL (void*)0
7583 #endif
7584
7585 static void *task(p)
7586         void *p;
7587 {
7588         return (void *) (p == NULL);
7589 }
7590
7591
7592 int main(argc, argv)
7593         int argc;
7594         char **argv;
7595 {
7596
7597         /* pthread test function */
7598         pthread_t t;
7599         int status;
7600 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7601         /* This system (e.g. AIX) defaults detached; must override */
7602         pthread_attr_t attr;
7603
7604         status = pthread_attr_init(&attr);
7605         if( status ) exit( status );
7606
7607         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7608         if( status ) exit( status );
7609
7610 #define ATTR    &attr
7611 #else
7612 #if HAVE_PTHREADS_D4
7613 #define ATTR    pthread_attr_default
7614 #else
7615 #define ATTR    NULL
7616 #endif
7617 #endif
7618         /* make sure pthread_create() isn't just a stub */
7619         status = pthread_create(&t, ATTR, task, NULL);
7620         if( status ) exit( status );
7621
7622         /* make sure pthread_detach() isn't just a stub */
7623 #if HAVE_PTHREADS_D4
7624         status = pthread_detach( &t );
7625 #else
7626         status = pthread_detach( t );
7627 #endif
7628
7629 #ifdef HAVE_LINUX_THREADS
7630         pthread_kill_other_threads_np();
7631 #endif
7632
7633         exit( status );
7634
7635 }
7636
7637 EOF
7638 if { (eval echo configure:7639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7639 then
7640   ol_cv_pthread_pthread=yes
7641 else
7642   echo "configure: failed program was:" >&5
7643   cat conftest.$ac_ext >&5
7644   rm -fr conftest*
7645   ol_cv_pthread_pthread=no
7646 fi
7647 rm -fr conftest*
7648 fi
7649
7650
7651                 # restore the LIBS
7652                 LIBS="$ol_LIBS"
7653         
7654 fi
7655
7656 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7657
7658         if test $ol_cv_pthread_pthread = yes ; then
7659                 ol_link_pthreads="-pthread"
7660                 ol_link_threads=posix
7661         fi
7662 fi
7663
7664                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7665 if test "$ol_link_threads" = no ; then
7666         # try -pthreads
7667         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7668 echo "configure:7669: checking for pthread link with -pthreads" >&5
7669 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7670   echo $ac_n "(cached) $ac_c" 1>&6
7671 else
7672   
7673                 # save the flags
7674                 ol_LIBS="$LIBS"
7675                 LIBS="-pthreads $LIBS"
7676
7677                 if test "$cross_compiling" = yes; then
7678   cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681 /* pthread test headers */
7682 #include <pthread.h>
7683 #ifndef NULL
7684 #define NULL (void*)0
7685 #endif
7686
7687 static void *task(p)
7688         void *p;
7689 {
7690         return (void *) (p == NULL);
7691 }
7692
7693 int main() {
7694
7695         /* pthread test function */
7696         pthread_t t;
7697         int status;
7698 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7699         /* This system (e.g. AIX) defaults detached; must override */
7700         pthread_attr_t attr;
7701
7702         status = pthread_attr_init(&attr);
7703         if( status ) exit( status );
7704
7705         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7706         if( status ) exit( status );
7707
7708 #define ATTR    &attr
7709 #else
7710 #if HAVE_PTHREADS_D4
7711 #define ATTR    pthread_attr_default
7712 #else
7713 #define ATTR    NULL
7714 #endif
7715 #endif
7716         /* make sure pthread_create() isn't just a stub */
7717         status = pthread_create(&t, ATTR, task, NULL);
7718         if( status ) exit( status );
7719
7720         /* make sure pthread_detach() isn't just a stub */
7721 #if HAVE_PTHREADS_D4
7722         status = pthread_detach( &t );
7723 #else
7724         status = pthread_detach( t );
7725 #endif
7726
7727 #ifdef HAVE_LINUX_THREADS
7728         pthread_kill_other_threads_np();
7729 #endif
7730
7731         exit( status );
7732
7733 ; return 0; }
7734 EOF
7735 if { (eval echo configure:7736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7736   rm -rf conftest*
7737   ol_cv_pthread_pthreads=yes
7738 else
7739   echo "configure: failed program was:" >&5
7740   cat conftest.$ac_ext >&5
7741   rm -rf conftest*
7742   ol_cv_pthread_pthreads=no
7743 fi
7744 rm -f conftest*
7745 else
7746   cat > conftest.$ac_ext <<EOF
7747 #line 7748 "configure"
7748 #include "confdefs.h"
7749 /* pthread test headers */
7750 #include <pthread.h>
7751 #ifndef NULL
7752 #define NULL (void*)0
7753 #endif
7754
7755 static void *task(p)
7756         void *p;
7757 {
7758         return (void *) (p == NULL);
7759 }
7760
7761
7762 int main(argc, argv)
7763         int argc;
7764         char **argv;
7765 {
7766
7767         /* pthread test function */
7768         pthread_t t;
7769         int status;
7770 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7771         /* This system (e.g. AIX) defaults detached; must override */
7772         pthread_attr_t attr;
7773
7774         status = pthread_attr_init(&attr);
7775         if( status ) exit( status );
7776
7777         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7778         if( status ) exit( status );
7779
7780 #define ATTR    &attr
7781 #else
7782 #if HAVE_PTHREADS_D4
7783 #define ATTR    pthread_attr_default
7784 #else
7785 #define ATTR    NULL
7786 #endif
7787 #endif
7788         /* make sure pthread_create() isn't just a stub */
7789         status = pthread_create(&t, ATTR, task, NULL);
7790         if( status ) exit( status );
7791
7792         /* make sure pthread_detach() isn't just a stub */
7793 #if HAVE_PTHREADS_D4
7794         status = pthread_detach( &t );
7795 #else
7796         status = pthread_detach( t );
7797 #endif
7798
7799 #ifdef HAVE_LINUX_THREADS
7800         pthread_kill_other_threads_np();
7801 #endif
7802
7803         exit( status );
7804
7805 }
7806
7807 EOF
7808 if { (eval echo configure:7809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7809 then
7810   ol_cv_pthread_pthreads=yes
7811 else
7812   echo "configure: failed program was:" >&5
7813   cat conftest.$ac_ext >&5
7814   rm -fr conftest*
7815   ol_cv_pthread_pthreads=no
7816 fi
7817 rm -fr conftest*
7818 fi
7819
7820
7821                 # restore the LIBS
7822                 LIBS="$ol_LIBS"
7823         
7824 fi
7825
7826 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7827
7828         if test $ol_cv_pthread_pthreads = yes ; then
7829                 ol_link_pthreads="-pthreads"
7830                 ol_link_threads=posix
7831         fi
7832 fi
7833
7834                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7835 if test "$ol_link_threads" = no ; then
7836         # try -mthreads
7837         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7838 echo "configure:7839: checking for pthread link with -mthreads" >&5
7839 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7840   echo $ac_n "(cached) $ac_c" 1>&6
7841 else
7842   
7843                 # save the flags
7844                 ol_LIBS="$LIBS"
7845                 LIBS="-mthreads $LIBS"
7846
7847                 if test "$cross_compiling" = yes; then
7848   cat > conftest.$ac_ext <<EOF
7849 #line 7850 "configure"
7850 #include "confdefs.h"
7851 /* pthread test headers */
7852 #include <pthread.h>
7853 #ifndef NULL
7854 #define NULL (void*)0
7855 #endif
7856
7857 static void *task(p)
7858         void *p;
7859 {
7860         return (void *) (p == NULL);
7861 }
7862
7863 int main() {
7864
7865         /* pthread test function */
7866         pthread_t t;
7867         int status;
7868 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7869         /* This system (e.g. AIX) defaults detached; must override */
7870         pthread_attr_t attr;
7871
7872         status = pthread_attr_init(&attr);
7873         if( status ) exit( status );
7874
7875         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7876         if( status ) exit( status );
7877
7878 #define ATTR    &attr
7879 #else
7880 #if HAVE_PTHREADS_D4
7881 #define ATTR    pthread_attr_default
7882 #else
7883 #define ATTR    NULL
7884 #endif
7885 #endif
7886         /* make sure pthread_create() isn't just a stub */
7887         status = pthread_create(&t, ATTR, task, NULL);
7888         if( status ) exit( status );
7889
7890         /* make sure pthread_detach() isn't just a stub */
7891 #if HAVE_PTHREADS_D4
7892         status = pthread_detach( &t );
7893 #else
7894         status = pthread_detach( t );
7895 #endif
7896
7897 #ifdef HAVE_LINUX_THREADS
7898         pthread_kill_other_threads_np();
7899 #endif
7900
7901         exit( status );
7902
7903 ; return 0; }
7904 EOF
7905 if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7906   rm -rf conftest*
7907   ol_cv_pthread_mthreads=yes
7908 else
7909   echo "configure: failed program was:" >&5
7910   cat conftest.$ac_ext >&5
7911   rm -rf conftest*
7912   ol_cv_pthread_mthreads=no
7913 fi
7914 rm -f conftest*
7915 else
7916   cat > conftest.$ac_ext <<EOF
7917 #line 7918 "configure"
7918 #include "confdefs.h"
7919 /* pthread test headers */
7920 #include <pthread.h>
7921 #ifndef NULL
7922 #define NULL (void*)0
7923 #endif
7924
7925 static void *task(p)
7926         void *p;
7927 {
7928         return (void *) (p == NULL);
7929 }
7930
7931
7932 int main(argc, argv)
7933         int argc;
7934         char **argv;
7935 {
7936
7937         /* pthread test function */
7938         pthread_t t;
7939         int status;
7940 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7941         /* This system (e.g. AIX) defaults detached; must override */
7942         pthread_attr_t attr;
7943
7944         status = pthread_attr_init(&attr);
7945         if( status ) exit( status );
7946
7947         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7948         if( status ) exit( status );
7949
7950 #define ATTR    &attr
7951 #else
7952 #if HAVE_PTHREADS_D4
7953 #define ATTR    pthread_attr_default
7954 #else
7955 #define ATTR    NULL
7956 #endif
7957 #endif
7958         /* make sure pthread_create() isn't just a stub */
7959         status = pthread_create(&t, ATTR, task, NULL);
7960         if( status ) exit( status );
7961
7962         /* make sure pthread_detach() isn't just a stub */
7963 #if HAVE_PTHREADS_D4
7964         status = pthread_detach( &t );
7965 #else
7966         status = pthread_detach( t );
7967 #endif
7968
7969 #ifdef HAVE_LINUX_THREADS
7970         pthread_kill_other_threads_np();
7971 #endif
7972
7973         exit( status );
7974
7975 }
7976
7977 EOF
7978 if { (eval echo configure:7979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7979 then
7980   ol_cv_pthread_mthreads=yes
7981 else
7982   echo "configure: failed program was:" >&5
7983   cat conftest.$ac_ext >&5
7984   rm -fr conftest*
7985   ol_cv_pthread_mthreads=no
7986 fi
7987 rm -fr conftest*
7988 fi
7989
7990
7991                 # restore the LIBS
7992                 LIBS="$ol_LIBS"
7993         
7994 fi
7995
7996 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7997
7998         if test $ol_cv_pthread_mthreads = yes ; then
7999                 ol_link_pthreads="-mthreads"
8000                 ol_link_threads=posix
8001         fi
8002 fi
8003
8004                 # Pthread try link: -thread (ol_cv_pthread_thread)
8005 if test "$ol_link_threads" = no ; then
8006         # try -thread
8007         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8008 echo "configure:8009: checking for pthread link with -thread" >&5
8009 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8010   echo $ac_n "(cached) $ac_c" 1>&6
8011 else
8012   
8013                 # save the flags
8014                 ol_LIBS="$LIBS"
8015                 LIBS="-thread $LIBS"
8016
8017                 if test "$cross_compiling" = yes; then
8018   cat > conftest.$ac_ext <<EOF
8019 #line 8020 "configure"
8020 #include "confdefs.h"
8021 /* pthread test headers */
8022 #include <pthread.h>
8023 #ifndef NULL
8024 #define NULL (void*)0
8025 #endif
8026
8027 static void *task(p)
8028         void *p;
8029 {
8030         return (void *) (p == NULL);
8031 }
8032
8033 int main() {
8034
8035         /* pthread test function */
8036         pthread_t t;
8037         int status;
8038 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8039         /* This system (e.g. AIX) defaults detached; must override */
8040         pthread_attr_t attr;
8041
8042         status = pthread_attr_init(&attr);
8043         if( status ) exit( status );
8044
8045         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8046         if( status ) exit( status );
8047
8048 #define ATTR    &attr
8049 #else
8050 #if HAVE_PTHREADS_D4
8051 #define ATTR    pthread_attr_default
8052 #else
8053 #define ATTR    NULL
8054 #endif
8055 #endif
8056         /* make sure pthread_create() isn't just a stub */
8057         status = pthread_create(&t, ATTR, task, NULL);
8058         if( status ) exit( status );
8059
8060         /* make sure pthread_detach() isn't just a stub */
8061 #if HAVE_PTHREADS_D4
8062         status = pthread_detach( &t );
8063 #else
8064         status = pthread_detach( t );
8065 #endif
8066
8067 #ifdef HAVE_LINUX_THREADS
8068         pthread_kill_other_threads_np();
8069 #endif
8070
8071         exit( status );
8072
8073 ; return 0; }
8074 EOF
8075 if { (eval echo configure:8076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8076   rm -rf conftest*
8077   ol_cv_pthread_thread=yes
8078 else
8079   echo "configure: failed program was:" >&5
8080   cat conftest.$ac_ext >&5
8081   rm -rf conftest*
8082   ol_cv_pthread_thread=no
8083 fi
8084 rm -f conftest*
8085 else
8086   cat > conftest.$ac_ext <<EOF
8087 #line 8088 "configure"
8088 #include "confdefs.h"
8089 /* pthread test headers */
8090 #include <pthread.h>
8091 #ifndef NULL
8092 #define NULL (void*)0
8093 #endif
8094
8095 static void *task(p)
8096         void *p;
8097 {
8098         return (void *) (p == NULL);
8099 }
8100
8101
8102 int main(argc, argv)
8103         int argc;
8104         char **argv;
8105 {
8106
8107         /* pthread test function */
8108         pthread_t t;
8109         int status;
8110 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8111         /* This system (e.g. AIX) defaults detached; must override */
8112         pthread_attr_t attr;
8113
8114         status = pthread_attr_init(&attr);
8115         if( status ) exit( status );
8116
8117         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8118         if( status ) exit( status );
8119
8120 #define ATTR    &attr
8121 #else
8122 #if HAVE_PTHREADS_D4
8123 #define ATTR    pthread_attr_default
8124 #else
8125 #define ATTR    NULL
8126 #endif
8127 #endif
8128         /* make sure pthread_create() isn't just a stub */
8129         status = pthread_create(&t, ATTR, task, NULL);
8130         if( status ) exit( status );
8131
8132         /* make sure pthread_detach() isn't just a stub */
8133 #if HAVE_PTHREADS_D4
8134         status = pthread_detach( &t );
8135 #else
8136         status = pthread_detach( t );
8137 #endif
8138
8139 #ifdef HAVE_LINUX_THREADS
8140         pthread_kill_other_threads_np();
8141 #endif
8142
8143         exit( status );
8144
8145 }
8146
8147 EOF
8148 if { (eval echo configure:8149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8149 then
8150   ol_cv_pthread_thread=yes
8151 else
8152   echo "configure: failed program was:" >&5
8153   cat conftest.$ac_ext >&5
8154   rm -fr conftest*
8155   ol_cv_pthread_thread=no
8156 fi
8157 rm -fr conftest*
8158 fi
8159
8160
8161                 # restore the LIBS
8162                 LIBS="$ol_LIBS"
8163         
8164 fi
8165
8166 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8167
8168         if test $ol_cv_pthread_thread = yes ; then
8169                 ol_link_pthreads="-thread"
8170                 ol_link_threads=posix
8171         fi
8172 fi
8173
8174
8175                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8176 if test "$ol_link_threads" = no ; then
8177         # try -lpthread -lmach -lexc -lc_r
8178         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8179 echo "configure:8180: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8180 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8181   echo $ac_n "(cached) $ac_c" 1>&6
8182 else
8183   
8184                 # save the flags
8185                 ol_LIBS="$LIBS"
8186                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8187
8188                 if test "$cross_compiling" = yes; then
8189   cat > conftest.$ac_ext <<EOF
8190 #line 8191 "configure"
8191 #include "confdefs.h"
8192 /* pthread test headers */
8193 #include <pthread.h>
8194 #ifndef NULL
8195 #define NULL (void*)0
8196 #endif
8197
8198 static void *task(p)
8199         void *p;
8200 {
8201         return (void *) (p == NULL);
8202 }
8203
8204 int main() {
8205
8206         /* pthread test function */
8207         pthread_t t;
8208         int status;
8209 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8210         /* This system (e.g. AIX) defaults detached; must override */
8211         pthread_attr_t attr;
8212
8213         status = pthread_attr_init(&attr);
8214         if( status ) exit( status );
8215
8216         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8217         if( status ) exit( status );
8218
8219 #define ATTR    &attr
8220 #else
8221 #if HAVE_PTHREADS_D4
8222 #define ATTR    pthread_attr_default
8223 #else
8224 #define ATTR    NULL
8225 #endif
8226 #endif
8227         /* make sure pthread_create() isn't just a stub */
8228         status = pthread_create(&t, ATTR, task, NULL);
8229         if( status ) exit( status );
8230
8231         /* make sure pthread_detach() isn't just a stub */
8232 #if HAVE_PTHREADS_D4
8233         status = pthread_detach( &t );
8234 #else
8235         status = pthread_detach( t );
8236 #endif
8237
8238 #ifdef HAVE_LINUX_THREADS
8239         pthread_kill_other_threads_np();
8240 #endif
8241
8242         exit( status );
8243
8244 ; return 0; }
8245 EOF
8246 if { (eval echo configure:8247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8247   rm -rf conftest*
8248   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8249 else
8250   echo "configure: failed program was:" >&5
8251   cat conftest.$ac_ext >&5
8252   rm -rf conftest*
8253   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8254 fi
8255 rm -f conftest*
8256 else
8257   cat > conftest.$ac_ext <<EOF
8258 #line 8259 "configure"
8259 #include "confdefs.h"
8260 /* pthread test headers */
8261 #include <pthread.h>
8262 #ifndef NULL
8263 #define NULL (void*)0
8264 #endif
8265
8266 static void *task(p)
8267         void *p;
8268 {
8269         return (void *) (p == NULL);
8270 }
8271
8272
8273 int main(argc, argv)
8274         int argc;
8275         char **argv;
8276 {
8277
8278         /* pthread test function */
8279         pthread_t t;
8280         int status;
8281 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8282         /* This system (e.g. AIX) defaults detached; must override */
8283         pthread_attr_t attr;
8284
8285         status = pthread_attr_init(&attr);
8286         if( status ) exit( status );
8287
8288         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8289         if( status ) exit( status );
8290
8291 #define ATTR    &attr
8292 #else
8293 #if HAVE_PTHREADS_D4
8294 #define ATTR    pthread_attr_default
8295 #else
8296 #define ATTR    NULL
8297 #endif
8298 #endif
8299         /* make sure pthread_create() isn't just a stub */
8300         status = pthread_create(&t, ATTR, task, NULL);
8301         if( status ) exit( status );
8302
8303         /* make sure pthread_detach() isn't just a stub */
8304 #if HAVE_PTHREADS_D4
8305         status = pthread_detach( &t );
8306 #else
8307         status = pthread_detach( t );
8308 #endif
8309
8310 #ifdef HAVE_LINUX_THREADS
8311         pthread_kill_other_threads_np();
8312 #endif
8313
8314         exit( status );
8315
8316 }
8317
8318 EOF
8319 if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8320 then
8321   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8322 else
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -fr conftest*
8326   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8327 fi
8328 rm -fr conftest*
8329 fi
8330
8331
8332                 # restore the LIBS
8333                 LIBS="$ol_LIBS"
8334         
8335 fi
8336
8337 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8338
8339         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8340                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8341                 ol_link_threads=posix
8342         fi
8343 fi
8344
8345                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8346 if test "$ol_link_threads" = no ; then
8347         # try -lpthread -lmach -lexc
8348         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8349 echo "configure:8350: checking for pthread link with -lpthread -lmach -lexc" >&5
8350 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8351   echo $ac_n "(cached) $ac_c" 1>&6
8352 else
8353   
8354                 # save the flags
8355                 ol_LIBS="$LIBS"
8356                 LIBS="-lpthread -lmach -lexc $LIBS"
8357
8358                 if test "$cross_compiling" = yes; then
8359   cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 /* pthread test headers */
8363 #include <pthread.h>
8364 #ifndef NULL
8365 #define NULL (void*)0
8366 #endif
8367
8368 static void *task(p)
8369         void *p;
8370 {
8371         return (void *) (p == NULL);
8372 }
8373
8374 int main() {
8375
8376         /* pthread test function */
8377         pthread_t t;
8378         int status;
8379 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8380         /* This system (e.g. AIX) defaults detached; must override */
8381         pthread_attr_t attr;
8382
8383         status = pthread_attr_init(&attr);
8384         if( status ) exit( status );
8385
8386         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8387         if( status ) exit( status );
8388
8389 #define ATTR    &attr
8390 #else
8391 #if HAVE_PTHREADS_D4
8392 #define ATTR    pthread_attr_default
8393 #else
8394 #define ATTR    NULL
8395 #endif
8396 #endif
8397         /* make sure pthread_create() isn't just a stub */
8398         status = pthread_create(&t, ATTR, task, NULL);
8399         if( status ) exit( status );
8400
8401         /* make sure pthread_detach() isn't just a stub */
8402 #if HAVE_PTHREADS_D4
8403         status = pthread_detach( &t );
8404 #else
8405         status = pthread_detach( t );
8406 #endif
8407
8408 #ifdef HAVE_LINUX_THREADS
8409         pthread_kill_other_threads_np();
8410 #endif
8411
8412         exit( status );
8413
8414 ; return 0; }
8415 EOF
8416 if { (eval echo configure:8417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8417   rm -rf conftest*
8418   ol_cv_pthread_lpthread_lmach_lexc=yes
8419 else
8420   echo "configure: failed program was:" >&5
8421   cat conftest.$ac_ext >&5
8422   rm -rf conftest*
8423   ol_cv_pthread_lpthread_lmach_lexc=no
8424 fi
8425 rm -f conftest*
8426 else
8427   cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 /* pthread test headers */
8431 #include <pthread.h>
8432 #ifndef NULL
8433 #define NULL (void*)0
8434 #endif
8435
8436 static void *task(p)
8437         void *p;
8438 {
8439         return (void *) (p == NULL);
8440 }
8441
8442
8443 int main(argc, argv)
8444         int argc;
8445         char **argv;
8446 {
8447
8448         /* pthread test function */
8449         pthread_t t;
8450         int status;
8451 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8452         /* This system (e.g. AIX) defaults detached; must override */
8453         pthread_attr_t attr;
8454
8455         status = pthread_attr_init(&attr);
8456         if( status ) exit( status );
8457
8458         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8459         if( status ) exit( status );
8460
8461 #define ATTR    &attr
8462 #else
8463 #if HAVE_PTHREADS_D4
8464 #define ATTR    pthread_attr_default
8465 #else
8466 #define ATTR    NULL
8467 #endif
8468 #endif
8469         /* make sure pthread_create() isn't just a stub */
8470         status = pthread_create(&t, ATTR, task, NULL);
8471         if( status ) exit( status );
8472
8473         /* make sure pthread_detach() isn't just a stub */
8474 #if HAVE_PTHREADS_D4
8475         status = pthread_detach( &t );
8476 #else
8477         status = pthread_detach( t );
8478 #endif
8479
8480 #ifdef HAVE_LINUX_THREADS
8481         pthread_kill_other_threads_np();
8482 #endif
8483
8484         exit( status );
8485
8486 }
8487
8488 EOF
8489 if { (eval echo configure:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8490 then
8491   ol_cv_pthread_lpthread_lmach_lexc=yes
8492 else
8493   echo "configure: failed program was:" >&5
8494   cat conftest.$ac_ext >&5
8495   rm -fr conftest*
8496   ol_cv_pthread_lpthread_lmach_lexc=no
8497 fi
8498 rm -fr conftest*
8499 fi
8500
8501
8502                 # restore the LIBS
8503                 LIBS="$ol_LIBS"
8504         
8505 fi
8506
8507 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8508
8509         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8510                 ol_link_pthreads="-lpthread -lmach -lexc"
8511                 ol_link_threads=posix
8512         fi
8513 fi
8514
8515
8516                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8517 if test "$ol_link_threads" = no ; then
8518         # try -lpthread -Wl,-woff,85
8519         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8520 echo "configure:8521: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8521 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8522   echo $ac_n "(cached) $ac_c" 1>&6
8523 else
8524   
8525                 # save the flags
8526                 ol_LIBS="$LIBS"
8527                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8528
8529                 if test "$cross_compiling" = yes; then
8530   cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 /* pthread test headers */
8534 #include <pthread.h>
8535 #ifndef NULL
8536 #define NULL (void*)0
8537 #endif
8538
8539 static void *task(p)
8540         void *p;
8541 {
8542         return (void *) (p == NULL);
8543 }
8544
8545 int main() {
8546
8547         /* pthread test function */
8548         pthread_t t;
8549         int status;
8550 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8551         /* This system (e.g. AIX) defaults detached; must override */
8552         pthread_attr_t attr;
8553
8554         status = pthread_attr_init(&attr);
8555         if( status ) exit( status );
8556
8557         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8558         if( status ) exit( status );
8559
8560 #define ATTR    &attr
8561 #else
8562 #if HAVE_PTHREADS_D4
8563 #define ATTR    pthread_attr_default
8564 #else
8565 #define ATTR    NULL
8566 #endif
8567 #endif
8568         /* make sure pthread_create() isn't just a stub */
8569         status = pthread_create(&t, ATTR, task, NULL);
8570         if( status ) exit( status );
8571
8572         /* make sure pthread_detach() isn't just a stub */
8573 #if HAVE_PTHREADS_D4
8574         status = pthread_detach( &t );
8575 #else
8576         status = pthread_detach( t );
8577 #endif
8578
8579 #ifdef HAVE_LINUX_THREADS
8580         pthread_kill_other_threads_np();
8581 #endif
8582
8583         exit( status );
8584
8585 ; return 0; }
8586 EOF
8587 if { (eval echo configure:8588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8588   rm -rf conftest*
8589   ol_cv_pthread_lib_lpthread_woff=yes
8590 else
8591   echo "configure: failed program was:" >&5
8592   cat conftest.$ac_ext >&5
8593   rm -rf conftest*
8594   ol_cv_pthread_lib_lpthread_woff=no
8595 fi
8596 rm -f conftest*
8597 else
8598   cat > conftest.$ac_ext <<EOF
8599 #line 8600 "configure"
8600 #include "confdefs.h"
8601 /* pthread test headers */
8602 #include <pthread.h>
8603 #ifndef NULL
8604 #define NULL (void*)0
8605 #endif
8606
8607 static void *task(p)
8608         void *p;
8609 {
8610         return (void *) (p == NULL);
8611 }
8612
8613
8614 int main(argc, argv)
8615         int argc;
8616         char **argv;
8617 {
8618
8619         /* pthread test function */
8620         pthread_t t;
8621         int status;
8622 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8623         /* This system (e.g. AIX) defaults detached; must override */
8624         pthread_attr_t attr;
8625
8626         status = pthread_attr_init(&attr);
8627         if( status ) exit( status );
8628
8629         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8630         if( status ) exit( status );
8631
8632 #define ATTR    &attr
8633 #else
8634 #if HAVE_PTHREADS_D4
8635 #define ATTR    pthread_attr_default
8636 #else
8637 #define ATTR    NULL
8638 #endif
8639 #endif
8640         /* make sure pthread_create() isn't just a stub */
8641         status = pthread_create(&t, ATTR, task, NULL);
8642         if( status ) exit( status );
8643
8644         /* make sure pthread_detach() isn't just a stub */
8645 #if HAVE_PTHREADS_D4
8646         status = pthread_detach( &t );
8647 #else
8648         status = pthread_detach( t );
8649 #endif
8650
8651 #ifdef HAVE_LINUX_THREADS
8652         pthread_kill_other_threads_np();
8653 #endif
8654
8655         exit( status );
8656
8657 }
8658
8659 EOF
8660 if { (eval echo configure:8661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8661 then
8662   ol_cv_pthread_lib_lpthread_woff=yes
8663 else
8664   echo "configure: failed program was:" >&5
8665   cat conftest.$ac_ext >&5
8666   rm -fr conftest*
8667   ol_cv_pthread_lib_lpthread_woff=no
8668 fi
8669 rm -fr conftest*
8670 fi
8671
8672
8673                 # restore the LIBS
8674                 LIBS="$ol_LIBS"
8675         
8676 fi
8677
8678 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8679
8680         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8681                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8682                 ol_link_threads=posix
8683         fi
8684 fi
8685
8686
8687                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8688 if test "$ol_link_threads" = no ; then
8689         # try -lpthread
8690         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8691 echo "configure:8692: checking for pthread link with -lpthread" >&5
8692 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8693   echo $ac_n "(cached) $ac_c" 1>&6
8694 else
8695   
8696                 # save the flags
8697                 ol_LIBS="$LIBS"
8698                 LIBS="-lpthread $LIBS"
8699
8700                 if test "$cross_compiling" = yes; then
8701   cat > conftest.$ac_ext <<EOF
8702 #line 8703 "configure"
8703 #include "confdefs.h"
8704 /* pthread test headers */
8705 #include <pthread.h>
8706 #ifndef NULL
8707 #define NULL (void*)0
8708 #endif
8709
8710 static void *task(p)
8711         void *p;
8712 {
8713         return (void *) (p == NULL);
8714 }
8715
8716 int main() {
8717
8718         /* pthread test function */
8719         pthread_t t;
8720         int status;
8721 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8722         /* This system (e.g. AIX) defaults detached; must override */
8723         pthread_attr_t attr;
8724
8725         status = pthread_attr_init(&attr);
8726         if( status ) exit( status );
8727
8728         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8729         if( status ) exit( status );
8730
8731 #define ATTR    &attr
8732 #else
8733 #if HAVE_PTHREADS_D4
8734 #define ATTR    pthread_attr_default
8735 #else
8736 #define ATTR    NULL
8737 #endif
8738 #endif
8739         /* make sure pthread_create() isn't just a stub */
8740         status = pthread_create(&t, ATTR, task, NULL);
8741         if( status ) exit( status );
8742
8743         /* make sure pthread_detach() isn't just a stub */
8744 #if HAVE_PTHREADS_D4
8745         status = pthread_detach( &t );
8746 #else
8747         status = pthread_detach( t );
8748 #endif
8749
8750 #ifdef HAVE_LINUX_THREADS
8751         pthread_kill_other_threads_np();
8752 #endif
8753
8754         exit( status );
8755
8756 ; return 0; }
8757 EOF
8758 if { (eval echo configure:8759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8759   rm -rf conftest*
8760   ol_cv_pthread_lpthread=yes
8761 else
8762   echo "configure: failed program was:" >&5
8763   cat conftest.$ac_ext >&5
8764   rm -rf conftest*
8765   ol_cv_pthread_lpthread=no
8766 fi
8767 rm -f conftest*
8768 else
8769   cat > conftest.$ac_ext <<EOF
8770 #line 8771 "configure"
8771 #include "confdefs.h"
8772 /* pthread test headers */
8773 #include <pthread.h>
8774 #ifndef NULL
8775 #define NULL (void*)0
8776 #endif
8777
8778 static void *task(p)
8779         void *p;
8780 {
8781         return (void *) (p == NULL);
8782 }
8783
8784
8785 int main(argc, argv)
8786         int argc;
8787         char **argv;
8788 {
8789
8790         /* pthread test function */
8791         pthread_t t;
8792         int status;
8793 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8794         /* This system (e.g. AIX) defaults detached; must override */
8795         pthread_attr_t attr;
8796
8797         status = pthread_attr_init(&attr);
8798         if( status ) exit( status );
8799
8800         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8801         if( status ) exit( status );
8802
8803 #define ATTR    &attr
8804 #else
8805 #if HAVE_PTHREADS_D4
8806 #define ATTR    pthread_attr_default
8807 #else
8808 #define ATTR    NULL
8809 #endif
8810 #endif
8811         /* make sure pthread_create() isn't just a stub */
8812         status = pthread_create(&t, ATTR, task, NULL);
8813         if( status ) exit( status );
8814
8815         /* make sure pthread_detach() isn't just a stub */
8816 #if HAVE_PTHREADS_D4
8817         status = pthread_detach( &t );
8818 #else
8819         status = pthread_detach( t );
8820 #endif
8821
8822 #ifdef HAVE_LINUX_THREADS
8823         pthread_kill_other_threads_np();
8824 #endif
8825
8826         exit( status );
8827
8828 }
8829
8830 EOF
8831 if { (eval echo configure:8832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8832 then
8833   ol_cv_pthread_lpthread=yes
8834 else
8835   echo "configure: failed program was:" >&5
8836   cat conftest.$ac_ext >&5
8837   rm -fr conftest*
8838   ol_cv_pthread_lpthread=no
8839 fi
8840 rm -fr conftest*
8841 fi
8842
8843
8844                 # restore the LIBS
8845                 LIBS="$ol_LIBS"
8846         
8847 fi
8848
8849 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8850
8851         if test $ol_cv_pthread_lpthread = yes ; then
8852                 ol_link_pthreads="-lpthread"
8853                 ol_link_threads=posix
8854         fi
8855 fi
8856
8857                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8858 if test "$ol_link_threads" = no ; then
8859         # try -lc_r
8860         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8861 echo "configure:8862: checking for pthread link with -lc_r" >&5
8862 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8863   echo $ac_n "(cached) $ac_c" 1>&6
8864 else
8865   
8866                 # save the flags
8867                 ol_LIBS="$LIBS"
8868                 LIBS="-lc_r $LIBS"
8869
8870                 if test "$cross_compiling" = yes; then
8871   cat > conftest.$ac_ext <<EOF
8872 #line 8873 "configure"
8873 #include "confdefs.h"
8874 /* pthread test headers */
8875 #include <pthread.h>
8876 #ifndef NULL
8877 #define NULL (void*)0
8878 #endif
8879
8880 static void *task(p)
8881         void *p;
8882 {
8883         return (void *) (p == NULL);
8884 }
8885
8886 int main() {
8887
8888         /* pthread test function */
8889         pthread_t t;
8890         int status;
8891 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8892         /* This system (e.g. AIX) defaults detached; must override */
8893         pthread_attr_t attr;
8894
8895         status = pthread_attr_init(&attr);
8896         if( status ) exit( status );
8897
8898         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8899         if( status ) exit( status );
8900
8901 #define ATTR    &attr
8902 #else
8903 #if HAVE_PTHREADS_D4
8904 #define ATTR    pthread_attr_default
8905 #else
8906 #define ATTR    NULL
8907 #endif
8908 #endif
8909         /* make sure pthread_create() isn't just a stub */
8910         status = pthread_create(&t, ATTR, task, NULL);
8911         if( status ) exit( status );
8912
8913         /* make sure pthread_detach() isn't just a stub */
8914 #if HAVE_PTHREADS_D4
8915         status = pthread_detach( &t );
8916 #else
8917         status = pthread_detach( t );
8918 #endif
8919
8920 #ifdef HAVE_LINUX_THREADS
8921         pthread_kill_other_threads_np();
8922 #endif
8923
8924         exit( status );
8925
8926 ; return 0; }
8927 EOF
8928 if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8929   rm -rf conftest*
8930   ol_cv_pthread_lc_r=yes
8931 else
8932   echo "configure: failed program was:" >&5
8933   cat conftest.$ac_ext >&5
8934   rm -rf conftest*
8935   ol_cv_pthread_lc_r=no
8936 fi
8937 rm -f conftest*
8938 else
8939   cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 /* pthread test headers */
8943 #include <pthread.h>
8944 #ifndef NULL
8945 #define NULL (void*)0
8946 #endif
8947
8948 static void *task(p)
8949         void *p;
8950 {
8951         return (void *) (p == NULL);
8952 }
8953
8954
8955 int main(argc, argv)
8956         int argc;
8957         char **argv;
8958 {
8959
8960         /* pthread test function */
8961         pthread_t t;
8962         int status;
8963 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8964         /* This system (e.g. AIX) defaults detached; must override */
8965         pthread_attr_t attr;
8966
8967         status = pthread_attr_init(&attr);
8968         if( status ) exit( status );
8969
8970         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8971         if( status ) exit( status );
8972
8973 #define ATTR    &attr
8974 #else
8975 #if HAVE_PTHREADS_D4
8976 #define ATTR    pthread_attr_default
8977 #else
8978 #define ATTR    NULL
8979 #endif
8980 #endif
8981         /* make sure pthread_create() isn't just a stub */
8982         status = pthread_create(&t, ATTR, task, NULL);
8983         if( status ) exit( status );
8984
8985         /* make sure pthread_detach() isn't just a stub */
8986 #if HAVE_PTHREADS_D4
8987         status = pthread_detach( &t );
8988 #else
8989         status = pthread_detach( t );
8990 #endif
8991
8992 #ifdef HAVE_LINUX_THREADS
8993         pthread_kill_other_threads_np();
8994 #endif
8995
8996         exit( status );
8997
8998 }
8999
9000 EOF
9001 if { (eval echo configure:9002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9002 then
9003   ol_cv_pthread_lc_r=yes
9004 else
9005   echo "configure: failed program was:" >&5
9006   cat conftest.$ac_ext >&5
9007   rm -fr conftest*
9008   ol_cv_pthread_lc_r=no
9009 fi
9010 rm -fr conftest*
9011 fi
9012
9013
9014                 # restore the LIBS
9015                 LIBS="$ol_LIBS"
9016         
9017 fi
9018
9019 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9020
9021         if test $ol_cv_pthread_lc_r = yes ; then
9022                 ol_link_pthreads="-lc_r"
9023                 ol_link_threads=posix
9024         fi
9025 fi
9026
9027
9028                 # Pthread try link: -threads (ol_cv_pthread_threads)
9029 if test "$ol_link_threads" = no ; then
9030         # try -threads
9031         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9032 echo "configure:9033: checking for pthread link with -threads" >&5
9033 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9034   echo $ac_n "(cached) $ac_c" 1>&6
9035 else
9036   
9037                 # save the flags
9038                 ol_LIBS="$LIBS"
9039                 LIBS="-threads $LIBS"
9040
9041                 if test "$cross_compiling" = yes; then
9042   cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045 /* pthread test headers */
9046 #include <pthread.h>
9047 #ifndef NULL
9048 #define NULL (void*)0
9049 #endif
9050
9051 static void *task(p)
9052         void *p;
9053 {
9054         return (void *) (p == NULL);
9055 }
9056
9057 int main() {
9058
9059         /* pthread test function */
9060         pthread_t t;
9061         int status;
9062 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9063         /* This system (e.g. AIX) defaults detached; must override */
9064         pthread_attr_t attr;
9065
9066         status = pthread_attr_init(&attr);
9067         if( status ) exit( status );
9068
9069         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9070         if( status ) exit( status );
9071
9072 #define ATTR    &attr
9073 #else
9074 #if HAVE_PTHREADS_D4
9075 #define ATTR    pthread_attr_default
9076 #else
9077 #define ATTR    NULL
9078 #endif
9079 #endif
9080         /* make sure pthread_create() isn't just a stub */
9081         status = pthread_create(&t, ATTR, task, NULL);
9082         if( status ) exit( status );
9083
9084         /* make sure pthread_detach() isn't just a stub */
9085 #if HAVE_PTHREADS_D4
9086         status = pthread_detach( &t );
9087 #else
9088         status = pthread_detach( t );
9089 #endif
9090
9091 #ifdef HAVE_LINUX_THREADS
9092         pthread_kill_other_threads_np();
9093 #endif
9094
9095         exit( status );
9096
9097 ; return 0; }
9098 EOF
9099 if { (eval echo configure:9100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9100   rm -rf conftest*
9101   ol_cv_pthread_threads=yes
9102 else
9103   echo "configure: failed program was:" >&5
9104   cat conftest.$ac_ext >&5
9105   rm -rf conftest*
9106   ol_cv_pthread_threads=no
9107 fi
9108 rm -f conftest*
9109 else
9110   cat > conftest.$ac_ext <<EOF
9111 #line 9112 "configure"
9112 #include "confdefs.h"
9113 /* pthread test headers */
9114 #include <pthread.h>
9115 #ifndef NULL
9116 #define NULL (void*)0
9117 #endif
9118
9119 static void *task(p)
9120         void *p;
9121 {
9122         return (void *) (p == NULL);
9123 }
9124
9125
9126 int main(argc, argv)
9127         int argc;
9128         char **argv;
9129 {
9130
9131         /* pthread test function */
9132         pthread_t t;
9133         int status;
9134 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9135         /* This system (e.g. AIX) defaults detached; must override */
9136         pthread_attr_t attr;
9137
9138         status = pthread_attr_init(&attr);
9139         if( status ) exit( status );
9140
9141         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9142         if( status ) exit( status );
9143
9144 #define ATTR    &attr
9145 #else
9146 #if HAVE_PTHREADS_D4
9147 #define ATTR    pthread_attr_default
9148 #else
9149 #define ATTR    NULL
9150 #endif
9151 #endif
9152         /* make sure pthread_create() isn't just a stub */
9153         status = pthread_create(&t, ATTR, task, NULL);
9154         if( status ) exit( status );
9155
9156         /* make sure pthread_detach() isn't just a stub */
9157 #if HAVE_PTHREADS_D4
9158         status = pthread_detach( &t );
9159 #else
9160         status = pthread_detach( t );
9161 #endif
9162
9163 #ifdef HAVE_LINUX_THREADS
9164         pthread_kill_other_threads_np();
9165 #endif
9166
9167         exit( status );
9168
9169 }
9170
9171 EOF
9172 if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9173 then
9174   ol_cv_pthread_threads=yes
9175 else
9176   echo "configure: failed program was:" >&5
9177   cat conftest.$ac_ext >&5
9178   rm -fr conftest*
9179   ol_cv_pthread_threads=no
9180 fi
9181 rm -fr conftest*
9182 fi
9183
9184
9185                 # restore the LIBS
9186                 LIBS="$ol_LIBS"
9187         
9188 fi
9189
9190 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9191
9192         if test $ol_cv_pthread_threads = yes ; then
9193                 ol_link_pthreads="-threads"
9194                 ol_link_threads=posix
9195         fi
9196 fi
9197
9198
9199                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9200 if test "$ol_link_threads" = no ; then
9201         # try -lpthreads -lmach -lexc -lc_r
9202         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9203 echo "configure:9204: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9204 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9205   echo $ac_n "(cached) $ac_c" 1>&6
9206 else
9207   
9208                 # save the flags
9209                 ol_LIBS="$LIBS"
9210                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9211
9212                 if test "$cross_compiling" = yes; then
9213   cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216 /* pthread test headers */
9217 #include <pthread.h>
9218 #ifndef NULL
9219 #define NULL (void*)0
9220 #endif
9221
9222 static void *task(p)
9223         void *p;
9224 {
9225         return (void *) (p == NULL);
9226 }
9227
9228 int main() {
9229
9230         /* pthread test function */
9231         pthread_t t;
9232         int status;
9233 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9234         /* This system (e.g. AIX) defaults detached; must override */
9235         pthread_attr_t attr;
9236
9237         status = pthread_attr_init(&attr);
9238         if( status ) exit( status );
9239
9240         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9241         if( status ) exit( status );
9242
9243 #define ATTR    &attr
9244 #else
9245 #if HAVE_PTHREADS_D4
9246 #define ATTR    pthread_attr_default
9247 #else
9248 #define ATTR    NULL
9249 #endif
9250 #endif
9251         /* make sure pthread_create() isn't just a stub */
9252         status = pthread_create(&t, ATTR, task, NULL);
9253         if( status ) exit( status );
9254
9255         /* make sure pthread_detach() isn't just a stub */
9256 #if HAVE_PTHREADS_D4
9257         status = pthread_detach( &t );
9258 #else
9259         status = pthread_detach( t );
9260 #endif
9261
9262 #ifdef HAVE_LINUX_THREADS
9263         pthread_kill_other_threads_np();
9264 #endif
9265
9266         exit( status );
9267
9268 ; return 0; }
9269 EOF
9270 if { (eval echo configure:9271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9271   rm -rf conftest*
9272   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9273 else
9274   echo "configure: failed program was:" >&5
9275   cat conftest.$ac_ext >&5
9276   rm -rf conftest*
9277   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9278 fi
9279 rm -f conftest*
9280 else
9281   cat > conftest.$ac_ext <<EOF
9282 #line 9283 "configure"
9283 #include "confdefs.h"
9284 /* pthread test headers */
9285 #include <pthread.h>
9286 #ifndef NULL
9287 #define NULL (void*)0
9288 #endif
9289
9290 static void *task(p)
9291         void *p;
9292 {
9293         return (void *) (p == NULL);
9294 }
9295
9296
9297 int main(argc, argv)
9298         int argc;
9299         char **argv;
9300 {
9301
9302         /* pthread test function */
9303         pthread_t t;
9304         int status;
9305 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9306         /* This system (e.g. AIX) defaults detached; must override */
9307         pthread_attr_t attr;
9308
9309         status = pthread_attr_init(&attr);
9310         if( status ) exit( status );
9311
9312         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9313         if( status ) exit( status );
9314
9315 #define ATTR    &attr
9316 #else
9317 #if HAVE_PTHREADS_D4
9318 #define ATTR    pthread_attr_default
9319 #else
9320 #define ATTR    NULL
9321 #endif
9322 #endif
9323         /* make sure pthread_create() isn't just a stub */
9324         status = pthread_create(&t, ATTR, task, NULL);
9325         if( status ) exit( status );
9326
9327         /* make sure pthread_detach() isn't just a stub */
9328 #if HAVE_PTHREADS_D4
9329         status = pthread_detach( &t );
9330 #else
9331         status = pthread_detach( t );
9332 #endif
9333
9334 #ifdef HAVE_LINUX_THREADS
9335         pthread_kill_other_threads_np();
9336 #endif
9337
9338         exit( status );
9339
9340 }
9341
9342 EOF
9343 if { (eval echo configure:9344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9344 then
9345   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9346 else
9347   echo "configure: failed program was:" >&5
9348   cat conftest.$ac_ext >&5
9349   rm -fr conftest*
9350   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9351 fi
9352 rm -fr conftest*
9353 fi
9354
9355
9356                 # restore the LIBS
9357                 LIBS="$ol_LIBS"
9358         
9359 fi
9360
9361 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9362
9363         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9364                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9365                 ol_link_threads=posix
9366         fi
9367 fi
9368
9369                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9370 if test "$ol_link_threads" = no ; then
9371         # try -lpthreads -lmach -lexc
9372         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9373 echo "configure:9374: checking for pthread link with -lpthreads -lmach -lexc" >&5
9374 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9375   echo $ac_n "(cached) $ac_c" 1>&6
9376 else
9377   
9378                 # save the flags
9379                 ol_LIBS="$LIBS"
9380                 LIBS="-lpthreads -lmach -lexc $LIBS"
9381
9382                 if test "$cross_compiling" = yes; then
9383   cat > conftest.$ac_ext <<EOF
9384 #line 9385 "configure"
9385 #include "confdefs.h"
9386 /* pthread test headers */
9387 #include <pthread.h>
9388 #ifndef NULL
9389 #define NULL (void*)0
9390 #endif
9391
9392 static void *task(p)
9393         void *p;
9394 {
9395         return (void *) (p == NULL);
9396 }
9397
9398 int main() {
9399
9400         /* pthread test function */
9401         pthread_t t;
9402         int status;
9403 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9404         /* This system (e.g. AIX) defaults detached; must override */
9405         pthread_attr_t attr;
9406
9407         status = pthread_attr_init(&attr);
9408         if( status ) exit( status );
9409
9410         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9411         if( status ) exit( status );
9412
9413 #define ATTR    &attr
9414 #else
9415 #if HAVE_PTHREADS_D4
9416 #define ATTR    pthread_attr_default
9417 #else
9418 #define ATTR    NULL
9419 #endif
9420 #endif
9421         /* make sure pthread_create() isn't just a stub */
9422         status = pthread_create(&t, ATTR, task, NULL);
9423         if( status ) exit( status );
9424
9425         /* make sure pthread_detach() isn't just a stub */
9426 #if HAVE_PTHREADS_D4
9427         status = pthread_detach( &t );
9428 #else
9429         status = pthread_detach( t );
9430 #endif
9431
9432 #ifdef HAVE_LINUX_THREADS
9433         pthread_kill_other_threads_np();
9434 #endif
9435
9436         exit( status );
9437
9438 ; return 0; }
9439 EOF
9440 if { (eval echo configure:9441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9441   rm -rf conftest*
9442   ol_cv_pthread_lpthreads_lmach_lexc=yes
9443 else
9444   echo "configure: failed program was:" >&5
9445   cat conftest.$ac_ext >&5
9446   rm -rf conftest*
9447   ol_cv_pthread_lpthreads_lmach_lexc=no
9448 fi
9449 rm -f conftest*
9450 else
9451   cat > conftest.$ac_ext <<EOF
9452 #line 9453 "configure"
9453 #include "confdefs.h"
9454 /* pthread test headers */
9455 #include <pthread.h>
9456 #ifndef NULL
9457 #define NULL (void*)0
9458 #endif
9459
9460 static void *task(p)
9461         void *p;
9462 {
9463         return (void *) (p == NULL);
9464 }
9465
9466
9467 int main(argc, argv)
9468         int argc;
9469         char **argv;
9470 {
9471
9472         /* pthread test function */
9473         pthread_t t;
9474         int status;
9475 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9476         /* This system (e.g. AIX) defaults detached; must override */
9477         pthread_attr_t attr;
9478
9479         status = pthread_attr_init(&attr);
9480         if( status ) exit( status );
9481
9482         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9483         if( status ) exit( status );
9484
9485 #define ATTR    &attr
9486 #else
9487 #if HAVE_PTHREADS_D4
9488 #define ATTR    pthread_attr_default
9489 #else
9490 #define ATTR    NULL
9491 #endif
9492 #endif
9493         /* make sure pthread_create() isn't just a stub */
9494         status = pthread_create(&t, ATTR, task, NULL);
9495         if( status ) exit( status );
9496
9497         /* make sure pthread_detach() isn't just a stub */
9498 #if HAVE_PTHREADS_D4
9499         status = pthread_detach( &t );
9500 #else
9501         status = pthread_detach( t );
9502 #endif
9503
9504 #ifdef HAVE_LINUX_THREADS
9505         pthread_kill_other_threads_np();
9506 #endif
9507
9508         exit( status );
9509
9510 }
9511
9512 EOF
9513 if { (eval echo configure:9514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9514 then
9515   ol_cv_pthread_lpthreads_lmach_lexc=yes
9516 else
9517   echo "configure: failed program was:" >&5
9518   cat conftest.$ac_ext >&5
9519   rm -fr conftest*
9520   ol_cv_pthread_lpthreads_lmach_lexc=no
9521 fi
9522 rm -fr conftest*
9523 fi
9524
9525
9526                 # restore the LIBS
9527                 LIBS="$ol_LIBS"
9528         
9529 fi
9530
9531 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9532
9533         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9534                 ol_link_pthreads="-lpthreads -lmach -lexc"
9535                 ol_link_threads=posix
9536         fi
9537 fi
9538
9539                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9540 if test "$ol_link_threads" = no ; then
9541         # try -lpthreads -lexc
9542         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9543 echo "configure:9544: checking for pthread link with -lpthreads -lexc" >&5
9544 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9545   echo $ac_n "(cached) $ac_c" 1>&6
9546 else
9547   
9548                 # save the flags
9549                 ol_LIBS="$LIBS"
9550                 LIBS="-lpthreads -lexc $LIBS"
9551
9552                 if test "$cross_compiling" = yes; then
9553   cat > conftest.$ac_ext <<EOF
9554 #line 9555 "configure"
9555 #include "confdefs.h"
9556 /* pthread test headers */
9557 #include <pthread.h>
9558 #ifndef NULL
9559 #define NULL (void*)0
9560 #endif
9561
9562 static void *task(p)
9563         void *p;
9564 {
9565         return (void *) (p == NULL);
9566 }
9567
9568 int main() {
9569
9570         /* pthread test function */
9571         pthread_t t;
9572         int status;
9573 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9574         /* This system (e.g. AIX) defaults detached; must override */
9575         pthread_attr_t attr;
9576
9577         status = pthread_attr_init(&attr);
9578         if( status ) exit( status );
9579
9580         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9581         if( status ) exit( status );
9582
9583 #define ATTR    &attr
9584 #else
9585 #if HAVE_PTHREADS_D4
9586 #define ATTR    pthread_attr_default
9587 #else
9588 #define ATTR    NULL
9589 #endif
9590 #endif
9591         /* make sure pthread_create() isn't just a stub */
9592         status = pthread_create(&t, ATTR, task, NULL);
9593         if( status ) exit( status );
9594
9595         /* make sure pthread_detach() isn't just a stub */
9596 #if HAVE_PTHREADS_D4
9597         status = pthread_detach( &t );
9598 #else
9599         status = pthread_detach( t );
9600 #endif
9601
9602 #ifdef HAVE_LINUX_THREADS
9603         pthread_kill_other_threads_np();
9604 #endif
9605
9606         exit( status );
9607
9608 ; return 0; }
9609 EOF
9610 if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9611   rm -rf conftest*
9612   ol_cv_pthread_lpthreads_lexc=yes
9613 else
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -rf conftest*
9617   ol_cv_pthread_lpthreads_lexc=no
9618 fi
9619 rm -f conftest*
9620 else
9621   cat > conftest.$ac_ext <<EOF
9622 #line 9623 "configure"
9623 #include "confdefs.h"
9624 /* pthread test headers */
9625 #include <pthread.h>
9626 #ifndef NULL
9627 #define NULL (void*)0
9628 #endif
9629
9630 static void *task(p)
9631         void *p;
9632 {
9633         return (void *) (p == NULL);
9634 }
9635
9636
9637 int main(argc, argv)
9638         int argc;
9639         char **argv;
9640 {
9641
9642         /* pthread test function */
9643         pthread_t t;
9644         int status;
9645 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9646         /* This system (e.g. AIX) defaults detached; must override */
9647         pthread_attr_t attr;
9648
9649         status = pthread_attr_init(&attr);
9650         if( status ) exit( status );
9651
9652         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9653         if( status ) exit( status );
9654
9655 #define ATTR    &attr
9656 #else
9657 #if HAVE_PTHREADS_D4
9658 #define ATTR    pthread_attr_default
9659 #else
9660 #define ATTR    NULL
9661 #endif
9662 #endif
9663         /* make sure pthread_create() isn't just a stub */
9664         status = pthread_create(&t, ATTR, task, NULL);
9665         if( status ) exit( status );
9666
9667         /* make sure pthread_detach() isn't just a stub */
9668 #if HAVE_PTHREADS_D4
9669         status = pthread_detach( &t );
9670 #else
9671         status = pthread_detach( t );
9672 #endif
9673
9674 #ifdef HAVE_LINUX_THREADS
9675         pthread_kill_other_threads_np();
9676 #endif
9677
9678         exit( status );
9679
9680 }
9681
9682 EOF
9683 if { (eval echo configure:9684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9684 then
9685   ol_cv_pthread_lpthreads_lexc=yes
9686 else
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -fr conftest*
9690   ol_cv_pthread_lpthreads_lexc=no
9691 fi
9692 rm -fr conftest*
9693 fi
9694
9695
9696                 # restore the LIBS
9697                 LIBS="$ol_LIBS"
9698         
9699 fi
9700
9701 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9702
9703         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9704                 ol_link_pthreads="-lpthreads -lexc"
9705                 ol_link_threads=posix
9706         fi
9707 fi
9708
9709
9710                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9711 if test "$ol_link_threads" = no ; then
9712         # try -lpthreads
9713         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9714 echo "configure:9715: checking for pthread link with -lpthreads" >&5
9715 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   
9719                 # save the flags
9720                 ol_LIBS="$LIBS"
9721                 LIBS="-lpthreads $LIBS"
9722
9723                 if test "$cross_compiling" = yes; then
9724   cat > conftest.$ac_ext <<EOF
9725 #line 9726 "configure"
9726 #include "confdefs.h"
9727 /* pthread test headers */
9728 #include <pthread.h>
9729 #ifndef NULL
9730 #define NULL (void*)0
9731 #endif
9732
9733 static void *task(p)
9734         void *p;
9735 {
9736         return (void *) (p == NULL);
9737 }
9738
9739 int main() {
9740
9741         /* pthread test function */
9742         pthread_t t;
9743         int status;
9744 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9745         /* This system (e.g. AIX) defaults detached; must override */
9746         pthread_attr_t attr;
9747
9748         status = pthread_attr_init(&attr);
9749         if( status ) exit( status );
9750
9751         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9752         if( status ) exit( status );
9753
9754 #define ATTR    &attr
9755 #else
9756 #if HAVE_PTHREADS_D4
9757 #define ATTR    pthread_attr_default
9758 #else
9759 #define ATTR    NULL
9760 #endif
9761 #endif
9762         /* make sure pthread_create() isn't just a stub */
9763         status = pthread_create(&t, ATTR, task, NULL);
9764         if( status ) exit( status );
9765
9766         /* make sure pthread_detach() isn't just a stub */
9767 #if HAVE_PTHREADS_D4
9768         status = pthread_detach( &t );
9769 #else
9770         status = pthread_detach( t );
9771 #endif
9772
9773 #ifdef HAVE_LINUX_THREADS
9774         pthread_kill_other_threads_np();
9775 #endif
9776
9777         exit( status );
9778
9779 ; return 0; }
9780 EOF
9781 if { (eval echo configure:9782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9782   rm -rf conftest*
9783   ol_cv_pthread_lib_lpthreads=yes
9784 else
9785   echo "configure: failed program was:" >&5
9786   cat conftest.$ac_ext >&5
9787   rm -rf conftest*
9788   ol_cv_pthread_lib_lpthreads=no
9789 fi
9790 rm -f conftest*
9791 else
9792   cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795 /* pthread test headers */
9796 #include <pthread.h>
9797 #ifndef NULL
9798 #define NULL (void*)0
9799 #endif
9800
9801 static void *task(p)
9802         void *p;
9803 {
9804         return (void *) (p == NULL);
9805 }
9806
9807
9808 int main(argc, argv)
9809         int argc;
9810         char **argv;
9811 {
9812
9813         /* pthread test function */
9814         pthread_t t;
9815         int status;
9816 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9817         /* This system (e.g. AIX) defaults detached; must override */
9818         pthread_attr_t attr;
9819
9820         status = pthread_attr_init(&attr);
9821         if( status ) exit( status );
9822
9823         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9824         if( status ) exit( status );
9825
9826 #define ATTR    &attr
9827 #else
9828 #if HAVE_PTHREADS_D4
9829 #define ATTR    pthread_attr_default
9830 #else
9831 #define ATTR    NULL
9832 #endif
9833 #endif
9834         /* make sure pthread_create() isn't just a stub */
9835         status = pthread_create(&t, ATTR, task, NULL);
9836         if( status ) exit( status );
9837
9838         /* make sure pthread_detach() isn't just a stub */
9839 #if HAVE_PTHREADS_D4
9840         status = pthread_detach( &t );
9841 #else
9842         status = pthread_detach( t );
9843 #endif
9844
9845 #ifdef HAVE_LINUX_THREADS
9846         pthread_kill_other_threads_np();
9847 #endif
9848
9849         exit( status );
9850
9851 }
9852
9853 EOF
9854 if { (eval echo configure:9855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9855 then
9856   ol_cv_pthread_lib_lpthreads=yes
9857 else
9858   echo "configure: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   rm -fr conftest*
9861   ol_cv_pthread_lib_lpthreads=no
9862 fi
9863 rm -fr conftest*
9864 fi
9865
9866
9867                 # restore the LIBS
9868                 LIBS="$ol_LIBS"
9869         
9870 fi
9871
9872 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9873
9874         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9875                 ol_link_pthreads="-lpthreads"
9876                 ol_link_threads=posix
9877         fi
9878 fi
9879
9880
9881                 if test $ol_link_threads != no ; then
9882                         cat >> confdefs.h <<\EOF
9883 #define HAVE_PTHREADS 1
9884 EOF
9885
9886
9887                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9888
9889                                                 save_CPPFLAGS="$CPPFLAGS"
9890                         save_LIBS="$LIBS"
9891                         LIBS="$LTHREAD_LIBS $LIBS"
9892
9893                                                                                                 for ac_func in sched_yield pthread_yield
9894 do
9895 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9896 echo "configure:9897: checking for $ac_func" >&5
9897 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9898   echo $ac_n "(cached) $ac_c" 1>&6
9899 else
9900   cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 /* System header to define __stub macros and hopefully few prototypes,
9904     which can conflict with char $ac_func(); below.  */
9905 #include <assert.h>
9906 /* Override any gcc2 internal prototype to avoid an error.  */
9907 /* We use char because int might match the return type of a gcc2
9908     builtin and then its argument prototype would still apply.  */
9909 char $ac_func();
9910 char (*f)();
9911
9912 int main() {
9913
9914 /* The GNU C library defines this for functions which it implements
9915     to always fail with ENOSYS.  Some functions are actually named
9916     something starting with __ and the normal name is an alias.  */
9917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9918 choke me
9919 #else
9920 f = $ac_func;
9921 #endif
9922
9923 ; return 0; }
9924 EOF
9925 if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9926   rm -rf conftest*
9927   eval "ac_cv_func_$ac_func=yes"
9928 else
9929   echo "configure: failed program was:" >&5
9930   cat conftest.$ac_ext >&5
9931   rm -rf conftest*
9932   eval "ac_cv_func_$ac_func=no"
9933 fi
9934 rm -f conftest*
9935 fi
9936
9937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9938   echo "$ac_t""yes" 1>&6
9939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9940   cat >> confdefs.h <<EOF
9941 #define $ac_tr_func 1
9942 EOF
9943  
9944 else
9945   echo "$ac_t""no" 1>&6
9946 fi
9947 done
9948
9949
9950                         if test $ac_cv_func_sched_yield = no -a \
9951                                 $ac_cv_func_pthread_yield = no ; then
9952                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9953 echo "configure:9954: checking for sched_yield in -lrt" >&5
9954 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9955 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9956   echo $ac_n "(cached) $ac_c" 1>&6
9957 else
9958   ac_save_LIBS="$LIBS"
9959 LIBS="-lrt  $LIBS"
9960 cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 /* Override any gcc2 internal prototype to avoid an error.  */
9964 /* We use char because int might match the return type of a gcc2
9965     builtin and then its argument prototype would still apply.  */
9966 char sched_yield();
9967
9968 int main() {
9969 sched_yield()
9970 ; return 0; }
9971 EOF
9972 if { (eval echo configure:9973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9973   rm -rf conftest*
9974   eval "ac_cv_lib_$ac_lib_var=yes"
9975 else
9976   echo "configure: failed program was:" >&5
9977   cat conftest.$ac_ext >&5
9978   rm -rf conftest*
9979   eval "ac_cv_lib_$ac_lib_var=no"
9980 fi
9981 rm -f conftest*
9982 LIBS="$ac_save_LIBS"
9983
9984 fi
9985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9986   echo "$ac_t""yes" 1>&6
9987   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9988                                         cat >> confdefs.h <<\EOF
9989 #define HAVE_SCHED_YIELD 1
9990 EOF
9991
9992                                         ac_cv_func_sched_yield=yes
9993 else
9994   echo "$ac_t""no" 1>&6
9995 ac_cv_func_sched_yield=no
9996 fi
9997
9998                         fi
9999                         if test $ac_cv_func_sched_yield = no -a \
10000                                 $ac_cv_func_pthread_yield = no ; then
10001                                                                                                 for ac_func in thr_yield
10002 do
10003 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10004 echo "configure:10005: checking for $ac_func" >&5
10005 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10006   echo $ac_n "(cached) $ac_c" 1>&6
10007 else
10008   cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011 /* System header to define __stub macros and hopefully few prototypes,
10012     which can conflict with char $ac_func(); below.  */
10013 #include <assert.h>
10014 /* Override any gcc2 internal prototype to avoid an error.  */
10015 /* We use char because int might match the return type of a gcc2
10016     builtin and then its argument prototype would still apply.  */
10017 char $ac_func();
10018 char (*f)();
10019
10020 int main() {
10021
10022 /* The GNU C library defines this for functions which it implements
10023     to always fail with ENOSYS.  Some functions are actually named
10024     something starting with __ and the normal name is an alias.  */
10025 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10026 choke me
10027 #else
10028 f = $ac_func;
10029 #endif
10030
10031 ; return 0; }
10032 EOF
10033 if { (eval echo configure:10034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10034   rm -rf conftest*
10035   eval "ac_cv_func_$ac_func=yes"
10036 else
10037   echo "configure: failed program was:" >&5
10038   cat conftest.$ac_ext >&5
10039   rm -rf conftest*
10040   eval "ac_cv_func_$ac_func=no"
10041 fi
10042 rm -f conftest*
10043 fi
10044
10045 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10046   echo "$ac_t""yes" 1>&6
10047     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10048   cat >> confdefs.h <<EOF
10049 #define $ac_tr_func 1
10050 EOF
10051  
10052 else
10053   echo "$ac_t""no" 1>&6
10054 fi
10055 done
10056
10057                         fi
10058                         if test $ac_cv_func_sched_yield = no -a \
10059                                 $ac_cv_func_pthread_yield = no -a \
10060                                 "$ac_cv_func_thr_yield" = no ; then
10061                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10062                         fi
10063
10064                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10065 do
10066 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10067 echo "configure:10068: checking for $ac_func" >&5
10068 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10069   echo $ac_n "(cached) $ac_c" 1>&6
10070 else
10071   cat > conftest.$ac_ext <<EOF
10072 #line 10073 "configure"
10073 #include "confdefs.h"
10074 /* System header to define __stub macros and hopefully few prototypes,
10075     which can conflict with char $ac_func(); below.  */
10076 #include <assert.h>
10077 /* Override any gcc2 internal prototype to avoid an error.  */
10078 /* We use char because int might match the return type of a gcc2
10079     builtin and then its argument prototype would still apply.  */
10080 char $ac_func();
10081 char (*f)();
10082
10083 int main() {
10084
10085 /* The GNU C library defines this for functions which it implements
10086     to always fail with ENOSYS.  Some functions are actually named
10087     something starting with __ and the normal name is an alias.  */
10088 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10089 choke me
10090 #else
10091 f = $ac_func;
10092 #endif
10093
10094 ; return 0; }
10095 EOF
10096 if { (eval echo configure:10097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10097   rm -rf conftest*
10098   eval "ac_cv_func_$ac_func=yes"
10099 else
10100   echo "configure: failed program was:" >&5
10101   cat conftest.$ac_ext >&5
10102   rm -rf conftest*
10103   eval "ac_cv_func_$ac_func=no"
10104 fi
10105 rm -f conftest*
10106 fi
10107
10108 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10109   echo "$ac_t""yes" 1>&6
10110     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10111   cat >> confdefs.h <<EOF
10112 #define $ac_tr_func 1
10113 EOF
10114  
10115 else
10116   echo "$ac_t""no" 1>&6
10117 fi
10118 done
10119
10120
10121                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10122 echo "configure:10123: checking for pthread_detach with <pthread.h>" >&5
10123 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10124   echo $ac_n "(cached) $ac_c" 1>&6
10125 else
10126   
10127                                                                 cat > conftest.$ac_ext <<EOF
10128 #line 10129 "configure"
10129 #include "confdefs.h"
10130
10131 #include <pthread.h>
10132 #ifndef NULL
10133 #define NULL (void*)0
10134 #endif
10135
10136 int main() {
10137 pthread_detach(NULL);
10138 ; return 0; }
10139 EOF
10140 if { (eval echo configure:10141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10141   rm -rf conftest*
10142   ol_cv_func_pthread_detach=yes
10143 else
10144   echo "configure: failed program was:" >&5
10145   cat conftest.$ac_ext >&5
10146   rm -rf conftest*
10147   ol_cv_func_pthread_detach=no
10148 fi
10149 rm -f conftest*
10150                         
10151 fi
10152
10153 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10154
10155                         if test $ol_cv_func_pthread_detach = no ; then
10156                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10157                         fi
10158
10159                         cat >> confdefs.h <<\EOF
10160 #define HAVE_PTHREAD_DETACH 1
10161 EOF
10162
10163
10164                                                 for ac_func in \
10165                                 pthread_setconcurrency \
10166                                 pthread_getconcurrency \
10167                                 thr_setconcurrency \
10168                                 thr_getconcurrency \
10169                         
10170 do
10171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10172 echo "configure:10173: checking for $ac_func" >&5
10173 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10174   echo $ac_n "(cached) $ac_c" 1>&6
10175 else
10176   cat > conftest.$ac_ext <<EOF
10177 #line 10178 "configure"
10178 #include "confdefs.h"
10179 /* System header to define __stub macros and hopefully few prototypes,
10180     which can conflict with char $ac_func(); below.  */
10181 #include <assert.h>
10182 /* Override any gcc2 internal prototype to avoid an error.  */
10183 /* We use char because int might match the return type of a gcc2
10184     builtin and then its argument prototype would still apply.  */
10185 char $ac_func();
10186 char (*f)();
10187
10188 int main() {
10189
10190 /* The GNU C library defines this for functions which it implements
10191     to always fail with ENOSYS.  Some functions are actually named
10192     something starting with __ and the normal name is an alias.  */
10193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10194 choke me
10195 #else
10196 f = $ac_func;
10197 #endif
10198
10199 ; return 0; }
10200 EOF
10201 if { (eval echo configure:10202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10202   rm -rf conftest*
10203   eval "ac_cv_func_$ac_func=yes"
10204 else
10205   echo "configure: failed program was:" >&5
10206   cat conftest.$ac_ext >&5
10207   rm -rf conftest*
10208   eval "ac_cv_func_$ac_func=no"
10209 fi
10210 rm -f conftest*
10211 fi
10212
10213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10214   echo "$ac_t""yes" 1>&6
10215     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10216   cat >> confdefs.h <<EOF
10217 #define $ac_tr_func 1
10218 EOF
10219  
10220 else
10221   echo "$ac_t""no" 1>&6
10222 fi
10223 done
10224
10225
10226                         
10227         for ac_func in pthread_kill_other_threads_np
10228 do
10229 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10230 echo "configure:10231: checking for $ac_func" >&5
10231 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10232   echo $ac_n "(cached) $ac_c" 1>&6
10233 else
10234   cat > conftest.$ac_ext <<EOF
10235 #line 10236 "configure"
10236 #include "confdefs.h"
10237 /* System header to define __stub macros and hopefully few prototypes,
10238     which can conflict with char $ac_func(); below.  */
10239 #include <assert.h>
10240 /* Override any gcc2 internal prototype to avoid an error.  */
10241 /* We use char because int might match the return type of a gcc2
10242     builtin and then its argument prototype would still apply.  */
10243 char $ac_func();
10244 char (*f)();
10245
10246 int main() {
10247
10248 /* The GNU C library defines this for functions which it implements
10249     to always fail with ENOSYS.  Some functions are actually named
10250     something starting with __ and the normal name is an alias.  */
10251 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10252 choke me
10253 #else
10254 f = $ac_func;
10255 #endif
10256
10257 ; return 0; }
10258 EOF
10259 if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10260   rm -rf conftest*
10261   eval "ac_cv_func_$ac_func=yes"
10262 else
10263   echo "configure: failed program was:" >&5
10264   cat conftest.$ac_ext >&5
10265   rm -rf conftest*
10266   eval "ac_cv_func_$ac_func=no"
10267 fi
10268 rm -f conftest*
10269 fi
10270
10271 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10272   echo "$ac_t""yes" 1>&6
10273     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10274   cat >> confdefs.h <<EOF
10275 #define $ac_tr_func 1
10276 EOF
10277  
10278 else
10279   echo "$ac_t""no" 1>&6
10280 fi
10281 done
10282
10283         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10284 echo "configure:10285: checking for LinuxThreads implementation" >&5
10285 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10286   echo $ac_n "(cached) $ac_c" 1>&6
10287 else
10288   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10289 fi
10290
10291 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10292
10293                         
10294         
10295         
10296         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10297 echo "configure:10298: checking for LinuxThreads consistency" >&5
10298 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10299   echo $ac_n "(cached) $ac_c" 1>&6
10300 else
10301   
10302                 if test $ol_cv_header_linux_threads = yes -a \
10303                         $ol_cv_sys_linux_threads = yes; then
10304                         ol_cv_linux_threads=yes
10305                 elif test $ol_cv_header_linux_threads = no -a \
10306                         $ol_cv_sys_linux_threads = no; then
10307                         ol_cv_linux_threads=no
10308                 else
10309                         ol_cv_linux_threads=error
10310                 fi
10311         
10312 fi
10313
10314 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10315
10316
10317                         if test $ol_cv_linux_threads = error; then
10318                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10319                         fi
10320
10321                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10322 echo "configure:10323: checking if pthread_create() works" >&5
10323 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10324   echo $ac_n "(cached) $ac_c" 1>&6
10325 else
10326   
10327                         if test "$cross_compiling" = yes; then
10328                                 ol_cv_pthread_create_works=yes
10329 else
10330   cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333 /* pthread test headers */
10334 #include <pthread.h>
10335 #ifndef NULL
10336 #define NULL (void*)0
10337 #endif
10338
10339 static void *task(p)
10340         void *p;
10341 {
10342         return (void *) (p == NULL);
10343 }
10344
10345
10346 int main(argc, argv)
10347         int argc;
10348         char **argv;
10349 {
10350
10351         /* pthread test function */
10352         pthread_t t;
10353         int status;
10354 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10355         /* This system (e.g. AIX) defaults detached; must override */
10356         pthread_attr_t attr;
10357
10358         status = pthread_attr_init(&attr);
10359         if( status ) exit( status );
10360
10361         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10362         if( status ) exit( status );
10363
10364 #define ATTR    &attr
10365 #else
10366 #if HAVE_PTHREADS_D4
10367 #define ATTR    pthread_attr_default
10368 #else
10369 #define ATTR    NULL
10370 #endif
10371 #endif
10372         /* make sure pthread_create() isn't just a stub */
10373         status = pthread_create(&t, ATTR, task, NULL);
10374         if( status ) exit( status );
10375
10376         /* make sure pthread_detach() isn't just a stub */
10377 #if HAVE_PTHREADS_D4
10378         status = pthread_detach( &t );
10379 #else
10380         status = pthread_detach( t );
10381 #endif
10382
10383 #ifdef HAVE_LINUX_THREADS
10384         pthread_kill_other_threads_np();
10385 #endif
10386
10387         exit( status );
10388
10389 }
10390
10391 EOF
10392 if { (eval echo configure:10393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10393 then
10394   ol_cv_pthread_create_works=yes
10395 else
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -fr conftest*
10399   ol_cv_pthread_create_works=no
10400 fi
10401 rm -fr conftest*
10402 fi
10403
10404 fi
10405
10406 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10407
10408                         if test $ol_cv_pthread_create_works = no ; then
10409                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10410                         fi
10411
10412                                                 if test $ol_with_yielding_select = auto ; then
10413                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10414 echo "configure:10415: checking if select yields when using pthreads" >&5
10415 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10416   echo $ac_n "(cached) $ac_c" 1>&6
10417 else
10418   
10419                                 if test "$cross_compiling" = yes; then
10420   ol_cv_pthread_select_yields=cross
10421 else
10422   cat > conftest.$ac_ext <<EOF
10423 #line 10424 "configure"
10424 #include "confdefs.h"
10425
10426 #include <sys/types.h>
10427 #include <sys/time.h>
10428 #include <unistd.h>
10429 #include <pthread.h>
10430 #ifndef NULL
10431 #define NULL (void*) 0
10432 #endif
10433
10434 static int fildes[2];
10435
10436 static void *task(p)
10437         void *p;
10438 {
10439         int i;
10440         struct timeval tv;
10441
10442         fd_set rfds;
10443
10444         tv.tv_sec=10;
10445         tv.tv_usec=0;
10446
10447         FD_ZERO(&rfds);
10448         FD_SET(fildes[0], &rfds);
10449
10450         /* we're not interested in any fds */
10451         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10452
10453         if(i < 0) {
10454                 perror("select");
10455                 exit(10);
10456         }
10457
10458         exit(0); /* if we exit here, the select blocked the whole process */
10459 }
10460
10461 int main(argc, argv)
10462         int argc;
10463         char **argv;
10464 {
10465         pthread_t t;
10466
10467         /* create a pipe to select */
10468         if(pipe(&fildes[0])) {
10469                 perror("select");
10470                 exit(1);
10471         }
10472
10473 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10474         (void) pthread_setconcurrency(2);
10475 #else
10476 #ifdef HAVE_THR_SETCONCURRENCY
10477         /* Set Solaris LWP concurrency to 2 */
10478         thr_setconcurrency(2);
10479 #endif
10480 #endif
10481
10482 #if HAVE_PTHREADS_D4
10483         pthread_create(&t, pthread_attr_default, task, NULL);
10484 #else
10485         pthread_create(&t, NULL, task, NULL);
10486 #endif
10487
10488 #if HAVE_SCHED_YIELD
10489         sched_yield();  /* make sure task runs first */
10490 #else
10491 #ifdef HAVE_PTHREAD_YIELD
10492         pthread_yield();        /* make sure task runs first */
10493 #endif
10494 #endif
10495
10496         exit(2);
10497 }
10498 EOF
10499 if { (eval echo configure:10500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10500 then
10501   ol_cv_pthread_select_yields=no
10502 else
10503   echo "configure: failed program was:" >&5
10504   cat conftest.$ac_ext >&5
10505   rm -fr conftest*
10506   ol_cv_pthread_select_yields=yes
10507 fi
10508 rm -fr conftest*
10509 fi
10510
10511 fi
10512
10513 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10514
10515                                 if test $ol_cv_pthread_select_yields = cross ; then
10516                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10517                                 fi
10518
10519                                 if test $ol_cv_pthread_select_yields = yes ; then
10520                                         ol_with_yielding_select=yes
10521                                 fi
10522                         fi
10523
10524                                                 CPPFLAGS="$save_CPPFLAGS"
10525                         LIBS="$save_LIBS"
10526                 else
10527                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10528                 fi
10529         fi
10530
10531         if test $ol_with_threads = posix ; then
10532                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10533         fi
10534 fi
10535
10536 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10537         -o $ol_with_threads = mach ; then
10538
10539                 for ac_hdr in mach/cthreads.h
10540 do
10541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10543 echo "configure:10544: checking for $ac_hdr" >&5
10544 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10545   echo $ac_n "(cached) $ac_c" 1>&6
10546 else
10547   cat > conftest.$ac_ext <<EOF
10548 #line 10549 "configure"
10549 #include "confdefs.h"
10550 #include <$ac_hdr>
10551 EOF
10552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10553 { (eval echo configure:10554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10555 if test -z "$ac_err"; then
10556   rm -rf conftest*
10557   eval "ac_cv_header_$ac_safe=yes"
10558 else
10559   echo "$ac_err" >&5
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_header_$ac_safe=no"
10564 fi
10565 rm -f conftest*
10566 fi
10567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10568   echo "$ac_t""yes" 1>&6
10569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10570   cat >> confdefs.h <<EOF
10571 #define $ac_tr_hdr 1
10572 EOF
10573  
10574 else
10575   echo "$ac_t""no" 1>&6
10576 fi
10577 done
10578
10579         if test $ac_cv_header_mach_cthreads_h = yes ; then
10580                 ol_with_threads=found
10581
10582                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10583 echo "configure:10584: checking for cthread_fork" >&5
10584 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10585   echo $ac_n "(cached) $ac_c" 1>&6
10586 else
10587   cat > conftest.$ac_ext <<EOF
10588 #line 10589 "configure"
10589 #include "confdefs.h"
10590 /* System header to define __stub macros and hopefully few prototypes,
10591     which can conflict with char cthread_fork(); below.  */
10592 #include <assert.h>
10593 /* Override any gcc2 internal prototype to avoid an error.  */
10594 /* We use char because int might match the return type of a gcc2
10595     builtin and then its argument prototype would still apply.  */
10596 char cthread_fork();
10597 char (*f)();
10598
10599 int main() {
10600
10601 /* The GNU C library defines this for functions which it implements
10602     to always fail with ENOSYS.  Some functions are actually named
10603     something starting with __ and the normal name is an alias.  */
10604 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10605 choke me
10606 #else
10607 f = cthread_fork;
10608 #endif
10609
10610 ; return 0; }
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613   rm -rf conftest*
10614   eval "ac_cv_func_cthread_fork=yes"
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -rf conftest*
10619   eval "ac_cv_func_cthread_fork=no"
10620 fi
10621 rm -f conftest*
10622 fi
10623
10624 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10625   echo "$ac_t""yes" 1>&6
10626   ol_link_threads=yes
10627 else
10628   echo "$ac_t""no" 1>&6
10629 fi
10630
10631
10632                 if test $ol_link_threads = no ; then
10633                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10634 echo "configure:10635: checking for cthread_fork with -all_load" >&5
10635 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10636   echo $ac_n "(cached) $ac_c" 1>&6
10637 else
10638   
10639                                                                 save_LIBS="$LIBS"
10640                                 LIBS="-all_load $LIBS"
10641                                 cat > conftest.$ac_ext <<EOF
10642 #line 10643 "configure"
10643 #include "confdefs.h"
10644 #include <mach/cthreads.h>
10645 int main() {
10646
10647                                         cthread_fork((void *)0, (void *)0);
10648                                         
10649 ; return 0; }
10650 EOF
10651 if { (eval echo configure:10652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10652   rm -rf conftest*
10653   ol_cv_cthread_all_load=yes
10654 else
10655   echo "configure: failed program was:" >&5
10656   cat conftest.$ac_ext >&5
10657   rm -rf conftest*
10658   ol_cv_cthread_all_load=no
10659 fi
10660 rm -f conftest*
10661                                                                 LIBS="$save_LIBS"
10662                         
10663 fi
10664
10665 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10666
10667                         if test $ol_cv_cthread_all_load = yes ; then
10668                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10669                                 ol_link_threads=mach
10670                         fi
10671                 fi
10672
10673                 if test $ol_link_threads != no ; then
10674                         : check for cthread specific functionality here
10675                         cat >> confdefs.h <<\EOF
10676 #define HAVE_MACH_CTHREADS 1
10677 EOF
10678
10679                 else
10680                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10681                 fi
10682         fi
10683
10684         if test $ol_with_threads = mach ; then
10685                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10686         fi
10687 fi
10688
10689 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10690         -o $ol_with_threads = pth ; then
10691
10692         for ac_hdr in pth.h
10693 do
10694 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10695 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10696 echo "configure:10697: checking for $ac_hdr" >&5
10697 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10698   echo $ac_n "(cached) $ac_c" 1>&6
10699 else
10700   cat > conftest.$ac_ext <<EOF
10701 #line 10702 "configure"
10702 #include "confdefs.h"
10703 #include <$ac_hdr>
10704 EOF
10705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10706 { (eval echo configure:10707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10708 if test -z "$ac_err"; then
10709   rm -rf conftest*
10710   eval "ac_cv_header_$ac_safe=yes"
10711 else
10712   echo "$ac_err" >&5
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -rf conftest*
10716   eval "ac_cv_header_$ac_safe=no"
10717 fi
10718 rm -f conftest*
10719 fi
10720 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10721   echo "$ac_t""yes" 1>&6
10722     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10723   cat >> confdefs.h <<EOF
10724 #define $ac_tr_hdr 1
10725 EOF
10726  
10727 else
10728   echo "$ac_t""no" 1>&6
10729 fi
10730 done
10731
10732
10733         if test $ac_cv_header_pth_h = yes ; then
10734                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10735 echo "configure:10736: checking for pth_version in -lpth" >&5
10736 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   ac_save_LIBS="$LIBS"
10741 LIBS="-lpth  $LIBS"
10742 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745 /* Override any gcc2 internal prototype to avoid an error.  */
10746 /* We use char because int might match the return type of a gcc2
10747     builtin and then its argument prototype would still apply.  */
10748 char pth_version();
10749
10750 int main() {
10751 pth_version()
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10755   rm -rf conftest*
10756   eval "ac_cv_lib_$ac_lib_var=yes"
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=no"
10762 fi
10763 rm -f conftest*
10764 LIBS="$ac_save_LIBS"
10765
10766 fi
10767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10768   echo "$ac_t""yes" 1>&6
10769   have_pth=yes
10770 else
10771   echo "$ac_t""no" 1>&6
10772 have_pth=no
10773 fi
10774
10775
10776                 if test $have_pth = yes ; then
10777                         cat >> confdefs.h <<\EOF
10778 #define HAVE_GNU_PTH 1
10779 EOF
10780
10781                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10782                         ol_link_threads=pth
10783
10784                         if test $ol_with_yielding_select = auto ; then
10785                                 ol_with_yielding_select=yes
10786                         fi
10787                 fi
10788         fi
10789 fi
10790
10791 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10792         -o $ol_with_threads = lwp ; then
10793
10794                 for ac_hdr in thread.h synch.h
10795 do
10796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10798 echo "configure:10799: checking for $ac_hdr" >&5
10799 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10800   echo $ac_n "(cached) $ac_c" 1>&6
10801 else
10802   cat > conftest.$ac_ext <<EOF
10803 #line 10804 "configure"
10804 #include "confdefs.h"
10805 #include <$ac_hdr>
10806 EOF
10807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10808 { (eval echo configure:10809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10810 if test -z "$ac_err"; then
10811   rm -rf conftest*
10812   eval "ac_cv_header_$ac_safe=yes"
10813 else
10814   echo "$ac_err" >&5
10815   echo "configure: failed program was:" >&5
10816   cat conftest.$ac_ext >&5
10817   rm -rf conftest*
10818   eval "ac_cv_header_$ac_safe=no"
10819 fi
10820 rm -f conftest*
10821 fi
10822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10823   echo "$ac_t""yes" 1>&6
10824     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10825   cat >> confdefs.h <<EOF
10826 #define $ac_tr_hdr 1
10827 EOF
10828  
10829 else
10830   echo "$ac_t""no" 1>&6
10831 fi
10832 done
10833
10834         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10835                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10836 echo "configure:10837: checking for thr_create in -lthread" >&5
10837 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10839   echo $ac_n "(cached) $ac_c" 1>&6
10840 else
10841   ac_save_LIBS="$LIBS"
10842 LIBS="-lthread  $LIBS"
10843 cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846 /* Override any gcc2 internal prototype to avoid an error.  */
10847 /* We use char because int might match the return type of a gcc2
10848     builtin and then its argument prototype would still apply.  */
10849 char thr_create();
10850
10851 int main() {
10852 thr_create()
10853 ; return 0; }
10854 EOF
10855 if { (eval echo configure:10856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10856   rm -rf conftest*
10857   eval "ac_cv_lib_$ac_lib_var=yes"
10858 else
10859   echo "configure: failed program was:" >&5
10860   cat conftest.$ac_ext >&5
10861   rm -rf conftest*
10862   eval "ac_cv_lib_$ac_lib_var=no"
10863 fi
10864 rm -f conftest*
10865 LIBS="$ac_save_LIBS"
10866
10867 fi
10868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10869   echo "$ac_t""yes" 1>&6
10870   have_thr=yes
10871 else
10872   echo "$ac_t""no" 1>&6
10873 have_thr=no
10874 fi
10875
10876
10877                 if test $have_thr = yes ; then
10878                         cat >> confdefs.h <<\EOF
10879 #define HAVE_THR 1
10880 EOF
10881
10882                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10883                         ol_link_threads=thr
10884
10885                         if test $ol_with_yielding_select = auto ; then
10886                                 ol_with_yielding_select=yes
10887                         fi
10888
10889                                                 for ac_func in \
10890                                 thr_setconcurrency \
10891                                 thr_getconcurrency \
10892                         
10893 do
10894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10895 echo "configure:10896: checking for $ac_func" >&5
10896 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10897   echo $ac_n "(cached) $ac_c" 1>&6
10898 else
10899   cat > conftest.$ac_ext <<EOF
10900 #line 10901 "configure"
10901 #include "confdefs.h"
10902 /* System header to define __stub macros and hopefully few prototypes,
10903     which can conflict with char $ac_func(); below.  */
10904 #include <assert.h>
10905 /* Override any gcc2 internal prototype to avoid an error.  */
10906 /* We use char because int might match the return type of a gcc2
10907     builtin and then its argument prototype would still apply.  */
10908 char $ac_func();
10909 char (*f)();
10910
10911 int main() {
10912
10913 /* The GNU C library defines this for functions which it implements
10914     to always fail with ENOSYS.  Some functions are actually named
10915     something starting with __ and the normal name is an alias.  */
10916 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10917 choke me
10918 #else
10919 f = $ac_func;
10920 #endif
10921
10922 ; return 0; }
10923 EOF
10924 if { (eval echo configure:10925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10925   rm -rf conftest*
10926   eval "ac_cv_func_$ac_func=yes"
10927 else
10928   echo "configure: failed program was:" >&5
10929   cat conftest.$ac_ext >&5
10930   rm -rf conftest*
10931   eval "ac_cv_func_$ac_func=no"
10932 fi
10933 rm -f conftest*
10934 fi
10935
10936 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10937   echo "$ac_t""yes" 1>&6
10938     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10939   cat >> confdefs.h <<EOF
10940 #define $ac_tr_func 1
10941 EOF
10942  
10943 else
10944   echo "$ac_t""no" 1>&6
10945 fi
10946 done
10947
10948                 fi
10949         fi
10950
10951                 for ac_hdr in lwp/lwp.h
10952 do
10953 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10954 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10955 echo "configure:10956: checking for $ac_hdr" >&5
10956 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10957   echo $ac_n "(cached) $ac_c" 1>&6
10958 else
10959   cat > conftest.$ac_ext <<EOF
10960 #line 10961 "configure"
10961 #include "confdefs.h"
10962 #include <$ac_hdr>
10963 EOF
10964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10965 { (eval echo configure:10966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10967 if test -z "$ac_err"; then
10968   rm -rf conftest*
10969   eval "ac_cv_header_$ac_safe=yes"
10970 else
10971   echo "$ac_err" >&5
10972   echo "configure: failed program was:" >&5
10973   cat conftest.$ac_ext >&5
10974   rm -rf conftest*
10975   eval "ac_cv_header_$ac_safe=no"
10976 fi
10977 rm -f conftest*
10978 fi
10979 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10980   echo "$ac_t""yes" 1>&6
10981     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10982   cat >> confdefs.h <<EOF
10983 #define $ac_tr_hdr 1
10984 EOF
10985  
10986 else
10987   echo "$ac_t""no" 1>&6
10988 fi
10989 done
10990
10991         if test $ac_cv_header_lwp_lwp_h = yes ; then
10992                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10993 echo "configure:10994: checking for lwp_create in -llwp" >&5
10994 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10996   echo $ac_n "(cached) $ac_c" 1>&6
10997 else
10998   ac_save_LIBS="$LIBS"
10999 LIBS="-llwp  $LIBS"
11000 cat > conftest.$ac_ext <<EOF
11001 #line 11002 "configure"
11002 #include "confdefs.h"
11003 /* Override any gcc2 internal prototype to avoid an error.  */
11004 /* We use char because int might match the return type of a gcc2
11005     builtin and then its argument prototype would still apply.  */
11006 char lwp_create();
11007
11008 int main() {
11009 lwp_create()
11010 ; return 0; }
11011 EOF
11012 if { (eval echo configure:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11013   rm -rf conftest*
11014   eval "ac_cv_lib_$ac_lib_var=yes"
11015 else
11016   echo "configure: failed program was:" >&5
11017   cat conftest.$ac_ext >&5
11018   rm -rf conftest*
11019   eval "ac_cv_lib_$ac_lib_var=no"
11020 fi
11021 rm -f conftest*
11022 LIBS="$ac_save_LIBS"
11023
11024 fi
11025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11026   echo "$ac_t""yes" 1>&6
11027   have_lwp=yes
11028 else
11029   echo "$ac_t""no" 1>&6
11030 have_lwp=no
11031 fi
11032
11033
11034                 if test $have_lwp = yes ; then
11035                         cat >> confdefs.h <<\EOF
11036 #define HAVE_LWP 1
11037 EOF
11038
11039                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11040                         ol_link_threads=lwp
11041
11042                         if test $ol_with_yielding_select = auto ; then
11043                                 ol_with_yielding_select=no
11044                         fi
11045                 fi
11046         fi
11047 fi
11048
11049 if test $ol_with_yielding_select = yes ; then
11050         cat >> confdefs.h <<\EOF
11051 #define HAVE_YIELDING_SELECT 1
11052 EOF
11053
11054 fi
11055
11056 if test $ol_with_threads = manual ; then
11057                 ol_link_threads=yes
11058
11059         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11060
11061         for ac_hdr in pthread.h sched.h
11062 do
11063 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11064 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11065 echo "configure:11066: checking for $ac_hdr" >&5
11066 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11067   echo $ac_n "(cached) $ac_c" 1>&6
11068 else
11069   cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072 #include <$ac_hdr>
11073 EOF
11074 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11075 { (eval echo configure:11076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11076 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11077 if test -z "$ac_err"; then
11078   rm -rf conftest*
11079   eval "ac_cv_header_$ac_safe=yes"
11080 else
11081   echo "$ac_err" >&5
11082   echo "configure: failed program was:" >&5
11083   cat conftest.$ac_ext >&5
11084   rm -rf conftest*
11085   eval "ac_cv_header_$ac_safe=no"
11086 fi
11087 rm -f conftest*
11088 fi
11089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11090   echo "$ac_t""yes" 1>&6
11091     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11092   cat >> confdefs.h <<EOF
11093 #define $ac_tr_hdr 1
11094 EOF
11095  
11096 else
11097   echo "$ac_t""no" 1>&6
11098 fi
11099 done
11100
11101         for ac_func in sched_yield pthread_yield
11102 do
11103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11104 echo "configure:11105: checking for $ac_func" >&5
11105 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11106   echo $ac_n "(cached) $ac_c" 1>&6
11107 else
11108   cat > conftest.$ac_ext <<EOF
11109 #line 11110 "configure"
11110 #include "confdefs.h"
11111 /* System header to define __stub macros and hopefully few prototypes,
11112     which can conflict with char $ac_func(); below.  */
11113 #include <assert.h>
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 /* We use char because int might match the return type of a gcc2
11116     builtin and then its argument prototype would still apply.  */
11117 char $ac_func();
11118 char (*f)();
11119
11120 int main() {
11121
11122 /* The GNU C library defines this for functions which it implements
11123     to always fail with ENOSYS.  Some functions are actually named
11124     something starting with __ and the normal name is an alias.  */
11125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11126 choke me
11127 #else
11128 f = $ac_func;
11129 #endif
11130
11131 ; return 0; }
11132 EOF
11133 if { (eval echo configure:11134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11134   rm -rf conftest*
11135   eval "ac_cv_func_$ac_func=yes"
11136 else
11137   echo "configure: failed program was:" >&5
11138   cat conftest.$ac_ext >&5
11139   rm -rf conftest*
11140   eval "ac_cv_func_$ac_func=no"
11141 fi
11142 rm -f conftest*
11143 fi
11144
11145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11146   echo "$ac_t""yes" 1>&6
11147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11148   cat >> confdefs.h <<EOF
11149 #define $ac_tr_func 1
11150 EOF
11151  
11152 else
11153   echo "$ac_t""no" 1>&6
11154 fi
11155 done
11156
11157         
11158         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11159 echo "configure:11160: checking for LinuxThreads pthread.h" >&5
11160 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11161   echo $ac_n "(cached) $ac_c" 1>&6
11162 else
11163   cat > conftest.$ac_ext <<EOF
11164 #line 11165 "configure"
11165 #include "confdefs.h"
11166 #include <pthread.h>
11167 EOF
11168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11169   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11170   rm -rf conftest*
11171   ol_cv_header_linux_threads=yes
11172 else
11173   rm -rf conftest*
11174   ol_cv_header_linux_threads=no
11175 fi
11176 rm -f conftest*
11177
11178                 
11179 fi
11180
11181 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11182         if test $ol_cv_header_linux_threads = yes; then
11183                 cat >> confdefs.h <<\EOF
11184 #define HAVE_LINUX_THREADS 1
11185 EOF
11186
11187         fi
11188
11189
11190         for ac_hdr in mach/cthreads.h
11191 do
11192 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11193 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11194 echo "configure:11195: checking for $ac_hdr" >&5
11195 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11196   echo $ac_n "(cached) $ac_c" 1>&6
11197 else
11198   cat > conftest.$ac_ext <<EOF
11199 #line 11200 "configure"
11200 #include "confdefs.h"
11201 #include <$ac_hdr>
11202 EOF
11203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11204 { (eval echo configure:11205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11206 if test -z "$ac_err"; then
11207   rm -rf conftest*
11208   eval "ac_cv_header_$ac_safe=yes"
11209 else
11210   echo "$ac_err" >&5
11211   echo "configure: failed program was:" >&5
11212   cat conftest.$ac_ext >&5
11213   rm -rf conftest*
11214   eval "ac_cv_header_$ac_safe=no"
11215 fi
11216 rm -f conftest*
11217 fi
11218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11219   echo "$ac_t""yes" 1>&6
11220     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11221   cat >> confdefs.h <<EOF
11222 #define $ac_tr_hdr 1
11223 EOF
11224  
11225 else
11226   echo "$ac_t""no" 1>&6
11227 fi
11228 done
11229
11230         for ac_hdr in lwp/lwp.h
11231 do
11232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11234 echo "configure:11235: checking for $ac_hdr" >&5
11235 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11236   echo $ac_n "(cached) $ac_c" 1>&6
11237 else
11238   cat > conftest.$ac_ext <<EOF
11239 #line 11240 "configure"
11240 #include "confdefs.h"
11241 #include <$ac_hdr>
11242 EOF
11243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11244 { (eval echo configure:11245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11246 if test -z "$ac_err"; then
11247   rm -rf conftest*
11248   eval "ac_cv_header_$ac_safe=yes"
11249 else
11250   echo "$ac_err" >&5
11251   echo "configure: failed program was:" >&5
11252   cat conftest.$ac_ext >&5
11253   rm -rf conftest*
11254   eval "ac_cv_header_$ac_safe=no"
11255 fi
11256 rm -f conftest*
11257 fi
11258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11259   echo "$ac_t""yes" 1>&6
11260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11261   cat >> confdefs.h <<EOF
11262 #define $ac_tr_hdr 1
11263 EOF
11264  
11265 else
11266   echo "$ac_t""no" 1>&6
11267 fi
11268 done
11269
11270         for ac_hdr in thread.h synch.h
11271 do
11272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11274 echo "configure:11275: checking for $ac_hdr" >&5
11275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11276   echo $ac_n "(cached) $ac_c" 1>&6
11277 else
11278   cat > conftest.$ac_ext <<EOF
11279 #line 11280 "configure"
11280 #include "confdefs.h"
11281 #include <$ac_hdr>
11282 EOF
11283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11284 { (eval echo configure:11285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11286 if test -z "$ac_err"; then
11287   rm -rf conftest*
11288   eval "ac_cv_header_$ac_safe=yes"
11289 else
11290   echo "$ac_err" >&5
11291   echo "configure: failed program was:" >&5
11292   cat conftest.$ac_ext >&5
11293   rm -rf conftest*
11294   eval "ac_cv_header_$ac_safe=no"
11295 fi
11296 rm -f conftest*
11297 fi
11298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11299   echo "$ac_t""yes" 1>&6
11300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11301   cat >> confdefs.h <<EOF
11302 #define $ac_tr_hdr 1
11303 EOF
11304  
11305 else
11306   echo "$ac_t""no" 1>&6
11307 fi
11308 done
11309
11310 fi
11311
11312 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11313                         cat >> confdefs.h <<\EOF
11314 #define REENTRANT 1
11315 EOF
11316
11317         cat >> confdefs.h <<\EOF
11318 #define _REENTRANT 1
11319 EOF
11320
11321         cat >> confdefs.h <<\EOF
11322 #define THREAD_SAFE 1
11323 EOF
11324
11325         cat >> confdefs.h <<\EOF
11326 #define _THREAD_SAFE 1
11327 EOF
11328
11329         cat >> confdefs.h <<\EOF
11330 #define THREADSAFE 1
11331 EOF
11332
11333         cat >> confdefs.h <<\EOF
11334 #define _THREADSAFE 1
11335 EOF
11336
11337         cat >> confdefs.h <<\EOF
11338 #define _SGI_MP_SOURCE 1
11339 EOF
11340
11341
11342                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11343 echo "configure:11344: checking for thread specific errno" >&5
11344 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11345   echo $ac_n "(cached) $ac_c" 1>&6
11346 else
11347   
11348                 cat > conftest.$ac_ext <<EOF
11349 #line 11350 "configure"
11350 #include "confdefs.h"
11351 #include <errno.h>
11352 int main() {
11353 errno = 0;
11354 ; return 0; }
11355 EOF
11356 if { (eval echo configure:11357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11357   rm -rf conftest*
11358   ol_cv_errno_thread_specific=yes
11359 else
11360   echo "configure: failed program was:" >&5
11361   cat conftest.$ac_ext >&5
11362   rm -rf conftest*
11363   ol_cv_errno_thread_specific=no
11364 fi
11365 rm -f conftest*
11366         
11367 fi
11368
11369 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11370
11371                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11372 echo "configure:11373: checking for thread specific h_errno" >&5
11373 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11374   echo $ac_n "(cached) $ac_c" 1>&6
11375 else
11376   
11377                 cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380 #include <netdb.h>
11381 int main() {
11382 h_errno = 0;
11383 ; return 0; }
11384 EOF
11385 if { (eval echo configure:11386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11386   rm -rf conftest*
11387   ol_cv_h_errno_thread_specific=yes
11388 else
11389   echo "configure: failed program was:" >&5
11390   cat conftest.$ac_ext >&5
11391   rm -rf conftest*
11392   ol_cv_h_errno_thread_specific=no
11393 fi
11394 rm -f conftest*
11395         
11396 fi
11397
11398 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11399
11400         if test $ol_cv_errno_thread_specific != yes \
11401                 -o $ol_cv_h_errno_thread_specific != yes ; then
11402                 LIBS="$LTHREAD_LIBS $LIBS"
11403                 LTHREAD_LIBS=""
11404         fi
11405
11406 fi  
11407
11408 if test $ol_link_threads = no ; then
11409         if test $ol_with_threads = yes ; then
11410                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11411         fi
11412
11413         if test $ol_with_threads = auto ; then
11414                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11415                 ol_with_threads=no
11416         fi
11417
11418         cat >> confdefs.h <<\EOF
11419 #define NO_THREADS 1
11420 EOF
11421
11422         LTHREAD_LIBS=""
11423 fi
11424
11425 if test $ol_link_threads != no ; then
11426         cat >> confdefs.h <<\EOF
11427 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11428 EOF
11429
11430 fi
11431
11432 ol_link_ldbm=no 
11433
11434 if test $ol_with_ldbm_api = auto \
11435         -o $ol_with_ldbm_api = berkeley \
11436         -o $ol_with_ldbm_api = bcompat ; then
11437
11438         if test $ol_with_ldbm_api = bcompat; then \
11439                 ol_cv_berkeley_db=no
11440 for ac_hdr in db_185.h db.h
11441 do
11442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11444 echo "configure:11445: checking for $ac_hdr" >&5
11445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11446   echo $ac_n "(cached) $ac_c" 1>&6
11447 else
11448   cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451 #include <$ac_hdr>
11452 EOF
11453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11454 { (eval echo configure:11455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11456 if test -z "$ac_err"; then
11457   rm -rf conftest*
11458   eval "ac_cv_header_$ac_safe=yes"
11459 else
11460   echo "$ac_err" >&5
11461   echo "configure: failed program was:" >&5
11462   cat conftest.$ac_ext >&5
11463   rm -rf conftest*
11464   eval "ac_cv_header_$ac_safe=no"
11465 fi
11466 rm -f conftest*
11467 fi
11468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11469   echo "$ac_t""yes" 1>&6
11470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11471   cat >> confdefs.h <<EOF
11472 #define $ac_tr_hdr 1
11473 EOF
11474  
11475 else
11476   echo "$ac_t""no" 1>&6
11477 fi
11478 done
11479
11480 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11481         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11482 echo "configure:11483: checking if Berkeley DB header compatibility" >&5
11483 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11484   echo $ac_n "(cached) $ac_c" 1>&6
11485 else
11486   
11487                 cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490
11491 #if HAVE_DB_185_H
11492 #       include <db_185.h>
11493 #else
11494 #       include <db.h>
11495 #endif
11496
11497  /* this check could be improved */
11498 #ifndef DB_VERSION_MAJOR
11499 #       define DB_VERSION_MAJOR 1
11500 #endif
11501
11502 #if DB_VERSION_MAJOR == 1 
11503         __db_version_1
11504 #endif
11505
11506 EOF
11507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11508   egrep "__db_version_1" >/dev/null 2>&1; then
11509   rm -rf conftest*
11510   ol_cv_header_db1=yes
11511 else
11512   rm -rf conftest*
11513   ol_cv_header_db1=no
11514 fi
11515 rm -f conftest*
11516
11517 fi
11518
11519 echo "$ac_t""$ol_cv_header_db1" 1>&6
11520
11521         if test ol_cv_header_db1=yes ; then
11522                 ol_cv_lib_db=no
11523 if test $ol_cv_lib_db = no ; then
11524         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11525 echo "configure:11526: checking for Berkeley DB link (default)" >&5
11526 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11527   echo $ac_n "(cached) $ac_c" 1>&6
11528 else
11529   
11530         ol_DB_LIB=
11531         ol_LIBS=$LIBS
11532         LIBS="$ol_DB_LIB $LIBS"
11533
11534         cat > conftest.$ac_ext <<EOF
11535 #line 11536 "configure"
11536 #include "confdefs.h"
11537
11538 #ifdef HAVE_DB_185_H
11539 # include <db_185.h>
11540 #else
11541 # include <db.h>
11542 #endif
11543
11544 #ifndef DB_VERSION_MAJOR
11545 # define DB_VERSION_MAJOR 1
11546 #endif
11547
11548 #ifndef NULL
11549 #define NULL ((void*)0)
11550 #endif
11551
11552 int main() {
11553
11554 #if DB_VERSION_MAJOR > 2
11555         db_env_create( NULL, 0 );
11556 #elif DB_VERSION_MAJOR > 1
11557         db_appexit( NULL );
11558 #else
11559         (void) dbopen( NULL, 0, 0, 0, NULL);
11560 #endif
11561
11562 ; return 0; }
11563 EOF
11564 if { (eval echo configure:11565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11565   rm -rf conftest*
11566   ol_cv_db_none=yes
11567 else
11568   echo "configure: failed program was:" >&5
11569   cat conftest.$ac_ext >&5
11570   rm -rf conftest*
11571   ol_cv_db_none=no
11572 fi
11573 rm -f conftest*
11574
11575         LIBS="$ol_LIBS"
11576
11577 fi
11578
11579 echo "$ac_t""$ol_cv_db_none" 1>&6
11580
11581         if test $ol_cv_db_none = yes ; then
11582                 ol_cv_lib_db=yes
11583         fi
11584 fi
11585
11586 if test $ol_cv_lib_db = no ; then
11587         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11588 echo "configure:11589: checking for Berkeley DB link (-ldb)" >&5
11589 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   
11593         ol_DB_LIB=-ldb
11594         ol_LIBS=$LIBS
11595         LIBS="$ol_DB_LIB $LIBS"
11596
11597         cat > conftest.$ac_ext <<EOF
11598 #line 11599 "configure"
11599 #include "confdefs.h"
11600
11601 #ifdef HAVE_DB_185_H
11602 # include <db_185.h>
11603 #else
11604 # include <db.h>
11605 #endif
11606
11607 #ifndef DB_VERSION_MAJOR
11608 # define DB_VERSION_MAJOR 1
11609 #endif
11610
11611 #ifndef NULL
11612 #define NULL ((void*)0)
11613 #endif
11614
11615 int main() {
11616
11617 #if DB_VERSION_MAJOR > 2
11618         db_env_create( NULL, 0 );
11619 #elif DB_VERSION_MAJOR > 1
11620         db_appexit( NULL );
11621 #else
11622         (void) dbopen( NULL, 0, 0, 0, NULL);
11623 #endif
11624
11625 ; return 0; }
11626 EOF
11627 if { (eval echo configure:11628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11628   rm -rf conftest*
11629   ol_cv_db_db=yes
11630 else
11631   echo "configure: failed program was:" >&5
11632   cat conftest.$ac_ext >&5
11633   rm -rf conftest*
11634   ol_cv_db_db=no
11635 fi
11636 rm -f conftest*
11637
11638         LIBS="$ol_LIBS"
11639
11640 fi
11641
11642 echo "$ac_t""$ol_cv_db_db" 1>&6
11643
11644         if test $ol_cv_db_db = yes ; then
11645                 ol_cv_lib_db=-ldb
11646         fi
11647 fi
11648
11649 if test $ol_cv_lib_db = no ; then
11650         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11651 echo "configure:11652: checking for Berkeley DB link (-ldb3)" >&5
11652 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11653   echo $ac_n "(cached) $ac_c" 1>&6
11654 else
11655   
11656         ol_DB_LIB=-ldb3
11657         ol_LIBS=$LIBS
11658         LIBS="$ol_DB_LIB $LIBS"
11659
11660         cat > conftest.$ac_ext <<EOF
11661 #line 11662 "configure"
11662 #include "confdefs.h"
11663
11664 #ifdef HAVE_DB_185_H
11665 # include <db_185.h>
11666 #else
11667 # include <db.h>
11668 #endif
11669
11670 #ifndef DB_VERSION_MAJOR
11671 # define DB_VERSION_MAJOR 1
11672 #endif
11673
11674 #ifndef NULL
11675 #define NULL ((void*)0)
11676 #endif
11677
11678 int main() {
11679
11680 #if DB_VERSION_MAJOR > 2
11681         db_env_create( NULL, 0 );
11682 #elif DB_VERSION_MAJOR > 1
11683         db_appexit( NULL );
11684 #else
11685         (void) dbopen( NULL, 0, 0, 0, NULL);
11686 #endif
11687
11688 ; return 0; }
11689 EOF
11690 if { (eval echo configure:11691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11691   rm -rf conftest*
11692   ol_cv_db_db3=yes
11693 else
11694   echo "configure: failed program was:" >&5
11695   cat conftest.$ac_ext >&5
11696   rm -rf conftest*
11697   ol_cv_db_db3=no
11698 fi
11699 rm -f conftest*
11700
11701         LIBS="$ol_LIBS"
11702
11703 fi
11704
11705 echo "$ac_t""$ol_cv_db_db3" 1>&6
11706
11707         if test $ol_cv_db_db3 = yes ; then
11708                 ol_cv_lib_db=-ldb3
11709         fi
11710 fi
11711
11712 if test $ol_cv_lib_db = no ; then
11713         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11714 echo "configure:11715: checking for Berkeley DB link (-ldb2)" >&5
11715 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11716   echo $ac_n "(cached) $ac_c" 1>&6
11717 else
11718   
11719         ol_DB_LIB=-ldb2
11720         ol_LIBS=$LIBS
11721         LIBS="$ol_DB_LIB $LIBS"
11722
11723         cat > conftest.$ac_ext <<EOF
11724 #line 11725 "configure"
11725 #include "confdefs.h"
11726
11727 #ifdef HAVE_DB_185_H
11728 # include <db_185.h>
11729 #else
11730 # include <db.h>
11731 #endif
11732
11733 #ifndef DB_VERSION_MAJOR
11734 # define DB_VERSION_MAJOR 1
11735 #endif
11736
11737 #ifndef NULL
11738 #define NULL ((void*)0)
11739 #endif
11740
11741 int main() {
11742
11743 #if DB_VERSION_MAJOR > 2
11744         db_env_create( NULL, 0 );
11745 #elif DB_VERSION_MAJOR > 1
11746         db_appexit( NULL );
11747 #else
11748         (void) dbopen( NULL, 0, 0, 0, NULL);
11749 #endif
11750
11751 ; return 0; }
11752 EOF
11753 if { (eval echo configure:11754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11754   rm -rf conftest*
11755   ol_cv_db_db2=yes
11756 else
11757   echo "configure: failed program was:" >&5
11758   cat conftest.$ac_ext >&5
11759   rm -rf conftest*
11760   ol_cv_db_db2=no
11761 fi
11762 rm -f conftest*
11763
11764         LIBS="$ol_LIBS"
11765
11766 fi
11767
11768 echo "$ac_t""$ol_cv_db_db2" 1>&6
11769
11770         if test $ol_cv_db_db2 = yes ; then
11771                 ol_cv_lib_db=-ldb2
11772         fi
11773 fi
11774
11775 if test $ol_cv_lib_db = no ; then
11776         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11777 echo "configure:11778: checking for Berkeley DB link (-ldb1)" >&5
11778 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11779   echo $ac_n "(cached) $ac_c" 1>&6
11780 else
11781   
11782         ol_DB_LIB=-ldb1
11783         ol_LIBS=$LIBS
11784         LIBS="$ol_DB_LIB $LIBS"
11785
11786         cat > conftest.$ac_ext <<EOF
11787 #line 11788 "configure"
11788 #include "confdefs.h"
11789
11790 #ifdef HAVE_DB_185_H
11791 # include <db_185.h>
11792 #else
11793 # include <db.h>
11794 #endif
11795
11796 #ifndef DB_VERSION_MAJOR
11797 # define DB_VERSION_MAJOR 1
11798 #endif
11799
11800 #ifndef NULL
11801 #define NULL ((void*)0)
11802 #endif
11803
11804 int main() {
11805
11806 #if DB_VERSION_MAJOR > 2
11807         db_env_create( NULL, 0 );
11808 #elif DB_VERSION_MAJOR > 1
11809         db_appexit( NULL );
11810 #else
11811         (void) dbopen( NULL, 0, 0, 0, NULL);
11812 #endif
11813
11814 ; return 0; }
11815 EOF
11816 if { (eval echo configure:11817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11817   rm -rf conftest*
11818   ol_cv_db_db1=yes
11819 else
11820   echo "configure: failed program was:" >&5
11821   cat conftest.$ac_ext >&5
11822   rm -rf conftest*
11823   ol_cv_db_db1=no
11824 fi
11825 rm -f conftest*
11826
11827         LIBS="$ol_LIBS"
11828
11829 fi
11830
11831 echo "$ac_t""$ol_cv_db_db1" 1>&6
11832
11833         if test $ol_cv_db_db1 = yes ; then
11834                 ol_cv_lib_db=-ldb1
11835         fi
11836 fi
11837
11838
11839                 if test "$ol_cv_lib_db" != no ; then
11840                         ol_cv_berkeley_db=yes
11841                 fi
11842         fi
11843 fi
11844
11845         else
11846                 ol_cv_berkeley_db=no
11847 for ac_hdr in db.h
11848 do
11849 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11850 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11851 echo "configure:11852: checking for $ac_hdr" >&5
11852 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11853   echo $ac_n "(cached) $ac_c" 1>&6
11854 else
11855   cat > conftest.$ac_ext <<EOF
11856 #line 11857 "configure"
11857 #include "confdefs.h"
11858 #include <$ac_hdr>
11859 EOF
11860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11861 { (eval echo configure:11862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11863 if test -z "$ac_err"; then
11864   rm -rf conftest*
11865   eval "ac_cv_header_$ac_safe=yes"
11866 else
11867   echo "$ac_err" >&5
11868   echo "configure: failed program was:" >&5
11869   cat conftest.$ac_ext >&5
11870   rm -rf conftest*
11871   eval "ac_cv_header_$ac_safe=no"
11872 fi
11873 rm -f conftest*
11874 fi
11875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11876   echo "$ac_t""yes" 1>&6
11877     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11878   cat >> confdefs.h <<EOF
11879 #define $ac_tr_hdr 1
11880 EOF
11881  
11882 else
11883   echo "$ac_t""no" 1>&6
11884 fi
11885 done
11886
11887 if test $ac_cv_header_db_h = yes; then
11888         ol_cv_lib_db=no
11889 if test $ol_cv_lib_db = no ; then
11890         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11891 echo "configure:11892: checking for Berkeley DB link (default)" >&5
11892 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11893   echo $ac_n "(cached) $ac_c" 1>&6
11894 else
11895   
11896         ol_DB_LIB=
11897         ol_LIBS=$LIBS
11898         LIBS="$ol_DB_LIB $LIBS"
11899
11900         cat > conftest.$ac_ext <<EOF
11901 #line 11902 "configure"
11902 #include "confdefs.h"
11903
11904 #ifdef HAVE_DB_185_H
11905 # include <db_185.h>
11906 #else
11907 # include <db.h>
11908 #endif
11909
11910 #ifndef DB_VERSION_MAJOR
11911 # define DB_VERSION_MAJOR 1
11912 #endif
11913
11914 #ifndef NULL
11915 #define NULL ((void*)0)
11916 #endif
11917
11918 int main() {
11919
11920 #if DB_VERSION_MAJOR > 2
11921         db_env_create( NULL, 0 );
11922 #elif DB_VERSION_MAJOR > 1
11923         db_appexit( NULL );
11924 #else
11925         (void) dbopen( NULL, 0, 0, 0, NULL);
11926 #endif
11927
11928 ; return 0; }
11929 EOF
11930 if { (eval echo configure:11931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11931   rm -rf conftest*
11932   ol_cv_db_none=yes
11933 else
11934   echo "configure: failed program was:" >&5
11935   cat conftest.$ac_ext >&5
11936   rm -rf conftest*
11937   ol_cv_db_none=no
11938 fi
11939 rm -f conftest*
11940
11941         LIBS="$ol_LIBS"
11942
11943 fi
11944
11945 echo "$ac_t""$ol_cv_db_none" 1>&6
11946
11947         if test $ol_cv_db_none = yes ; then
11948                 ol_cv_lib_db=yes
11949         fi
11950 fi
11951
11952 if test $ol_cv_lib_db = no ; then
11953         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11954 echo "configure:11955: checking for Berkeley DB link (-ldb)" >&5
11955 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11956   echo $ac_n "(cached) $ac_c" 1>&6
11957 else
11958   
11959         ol_DB_LIB=-ldb
11960         ol_LIBS=$LIBS
11961         LIBS="$ol_DB_LIB $LIBS"
11962
11963         cat > conftest.$ac_ext <<EOF
11964 #line 11965 "configure"
11965 #include "confdefs.h"
11966
11967 #ifdef HAVE_DB_185_H
11968 # include <db_185.h>
11969 #else
11970 # include <db.h>
11971 #endif
11972
11973 #ifndef DB_VERSION_MAJOR
11974 # define DB_VERSION_MAJOR 1
11975 #endif
11976
11977 #ifndef NULL
11978 #define NULL ((void*)0)
11979 #endif
11980
11981 int main() {
11982
11983 #if DB_VERSION_MAJOR > 2
11984         db_env_create( NULL, 0 );
11985 #elif DB_VERSION_MAJOR > 1
11986         db_appexit( NULL );
11987 #else
11988         (void) dbopen( NULL, 0, 0, 0, NULL);
11989 #endif
11990
11991 ; return 0; }
11992 EOF
11993 if { (eval echo configure:11994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11994   rm -rf conftest*
11995   ol_cv_db_db=yes
11996 else
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999   rm -rf conftest*
12000   ol_cv_db_db=no
12001 fi
12002 rm -f conftest*
12003
12004         LIBS="$ol_LIBS"
12005
12006 fi
12007
12008 echo "$ac_t""$ol_cv_db_db" 1>&6
12009
12010         if test $ol_cv_db_db = yes ; then
12011                 ol_cv_lib_db=-ldb
12012         fi
12013 fi
12014
12015 if test $ol_cv_lib_db = no ; then
12016         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12017 echo "configure:12018: checking for Berkeley DB link (-ldb3)" >&5
12018 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12019   echo $ac_n "(cached) $ac_c" 1>&6
12020 else
12021   
12022         ol_DB_LIB=-ldb3
12023         ol_LIBS=$LIBS
12024         LIBS="$ol_DB_LIB $LIBS"
12025
12026         cat > conftest.$ac_ext <<EOF
12027 #line 12028 "configure"
12028 #include "confdefs.h"
12029
12030 #ifdef HAVE_DB_185_H
12031 # include <db_185.h>
12032 #else
12033 # include <db.h>
12034 #endif
12035
12036 #ifndef DB_VERSION_MAJOR
12037 # define DB_VERSION_MAJOR 1
12038 #endif
12039
12040 #ifndef NULL
12041 #define NULL ((void*)0)
12042 #endif
12043
12044 int main() {
12045
12046 #if DB_VERSION_MAJOR > 2
12047         db_env_create( NULL, 0 );
12048 #elif DB_VERSION_MAJOR > 1
12049         db_appexit( NULL );
12050 #else
12051         (void) dbopen( NULL, 0, 0, 0, NULL);
12052 #endif
12053
12054 ; return 0; }
12055 EOF
12056 if { (eval echo configure:12057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12057   rm -rf conftest*
12058   ol_cv_db_db3=yes
12059 else
12060   echo "configure: failed program was:" >&5
12061   cat conftest.$ac_ext >&5
12062   rm -rf conftest*
12063   ol_cv_db_db3=no
12064 fi
12065 rm -f conftest*
12066
12067         LIBS="$ol_LIBS"
12068
12069 fi
12070
12071 echo "$ac_t""$ol_cv_db_db3" 1>&6
12072
12073         if test $ol_cv_db_db3 = yes ; then
12074                 ol_cv_lib_db=-ldb3
12075         fi
12076 fi
12077
12078 if test $ol_cv_lib_db = no ; then
12079         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12080 echo "configure:12081: checking for Berkeley DB link (-ldb2)" >&5
12081 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12082   echo $ac_n "(cached) $ac_c" 1>&6
12083 else
12084   
12085         ol_DB_LIB=-ldb2
12086         ol_LIBS=$LIBS
12087         LIBS="$ol_DB_LIB $LIBS"
12088
12089         cat > conftest.$ac_ext <<EOF
12090 #line 12091 "configure"
12091 #include "confdefs.h"
12092
12093 #ifdef HAVE_DB_185_H
12094 # include <db_185.h>
12095 #else
12096 # include <db.h>
12097 #endif
12098
12099 #ifndef DB_VERSION_MAJOR
12100 # define DB_VERSION_MAJOR 1
12101 #endif
12102
12103 #ifndef NULL
12104 #define NULL ((void*)0)
12105 #endif
12106
12107 int main() {
12108
12109 #if DB_VERSION_MAJOR > 2
12110         db_env_create( NULL, 0 );
12111 #elif DB_VERSION_MAJOR > 1
12112         db_appexit( NULL );
12113 #else
12114         (void) dbopen( NULL, 0, 0, 0, NULL);
12115 #endif
12116
12117 ; return 0; }
12118 EOF
12119 if { (eval echo configure:12120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12120   rm -rf conftest*
12121   ol_cv_db_db2=yes
12122 else
12123   echo "configure: failed program was:" >&5
12124   cat conftest.$ac_ext >&5
12125   rm -rf conftest*
12126   ol_cv_db_db2=no
12127 fi
12128 rm -f conftest*
12129
12130         LIBS="$ol_LIBS"
12131
12132 fi
12133
12134 echo "$ac_t""$ol_cv_db_db2" 1>&6
12135
12136         if test $ol_cv_db_db2 = yes ; then
12137                 ol_cv_lib_db=-ldb2
12138         fi
12139 fi
12140
12141 if test $ol_cv_lib_db = no ; then
12142         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12143 echo "configure:12144: checking for Berkeley DB link (-ldb1)" >&5
12144 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12145   echo $ac_n "(cached) $ac_c" 1>&6
12146 else
12147   
12148         ol_DB_LIB=-ldb1
12149         ol_LIBS=$LIBS
12150         LIBS="$ol_DB_LIB $LIBS"
12151
12152         cat > conftest.$ac_ext <<EOF
12153 #line 12154 "configure"
12154 #include "confdefs.h"
12155
12156 #ifdef HAVE_DB_185_H
12157 # include <db_185.h>
12158 #else
12159 # include <db.h>
12160 #endif
12161
12162 #ifndef DB_VERSION_MAJOR
12163 # define DB_VERSION_MAJOR 1
12164 #endif
12165
12166 #ifndef NULL
12167 #define NULL ((void*)0)
12168 #endif
12169
12170 int main() {
12171
12172 #if DB_VERSION_MAJOR > 2
12173         db_env_create( NULL, 0 );
12174 #elif DB_VERSION_MAJOR > 1
12175         db_appexit( NULL );
12176 #else
12177         (void) dbopen( NULL, 0, 0, 0, NULL);
12178 #endif
12179
12180 ; return 0; }
12181 EOF
12182 if { (eval echo configure:12183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12183   rm -rf conftest*
12184   ol_cv_db_db1=yes
12185 else
12186   echo "configure: failed program was:" >&5
12187   cat conftest.$ac_ext >&5
12188   rm -rf conftest*
12189   ol_cv_db_db1=no
12190 fi
12191 rm -f conftest*
12192
12193         LIBS="$ol_LIBS"
12194
12195 fi
12196
12197 echo "$ac_t""$ol_cv_db_db1" 1>&6
12198
12199         if test $ol_cv_db_db1 = yes ; then
12200                 ol_cv_lib_db=-ldb1
12201         fi
12202 fi
12203
12204
12205         if test "$ol_cv_lib_db" != no ; then
12206                 ol_cv_berkeley_db=yes
12207                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12208 echo "configure:12209: checking for Berkeley DB thread support" >&5
12209 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12210   echo $ac_n "(cached) $ac_c" 1>&6
12211 else
12212   
12213         ol_LIBS="$LIBS"
12214         if test $ol_cv_lib_db != yes ; then
12215                 LIBS="$ol_cv_lib_db"
12216         fi
12217
12218         if test "$cross_compiling" = yes; then
12219   ol_cv_berkeley_db_thread=cross
12220 else
12221   cat > conftest.$ac_ext <<EOF
12222 #line 12223 "configure"
12223 #include "confdefs.h"
12224
12225 #ifdef HAVE_DB_185_H
12226         choke me;
12227 #else
12228 #include <db.h>
12229 #endif
12230 #ifndef NULL
12231 #define NULL ((void *)0)
12232 #endif
12233 main()
12234 {
12235         int rc;
12236         u_int32_t flags = DB_CREATE | DB_THREAD;
12237
12238 #if DB_VERSION_MAJOR > 2
12239         DB_ENV *env = NULL;
12240
12241         rc = db_env_create( &env, 0 );
12242
12243         if( rc == 0 ) {
12244 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12245                 rc = env->open( env, NULL, flags, 0 );
12246 #else
12247                 rc = env->open( env, NULL, NULL, flags, 0 );
12248 #endif
12249         }
12250
12251 #else
12252         DB_ENV env;
12253         memset( &env, '\0', sizeof(env) );
12254
12255         rc = db_appinit( NULL, NULL, &env, flags );
12256
12257         if( rc == 0 ) {
12258                 db_appexit( &env );
12259         }
12260 #endif
12261 #if DB_VERSION_MAJOR > 2
12262 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12263         env->remove( env, NULL, DB_FORCE);
12264 #else
12265         env->remove( env, NULL, NULL, DB_FORCE);
12266 #endif
12267 #endif
12268
12269         return rc;
12270 }
12271 EOF
12272 if { (eval echo configure:12273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12273 then
12274   ol_cv_berkeley_db_thread=yes
12275 else
12276   echo "configure: failed program was:" >&5
12277   cat conftest.$ac_ext >&5
12278   rm -fr conftest*
12279   ol_cv_berkeley_db_thread=no
12280 fi
12281 rm -fr conftest*
12282 fi
12283
12284
12285         LIBS="$ol_LIBS"
12286
12287         if test $ol_cv_berkeley_db_thread != no ; then
12288                 cat >> confdefs.h <<\EOF
12289 #define HAVE_BERKELEY_DB_THREAD 1
12290 EOF
12291
12292         fi
12293
12294 fi
12295
12296 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12297         fi
12298 fi
12299
12300         fi
12301
12302         if test $ol_cv_berkeley_db != no ; then
12303                 cat >> confdefs.h <<\EOF
12304 #define HAVE_BERKELEY_DB 1
12305 EOF
12306
12307
12308                 ol_link_ldbm=berkeley
12309                 ol_with_ldbm_api=db
12310
12311                 if test $ol_with_ldbm_type = hash ; then
12312                         cat >> confdefs.h <<\EOF
12313 #define LDBM_USE_DBHASH 1
12314 EOF
12315
12316                 else
12317                         cat >> confdefs.h <<\EOF
12318 #define LDBM_USE_DBBTREE 1
12319 EOF
12320
12321                 fi
12322
12323                                                 if test $ol_cv_lib_db != yes ; then
12324                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12325                 fi
12326         fi
12327 fi
12328
12329 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12330         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12331         ol_with_ldbm_api=none
12332 fi
12333
12334 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12335         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12336 echo "configure:12337: checking for MDBM library" >&5
12337 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12338   echo $ac_n "(cached) $ac_c" 1>&6
12339 else
12340         ol_LIBS="$LIBS"
12341         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12342 echo "configure:12343: checking for mdbm_set_chain" >&5
12343 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12344   echo $ac_n "(cached) $ac_c" 1>&6
12345 else
12346   cat > conftest.$ac_ext <<EOF
12347 #line 12348 "configure"
12348 #include "confdefs.h"
12349 /* System header to define __stub macros and hopefully few prototypes,
12350     which can conflict with char mdbm_set_chain(); below.  */
12351 #include <assert.h>
12352 /* Override any gcc2 internal prototype to avoid an error.  */
12353 /* We use char because int might match the return type of a gcc2
12354     builtin and then its argument prototype would still apply.  */
12355 char mdbm_set_chain();
12356 char (*f)();
12357
12358 int main() {
12359
12360 /* The GNU C library defines this for functions which it implements
12361     to always fail with ENOSYS.  Some functions are actually named
12362     something starting with __ and the normal name is an alias.  */
12363 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12364 choke me
12365 #else
12366 f = mdbm_set_chain;
12367 #endif
12368
12369 ; return 0; }
12370 EOF
12371 if { (eval echo configure:12372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12372   rm -rf conftest*
12373   eval "ac_cv_func_mdbm_set_chain=yes"
12374 else
12375   echo "configure: failed program was:" >&5
12376   cat conftest.$ac_ext >&5
12377   rm -rf conftest*
12378   eval "ac_cv_func_mdbm_set_chain=no"
12379 fi
12380 rm -f conftest*
12381 fi
12382
12383 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12384   echo "$ac_t""yes" 1>&6
12385   ol_cv_lib_mdbm=yes
12386 else
12387   echo "$ac_t""no" 1>&6
12388
12389                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12390 echo "configure:12391: checking for mdbm_set_chain in -lmdbm" >&5
12391 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12392 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12393   echo $ac_n "(cached) $ac_c" 1>&6
12394 else
12395   ac_save_LIBS="$LIBS"
12396 LIBS="-lmdbm  $LIBS"
12397 cat > conftest.$ac_ext <<EOF
12398 #line 12399 "configure"
12399 #include "confdefs.h"
12400 /* Override any gcc2 internal prototype to avoid an error.  */
12401 /* We use char because int might match the return type of a gcc2
12402     builtin and then its argument prototype would still apply.  */
12403 char mdbm_set_chain();
12404
12405 int main() {
12406 mdbm_set_chain()
12407 ; return 0; }
12408 EOF
12409 if { (eval echo configure:12410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12410   rm -rf conftest*
12411   eval "ac_cv_lib_$ac_lib_var=yes"
12412 else
12413   echo "configure: failed program was:" >&5
12414   cat conftest.$ac_ext >&5
12415   rm -rf conftest*
12416   eval "ac_cv_lib_$ac_lib_var=no"
12417 fi
12418 rm -f conftest*
12419 LIBS="$ac_save_LIBS"
12420
12421 fi
12422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12423   echo "$ac_t""yes" 1>&6
12424   ol_cv_lib_mdbm=-lmdbm
12425 else
12426   echo "$ac_t""no" 1>&6
12427 ol_cv_lib_mdbm=no
12428 fi
12429
12430         
12431 fi
12432
12433         LIBS="$ol_LIBS"
12434
12435 fi
12436
12437 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12438
12439
12440  for ac_hdr in mdbm.h
12441 do
12442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12444 echo "configure:12445: checking for $ac_hdr" >&5
12445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12446   echo $ac_n "(cached) $ac_c" 1>&6
12447 else
12448   cat > conftest.$ac_ext <<EOF
12449 #line 12450 "configure"
12450 #include "confdefs.h"
12451 #include <$ac_hdr>
12452 EOF
12453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12454 { (eval echo configure:12455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12456 if test -z "$ac_err"; then
12457   rm -rf conftest*
12458   eval "ac_cv_header_$ac_safe=yes"
12459 else
12460   echo "$ac_err" >&5
12461   echo "configure: failed program was:" >&5
12462   cat conftest.$ac_ext >&5
12463   rm -rf conftest*
12464   eval "ac_cv_header_$ac_safe=no"
12465 fi
12466 rm -f conftest*
12467 fi
12468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12469   echo "$ac_t""yes" 1>&6
12470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12471   cat >> confdefs.h <<EOF
12472 #define $ac_tr_hdr 1
12473 EOF
12474  
12475 else
12476   echo "$ac_t""no" 1>&6
12477 fi
12478 done
12479
12480  echo $ac_n "checking for db""... $ac_c" 1>&6
12481 echo "configure:12482: checking for db" >&5
12482 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12483   echo $ac_n "(cached) $ac_c" 1>&6
12484 else
12485   
12486         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12487                 ol_cv_mdbm=no
12488         else
12489                 ol_cv_mdbm=yes
12490         fi
12491
12492 fi
12493
12494 echo "$ac_t""$ol_cv_mdbm" 1>&6
12495  if test $ol_cv_mdbm = yes ; then
12496         cat >> confdefs.h <<\EOF
12497 #define HAVE_MDBM 1
12498 EOF
12499
12500  fi
12501
12502
12503         if test $ol_cv_mdbm = yes ; then
12504                 ol_link_ldbm=mdbm
12505                 ol_with_ldbm_api=mdbm
12506                 if test $ol_cv_lib_mdbm != yes ; then
12507                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12508                 fi
12509         fi
12510 fi
12511
12512 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12513         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12514 echo "configure:12515: checking for GDBM library" >&5
12515 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12516   echo $ac_n "(cached) $ac_c" 1>&6
12517 else
12518         ol_LIBS="$LIBS"
12519         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12520 echo "configure:12521: checking for gdbm_open" >&5
12521 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12522   echo $ac_n "(cached) $ac_c" 1>&6
12523 else
12524   cat > conftest.$ac_ext <<EOF
12525 #line 12526 "configure"
12526 #include "confdefs.h"
12527 /* System header to define __stub macros and hopefully few prototypes,
12528     which can conflict with char gdbm_open(); below.  */
12529 #include <assert.h>
12530 /* Override any gcc2 internal prototype to avoid an error.  */
12531 /* We use char because int might match the return type of a gcc2
12532     builtin and then its argument prototype would still apply.  */
12533 char gdbm_open();
12534 char (*f)();
12535
12536 int main() {
12537
12538 /* The GNU C library defines this for functions which it implements
12539     to always fail with ENOSYS.  Some functions are actually named
12540     something starting with __ and the normal name is an alias.  */
12541 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12542 choke me
12543 #else
12544 f = gdbm_open;
12545 #endif
12546
12547 ; return 0; }
12548 EOF
12549 if { (eval echo configure:12550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12550   rm -rf conftest*
12551   eval "ac_cv_func_gdbm_open=yes"
12552 else
12553   echo "configure: failed program was:" >&5
12554   cat conftest.$ac_ext >&5
12555   rm -rf conftest*
12556   eval "ac_cv_func_gdbm_open=no"
12557 fi
12558 rm -f conftest*
12559 fi
12560
12561 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12562   echo "$ac_t""yes" 1>&6
12563   ol_cv_lib_gdbm=yes
12564 else
12565   echo "$ac_t""no" 1>&6
12566
12567                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12568 echo "configure:12569: checking for gdbm_open in -lgdbm" >&5
12569 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12570 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12571   echo $ac_n "(cached) $ac_c" 1>&6
12572 else
12573   ac_save_LIBS="$LIBS"
12574 LIBS="-lgdbm  $LIBS"
12575 cat > conftest.$ac_ext <<EOF
12576 #line 12577 "configure"
12577 #include "confdefs.h"
12578 /* Override any gcc2 internal prototype to avoid an error.  */
12579 /* We use char because int might match the return type of a gcc2
12580     builtin and then its argument prototype would still apply.  */
12581 char gdbm_open();
12582
12583 int main() {
12584 gdbm_open()
12585 ; return 0; }
12586 EOF
12587 if { (eval echo configure:12588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12588   rm -rf conftest*
12589   eval "ac_cv_lib_$ac_lib_var=yes"
12590 else
12591   echo "configure: failed program was:" >&5
12592   cat conftest.$ac_ext >&5
12593   rm -rf conftest*
12594   eval "ac_cv_lib_$ac_lib_var=no"
12595 fi
12596 rm -f conftest*
12597 LIBS="$ac_save_LIBS"
12598
12599 fi
12600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12601   echo "$ac_t""yes" 1>&6
12602   ol_cv_lib_gdbm=-lgdbm
12603 else
12604   echo "$ac_t""no" 1>&6
12605 ol_cv_lib_gdbm=no
12606 fi
12607
12608         
12609 fi
12610
12611         LIBS="$ol_LIBS"
12612
12613 fi
12614
12615 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12616
12617
12618  for ac_hdr in gdbm.h
12619 do
12620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12622 echo "configure:12623: checking for $ac_hdr" >&5
12623 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12624   echo $ac_n "(cached) $ac_c" 1>&6
12625 else
12626   cat > conftest.$ac_ext <<EOF
12627 #line 12628 "configure"
12628 #include "confdefs.h"
12629 #include <$ac_hdr>
12630 EOF
12631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12632 { (eval echo configure:12633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12634 if test -z "$ac_err"; then
12635   rm -rf conftest*
12636   eval "ac_cv_header_$ac_safe=yes"
12637 else
12638   echo "$ac_err" >&5
12639   echo "configure: failed program was:" >&5
12640   cat conftest.$ac_ext >&5
12641   rm -rf conftest*
12642   eval "ac_cv_header_$ac_safe=no"
12643 fi
12644 rm -f conftest*
12645 fi
12646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12647   echo "$ac_t""yes" 1>&6
12648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12649   cat >> confdefs.h <<EOF
12650 #define $ac_tr_hdr 1
12651 EOF
12652  
12653 else
12654   echo "$ac_t""no" 1>&6
12655 fi
12656 done
12657
12658  echo $ac_n "checking for db""... $ac_c" 1>&6
12659 echo "configure:12660: checking for db" >&5
12660 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12661   echo $ac_n "(cached) $ac_c" 1>&6
12662 else
12663   
12664         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12665                 ol_cv_gdbm=no
12666         else
12667                 ol_cv_gdbm=yes
12668         fi
12669
12670 fi
12671
12672 echo "$ac_t""$ol_cv_gdbm" 1>&6
12673  if test $ol_cv_gdbm = yes ; then
12674         cat >> confdefs.h <<\EOF
12675 #define HAVE_GDBM 1
12676 EOF
12677
12678  fi
12679
12680
12681         if test $ol_cv_gdbm = yes ; then
12682                 ol_link_ldbm=gdbm
12683                 ol_with_ldbm_api=gdbm
12684
12685                 if test $ol_cv_lib_gdbm != yes ; then
12686                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12687                 fi
12688         fi
12689 fi
12690
12691 if test $ol_with_ldbm_api = ndbm ; then
12692         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12693 echo "configure:12694: checking for NDBM library" >&5
12694 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12695   echo $ac_n "(cached) $ac_c" 1>&6
12696 else
12697         ol_LIBS="$LIBS"
12698         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12699 echo "configure:12700: checking for dbm_open" >&5
12700 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12701   echo $ac_n "(cached) $ac_c" 1>&6
12702 else
12703   cat > conftest.$ac_ext <<EOF
12704 #line 12705 "configure"
12705 #include "confdefs.h"
12706 /* System header to define __stub macros and hopefully few prototypes,
12707     which can conflict with char dbm_open(); below.  */
12708 #include <assert.h>
12709 /* Override any gcc2 internal prototype to avoid an error.  */
12710 /* We use char because int might match the return type of a gcc2
12711     builtin and then its argument prototype would still apply.  */
12712 char dbm_open();
12713 char (*f)();
12714
12715 int main() {
12716
12717 /* The GNU C library defines this for functions which it implements
12718     to always fail with ENOSYS.  Some functions are actually named
12719     something starting with __ and the normal name is an alias.  */
12720 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12721 choke me
12722 #else
12723 f = dbm_open;
12724 #endif
12725
12726 ; return 0; }
12727 EOF
12728 if { (eval echo configure:12729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12729   rm -rf conftest*
12730   eval "ac_cv_func_dbm_open=yes"
12731 else
12732   echo "configure: failed program was:" >&5
12733   cat conftest.$ac_ext >&5
12734   rm -rf conftest*
12735   eval "ac_cv_func_dbm_open=no"
12736 fi
12737 rm -f conftest*
12738 fi
12739
12740 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12741   echo "$ac_t""yes" 1>&6
12742   ol_cv_lib_ndbm=yes
12743 else
12744   echo "$ac_t""no" 1>&6
12745
12746                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12747 echo "configure:12748: checking for dbm_open in -lndbm" >&5
12748 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12750   echo $ac_n "(cached) $ac_c" 1>&6
12751 else
12752   ac_save_LIBS="$LIBS"
12753 LIBS="-lndbm  $LIBS"
12754 cat > conftest.$ac_ext <<EOF
12755 #line 12756 "configure"
12756 #include "confdefs.h"
12757 /* Override any gcc2 internal prototype to avoid an error.  */
12758 /* We use char because int might match the return type of a gcc2
12759     builtin and then its argument prototype would still apply.  */
12760 char dbm_open();
12761
12762 int main() {
12763 dbm_open()
12764 ; return 0; }
12765 EOF
12766 if { (eval echo configure:12767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12767   rm -rf conftest*
12768   eval "ac_cv_lib_$ac_lib_var=yes"
12769 else
12770   echo "configure: failed program was:" >&5
12771   cat conftest.$ac_ext >&5
12772   rm -rf conftest*
12773   eval "ac_cv_lib_$ac_lib_var=no"
12774 fi
12775 rm -f conftest*
12776 LIBS="$ac_save_LIBS"
12777
12778 fi
12779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12780   echo "$ac_t""yes" 1>&6
12781   ol_cv_lib_ndbm=-lndbm
12782 else
12783   echo "$ac_t""no" 1>&6
12784
12785                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12786 echo "configure:12787: checking for dbm_open in -ldbm" >&5
12787 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12789   echo $ac_n "(cached) $ac_c" 1>&6
12790 else
12791   ac_save_LIBS="$LIBS"
12792 LIBS="-ldbm  $LIBS"
12793 cat > conftest.$ac_ext <<EOF
12794 #line 12795 "configure"
12795 #include "confdefs.h"
12796 /* Override any gcc2 internal prototype to avoid an error.  */
12797 /* We use char because int might match the return type of a gcc2
12798     builtin and then its argument prototype would still apply.  */
12799 char dbm_open();
12800
12801 int main() {
12802 dbm_open()
12803 ; return 0; }
12804 EOF
12805 if { (eval echo configure:12806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12806   rm -rf conftest*
12807   eval "ac_cv_lib_$ac_lib_var=yes"
12808 else
12809   echo "configure: failed program was:" >&5
12810   cat conftest.$ac_ext >&5
12811   rm -rf conftest*
12812   eval "ac_cv_lib_$ac_lib_var=no"
12813 fi
12814 rm -f conftest*
12815 LIBS="$ac_save_LIBS"
12816
12817 fi
12818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12819   echo "$ac_t""yes" 1>&6
12820   ol_cv_lib_ndbm=-ldbm
12821 else
12822   echo "$ac_t""no" 1>&6
12823 ol_cv_lib_ndbm=no
12824 fi
12825                 
12826 fi
12827
12828         
12829 fi
12830
12831         LIBS="$ol_LIBS"
12832
12833 fi
12834
12835 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12836
12837
12838  for ac_hdr in ndbm.h
12839 do
12840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12842 echo "configure:12843: checking for $ac_hdr" >&5
12843 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12844   echo $ac_n "(cached) $ac_c" 1>&6
12845 else
12846   cat > conftest.$ac_ext <<EOF
12847 #line 12848 "configure"
12848 #include "confdefs.h"
12849 #include <$ac_hdr>
12850 EOF
12851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12852 { (eval echo configure:12853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12854 if test -z "$ac_err"; then
12855   rm -rf conftest*
12856   eval "ac_cv_header_$ac_safe=yes"
12857 else
12858   echo "$ac_err" >&5
12859   echo "configure: failed program was:" >&5
12860   cat conftest.$ac_ext >&5
12861   rm -rf conftest*
12862   eval "ac_cv_header_$ac_safe=no"
12863 fi
12864 rm -f conftest*
12865 fi
12866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12867   echo "$ac_t""yes" 1>&6
12868     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12869   cat >> confdefs.h <<EOF
12870 #define $ac_tr_hdr 1
12871 EOF
12872  
12873 else
12874   echo "$ac_t""no" 1>&6
12875 fi
12876 done
12877
12878  echo $ac_n "checking for db""... $ac_c" 1>&6
12879 echo "configure:12880: checking for db" >&5
12880 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12881   echo $ac_n "(cached) $ac_c" 1>&6
12882 else
12883   
12884         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12885                 ol_cv_ndbm=no
12886         else
12887                 ol_cv_ndbm=yes
12888         fi
12889
12890 fi
12891
12892 echo "$ac_t""$ol_cv_ndbm" 1>&6
12893  if test $ol_cv_ndbm = yes ; then
12894         cat >> confdefs.h <<\EOF
12895 #define HAVE_NDBM 1
12896 EOF
12897
12898  fi
12899
12900
12901         if test $ol_cv_ndbm = yes ; then
12902                 ol_link_ldbm=ndbm
12903                 ol_with_ldbm_api=ndbm
12904
12905                 if test $ol_cv_lib_ndbm != yes ; then
12906                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12907                 fi
12908         fi
12909 fi
12910
12911 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12912         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12913         if test $ol_enable_ldbm = yes ; then
12914                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12915         fi
12916
12917         echo "configure: warning: disabling LDBM" 1>&2
12918         ol_enable_ldbm=no
12919 fi
12920
12921 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12922         LINK_BINS_DYNAMIC="yes"
12923 else
12924         LINK_BINS_DYNAMIC="no"
12925 fi
12926
12927 if test $ol_enable_wrappers != no ; then
12928         for ac_hdr in tcpd.h
12929 do
12930 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12931 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12932 echo "configure:12933: checking for $ac_hdr" >&5
12933 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12934   echo $ac_n "(cached) $ac_c" 1>&6
12935 else
12936   cat > conftest.$ac_ext <<EOF
12937 #line 12938 "configure"
12938 #include "confdefs.h"
12939 #include <$ac_hdr>
12940 EOF
12941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12942 { (eval echo configure:12943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12944 if test -z "$ac_err"; then
12945   rm -rf conftest*
12946   eval "ac_cv_header_$ac_safe=yes"
12947 else
12948   echo "$ac_err" >&5
12949   echo "configure: failed program was:" >&5
12950   cat conftest.$ac_ext >&5
12951   rm -rf conftest*
12952   eval "ac_cv_header_$ac_safe=no"
12953 fi
12954 rm -f conftest*
12955 fi
12956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12957   echo "$ac_t""yes" 1>&6
12958     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12959   cat >> confdefs.h <<EOF
12960 #define $ac_tr_hdr 1
12961 EOF
12962  
12963 else
12964   echo "$ac_t""no" 1>&6
12965 fi
12966 done
12967
12968
12969         if test $ac_cv_header_tcpd_h != yes ; then
12970                 have_wrappers=no
12971         else
12972                 cat > conftest.$ac_ext <<EOF
12973 #line 12974 "configure"
12974 #include "confdefs.h"
12975
12976 int allow_severity = 0;
12977 int deny_severity  = 0;
12978                 
12979 int main() {
12980 hosts_access()
12981 ; return 0; }
12982 EOF
12983 if { (eval echo configure:12984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12984   rm -rf conftest*
12985   have_wrappers=yes
12986 else
12987   echo "configure: failed program was:" >&5
12988   cat conftest.$ac_ext >&5
12989   rm -rf conftest*
12990   have_wrappers=no
12991 fi
12992 rm -f conftest*
12993         fi
12994
12995         if test $have_wrappers = yes ; then
12996                 cat >> confdefs.h <<\EOF
12997 #define HAVE_TCPD 1
12998 EOF
12999
13000                 WRAP_LIBS="-lwrap"
13001
13002                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13003 echo "configure:13004: checking for main in -lnsl" >&5
13004 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13006   echo $ac_n "(cached) $ac_c" 1>&6
13007 else
13008   ac_save_LIBS="$LIBS"
13009 LIBS="-lnsl  $LIBS"
13010 cat > conftest.$ac_ext <<EOF
13011 #line 13012 "configure"
13012 #include "confdefs.h"
13013
13014 int main() {
13015 main()
13016 ; return 0; }
13017 EOF
13018 if { (eval echo configure:13019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13019   rm -rf conftest*
13020   eval "ac_cv_lib_$ac_lib_var=yes"
13021 else
13022   echo "configure: failed program was:" >&5
13023   cat conftest.$ac_ext >&5
13024   rm -rf conftest*
13025   eval "ac_cv_lib_$ac_lib_var=no"
13026 fi
13027 rm -f conftest*
13028 LIBS="$ac_save_LIBS"
13029
13030 fi
13031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13032   echo "$ac_t""yes" 1>&6
13033     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13035   cat >> confdefs.h <<EOF
13036 #define $ac_tr_lib 1
13037 EOF
13038
13039   LIBS="-lnsl $LIBS"
13040
13041 else
13042   echo "$ac_t""no" 1>&6
13043 fi
13044
13045         else
13046                 echo "configure: warning: could not find -lwrap" 1>&2
13047                 if test $ol_enable_wrappers = yes ; then
13048                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13049                 fi
13050
13051                 echo "configure: warning: disabling wrappers support" 1>&2
13052                 ol_enable_wrappers=no
13053                 WRAP_LIBS=""
13054         fi
13055 fi
13056
13057 if test $ol_enable_syslog != no ; then
13058         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13059 echo "configure:13060: checking for openlog" >&5
13060 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13061   echo $ac_n "(cached) $ac_c" 1>&6
13062 else
13063   cat > conftest.$ac_ext <<EOF
13064 #line 13065 "configure"
13065 #include "confdefs.h"
13066 /* System header to define __stub macros and hopefully few prototypes,
13067     which can conflict with char openlog(); below.  */
13068 #include <assert.h>
13069 /* Override any gcc2 internal prototype to avoid an error.  */
13070 /* We use char because int might match the return type of a gcc2
13071     builtin and then its argument prototype would still apply.  */
13072 char openlog();
13073 char (*f)();
13074
13075 int main() {
13076
13077 /* The GNU C library defines this for functions which it implements
13078     to always fail with ENOSYS.  Some functions are actually named
13079     something starting with __ and the normal name is an alias.  */
13080 #if defined (__stub_openlog) || defined (__stub___openlog)
13081 choke me
13082 #else
13083 f = openlog;
13084 #endif
13085
13086 ; return 0; }
13087 EOF
13088 if { (eval echo configure:13089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13089   rm -rf conftest*
13090   eval "ac_cv_func_openlog=yes"
13091 else
13092   echo "configure: failed program was:" >&5
13093   cat conftest.$ac_ext >&5
13094   rm -rf conftest*
13095   eval "ac_cv_func_openlog=no"
13096 fi
13097 rm -f conftest*
13098 fi
13099
13100 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13101   echo "$ac_t""yes" 1>&6
13102   :
13103 else
13104   echo "$ac_t""no" 1>&6
13105 fi
13106
13107         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13108                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13109         fi
13110         ol_enable_syslog=$ac_cv_func_openlog
13111 fi
13112
13113
13114 ol_link_sql=no
13115 if test $ol_enable_sql != no ; then
13116         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13117 echo "configure:13118: checking for SQLDriverConnect in -liodbc" >&5
13118 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13120   echo $ac_n "(cached) $ac_c" 1>&6
13121 else
13122   ac_save_LIBS="$LIBS"
13123 LIBS="-liodbc  $LIBS"
13124 cat > conftest.$ac_ext <<EOF
13125 #line 13126 "configure"
13126 #include "confdefs.h"
13127 /* Override any gcc2 internal prototype to avoid an error.  */
13128 /* We use char because int might match the return type of a gcc2
13129     builtin and then its argument prototype would still apply.  */
13130 char SQLDriverConnect();
13131
13132 int main() {
13133 SQLDriverConnect()
13134 ; return 0; }
13135 EOF
13136 if { (eval echo configure:13137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13137   rm -rf conftest*
13138   eval "ac_cv_lib_$ac_lib_var=yes"
13139 else
13140   echo "configure: failed program was:" >&5
13141   cat conftest.$ac_ext >&5
13142   rm -rf conftest*
13143   eval "ac_cv_lib_$ac_lib_var=no"
13144 fi
13145 rm -f conftest*
13146 LIBS="$ac_save_LIBS"
13147
13148 fi
13149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13150   echo "$ac_t""yes" 1>&6
13151   have_iodbc=yes
13152 else
13153   echo "$ac_t""no" 1>&6
13154 have_iodbc=no
13155 fi
13156
13157         if test $have_iodbc = yes ; then
13158                 ol_link_sql="-liodbc"
13159         else
13160                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13161 echo "configure:13162: checking for SQLDriverConnect in -lodbc" >&5
13162 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13164   echo $ac_n "(cached) $ac_c" 1>&6
13165 else
13166   ac_save_LIBS="$LIBS"
13167 LIBS="-lodbc  $LIBS"
13168 cat > conftest.$ac_ext <<EOF
13169 #line 13170 "configure"
13170 #include "confdefs.h"
13171 /* Override any gcc2 internal prototype to avoid an error.  */
13172 /* We use char because int might match the return type of a gcc2
13173     builtin and then its argument prototype would still apply.  */
13174 char SQLDriverConnect();
13175
13176 int main() {
13177 SQLDriverConnect()
13178 ; return 0; }
13179 EOF
13180 if { (eval echo configure:13181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13181   rm -rf conftest*
13182   eval "ac_cv_lib_$ac_lib_var=yes"
13183 else
13184   echo "configure: failed program was:" >&5
13185   cat conftest.$ac_ext >&5
13186   rm -rf conftest*
13187   eval "ac_cv_lib_$ac_lib_var=no"
13188 fi
13189 rm -f conftest*
13190 LIBS="$ac_save_LIBS"
13191
13192 fi
13193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13194   echo "$ac_t""yes" 1>&6
13195   have_odbc=yes
13196 else
13197   echo "$ac_t""no" 1>&6
13198 have_odbc=no
13199 fi
13200
13201                 if test $have_odbc = yes ; then
13202                         ol_link_sql="-lodbc"
13203                 fi
13204         fi
13205
13206         if test $ol_link_sql != no ; then
13207                 SLAPD_SQL_LIBS="$ol_link_sql"
13208
13209         elif test $ol_enable_sql != auto ; then
13210                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13211         fi
13212 fi
13213
13214 if test $ol_enable_tcl != no ; then
13215         for ac_hdr in tcl.h
13216 do
13217 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13218 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13219 echo "configure:13220: checking for $ac_hdr" >&5
13220 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13221   echo $ac_n "(cached) $ac_c" 1>&6
13222 else
13223   cat > conftest.$ac_ext <<EOF
13224 #line 13225 "configure"
13225 #include "confdefs.h"
13226 #include <$ac_hdr>
13227 EOF
13228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13229 { (eval echo configure:13230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13231 if test -z "$ac_err"; then
13232   rm -rf conftest*
13233   eval "ac_cv_header_$ac_safe=yes"
13234 else
13235   echo "$ac_err" >&5
13236   echo "configure: failed program was:" >&5
13237   cat conftest.$ac_ext >&5
13238   rm -rf conftest*
13239   eval "ac_cv_header_$ac_safe=no"
13240 fi
13241 rm -f conftest*
13242 fi
13243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13244   echo "$ac_t""yes" 1>&6
13245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13246   cat >> confdefs.h <<EOF
13247 #define $ac_tr_hdr 1
13248 EOF
13249  
13250 else
13251   echo "$ac_t""no" 1>&6
13252 fi
13253 done
13254
13255
13256         if test $ac_cv_header_tcl_h != yes ; then
13257                 have_tcl=no
13258         else
13259                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13260                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13261 echo "configure:13262: checking for main in -l$lib" >&5
13262 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13263 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13264   echo $ac_n "(cached) $ac_c" 1>&6
13265 else
13266   ac_save_LIBS="$LIBS"
13267 LIBS="-l$lib  $LIBS"
13268 cat > conftest.$ac_ext <<EOF
13269 #line 13270 "configure"
13270 #include "confdefs.h"
13271
13272 int main() {
13273 main()
13274 ; return 0; }
13275 EOF
13276 if { (eval echo configure:13277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13277   rm -rf conftest*
13278   eval "ac_cv_lib_$ac_lib_var=yes"
13279 else
13280   echo "configure: failed program was:" >&5
13281   cat conftest.$ac_ext >&5
13282   rm -rf conftest*
13283   eval "ac_cv_lib_$ac_lib_var=no"
13284 fi
13285 rm -f conftest*
13286 LIBS="$ac_save_LIBS"
13287
13288 fi
13289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13290   echo "$ac_t""yes" 1>&6
13291   have_tcl=yes
13292                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13293                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13294                            else
13295                                MOD_TCL_LIB="-l${lib}"
13296                            fi;break
13297 else
13298   echo "$ac_t""no" 1>&6
13299 have_tcl=no
13300 fi
13301
13302                 done
13303         fi
13304
13305         if test $have_tcl != yes ; then
13306                 echo "configure: warning: could not find -ltcl" 1>&2
13307                 if test $ol_enable_tcl = yes ; then
13308                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13309                 fi
13310
13311                 ol_enable_tcl=no
13312         fi
13313 fi
13314
13315 ol_link_termcap=no
13316 for ac_hdr in termcap.h ncurses.h
13317 do
13318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13320 echo "configure:13321: checking for $ac_hdr" >&5
13321 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13322   echo $ac_n "(cached) $ac_c" 1>&6
13323 else
13324   cat > conftest.$ac_ext <<EOF
13325 #line 13326 "configure"
13326 #include "confdefs.h"
13327 #include <$ac_hdr>
13328 EOF
13329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13330 { (eval echo configure:13331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13332 if test -z "$ac_err"; then
13333   rm -rf conftest*
13334   eval "ac_cv_header_$ac_safe=yes"
13335 else
13336   echo "$ac_err" >&5
13337   echo "configure: failed program was:" >&5
13338   cat conftest.$ac_ext >&5
13339   rm -rf conftest*
13340   eval "ac_cv_header_$ac_safe=no"
13341 fi
13342 rm -f conftest*
13343 fi
13344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13345   echo "$ac_t""yes" 1>&6
13346     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13347   cat >> confdefs.h <<EOF
13348 #define $ac_tr_hdr 1
13349 EOF
13350  
13351 else
13352   echo "$ac_t""no" 1>&6
13353 fi
13354 done
13355
13356
13357 if test $ol_link_termcap = no ; then
13358         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13359 echo "configure:13360: checking for tputs in -ltermcap" >&5
13360 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13361 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13362   echo $ac_n "(cached) $ac_c" 1>&6
13363 else
13364   ac_save_LIBS="$LIBS"
13365 LIBS="-ltermcap  $LIBS"
13366 cat > conftest.$ac_ext <<EOF
13367 #line 13368 "configure"
13368 #include "confdefs.h"
13369 /* Override any gcc2 internal prototype to avoid an error.  */
13370 /* We use char because int might match the return type of a gcc2
13371     builtin and then its argument prototype would still apply.  */
13372 char tputs();
13373
13374 int main() {
13375 tputs()
13376 ; return 0; }
13377 EOF
13378 if { (eval echo configure:13379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13379   rm -rf conftest*
13380   eval "ac_cv_lib_$ac_lib_var=yes"
13381 else
13382   echo "configure: failed program was:" >&5
13383   cat conftest.$ac_ext >&5
13384   rm -rf conftest*
13385   eval "ac_cv_lib_$ac_lib_var=no"
13386 fi
13387 rm -f conftest*
13388 LIBS="$ac_save_LIBS"
13389
13390 fi
13391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13392   echo "$ac_t""yes" 1>&6
13393   have_termcap=yes
13394 else
13395   echo "$ac_t""no" 1>&6
13396 have_termcap=no
13397 fi
13398
13399         if test $have_termcap = yes ; then
13400                 cat >> confdefs.h <<\EOF
13401 #define HAVE_TERMCAP 1
13402 EOF
13403
13404                 ol_link_termcap=yes
13405                 TERMCAP_LIBS=-ltermcap
13406         fi
13407 fi
13408
13409 if test $ol_link_termcap = no ; then
13410         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13411 echo "configure:13412: checking for initscr in -lncurses" >&5
13412 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13413 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13414   echo $ac_n "(cached) $ac_c" 1>&6
13415 else
13416   ac_save_LIBS="$LIBS"
13417 LIBS="-lncurses  $LIBS"
13418 cat > conftest.$ac_ext <<EOF
13419 #line 13420 "configure"
13420 #include "confdefs.h"
13421 /* Override any gcc2 internal prototype to avoid an error.  */
13422 /* We use char because int might match the return type of a gcc2
13423     builtin and then its argument prototype would still apply.  */
13424 char initscr();
13425
13426 int main() {
13427 initscr()
13428 ; return 0; }
13429 EOF
13430 if { (eval echo configure:13431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13431   rm -rf conftest*
13432   eval "ac_cv_lib_$ac_lib_var=yes"
13433 else
13434   echo "configure: failed program was:" >&5
13435   cat conftest.$ac_ext >&5
13436   rm -rf conftest*
13437   eval "ac_cv_lib_$ac_lib_var=no"
13438 fi
13439 rm -f conftest*
13440 LIBS="$ac_save_LIBS"
13441
13442 fi
13443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13444   echo "$ac_t""yes" 1>&6
13445   have_ncurses=yes
13446 else
13447   echo "$ac_t""no" 1>&6
13448 have_ncurses=no
13449 fi
13450
13451         if test $have_ncurses = yes ; then
13452                 cat >> confdefs.h <<\EOF
13453 #define HAVE_NCURSES 1
13454 EOF
13455
13456                 ol_link_termcap=yes
13457                 TERMCAP_LIBS=-lncurses
13458         fi
13459 fi
13460
13461 if test $ol_link_termcap = no ; then
13462         cat >> confdefs.h <<\EOF
13463 #define NO_TERMCAP 1
13464 EOF
13465
13466         TERMCAP_LIBS=
13467 fi
13468
13469 ol_link_sasl=no
13470 ol_link_spasswd=no
13471 if test $ol_with_cyrus_sasl != no ; then
13472         for ac_hdr in sasl.h
13473 do
13474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13476 echo "configure:13477: checking for $ac_hdr" >&5
13477 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13478   echo $ac_n "(cached) $ac_c" 1>&6
13479 else
13480   cat > conftest.$ac_ext <<EOF
13481 #line 13482 "configure"
13482 #include "confdefs.h"
13483 #include <$ac_hdr>
13484 EOF
13485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13486 { (eval echo configure:13487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13488 if test -z "$ac_err"; then
13489   rm -rf conftest*
13490   eval "ac_cv_header_$ac_safe=yes"
13491 else
13492   echo "$ac_err" >&5
13493   echo "configure: failed program was:" >&5
13494   cat conftest.$ac_ext >&5
13495   rm -rf conftest*
13496   eval "ac_cv_header_$ac_safe=no"
13497 fi
13498 rm -f conftest*
13499 fi
13500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13501   echo "$ac_t""yes" 1>&6
13502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13503   cat >> confdefs.h <<EOF
13504 #define $ac_tr_hdr 1
13505 EOF
13506  
13507 else
13508   echo "$ac_t""no" 1>&6
13509 fi
13510 done
13511
13512
13513         if test $ac_cv_header_sasl_h = yes ; then
13514                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13515 echo "configure:13516: checking for sasl_client_init in -lsasl" >&5
13516 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13517 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13518   echo $ac_n "(cached) $ac_c" 1>&6
13519 else
13520   ac_save_LIBS="$LIBS"
13521 LIBS="-lsasl  $LIBS"
13522 cat > conftest.$ac_ext <<EOF
13523 #line 13524 "configure"
13524 #include "confdefs.h"
13525 /* Override any gcc2 internal prototype to avoid an error.  */
13526 /* We use char because int might match the return type of a gcc2
13527     builtin and then its argument prototype would still apply.  */
13528 char sasl_client_init();
13529
13530 int main() {
13531 sasl_client_init()
13532 ; return 0; }
13533 EOF
13534 if { (eval echo configure:13535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13535   rm -rf conftest*
13536   eval "ac_cv_lib_$ac_lib_var=yes"
13537 else
13538   echo "configure: failed program was:" >&5
13539   cat conftest.$ac_ext >&5
13540   rm -rf conftest*
13541   eval "ac_cv_lib_$ac_lib_var=no"
13542 fi
13543 rm -f conftest*
13544 LIBS="$ac_save_LIBS"
13545
13546 fi
13547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13548   echo "$ac_t""yes" 1>&6
13549   have_cyrus_sasl=yes
13550 else
13551   echo "$ac_t""no" 1>&6
13552 have_cyrus_sasl=no
13553 fi
13554
13555
13556                 if test $have_cyrus_sasl != no ; then
13557                         SASL_LIBS="-lsasl"
13558                         cat >> confdefs.h <<\EOF
13559 #define HAVE_CYRUS_SASL 1
13560 EOF
13561
13562                         ol_link_sasl=yes
13563                 fi
13564         fi
13565
13566         if test $ol_link_sasl = no ; then
13567                 if test $ol_with_cyrus_sasl != auto ; then
13568                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13569                 else
13570                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13571                         echo "configure: warning: SASL authentication not supported!" 1>&2
13572                         if test $ol_link_tls = no ; then
13573                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13574                         fi
13575                 fi
13576         fi
13577 else
13578         echo "configure: warning: SASL authentication not supported!" 1>&2
13579         if test $ol_link_tls = no ; then
13580                 echo "configure: warning: Strong authentication not supported!" 1>&2
13581         fi
13582 fi
13583
13584 if test $cross_compiling != yes ; then
13585         dev=no
13586         if test -r /dev/urandom ; then
13587                 dev="/dev/urandom";
13588         elif test -r /idev/urandom ; then
13589                 dev="/idev/urandom";
13590         elif test -r /dev/srandom ; then
13591                 dev="/dev/srandom";
13592         elif test -r /dev/random ; then
13593                 dev="/dev/random";
13594         elif test -r /idev/random ; then
13595                 dev="/idev/random";
13596         fi
13597
13598         if test $dev != no ; then
13599                 cat >> confdefs.h <<EOF
13600 #define URANDOM_DEVICE "$dev"
13601 EOF
13602
13603         fi
13604 fi
13605
13606 ol_link_fetch=no
13607 if test $ol_with_fetch != no ; then
13608         ol_LIBS=$LIBS
13609 LIBS="-lfetch -lcom_err $LIBS"
13610 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13611 echo "configure:13612: checking fetch(3) library" >&5
13612 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13613   echo $ac_n "(cached) $ac_c" 1>&6
13614 else
13615   
13616         cat > conftest.$ac_ext <<EOF
13617 #line 13618 "configure"
13618 #include "confdefs.h"
13619
13620 #include <sys/param.h>
13621 #include <stdio.h>
13622 #include <fetch.h>
13623 int main() {
13624 struct url *u = fetchParseURL("file:///"); 
13625 ; return 0; }
13626 EOF
13627 if { (eval echo configure:13628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13628   rm -rf conftest*
13629   ol_cv_lib_fetch=yes
13630 else
13631   echo "configure: failed program was:" >&5
13632   cat conftest.$ac_ext >&5
13633   rm -rf conftest*
13634   ol_cv_lib_fetch=no
13635 fi
13636 rm -f conftest*
13637 fi
13638
13639 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13640 LIBS=$ol_LIBS
13641 if test $ol_cv_lib_fetch != no ; then
13642         ol_link_fetch="-lfetch -lcom_err"
13643         cat >> confdefs.h <<\EOF
13644 #define HAVE_FETCH 1
13645 EOF
13646
13647 fi
13648
13649
13650         if test $ol_cv_lib_fetch != no ; then
13651                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13652                 ol_link_fetch=freebsd
13653
13654         elif test $ol_with_fetch != auto ; then
13655                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13656         fi 
13657 fi
13658
13659 ol_link_readline=no
13660 if test $ol_with_readline != no ; then
13661         for ac_hdr in readline/readline.h readline/history.h
13662 do
13663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13665 echo "configure:13666: checking for $ac_hdr" >&5
13666 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13667   echo $ac_n "(cached) $ac_c" 1>&6
13668 else
13669   cat > conftest.$ac_ext <<EOF
13670 #line 13671 "configure"
13671 #include "confdefs.h"
13672 #include <$ac_hdr>
13673 EOF
13674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13675 { (eval echo configure:13676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13677 if test -z "$ac_err"; then
13678   rm -rf conftest*
13679   eval "ac_cv_header_$ac_safe=yes"
13680 else
13681   echo "$ac_err" >&5
13682   echo "configure: failed program was:" >&5
13683   cat conftest.$ac_ext >&5
13684   rm -rf conftest*
13685   eval "ac_cv_header_$ac_safe=no"
13686 fi
13687 rm -f conftest*
13688 fi
13689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13690   echo "$ac_t""yes" 1>&6
13691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13692   cat >> confdefs.h <<EOF
13693 #define $ac_tr_hdr 1
13694 EOF
13695  
13696 else
13697   echo "$ac_t""no" 1>&6
13698 fi
13699 done
13700
13701
13702         if test $ac_cv_header_readline_readline_h = yes ; then
13703                 save_LIBS="$LIBS"
13704                 LIBS="$TERMCAP_LIBS $LIBS"
13705                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13706 echo "configure:13707: checking for readline in -lreadline" >&5
13707 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13708 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13709   echo $ac_n "(cached) $ac_c" 1>&6
13710 else
13711   ac_save_LIBS="$LIBS"
13712 LIBS="-lreadline  $LIBS"
13713 cat > conftest.$ac_ext <<EOF
13714 #line 13715 "configure"
13715 #include "confdefs.h"
13716 /* Override any gcc2 internal prototype to avoid an error.  */
13717 /* We use char because int might match the return type of a gcc2
13718     builtin and then its argument prototype would still apply.  */
13719 char readline();
13720
13721 int main() {
13722 readline()
13723 ; return 0; }
13724 EOF
13725 if { (eval echo configure:13726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13726   rm -rf conftest*
13727   eval "ac_cv_lib_$ac_lib_var=yes"
13728 else
13729   echo "configure: failed program was:" >&5
13730   cat conftest.$ac_ext >&5
13731   rm -rf conftest*
13732   eval "ac_cv_lib_$ac_lib_var=no"
13733 fi
13734 rm -f conftest*
13735 LIBS="$ac_save_LIBS"
13736
13737 fi
13738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13739   echo "$ac_t""yes" 1>&6
13740   have_readline=yes
13741 else
13742   echo "$ac_t""no" 1>&6
13743 have_readline=no
13744 fi
13745
13746                 LIBS="$save_LIBS"
13747                         
13748                 if test $have_readline = yes ; then
13749                         ol_with_readline=found
13750                         ol_link_readline=yes
13751
13752                         READLINE_LIBS="-lreadline"
13753                 fi
13754         fi
13755 fi
13756
13757 if test $ol_link_readline = yes ; then
13758         cat >> confdefs.h <<\EOF
13759 #define HAVE_READLINE 1
13760 EOF
13761
13762 fi
13763
13764
13765 if test $ol_enable_crypt != no ; then
13766         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13767 echo "configure:13768: checking for crypt" >&5
13768 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13769   echo $ac_n "(cached) $ac_c" 1>&6
13770 else
13771   cat > conftest.$ac_ext <<EOF
13772 #line 13773 "configure"
13773 #include "confdefs.h"
13774 /* System header to define __stub macros and hopefully few prototypes,
13775     which can conflict with char crypt(); below.  */
13776 #include <assert.h>
13777 /* Override any gcc2 internal prototype to avoid an error.  */
13778 /* We use char because int might match the return type of a gcc2
13779     builtin and then its argument prototype would still apply.  */
13780 char crypt();
13781 char (*f)();
13782
13783 int main() {
13784
13785 /* The GNU C library defines this for functions which it implements
13786     to always fail with ENOSYS.  Some functions are actually named
13787     something starting with __ and the normal name is an alias.  */
13788 #if defined (__stub_crypt) || defined (__stub___crypt)
13789 choke me
13790 #else
13791 f = crypt;
13792 #endif
13793
13794 ; return 0; }
13795 EOF
13796 if { (eval echo configure:13797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13797   rm -rf conftest*
13798   eval "ac_cv_func_crypt=yes"
13799 else
13800   echo "configure: failed program was:" >&5
13801   cat conftest.$ac_ext >&5
13802   rm -rf conftest*
13803   eval "ac_cv_func_crypt=no"
13804 fi
13805 rm -f conftest*
13806 fi
13807
13808 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13809   echo "$ac_t""yes" 1>&6
13810   have_crypt=yes
13811 else
13812   echo "$ac_t""no" 1>&6
13813
13814                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13815 echo "configure:13816: checking for crypt in -lcrypt" >&5
13816 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13817 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13818   echo $ac_n "(cached) $ac_c" 1>&6
13819 else
13820   ac_save_LIBS="$LIBS"
13821 LIBS="-lcrypt  $LIBS"
13822 cat > conftest.$ac_ext <<EOF
13823 #line 13824 "configure"
13824 #include "confdefs.h"
13825 /* Override any gcc2 internal prototype to avoid an error.  */
13826 /* We use char because int might match the return type of a gcc2
13827     builtin and then its argument prototype would still apply.  */
13828 char crypt();
13829
13830 int main() {
13831 crypt()
13832 ; return 0; }
13833 EOF
13834 if { (eval echo configure:13835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13835   rm -rf conftest*
13836   eval "ac_cv_lib_$ac_lib_var=yes"
13837 else
13838   echo "configure: failed program was:" >&5
13839   cat conftest.$ac_ext >&5
13840   rm -rf conftest*
13841   eval "ac_cv_lib_$ac_lib_var=no"
13842 fi
13843 rm -f conftest*
13844 LIBS="$ac_save_LIBS"
13845
13846 fi
13847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13848   echo "$ac_t""yes" 1>&6
13849   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13850                         have_crypt=yes
13851 else
13852   echo "$ac_t""no" 1>&6
13853 have_crypt=no
13854 fi
13855
13856 fi
13857
13858
13859         if test $have_crypt = yes ; then
13860                 cat >> confdefs.h <<\EOF
13861 #define HAVE_CRYPT 1
13862 EOF
13863
13864         else
13865                 echo "configure: warning: could not find crypt" 1>&2
13866                 if test $ol_enable_crypt = yes ; then
13867                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13868                 fi
13869
13870                 echo "configure: warning: disabling crypt support" 1>&2
13871                 ol_enable_crypt=no
13872         fi
13873 fi
13874
13875 if test $ol_enable_proctitle != no ; then
13876         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13877 echo "configure:13878: checking for setproctitle" >&5
13878 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13879   echo $ac_n "(cached) $ac_c" 1>&6
13880 else
13881   cat > conftest.$ac_ext <<EOF
13882 #line 13883 "configure"
13883 #include "confdefs.h"
13884 /* System header to define __stub macros and hopefully few prototypes,
13885     which can conflict with char setproctitle(); below.  */
13886 #include <assert.h>
13887 /* Override any gcc2 internal prototype to avoid an error.  */
13888 /* We use char because int might match the return type of a gcc2
13889     builtin and then its argument prototype would still apply.  */
13890 char setproctitle();
13891 char (*f)();
13892
13893 int main() {
13894
13895 /* The GNU C library defines this for functions which it implements
13896     to always fail with ENOSYS.  Some functions are actually named
13897     something starting with __ and the normal name is an alias.  */
13898 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13899 choke me
13900 #else
13901 f = setproctitle;
13902 #endif
13903
13904 ; return 0; }
13905 EOF
13906 if { (eval echo configure:13907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13907   rm -rf conftest*
13908   eval "ac_cv_func_setproctitle=yes"
13909 else
13910   echo "configure: failed program was:" >&5
13911   cat conftest.$ac_ext >&5
13912   rm -rf conftest*
13913   eval "ac_cv_func_setproctitle=no"
13914 fi
13915 rm -f conftest*
13916 fi
13917
13918 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13919   echo "$ac_t""yes" 1>&6
13920   have_setproctitle=yes
13921 else
13922   echo "$ac_t""no" 1>&6
13923
13924                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13925 echo "configure:13926: checking for setproctitle in -lutil" >&5
13926 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13927 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13928   echo $ac_n "(cached) $ac_c" 1>&6
13929 else
13930   ac_save_LIBS="$LIBS"
13931 LIBS="-lutil  $LIBS"
13932 cat > conftest.$ac_ext <<EOF
13933 #line 13934 "configure"
13934 #include "confdefs.h"
13935 /* Override any gcc2 internal prototype to avoid an error.  */
13936 /* We use char because int might match the return type of a gcc2
13937     builtin and then its argument prototype would still apply.  */
13938 char setproctitle();
13939
13940 int main() {
13941 setproctitle()
13942 ; return 0; }
13943 EOF
13944 if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13945   rm -rf conftest*
13946   eval "ac_cv_lib_$ac_lib_var=yes"
13947 else
13948   echo "configure: failed program was:" >&5
13949   cat conftest.$ac_ext >&5
13950   rm -rf conftest*
13951   eval "ac_cv_lib_$ac_lib_var=no"
13952 fi
13953 rm -f conftest*
13954 LIBS="$ac_save_LIBS"
13955
13956 fi
13957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13958   echo "$ac_t""yes" 1>&6
13959   have_setproctitle=yes
13960                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13961 else
13962   echo "$ac_t""no" 1>&6
13963 have_setproctitle=no
13964                         LIBOBJS="$LIBOBJS setproctitle.o"
13965                         LIBSRCS="$LIBSRCS setproctitle.c"
13966 fi
13967
13968 fi
13969
13970
13971         if test $have_setproctitle = yes ; then
13972                 cat >> confdefs.h <<\EOF
13973 #define HAVE_SETPROCTITLE 1
13974 EOF
13975
13976         fi
13977 fi
13978
13979 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13980 echo "configure:13981: checking for ANSI C header files" >&5
13981 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13982   echo $ac_n "(cached) $ac_c" 1>&6
13983 else
13984   cat > conftest.$ac_ext <<EOF
13985 #line 13986 "configure"
13986 #include "confdefs.h"
13987 #include <stdlib.h>
13988 #include <stdarg.h>
13989 #include <string.h>
13990 #include <float.h>
13991 EOF
13992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13993 { (eval echo configure:13994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13995 if test -z "$ac_err"; then
13996   rm -rf conftest*
13997   ac_cv_header_stdc=yes
13998 else
13999   echo "$ac_err" >&5
14000   echo "configure: failed program was:" >&5
14001   cat conftest.$ac_ext >&5
14002   rm -rf conftest*
14003   ac_cv_header_stdc=no
14004 fi
14005 rm -f conftest*
14006
14007 if test $ac_cv_header_stdc = yes; then
14008   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14009 cat > conftest.$ac_ext <<EOF
14010 #line 14011 "configure"
14011 #include "confdefs.h"
14012 #include <string.h>
14013 EOF
14014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14015   egrep "memchr" >/dev/null 2>&1; then
14016   :
14017 else
14018   rm -rf conftest*
14019   ac_cv_header_stdc=no
14020 fi
14021 rm -f conftest*
14022
14023 fi
14024
14025 if test $ac_cv_header_stdc = yes; then
14026   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14027 cat > conftest.$ac_ext <<EOF
14028 #line 14029 "configure"
14029 #include "confdefs.h"
14030 #include <stdlib.h>
14031 EOF
14032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14033   egrep "free" >/dev/null 2>&1; then
14034   :
14035 else
14036   rm -rf conftest*
14037   ac_cv_header_stdc=no
14038 fi
14039 rm -f conftest*
14040
14041 fi
14042
14043 if test $ac_cv_header_stdc = yes; then
14044   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14045 if test "$cross_compiling" = yes; then
14046   :
14047 else
14048   cat > conftest.$ac_ext <<EOF
14049 #line 14050 "configure"
14050 #include "confdefs.h"
14051 #include <ctype.h>
14052 #if ((' ' & 0x0FF) == 0x020)
14053 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14054 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14055 #else
14056 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14057  || ('j' <= (c) && (c) <= 'r') \
14058  || ('s' <= (c) && (c) <= 'z'))
14059 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14060 #endif
14061 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14062 int main () { int i; for (i = 0; i < 256; i++)
14063 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14064 exit (0); }
14065
14066 EOF
14067 if { (eval echo configure:14068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14068 then
14069   :
14070 else
14071   echo "configure: failed program was:" >&5
14072   cat conftest.$ac_ext >&5
14073   rm -fr conftest*
14074   ac_cv_header_stdc=no
14075 fi
14076 rm -fr conftest*
14077 fi
14078
14079 fi
14080 fi
14081
14082 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14083 if test $ac_cv_header_stdc = yes; then
14084   cat >> confdefs.h <<\EOF
14085 #define STDC_HEADERS 1
14086 EOF
14087
14088 fi
14089
14090 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14091 echo "configure:14092: checking for mode_t" >&5
14092 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14093   echo $ac_n "(cached) $ac_c" 1>&6
14094 else
14095   cat > conftest.$ac_ext <<EOF
14096 #line 14097 "configure"
14097 #include "confdefs.h"
14098 #include <sys/types.h>
14099 #if STDC_HEADERS
14100 #include <stdlib.h>
14101 #include <stddef.h>
14102 #endif
14103
14104 EOF
14105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14106   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14107   rm -rf conftest*
14108   eval "ac_cv_type_mode_t=yes"
14109 else
14110   rm -rf conftest*
14111   eval "ac_cv_type_mode_t=no"
14112 fi
14113 rm -f conftest*
14114
14115 fi
14116 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14117   echo "$ac_t""yes" 1>&6
14118 else
14119   echo "$ac_t""no" 1>&6
14120   cat >> confdefs.h <<EOF
14121 #define mode_t int
14122 EOF
14123
14124 fi
14125
14126 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14127 echo "configure:14128: checking for off_t" >&5
14128 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14129   echo $ac_n "(cached) $ac_c" 1>&6
14130 else
14131   cat > conftest.$ac_ext <<EOF
14132 #line 14133 "configure"
14133 #include "confdefs.h"
14134 #include <sys/types.h>
14135 #if STDC_HEADERS
14136 #include <stdlib.h>
14137 #include <stddef.h>
14138 #endif
14139
14140 EOF
14141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14142   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14143   rm -rf conftest*
14144   eval "ac_cv_type_off_t=yes"
14145 else
14146   rm -rf conftest*
14147   eval "ac_cv_type_off_t=no"
14148 fi
14149 rm -f conftest*
14150
14151 fi
14152 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14153   echo "$ac_t""yes" 1>&6
14154 else
14155   echo "$ac_t""no" 1>&6
14156   cat >> confdefs.h <<EOF
14157 #define off_t long
14158 EOF
14159
14160 fi
14161
14162 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14163 echo "configure:14164: checking for pid_t" >&5
14164 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14165   echo $ac_n "(cached) $ac_c" 1>&6
14166 else
14167   cat > conftest.$ac_ext <<EOF
14168 #line 14169 "configure"
14169 #include "confdefs.h"
14170 #include <sys/types.h>
14171 #if STDC_HEADERS
14172 #include <stdlib.h>
14173 #include <stddef.h>
14174 #endif
14175
14176 EOF
14177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14178   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14179   rm -rf conftest*
14180   eval "ac_cv_type_pid_t=yes"
14181 else
14182   rm -rf conftest*
14183   eval "ac_cv_type_pid_t=no"
14184 fi
14185 rm -f conftest*
14186
14187 fi
14188 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14189   echo "$ac_t""yes" 1>&6
14190 else
14191   echo "$ac_t""no" 1>&6
14192   cat >> confdefs.h <<EOF
14193 #define pid_t int
14194 EOF
14195
14196 fi
14197
14198 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14199 echo "configure:14200: checking for ptrdiff_t" >&5
14200 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14201   echo $ac_n "(cached) $ac_c" 1>&6
14202 else
14203   cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 #include <stddef.h>
14207 int main() {
14208 ptrdiff_t p
14209 ; return 0; }
14210 EOF
14211 if { (eval echo configure:14212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14212   rm -rf conftest*
14213   am_cv_type_ptrdiff_t=yes
14214 else
14215   echo "configure: failed program was:" >&5
14216   cat conftest.$ac_ext >&5
14217   rm -rf conftest*
14218   am_cv_type_ptrdiff_t=no
14219 fi
14220 rm -f conftest*
14221 fi
14222
14223 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14224    if test $am_cv_type_ptrdiff_t = yes; then
14225      cat >> confdefs.h <<\EOF
14226 #define HAVE_PTRDIFF_T 1
14227 EOF
14228
14229    fi
14230
14231 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14232 echo "configure:14233: checking return type of signal handlers" >&5
14233 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14234   echo $ac_n "(cached) $ac_c" 1>&6
14235 else
14236   cat > conftest.$ac_ext <<EOF
14237 #line 14238 "configure"
14238 #include "confdefs.h"
14239 #include <sys/types.h>
14240 #include <signal.h>
14241 #ifdef signal
14242 #undef signal
14243 #endif
14244 #ifdef __cplusplus
14245 extern "C" void (*signal (int, void (*)(int)))(int);
14246 #else
14247 void (*signal ()) ();
14248 #endif
14249
14250 int main() {
14251 int i;
14252 ; return 0; }
14253 EOF
14254 if { (eval echo configure:14255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14255   rm -rf conftest*
14256   ac_cv_type_signal=void
14257 else
14258   echo "configure: failed program was:" >&5
14259   cat conftest.$ac_ext >&5
14260   rm -rf conftest*
14261   ac_cv_type_signal=int
14262 fi
14263 rm -f conftest*
14264 fi
14265
14266 echo "$ac_t""$ac_cv_type_signal" 1>&6
14267 cat >> confdefs.h <<EOF
14268 #define RETSIGTYPE $ac_cv_type_signal
14269 EOF
14270
14271
14272 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14273 echo "configure:14274: checking for size_t" >&5
14274 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14275   echo $ac_n "(cached) $ac_c" 1>&6
14276 else
14277   cat > conftest.$ac_ext <<EOF
14278 #line 14279 "configure"
14279 #include "confdefs.h"
14280 #include <sys/types.h>
14281 #if STDC_HEADERS
14282 #include <stdlib.h>
14283 #include <stddef.h>
14284 #endif
14285
14286 EOF
14287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14288   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14289   rm -rf conftest*
14290   eval "ac_cv_type_size_t=yes"
14291 else
14292   rm -rf conftest*
14293   eval "ac_cv_type_size_t=no"
14294 fi
14295 rm -f conftest*
14296
14297 fi
14298 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14299   echo "$ac_t""yes" 1>&6
14300 else
14301   echo "$ac_t""no" 1>&6
14302   cat >> confdefs.h <<EOF
14303 #define size_t unsigned
14304 EOF
14305
14306 fi
14307
14308
14309 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14310 echo "configure:14311: checking for ssize_t" >&5
14311 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14312   echo $ac_n "(cached) $ac_c" 1>&6
14313 else
14314   cat > conftest.$ac_ext <<EOF
14315 #line 14316 "configure"
14316 #include "confdefs.h"
14317 #include <sys/types.h>
14318 #if STDC_HEADERS
14319 #include <stdlib.h>
14320 #include <stddef.h>
14321 #endif
14322
14323 EOF
14324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14325   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14326   rm -rf conftest*
14327   eval "ac_cv_type_ssize_t=yes"
14328 else
14329   rm -rf conftest*
14330   eval "ac_cv_type_ssize_t=no"
14331 fi
14332 rm -f conftest*
14333
14334 fi
14335 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14336   echo "$ac_t""yes" 1>&6
14337 else
14338   echo "$ac_t""no" 1>&6
14339   cat >> confdefs.h <<EOF
14340 #define ssize_t signed int
14341 EOF
14342
14343 fi
14344
14345 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14346 echo "configure:14347: checking for caddr_t" >&5
14347 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14348   echo $ac_n "(cached) $ac_c" 1>&6
14349 else
14350   cat > conftest.$ac_ext <<EOF
14351 #line 14352 "configure"
14352 #include "confdefs.h"
14353 #include <sys/types.h>
14354 #if STDC_HEADERS
14355 #include <stdlib.h>
14356 #include <stddef.h>
14357 #endif
14358
14359 EOF
14360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14361   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14362   rm -rf conftest*
14363   eval "ac_cv_type_caddr_t=yes"
14364 else
14365   rm -rf conftest*
14366   eval "ac_cv_type_caddr_t=no"
14367 fi
14368 rm -f conftest*
14369
14370 fi
14371 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14372   echo "$ac_t""yes" 1>&6
14373 else
14374   echo "$ac_t""no" 1>&6
14375   cat >> confdefs.h <<EOF
14376 #define caddr_t char *
14377 EOF
14378
14379 fi
14380
14381
14382 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14383 echo "configure:14384: checking for socklen_t" >&5
14384 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14385   echo $ac_n "(cached) $ac_c" 1>&6
14386 else
14387   cat > conftest.$ac_ext <<EOF
14388 #line 14389 "configure"
14389 #include "confdefs.h"
14390
14391 #ifdef HAVE_SYS_TYPES_H
14392 #include <sys/types.h>
14393 #endif
14394 #ifdef HAVE_SYS_SOCKET_H
14395 #include <sys/socket.h>
14396 #endif
14397
14398 int main() {
14399 socklen_t len;
14400 ; return 0; }
14401 EOF
14402 if { (eval echo configure:14403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14403   rm -rf conftest*
14404   ol_cv_type_socklen_t=yes
14405 else
14406   echo "configure: failed program was:" >&5
14407   cat conftest.$ac_ext >&5
14408   rm -rf conftest*
14409   ol_cv_type_socklen_t=no
14410 fi
14411 rm -f conftest*
14412 fi
14413
14414 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14415   if test $ol_cv_type_socklen_t = no; then
14416     cat >> confdefs.h <<\EOF
14417 #define socklen_t int
14418 EOF
14419
14420   fi
14421  
14422 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14423 echo "configure:14424: checking for member st_blksize in aggregate type struct stat" >&5
14424 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14425   echo $ac_n "(cached) $ac_c" 1>&6
14426 else
14427   cat > conftest.$ac_ext <<EOF
14428 #line 14429 "configure"
14429 #include "confdefs.h"
14430 #include <sys/types.h>
14431 #include <sys/stat.h>
14432 int main() {
14433 struct stat foo; foo.st_blksize;
14434 ; return 0; }
14435 EOF
14436 if { (eval echo configure:14437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14437   rm -rf conftest*
14438   ac_cv_c_struct_member_st_blksize=yes
14439 else
14440   echo "configure: failed program was:" >&5
14441   cat conftest.$ac_ext >&5
14442   rm -rf conftest*
14443   ac_cv_c_struct_member_st_blksize=no
14444 fi
14445 rm -f conftest*
14446 fi
14447
14448 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14449 st_blksize="$ac_cv_c_struct_member_st_blksize"
14450 if test $ac_cv_c_struct_member_st_blksize = yes; then
14451   cat >> confdefs.h <<\EOF
14452 #define HAVE_ST_BLKSIZE 1
14453 EOF
14454
14455 fi
14456
14457 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14458 echo "configure:14459: checking whether time.h and sys/time.h may both be included" >&5
14459 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14460   echo $ac_n "(cached) $ac_c" 1>&6
14461 else
14462   cat > conftest.$ac_ext <<EOF
14463 #line 14464 "configure"
14464 #include "confdefs.h"
14465 #include <sys/types.h>
14466 #include <sys/time.h>
14467 #include <time.h>
14468 int main() {
14469 struct tm *tp;
14470 ; return 0; }
14471 EOF
14472 if { (eval echo configure:14473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14473   rm -rf conftest*
14474   ac_cv_header_time=yes
14475 else
14476   echo "configure: failed program was:" >&5
14477   cat conftest.$ac_ext >&5
14478   rm -rf conftest*
14479   ac_cv_header_time=no
14480 fi
14481 rm -f conftest*
14482 fi
14483
14484 echo "$ac_t""$ac_cv_header_time" 1>&6
14485 if test $ac_cv_header_time = yes; then
14486   cat >> confdefs.h <<\EOF
14487 #define TIME_WITH_SYS_TIME 1
14488 EOF
14489
14490 fi
14491
14492 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14493 echo "configure:14494: checking whether struct tm is in sys/time.h or time.h" >&5
14494 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14495   echo $ac_n "(cached) $ac_c" 1>&6
14496 else
14497   cat > conftest.$ac_ext <<EOF
14498 #line 14499 "configure"
14499 #include "confdefs.h"
14500 #include <sys/types.h>
14501 #include <time.h>
14502 int main() {
14503 struct tm *tp; tp->tm_sec;
14504 ; return 0; }
14505 EOF
14506 if { (eval echo configure:14507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14507   rm -rf conftest*
14508   ac_cv_struct_tm=time.h
14509 else
14510   echo "configure: failed program was:" >&5
14511   cat conftest.$ac_ext >&5
14512   rm -rf conftest*
14513   ac_cv_struct_tm=sys/time.h
14514 fi
14515 rm -f conftest*
14516 fi
14517
14518 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14519 if test $ac_cv_struct_tm = sys/time.h; then
14520   cat >> confdefs.h <<\EOF
14521 #define TM_IN_SYS_TIME 1
14522 EOF
14523
14524 fi
14525
14526 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14527 echo "configure:14528: checking for uid_t in sys/types.h" >&5
14528 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14529   echo $ac_n "(cached) $ac_c" 1>&6
14530 else
14531   cat > conftest.$ac_ext <<EOF
14532 #line 14533 "configure"
14533 #include "confdefs.h"
14534 #include <sys/types.h>
14535 EOF
14536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14537   egrep "uid_t" >/dev/null 2>&1; then
14538   rm -rf conftest*
14539   ac_cv_type_uid_t=yes
14540 else
14541   rm -rf conftest*
14542   ac_cv_type_uid_t=no
14543 fi
14544 rm -f conftest*
14545
14546 fi
14547
14548 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14549 if test $ac_cv_type_uid_t = no; then
14550   cat >> confdefs.h <<\EOF
14551 #define uid_t int
14552 EOF
14553
14554   cat >> confdefs.h <<\EOF
14555 #define gid_t int
14556 EOF
14557
14558 fi
14559
14560 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14561 echo "configure:14562: checking for sig_atomic_t" >&5
14562 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14563   echo $ac_n "(cached) $ac_c" 1>&6
14564 else
14565   cat > conftest.$ac_ext <<EOF
14566 #line 14567 "configure"
14567 #include "confdefs.h"
14568 #include <signal.h>
14569 int main() {
14570 sig_atomic_t atomic;
14571 ; return 0; }
14572 EOF
14573 if { (eval echo configure:14574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14574   rm -rf conftest*
14575   ol_cv_type_sig_atomic_t=yes
14576 else
14577   echo "configure: failed program was:" >&5
14578   cat conftest.$ac_ext >&5
14579   rm -rf conftest*
14580   ol_cv_type_sig_atomic_t=no
14581 fi
14582 rm -f conftest*
14583 fi
14584
14585 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14586   if test $ol_cv_type_sig_atomic_t = no; then
14587     cat >> confdefs.h <<\EOF
14588 #define sig_atomic_t int
14589 EOF
14590
14591   fi
14592  
14593
14594
14595 # test for pw_gecos in struct passwd
14596 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14597 echo "configure:14598: checking struct passwd for pw_gecos" >&5
14598 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14599   echo $ac_n "(cached) $ac_c" 1>&6
14600 else
14601   
14602         cat > conftest.$ac_ext <<EOF
14603 #line 14604 "configure"
14604 #include "confdefs.h"
14605 #include <pwd.h>
14606 int main() {
14607
14608         struct passwd pwd;
14609         pwd.pw_gecos = pwd.pw_name;
14610
14611 ; return 0; }
14612 EOF
14613 if { (eval echo configure:14614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14614   rm -rf conftest*
14615   ol_cv_struct_passwd_pw_gecos=yes
14616 else
14617   echo "configure: failed program was:" >&5
14618   cat conftest.$ac_ext >&5
14619   rm -rf conftest*
14620   ol_cv_struct_passwd_pw_gecos=no
14621 fi
14622 rm -f conftest*
14623 fi
14624
14625 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14626 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14627         cat >> confdefs.h <<\EOF
14628 #define HAVE_PW_GECOS 1
14629 EOF
14630
14631 fi
14632
14633 # test for pw_passwd in struct passwd
14634 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14635 echo "configure:14636: checking struct passwd for pw_passwd" >&5
14636 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14637   echo $ac_n "(cached) $ac_c" 1>&6
14638 else
14639   
14640         cat > conftest.$ac_ext <<EOF
14641 #line 14642 "configure"
14642 #include "confdefs.h"
14643 #include <pwd.h>
14644 int main() {
14645
14646         struct passwd pwd;
14647         pwd.pw_passwd = pwd.pw_name;
14648
14649 ; return 0; }
14650 EOF
14651 if { (eval echo configure:14652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14652   rm -rf conftest*
14653   ol_cv_struct_passwd_pw_passwd=yes
14654 else
14655   echo "configure: failed program was:" >&5
14656   cat conftest.$ac_ext >&5
14657   rm -rf conftest*
14658   ol_cv_struct_passwd_pw_passwd=no
14659 fi
14660 rm -f conftest*
14661 fi
14662
14663 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14664 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14665         cat >> confdefs.h <<\EOF
14666 #define HAVE_PW_PASSWD 1
14667 EOF
14668
14669 fi
14670
14671
14672 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14673 echo "configure:14674: checking if toupper() requires islower()" >&5
14674 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14675   echo $ac_n "(cached) $ac_c" 1>&6
14676 else
14677   
14678         if test "$cross_compiling" = yes; then
14679   ol_cv_c_upper_lower=safe
14680 else
14681   cat > conftest.$ac_ext <<EOF
14682 #line 14683 "configure"
14683 #include "confdefs.h"
14684
14685 #include <ctype.h>
14686 main()
14687 {
14688         if ('C' == toupper('C'))
14689                 exit(0);
14690         else
14691                 exit(1);
14692 }
14693 EOF
14694 if { (eval echo configure:14695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14695 then
14696   ol_cv_c_upper_lower=no
14697 else
14698   echo "configure: failed program was:" >&5
14699   cat conftest.$ac_ext >&5
14700   rm -fr conftest*
14701   ol_cv_c_upper_lower=yes
14702 fi
14703 rm -fr conftest*
14704 fi
14705
14706 fi
14707
14708 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14709 if test $ol_cv_c_upper_lower != no ; then
14710         cat >> confdefs.h <<\EOF
14711 #define C_UPPER_LOWER 1
14712 EOF
14713
14714 fi
14715
14716 echo $ac_n "checking for working const""... $ac_c" 1>&6
14717 echo "configure:14718: checking for working const" >&5
14718 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14719   echo $ac_n "(cached) $ac_c" 1>&6
14720 else
14721   cat > conftest.$ac_ext <<EOF
14722 #line 14723 "configure"
14723 #include "confdefs.h"
14724
14725 int main() {
14726
14727 /* Ultrix mips cc rejects this.  */
14728 typedef int charset[2]; const charset x;
14729 /* SunOS 4.1.1 cc rejects this.  */
14730 char const *const *ccp;
14731 char **p;
14732 /* NEC SVR4.0.2 mips cc rejects this.  */
14733 struct point {int x, y;};
14734 static struct point const zero = {0,0};
14735 /* AIX XL C 1.02.0.0 rejects this.
14736    It does not let you subtract one const X* pointer from another in an arm
14737    of an if-expression whose if-part is not a constant expression */
14738 const char *g = "string";
14739 ccp = &g + (g ? g-g : 0);
14740 /* HPUX 7.0 cc rejects these. */
14741 ++ccp;
14742 p = (char**) ccp;
14743 ccp = (char const *const *) p;
14744 { /* SCO 3.2v4 cc rejects this.  */
14745   char *t;
14746   char const *s = 0 ? (char *) 0 : (char const *) 0;
14747
14748   *t++ = 0;
14749 }
14750 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14751   int x[] = {25, 17};
14752   const int *foo = &x[0];
14753   ++foo;
14754 }
14755 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14756   typedef const int *iptr;
14757   iptr p = 0;
14758   ++p;
14759 }
14760 { /* AIX XL C 1.02.0.0 rejects this saying
14761      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14762   struct s { int j; const int *ap[3]; };
14763   struct s *b; b->j = 5;
14764 }
14765 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14766   const int foo = 10;
14767 }
14768
14769 ; return 0; }
14770 EOF
14771 if { (eval echo configure:14772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14772   rm -rf conftest*
14773   ac_cv_c_const=yes
14774 else
14775   echo "configure: failed program was:" >&5
14776   cat conftest.$ac_ext >&5
14777   rm -rf conftest*
14778   ac_cv_c_const=no
14779 fi
14780 rm -f conftest*
14781 fi
14782
14783 echo "$ac_t""$ac_cv_c_const" 1>&6
14784 if test $ac_cv_c_const = no; then
14785   cat >> confdefs.h <<\EOF
14786 #define const 
14787 EOF
14788
14789 fi
14790
14791 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14792 echo "configure:14793: checking if compiler understands volatile" >&5
14793 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14794   echo $ac_n "(cached) $ac_c" 1>&6
14795 else
14796   cat > conftest.$ac_ext <<EOF
14797 #line 14798 "configure"
14798 #include "confdefs.h"
14799 int x, y, z;
14800 int main() {
14801 volatile int a; int * volatile b = x ? &y : &z;
14802       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14803       *b = 0;
14804 ; return 0; }
14805 EOF
14806 if { (eval echo configure:14807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14807   rm -rf conftest*
14808   ol_cv_c_volatile=yes
14809 else
14810   echo "configure: failed program was:" >&5
14811   cat conftest.$ac_ext >&5
14812   rm -rf conftest*
14813   ol_cv_c_volatile=no
14814 fi
14815 rm -f conftest*
14816 fi
14817
14818 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14819   if test $ol_cv_c_volatile = yes; then
14820     : 
14821   else
14822     cat >> confdefs.h <<\EOF
14823 #define volatile 
14824 EOF
14825
14826   fi
14827  
14828
14829 if test $cross_compiling = yes ; then
14830         cat >> confdefs.h <<\EOF
14831 #define CROSS_COMPILING 1
14832 EOF
14833
14834 else
14835         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14836 echo "configure:14837: checking whether byte ordering is bigendian" >&5
14837 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14838   echo $ac_n "(cached) $ac_c" 1>&6
14839 else
14840   ac_cv_c_bigendian=unknown
14841 # See if sys/param.h defines the BYTE_ORDER macro.
14842 cat > conftest.$ac_ext <<EOF
14843 #line 14844 "configure"
14844 #include "confdefs.h"
14845 #include <sys/types.h>
14846 #include <sys/param.h>
14847 int main() {
14848
14849 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14850  bogus endian macros
14851 #endif
14852 ; return 0; }
14853 EOF
14854 if { (eval echo configure:14855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14855   rm -rf conftest*
14856   # It does; now see whether it defined to BIG_ENDIAN or not.
14857 cat > conftest.$ac_ext <<EOF
14858 #line 14859 "configure"
14859 #include "confdefs.h"
14860 #include <sys/types.h>
14861 #include <sys/param.h>
14862 int main() {
14863
14864 #if BYTE_ORDER != BIG_ENDIAN
14865  not big endian
14866 #endif
14867 ; return 0; }
14868 EOF
14869 if { (eval echo configure:14870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14870   rm -rf conftest*
14871   ac_cv_c_bigendian=yes
14872 else
14873   echo "configure: failed program was:" >&5
14874   cat conftest.$ac_ext >&5
14875   rm -rf conftest*
14876   ac_cv_c_bigendian=no
14877 fi
14878 rm -f conftest*
14879 else
14880   echo "configure: failed program was:" >&5
14881   cat conftest.$ac_ext >&5
14882 fi
14883 rm -f conftest*
14884 if test $ac_cv_c_bigendian = unknown; then
14885 if test "$cross_compiling" = yes; then
14886     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14887 else
14888   cat > conftest.$ac_ext <<EOF
14889 #line 14890 "configure"
14890 #include "confdefs.h"
14891 main () {
14892   /* Are we little or big endian?  From Harbison&Steele.  */
14893   union
14894   {
14895     long l;
14896     char c[sizeof (long)];
14897   } u;
14898   u.l = 1;
14899   exit (u.c[sizeof (long) - 1] == 1);
14900 }
14901 EOF
14902 if { (eval echo configure:14903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14903 then
14904   ac_cv_c_bigendian=no
14905 else
14906   echo "configure: failed program was:" >&5
14907   cat conftest.$ac_ext >&5
14908   rm -fr conftest*
14909   ac_cv_c_bigendian=yes
14910 fi
14911 rm -fr conftest*
14912 fi
14913
14914 fi
14915 fi
14916
14917 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14918 if test $ac_cv_c_bigendian = yes; then
14919   cat >> confdefs.h <<\EOF
14920 #define WORDS_BIGENDIAN 1
14921 EOF
14922
14923 fi
14924
14925 fi
14926
14927 echo $ac_n "checking size of short""... $ac_c" 1>&6
14928 echo "configure:14929: checking size of short" >&5 
14929 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14930   echo $ac_n "(cached) $ac_c" 1>&6
14931 else
14932   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14933   cat > conftest.$ac_ext <<EOF
14934 #line 14935 "configure"
14935 #include "confdefs.h"
14936 #include "confdefs.h" 
14937 #include <sys/types.h> 
14938  
14939
14940 int main() {
14941 switch (0) case 0: case (sizeof (short) == $ac_size):;
14942 ; return 0; }
14943 EOF
14944 if { (eval echo configure:14945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14945   rm -rf conftest*
14946   ac_cv_sizeof_short=$ac_size
14947 else
14948   echo "configure: failed program was:" >&5
14949   cat conftest.$ac_ext >&5
14950 fi
14951 rm -f conftest* 
14952   if test x$ac_cv_sizeof_short != x ; then break; fi 
14953 done 
14954
14955 fi
14956  
14957 if test x$ac_cv_sizeof_short = x ; then 
14958   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14959 fi 
14960 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14961 cat >> confdefs.h <<EOF
14962 #define SIZEOF_SHORT $ac_cv_sizeof_short
14963 EOF
14964  
14965  
14966 echo $ac_n "checking size of int""... $ac_c" 1>&6
14967 echo "configure:14968: checking size of int" >&5 
14968 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14969   echo $ac_n "(cached) $ac_c" 1>&6
14970 else
14971   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14972   cat > conftest.$ac_ext <<EOF
14973 #line 14974 "configure"
14974 #include "confdefs.h"
14975 #include "confdefs.h" 
14976 #include <sys/types.h> 
14977  
14978
14979 int main() {
14980 switch (0) case 0: case (sizeof (int) == $ac_size):;
14981 ; return 0; }
14982 EOF
14983 if { (eval echo configure:14984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14984   rm -rf conftest*
14985   ac_cv_sizeof_int=$ac_size
14986 else
14987   echo "configure: failed program was:" >&5
14988   cat conftest.$ac_ext >&5
14989 fi
14990 rm -f conftest* 
14991   if test x$ac_cv_sizeof_int != x ; then break; fi 
14992 done 
14993
14994 fi
14995  
14996 if test x$ac_cv_sizeof_int = x ; then 
14997   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14998 fi 
14999 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15000 cat >> confdefs.h <<EOF
15001 #define SIZEOF_INT $ac_cv_sizeof_int
15002 EOF
15003  
15004  
15005 echo $ac_n "checking size of long""... $ac_c" 1>&6
15006 echo "configure:15007: checking size of long" >&5 
15007 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15008   echo $ac_n "(cached) $ac_c" 1>&6
15009 else
15010   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15011   cat > conftest.$ac_ext <<EOF
15012 #line 15013 "configure"
15013 #include "confdefs.h"
15014 #include "confdefs.h" 
15015 #include <sys/types.h> 
15016  
15017
15018 int main() {
15019 switch (0) case 0: case (sizeof (long) == $ac_size):;
15020 ; return 0; }
15021 EOF
15022 if { (eval echo configure:15023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15023   rm -rf conftest*
15024   ac_cv_sizeof_long=$ac_size
15025 else
15026   echo "configure: failed program was:" >&5
15027   cat conftest.$ac_ext >&5
15028 fi
15029 rm -f conftest* 
15030   if test x$ac_cv_sizeof_long != x ; then break; fi 
15031 done 
15032
15033 fi
15034  
15035 if test x$ac_cv_sizeof_long = x ; then 
15036   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15037 fi 
15038 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15039 cat >> confdefs.h <<EOF
15040 #define SIZEOF_LONG $ac_cv_sizeof_long
15041 EOF
15042  
15043
15044
15045 if test "$ac_cv_sizeof_int" -lt 4 ; then
15046         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15047
15048         cat >> confdefs.h <<\EOF
15049 #define LBER_INT_T long
15050 EOF
15051
15052 else
15053         cat >> confdefs.h <<\EOF
15054 #define LBER_INT_T int
15055 EOF
15056
15057 fi
15058
15059 cat >> confdefs.h <<\EOF
15060 #define LBER_LEN_T long
15061 EOF
15062
15063 cat >> confdefs.h <<\EOF
15064 #define LBER_SOCKET_T int
15065 EOF
15066
15067 cat >> confdefs.h <<\EOF
15068 #define LBER_TAG_T long
15069 EOF
15070
15071
15072 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15073 echo "configure:15074: checking for 8-bit clean memcmp" >&5
15074 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15075   echo $ac_n "(cached) $ac_c" 1>&6
15076 else
15077   if test "$cross_compiling" = yes; then
15078   ac_cv_func_memcmp_clean=no
15079 else
15080   cat > conftest.$ac_ext <<EOF
15081 #line 15082 "configure"
15082 #include "confdefs.h"
15083
15084 main()
15085 {
15086   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15087   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15088 }
15089
15090 EOF
15091 if { (eval echo configure:15092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15092 then
15093   ac_cv_func_memcmp_clean=yes
15094 else
15095   echo "configure: failed program was:" >&5
15096   cat conftest.$ac_ext >&5
15097   rm -fr conftest*
15098   ac_cv_func_memcmp_clean=no
15099 fi
15100 rm -fr conftest*
15101 fi
15102
15103 fi
15104
15105 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15106 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15107
15108 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15109 echo "configure:15110: checking for strftime" >&5
15110 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15111   echo $ac_n "(cached) $ac_c" 1>&6
15112 else
15113   cat > conftest.$ac_ext <<EOF
15114 #line 15115 "configure"
15115 #include "confdefs.h"
15116 /* System header to define __stub macros and hopefully few prototypes,
15117     which can conflict with char strftime(); below.  */
15118 #include <assert.h>
15119 /* Override any gcc2 internal prototype to avoid an error.  */
15120 /* We use char because int might match the return type of a gcc2
15121     builtin and then its argument prototype would still apply.  */
15122 char strftime();
15123 char (*f)();
15124
15125 int main() {
15126
15127 /* The GNU C library defines this for functions which it implements
15128     to always fail with ENOSYS.  Some functions are actually named
15129     something starting with __ and the normal name is an alias.  */
15130 #if defined (__stub_strftime) || defined (__stub___strftime)
15131 choke me
15132 #else
15133 f = strftime;
15134 #endif
15135
15136 ; return 0; }
15137 EOF
15138 if { (eval echo configure:15139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15139   rm -rf conftest*
15140   eval "ac_cv_func_strftime=yes"
15141 else
15142   echo "configure: failed program was:" >&5
15143   cat conftest.$ac_ext >&5
15144   rm -rf conftest*
15145   eval "ac_cv_func_strftime=no"
15146 fi
15147 rm -f conftest*
15148 fi
15149
15150 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15151   echo "$ac_t""yes" 1>&6
15152   cat >> confdefs.h <<\EOF
15153 #define HAVE_STRFTIME 1
15154 EOF
15155
15156 else
15157   echo "$ac_t""no" 1>&6
15158 # strftime is in -lintl on SCO UNIX.
15159 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15160 echo "configure:15161: checking for strftime in -lintl" >&5
15161 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15162 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15163   echo $ac_n "(cached) $ac_c" 1>&6
15164 else
15165   ac_save_LIBS="$LIBS"
15166 LIBS="-lintl  $LIBS"
15167 cat > conftest.$ac_ext <<EOF
15168 #line 15169 "configure"
15169 #include "confdefs.h"
15170 /* Override any gcc2 internal prototype to avoid an error.  */
15171 /* We use char because int might match the return type of a gcc2
15172     builtin and then its argument prototype would still apply.  */
15173 char strftime();
15174
15175 int main() {
15176 strftime()
15177 ; return 0; }
15178 EOF
15179 if { (eval echo configure:15180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15180   rm -rf conftest*
15181   eval "ac_cv_lib_$ac_lib_var=yes"
15182 else
15183   echo "configure: failed program was:" >&5
15184   cat conftest.$ac_ext >&5
15185   rm -rf conftest*
15186   eval "ac_cv_lib_$ac_lib_var=no"
15187 fi
15188 rm -f conftest*
15189 LIBS="$ac_save_LIBS"
15190
15191 fi
15192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15193   echo "$ac_t""yes" 1>&6
15194   cat >> confdefs.h <<\EOF
15195 #define HAVE_STRFTIME 1
15196 EOF
15197
15198 LIBS="-lintl $LIBS"
15199 else
15200   echo "$ac_t""no" 1>&6
15201 fi
15202
15203 fi
15204
15205
15206 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15207 echo "configure:15208: checking for inet_aton()" >&5
15208 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15209   echo $ac_n "(cached) $ac_c" 1>&6
15210 else
15211   cat > conftest.$ac_ext <<EOF
15212 #line 15213 "configure"
15213 #include "confdefs.h"
15214
15215 #ifdef HAVE_SYS_TYPES_H
15216 #       include <sys/types.h>
15217 #endif
15218 #ifdef HAVE_SYS_SOCKET_H
15219 #       include <sys/socket.h>
15220 #       ifdef HAVE_SYS_SELECT_H
15221 #               include <sys/select.h>
15222 #       endif
15223 #       include <netinet/in.h>
15224 #       ifdef HAVE_ARPA_INET_H
15225 #               include <arpa/inet.h>
15226 #       endif
15227 #endif
15228
15229 int main() {
15230 struct in_addr in;
15231 int rc = inet_aton( "255.255.255.255", &in );
15232 ; return 0; }
15233 EOF
15234 if { (eval echo configure:15235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15235   rm -rf conftest*
15236   ol_cv_func_inet_aton=yes
15237 else
15238   echo "configure: failed program was:" >&5
15239   cat conftest.$ac_ext >&5
15240   rm -rf conftest*
15241   ol_cv_func_inet_aton=no
15242 fi
15243 rm -f conftest*
15244 fi
15245
15246 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15247   if test $ol_cv_func_inet_aton != no; then
15248     cat >> confdefs.h <<\EOF
15249 #define HAVE_INET_ATON 1
15250 EOF
15251
15252   fi
15253  
15254
15255 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15256 echo "configure:15257: checking for _spawnlp" >&5
15257 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15258   echo $ac_n "(cached) $ac_c" 1>&6
15259 else
15260   cat > conftest.$ac_ext <<EOF
15261 #line 15262 "configure"
15262 #include "confdefs.h"
15263 /* System header to define __stub macros and hopefully few prototypes,
15264     which can conflict with char _spawnlp(); below.  */
15265 #include <assert.h>
15266 /* Override any gcc2 internal prototype to avoid an error.  */
15267 /* We use char because int might match the return type of a gcc2
15268     builtin and then its argument prototype would still apply.  */
15269 char _spawnlp();
15270 char (*f)();
15271
15272 int main() {
15273
15274 /* The GNU C library defines this for functions which it implements
15275     to always fail with ENOSYS.  Some functions are actually named
15276     something starting with __ and the normal name is an alias.  */
15277 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15278 choke me
15279 #else
15280 f = _spawnlp;
15281 #endif
15282
15283 ; return 0; }
15284 EOF
15285 if { (eval echo configure:15286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15286   rm -rf conftest*
15287   eval "ac_cv_func__spawnlp=yes"
15288 else
15289   echo "configure: failed program was:" >&5
15290   cat conftest.$ac_ext >&5
15291   rm -rf conftest*
15292   eval "ac_cv_func__spawnlp=no"
15293 fi
15294 rm -f conftest*
15295 fi
15296
15297 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15298   echo "$ac_t""yes" 1>&6
15299   cat >> confdefs.h <<\EOF
15300 #define HAVE_SPAWNLP 1
15301 EOF
15302
15303 else
15304   echo "$ac_t""no" 1>&6
15305 fi
15306
15307
15308 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15309 echo "configure:15310: checking for _snprintf" >&5
15310 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15311   echo $ac_n "(cached) $ac_c" 1>&6
15312 else
15313   cat > conftest.$ac_ext <<EOF
15314 #line 15315 "configure"
15315 #include "confdefs.h"
15316 /* System header to define __stub macros and hopefully few prototypes,
15317     which can conflict with char _snprintf(); below.  */
15318 #include <assert.h>
15319 /* Override any gcc2 internal prototype to avoid an error.  */
15320 /* We use char because int might match the return type of a gcc2
15321     builtin and then its argument prototype would still apply.  */
15322 char _snprintf();
15323 char (*f)();
15324
15325 int main() {
15326
15327 /* The GNU C library defines this for functions which it implements
15328     to always fail with ENOSYS.  Some functions are actually named
15329     something starting with __ and the normal name is an alias.  */
15330 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15331 choke me
15332 #else
15333 f = _snprintf;
15334 #endif
15335
15336 ; return 0; }
15337 EOF
15338 if { (eval echo configure:15339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15339   rm -rf conftest*
15340   eval "ac_cv_func__snprintf=yes"
15341 else
15342   echo "configure: failed program was:" >&5
15343   cat conftest.$ac_ext >&5
15344   rm -rf conftest*
15345   eval "ac_cv_func__snprintf=no"
15346 fi
15347 rm -f conftest*
15348 fi
15349
15350 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15351   echo "$ac_t""yes" 1>&6
15352   ac_cv_func_snprintf=yes
15353         cat >> confdefs.h <<\EOF
15354 #define snprintf _snprintf
15355 EOF
15356
15357
15358 else
15359   echo "$ac_t""no" 1>&6
15360 fi
15361
15362
15363 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15364 echo "configure:15365: checking for _vsnprintf" >&5
15365 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15366   echo $ac_n "(cached) $ac_c" 1>&6
15367 else
15368   cat > conftest.$ac_ext <<EOF
15369 #line 15370 "configure"
15370 #include "confdefs.h"
15371 /* System header to define __stub macros and hopefully few prototypes,
15372     which can conflict with char _vsnprintf(); below.  */
15373 #include <assert.h>
15374 /* Override any gcc2 internal prototype to avoid an error.  */
15375 /* We use char because int might match the return type of a gcc2
15376     builtin and then its argument prototype would still apply.  */
15377 char _vsnprintf();
15378 char (*f)();
15379
15380 int main() {
15381
15382 /* The GNU C library defines this for functions which it implements
15383     to always fail with ENOSYS.  Some functions are actually named
15384     something starting with __ and the normal name is an alias.  */
15385 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15386 choke me
15387 #else
15388 f = _vsnprintf;
15389 #endif
15390
15391 ; return 0; }
15392 EOF
15393 if { (eval echo configure:15394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15394   rm -rf conftest*
15395   eval "ac_cv_func__vsnprintf=yes"
15396 else
15397   echo "configure: failed program was:" >&5
15398   cat conftest.$ac_ext >&5
15399   rm -rf conftest*
15400   eval "ac_cv_func__vsnprintf=no"
15401 fi
15402 rm -f conftest*
15403 fi
15404
15405 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15406   echo "$ac_t""yes" 1>&6
15407   ac_cv_func_vsnprintf=yes
15408         cat >> confdefs.h <<\EOF
15409 #define vsnprintf _vsnprintf
15410 EOF
15411
15412
15413 else
15414   echo "$ac_t""no" 1>&6
15415 fi
15416
15417
15418 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15419 echo "configure:15420: checking for vprintf" >&5
15420 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15421   echo $ac_n "(cached) $ac_c" 1>&6
15422 else
15423   cat > conftest.$ac_ext <<EOF
15424 #line 15425 "configure"
15425 #include "confdefs.h"
15426 /* System header to define __stub macros and hopefully few prototypes,
15427     which can conflict with char vprintf(); below.  */
15428 #include <assert.h>
15429 /* Override any gcc2 internal prototype to avoid an error.  */
15430 /* We use char because int might match the return type of a gcc2
15431     builtin and then its argument prototype would still apply.  */
15432 char vprintf();
15433 char (*f)();
15434
15435 int main() {
15436
15437 /* The GNU C library defines this for functions which it implements
15438     to always fail with ENOSYS.  Some functions are actually named
15439     something starting with __ and the normal name is an alias.  */
15440 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15441 choke me
15442 #else
15443 f = vprintf;
15444 #endif
15445
15446 ; return 0; }
15447 EOF
15448 if { (eval echo configure:15449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15449   rm -rf conftest*
15450   eval "ac_cv_func_vprintf=yes"
15451 else
15452   echo "configure: failed program was:" >&5
15453   cat conftest.$ac_ext >&5
15454   rm -rf conftest*
15455   eval "ac_cv_func_vprintf=no"
15456 fi
15457 rm -f conftest*
15458 fi
15459
15460 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15461   echo "$ac_t""yes" 1>&6
15462   cat >> confdefs.h <<\EOF
15463 #define HAVE_VPRINTF 1
15464 EOF
15465
15466 else
15467   echo "$ac_t""no" 1>&6
15468 fi
15469
15470 if test "$ac_cv_func_vprintf" != yes; then
15471 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15472 echo "configure:15473: checking for _doprnt" >&5
15473 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15474   echo $ac_n "(cached) $ac_c" 1>&6
15475 else
15476   cat > conftest.$ac_ext <<EOF
15477 #line 15478 "configure"
15478 #include "confdefs.h"
15479 /* System header to define __stub macros and hopefully few prototypes,
15480     which can conflict with char _doprnt(); below.  */
15481 #include <assert.h>
15482 /* Override any gcc2 internal prototype to avoid an error.  */
15483 /* We use char because int might match the return type of a gcc2
15484     builtin and then its argument prototype would still apply.  */
15485 char _doprnt();
15486 char (*f)();
15487
15488 int main() {
15489
15490 /* The GNU C library defines this for functions which it implements
15491     to always fail with ENOSYS.  Some functions are actually named
15492     something starting with __ and the normal name is an alias.  */
15493 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15494 choke me
15495 #else
15496 f = _doprnt;
15497 #endif
15498
15499 ; return 0; }
15500 EOF
15501 if { (eval echo configure:15502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15502   rm -rf conftest*
15503   eval "ac_cv_func__doprnt=yes"
15504 else
15505   echo "configure: failed program was:" >&5
15506   cat conftest.$ac_ext >&5
15507   rm -rf conftest*
15508   eval "ac_cv_func__doprnt=no"
15509 fi
15510 rm -f conftest*
15511 fi
15512
15513 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15514   echo "$ac_t""yes" 1>&6
15515   cat >> confdefs.h <<\EOF
15516 #define HAVE_DOPRNT 1
15517 EOF
15518
15519 else
15520   echo "$ac_t""no" 1>&6
15521 fi
15522
15523 fi
15524
15525
15526 if test $ac_cv_func_vprintf = yes ; then
15527                 for ac_func in vsnprintf vsprintf
15528 do
15529 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15530 echo "configure:15531: checking for $ac_func" >&5
15531 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15532   echo $ac_n "(cached) $ac_c" 1>&6
15533 else
15534   cat > conftest.$ac_ext <<EOF
15535 #line 15536 "configure"
15536 #include "confdefs.h"
15537 /* System header to define __stub macros and hopefully few prototypes,
15538     which can conflict with char $ac_func(); below.  */
15539 #include <assert.h>
15540 /* Override any gcc2 internal prototype to avoid an error.  */
15541 /* We use char because int might match the return type of a gcc2
15542     builtin and then its argument prototype would still apply.  */
15543 char $ac_func();
15544 char (*f)();
15545
15546 int main() {
15547
15548 /* The GNU C library defines this for functions which it implements
15549     to always fail with ENOSYS.  Some functions are actually named
15550     something starting with __ and the normal name is an alias.  */
15551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15552 choke me
15553 #else
15554 f = $ac_func;
15555 #endif
15556
15557 ; return 0; }
15558 EOF
15559 if { (eval echo configure:15560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15560   rm -rf conftest*
15561   eval "ac_cv_func_$ac_func=yes"
15562 else
15563   echo "configure: failed program was:" >&5
15564   cat conftest.$ac_ext >&5
15565   rm -rf conftest*
15566   eval "ac_cv_func_$ac_func=no"
15567 fi
15568 rm -f conftest*
15569 fi
15570
15571 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15572   echo "$ac_t""yes" 1>&6
15573     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15574   cat >> confdefs.h <<EOF
15575 #define $ac_tr_func 1
15576 EOF
15577  
15578 else
15579   echo "$ac_t""no" 1>&6
15580 fi
15581 done
15582
15583 fi
15584
15585 for ac_func in \
15586         bcopy                   \
15587         closesocket             \
15588         chroot                  \
15589         endgrent                \
15590         endpwent                \
15591         flock                   \
15592         getdtablesize   \
15593         getgrgid                \
15594         gethostname             \
15595         getpass                 \
15596         getpassphrase   \
15597         getpwuid                \
15598         getpwnam                \
15599         getspnam                \
15600         gettimeofday    \
15601         initgroups              \
15602         lockf                   \
15603         memcpy                  \
15604         memmove                 \
15605         mkstemp                 \
15606         pipe                    \
15607         read                    \
15608         recv                    \
15609         recvfrom                \
15610         setpwfile               \
15611         setgid                  \
15612         setegid                 \
15613         setsid                  \
15614         setuid                  \
15615         seteuid                 \
15616         sigaction               \
15617         signal                  \
15618         sigset                  \
15619         snprintf                \
15620         strdup                  \
15621         strerror                \
15622         strpbrk                 \
15623         strrchr                 \
15624         strsep                  \
15625         strstr                  \
15626         strtol                  \
15627         strtoul                 \
15628         strspn                  \
15629         sysconf                 \
15630         waitpid                 \
15631         wait4                   \
15632         write                   \
15633         send                    \
15634         sendto                  \
15635
15636 do
15637 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15638 echo "configure:15639: checking for $ac_func" >&5
15639 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15640   echo $ac_n "(cached) $ac_c" 1>&6
15641 else
15642   cat > conftest.$ac_ext <<EOF
15643 #line 15644 "configure"
15644 #include "confdefs.h"
15645 /* System header to define __stub macros and hopefully few prototypes,
15646     which can conflict with char $ac_func(); below.  */
15647 #include <assert.h>
15648 /* Override any gcc2 internal prototype to avoid an error.  */
15649 /* We use char because int might match the return type of a gcc2
15650     builtin and then its argument prototype would still apply.  */
15651 char $ac_func();
15652 char (*f)();
15653
15654 int main() {
15655
15656 /* The GNU C library defines this for functions which it implements
15657     to always fail with ENOSYS.  Some functions are actually named
15658     something starting with __ and the normal name is an alias.  */
15659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15660 choke me
15661 #else
15662 f = $ac_func;
15663 #endif
15664
15665 ; return 0; }
15666 EOF
15667 if { (eval echo configure:15668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15668   rm -rf conftest*
15669   eval "ac_cv_func_$ac_func=yes"
15670 else
15671   echo "configure: failed program was:" >&5
15672   cat conftest.$ac_ext >&5
15673   rm -rf conftest*
15674   eval "ac_cv_func_$ac_func=no"
15675 fi
15676 rm -f conftest*
15677 fi
15678
15679 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15680   echo "$ac_t""yes" 1>&6
15681     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15682   cat >> confdefs.h <<EOF
15683 #define $ac_tr_func 1
15684 EOF
15685  
15686 else
15687   echo "$ac_t""no" 1>&6
15688 fi
15689 done
15690
15691
15692 for ac_func in getopt tempnam
15693 do
15694 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15695 echo "configure:15696: checking for $ac_func" >&5
15696 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15697   echo $ac_n "(cached) $ac_c" 1>&6
15698 else
15699   cat > conftest.$ac_ext <<EOF
15700 #line 15701 "configure"
15701 #include "confdefs.h"
15702 /* System header to define __stub macros and hopefully few prototypes,
15703     which can conflict with char $ac_func(); below.  */
15704 #include <assert.h>
15705 /* Override any gcc2 internal prototype to avoid an error.  */
15706 /* We use char because int might match the return type of a gcc2
15707     builtin and then its argument prototype would still apply.  */
15708 char $ac_func();
15709 char (*f)();
15710
15711 int main() {
15712
15713 /* The GNU C library defines this for functions which it implements
15714     to always fail with ENOSYS.  Some functions are actually named
15715     something starting with __ and the normal name is an alias.  */
15716 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15717 choke me
15718 #else
15719 f = $ac_func;
15720 #endif
15721
15722 ; return 0; }
15723 EOF
15724 if { (eval echo configure:15725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15725   rm -rf conftest*
15726   eval "ac_cv_func_$ac_func=yes"
15727 else
15728   echo "configure: failed program was:" >&5
15729   cat conftest.$ac_ext >&5
15730   rm -rf conftest*
15731   eval "ac_cv_func_$ac_func=no"
15732 fi
15733 rm -f conftest*
15734 fi
15735
15736 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15737   echo "$ac_t""yes" 1>&6
15738     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15739   cat >> confdefs.h <<EOF
15740 #define $ac_tr_func 1
15741 EOF
15742  
15743 else
15744   echo "$ac_t""no" 1>&6
15745 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15746 fi
15747 done
15748
15749
15750
15751 if test "$ac_cv_func_getopt" != yes; then
15752     LIBSRCS="$LIBSRCS getopt.c"
15753 fi
15754
15755 if test "$ac_cv_func_tempnam" != yes; then
15756     LIBSRCS="$LIBSRCS tempnam.c"
15757 fi
15758
15759 # Check Configuration
15760 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15761 echo "configure:15762: checking declaration of sys_errlist" >&5
15762 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15763   echo $ac_n "(cached) $ac_c" 1>&6
15764 else
15765   
15766         cat > conftest.$ac_ext <<EOF
15767 #line 15768 "configure"
15768 #include "confdefs.h"
15769
15770 #include <stdio.h>
15771 #include <sys/types.h>
15772 #include <errno.h>
15773 #ifdef WINNT
15774 #include <stdlib.h>
15775 #endif 
15776 int main() {
15777 char *c = (char *) *sys_errlist
15778 ; return 0; }
15779 EOF
15780 if { (eval echo configure:15781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15781   rm -rf conftest*
15782   ol_cv_dcl_sys_errlist=yes
15783         ol_cv_have_sys_errlist=yes
15784 else
15785   echo "configure: failed program was:" >&5
15786   cat conftest.$ac_ext >&5
15787   rm -rf conftest*
15788   ol_cv_dcl_sys_errlist=no
15789 fi
15790 rm -f conftest*
15791 fi
15792
15793 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15794 #
15795 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15796 if test $ol_cv_dcl_sys_errlist = no ; then
15797         cat >> confdefs.h <<\EOF
15798 #define DECL_SYS_ERRLIST 1
15799 EOF
15800
15801
15802         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15803 echo "configure:15804: checking existence of sys_errlist" >&5
15804 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15805   echo $ac_n "(cached) $ac_c" 1>&6
15806 else
15807   
15808                 cat > conftest.$ac_ext <<EOF
15809 #line 15810 "configure"
15810 #include "confdefs.h"
15811 #include <errno.h>
15812 int main() {
15813 char *c = (char *) *sys_errlist
15814 ; return 0; }
15815 EOF
15816 if { (eval echo configure:15817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15817   rm -rf conftest*
15818   ol_cv_have_sys_errlist=yes
15819 else
15820   echo "configure: failed program was:" >&5
15821   cat conftest.$ac_ext >&5
15822   rm -rf conftest*
15823   ol_cv_have_sys_errlist=no
15824 fi
15825 rm -f conftest*
15826 fi
15827
15828 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15829 fi
15830 if test $ol_cv_have_sys_errlist = yes ; then
15831         cat >> confdefs.h <<\EOF
15832 #define HAVE_SYS_ERRLIST 1
15833 EOF
15834
15835 fi
15836
15837
15838
15839 if test "$ol_enable_debug" != no ; then
15840         cat >> confdefs.h <<\EOF
15841 #define LDAP_DEBUG 1
15842 EOF
15843
15844 fi
15845 if test "$ol_enable_syslog" = yes ; then
15846         cat >> confdefs.h <<\EOF
15847 #define LDAP_SYSLOG 1
15848 EOF
15849
15850 fi
15851 if test "$ol_enable_cache" = no ; then
15852         cat >> confdefs.h <<\EOF
15853 #define LDAP_NOCACHE 1
15854 EOF
15855
15856 fi
15857 if test "$ol_link_kbind" != no ; then
15858         cat >> confdefs.h <<\EOF
15859 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15860 EOF
15861
15862 fi
15863 if test "$ol_enable_proctitle" != no ; then
15864         cat >> confdefs.h <<\EOF
15865 #define LDAP_PROCTITLE 1
15866 EOF
15867
15868 fi
15869 if test "$ol_enable_referrals" != no ; then
15870         cat >> confdefs.h <<\EOF
15871 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15872 EOF
15873
15874 fi
15875 if test "$ol_enable_local" != no; then
15876         cat >> confdefs.h <<\EOF
15877 #define LDAP_PF_LOCAL 1
15878 EOF
15879
15880 fi
15881 if test "$ol_enable_ipv6" != no; then
15882         cat >> confdefs.h <<\EOF
15883 #define LDAP_PF_INET6 1
15884 EOF
15885
15886 fi
15887 if test "$ol_enable_cleartext" != no ; then
15888         cat >> confdefs.h <<\EOF
15889 #define SLAPD_CLEARTEXT 1
15890 EOF
15891
15892 fi
15893 if test "$ol_enable_crypt" != no ; then
15894         cat >> confdefs.h <<\EOF
15895 #define SLAPD_CRYPT 1
15896 EOF
15897
15898 fi
15899 if test "$ol_link_kpasswd" != no ; then
15900         cat >> confdefs.h <<\EOF
15901 #define SLAPD_KPASSWD 1
15902 EOF
15903
15904 fi
15905 if test "$ol_link_spasswd" != no ; then
15906         cat >> confdefs.h <<\EOF
15907 #define SLAPD_SPASSWD 1
15908 EOF
15909
15910 fi
15911 if test "$ol_enable_multimaster" != no ; then
15912         cat >> confdefs.h <<\EOF
15913 #define SLAPD_MULTIMASTER 1
15914 EOF
15915
15916 fi
15917 if test "$ol_enable_phonetic" != no ; then
15918         cat >> confdefs.h <<\EOF
15919 #define SLAPD_PHONETIC 1
15920 EOF
15921
15922 fi
15923 if test "$ol_enable_rlookups" != no ; then
15924         cat >> confdefs.h <<\EOF
15925 #define SLAPD_RLOOKUPS 1
15926 EOF
15927
15928 fi
15929 if test "$ol_enable_aci" != no ; then
15930         cat >> confdefs.h <<\EOF
15931 #define SLAPD_ACI_ENABLED 1
15932 EOF
15933
15934 fi
15935
15936 if test "$ol_link_modules" != no ; then
15937         cat >> confdefs.h <<\EOF
15938 #define SLAPD_MODULES 1
15939 EOF
15940
15941         BUILD_SLAPD=yes
15942         SLAPD_MODULES_LDFLAGS="-dlopen self"
15943 fi
15944
15945 if test "$ol_link_dnssrv" != no ; then
15946         cat >> confdefs.h <<\EOF
15947 #define SLAPD_DNSSRV 1
15948 EOF
15949
15950         BUILD_SLAPD=yes
15951         BUILD_DNSSRV=yes
15952         if test "$ol_with_dnssrv_module" != static ; then
15953                 cat >> confdefs.h <<\EOF
15954 #define SLAPD_DNSSRV_DYNAMIC 1
15955 EOF
15956
15957                 BUILD_DNSSRV=mod
15958                 BUILD_DNSSRV_DYNAMIC=shared
15959                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15960         fi
15961 fi
15962
15963 if test "$ol_enable_ldap" != no ; then
15964         cat >> confdefs.h <<\EOF
15965 #define SLAPD_LDAP 1
15966 EOF
15967
15968         BUILD_SLAPD=yes
15969         BUILD_LDAP=yes
15970         if test "$ol_with_ldap_module" != static ; then
15971                 cat >> confdefs.h <<\EOF
15972 #define SLAPD_LDAP_DYNAMIC 1
15973 EOF
15974
15975                 BUILD_LDAP=mod
15976                 BUILD_LDAP_DYNAMIC=shared
15977                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15978         fi
15979 fi
15980
15981 if test "$ol_link_ldbm" != no ; then
15982         cat >> confdefs.h <<\EOF
15983 #define SLAPD_LDBM 1
15984 EOF
15985
15986         BUILD_SLAPD=yes
15987         BUILD_LDBM=yes
15988         if test "$ol_with_ldbm_module" != static ; then
15989                 cat >> confdefs.h <<\EOF
15990 #define SLAPD_LDBM_DYNAMIC 1
15991 EOF
15992
15993                 BUILD_LDBM=mod
15994                 BUILD_LDBM_DYNAMIC=shared
15995                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15996         fi
15997 fi
15998
15999 if test "$ol_enable_passwd" != no ; then
16000         cat >> confdefs.h <<\EOF
16001 #define SLAPD_PASSWD 1
16002 EOF
16003
16004         BUILD_SLAPD=yes
16005         BUILD_PASSWD=yes
16006         if test "$ol_with_passwd_module" != static ; then
16007                 cat >> confdefs.h <<\EOF
16008 #define SLAPD_PASSWD_DYNAMIC 1
16009 EOF
16010
16011                 BUILD_PASSWD=mod
16012                 BUILD_PASSWD_DYNAMIC=shared
16013                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16014         fi
16015 fi
16016
16017 if test "$ol_link_perl" != no ; then
16018         cat >> confdefs.h <<\EOF
16019 #define SLAPD_PERL 1
16020 EOF
16021
16022         BUILD_SLAPD=yes
16023         BUILD_PERL=yes
16024         if test "$ol_with_perl_module" != static ; then
16025                 cat >> confdefs.h <<\EOF
16026 #define SLAPD_PERL_DYNAMIC 1
16027 EOF
16028
16029                 BUILD_PERL=mod
16030                 BUILD_PERL_DYNAMIC=shared
16031                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16032         fi
16033 fi
16034
16035 if test "$ol_enable_shell" != no ; then
16036         cat >> confdefs.h <<\EOF
16037 #define SLAPD_SHELL 1
16038 EOF
16039
16040         BUILD_SLAPD=yes
16041         BUILD_SHELL=yes
16042         if test "$ol_with_shell_module" != static ; then
16043                 cat >> confdefs.h <<\EOF
16044 #define SLAPD_SHELL_DYNAMIC 1
16045 EOF
16046
16047                 BUILD_SHELL=mod
16048                 BUILD_SHELL_DYNAMIC=shared
16049                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16050         fi
16051 fi
16052
16053 if test "$ol_enable_tcl" != no ; then
16054         cat >> confdefs.h <<\EOF
16055 #define SLAPD_TCL 1
16056 EOF
16057
16058         BUILD_SLAPD=yes
16059         BUILD_TCL=yes
16060         if test "$ol_with_tcl_module" != static; then
16061                 cat >> confdefs.h <<\EOF
16062 #define SLAPD_TCL_DYNAMIC 1
16063 EOF
16064
16065                 BUILD_TCL=mod
16066                 BUILD_TCL_DYNAMIC=shared
16067                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16068         fi
16069 fi
16070
16071 if test "$ol_link_sql" != no ; then
16072         cat >> confdefs.h <<\EOF
16073 #define SLAPD_SQL 1
16074 EOF
16075
16076         BUILD_SLAPD=yes
16077         BUILD_SQL=yes
16078         if test "$ol_with_sql_module" != static; then
16079                 cat >> confdefs.h <<\EOF
16080 #define SLAPD_SQL_DYNAMIC 1
16081 EOF
16082
16083                 BUILD_SQL=mod
16084                 BUILD_SQL_DYNAMIC=shared
16085                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16086         fi
16087 fi
16088
16089 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16090         $BUILD_SLAPD = yes ; then
16091         BUILD_SLURPD=yes
16092 fi
16093
16094
16095 if test "$LINK_BINS_DYNAMIC" = yes; then
16096     LIB_LINKAGE=DYN
16097     LT_LIB_LINKAGE=shared
16098 else
16099     LIB_LINKAGE=STAT
16100     LT_LIB_LINKAGE=static
16101 fi
16102
16103 if test "$ac_cv_mingw32" = yes ; then
16104     PLAT=NT
16105     DYN_EXT=dll
16106 else
16107     PLAT=UNIX
16108     DYN_EXT=so
16109 fi
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
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170 trap '' 1 2 15
16171
16172 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16173
16174 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16175 # Let make expand exec_prefix.
16176 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16177
16178 # Any assignment to VPATH causes Sun make to only execute
16179 # the first set of double-colon rules, so remove it if not needed.
16180 # If there is a colon in the path, we need to keep it.
16181 if test "x$srcdir" = x.; then
16182   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16183 fi
16184
16185 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16186
16187 DEFS=-DHAVE_CONFIG_H
16188
16189 # Without the "./", some shells look in PATH for config.status.
16190 : ${CONFIG_STATUS=./config.status}
16191
16192 echo creating $CONFIG_STATUS
16193 rm -f $CONFIG_STATUS
16194 cat > $CONFIG_STATUS <<EOF
16195 #! /bin/sh
16196 # Generated automatically by configure.
16197 # Run this file to recreate the current configuration.
16198 # This directory was configured as follows,
16199 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16200 #
16201 # $0 $ac_configure_args
16202 #
16203 # Compiler output produced by configure, useful for debugging
16204 # configure, is in ./config.log if it exists.
16205
16206 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16207 for ac_option
16208 do
16209   case "\$ac_option" in
16210   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16211     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16212     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16213   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16214     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16215     exit 0 ;;
16216   -help | --help | --hel | --he | --h)
16217     echo "\$ac_cs_usage"; exit 0 ;;
16218   *) echo "\$ac_cs_usage"; exit 1 ;;
16219   esac
16220 done
16221
16222 ac_given_srcdir=$srcdir
16223 ac_given_INSTALL="$INSTALL"
16224
16225 trap 'rm -fr `echo "\
16226 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16227 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16228 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16229 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16230 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16231 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16232 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16233 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16234 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16235 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16236 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16237 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16238 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16239 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16240 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16241 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16242 include/Makefile:build/top.mk:include/Makefile.in \
16243 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16244 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16245 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16246 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16247 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16248 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16249 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16250 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16251 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16252 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16253 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16254 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16255 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16256 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16257 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16258 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16259 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16260 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16261 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16262 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16263 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16264 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16265 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16266 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16267 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16268 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16269 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16270  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16271 EOF
16272 cat >> $CONFIG_STATUS <<EOF
16273
16274 # Protect against being on the right side of a sed subst in config.status.
16275 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16276  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16277 $ac_vpsub
16278 $extrasub
16279 s%@SHELL@%$SHELL%g
16280 s%@CFLAGS@%$CFLAGS%g
16281 s%@CPPFLAGS@%$CPPFLAGS%g
16282 s%@CXXFLAGS@%$CXXFLAGS%g
16283 s%@FFLAGS@%$FFLAGS%g
16284 s%@DEFS@%$DEFS%g
16285 s%@LDFLAGS@%$LDFLAGS%g
16286 s%@LIBS@%$LIBS%g
16287 s%@exec_prefix@%$exec_prefix%g
16288 s%@prefix@%$prefix%g
16289 s%@program_transform_name@%$program_transform_name%g
16290 s%@bindir@%$bindir%g
16291 s%@sbindir@%$sbindir%g
16292 s%@libexecdir@%$libexecdir%g
16293 s%@datadir@%$datadir%g
16294 s%@sysconfdir@%$sysconfdir%g
16295 s%@sharedstatedir@%$sharedstatedir%g
16296 s%@localstatedir@%$localstatedir%g
16297 s%@libdir@%$libdir%g
16298 s%@includedir@%$includedir%g
16299 s%@oldincludedir@%$oldincludedir%g
16300 s%@infodir@%$infodir%g
16301 s%@mandir@%$mandir%g
16302 s%@host@%$host%g
16303 s%@host_alias@%$host_alias%g
16304 s%@host_cpu@%$host_cpu%g
16305 s%@host_vendor@%$host_vendor%g
16306 s%@host_os@%$host_os%g
16307 s%@target@%$target%g
16308 s%@target_alias@%$target_alias%g
16309 s%@target_cpu@%$target_cpu%g
16310 s%@target_vendor@%$target_vendor%g
16311 s%@target_os@%$target_os%g
16312 s%@build@%$build%g
16313 s%@build_alias@%$build_alias%g
16314 s%@build_cpu@%$build_cpu%g
16315 s%@build_vendor@%$build_vendor%g
16316 s%@build_os@%$build_os%g
16317 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16318 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16319 s%@INSTALL_DATA@%$INSTALL_DATA%g
16320 s%@PACKAGE@%$PACKAGE%g
16321 s%@VERSION@%$VERSION%g
16322 s%@ACLOCAL@%$ACLOCAL%g
16323 s%@AUTOCONF@%$AUTOCONF%g
16324 s%@AUTOMAKE@%$AUTOMAKE%g
16325 s%@AUTOHEADER@%$AUTOHEADER%g
16326 s%@MAKEINFO@%$MAKEINFO%g
16327 s%@install_sh@%$install_sh%g
16328 s%@AMTAR@%$AMTAR%g
16329 s%@AWK@%$AWK%g
16330 s%@AMTARFLAGS@%$AMTARFLAGS%g
16331 s%@SET_MAKE@%$SET_MAKE%g
16332 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16333 s%@top_builddir@%$top_builddir%g
16334 s%@ldap_subdir@%$ldap_subdir%g
16335 s%@CC@%$CC%g
16336 s%@RANLIB@%$RANLIB%g
16337 s%@LN_S@%$LN_S%g
16338 s%@DLLTOOL@%$DLLTOOL%g
16339 s%@AS@%$AS%g
16340 s%@OBJDUMP@%$OBJDUMP%g
16341 s%@LIBTOOL@%$LIBTOOL%g
16342 s%@LN_H@%$LN_H%g
16343 s%@SENDMAIL@%$SENDMAIL%g
16344 s%@EDITOR@%$EDITOR%g
16345 s%@FINGER@%$FINGER%g
16346 s%@PERLBIN@%$PERLBIN%g
16347 s%@CPP@%$CPP%g
16348 s%@EXEEXT@%$EXEEXT%g
16349 s%@OBJEXT@%$OBJEXT%g
16350 s%@OL_MKDEP@%$OL_MKDEP%g
16351 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16352 s%@LIBOBJS@%$LIBOBJS%g
16353 s%@LIBSRCS@%$LIBSRCS%g
16354 s%@PLAT@%$PLAT%g
16355 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16356 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16357 s%@DYN_EXT@%$DYN_EXT%g
16358 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16359 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16360 s%@BUILD_LDAP@%$BUILD_LDAP%g
16361 s%@BUILD_LDBM@%$BUILD_LDBM%g
16362 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16363 s%@BUILD_PERL@%$BUILD_PERL%g
16364 s%@BUILD_SHELL@%$BUILD_SHELL%g
16365 s%@BUILD_SQL@%$BUILD_SQL%g
16366 s%@BUILD_TCL@%$BUILD_TCL%g
16367 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16368 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16369 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16370 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16371 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16372 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16373 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16374 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16375 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16376 s%@LDAP_LIBS@%$LDAP_LIBS%g
16377 s%@LDIF_LIBS@%$LDIF_LIBS%g
16378 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16379 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16380 s%@LDBM_LIBS@%$LDBM_LIBS%g
16381 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16382 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16383 s%@WRAP_LIBS@%$WRAP_LIBS%g
16384 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16385 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16386 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16387 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16388 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16389 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16390 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16391 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16392 s%@KRB4_LIBS@%$KRB4_LIBS%g
16393 s%@KRB5_LIBS@%$KRB5_LIBS%g
16394 s%@READLINE_LIBS@%$READLINE_LIBS%g
16395 s%@SASL_LIBS@%$SASL_LIBS%g
16396 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16397 s%@TLS_LIBS@%$TLS_LIBS%g
16398 s%@MODULES_LIBS@%$MODULES_LIBS%g
16399 s%@AUTH_LIBS@%$AUTH_LIBS%g
16400 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16401 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16402 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16403
16404 CEOF
16405 EOF
16406
16407 cat >> $CONFIG_STATUS <<\EOF
16408
16409 # Split the substitutions into bite-sized pieces for seds with
16410 # small command number limits, like on Digital OSF/1 and HP-UX.
16411 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16412 ac_file=1 # Number of current file.
16413 ac_beg=1 # First line for current file.
16414 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16415 ac_more_lines=:
16416 ac_sed_cmds=""
16417 while $ac_more_lines; do
16418   if test $ac_beg -gt 1; then
16419     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16420   else
16421     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16422   fi
16423   if test ! -s conftest.s$ac_file; then
16424     ac_more_lines=false
16425     rm -f conftest.s$ac_file
16426   else
16427     if test -z "$ac_sed_cmds"; then
16428       ac_sed_cmds="sed -f conftest.s$ac_file"
16429     else
16430       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16431     fi
16432     ac_file=`expr $ac_file + 1`
16433     ac_beg=$ac_end
16434     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16435   fi
16436 done
16437 if test -z "$ac_sed_cmds"; then
16438   ac_sed_cmds=cat
16439 fi
16440 EOF
16441
16442 cat >> $CONFIG_STATUS <<EOF
16443
16444 CONFIG_FILES=\${CONFIG_FILES-"\
16445 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16446 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16447 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16448 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16449 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16450 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16451 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16452 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16453 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16454 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16455 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16456 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16457 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16458 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16459 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16460 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16461 include/Makefile:build/top.mk:include/Makefile.in \
16462 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16463 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16464 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16465 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16466 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16467 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16468 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16469 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16470 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16471 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16472 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16473 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16474 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16475 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16476 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16477 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16478 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16479 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16480 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16481 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16482 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16483 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16484 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16485 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16486 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16487 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16488 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16489 "}
16490 EOF
16491 cat >> $CONFIG_STATUS <<\EOF
16492 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16493   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16494   case "$ac_file" in
16495   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16496        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16497   *) ac_file_in="${ac_file}.in" ;;
16498   esac
16499
16500   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16501
16502   # Remove last slash and all that follows it.  Not all systems have dirname.
16503   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16504   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16505     # The file is in a subdirectory.
16506     test ! -d "$ac_dir" && mkdir "$ac_dir"
16507     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16508     # A "../" for each directory in $ac_dir_suffix.
16509     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16510   else
16511     ac_dir_suffix= ac_dots=
16512   fi
16513
16514   case "$ac_given_srcdir" in
16515   .)  srcdir=.
16516       if test -z "$ac_dots"; then top_srcdir=.
16517       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16518   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16519   *) # Relative path.
16520     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16521     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16522   esac
16523
16524   case "$ac_given_INSTALL" in
16525   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16526   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16527   esac
16528
16529   echo creating "$ac_file"
16530   rm -f "$ac_file"
16531   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16532   case "$ac_file" in
16533   *[Mm]akefile*) ac_comsub="1i\\
16534 # $configure_input" ;;
16535   *) ac_comsub= ;;
16536   esac
16537
16538   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16539   sed -e "$ac_comsub
16540 s%@configure_input@%$configure_input%g
16541 s%@srcdir@%$srcdir%g
16542 s%@top_srcdir@%$top_srcdir%g
16543 s%@INSTALL@%$INSTALL%g
16544 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16545 fi; done
16546 rm -f conftest.s*
16547
16548 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16549 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16550 #
16551 # ac_d sets the value in "#define NAME VALUE" lines.
16552 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16553 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16554 ac_dC='\3'
16555 ac_dD='%g'
16556 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16557 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16558 ac_uB='\([      ]\)%\1#\2define\3'
16559 ac_uC=' '
16560 ac_uD='\4%g'
16561 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16562 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16563 ac_eB='$%\1#\2define\3'
16564 ac_eC=' '
16565 ac_eD='%g'
16566
16567 if test "${CONFIG_HEADERS+set}" != set; then
16568 EOF
16569 cat >> $CONFIG_STATUS <<EOF
16570   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16571 EOF
16572 cat >> $CONFIG_STATUS <<\EOF
16573 fi
16574 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16575   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16576   case "$ac_file" in
16577   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16578        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16579   *) ac_file_in="${ac_file}.in" ;;
16580   esac
16581
16582   echo creating $ac_file
16583
16584   rm -f conftest.frag conftest.in conftest.out
16585   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16586   cat $ac_file_inputs > conftest.in
16587
16588 EOF
16589
16590 # Transform confdefs.h into a sed script conftest.vals that substitutes
16591 # the proper values into config.h.in to produce config.h.  And first:
16592 # Protect against being on the right side of a sed subst in config.status.
16593 # Protect against being in an unquoted here document in config.status.
16594 rm -f conftest.vals
16595 cat > conftest.hdr <<\EOF
16596 s/[\\&%]/\\&/g
16597 s%[\\$`]%\\&%g
16598 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16599 s%ac_d%ac_u%gp
16600 s%ac_u%ac_e%gp
16601 EOF
16602 sed -n -f conftest.hdr confdefs.h > conftest.vals
16603 rm -f conftest.hdr
16604
16605 # This sed command replaces #undef with comments.  This is necessary, for
16606 # example, in the case of _POSIX_SOURCE, which is predefined and required
16607 # on some systems where configure will not decide to define it.
16608 cat >> conftest.vals <<\EOF
16609 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16610 EOF
16611
16612 # Break up conftest.vals because some shells have a limit on
16613 # the size of here documents, and old seds have small limits too.
16614
16615 rm -f conftest.tail
16616 while :
16617 do
16618   ac_lines=`grep -c . conftest.vals`
16619   # grep -c gives empty output for an empty file on some AIX systems.
16620   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16621   # Write a limited-size here document to conftest.frag.
16622   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16623   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16624   echo 'CEOF
16625   sed -f conftest.frag conftest.in > conftest.out
16626   rm -f conftest.in
16627   mv conftest.out conftest.in
16628 ' >> $CONFIG_STATUS
16629   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16630   rm -f conftest.vals
16631   mv conftest.tail conftest.vals
16632 done
16633 rm -f conftest.vals
16634
16635 cat >> $CONFIG_STATUS <<\EOF
16636   rm -f conftest.frag conftest.h
16637   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16638   cat conftest.in >> conftest.h
16639   rm -f conftest.in
16640   if cmp -s $ac_file conftest.h 2>/dev/null; then
16641     echo "$ac_file is unchanged"
16642     rm -f conftest.h
16643   else
16644     # Remove last slash and all that follows it.  Not all systems have dirname.
16645       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16646       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16647       # The file is in a subdirectory.
16648       test ! -d "$ac_dir" && mkdir "$ac_dir"
16649     fi
16650     rm -f $ac_file
16651     mv conftest.h $ac_file
16652   fi
16653 fi; done
16654
16655 EOF
16656 cat >> $CONFIG_STATUS <<EOF
16657
16658 EOF
16659 cat >> $CONFIG_STATUS <<\EOF
16660
16661 date > stamp-h
16662 echo Please \"make depend\" to build dependencies
16663
16664 exit 0
16665 EOF
16666 chmod +x $CONFIG_STATUS
16667 rm -fr confdefs* $ac_clean_files
16668 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16669