]> git.sur5r.net Git - openldap/blob - configure
Minor typedef and other clean ups
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.321 2000/08/25 15:50:10 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug          enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog         enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle      enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache          enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd      enable kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster  enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-rlookups     enable reverse lookups (auto)"
81 ac_help="$ac_help
82     --enable-aci          enable per-object ACIs (no)"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support (no)"
85 ac_help="$ac_help
86     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
87 ac_help="$ac_help
88     --enable-dnssrv       enable dnssrv backend (no)"
89 ac_help="$ac_help
90     --with-dnssrv-module  module type (static)"
91 ac_help="$ac_help
92     --enable-ldap         enable ldap backend (no)"
93 ac_help="$ac_help
94     --with-ldap-module    module type (static)"
95 ac_help="$ac_help
96     --enable-ldbm         enable ldbm backend (yes)"
97 ac_help="$ac_help
98     --with-ldbm-api       with LDBM API (auto)"
99 ac_help="$ac_help
100     --with-ldbm-module    module type (static)"
101 ac_help="$ac_help
102     --with-ldbm-type      use LDBM type (auto)"
103 ac_help="$ac_help
104     --enable-passwd       enable passwd backend (no)"
105 ac_help="$ac_help
106     --with-passwd-module  module type (static)"
107 ac_help="$ac_help
108     --enable-perl         enable perl backend (no)"
109 ac_help="$ac_help
110     --with-perl-module    module type (static)"
111 ac_help="$ac_help
112     --enable-shell        enable shell backend (no)"
113 ac_help="$ac_help
114     --with-shell-module   module type (static)"
115 ac_help="$ac_help
116     --enable-sql          enable sql backend (no)"
117 ac_help="$ac_help
118     --with-sql-module     module type (static)"
119 ac_help="$ac_help
120     --enable-tcl          enable tcl backend (no)"
121 ac_help="$ac_help
122     --with-tcl-module     module type (static)"
123 ac_help="$ac_help
124 SLURPD (Replication Daemon) Options:"
125 ac_help="$ac_help
126   --enable-slurpd         enable building slurpd (auto)"
127 ac_help="$ac_help
128 Library Generation & Linking Options"
129 ac_help="$ac_help
130   --enable-static[=PKGS]  build static libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-shared[=PKGS]  build shared libraries [default=yes]"
133 ac_help="$ac_help
134   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
135 ac_help="$ac_help
136   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
137 ac_help="$ac_help
138   --disable-libtool-lock  avoid locking (might break parallel builds)"
139
140 # Initialize some variables set by options.
141 # The variables have the same names as the options, with
142 # dashes changed to underlines.
143 build=NONE
144 cache_file=./config.cache
145 exec_prefix=NONE
146 host=NONE
147 no_create=
148 nonopt=NONE
149 no_recursion=
150 prefix=NONE
151 program_prefix=NONE
152 program_suffix=NONE
153 program_transform_name=s,x,x,
154 silent=
155 site=
156 srcdir=
157 target=NONE
158 verbose=
159 x_includes=NONE
160 x_libraries=NONE
161 bindir='${exec_prefix}/bin'
162 sbindir='${exec_prefix}/sbin'
163 libexecdir='${exec_prefix}/libexec'
164 datadir='${prefix}/share'
165 sysconfdir='${prefix}/etc'
166 sharedstatedir='${prefix}/com'
167 localstatedir='${prefix}/var'
168 libdir='${exec_prefix}/lib'
169 includedir='${prefix}/include'
170 oldincludedir='/usr/include'
171 infodir='${prefix}/info'
172 mandir='${prefix}/man'
173
174 # Initialize some other variables.
175 subdirs=
176 MFLAGS= MAKEFLAGS=
177 SHELL=${CONFIG_SHELL-/bin/sh}
178 # Maximum number of lines to put in a shell here document.
179 ac_max_here_lines=12
180
181 ac_prev=
182 for ac_option
183 do
184
185   # If the previous option needs an argument, assign it.
186   if test -n "$ac_prev"; then
187     eval "$ac_prev=\$ac_option"
188     ac_prev=
189     continue
190   fi
191
192   case "$ac_option" in
193   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
194   *) ac_optarg= ;;
195   esac
196
197   # Accept the important Cygnus configure options, so we can diagnose typos.
198
199   case "$ac_option" in
200
201   -bindir | --bindir | --bindi | --bind | --bin | --bi)
202     ac_prev=bindir ;;
203   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
204     bindir="$ac_optarg" ;;
205
206   -build | --build | --buil | --bui | --bu)
207     ac_prev=build ;;
208   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
209     build="$ac_optarg" ;;
210
211   -cache-file | --cache-file | --cache-fil | --cache-fi \
212   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
213     ac_prev=cache_file ;;
214   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
215   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
216     cache_file="$ac_optarg" ;;
217
218   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
219     ac_prev=datadir ;;
220   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
221   | --da=*)
222     datadir="$ac_optarg" ;;
223
224   -disable-* | --disable-*)
225     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
226     # Reject names that are not valid shell variable names.
227     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
228       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
229     fi
230     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
231     eval "enable_${ac_feature}=no" ;;
232
233   -enable-* | --enable-*)
234     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
235     # Reject names that are not valid shell variable names.
236     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
237       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
238     fi
239     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
240     case "$ac_option" in
241       *=*) ;;
242       *) ac_optarg=yes ;;
243     esac
244     eval "enable_${ac_feature}='$ac_optarg'" ;;
245
246   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
247   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
248   | --exec | --exe | --ex)
249     ac_prev=exec_prefix ;;
250   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
251   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
252   | --exec=* | --exe=* | --ex=*)
253     exec_prefix="$ac_optarg" ;;
254
255   -gas | --gas | --ga | --g)
256     # Obsolete; use --with-gas.
257     with_gas=yes ;;
258
259   -help | --help | --hel | --he)
260     # Omit some internal or obsolete options to make the list less imposing.
261     # This message is too long to be a string in the A/UX 3.1 sh.
262     cat << EOF
263 Usage: configure [options] [host]
264 Options: [defaults in brackets after descriptions]
265 Configuration:
266   --cache-file=FILE       cache test results in FILE
267   --help                  print this message
268   --no-create             do not create output files
269   --quiet, --silent       do not print \`checking...' messages
270   --version               print the version of autoconf that created configure
271 Directory and file names:
272   --prefix=PREFIX         install architecture-independent files in PREFIX
273                           [$ac_default_prefix]
274   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
275                           [same as prefix]
276   --bindir=DIR            user executables in DIR [EPREFIX/bin]
277   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
278   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
279   --datadir=DIR           read-only architecture-independent data in DIR
280                           [PREFIX/share]
281   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
282   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
283                           [PREFIX/com]
284   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
285   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
286   --includedir=DIR        C header files in DIR [PREFIX/include]
287   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
288   --infodir=DIR           info documentation in DIR [PREFIX/info]
289   --mandir=DIR            man documentation in DIR [PREFIX/man]
290   --srcdir=DIR            find the sources in DIR [configure dir or ..]
291   --program-prefix=PREFIX prepend PREFIX to installed program names
292   --program-suffix=SUFFIX append SUFFIX to installed program names
293   --program-transform-name=PROGRAM
294                           run sed PROGRAM on installed program names
295 EOF
296     cat << EOF
297 Host type:
298   --build=BUILD           configure for building on BUILD [BUILD=HOST]
299   --host=HOST             configure for HOST [guessed]
300   --target=TARGET         configure for TARGET [TARGET=HOST]
301 Features and packages:
302   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
303   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
304   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
305   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
306   --x-includes=DIR        X include files are in DIR
307   --x-libraries=DIR       X library files are in DIR
308 EOF
309     if test -n "$ac_help"; then
310       echo "--enable and --with options recognized:$ac_help"
311     fi
312     exit 0 ;;
313
314   -host | --host | --hos | --ho)
315     ac_prev=host ;;
316   -host=* | --host=* | --hos=* | --ho=*)
317     host="$ac_optarg" ;;
318
319   -includedir | --includedir | --includedi | --included | --include \
320   | --includ | --inclu | --incl | --inc)
321     ac_prev=includedir ;;
322   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
323   | --includ=* | --inclu=* | --incl=* | --inc=*)
324     includedir="$ac_optarg" ;;
325
326   -infodir | --infodir | --infodi | --infod | --info | --inf)
327     ac_prev=infodir ;;
328   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
329     infodir="$ac_optarg" ;;
330
331   -libdir | --libdir | --libdi | --libd)
332     ac_prev=libdir ;;
333   -libdir=* | --libdir=* | --libdi=* | --libd=*)
334     libdir="$ac_optarg" ;;
335
336   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
337   | --libexe | --libex | --libe)
338     ac_prev=libexecdir ;;
339   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
340   | --libexe=* | --libex=* | --libe=*)
341     libexecdir="$ac_optarg" ;;
342
343   -localstatedir | --localstatedir | --localstatedi | --localstated \
344   | --localstate | --localstat | --localsta | --localst \
345   | --locals | --local | --loca | --loc | --lo)
346     ac_prev=localstatedir ;;
347   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
348   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
349   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
350     localstatedir="$ac_optarg" ;;
351
352   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
353     ac_prev=mandir ;;
354   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
355     mandir="$ac_optarg" ;;
356
357   -nfp | --nfp | --nf)
358     # Obsolete; use --without-fp.
359     with_fp=no ;;
360
361   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
362   | --no-cr | --no-c)
363     no_create=yes ;;
364
365   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
366   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
367     no_recursion=yes ;;
368
369   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
370   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
371   | --oldin | --oldi | --old | --ol | --o)
372     ac_prev=oldincludedir ;;
373   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
374   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
375   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
376     oldincludedir="$ac_optarg" ;;
377
378   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
379     ac_prev=prefix ;;
380   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
381     prefix="$ac_optarg" ;;
382
383   -program-prefix | --program-prefix | --program-prefi | --program-pref \
384   | --program-pre | --program-pr | --program-p)
385     ac_prev=program_prefix ;;
386   -program-prefix=* | --program-prefix=* | --program-prefi=* \
387   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
388     program_prefix="$ac_optarg" ;;
389
390   -program-suffix | --program-suffix | --program-suffi | --program-suff \
391   | --program-suf | --program-su | --program-s)
392     ac_prev=program_suffix ;;
393   -program-suffix=* | --program-suffix=* | --program-suffi=* \
394   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
395     program_suffix="$ac_optarg" ;;
396
397   -program-transform-name | --program-transform-name \
398   | --program-transform-nam | --program-transform-na \
399   | --program-transform-n | --program-transform- \
400   | --program-transform | --program-transfor \
401   | --program-transfo | --program-transf \
402   | --program-trans | --program-tran \
403   | --progr-tra | --program-tr | --program-t)
404     ac_prev=program_transform_name ;;
405   -program-transform-name=* | --program-transform-name=* \
406   | --program-transform-nam=* | --program-transform-na=* \
407   | --program-transform-n=* | --program-transform-=* \
408   | --program-transform=* | --program-transfor=* \
409   | --program-transfo=* | --program-transf=* \
410   | --program-trans=* | --program-tran=* \
411   | --progr-tra=* | --program-tr=* | --program-t=*)
412     program_transform_name="$ac_optarg" ;;
413
414   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
415   | -silent | --silent | --silen | --sile | --sil)
416     silent=yes ;;
417
418   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
419     ac_prev=sbindir ;;
420   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
421   | --sbi=* | --sb=*)
422     sbindir="$ac_optarg" ;;
423
424   -sharedstatedir | --sharedstatedir | --sharedstatedi \
425   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
426   | --sharedst | --shareds | --shared | --share | --shar \
427   | --sha | --sh)
428     ac_prev=sharedstatedir ;;
429   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
430   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
431   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
432   | --sha=* | --sh=*)
433     sharedstatedir="$ac_optarg" ;;
434
435   -site | --site | --sit)
436     ac_prev=site ;;
437   -site=* | --site=* | --sit=*)
438     site="$ac_optarg" ;;
439
440   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
441     ac_prev=srcdir ;;
442   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
443     srcdir="$ac_optarg" ;;
444
445   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
446   | --syscon | --sysco | --sysc | --sys | --sy)
447     ac_prev=sysconfdir ;;
448   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
449   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
450     sysconfdir="$ac_optarg" ;;
451
452   -target | --target | --targe | --targ | --tar | --ta | --t)
453     ac_prev=target ;;
454   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
455     target="$ac_optarg" ;;
456
457   -v | -verbose | --verbose | --verbos | --verbo | --verb)
458     verbose=yes ;;
459
460   -version | --version | --versio | --versi | --vers)
461     echo "configure generated by autoconf version 2.13.1"
462     exit 0 ;;
463
464   -with-* | --with-*)
465     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
466     # Reject names that are not valid shell variable names.
467     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
468       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
469     fi
470     ac_package=`echo $ac_package| sed 's/-/_/g'`
471     case "$ac_option" in
472       *=*) ;;
473       *) ac_optarg=yes ;;
474     esac
475     eval "with_${ac_package}='$ac_optarg'" ;;
476
477   -without-* | --without-*)
478     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
479     # Reject names that are not valid shell variable names.
480     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
481       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
482     fi
483     ac_package=`echo $ac_package| sed 's/-/_/g'`
484     eval "with_${ac_package}=no" ;;
485
486   --x)
487     # Obsolete; use --with-x.
488     with_x=yes ;;
489
490   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
491   | --x-incl | --x-inc | --x-in | --x-i)
492     ac_prev=x_includes ;;
493   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
494   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
495     x_includes="$ac_optarg" ;;
496
497   -x-libraries | --x-libraries | --x-librarie | --x-librari \
498   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
499     ac_prev=x_libraries ;;
500   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
501   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
502     x_libraries="$ac_optarg" ;;
503
504   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
505     ;;
506
507   *)
508     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
509       echo "configure: warning: $ac_option: invalid host type" 1>&2
510     fi
511     if test "x$nonopt" != xNONE; then
512       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
513     fi
514     nonopt="$ac_option"
515     ;;
516
517   esac
518 done
519
520 if test -n "$ac_prev"; then
521   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
522 fi
523
524 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
525
526 # File descriptor usage:
527 # 0 standard input
528 # 1 file creation
529 # 2 errors and warnings
530 # 3 some systems may open it to /dev/tty
531 # 4 used on the Kubota Titan
532 # 6 checking for... messages and results
533 # 5 compiler messages saved in config.log
534 if test "$silent" = yes; then
535   exec 6>/dev/null
536 else
537   exec 6>&1
538 fi
539 exec 5>./config.log
540
541 echo "\
542 This file contains any messages produced by compilers while
543 running configure, to aid debugging if configure makes a mistake.
544 " 1>&5
545
546 # Strip out --no-create and --no-recursion so they do not pile up.
547 # Also quote any args containing shell metacharacters.
548 ac_configure_args=
549 for ac_arg
550 do
551   case "$ac_arg" in
552   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
553   | --no-cr | --no-c) ;;
554   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
555   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
556   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
557   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
558   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
559   esac
560 done
561
562 # NLS nuisances.
563 # Only set these to C if already set.  These must not be set unconditionally
564 # because not all systems understand e.g. LANG=C (notably SCO).
565 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
566 # Non-C LC_CTYPE values break the ctype check.
567 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
568 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
569 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
570 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
571
572 # confdefs.h avoids OS command line length limits that DEFS can exceed.
573 rm -rf conftest* confdefs.h
574 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
575 echo > confdefs.h
576
577 # A filename unique to this package, relative to the directory that
578 # configure is in, which we can look for to find out if srcdir is correct.
579 ac_unique_file=build/version
580
581 # Find the source files, if location was not specified.
582 if test -z "$srcdir"; then
583   ac_srcdir_defaulted=yes
584   # Try the directory containing this script, then its parent.
585   ac_prog=$0
586   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
587   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
588   srcdir=$ac_confdir
589   if test ! -r $srcdir/$ac_unique_file; then
590     srcdir=..
591   fi
592 else
593   ac_srcdir_defaulted=no
594 fi
595 if test ! -r $srcdir/$ac_unique_file; then
596   if test "$ac_srcdir_defaulted" = yes; then
597     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
598   else
599     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
600   fi
601 fi
602 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
603
604 # Prefer explicitly selected file to automatically selected ones.
605 if test -z "$CONFIG_SITE"; then
606   if test "x$prefix" != xNONE; then
607     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
608   else
609     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
610   fi
611 fi
612 for ac_site_file in $CONFIG_SITE; do
613   if test -r "$ac_site_file"; then
614     echo "loading site script $ac_site_file"
615     . "$ac_site_file"
616   fi
617 done
618
619
620 ac_ext=c
621 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
622 ac_cpp='$CPP $CPPFLAGS'
623 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
624 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
625 cross_compiling=$ac_cv_prog_cc_cross
626
627 ac_exeext=
628 ac_objext=o
629 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
630   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
631   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
632     ac_n= ac_c='
633 ' ac_t='        '
634   else
635     ac_n=-n ac_c= ac_t=
636   fi
637 else
638   ac_n= ac_c='\c' ac_t=
639 fi
640
641
642 # set unset (borrowed from autoconf 2.14a)
643 if (unset FOO) >/dev/null 2>&1; then
644   ol_unset=unset
645 else
646   ol_unset=false
647 fi
648 # unset CDPATH
649 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
650
651 ac_aux_dir=
652 for ac_dir in build $srcdir/build; do
653   if test -f $ac_dir/install-sh; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/install-sh -c"
656     break
657   elif test -f $ac_dir/install.sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install.sh -c"
660     break
661   elif test -f $ac_dir/shtool; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/shtool install -c"
664     break
665   fi
666 done
667 if test -z "$ac_aux_dir"; then
668   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
669 fi
670 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
671 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
672 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
673
674 OL_VERSION=`cat $ac_aux_dir/version`
675 if test -z "$OL_VERSION"; then
676         { echo "configure: error: could not determine version" 1>&2; exit 1; }
677 fi
678
679 echo "Configuring OpenLDAP $OL_VERSION ..."
680
681
682 echo $ac_n "checking host system type""... $ac_c" 1>&6
683 echo "configure:684: checking host system type" >&5
684 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
685
686 # Make sure we can run config.sub.
687   if $ac_config_sub sun4 >/dev/null 2>&1; then :
688     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
689   fi
690
691   ac_cv_host_alias=$host
692   case "$ac_cv_host_alias" in
693   NONE)
694     case $nonopt in
695     NONE)
696       if ac_cv_host_alias=`$ac_config_guess`; then :
697       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
698       fi ;;
699     *) ac_cv_host_alias=$nonopt ;;
700     esac ;;
701   esac
702
703   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
704   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
705   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
706   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
707 else
708   echo $ac_n "(cached) $ac_c" 1>&6
709 fi
710
711 echo "$ac_t""$ac_cv_host" 1>&6
712
713 host=$ac_cv_host
714 host_alias=$ac_cv_host_alias
715 host_cpu=$ac_cv_host_cpu
716 host_vendor=$ac_cv_host_vendor
717 host_os=$ac_cv_host_os
718
719
720
721
722
723 echo $ac_n "checking target system type""... $ac_c" 1>&6
724 echo "configure:725: checking target system type" >&5
725 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
726
727 # Make sure we can run config.sub.
728   if $ac_config_sub sun4 >/dev/null 2>&1; then :
729     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
730   fi
731
732   ac_cv_target_alias=$target
733   case "$ac_cv_target_alias" in
734   NONE)
735     case $nonopt in
736     NONE)
737       ac_cv_target_alias=$host_alias ;;
738
739     *) ac_cv_target_alias=$nonopt ;;
740     esac ;;
741   esac
742
743   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
744   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
745   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
746   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
747 else
748   echo $ac_n "(cached) $ac_c" 1>&6
749 fi
750
751 echo "$ac_t""$ac_cv_target" 1>&6
752
753 target=$ac_cv_target
754 target_alias=$ac_cv_target_alias
755 target_cpu=$ac_cv_target_cpu
756 target_vendor=$ac_cv_target_vendor
757 target_os=$ac_cv_target_os
758
759
760
761
762
763 echo $ac_n "checking build system type""... $ac_c" 1>&6
764 echo "configure:765: checking build system type" >&5
765 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
766
767 # Make sure we can run config.sub.
768   if $ac_config_sub sun4 >/dev/null 2>&1; then :
769     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
770   fi
771
772   ac_cv_build_alias=$build
773   case "$ac_cv_build_alias" in
774   NONE)
775     case $nonopt in
776     NONE)
777       ac_cv_build_alias=$host_alias ;;
778
779     *) ac_cv_build_alias=$nonopt ;;
780     esac ;;
781   esac
782
783   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
784   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
785   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
786   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
787 else
788   echo $ac_n "(cached) $ac_c" 1>&6
789 fi
790
791 echo "$ac_t""$ac_cv_build" 1>&6
792
793 build=$ac_cv_build
794 build_alias=$ac_cv_build_alias
795 build_cpu=$ac_cv_build_cpu
796 build_vendor=$ac_cv_build_vendor
797 build_os=$ac_cv_build_os
798
799
800
801
802
803 # Do some error checking and defaulting for the host and target type.
804 # The inputs are:
805 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
806 #
807 # The rules are:
808 # 1. You are not allowed to specify --host, --target, and nonopt at the
809 #    same time.
810 # 2. Host defaults to nonopt.
811 # 3. If nonopt is not specified, then host defaults to the current host,
812 #    as determined by config.guess.
813 # 4. Target and build default to nonopt.
814 # 5. If nonopt is not specified, then target and build default to host.
815
816 # The aliases save the names the user supplied, while $host etc.
817 # will get canonicalized.
818 case $host---$target---$nonopt in
819 NONE---*---* | *---NONE---* | *---*---NONE) ;;
820 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
821 esac
822
823 test "$host_alias" != "$target_alias" &&
824   test "$program_prefix$program_suffix$program_transform_name" = \
825     NONENONEs,x,x, &&
826   program_prefix=${target_alias}-
827
828
829 # Find a good install program.  We prefer a C program (faster),
830 # so one script is as good as another.  But avoid the broken or
831 # incompatible versions:
832 # SysV /etc/install, /usr/sbin/install
833 # SunOS /usr/etc/install
834 # IRIX /sbin/install
835 # AIX /bin/install
836 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
837 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
838 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
839 # ./install, which can be erroneously created by make from ./install.sh.
840 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
841 echo "configure:842: checking for a BSD compatible install" >&5
842 if test -z "$INSTALL"; then
843 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
844   echo $ac_n "(cached) $ac_c" 1>&6
845 else
846     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
847   for ac_dir in $PATH; do
848     # Account for people who put trailing slashes in PATH elements.
849     case "$ac_dir/" in
850     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
851     *)
852       # OSF1 and SCO ODT 3.0 have their own names for install.
853       # Don't use installbsd from OSF since it installs stuff as root
854       # by default.
855       for ac_prog in ginstall scoinst install; do
856         if test -f $ac_dir/$ac_prog; then
857           if test $ac_prog = install &&
858             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
859             # AIX install.  It has an incompatible calling convention.
860             :
861           elif test $ac_prog = install &&
862             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # program-specific install script used by HP pwplus--don't use.
864             :
865           else
866             ac_cv_path_install="$ac_dir/$ac_prog -c"
867             break 2
868           fi
869         fi
870       done
871       ;;
872     esac
873   done
874   IFS="$ac_save_IFS"
875
876 fi
877   if test "${ac_cv_path_install+set}" = set; then
878     INSTALL="$ac_cv_path_install"
879   else
880     # As a last resort, use the slow shell script.  We don't cache a
881     # path for INSTALL within a source directory, because that will
882     # break other packages using the cache if that directory is
883     # removed, or if the path is relative.
884     INSTALL="$ac_install_sh"
885   fi
886 fi
887 echo "$ac_t""$INSTALL" 1>&6
888
889 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
890 # It thinks the first close brace ends the variable substitution.
891 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
892
893 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
894
895 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
896
897 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
898 echo "configure:899: checking whether build environment is sane" >&5
899 # Just in case
900 sleep 1
901 echo timestamp > conftestfile
902 # Do `set' in a subshell so we don't clobber the current shell's
903 # arguments.  Must try -L first in case configure is actually a
904 # symlink; some systems play weird games with the mod time of symlinks
905 # (eg FreeBSD returns the mod time of the symlink's containing
906 # directory).
907 if (
908    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
909    if test "$*" = "X"; then
910       # -L didn't work.
911       set X `ls -t $srcdir/configure conftestfile`
912    fi
913    if test "$*" != "X $srcdir/configure conftestfile" \
914       && test "$*" != "X conftestfile $srcdir/configure"; then
915
916       # If neither matched, then we have a broken ls.  This can happen
917       # if, for instance, CONFIG_SHELL is bash and it inherits a
918       # broken ls alias from the environment.  This has actually
919       # happened.  Such a system could not be considered "sane".
920       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
921 alias in your environment" 1>&2; exit 1; }
922    fi
923
924    test "$2" = conftestfile
925    )
926 then
927    # Ok.
928    :
929 else
930    { echo "configure: error: newly created file is older than distributed files!
931 Check your system clock" 1>&2; exit 1; }
932 fi
933 rm -f conftest*
934 echo "$ac_t""yes" 1>&6
935 if test "$program_transform_name" = s,x,x,; then
936   program_transform_name=
937 else
938   # Double any \ or $.  echo might interpret backslashes.
939   cat <<\EOF_SED > conftestsed
940 s,\\,\\\\,g; s,\$,$$,g
941 EOF_SED
942   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
943   rm -f conftestsed
944 fi
945 test "$program_prefix" != NONE &&
946   program_transform_name="s,^,${program_prefix},;$program_transform_name"
947 # Use a double $ so make ignores it.
948 test "$program_suffix" != NONE &&
949   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
950
951 # sed with no file args requires a program.
952 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
953
954 for ac_prog in mawk gawk nawk awk
955 do
956 # Extract the first word of "$ac_prog", so it can be a program name with args.
957 set dummy $ac_prog; ac_word=$2
958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
959 echo "configure:960: checking for $ac_word" >&5
960 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
961   echo $ac_n "(cached) $ac_c" 1>&6
962 else
963   if test -n "$AWK"; then
964   ac_cv_prog_AWK="$AWK" # Let the user override the test.
965 else
966   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
967   ac_dummy="$PATH"
968   for ac_dir in $ac_dummy; do
969     test -z "$ac_dir" && ac_dir=.
970     if test -f $ac_dir/$ac_word; then
971       ac_cv_prog_AWK="$ac_prog"
972       break
973     fi
974   done
975   IFS="$ac_save_ifs"
976 fi
977 fi
978 AWK="$ac_cv_prog_AWK"
979 if test -n "$AWK"; then
980   echo "$ac_t""$AWK" 1>&6
981 else
982   echo "$ac_t""no" 1>&6
983 fi
984
985 test -n "$AWK" && break
986 done
987
988 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
989 echo "configure:990: checking whether ${MAKE-make} sets \${MAKE}" >&5
990 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
991 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
992   echo $ac_n "(cached) $ac_c" 1>&6
993 else
994   cat > conftestmake <<\EOF
995 all:
996         @echo 'ac_maketemp="${MAKE}"'
997 EOF
998 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
999 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1000 if test -n "$ac_maketemp"; then
1001   eval ac_cv_prog_make_${ac_make}_set=yes
1002 else
1003   eval ac_cv_prog_make_${ac_make}_set=no
1004 fi
1005 rm -f conftestmake
1006 fi
1007 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1008   echo "$ac_t""yes" 1>&6
1009   SET_MAKE=
1010 else
1011   echo "$ac_t""no" 1>&6
1012   SET_MAKE="MAKE=${MAKE-make}"
1013 fi
1014
1015
1016
1017 PACKAGE=OpenLDAP
1018
1019 VERSION=$OL_VERSION
1020
1021 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1022   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1023 fi
1024
1025
1026
1027 missing_dir=`cd $ac_aux_dir && pwd`
1028 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1029 echo "configure:1030: checking for working aclocal" >&5
1030 # Run test in a subshell; some versions of sh will print an error if
1031 # an executable is not found, even if stderr is redirected.
1032 # Redirect stdin to placate older versions of autoconf.  Sigh.
1033 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1034    ACLOCAL=aclocal
1035    echo "$ac_t""found" 1>&6
1036 else
1037    ACLOCAL="$missing_dir/missing aclocal"
1038    echo "$ac_t""missing" 1>&6
1039 fi
1040
1041 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1042 echo "configure:1043: checking for working autoconf" >&5
1043 # Run test in a subshell; some versions of sh will print an error if
1044 # an executable is not found, even if stderr is redirected.
1045 # Redirect stdin to placate older versions of autoconf.  Sigh.
1046 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1047    AUTOCONF=autoconf
1048    echo "$ac_t""found" 1>&6
1049 else
1050    AUTOCONF="$missing_dir/missing autoconf"
1051    echo "$ac_t""missing" 1>&6
1052 fi
1053
1054 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1055 echo "configure:1056: checking for working automake" >&5
1056 # Run test in a subshell; some versions of sh will print an error if
1057 # an executable is not found, even if stderr is redirected.
1058 # Redirect stdin to placate older versions of autoconf.  Sigh.
1059 if (automake --version) < /dev/null > /dev/null 2>&1; then
1060    AUTOMAKE=automake
1061    echo "$ac_t""found" 1>&6
1062 else
1063    AUTOMAKE="$missing_dir/missing automake"
1064    echo "$ac_t""missing" 1>&6
1065 fi
1066
1067 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1068 echo "configure:1069: checking for working autoheader" >&5
1069 # Run test in a subshell; some versions of sh will print an error if
1070 # an executable is not found, even if stderr is redirected.
1071 # Redirect stdin to placate older versions of autoconf.  Sigh.
1072 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1073    AUTOHEADER=autoheader
1074    echo "$ac_t""found" 1>&6
1075 else
1076    AUTOHEADER="$missing_dir/missing autoheader"
1077    echo "$ac_t""missing" 1>&6
1078 fi
1079
1080 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1081 echo "configure:1082: checking for working makeinfo" >&5
1082 # Run test in a subshell; some versions of sh will print an error if
1083 # an executable is not found, even if stderr is redirected.
1084 # Redirect stdin to placate older versions of autoconf.  Sigh.
1085 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1086    MAKEINFO=makeinfo
1087    echo "$ac_t""found" 1>&6
1088 else
1089    MAKEINFO="$missing_dir/missing makeinfo"
1090    echo "$ac_t""missing" 1>&6
1091 fi
1092
1093 install_sh="$missing_dir/install-sh"
1094 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1095
1096 for ac_prog in gnutar gtar tar
1097 do
1098 # Extract the first word of "$ac_prog", so it can be a program name with args.
1099 set dummy $ac_prog; ac_word=$2
1100 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1101 echo "configure:1102: checking for $ac_word" >&5
1102 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105   if test -n "$AMTAR"; then
1106   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1107 else
1108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1109   ac_dummy="$PATH"
1110   for ac_dir in $ac_dummy; do
1111     test -z "$ac_dir" && ac_dir=.
1112     if test -f $ac_dir/$ac_word; then
1113       ac_cv_prog_AMTAR="$ac_prog"
1114       break
1115     fi
1116   done
1117   IFS="$ac_save_ifs"
1118 fi
1119 fi
1120 AMTAR="$ac_cv_prog_AMTAR"
1121 if test -n "$AMTAR"; then
1122   echo "$ac_t""$AMTAR" 1>&6
1123 else
1124   echo "$ac_t""no" 1>&6
1125 fi
1126
1127 test -n "$AMTAR" && break
1128 done
1129
1130
1131 AMTARFLAGS=
1132 if test -n "$AMTAR"; then
1133   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1134         AMTARFLAGS=o
1135   fi
1136 fi
1137
1138
1139
1140 cat >> confdefs.h <<EOF
1141 #define OPENLDAP_PACKAGE "$PACKAGE"
1142 EOF
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_VERSION "$VERSION"
1146 EOF
1147
1148
1149
1150
1151 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1152 echo "configure:1153: checking configure arguments" >&5
1153
1154
1155 top_builddir=`pwd`
1156
1157 ldap_subdir="/openldap"
1158
1159 # Check whether --with-subdir or --without-subdir was given.
1160 if test "${with_subdir+set}" = set; then
1161   withval="$with_subdir"
1162   case "$withval" in
1163         no) ldap_subdir=""
1164                 ;;
1165         yes)
1166                 ;;
1167         /*|\\*)
1168                 ldap_subdir="$withval"
1169                 ;;
1170         *)
1171                 ldap_subdir="/$withval"
1172                 ;;
1173 esac
1174
1175 fi
1176
1177
1178 # OpenLDAP --enable-debug
1179         # Check whether --enable-debug or --disable-debug was given.
1180 if test "${enable_debug+set}" = set; then
1181   enableval="$enable_debug"
1182   
1183         ol_arg=invalid
1184         for ol_val in auto yes no ; do
1185                 if test "$enableval" = "$ol_val" ; then
1186                         ol_arg="$ol_val"
1187                 fi
1188         done
1189         if test "$ol_arg" = "invalid" ; then
1190                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1191         fi
1192         ol_enable_debug="$ol_arg"
1193
1194 else
1195         ol_enable_debug="yes"
1196 fi
1197 # end --enable-debug
1198 # OpenLDAP --enable-syslog
1199         # Check whether --enable-syslog or --disable-syslog was given.
1200 if test "${enable_syslog+set}" = set; then
1201   enableval="$enable_syslog"
1202   
1203         ol_arg=invalid
1204         for ol_val in auto yes no ; do
1205                 if test "$enableval" = "$ol_val" ; then
1206                         ol_arg="$ol_val"
1207                 fi
1208         done
1209         if test "$ol_arg" = "invalid" ; then
1210                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1211         fi
1212         ol_enable_syslog="$ol_arg"
1213
1214 else
1215         ol_enable_syslog="auto"
1216 fi
1217 # end --enable-syslog
1218 # OpenLDAP --enable-proctitle
1219         # Check whether --enable-proctitle or --disable-proctitle was given.
1220 if test "${enable_proctitle+set}" = set; then
1221   enableval="$enable_proctitle"
1222   
1223         ol_arg=invalid
1224         for ol_val in auto yes no ; do
1225                 if test "$enableval" = "$ol_val" ; then
1226                         ol_arg="$ol_val"
1227                 fi
1228         done
1229         if test "$ol_arg" = "invalid" ; then
1230                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1231         fi
1232         ol_enable_proctitle="$ol_arg"
1233
1234 else
1235         ol_enable_proctitle="yes"
1236 fi
1237 # end --enable-proctitle
1238 # OpenLDAP --enable-cache
1239         # Check whether --enable-cache or --disable-cache was given.
1240 if test "${enable_cache+set}" = set; then
1241   enableval="$enable_cache"
1242   
1243         ol_arg=invalid
1244         for ol_val in auto yes no ; do
1245                 if test "$enableval" = "$ol_val" ; then
1246                         ol_arg="$ol_val"
1247                 fi
1248         done
1249         if test "$ol_arg" = "invalid" ; then
1250                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1251         fi
1252         ol_enable_cache="$ol_arg"
1253
1254 else
1255         ol_enable_cache="yes"
1256 fi
1257 # end --enable-cache
1258 # OpenLDAP --enable-referrals
1259         # Check whether --enable-referrals or --disable-referrals was given.
1260 if test "${enable_referrals+set}" = set; then
1261   enableval="$enable_referrals"
1262   
1263         ol_arg=invalid
1264         for ol_val in auto yes no ; do
1265                 if test "$enableval" = "$ol_val" ; then
1266                         ol_arg="$ol_val"
1267                 fi
1268         done
1269         if test "$ol_arg" = "invalid" ; then
1270                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1271         fi
1272         ol_enable_referrals="$ol_arg"
1273
1274 else
1275         ol_enable_referrals="yes"
1276 fi
1277 # end --enable-referrals
1278 # OpenLDAP --enable-kbind
1279         # Check whether --enable-kbind or --disable-kbind was given.
1280 if test "${enable_kbind+set}" = set; then
1281   enableval="$enable_kbind"
1282   
1283         ol_arg=invalid
1284         for ol_val in auto yes no ; do
1285                 if test "$enableval" = "$ol_val" ; then
1286                         ol_arg="$ol_val"
1287                 fi
1288         done
1289         if test "$ol_arg" = "invalid" ; then
1290                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1291         fi
1292         ol_enable_kbind="$ol_arg"
1293
1294 else
1295         ol_enable_kbind="auto"
1296 fi
1297 # end --enable-kbind
1298 # OpenLDAP --enable-ipv6
1299         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1300 if test "${enable_ipv6+set}" = set; then
1301   enableval="$enable_ipv6"
1302   
1303         ol_arg=invalid
1304         for ol_val in auto yes no ; do
1305                 if test "$enableval" = "$ol_val" ; then
1306                         ol_arg="$ol_val"
1307                 fi
1308         done
1309         if test "$ol_arg" = "invalid" ; then
1310                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1311         fi
1312         ol_enable_ipv6="$ol_arg"
1313
1314 else
1315         ol_enable_ipv6="auto"
1316 fi
1317 # end --enable-ipv6
1318 # OpenLDAP --enable-local
1319         # Check whether --enable-local or --disable-local was given.
1320 if test "${enable_local+set}" = set; then
1321   enableval="$enable_local"
1322   
1323         ol_arg=invalid
1324         for ol_val in auto yes no ; do
1325                 if test "$enableval" = "$ol_val" ; then
1326                         ol_arg="$ol_val"
1327                 fi
1328         done
1329         if test "$ol_arg" = "invalid" ; then
1330                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1331         fi
1332         ol_enable_local="$ol_arg"
1333
1334 else
1335         ol_enable_local="auto"
1336 fi
1337 # end --enable-local
1338 # OpenLDAP --enable-x_compile
1339         # Check whether --enable-x_compile or --disable-x_compile was given.
1340 if test "${enable_x_compile+set}" = set; then
1341   enableval="$enable_x_compile"
1342   
1343         ol_arg=invalid
1344         for ol_val in yes no ; do
1345                 if test "$enableval" = "$ol_val" ; then
1346                         ol_arg="$ol_val"
1347                 fi
1348         done
1349         if test "$ol_arg" = "invalid" ; then
1350                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1351         fi
1352         ol_enable_x_compile="$ol_arg"
1353
1354 else
1355         ol_enable_x_compile="no"
1356 fi
1357 # end --enable-x_compile
1358
1359
1360 # OpenLDAP --with-cyrus_sasl
1361         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1362 if test "${with_cyrus_sasl+set}" = set; then
1363   withval="$with_cyrus_sasl"
1364   
1365         ol_arg=invalid
1366         for ol_val in auto yes no  ; do
1367                 if test "$withval" = "$ol_val" ; then
1368                         ol_arg="$ol_val"
1369                 fi
1370         done
1371         if test "$ol_arg" = "invalid" ; then
1372                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1373         fi
1374         ol_with_cyrus_sasl="$ol_arg"
1375
1376 else
1377         ol_with_cyrus_sasl="auto"
1378 fi
1379 # end --with-cyrus_sasl
1380
1381 # OpenLDAP --with-fetch
1382         # Check whether --with-fetch or --without-fetch was given.
1383 if test "${with_fetch+set}" = set; then
1384   withval="$with_fetch"
1385   
1386         ol_arg=invalid
1387         for ol_val in auto yes no  ; do
1388                 if test "$withval" = "$ol_val" ; then
1389                         ol_arg="$ol_val"
1390                 fi
1391         done
1392         if test "$ol_arg" = "invalid" ; then
1393                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1394         fi
1395         ol_with_fetch="$ol_arg"
1396
1397 else
1398         ol_with_fetch="auto"
1399 fi
1400 # end --with-fetch
1401
1402 # OpenLDAP --with-kerberos
1403         # Check whether --with-kerberos or --without-kerberos was given.
1404 if test "${with_kerberos+set}" = set; then
1405   withval="$with_kerberos"
1406   
1407         ol_arg=invalid
1408         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1409                 if test "$withval" = "$ol_val" ; then
1410                         ol_arg="$ol_val"
1411                 fi
1412         done
1413         if test "$ol_arg" = "invalid" ; then
1414                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1415         fi
1416         ol_with_kerberos="$ol_arg"
1417
1418 else
1419         ol_with_kerberos="auto"
1420 fi
1421 # end --with-kerberos
1422
1423 # OpenLDAP --with-readline
1424         # Check whether --with-readline or --without-readline was given.
1425 if test "${with_readline+set}" = set; then
1426   withval="$with_readline"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto yes no  ; do
1430                 if test "$withval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1436         fi
1437         ol_with_readline="$ol_arg"
1438
1439 else
1440         ol_with_readline="auto"
1441 fi
1442 # end --with-readline
1443
1444 # OpenLDAP --with-threads
1445         # Check whether --with-threads or --without-threads was given.
1446 if test "${with_threads+set}" = set; then
1447   withval="$with_threads"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1451                 if test "$withval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1457         fi
1458         ol_with_threads="$ol_arg"
1459
1460 else
1461         ol_with_threads="auto"
1462 fi
1463 # end --with-threads
1464
1465 # OpenLDAP --with-tls
1466         # Check whether --with-tls or --without-tls was given.
1467 if test "${with_tls+set}" = set; then
1468   withval="$with_tls"
1469   
1470         ol_arg=invalid
1471         for ol_val in auto ssleay openssl yes no  ; do
1472                 if test "$withval" = "$ol_val" ; then
1473                         ol_arg="$ol_val"
1474                 fi
1475         done
1476         if test "$ol_arg" = "invalid" ; then
1477                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1478         fi
1479         ol_with_tls="$ol_arg"
1480
1481 else
1482         ol_with_tls="auto"
1483 fi
1484 # end --with-tls
1485
1486 # OpenLDAP --with-yielding_select
1487         # Check whether --with-yielding_select or --without-yielding_select was given.
1488 if test "${with_yielding_select+set}" = set; then
1489   withval="$with_yielding_select"
1490   
1491         ol_arg=invalid
1492         for ol_val in auto yes no manual  ; do
1493                 if test "$withval" = "$ol_val" ; then
1494                         ol_arg="$ol_val"
1495                 fi
1496         done
1497         if test "$ol_arg" = "invalid" ; then
1498                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1499         fi
1500         ol_with_yielding_select="$ol_arg"
1501
1502 else
1503         ol_with_yielding_select="auto"
1504 fi
1505 # end --with-yielding_select
1506
1507
1508
1509 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1510 if test "${with_xxslapdoptions+set}" = set; then
1511   withval="$with_xxslapdoptions"
1512   :
1513 fi
1514
1515 # OpenLDAP --enable-slapd
1516         # Check whether --enable-slapd or --disable-slapd was given.
1517 if test "${enable_slapd+set}" = set; then
1518   enableval="$enable_slapd"
1519   
1520         ol_arg=invalid
1521         for ol_val in auto yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1528         fi
1529         ol_enable_slapd="$ol_arg"
1530
1531 else
1532         ol_enable_slapd="yes"
1533 fi
1534 # end --enable-slapd
1535 # OpenLDAP --enable-cleartext
1536         # Check whether --enable-cleartext or --disable-cleartext was given.
1537 if test "${enable_cleartext+set}" = set; then
1538   enableval="$enable_cleartext"
1539   
1540         ol_arg=invalid
1541         for ol_val in auto yes no ; do
1542                 if test "$enableval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1548         fi
1549         ol_enable_cleartext="$ol_arg"
1550
1551 else
1552         ol_enable_cleartext="yes"
1553 fi
1554 # end --enable-cleartext
1555 # OpenLDAP --enable-crypt
1556         # Check whether --enable-crypt or --disable-crypt was given.
1557 if test "${enable_crypt+set}" = set; then
1558   enableval="$enable_crypt"
1559   
1560         ol_arg=invalid
1561         for ol_val in auto yes no ; do
1562                 if test "$enableval" = "$ol_val" ; then
1563                         ol_arg="$ol_val"
1564                 fi
1565         done
1566         if test "$ol_arg" = "invalid" ; then
1567                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1568         fi
1569         ol_enable_crypt="$ol_arg"
1570
1571 else
1572         ol_enable_crypt="auto"
1573 fi
1574 # end --enable-crypt
1575 # OpenLDAP --enable-kpasswd
1576         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1577 if test "${enable_kpasswd+set}" = set; then
1578   enableval="$enable_kpasswd"
1579   
1580         ol_arg=invalid
1581         for ol_val in auto yes no ; do
1582                 if test "$enableval" = "$ol_val" ; then
1583                         ol_arg="$ol_val"
1584                 fi
1585         done
1586         if test "$ol_arg" = "invalid" ; then
1587                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1588         fi
1589         ol_enable_kpasswd="$ol_arg"
1590
1591 else
1592         ol_enable_kpasswd="no"
1593 fi
1594 # end --enable-kpasswd
1595 # OpenLDAP --enable-spasswd
1596         # Check whether --enable-spasswd or --disable-spasswd was given.
1597 if test "${enable_spasswd+set}" = set; then
1598   enableval="$enable_spasswd"
1599   
1600         ol_arg=invalid
1601         for ol_val in auto yes no ; do
1602                 if test "$enableval" = "$ol_val" ; then
1603                         ol_arg="$ol_val"
1604                 fi
1605         done
1606         if test "$ol_arg" = "invalid" ; then
1607                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1608         fi
1609         ol_enable_spasswd="$ol_arg"
1610
1611 else
1612         ol_enable_spasswd="no"
1613 fi
1614 # end --enable-spasswd
1615 # OpenLDAP --enable-modules
1616         # Check whether --enable-modules or --disable-modules was given.
1617 if test "${enable_modules+set}" = set; then
1618   enableval="$enable_modules"
1619   
1620         ol_arg=invalid
1621         for ol_val in auto yes no ; do
1622                 if test "$enableval" = "$ol_val" ; then
1623                         ol_arg="$ol_val"
1624                 fi
1625         done
1626         if test "$ol_arg" = "invalid" ; then
1627                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1628         fi
1629         ol_enable_modules="$ol_arg"
1630
1631 else
1632         ol_enable_modules="no"
1633 fi
1634 # end --enable-modules
1635 # OpenLDAP --enable-multimaster
1636         # Check whether --enable-multimaster or --disable-multimaster was given.
1637 if test "${enable_multimaster+set}" = set; then
1638   enableval="$enable_multimaster"
1639   
1640         ol_arg=invalid
1641         for ol_val in auto yes no ; do
1642                 if test "$enableval" = "$ol_val" ; then
1643                         ol_arg="$ol_val"
1644                 fi
1645         done
1646         if test "$ol_arg" = "invalid" ; then
1647                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1648         fi
1649         ol_enable_multimaster="$ol_arg"
1650
1651 else
1652         ol_enable_multimaster="no"
1653 fi
1654 # end --enable-multimaster
1655 # OpenLDAP --enable-phonetic
1656         # Check whether --enable-phonetic or --disable-phonetic was given.
1657 if test "${enable_phonetic+set}" = set; then
1658   enableval="$enable_phonetic"
1659   
1660         ol_arg=invalid
1661         for ol_val in auto yes no ; do
1662                 if test "$enableval" = "$ol_val" ; then
1663                         ol_arg="$ol_val"
1664                 fi
1665         done
1666         if test "$ol_arg" = "invalid" ; then
1667                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1668         fi
1669         ol_enable_phonetic="$ol_arg"
1670
1671 else
1672         ol_enable_phonetic="no"
1673 fi
1674 # end --enable-phonetic
1675 # OpenLDAP --enable-rlookups
1676         # Check whether --enable-rlookups or --disable-rlookups was given.
1677 if test "${enable_rlookups+set}" = set; then
1678   enableval="$enable_rlookups"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no ; do
1682                 if test "$enableval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1688         fi
1689         ol_enable_rlookups="$ol_arg"
1690
1691 else
1692         ol_enable_rlookups="auto"
1693 fi
1694 # end --enable-rlookups
1695 # OpenLDAP --enable-aci
1696         # Check whether --enable-aci or --disable-aci was given.
1697 if test "${enable_aci+set}" = set; then
1698   enableval="$enable_aci"
1699   
1700         ol_arg=invalid
1701         for ol_val in auto yes no ; do
1702                 if test "$enableval" = "$ol_val" ; then
1703                         ol_arg="$ol_val"
1704                 fi
1705         done
1706         if test "$ol_arg" = "invalid" ; then
1707                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1708         fi
1709         ol_enable_aci="$ol_arg"
1710
1711 else
1712         ol_enable_aci="no"
1713 fi
1714 # end --enable-aci
1715 # OpenLDAP --enable-wrappers
1716         # Check whether --enable-wrappers or --disable-wrappers was given.
1717 if test "${enable_wrappers+set}" = set; then
1718   enableval="$enable_wrappers"
1719   
1720         ol_arg=invalid
1721         for ol_val in auto yes no ; do
1722                 if test "$enableval" = "$ol_val" ; then
1723                         ol_arg="$ol_val"
1724                 fi
1725         done
1726         if test "$ol_arg" = "invalid" ; then
1727                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1728         fi
1729         ol_enable_wrappers="$ol_arg"
1730
1731 else
1732         ol_enable_wrappers="no"
1733 fi
1734 # end --enable-wrappers
1735 # OpenLDAP --enable-dynamic
1736         # Check whether --enable-dynamic or --disable-dynamic was given.
1737 if test "${enable_dynamic+set}" = set; then
1738   enableval="$enable_dynamic"
1739   
1740         ol_arg=invalid
1741         for ol_val in auto yes no ; do
1742                 if test "$enableval" = "$ol_val" ; then
1743                         ol_arg="$ol_val"
1744                 fi
1745         done
1746         if test "$ol_arg" = "invalid" ; then
1747                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1748         fi
1749         ol_enable_dynamic="$ol_arg"
1750
1751 else
1752         ol_enable_dynamic="no"
1753 fi
1754 # end --enable-dynamic
1755
1756 # OpenLDAP --enable-dnssrv
1757         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1758 if test "${enable_dnssrv+set}" = set; then
1759   enableval="$enable_dnssrv"
1760   
1761         ol_arg=invalid
1762         for ol_val in auto yes no ; do
1763                 if test "$enableval" = "$ol_val" ; then
1764                         ol_arg="$ol_val"
1765                 fi
1766         done
1767         if test "$ol_arg" = "invalid" ; then
1768                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1769         fi
1770         ol_enable_dnssrv="$ol_arg"
1771
1772 else
1773         ol_enable_dnssrv="no"
1774 fi
1775 # end --enable-dnssrv
1776 # OpenLDAP --with-dnssrv_module
1777         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1778 if test "${with_dnssrv_module+set}" = set; then
1779   withval="$with_dnssrv_module"
1780   
1781         ol_arg=invalid
1782         for ol_val in static dynamic ; do
1783                 if test "$withval" = "$ol_val" ; then
1784                         ol_arg="$ol_val"
1785                 fi
1786         done
1787         if test "$ol_arg" = "invalid" ; then
1788                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1789         fi
1790         ol_with_dnssrv_module="$ol_arg"
1791
1792 else
1793         ol_with_dnssrv_module="static"
1794 fi
1795 # end --with-dnssrv_module
1796
1797 # OpenLDAP --enable-ldap
1798         # Check whether --enable-ldap or --disable-ldap was given.
1799 if test "${enable_ldap+set}" = set; then
1800   enableval="$enable_ldap"
1801   
1802         ol_arg=invalid
1803         for ol_val in auto yes no ; do
1804                 if test "$enableval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1810         fi
1811         ol_enable_ldap="$ol_arg"
1812
1813 else
1814         ol_enable_ldap="no"
1815 fi
1816 # end --enable-ldap
1817 # OpenLDAP --with-ldap_module
1818         # Check whether --with-ldap_module or --without-ldap_module was given.
1819 if test "${with_ldap_module+set}" = set; then
1820   withval="$with_ldap_module"
1821   
1822         ol_arg=invalid
1823         for ol_val in static dynamic ; do
1824                 if test "$withval" = "$ol_val" ; then
1825                         ol_arg="$ol_val"
1826                 fi
1827         done
1828         if test "$ol_arg" = "invalid" ; then
1829                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1830         fi
1831         ol_with_ldap_module="$ol_arg"
1832
1833 else
1834         ol_with_ldap_module="static"
1835 fi
1836 # end --with-ldap_module
1837
1838 # OpenLDAP --enable-ldbm
1839         # Check whether --enable-ldbm or --disable-ldbm was given.
1840 if test "${enable_ldbm+set}" = set; then
1841   enableval="$enable_ldbm"
1842   
1843         ol_arg=invalid
1844         for ol_val in auto yes no ; do
1845                 if test "$enableval" = "$ol_val" ; then
1846                         ol_arg="$ol_val"
1847                 fi
1848         done
1849         if test "$ol_arg" = "invalid" ; then
1850                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1851         fi
1852         ol_enable_ldbm="$ol_arg"
1853
1854 else
1855         ol_enable_ldbm="yes"
1856 fi
1857 # end --enable-ldbm
1858 # OpenLDAP --with-ldbm_api
1859         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1860 if test "${with_ldbm_api+set}" = set; then
1861   withval="$with_ldbm_api"
1862   
1863         ol_arg=invalid
1864         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1865                 if test "$withval" = "$ol_val" ; then
1866                         ol_arg="$ol_val"
1867                 fi
1868         done
1869         if test "$ol_arg" = "invalid" ; then
1870                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1871         fi
1872         ol_with_ldbm_api="$ol_arg"
1873
1874 else
1875         ol_with_ldbm_api="auto"
1876 fi
1877 # end --with-ldbm_api
1878
1879 # OpenLDAP --with-ldbm_module
1880         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1881 if test "${with_ldbm_module+set}" = set; then
1882   withval="$with_ldbm_module"
1883   
1884         ol_arg=invalid
1885         for ol_val in static dynamic ; do
1886                 if test "$withval" = "$ol_val" ; then
1887                         ol_arg="$ol_val"
1888                 fi
1889         done
1890         if test "$ol_arg" = "invalid" ; then
1891                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1892         fi
1893         ol_with_ldbm_module="$ol_arg"
1894
1895 else
1896         ol_with_ldbm_module="static"
1897 fi
1898 # end --with-ldbm_module
1899
1900 # OpenLDAP --with-ldbm_type
1901         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1902 if test "${with_ldbm_type+set}" = set; then
1903   withval="$with_ldbm_type"
1904   
1905         ol_arg=invalid
1906         for ol_val in auto btree hash ; do
1907                 if test "$withval" = "$ol_val" ; then
1908                         ol_arg="$ol_val"
1909                 fi
1910         done
1911         if test "$ol_arg" = "invalid" ; then
1912                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1913         fi
1914         ol_with_ldbm_type="$ol_arg"
1915
1916 else
1917         ol_with_ldbm_type="auto"
1918 fi
1919 # end --with-ldbm_type
1920
1921 # OpenLDAP --enable-passwd
1922         # Check whether --enable-passwd or --disable-passwd was given.
1923 if test "${enable_passwd+set}" = set; then
1924   enableval="$enable_passwd"
1925   
1926         ol_arg=invalid
1927         for ol_val in auto yes no ; do
1928                 if test "$enableval" = "$ol_val" ; then
1929                         ol_arg="$ol_val"
1930                 fi
1931         done
1932         if test "$ol_arg" = "invalid" ; then
1933                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1934         fi
1935         ol_enable_passwd="$ol_arg"
1936
1937 else
1938         ol_enable_passwd="no"
1939 fi
1940 # end --enable-passwd
1941 # OpenLDAP --with-passwd_module
1942         # Check whether --with-passwd_module or --without-passwd_module was given.
1943 if test "${with_passwd_module+set}" = set; then
1944   withval="$with_passwd_module"
1945   
1946         ol_arg=invalid
1947         for ol_val in static dynamic ; do
1948                 if test "$withval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1954         fi
1955         ol_with_passwd_module="$ol_arg"
1956
1957 else
1958         ol_with_passwd_module="static"
1959 fi
1960 # end --with-passwd_module
1961
1962 # OpenLDAP --enable-perl
1963         # Check whether --enable-perl or --disable-perl was given.
1964 if test "${enable_perl+set}" = set; then
1965   enableval="$enable_perl"
1966   
1967         ol_arg=invalid
1968         for ol_val in auto yes no ; do
1969                 if test "$enableval" = "$ol_val" ; then
1970                         ol_arg="$ol_val"
1971                 fi
1972         done
1973         if test "$ol_arg" = "invalid" ; then
1974                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1975         fi
1976         ol_enable_perl="$ol_arg"
1977
1978 else
1979         ol_enable_perl="no"
1980 fi
1981 # end --enable-perl
1982 # OpenLDAP --with-perl_module
1983         # Check whether --with-perl_module or --without-perl_module was given.
1984 if test "${with_perl_module+set}" = set; then
1985   withval="$with_perl_module"
1986   
1987         ol_arg=invalid
1988         for ol_val in static dynamic ; do
1989                 if test "$withval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1995         fi
1996         ol_with_perl_module="$ol_arg"
1997
1998 else
1999         ol_with_perl_module="static"
2000 fi
2001 # end --with-perl_module
2002
2003 # OpenLDAP --enable-shell
2004         # Check whether --enable-shell or --disable-shell was given.
2005 if test "${enable_shell+set}" = set; then
2006   enableval="$enable_shell"
2007   
2008         ol_arg=invalid
2009         for ol_val in auto yes no ; do
2010                 if test "$enableval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2016         fi
2017         ol_enable_shell="$ol_arg"
2018
2019 else
2020         ol_enable_shell="no"
2021 fi
2022 # end --enable-shell
2023 # OpenLDAP --with-shell_module
2024         # Check whether --with-shell_module or --without-shell_module was given.
2025 if test "${with_shell_module+set}" = set; then
2026   withval="$with_shell_module"
2027   
2028         ol_arg=invalid
2029         for ol_val in static dynamic ; do
2030                 if test "$withval" = "$ol_val" ; then
2031                         ol_arg="$ol_val"
2032                 fi
2033         done
2034         if test "$ol_arg" = "invalid" ; then
2035                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2036         fi
2037         ol_with_shell_module="$ol_arg"
2038
2039 else
2040         ol_with_shell_module="static"
2041 fi
2042 # end --with-shell_module
2043
2044 # OpenLDAP --enable-sql
2045         # Check whether --enable-sql or --disable-sql was given.
2046 if test "${enable_sql+set}" = set; then
2047   enableval="$enable_sql"
2048   
2049         ol_arg=invalid
2050         for ol_val in auto yes no ; do
2051                 if test "$enableval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2057         fi
2058         ol_enable_sql="$ol_arg"
2059
2060 else
2061         ol_enable_sql="no"
2062 fi
2063 # end --enable-sql
2064 # OpenLDAP --with-sql_module
2065         # Check whether --with-sql_module or --without-sql_module was given.
2066 if test "${with_sql_module+set}" = set; then
2067   withval="$with_sql_module"
2068   
2069         ol_arg=invalid
2070         for ol_val in static dynamic ; do
2071                 if test "$withval" = "$ol_val" ; then
2072                         ol_arg="$ol_val"
2073                 fi
2074         done
2075         if test "$ol_arg" = "invalid" ; then
2076                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2077         fi
2078         ol_with_sql_module="$ol_arg"
2079
2080 else
2081         ol_with_sql_module="static"
2082 fi
2083 # end --with-sql_module
2084
2085 # OpenLDAP --enable-tcl
2086         # Check whether --enable-tcl or --disable-tcl was given.
2087 if test "${enable_tcl+set}" = set; then
2088   enableval="$enable_tcl"
2089   
2090         ol_arg=invalid
2091         for ol_val in auto yes no ; do
2092                 if test "$enableval" = "$ol_val" ; then
2093                         ol_arg="$ol_val"
2094                 fi
2095         done
2096         if test "$ol_arg" = "invalid" ; then
2097                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2098         fi
2099         ol_enable_tcl="$ol_arg"
2100
2101 else
2102         ol_enable_tcl="no"
2103 fi
2104 # end --enable-tcl
2105 # OpenLDAP --with-tcl_module
2106         # Check whether --with-tcl_module or --without-tcl_module was given.
2107 if test "${with_tcl_module+set}" = set; then
2108   withval="$with_tcl_module"
2109   
2110         ol_arg=invalid
2111         for ol_val in static dynamic ; do
2112                 if test "$withval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2118         fi
2119         ol_with_tcl_module="$ol_arg"
2120
2121 else
2122         ol_with_tcl_module="static"
2123 fi
2124 # end --with-tcl_module
2125
2126
2127 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2128 if test "${with_xxslurpdoptions+set}" = set; then
2129   withval="$with_xxslurpdoptions"
2130   :
2131 fi
2132
2133 # OpenLDAP --enable-slurpd
2134         # Check whether --enable-slurpd or --disable-slurpd was given.
2135 if test "${enable_slurpd+set}" = set; then
2136   enableval="$enable_slurpd"
2137   
2138         ol_arg=invalid
2139         for ol_val in auto yes no ; do
2140                 if test "$enableval" = "$ol_val" ; then
2141                         ol_arg="$ol_val"
2142                 fi
2143         done
2144         if test "$ol_arg" = "invalid" ; then
2145                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2146         fi
2147         ol_enable_slurpd="$ol_arg"
2148
2149 else
2150         ol_enable_slurpd="auto"
2151 fi
2152 # end --enable-slurpd
2153
2154 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2155 if test "${with_xxliboptions+set}" = set; then
2156   withval="$with_xxliboptions"
2157   :
2158 fi
2159
2160 # Check whether --enable-static or --disable-static was given.
2161 if test "${enable_static+set}" = set; then
2162   enableval="$enable_static"
2163   p=${PACKAGE-default}
2164 case "$enableval" in
2165 yes) enable_static=yes ;;
2166 no) enable_static=no ;;
2167 *)
2168   enable_static=no
2169   # Look at the argument we got.  We use all the common list separators.
2170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2171   for pkg in $enableval; do
2172     if test "X$pkg" = "X$p"; then
2173       enable_static=yes
2174     fi
2175   done
2176   IFS="$ac_save_ifs"
2177   ;;
2178 esac
2179 else
2180   enable_static=yes
2181 fi
2182
2183 # Check whether --enable-shared or --disable-shared was given.
2184 if test "${enable_shared+set}" = set; then
2185   enableval="$enable_shared"
2186   p=${PACKAGE-default}
2187 case "$enableval" in
2188 yes) enable_shared=yes ;;
2189 no) enable_shared=no ;;
2190 *)
2191   enable_shared=no
2192   # Look at the argument we got.  We use all the common list separators.
2193   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2194   for pkg in $enableval; do
2195     if test "X$pkg" = "X$p"; then
2196       enable_shared=yes
2197     fi
2198   done
2199   IFS="$ac_save_ifs"
2200   ;;
2201 esac
2202 else
2203   enable_shared=yes
2204 fi
2205
2206
2207
2208 # validate options
2209 if test $ol_enable_slapd = no ; then
2210                 if test $ol_enable_dnssrv = yes ; then
2211                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2212         fi
2213         if test $ol_enable_ldap = yes ; then
2214                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2215         fi
2216         if test $ol_enable_ldbm = yes ; then
2217                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2218         fi
2219         if test $ol_enable_passwd = yes ; then
2220                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2221         fi
2222         if test $ol_enable_perl = yes ; then
2223                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2224         fi
2225         if test $ol_enable_shell = yes ; then
2226                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2227         fi
2228         if test $ol_enable_tcl = yes ; then
2229                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2230         fi
2231         if test $ol_enable_sql = yes ; then
2232                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2233         fi
2234         if test $ol_enable_modules = yes ; then
2235                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2236         fi
2237         if test $ol_enable_multimaster = yes ; then
2238                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2239         fi
2240         if test $ol_enable_wrappers = yes ; then
2241                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2242         fi
2243         if test $ol_enable_phonetic = yes ; then
2244                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2245         fi
2246         if test $ol_enable_rlookups = yes ; then
2247                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2248         fi
2249         if test $ol_enable_aci = yes ; then
2250                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2251         fi
2252         if test $ol_with_ldbm_api != auto ; then
2253                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2254         fi
2255         if test $ol_with_ldbm_type != auto ; then
2256                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2257         fi
2258         if test $ol_with_dnssrv_module != static ; then
2259                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2260         fi
2261         if test $ol_with_ldap_module != static ; then
2262                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2263         fi
2264         if test $ol_with_ldbm_module != static ; then
2265                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2266         fi
2267         if test $ol_with_passwd_module != static ; then
2268                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2269         fi
2270         if test $ol_with_perl_module != static ; then
2271                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2272         fi
2273         if test $ol_with_shell_module != static ; then
2274                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2275         fi
2276         if test $ol_with_tcl_module != static ; then
2277                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2278         fi
2279         if test $ol_with_sql_module != static ; then
2280                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2281         fi
2282         if test $ol_enable_slurpd = yes ; then
2283                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2284         fi
2285
2286         # force settings to no
2287         ol_enable_dnssrv=no
2288         ol_enable_ldap=no
2289         ol_enable_ldbm=no
2290         ol_enable_passwd=no
2291         ol_enable_perl=no
2292         ol_enable_shell=no
2293         ol_enable_tcl=no
2294         ol_enable_sql=no
2295
2296         ol_enable_modules=no
2297         ol_enable_multimaster=no
2298         ol_enable_phonetic=no
2299         ol_enable_rlookups=no
2300         ol_enable_aci=no
2301         ol_enable_wrappers=no
2302         ol_enable_dynamic=no
2303
2304         ol_with_ldbm_api=no
2305         ol_with_ldbm_type=no
2306
2307         ol_with_dnssrv_module=static
2308         ol_with_ldap_module=static
2309         ol_with_ldbm_module=static
2310         ol_with_passwd_module=static
2311         ol_with_perl_module=static
2312         ol_with_shell_module=static
2313         ol_with_tcl_module=static
2314         ol_with_sql_module=static
2315
2316         ol_enable_slurpd=no
2317
2318 elif test $ol_enable_ldbm = no ; then
2319         
2320         if test $ol_with_ldbm_api != auto ; then
2321                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2322         fi
2323
2324         if test $ol_with_ldbm_type != auto ; then
2325                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2326         fi
2327
2328         if test $ol_with_ldbm_module != static ; then
2329                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2330         fi
2331
2332         if test $ol_enable_modules != yes -a \
2333                 $ol_enable_dnssrv = no -a \
2334                 $ol_enable_ldap = no -a \
2335                 $ol_enable_passwd = no -a \
2336                 $ol_enable_perl = no -a \
2337                 $ol_enable_shell = no -a \
2338                 $ol_enable_sql = no -a \
2339                 $ol_enable_tcl = no ; then
2340                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2341         fi
2342
2343         ol_with_ldbm_api=no
2344         ol_with_ldbm_type=no
2345         ol_with_ldbm_module=static
2346
2347 else
2348                 if test $ol_with_ldbm_api = gdbm -a \
2349                 $ol_with_ldbm_type = btree ; then
2350                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2351         fi
2352         if test $ol_with_ldbm_api = mdbm -a \
2353                 $ol_with_ldbm_type = btree ; then
2354                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2355         fi
2356         if test $ol_with_ldbm_api = ndbm -a \
2357                 $ol_with_ldbm_type = btree ; then
2358                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2359         fi
2360 fi
2361
2362 if test $ol_enable_slurpd = yes ; then
2363                 if test $ol_with_threads = no ; then
2364                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2365         fi
2366 fi
2367
2368 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2369         if test $ol_with_kerberos = no ; then
2370                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2371         fi
2372 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2373         if test $ol_with_kerberos != auto ; then
2374                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2375         else
2376                 ol_with_kerberos=no
2377         fi
2378 fi
2379
2380 if test $ol_enable_spasswd = yes ; then
2381         if test $ol_with_cyrus_sasl = no ; then
2382                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2383         fi
2384         ol_link_spasswd=yes
2385 fi
2386
2387 echo "$ac_t""done" 1>&6
2388
2389 LDAP_LIBS=
2390 LDIF_LIBS=
2391 LDBM_LIBS=
2392 LTHREAD_LIBS=
2393 LUTIL_LIBS=
2394
2395 SLAPD_LIBS=
2396 SLURPD_LIBS=
2397
2398 BUILD_SLAPD=no
2399 BUILD_SLURPD=no
2400
2401 BUILD_THREAD=no
2402
2403 BUILD_DNSSRV=no
2404 BUILD_LDAP=no
2405 BUILD_LDBM=no
2406 BUILD_PASSWD=no
2407 BUILD_PERL=no
2408 BUILD_SHELL=no
2409 BUILD_SQL=no
2410 BUILD_TCL=no
2411
2412 BUILD_DNSSRV_DYNAMIC=static
2413 BUILD_LDAP_DYNAMIC=static
2414 BUILD_LDBM_DYNAMIC=static
2415 BUILD_PASSWD_DYNAMIC=static
2416 BUILD_PERL_DYNAMIC=static
2417 BUILD_SHELL_DYNAMIC=static
2418 BUILD_TCL_DYNAMIC=static
2419 BUILD_SQL_DYNAMIC=static
2420
2421 SLAPD_MODULES_LDFLAGS=
2422 SLAPD_MODULES_CPPFLAGS=
2423 SLAPD_MODULES_LIST=
2424
2425 SLAPD_PERL_LDFLAGS=
2426 MOD_PERL_LDFLAGS=
2427 PERL_CPPFLAGS=
2428
2429 SLAPD_SQL_LDFLAGS=
2430 SLAPD_SQL_LIBS=
2431 SLAPD_SQL_INCLUDES=
2432
2433 MOD_TCL_LIB=
2434 KRB4_LIBS=
2435 KRB5_LIBS=
2436 READLINE_LIBS=
2437 SASL_LIBS=
2438 TERMCAP_LIBS=
2439 TLS_LIBS=
2440 MODULES_LIBS=
2441 AUTH_LIBS=
2442
2443
2444
2445 cat >> confdefs.h <<\EOF
2446 #define HAVE_MKVERSION 1
2447 EOF
2448
2449
2450
2451
2452 ol_aix_threads=no
2453 case "$target" in
2454 *-*-aix*)       if test -z "$CC" ; then
2455                 case "$ol_with_threads" in
2456                 auto | yes |  posix) ol_aix_threads=yes ;;
2457                 esac
2458         fi
2459 ;;
2460 esac
2461
2462 if test $ol_aix_threads = yes ; then
2463         if test -z "${CC}" ; then
2464                 for ac_prog in cc_r xlc_r cc
2465 do
2466 # Extract the first word of "$ac_prog", so it can be a program name with args.
2467 set dummy $ac_prog; ac_word=$2
2468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2469 echo "configure:2470: checking for $ac_word" >&5
2470 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2471   echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473   if test -n "$CC"; then
2474   ac_cv_prog_CC="$CC" # Let the user override the test.
2475 else
2476   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2477   ac_dummy="$PATH"
2478   for ac_dir in $ac_dummy; do
2479     test -z "$ac_dir" && ac_dir=.
2480     if test -f $ac_dir/$ac_word; then
2481       ac_cv_prog_CC="$ac_prog"
2482       break
2483     fi
2484   done
2485   IFS="$ac_save_ifs"
2486 fi
2487 fi
2488 CC="$ac_cv_prog_CC"
2489 if test -n "$CC"; then
2490   echo "$ac_t""$CC" 1>&6
2491 else
2492   echo "$ac_t""no" 1>&6
2493 fi
2494
2495 test -n "$CC" && break
2496 done
2497
2498
2499                 if test "$CC" = cc ; then
2500                                                 if test $ol_with_threads != auto ; then
2501                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2502                         else
2503                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2504                         fi
2505                         ol_with_threads=no
2506                 fi
2507         fi
2508
2509         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2510                 ol_with_threads=posix
2511                 ol_cv_pthread_create=yes
2512         fi
2513 fi
2514
2515 if test -z "${CC}"; then
2516         for ac_prog in cc
2517 do
2518 # Extract the first word of "$ac_prog", so it can be a program name with args.
2519 set dummy $ac_prog; ac_word=$2
2520 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2521 echo "configure:2522: checking for $ac_word" >&5
2522 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2523   echo $ac_n "(cached) $ac_c" 1>&6
2524 else
2525   if test -n "$CC"; then
2526   ac_cv_prog_CC="$CC" # Let the user override the test.
2527 else
2528   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2529   ac_dummy="$PATH"
2530   for ac_dir in $ac_dummy; do
2531     test -z "$ac_dir" && ac_dir=.
2532     if test -f $ac_dir/$ac_word; then
2533       ac_cv_prog_CC="$ac_prog"
2534       break
2535     fi
2536   done
2537   IFS="$ac_save_ifs"
2538 fi
2539 fi
2540 CC="$ac_cv_prog_CC"
2541 if test -n "$CC"; then
2542   echo "$ac_t""$CC" 1>&6
2543 else
2544   echo "$ac_t""no" 1>&6
2545 fi
2546
2547 test -n "$CC" && break
2548 done
2549
2550 fi
2551
2552
2553
2554
2555 # Check whether --enable-fast-install or --disable-fast-install was given.
2556 if test "${enable_fast_install+set}" = set; then
2557   enableval="$enable_fast_install"
2558   p=${PACKAGE-default}
2559 case "$enableval" in
2560 yes) enable_fast_install=yes ;;
2561 no) enable_fast_install=no ;;
2562 *)
2563   enable_fast_install=no
2564   # Look at the argument we got.  We use all the common list separators.
2565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2566   for pkg in $enableval; do
2567     if test "X$pkg" = "X$p"; then
2568       enable_fast_install=yes
2569     fi
2570   done
2571   IFS="$ac_save_ifs"
2572   ;;
2573 esac
2574 else
2575   enable_fast_install=yes
2576 fi
2577
2578 # Extract the first word of "ranlib", so it can be a program name with args.
2579 set dummy ranlib; ac_word=$2
2580 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2581 echo "configure:2582: checking for $ac_word" >&5
2582 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   if test -n "$RANLIB"; then
2586   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2587 else
2588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2589   ac_dummy="$PATH"
2590   for ac_dir in $ac_dummy; do
2591     test -z "$ac_dir" && ac_dir=.
2592     if test -f $ac_dir/$ac_word; then
2593       ac_cv_prog_RANLIB="ranlib"
2594       break
2595     fi
2596   done
2597   IFS="$ac_save_ifs"
2598   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2599 fi
2600 fi
2601 RANLIB="$ac_cv_prog_RANLIB"
2602 if test -n "$RANLIB"; then
2603   echo "$ac_t""$RANLIB" 1>&6
2604 else
2605   echo "$ac_t""no" 1>&6
2606 fi
2607
2608 # Extract the first word of "gcc", so it can be a program name with args.
2609 set dummy gcc; ac_word=$2
2610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2611 echo "configure:2612: checking for $ac_word" >&5
2612 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2613   echo $ac_n "(cached) $ac_c" 1>&6
2614 else
2615   if test -n "$CC"; then
2616   ac_cv_prog_CC="$CC" # Let the user override the test.
2617 else
2618   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2619   ac_dummy="$PATH"
2620   for ac_dir in $ac_dummy; do
2621     test -z "$ac_dir" && ac_dir=.
2622     if test -f $ac_dir/$ac_word; then
2623       ac_cv_prog_CC="gcc"
2624       break
2625     fi
2626   done
2627   IFS="$ac_save_ifs"
2628 fi
2629 fi
2630 CC="$ac_cv_prog_CC"
2631 if test -n "$CC"; then
2632   echo "$ac_t""$CC" 1>&6
2633 else
2634   echo "$ac_t""no" 1>&6
2635 fi
2636
2637 if test -z "$CC"; then
2638   # Extract the first word of "cc", so it can be a program name with args.
2639 set dummy cc; ac_word=$2
2640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2641 echo "configure:2642: checking for $ac_word" >&5
2642 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2643   echo $ac_n "(cached) $ac_c" 1>&6
2644 else
2645   if test -n "$CC"; then
2646   ac_cv_prog_CC="$CC" # Let the user override the test.
2647 else
2648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2649   ac_prog_rejected=no
2650   ac_dummy="$PATH"
2651   for ac_dir in $ac_dummy; do
2652     test -z "$ac_dir" && ac_dir=.
2653     if test -f $ac_dir/$ac_word; then
2654       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2655         ac_prog_rejected=yes
2656         continue
2657       fi
2658       ac_cv_prog_CC="cc"
2659       break
2660     fi
2661   done
2662   IFS="$ac_save_ifs"
2663 if test $ac_prog_rejected = yes; then
2664   # We found a bogon in the path, so make sure we never use it.
2665   set dummy $ac_cv_prog_CC
2666   shift
2667   if test $# -gt 0; then
2668     # We chose a different compiler from the bogus one.
2669     # However, it has the same basename, so the bogon will be chosen
2670     # first if we set CC to just the basename; use the full file name.
2671     shift
2672     set dummy "$ac_dir/$ac_word" "$@"
2673     shift
2674     ac_cv_prog_CC="$@"
2675   fi
2676 fi
2677 fi
2678 fi
2679 CC="$ac_cv_prog_CC"
2680 if test -n "$CC"; then
2681   echo "$ac_t""$CC" 1>&6
2682 else
2683   echo "$ac_t""no" 1>&6
2684 fi
2685
2686   if test -z "$CC"; then
2687     case "`uname -s`" in
2688     *win32* | *WIN32* | *CYGWIN*)
2689       # Extract the first word of "cl", so it can be a program name with args.
2690 set dummy cl; ac_word=$2
2691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2692 echo "configure:2693: checking for $ac_word" >&5
2693 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2694   echo $ac_n "(cached) $ac_c" 1>&6
2695 else
2696   if test -n "$CC"; then
2697   ac_cv_prog_CC="$CC" # Let the user override the test.
2698 else
2699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2700   ac_dummy="$PATH"
2701   for ac_dir in $ac_dummy; do
2702     test -z "$ac_dir" && ac_dir=.
2703     if test -f $ac_dir/$ac_word; then
2704       ac_cv_prog_CC="cl"
2705       break
2706     fi
2707   done
2708   IFS="$ac_save_ifs"
2709 fi
2710 fi
2711 CC="$ac_cv_prog_CC"
2712 if test -n "$CC"; then
2713   echo "$ac_t""$CC" 1>&6
2714 else
2715   echo "$ac_t""no" 1>&6
2716 fi
2717  ;;
2718     esac
2719   fi
2720   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2721 fi
2722
2723 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2724 echo "configure:2725: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2725
2726 ac_ext=c
2727 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2728 ac_cpp='$CPP $CPPFLAGS'
2729 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2730 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2731 cross_compiling=$ac_cv_prog_cc_cross
2732
2733 cat > conftest.$ac_ext << EOF
2734
2735 #line 2736 "configure"
2736 #include "confdefs.h"
2737
2738 main(){return(0);}
2739 EOF
2740 if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2741   ac_cv_prog_cc_works=yes
2742   # If we can't run a trivial program, we are probably using a cross compiler.
2743   if (./conftest; exit) 2>/dev/null; then
2744     ac_cv_prog_cc_cross=no
2745   else
2746     ac_cv_prog_cc_cross=yes
2747   fi
2748 else
2749   echo "configure: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751   ac_cv_prog_cc_works=no
2752 fi
2753 rm -fr conftest*
2754 ac_ext=c
2755 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2756 ac_cpp='$CPP $CPPFLAGS'
2757 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2758 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2759 cross_compiling=$ac_cv_prog_cc_cross
2760
2761 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2762 if test $ac_cv_prog_cc_works = no; then
2763   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2764 fi
2765 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2766 echo "configure:2767: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2767 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2768 cross_compiling=$ac_cv_prog_cc_cross
2769
2770 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2771 echo "configure:2772: checking whether we are using GNU C" >&5
2772 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2773   echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775   cat > conftest.c <<EOF
2776 #ifdef __GNUC__
2777   yes;
2778 #endif
2779 EOF
2780 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2781   ac_cv_prog_gcc=yes
2782 else
2783   ac_cv_prog_gcc=no
2784 fi
2785 fi
2786
2787 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2788
2789 if test $ac_cv_prog_gcc = yes; then
2790   GCC=yes
2791 else
2792   GCC=
2793 fi
2794
2795 ac_test_CFLAGS="${CFLAGS+set}"
2796 ac_save_CFLAGS="$CFLAGS"
2797 CFLAGS=
2798 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2799 echo "configure:2800: checking whether ${CC-cc} accepts -g" >&5
2800 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803   echo 'void f(){}' > conftest.c
2804 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2805   ac_cv_prog_cc_g=yes
2806 else
2807   ac_cv_prog_cc_g=no
2808 fi
2809 rm -f conftest*
2810
2811 fi
2812
2813 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2814 if test "$ac_test_CFLAGS" = set; then
2815   CFLAGS="$ac_save_CFLAGS"
2816 elif test $ac_cv_prog_cc_g = yes; then
2817   if test "$GCC" = yes; then
2818     CFLAGS="-g -O2"
2819   else
2820     CFLAGS="-g"
2821   fi
2822 else
2823   if test "$GCC" = yes; then
2824     CFLAGS="-O2"
2825   else
2826     CFLAGS=
2827   fi
2828 fi
2829
2830 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2831 if test "${with_gnu_ld+set}" = set; then
2832   withval="$with_gnu_ld"
2833   test "$withval" = no || with_gnu_ld=yes
2834 else
2835   with_gnu_ld=no
2836 fi
2837
2838 ac_prog=ld
2839 if test "$ac_cv_prog_gcc" = yes; then
2840   # Check if gcc -print-prog-name=ld gives a path.
2841   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2842 echo "configure:2843: checking for ld used by GCC" >&5
2843   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2844   case "$ac_prog" in
2845     # Accept absolute paths.
2846     [\\/]* | [A-Za-z]:[\\/]*)
2847       re_direlt='/[^/][^/]*/\.\./'
2848       # Canonicalize the path of ld
2849       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2850       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2851         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2852       done
2853       test -z "$LD" && LD="$ac_prog"
2854       ;;
2855   "")
2856     # If it fails, then pretend we aren't using GCC.
2857     ac_prog=ld
2858     ;;
2859   *)
2860     # If it is relative, then search for the first ld in PATH.
2861     with_gnu_ld=unknown
2862     ;;
2863   esac
2864 elif test "$with_gnu_ld" = yes; then
2865   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2866 echo "configure:2867: checking for GNU ld" >&5
2867 else
2868   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2869 echo "configure:2870: checking for non-GNU ld" >&5
2870 fi
2871 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2872   echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874   if test -z "$LD"; then
2875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2876   for ac_dir in $PATH; do
2877     test -z "$ac_dir" && ac_dir=.
2878     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2879       ac_cv_path_LD="$ac_dir/$ac_prog"
2880       # Check to see if the program is GNU ld.  I'd rather use --version,
2881       # but apparently some GNU ld's only accept -v.
2882       # Break only if it was the GNU/non-GNU ld that we prefer.
2883       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2884         test "$with_gnu_ld" != no && break
2885       else
2886         test "$with_gnu_ld" != yes && break
2887       fi
2888     fi
2889   done
2890   IFS="$ac_save_ifs"
2891 else
2892   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2893 fi
2894 fi
2895
2896 LD="$ac_cv_path_LD"
2897 if test -n "$LD"; then
2898   echo "$ac_t""$LD" 1>&6
2899 else
2900   echo "$ac_t""no" 1>&6
2901 fi
2902 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2903 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2904 echo "configure:2905: checking if the linker ($LD) is GNU ld" >&5
2905 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2909 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2910   ac_cv_prog_gnu_ld=yes
2911 else
2912   ac_cv_prog_gnu_ld=no
2913 fi
2914 fi
2915
2916 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2917
2918
2919 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2920 echo "configure:2921: checking for BSD-compatible nm" >&5
2921 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2922   echo $ac_n "(cached) $ac_c" 1>&6
2923 else
2924   if test -n "$NM"; then
2925   # Let the user override the test.
2926   ac_cv_path_NM="$NM"
2927 else
2928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2929   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2930     test -z "$ac_dir" && ac_dir=.
2931     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2932       # Check to see if the nm accepts a BSD-compat flag.
2933       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2934       #   nm: unknown option "B" ignored
2935       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2936         ac_cv_path_NM="$ac_dir/nm -B"
2937         break
2938       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2939         ac_cv_path_NM="$ac_dir/nm -p"
2940         break
2941       else
2942         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2943         continue # so that we can try to find one that supports BSD flags
2944       fi
2945     fi
2946   done
2947   IFS="$ac_save_ifs"
2948   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2949 fi
2950 fi
2951
2952 NM="$ac_cv_path_NM"
2953 echo "$ac_t""$NM" 1>&6
2954
2955 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2956 echo "configure:2957: checking whether ln -s works" >&5
2957 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2958   echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960   rm -f conftestdata
2961 if ln -s X conftestdata 2>/dev/null
2962 then
2963   rm -f conftestdata
2964   ac_cv_prog_LN_S="ln -s"
2965 else
2966   ac_cv_prog_LN_S=ln
2967 fi
2968 fi
2969 LN_S="$ac_cv_prog_LN_S"
2970 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2971   echo "$ac_t""yes" 1>&6
2972 else
2973   echo "$ac_t""no" 1>&6
2974 fi
2975
2976 if test $host != $build; then
2977   ac_tool_prefix=${host_alias}-
2978 else
2979   ac_tool_prefix=
2980 fi
2981
2982
2983 case "$target" in
2984 NONE) lt_target="$host" ;;
2985 *) lt_target="$target" ;;
2986 esac
2987
2988 # Check for any special flags to pass to ltconfig.
2989 libtool_flags="--cache-file=$cache_file"
2990 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2991 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2992 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2993 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2994 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2995 libtool_flags="$libtool_flags --enable-dlopen"
2996 libtool_flags="$libtool_flags --enable-win32-dll"
2997 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2998 if test "${enable_libtool_lock+set}" = set; then
2999   enableval="$enable_libtool_lock"
3000   :
3001 fi
3002
3003 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3004 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3005
3006 # Some flags need to be propagated to the compiler or linker for good
3007 # libtool support.
3008 case "$lt_target" in
3009 *-*-irix6*)
3010   # Find out which ABI we are using.
3011   echo '#line 3012 "configure"' > conftest.$ac_ext
3012   if { (eval echo configure:3013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3013     case "`/usr/bin/file conftest.o`" in
3014     *32-bit*)
3015       LD="${LD-ld} -32"
3016       ;;
3017     *N32*)
3018       LD="${LD-ld} -n32"
3019       ;;
3020     *64-bit*)
3021       LD="${LD-ld} -64"
3022       ;;
3023     esac
3024   fi
3025   rm -rf conftest*
3026   ;;
3027
3028 *-*-sco3.2v5*)
3029   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3030   SAVE_CFLAGS="$CFLAGS"
3031   CFLAGS="$CFLAGS -belf"
3032   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3033 echo "configure:3034: checking whether the C compiler needs -belf" >&5
3034 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3035   echo $ac_n "(cached) $ac_c" 1>&6
3036 else
3037   cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3040
3041 int main() {
3042
3043 ; return 0; }
3044 EOF
3045 if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3046   rm -rf conftest*
3047   lt_cv_cc_needs_belf=yes
3048 else
3049   echo "configure: failed program was:" >&5
3050   cat conftest.$ac_ext >&5
3051   rm -rf conftest*
3052   lt_cv_cc_needs_belf=no
3053 fi
3054 rm -f conftest*
3055 fi
3056
3057 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3058   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3059     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3060     CFLAGS="$SAVE_CFLAGS"
3061   fi
3062   ;;
3063
3064 *-*-cygwin* | *-*-mingw*)
3065   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3066 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3068 echo "configure:3069: checking for $ac_word" >&5
3069 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3070   echo $ac_n "(cached) $ac_c" 1>&6
3071 else
3072   if test -n "$DLLTOOL"; then
3073   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3074 else
3075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3076   ac_dummy="$PATH"
3077   for ac_dir in $ac_dummy; do
3078     test -z "$ac_dir" && ac_dir=.
3079     if test -f $ac_dir/$ac_word; then
3080       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3081       break
3082     fi
3083   done
3084   IFS="$ac_save_ifs"
3085 fi
3086 fi
3087 DLLTOOL="$ac_cv_prog_DLLTOOL"
3088 if test -n "$DLLTOOL"; then
3089   echo "$ac_t""$DLLTOOL" 1>&6
3090 else
3091   echo "$ac_t""no" 1>&6
3092 fi
3093
3094
3095 if test -z "$ac_cv_prog_DLLTOOL"; then
3096 if test -n "$ac_tool_prefix"; then
3097   # Extract the first word of "dlltool", so it can be a program name with args.
3098 set dummy dlltool; ac_word=$2
3099 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3100 echo "configure:3101: checking for $ac_word" >&5
3101 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   if test -n "$DLLTOOL"; then
3105   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3106 else
3107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3108   ac_dummy="$PATH"
3109   for ac_dir in $ac_dummy; do
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/$ac_word; then
3112       ac_cv_prog_DLLTOOL="dlltool"
3113       break
3114     fi
3115   done
3116   IFS="$ac_save_ifs"
3117   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3118 fi
3119 fi
3120 DLLTOOL="$ac_cv_prog_DLLTOOL"
3121 if test -n "$DLLTOOL"; then
3122   echo "$ac_t""$DLLTOOL" 1>&6
3123 else
3124   echo "$ac_t""no" 1>&6
3125 fi
3126
3127 else
3128   DLLTOOL="false"
3129 fi
3130 fi
3131
3132   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3133 set dummy ${ac_tool_prefix}as; ac_word=$2
3134 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3135 echo "configure:3136: checking for $ac_word" >&5
3136 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3137   echo $ac_n "(cached) $ac_c" 1>&6
3138 else
3139   if test -n "$AS"; then
3140   ac_cv_prog_AS="$AS" # Let the user override the test.
3141 else
3142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3143   ac_dummy="$PATH"
3144   for ac_dir in $ac_dummy; do
3145     test -z "$ac_dir" && ac_dir=.
3146     if test -f $ac_dir/$ac_word; then
3147       ac_cv_prog_AS="${ac_tool_prefix}as"
3148       break
3149     fi
3150   done
3151   IFS="$ac_save_ifs"
3152 fi
3153 fi
3154 AS="$ac_cv_prog_AS"
3155 if test -n "$AS"; then
3156   echo "$ac_t""$AS" 1>&6
3157 else
3158   echo "$ac_t""no" 1>&6
3159 fi
3160
3161
3162 if test -z "$ac_cv_prog_AS"; then
3163 if test -n "$ac_tool_prefix"; then
3164   # Extract the first word of "as", so it can be a program name with args.
3165 set dummy as; ac_word=$2
3166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3167 echo "configure:3168: checking for $ac_word" >&5
3168 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3169   echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171   if test -n "$AS"; then
3172   ac_cv_prog_AS="$AS" # Let the user override the test.
3173 else
3174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3175   ac_dummy="$PATH"
3176   for ac_dir in $ac_dummy; do
3177     test -z "$ac_dir" && ac_dir=.
3178     if test -f $ac_dir/$ac_word; then
3179       ac_cv_prog_AS="as"
3180       break
3181     fi
3182   done
3183   IFS="$ac_save_ifs"
3184   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3185 fi
3186 fi
3187 AS="$ac_cv_prog_AS"
3188 if test -n "$AS"; then
3189   echo "$ac_t""$AS" 1>&6
3190 else
3191   echo "$ac_t""no" 1>&6
3192 fi
3193
3194 else
3195   AS="false"
3196 fi
3197 fi
3198
3199   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3200 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3201 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3202 echo "configure:3203: checking for $ac_word" >&5
3203 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3204   echo $ac_n "(cached) $ac_c" 1>&6
3205 else
3206   if test -n "$OBJDUMP"; then
3207   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3208 else
3209   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3210   ac_dummy="$PATH"
3211   for ac_dir in $ac_dummy; do
3212     test -z "$ac_dir" && ac_dir=.
3213     if test -f $ac_dir/$ac_word; then
3214       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3215       break
3216     fi
3217   done
3218   IFS="$ac_save_ifs"
3219 fi
3220 fi
3221 OBJDUMP="$ac_cv_prog_OBJDUMP"
3222 if test -n "$OBJDUMP"; then
3223   echo "$ac_t""$OBJDUMP" 1>&6
3224 else
3225   echo "$ac_t""no" 1>&6
3226 fi
3227
3228
3229 if test -z "$ac_cv_prog_OBJDUMP"; then
3230 if test -n "$ac_tool_prefix"; then
3231   # Extract the first word of "objdump", so it can be a program name with args.
3232 set dummy objdump; ac_word=$2
3233 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3234 echo "configure:3235: checking for $ac_word" >&5
3235 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3236   echo $ac_n "(cached) $ac_c" 1>&6
3237 else
3238   if test -n "$OBJDUMP"; then
3239   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3240 else
3241   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3242   ac_dummy="$PATH"
3243   for ac_dir in $ac_dummy; do
3244     test -z "$ac_dir" && ac_dir=.
3245     if test -f $ac_dir/$ac_word; then
3246       ac_cv_prog_OBJDUMP="objdump"
3247       break
3248     fi
3249   done
3250   IFS="$ac_save_ifs"
3251   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3252 fi
3253 fi
3254 OBJDUMP="$ac_cv_prog_OBJDUMP"
3255 if test -n "$OBJDUMP"; then
3256   echo "$ac_t""$OBJDUMP" 1>&6
3257 else
3258   echo "$ac_t""no" 1>&6
3259 fi
3260
3261 else
3262   OBJDUMP="false"
3263 fi
3264 fi
3265
3266   ;;
3267
3268 esac
3269
3270
3271 # Save cache, so that ltconfig can load it
3272
3273
3274 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3275 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3276 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3277 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3278 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3279 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3280 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3281 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3282
3283 # Reload cache, that may have been modified by ltconfig
3284
3285
3286 # This can be used to rebuild libtool when needed
3287 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3288
3289 # Always use our own libtool.
3290 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3291
3292 # Redirect the config.log output again, so that the ltconfig log is not
3293 # clobbered by the next message.
3294 exec 5>>./config.log
3295
3296
3297 for ac_prog in mawk gawk nawk awk
3298 do
3299 # Extract the first word of "$ac_prog", so it can be a program name with args.
3300 set dummy $ac_prog; ac_word=$2
3301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3302 echo "configure:3303: checking for $ac_word" >&5
3303 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3304   echo $ac_n "(cached) $ac_c" 1>&6
3305 else
3306   if test -n "$AWK"; then
3307   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3308 else
3309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3310   ac_dummy="$PATH"
3311   for ac_dir in $ac_dummy; do
3312     test -z "$ac_dir" && ac_dir=.
3313     if test -f $ac_dir/$ac_word; then
3314       ac_cv_prog_AWK="$ac_prog"
3315       break
3316     fi
3317   done
3318   IFS="$ac_save_ifs"
3319 fi
3320 fi
3321 AWK="$ac_cv_prog_AWK"
3322 if test -n "$AWK"; then
3323   echo "$ac_t""$AWK" 1>&6
3324 else
3325   echo "$ac_t""no" 1>&6
3326 fi
3327
3328 test -n "$AWK" && break
3329 done
3330
3331 # test for ln hardlink support
3332 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3333 echo "configure:3334: checking whether ln works" >&5
3334 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   rm -f conftest.src conftest.dst
3338 echo "conftest" > conftest.src
3339 if ln conftest.src conftest.dst 2>/dev/null
3340 then
3341   ol_cv_prog_LN_H="ln"
3342 else
3343   ol_cv_prog_LN_H="cp"
3344 fi
3345 rm -f conftest.src conftest.dst
3346
3347 fi
3348 LN_H="$ol_cv_prog_LN_H"
3349 if test "$ol_cv_prog_LN_H" = "ln"; then
3350         echo "$ac_t""yes" 1>&6
3351 else
3352         echo "$ac_t""no" 1>&6
3353 fi
3354
3355 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3356 echo "configure:3357: checking whether ln -s works" >&5
3357 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3358   echo $ac_n "(cached) $ac_c" 1>&6
3359 else
3360   rm -f conftestdata
3361 if ln -s X conftestdata 2>/dev/null
3362 then
3363   rm -f conftestdata
3364   ac_cv_prog_LN_S="ln -s"
3365 else
3366   ac_cv_prog_LN_S=ln
3367 fi
3368 fi
3369 LN_S="$ac_cv_prog_LN_S"
3370 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3371   echo "$ac_t""yes" 1>&6
3372 else
3373   echo "$ac_t""no" 1>&6
3374 fi
3375
3376
3377 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3378         LN_S="$LN_H"
3379 fi
3380
3381 # Extract the first word of "sendmail", so it can be a program name with args.
3382 set dummy sendmail; ac_word=$2
3383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3384 echo "configure:3385: checking for $ac_word" >&5
3385 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   case "$SENDMAIL" in
3389   /*)
3390   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3391   ;;
3392   ?:/*)
3393   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3394   ;;
3395   *)
3396   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3397   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3398   for ac_dir in $ac_dummy; do 
3399     test -z "$ac_dir" && ac_dir=.
3400     if test -f $ac_dir/$ac_word; then
3401       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3402       break
3403     fi
3404   done
3405   IFS="$ac_save_ifs"
3406   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3407   ;;
3408 esac
3409 fi
3410 SENDMAIL="$ac_cv_path_SENDMAIL"
3411 if test -n "$SENDMAIL"; then
3412   echo "$ac_t""$SENDMAIL" 1>&6
3413 else
3414   echo "$ac_t""no" 1>&6
3415 fi
3416
3417 # Extract the first word of "vi", so it can be a program name with args.
3418 set dummy vi; ac_word=$2
3419 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3420 echo "configure:3421: checking for $ac_word" >&5
3421 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   case "$EDITOR" in
3425   /*)
3426   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3427   ;;
3428   ?:/*)
3429   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3430   ;;
3431   *)
3432   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3433   ac_dummy="$PATH:/usr/ucb"
3434   for ac_dir in $ac_dummy; do 
3435     test -z "$ac_dir" && ac_dir=.
3436     if test -f $ac_dir/$ac_word; then
3437       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3438       break
3439     fi
3440   done
3441   IFS="$ac_save_ifs"
3442   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3443   ;;
3444 esac
3445 fi
3446 EDITOR="$ac_cv_path_EDITOR"
3447 if test -n "$EDITOR"; then
3448   echo "$ac_t""$EDITOR" 1>&6
3449 else
3450   echo "$ac_t""no" 1>&6
3451 fi
3452
3453 # Extract the first word of "finger", so it can be a program name with args.
3454 set dummy finger; ac_word=$2
3455 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3456 echo "configure:3457: checking for $ac_word" >&5
3457 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   case "$FINGER" in
3461   /*)
3462   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3463   ;;
3464   ?:/*)
3465   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3466   ;;
3467   *)
3468   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3469   ac_dummy="$PATH:/usr/ucb"
3470   for ac_dir in $ac_dummy; do 
3471     test -z "$ac_dir" && ac_dir=.
3472     if test -f $ac_dir/$ac_word; then
3473       ac_cv_path_FINGER="$ac_dir/$ac_word"
3474       break
3475     fi
3476   done
3477   IFS="$ac_save_ifs"
3478   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3479   ;;
3480 esac
3481 fi
3482 FINGER="$ac_cv_path_FINGER"
3483 if test -n "$FINGER"; then
3484   echo "$ac_t""$FINGER" 1>&6
3485 else
3486   echo "$ac_t""no" 1>&6
3487 fi
3488
3489
3490 ol_link_perl=no
3491 if test $ol_enable_perl != no ; then
3492         # Extract the first word of "perl", so it can be a program name with args.
3493 set dummy perl; ac_word=$2
3494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3495 echo "configure:3496: checking for $ac_word" >&5
3496 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   case "$PERLBIN" in
3500   /*)
3501   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3502   ;;
3503   ?:/*)
3504   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3505   ;;
3506   *)
3507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3508   ac_dummy="$PATH"
3509   for ac_dir in $ac_dummy; do 
3510     test -z "$ac_dir" && ac_dir=.
3511     if test -f $ac_dir/$ac_word; then
3512       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3513       break
3514     fi
3515   done
3516   IFS="$ac_save_ifs"
3517   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3518   ;;
3519 esac
3520 fi
3521 PERLBIN="$ac_cv_path_PERLBIN"
3522 if test -n "$PERLBIN"; then
3523   echo "$ac_t""$PERLBIN" 1>&6
3524 else
3525   echo "$ac_t""no" 1>&6
3526 fi
3527
3528
3529         if test "no$PERLBIN" = "no" ; then
3530                 if test $ol_enable_perl = yes ; then
3531                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3532                 fi
3533
3534         else
3535                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3536                 if test x"$ol_with_perl_module" = "xstatic" ; then
3537                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3538                 else
3539                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3540                 fi
3541                                 ol_link_perl=yes
3542         fi
3543 fi
3544
3545 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3546 echo "configure:3547: checking how to run the C preprocessor" >&5
3547 # On Suns, sometimes $CPP names a directory.
3548 if test -n "$CPP" && test -d "$CPP"; then
3549   CPP=
3550 fi
3551 if test -z "$CPP"; then
3552 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555     # This must be in double quotes, not single quotes, because CPP may get
3556   # substituted into the Makefile and "${CC-cc}" will confuse make.
3557   CPP="${CC-cc} -E"
3558   # On the NeXT, cc -E runs the code through the compiler's parser,
3559   # not just through cpp.
3560   cat > conftest.$ac_ext <<EOF
3561 #line 3562 "configure"
3562 #include "confdefs.h"
3563 #include <assert.h>
3564 Syntax Error
3565 EOF
3566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3567 { (eval echo configure:3568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3569 if test -z "$ac_err"; then
3570   :
3571 else
3572   echo "$ac_err" >&5
3573   echo "configure: failed program was:" >&5
3574   cat conftest.$ac_ext >&5
3575   rm -rf conftest*
3576   CPP="${CC-cc} -E -traditional-cpp"
3577   cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 #include <assert.h>
3581 Syntax Error
3582 EOF
3583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3584 { (eval echo configure:3585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3586 if test -z "$ac_err"; then
3587   :
3588 else
3589   echo "$ac_err" >&5
3590   echo "configure: failed program was:" >&5
3591   cat conftest.$ac_ext >&5
3592   rm -rf conftest*
3593   CPP="${CC-cc} -nologo -E"
3594   cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597 #include <assert.h>
3598 Syntax Error
3599 EOF
3600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3601 { (eval echo configure:3602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3603 if test -z "$ac_err"; then
3604   :
3605 else
3606   echo "$ac_err" >&5
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   CPP=/lib/cpp
3611 fi
3612 rm -f conftest*
3613 fi
3614 rm -f conftest*
3615 fi
3616 rm -f conftest*
3617   ac_cv_prog_CPP="$CPP"
3618 fi
3619   CPP="$ac_cv_prog_CPP"
3620 else
3621   ac_cv_prog_CPP="$CPP"
3622 fi
3623 echo "$ac_t""$CPP" 1>&6
3624
3625
3626 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3627         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3628
3629 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3630         echo "configure: warning: programs compiled here do run here..." 1>&2
3631         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3632
3633 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3634         echo "configure: warning: programs compiled here do not run here..." 1>&2
3635         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3636 fi
3637
3638 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3639 echo "configure:3640: checking for AIX" >&5
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #ifdef _AIX
3644   yes
3645 #endif
3646
3647 EOF
3648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3649   egrep "yes" >/dev/null 2>&1; then
3650   rm -rf conftest*
3651   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3652 #define _ALL_SOURCE 1
3653 EOF
3654
3655 else
3656   rm -rf conftest*
3657   echo "$ac_t""no" 1>&6
3658 fi
3659 rm -f conftest*
3660
3661
3662 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3663 echo "configure:3664: checking for POSIXized ISC" >&5
3664 if test -d /etc/conf/kconfig.d &&
3665   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3666 then
3667   echo "$ac_t""yes" 1>&6
3668   ISC=yes # If later tests want to check for ISC.
3669   cat >> confdefs.h <<\EOF
3670 #define _POSIX_SOURCE 1
3671 EOF
3672
3673   if test "$GCC" = yes; then
3674     CC="$CC -posix"
3675   else
3676     CC="$CC -Xp"
3677   fi
3678 else
3679   echo "$ac_t""no" 1>&6
3680   ISC=
3681 fi
3682
3683 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3684 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3685 echo "configure:3686: checking for minix/config.h" >&5
3686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3687   echo $ac_n "(cached) $ac_c" 1>&6
3688 else
3689   cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <minix/config.h>
3693 EOF
3694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3695 { (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3697 if test -z "$ac_err"; then
3698   rm -rf conftest*
3699   eval "ac_cv_header_$ac_safe=yes"
3700 else
3701   echo "$ac_err" >&5
3702   echo "configure: failed program was:" >&5
3703   cat conftest.$ac_ext >&5
3704   rm -rf conftest*
3705   eval "ac_cv_header_$ac_safe=no"
3706 fi
3707 rm -f conftest*
3708 fi
3709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3710   echo "$ac_t""yes" 1>&6
3711   MINIX=yes
3712 else
3713   echo "$ac_t""no" 1>&6
3714 MINIX=
3715 fi
3716
3717 if test "$MINIX" = yes; then
3718   cat >> confdefs.h <<\EOF
3719 #define _POSIX_SOURCE 1
3720 EOF
3721
3722   cat >> confdefs.h <<\EOF
3723 #define _POSIX_1_SOURCE 2
3724 EOF
3725
3726   cat >> confdefs.h <<\EOF
3727 #define _MINIX 1
3728 EOF
3729
3730 fi
3731
3732
3733 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3734 echo "configure:3735: checking for Cygwin environment" >&5
3735 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3736   echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738   cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741
3742 int main() {
3743
3744 #ifndef __CYGWIN__
3745 #define __CYGWIN__ __CYGWIN32__
3746 #endif
3747 return __CYGWIN__;
3748 ; return 0; }
3749 EOF
3750 if { (eval echo configure:3751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3751   rm -rf conftest*
3752   ac_cv_cygwin=yes
3753 else
3754   echo "configure: failed program was:" >&5
3755   cat conftest.$ac_ext >&5
3756   rm -rf conftest*
3757   ac_cv_cygwin=no
3758 fi
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ac_cv_cygwin" 1>&6
3763 CYGWIN=
3764 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3765 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3766 echo "configure:3767: checking for mingw32 environment" >&5
3767 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773
3774 int main() {
3775 return __MINGW32__;
3776 ; return 0; }
3777 EOF
3778 if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3779   rm -rf conftest*
3780   ac_cv_mingw32=yes
3781 else
3782   echo "configure: failed program was:" >&5
3783   cat conftest.$ac_ext >&5
3784   rm -rf conftest*
3785   ac_cv_mingw32=no
3786 fi
3787 rm -f conftest*
3788 fi
3789
3790 echo "$ac_t""$ac_cv_mingw32" 1>&6
3791 MINGW32=
3792 test "$ac_cv_mingw32" = yes && MINGW32=yes
3793 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3794 echo "configure:3795: checking for EMX OS/2 environment" >&5
3795 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801
3802 int main() {
3803 return __EMX__;
3804 ; return 0; }
3805 EOF
3806 if { (eval echo configure:3807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3807   rm -rf conftest*
3808   ac_cv_emxos2=yes
3809 else
3810   echo "configure: failed program was:" >&5
3811   cat conftest.$ac_ext >&5
3812   rm -rf conftest*
3813   ac_cv_emxos2=no
3814 fi
3815 rm -f conftest*
3816 fi
3817
3818 echo "$ac_t""$ac_cv_emxos2" 1>&6
3819 EMXOS2=
3820 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3821
3822
3823
3824 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3825 echo "configure:3826: checking for executable suffix" >&5
3826 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3827   echo $ac_n "(cached) $ac_c" 1>&6
3828 else
3829   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3830   ac_cv_exeext=.exe
3831 else
3832   rm -f conftest*
3833   echo 'int main () { return 0; }' > conftest.$ac_ext
3834   ac_cv_exeext=
3835   if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3836     for file in conftest.*; do
3837       case $file in
3838       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3839       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3840       esac
3841     done
3842   else
3843     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3844   fi
3845   rm -f conftest*
3846   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3847 fi
3848 fi
3849
3850 EXEEXT=""
3851 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3852 echo "$ac_t""${ac_cv_exeext}" 1>&6
3853 ac_exeext=$EXEEXT
3854
3855 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3856 echo "configure:3857: checking for object suffix" >&5
3857 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3858   echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860   rm -f conftest*
3861 echo 'int i = 1;' > conftest.$ac_ext
3862 if { (eval echo configure:3863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3863   for ac_file in conftest.*; do
3864     case $ac_file in
3865     *.c) ;;
3866     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3867     esac
3868   done
3869 else
3870   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3871 fi
3872 rm -f conftest*
3873 fi
3874
3875 echo "$ac_t""$ac_cv_objext" 1>&6
3876 OBJEXT=$ac_cv_objext
3877 ac_objext=$ac_cv_objext
3878
3879
3880 cat >> confdefs.h <<EOF
3881 #define EXEEXT "${EXEEXT}"
3882 EOF
3883
3884
3885 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3886 echo "configure:3887: checking for be_app in -lbe" >&5
3887 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3889   echo $ac_n "(cached) $ac_c" 1>&6
3890 else
3891   ac_save_LIBS="$LIBS"
3892 LIBS="-lbe -lroot -lnet $LIBS"
3893 cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896 /* Override any gcc2 internal prototype to avoid an error.  */
3897 /* We use char because int might match the return type of a gcc2
3898     builtin and then its argument prototype would still apply.  */
3899 char be_app();
3900
3901 int main() {
3902 be_app()
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3906   rm -rf conftest*
3907   eval "ac_cv_lib_$ac_lib_var=yes"
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   eval "ac_cv_lib_$ac_lib_var=no"
3913 fi
3914 rm -f conftest*
3915 LIBS="$ac_save_LIBS"
3916
3917 fi
3918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3919   echo "$ac_t""yes" 1>&6
3920   LIBS="$LIBS -lbe -lroot -lnet"
3921 else
3922   echo "$ac_t""no" 1>&6
3923 :
3924 fi
3925
3926
3927
3928
3929
3930 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3931 echo "configure:3932: checking for ${CC-cc} option to accept ANSI C" >&5
3932 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3933   echo $ac_n "(cached) $ac_c" 1>&6
3934 else
3935   am_cv_prog_cc_stdc=no
3936 ac_save_CC="$CC"
3937 # Don't try gcc -ansi; that turns off useful extensions and
3938 # breaks some systems' header files.
3939 # AIX                   -qlanglvl=ansi
3940 # Ultrix and OSF/1      -std1
3941 # HP-UX 10.20 and later -Ae
3942 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3943 # SVR4                  -Xc -D__EXTENSIONS__
3944 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3945 do
3946   CC="$ac_save_CC $ac_arg"
3947   cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950 #include <stdarg.h>
3951 #include <stdio.h>
3952 #include <sys/types.h>
3953 #include <sys/stat.h>
3954 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3955 struct buf { int x; };
3956 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3957 static char *e (p, i)
3958      char **p;
3959      int i;
3960 {
3961   return p[i];
3962 }
3963 static char *f (char * (*g) (char **, int), char **p, ...)
3964 {
3965   char *s;
3966   va_list v;
3967   va_start (v,p);
3968   s = g (p, va_arg (v,int));
3969   va_end (v);
3970   return s;
3971 }
3972 int test (int i, double x);
3973 struct s1 {int (*f) (int a);};
3974 struct s2 {int (*f) (double a);};
3975 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3976 int argc;
3977 char **argv;
3978
3979 int main() {
3980
3981 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3982
3983 ; return 0; }
3984 EOF
3985 if { (eval echo configure:3986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3986   rm -rf conftest*
3987   am_cv_prog_cc_stdc="$ac_arg"; break
3988 else
3989   echo "configure: failed program was:" >&5
3990   cat conftest.$ac_ext >&5
3991 fi
3992 rm -f conftest*
3993 done
3994 CC="$ac_save_CC"
3995
3996 fi
3997
3998 if test -z "$am_cv_prog_cc_stdc"; then
3999   echo "$ac_t""none needed" 1>&6
4000 else
4001   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4002 fi
4003 case "x$am_cv_prog_cc_stdc" in
4004   x|xno) ;;
4005   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4006 esac
4007
4008 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4009         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4010 fi
4011
4012 # test for make depend flag
4013 OL_MKDEP=
4014 OL_MKDEP_FLAGS=
4015 if test -z "${MKDEP}"; then
4016         OL_MKDEP="${CC-cc}"
4017         if test -z "${MKDEP_FLAGS}"; then
4018                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4019 echo "configure:4020: checking for ${OL_MKDEP} depend flag" >&5
4020 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4021   echo $ac_n "(cached) $ac_c" 1>&6
4022 else
4023   
4024                         ol_cv_mkdep=no
4025                         for flag in "-M" "-xM"; do
4026                                 cat > conftest.c <<EOF
4027  noCode;
4028 EOF
4029                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4030                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4031                                 then
4032                                         if test ! -f conftest."${ac_object}" ; then
4033                                                 ol_cv_mkdep=$flag
4034                                                 OL_MKDEP_FLAGS="$flag"
4035                                                 break
4036                                         fi
4037                                 fi
4038                         done
4039                         rm -f conftest*
4040                 
4041 fi
4042
4043 echo "$ac_t""$ol_cv_mkdep" 1>&6
4044         else
4045                 cc_cv_mkdep=yes
4046                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4047         fi
4048 else
4049         cc_cv_mkdep=yes
4050         OL_MKDEP="${MKDEP}"
4051         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4052 fi
4053
4054
4055
4056 if test "${ol_cv_mkdep}" = no ; then
4057         # this will soon become an error
4058         echo "configure: warning: do not know how to generate dependencies" 1>&2
4059 fi
4060
4061 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4062 echo "configure:4063: checking for afopen in -ls" >&5
4063 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4065   echo $ac_n "(cached) $ac_c" 1>&6
4066 else
4067   ac_save_LIBS="$LIBS"
4068 LIBS="-ls  $LIBS"
4069 cat > conftest.$ac_ext <<EOF
4070 #line 4071 "configure"
4071 #include "confdefs.h"
4072 /* Override any gcc2 internal prototype to avoid an error.  */
4073 /* We use char because int might match the return type of a gcc2
4074     builtin and then its argument prototype would still apply.  */
4075 char afopen();
4076
4077 int main() {
4078 afopen()
4079 ; return 0; }
4080 EOF
4081 if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4082   rm -rf conftest*
4083   eval "ac_cv_lib_$ac_lib_var=yes"
4084 else
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   eval "ac_cv_lib_$ac_lib_var=no"
4089 fi
4090 rm -f conftest*
4091 LIBS="$ac_save_LIBS"
4092
4093 fi
4094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4095   echo "$ac_t""yes" 1>&6
4096   
4097         AUTH_LIBS=-ls
4098         cat >> confdefs.h <<\EOF
4099 #define HAVE_AIX_SECURITY 1
4100 EOF
4101
4102
4103 else
4104   echo "$ac_t""no" 1>&6
4105 fi
4106
4107
4108
4109 for ac_func in getaddrinfo 
4110 do
4111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4112 echo "configure:4113: checking for $ac_func" >&5
4113 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4114   echo $ac_n "(cached) $ac_c" 1>&6
4115 else
4116   cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 /* System header to define __stub macros and hopefully few prototypes,
4120     which can conflict with char $ac_func(); below.  */
4121 #include <assert.h>
4122 /* Override any gcc2 internal prototype to avoid an error.  */
4123 /* We use char because int might match the return type of a gcc2
4124     builtin and then its argument prototype would still apply.  */
4125 char $ac_func();
4126 char (*f)();
4127
4128 int main() {
4129
4130 /* The GNU C library defines this for functions which it implements
4131     to always fail with ENOSYS.  Some functions are actually named
4132     something starting with __ and the normal name is an alias.  */
4133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4134 choke me
4135 #else
4136 f = $ac_func;
4137 #endif
4138
4139 ; return 0; }
4140 EOF
4141 if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4142   rm -rf conftest*
4143   eval "ac_cv_func_$ac_func=yes"
4144 else
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147   rm -rf conftest*
4148   eval "ac_cv_func_$ac_func=no"
4149 fi
4150 rm -f conftest*
4151 fi
4152
4153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4154   echo "$ac_t""yes" 1>&6
4155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4156   cat >> confdefs.h <<EOF
4157 #define $ac_tr_func 1
4158 EOF
4159  
4160 else
4161   echo "$ac_t""no" 1>&6
4162 fi
4163 done
4164
4165
4166 if test $ac_cv_func_getaddrinfo = no ; then
4167         if test $ol_enable_ipv6 = yes ; then
4168                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4169         fi
4170         ol_enable_ipv6=no
4171 fi
4172
4173 if test $ol_enable_local != no ; then
4174         for ac_hdr in sys/un.h 
4175 do
4176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4178 echo "configure:4179: checking for $ac_hdr" >&5
4179 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 #include <$ac_hdr>
4186 EOF
4187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4188 { (eval echo configure:4189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4190 if test -z "$ac_err"; then
4191   rm -rf conftest*
4192   eval "ac_cv_header_$ac_safe=yes"
4193 else
4194   echo "$ac_err" >&5
4195   echo "configure: failed program was:" >&5
4196   cat conftest.$ac_ext >&5
4197   rm -rf conftest*
4198   eval "ac_cv_header_$ac_safe=no"
4199 fi
4200 rm -f conftest*
4201 fi
4202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4203   echo "$ac_t""yes" 1>&6
4204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4205   cat >> confdefs.h <<EOF
4206 #define $ac_tr_hdr 1
4207 EOF
4208  
4209 else
4210   echo "$ac_t""no" 1>&6
4211 fi
4212 done
4213
4214
4215         if test $ol_enable_local = auto ; then
4216                 ol_enable_local=$ac_cv_header_sys_un_h
4217         elif test $ac_cv_header_sys_un_h = no ; then
4218                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
4219         fi
4220 fi
4221
4222 ol_link_modules=no
4223 if test $ol_enable_modules != no ; then
4224         for ac_hdr in ltdl.h
4225 do
4226 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4227 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4228 echo "configure:4229: checking for $ac_hdr" >&5
4229 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4230   echo $ac_n "(cached) $ac_c" 1>&6
4231 else
4232   cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4235 #include <$ac_hdr>
4236 EOF
4237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4238 { (eval echo configure:4239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4240 if test -z "$ac_err"; then
4241   rm -rf conftest*
4242   eval "ac_cv_header_$ac_safe=yes"
4243 else
4244   echo "$ac_err" >&5
4245   echo "configure: failed program was:" >&5
4246   cat conftest.$ac_ext >&5
4247   rm -rf conftest*
4248   eval "ac_cv_header_$ac_safe=no"
4249 fi
4250 rm -f conftest*
4251 fi
4252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4253   echo "$ac_t""yes" 1>&6
4254     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4255   cat >> confdefs.h <<EOF
4256 #define $ac_tr_hdr 1
4257 EOF
4258  
4259 else
4260   echo "$ac_t""no" 1>&6
4261 fi
4262 done
4263
4264
4265         if test $ac_cv_header_ltdl_h = no ; then
4266                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4267         fi
4268
4269         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4270 echo "configure:4271: checking for lt_dlinit in -lltdl" >&5
4271 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4273   echo $ac_n "(cached) $ac_c" 1>&6
4274 else
4275   ac_save_LIBS="$LIBS"
4276 LIBS="-lltdl  $LIBS"
4277 cat > conftest.$ac_ext <<EOF
4278 #line 4279 "configure"
4279 #include "confdefs.h"
4280 /* Override any gcc2 internal prototype to avoid an error.  */
4281 /* We use char because int might match the return type of a gcc2
4282     builtin and then its argument prototype would still apply.  */
4283 char lt_dlinit();
4284
4285 int main() {
4286 lt_dlinit()
4287 ; return 0; }
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4290   rm -rf conftest*
4291   eval "ac_cv_lib_$ac_lib_var=yes"
4292 else
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_lib_$ac_lib_var=no"
4297 fi
4298 rm -f conftest*
4299 LIBS="$ac_save_LIBS"
4300
4301 fi
4302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4303   echo "$ac_t""yes" 1>&6
4304   
4305             MODULES_LIBS=-lltdl
4306             cat >> confdefs.h <<\EOF
4307 #define HAVE_LIBLTDL 1
4308 EOF
4309
4310         
4311 else
4312   echo "$ac_t""no" 1>&6
4313 fi
4314
4315
4316         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4317                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4318         fi
4319         ol_link_modules=yes
4320 else
4321         ol_with_dnssrv_module=static
4322         ol_with_ldap_module=static
4323         ol_with_ldbm_module=static
4324         ol_with_passwd_module=static
4325         ol_with_perl_module=static
4326         ol_with_shell_module=static
4327         ol_with_tcl_module=static
4328         ol_with_sql_module=static
4329 fi
4330
4331 # test for EBCDIC
4332 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4333 echo "configure:4334: checking for EBCDIC" >&5
4334 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4335   echo $ac_n "(cached) $ac_c" 1>&6
4336 else
4337   
4338         cat > conftest.$ac_ext <<EOF
4339 #line 4340 "configure"
4340 #include "confdefs.h"
4341
4342 #if !('M' == 0xd4)
4343 #include <__ASCII__/generate_error.h>
4344 #endif
4345
4346 EOF
4347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4348 { (eval echo configure:4349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4350 if test -z "$ac_err"; then
4351   rm -rf conftest*
4352   ol_cv_cpp_ebcdic=yes
4353 else
4354   echo "$ac_err" >&5
4355   echo "configure: failed program was:" >&5
4356   cat conftest.$ac_ext >&5
4357   rm -rf conftest*
4358   ol_cv_cpp_ebcdic=no
4359 fi
4360 rm -f conftest*
4361 fi
4362
4363 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4364 if test $ol_cv_cpp_ebcdic = yes ; then
4365         cat >> confdefs.h <<\EOF
4366 #define HAVE_EBCDIC 1
4367 EOF
4368
4369 fi
4370
4371 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4372 echo "configure:4373: checking for ANSI C header files" >&5
4373 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4374   echo $ac_n "(cached) $ac_c" 1>&6
4375 else
4376   cat > conftest.$ac_ext <<EOF
4377 #line 4378 "configure"
4378 #include "confdefs.h"
4379 #include <stdlib.h>
4380 #include <stdarg.h>
4381 #include <string.h>
4382 #include <float.h>
4383 EOF
4384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4385 { (eval echo configure:4386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4387 if test -z "$ac_err"; then
4388   rm -rf conftest*
4389   ol_cv_header_stdc=yes
4390 else
4391   echo "$ac_err" >&5
4392   echo "configure: failed program was:" >&5
4393   cat conftest.$ac_ext >&5
4394   rm -rf conftest*
4395   ol_cv_header_stdc=no
4396 fi
4397 rm -f conftest*
4398
4399 if test $ol_cv_header_stdc = yes; then
4400   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 #include <string.h>
4405 EOF
4406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4407   egrep "memchr" >/dev/null 2>&1; then
4408   :
4409 else
4410   rm -rf conftest*
4411   ol_cv_header_stdc=no
4412 fi
4413 rm -f conftest*
4414
4415 fi
4416
4417 if test $ol_cv_header_stdc = yes; then
4418   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4419 cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422 #include <stdlib.h>
4423 EOF
4424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4425   egrep "free" >/dev/null 2>&1; then
4426   :
4427 else
4428   rm -rf conftest*
4429   ol_cv_header_stdc=no
4430 fi
4431 rm -f conftest*
4432
4433 fi
4434
4435 if test $ol_cv_header_stdc = yes; then
4436   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4437 if test "$cross_compiling" = yes; then
4438   :
4439 else
4440   cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443 #include <ctype.h>
4444 #ifndef HAVE_EBCDIC
4445 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4446 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4447 #else
4448 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4449                 || ('j' <= (c) && (c) <= 'r') \
4450                 || ('s' <= (c) && (c) <= 'z'))
4451 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4452 #endif
4453 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4454 int main () { int i; for (i = 0; i < 256; i++)
4455 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4456 exit (0); }
4457
4458 EOF
4459 if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4460 then
4461   :
4462 else
4463   echo "configure: failed program was:" >&5
4464   cat conftest.$ac_ext >&5
4465   rm -fr conftest*
4466   ol_cv_header_stdc=no
4467 fi
4468 rm -fr conftest*
4469 fi
4470
4471 fi
4472 fi
4473
4474 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4475 if test $ol_cv_header_stdc = yes; then
4476   cat >> confdefs.h <<\EOF
4477 #define STDC_HEADERS 1
4478 EOF
4479
4480 fi
4481 ac_cv_header_stdc=disable
4482
4483
4484 if test $ol_cv_header_stdc != yes; then
4485         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4486 fi
4487
4488 ac_header_dirent=no
4489 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4490 do
4491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4492 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4493 echo "configure:4494: checking for $ac_hdr that defines DIR" >&5
4494 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4495   echo $ac_n "(cached) $ac_c" 1>&6
4496 else
4497   cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 #include <sys/types.h>
4501 #include <$ac_hdr>
4502 int main() {
4503 DIR *dirp = 0;
4504 ; return 0; }
4505 EOF
4506 if { (eval echo configure:4507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4507   rm -rf conftest*
4508   eval "ac_cv_header_dirent_$ac_safe=yes"
4509 else
4510   echo "configure: failed program was:" >&5
4511   cat conftest.$ac_ext >&5
4512   rm -rf conftest*
4513   eval "ac_cv_header_dirent_$ac_safe=no"
4514 fi
4515 rm -f conftest*
4516 fi
4517 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4518   echo "$ac_t""yes" 1>&6
4519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4520   cat >> confdefs.h <<EOF
4521 #define $ac_tr_hdr 1
4522 EOF
4523  ac_header_dirent=$ac_hdr; break
4524 else
4525   echo "$ac_t""no" 1>&6
4526 fi
4527 done
4528 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4529 if test $ac_header_dirent = dirent.h; then
4530 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4531 echo "configure:4532: checking for opendir in -ldir" >&5
4532 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4533 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4534   echo $ac_n "(cached) $ac_c" 1>&6
4535 else
4536   ac_save_LIBS="$LIBS"
4537 LIBS="-ldir  $LIBS"
4538 cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 /* Override any gcc2 internal prototype to avoid an error.  */
4542 /* We use char because int might match the return type of a gcc2
4543     builtin and then its argument prototype would still apply.  */
4544 char opendir();
4545
4546 int main() {
4547 opendir()
4548 ; return 0; }
4549 EOF
4550 if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4551   rm -rf conftest*
4552   eval "ac_cv_lib_$ac_lib_var=yes"
4553 else
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   eval "ac_cv_lib_$ac_lib_var=no"
4558 fi
4559 rm -f conftest*
4560 LIBS="$ac_save_LIBS"
4561
4562 fi
4563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4564   echo "$ac_t""yes" 1>&6
4565   LIBS="$LIBS -ldir"
4566 else
4567   echo "$ac_t""no" 1>&6
4568 fi
4569
4570 else
4571 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4572 echo "configure:4573: checking for opendir in -lx" >&5
4573 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4574 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4575   echo $ac_n "(cached) $ac_c" 1>&6
4576 else
4577   ac_save_LIBS="$LIBS"
4578 LIBS="-lx  $LIBS"
4579 cat > conftest.$ac_ext <<EOF
4580 #line 4581 "configure"
4581 #include "confdefs.h"
4582 /* Override any gcc2 internal prototype to avoid an error.  */
4583 /* We use char because int might match the return type of a gcc2
4584     builtin and then its argument prototype would still apply.  */
4585 char opendir();
4586
4587 int main() {
4588 opendir()
4589 ; return 0; }
4590 EOF
4591 if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4592   rm -rf conftest*
4593   eval "ac_cv_lib_$ac_lib_var=yes"
4594 else
4595   echo "configure: failed program was:" >&5
4596   cat conftest.$ac_ext >&5
4597   rm -rf conftest*
4598   eval "ac_cv_lib_$ac_lib_var=no"
4599 fi
4600 rm -f conftest*
4601 LIBS="$ac_save_LIBS"
4602
4603 fi
4604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4605   echo "$ac_t""yes" 1>&6
4606   LIBS="$LIBS -lx"
4607 else
4608   echo "$ac_t""no" 1>&6
4609 fi
4610
4611 fi
4612
4613 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4614 echo "configure:4615: checking for sys/wait.h that is POSIX.1 compatible" >&5
4615 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4616   echo $ac_n "(cached) $ac_c" 1>&6
4617 else
4618   cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621 #include <sys/types.h>
4622 #include <sys/wait.h>
4623 #ifndef WEXITSTATUS
4624 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4625 #endif
4626 #ifndef WIFEXITED
4627 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4628 #endif
4629 int main() {
4630 int s;
4631 wait (&s);
4632 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4633 ; return 0; }
4634 EOF
4635 if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4636   rm -rf conftest*
4637   ac_cv_header_sys_wait_h=yes
4638 else
4639   echo "configure: failed program was:" >&5
4640   cat conftest.$ac_ext >&5
4641   rm -rf conftest*
4642   ac_cv_header_sys_wait_h=no
4643 fi
4644 rm -f conftest*
4645 fi
4646
4647 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4648 if test $ac_cv_header_sys_wait_h = yes; then
4649   cat >> confdefs.h <<\EOF
4650 #define HAVE_SYS_WAIT_H 1
4651 EOF
4652
4653 fi
4654
4655 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4656 echo "configure:4657: checking POSIX termios" >&5
4657 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4658   echo $ac_n "(cached) $ac_c" 1>&6
4659 else
4660   cat > conftest.$ac_ext <<EOF
4661 #line 4662 "configure"
4662 #include "confdefs.h"
4663 #include <sys/types.h>
4664 #include <unistd.h>
4665 #include <termios.h>
4666 int main() {
4667 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4668    tcgetattr(0, 0);
4669 ; return 0; }
4670 EOF
4671 if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4672   rm -rf conftest*
4673   am_cv_sys_posix_termios=yes
4674 else
4675   echo "configure: failed program was:" >&5
4676   cat conftest.$ac_ext >&5
4677   rm -rf conftest*
4678   am_cv_sys_posix_termios=no
4679 fi
4680 rm -f conftest*
4681 fi
4682
4683 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4684
4685
4686  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4687 echo "configure:4688: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4688 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4692
4693   gwinsz_in_termios_h=no
4694   if test $am_cv_sys_posix_termios = yes; then
4695     cat > conftest.$ac_ext <<EOF
4696 #line 4697 "configure"
4697 #include "confdefs.h"
4698 #include <sys/types.h>
4699 #     include <termios.h>
4700 #     ifdef TIOCGWINSZ
4701         yes
4702 #     endif
4703     
4704 EOF
4705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4706   egrep "yes" >/dev/null 2>&1; then
4707   rm -rf conftest*
4708   gwinsz_in_termios_h=yes
4709 fi
4710 rm -f conftest*
4711
4712   fi
4713
4714   if test $gwinsz_in_termios_h = no; then
4715     cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 #include <sys/types.h>
4719 #     include <sys/ioctl.h>
4720 #     ifdef TIOCGWINSZ
4721         yes
4722 #     endif
4723     
4724 EOF
4725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4726   egrep "yes" >/dev/null 2>&1; then
4727   rm -rf conftest*
4728   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4729 fi
4730 rm -f conftest*
4731
4732   fi
4733   
4734 fi
4735
4736 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4737   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4738     cat >> confdefs.h <<\EOF
4739 #define GWINSZ_IN_SYS_IOCTL 1
4740 EOF
4741
4742   fi
4743
4744 if test $am_cv_sys_posix_termios = yes ; then
4745         cat >> confdefs.h <<\EOF
4746 #define HAVE_POSIX_TERMIOS 1
4747 EOF
4748
4749 fi
4750
4751 for ac_hdr in \
4752         arpa/inet.h             \
4753         arpa/nameser.h  \
4754         assert.h                \
4755         conio.h                 \
4756         crypt.h                 \
4757         direct.h                \
4758         errno.h                 \
4759         fcntl.h                 \
4760         filio.h                 \
4761         getopt.h                \
4762         grp.h                   \
4763         io.h                    \
4764         libutil.h               \
4765         limits.h                \
4766         locale.h                \
4767         netinet/tcp.h   \
4768         malloc.h                \
4769         memory.h                \
4770         psap.h                  \
4771         pwd.h                   \
4772         process.h               \
4773         resolv.h                \
4774         sgtty.h                 \
4775         shadow.h                \
4776         stddef.h                \
4777         string.h                \
4778         strings.h               \
4779         sysexits.h              \
4780         sys/file.h              \
4781         sys/filio.h             \
4782         sys/errno.h             \
4783         sys/ioctl.h             \
4784         sys/param.h             \
4785         sys/resource.h  \
4786         sys/select.h    \
4787         sys/socket.h    \
4788         sys/syslog.h    \
4789         sys/time.h              \
4790         sys/types.h             \
4791         syslog.h                \
4792         termios.h               \
4793         unistd.h                \
4794         winsock.h               \
4795
4796 do
4797 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4798 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4799 echo "configure:4800: checking for $ac_hdr" >&5
4800 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   cat > conftest.$ac_ext <<EOF
4804 #line 4805 "configure"
4805 #include "confdefs.h"
4806 #include <$ac_hdr>
4807 EOF
4808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4809 { (eval echo configure:4810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4811 if test -z "$ac_err"; then
4812   rm -rf conftest*
4813   eval "ac_cv_header_$ac_safe=yes"
4814 else
4815   echo "$ac_err" >&5
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818   rm -rf conftest*
4819   eval "ac_cv_header_$ac_safe=no"
4820 fi
4821 rm -f conftest*
4822 fi
4823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4824   echo "$ac_t""yes" 1>&6
4825     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4826   cat >> confdefs.h <<EOF
4827 #define $ac_tr_hdr 1
4828 EOF
4829  
4830 else
4831   echo "$ac_t""no" 1>&6
4832 fi
4833 done
4834
4835
4836
4837
4838 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4839 echo "configure:4840: checking for sigset in -lV3" >&5
4840 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4841 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4842   echo $ac_n "(cached) $ac_c" 1>&6
4843 else
4844   ac_save_LIBS="$LIBS"
4845 LIBS="-lV3  $LIBS"
4846 cat > conftest.$ac_ext <<EOF
4847 #line 4848 "configure"
4848 #include "confdefs.h"
4849 /* Override any gcc2 internal prototype to avoid an error.  */
4850 /* We use char because int might match the return type of a gcc2
4851     builtin and then its argument prototype would still apply.  */
4852 char sigset();
4853
4854 int main() {
4855 sigset()
4856 ; return 0; }
4857 EOF
4858 if { (eval echo configure:4859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4859   rm -rf conftest*
4860   eval "ac_cv_lib_$ac_lib_var=yes"
4861 else
4862   echo "configure: failed program was:" >&5
4863   cat conftest.$ac_ext >&5
4864   rm -rf conftest*
4865   eval "ac_cv_lib_$ac_lib_var=no"
4866 fi
4867 rm -f conftest*
4868 LIBS="$ac_save_LIBS"
4869
4870 fi
4871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4872   echo "$ac_t""yes" 1>&6
4873     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4874     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4875   cat >> confdefs.h <<EOF
4876 #define $ac_tr_lib 1
4877 EOF
4878
4879   LIBS="-lV3 $LIBS"
4880
4881 else
4882   echo "$ac_t""no" 1>&6
4883 fi
4884
4885
4886 if test $ac_cv_header_winsock_h = yes; then
4887         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4888 echo "configure:4889: checking for winsock" >&5
4889 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4890   echo $ac_n "(cached) $ac_c" 1>&6
4891 else
4892   cat > conftest.$ac_ext <<EOF
4893 #line 4894 "configure"
4894 #include "confdefs.h"
4895 #include <winsock.h>
4896 int main() {
4897
4898                         socket(0,0,0);
4899                         select(0,NULL,NULL,NULL,NULL);
4900                         closesocket(0);
4901                         gethostname(NULL,0);
4902         
4903 ; return 0; }
4904 EOF
4905 if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4906   rm -rf conftest*
4907   ol_cv_winsock=yes
4908 else
4909   echo "configure: failed program was:" >&5
4910   cat conftest.$ac_ext >&5
4911   rm -rf conftest*
4912   ol_cv_winsock=no
4913 fi
4914 rm -f conftest*]
4915 fi
4916
4917 echo "$ac_t""$ol_cv_winsock" 1>&6
4918
4919         if test $ol_cv_winsock = yes ; then
4920                 cat >> confdefs.h <<\EOF
4921 #define HAVE_WINSOCK 1
4922 EOF
4923
4924                 ac_cv_func_socket=yes
4925                 ac_cv_func_select=yes
4926                 ac_cv_func_closesocket=yes
4927                 ac_cv_func_gethostname=yes
4928         fi
4929 fi
4930
4931
4932 echo $ac_n "checking for socket""... $ac_c" 1>&6
4933 echo "configure:4934: checking for socket" >&5
4934 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4935   echo $ac_n "(cached) $ac_c" 1>&6
4936 else
4937   cat > conftest.$ac_ext <<EOF
4938 #line 4939 "configure"
4939 #include "confdefs.h"
4940 /* System header to define __stub macros and hopefully few prototypes,
4941     which can conflict with char socket(); below.  */
4942 #include <assert.h>
4943 /* Override any gcc2 internal prototype to avoid an error.  */
4944 /* We use char because int might match the return type of a gcc2
4945     builtin and then its argument prototype would still apply.  */
4946 char socket();
4947 char (*f)();
4948
4949 int main() {
4950
4951 /* The GNU C library defines this for functions which it implements
4952     to always fail with ENOSYS.  Some functions are actually named
4953     something starting with __ and the normal name is an alias.  */
4954 #if defined (__stub_socket) || defined (__stub___socket)
4955 choke me
4956 #else
4957 f = socket;
4958 #endif
4959
4960 ; return 0; }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4963   rm -rf conftest*
4964   eval "ac_cv_func_socket=yes"
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -rf conftest*
4969   eval "ac_cv_func_socket=no"
4970 fi
4971 rm -f conftest*
4972 fi
4973
4974 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4975   echo "$ac_t""yes" 1>&6
4976   :
4977 else
4978   echo "$ac_t""no" 1>&6
4979         
4980         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4981 echo "configure:4982: checking for main in -lsocket" >&5
4982 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4984   echo $ac_n "(cached) $ac_c" 1>&6
4985 else
4986   ac_save_LIBS="$LIBS"
4987 LIBS="-lsocket  $LIBS"
4988 cat > conftest.$ac_ext <<EOF
4989 #line 4990 "configure"
4990 #include "confdefs.h"
4991
4992 int main() {
4993 main()
4994 ; return 0; }
4995 EOF
4996 if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4997   rm -rf conftest*
4998   eval "ac_cv_lib_$ac_lib_var=yes"
4999 else
5000   echo "configure: failed program was:" >&5
5001   cat conftest.$ac_ext >&5
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=no"
5004 fi
5005 rm -f conftest*
5006 LIBS="$ac_save_LIBS"
5007
5008 fi
5009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5010   echo "$ac_t""yes" 1>&6
5011     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5012     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5013   cat >> confdefs.h <<EOF
5014 #define $ac_tr_lib 1
5015 EOF
5016
5017   LIBS="-lsocket $LIBS"
5018
5019 else
5020   echo "$ac_t""no" 1>&6
5021 fi
5022
5023         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5024 echo "configure:5025: checking for main in -lnet" >&5
5025 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5027   echo $ac_n "(cached) $ac_c" 1>&6
5028 else
5029   ac_save_LIBS="$LIBS"
5030 LIBS="-lnet  $LIBS"
5031 cat > conftest.$ac_ext <<EOF
5032 #line 5033 "configure"
5033 #include "confdefs.h"
5034
5035 int main() {
5036 main()
5037 ; return 0; }
5038 EOF
5039 if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5040   rm -rf conftest*
5041   eval "ac_cv_lib_$ac_lib_var=yes"
5042 else
5043   echo "configure: failed program was:" >&5
5044   cat conftest.$ac_ext >&5
5045   rm -rf conftest*
5046   eval "ac_cv_lib_$ac_lib_var=no"
5047 fi
5048 rm -f conftest*
5049 LIBS="$ac_save_LIBS"
5050
5051 fi
5052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5053   echo "$ac_t""yes" 1>&6
5054     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5055     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5056   cat >> confdefs.h <<EOF
5057 #define $ac_tr_lib 1
5058 EOF
5059
5060   LIBS="-lnet $LIBS"
5061
5062 else
5063   echo "$ac_t""no" 1>&6
5064 fi
5065
5066         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5067 echo "configure:5068: checking for main in -lnsl_s" >&5
5068 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5069 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072   ac_save_LIBS="$LIBS"
5073 LIBS="-lnsl_s  $LIBS"
5074 cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077
5078 int main() {
5079 main()
5080 ; return 0; }
5081 EOF
5082 if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5083   rm -rf conftest*
5084   eval "ac_cv_lib_$ac_lib_var=yes"
5085 else
5086   echo "configure: failed program was:" >&5
5087   cat conftest.$ac_ext >&5
5088   rm -rf conftest*
5089   eval "ac_cv_lib_$ac_lib_var=no"
5090 fi
5091 rm -f conftest*
5092 LIBS="$ac_save_LIBS"
5093
5094 fi
5095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5096   echo "$ac_t""yes" 1>&6
5097     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5098     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5099   cat >> confdefs.h <<EOF
5100 #define $ac_tr_lib 1
5101 EOF
5102
5103   LIBS="-lnsl_s $LIBS"
5104
5105 else
5106   echo "$ac_t""no" 1>&6
5107 fi
5108
5109         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5110 echo "configure:5111: checking for main in -lnsl" >&5
5111 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5113   echo $ac_n "(cached) $ac_c" 1>&6
5114 else
5115   ac_save_LIBS="$LIBS"
5116 LIBS="-lnsl  $LIBS"
5117 cat > conftest.$ac_ext <<EOF
5118 #line 5119 "configure"
5119 #include "confdefs.h"
5120
5121 int main() {
5122 main()
5123 ; return 0; }
5124 EOF
5125 if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5126   rm -rf conftest*
5127   eval "ac_cv_lib_$ac_lib_var=yes"
5128 else
5129   echo "configure: failed program was:" >&5
5130   cat conftest.$ac_ext >&5
5131   rm -rf conftest*
5132   eval "ac_cv_lib_$ac_lib_var=no"
5133 fi
5134 rm -f conftest*
5135 LIBS="$ac_save_LIBS"
5136
5137 fi
5138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5139   echo "$ac_t""yes" 1>&6
5140     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5141     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5142   cat >> confdefs.h <<EOF
5143 #define $ac_tr_lib 1
5144 EOF
5145
5146   LIBS="-lnsl $LIBS"
5147
5148 else
5149   echo "$ac_t""no" 1>&6
5150 fi
5151
5152         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5153 echo "configure:5154: checking for socket in -linet" >&5
5154 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   ac_save_LIBS="$LIBS"
5159 LIBS="-linet  $LIBS"
5160 cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 /* Override any gcc2 internal prototype to avoid an error.  */
5164 /* We use char because int might match the return type of a gcc2
5165     builtin and then its argument prototype would still apply.  */
5166 char socket();
5167
5168 int main() {
5169 socket()
5170 ; return 0; }
5171 EOF
5172 if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5173   rm -rf conftest*
5174   eval "ac_cv_lib_$ac_lib_var=yes"
5175 else
5176   echo "configure: failed program was:" >&5
5177   cat conftest.$ac_ext >&5
5178   rm -rf conftest*
5179   eval "ac_cv_lib_$ac_lib_var=no"
5180 fi
5181 rm -f conftest*
5182 LIBS="$ac_save_LIBS"
5183
5184 fi
5185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5186   echo "$ac_t""yes" 1>&6
5187     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5188     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5189   cat >> confdefs.h <<EOF
5190 #define $ac_tr_lib 1
5191 EOF
5192
5193   LIBS="-linet $LIBS"
5194
5195 else
5196   echo "$ac_t""no" 1>&6
5197 fi
5198
5199         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5200 echo "configure:5201: checking for main in -lgen" >&5
5201 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5203   echo $ac_n "(cached) $ac_c" 1>&6
5204 else
5205   ac_save_LIBS="$LIBS"
5206 LIBS="-lgen  $LIBS"
5207 cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210
5211 int main() {
5212 main()
5213 ; return 0; }
5214 EOF
5215 if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5216   rm -rf conftest*
5217   eval "ac_cv_lib_$ac_lib_var=yes"
5218 else
5219   echo "configure: failed program was:" >&5
5220   cat conftest.$ac_ext >&5
5221   rm -rf conftest*
5222   eval "ac_cv_lib_$ac_lib_var=no"
5223 fi
5224 rm -f conftest*
5225 LIBS="$ac_save_LIBS"
5226
5227 fi
5228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5229   echo "$ac_t""yes" 1>&6
5230     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5231     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5232   cat >> confdefs.h <<EOF
5233 #define $ac_tr_lib 1
5234 EOF
5235
5236   LIBS="-lgen $LIBS"
5237
5238 else
5239   echo "$ac_t""no" 1>&6
5240 fi
5241
5242
5243 fi
5244
5245
5246 echo $ac_n "checking for select""... $ac_c" 1>&6
5247 echo "configure:5248: checking for select" >&5
5248 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5249   echo $ac_n "(cached) $ac_c" 1>&6
5250 else
5251   cat > conftest.$ac_ext <<EOF
5252 #line 5253 "configure"
5253 #include "confdefs.h"
5254 /* System header to define __stub macros and hopefully few prototypes,
5255     which can conflict with char select(); below.  */
5256 #include <assert.h>
5257 /* Override any gcc2 internal prototype to avoid an error.  */
5258 /* We use char because int might match the return type of a gcc2
5259     builtin and then its argument prototype would still apply.  */
5260 char select();
5261 char (*f)();
5262
5263 int main() {
5264
5265 /* The GNU C library defines this for functions which it implements
5266     to always fail with ENOSYS.  Some functions are actually named
5267     something starting with __ and the normal name is an alias.  */
5268 #if defined (__stub_select) || defined (__stub___select)
5269 choke me
5270 #else
5271 f = select;
5272 #endif
5273
5274 ; return 0; }
5275 EOF
5276 if { (eval echo configure:5277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5277   rm -rf conftest*
5278   eval "ac_cv_func_select=yes"
5279 else
5280   echo "configure: failed program was:" >&5
5281   cat conftest.$ac_ext >&5
5282   rm -rf conftest*
5283   eval "ac_cv_func_select=no"
5284 fi
5285 rm -f conftest*
5286 fi
5287
5288 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5289   echo "$ac_t""yes" 1>&6
5290   :
5291 else
5292   echo "$ac_t""no" 1>&6
5293 { echo "configure: error: select() required." 1>&2; exit 1; }
5294 fi
5295
5296
5297 if test "${ac_cv_header_winsock_h}" != yes; then
5298                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5299 echo "configure:5300: checking types of arguments for select()" >&5
5300  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5301   echo $ac_n "(cached) $ac_c" 1>&6
5302 else
5303    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5304   echo $ac_n "(cached) $ac_c" 1>&6
5305 else
5306     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5307   echo $ac_n "(cached) $ac_c" 1>&6
5308 else
5309      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5310      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5311       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5312        cat > conftest.$ac_ext <<EOF
5313 #line 5314 "configure"
5314 #include "confdefs.h"
5315 #ifdef HAVE_SYS_TYPES_H
5316 #include <sys/types.h>
5317 #endif
5318 #ifdef HAVE_SYS_TIME_H
5319 #include <sys/time.h>
5320 #endif
5321 #ifdef HAVE_SYS_SELECT_H
5322 #include <sys/select.h>
5323 #endif
5324 #ifdef HAVE_SYS_SOCKET_H
5325 #include <sys/socket.h>
5326 #endif
5327 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
5328 int main() {
5329
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5333   rm -rf conftest*
5334           ac_not_found=no ; break 3
5335 else
5336   echo "configure: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338   rm -rf conftest*
5339   ac_not_found=yes
5340 fi
5341 rm -f conftest*
5342       done
5343      done
5344     done
5345    
5346 fi
5347   
5348 fi
5349  
5350 fi
5351  if test "$ac_not_found" = yes; then
5352   ac_cv_func_select_arg1=int 
5353   ac_cv_func_select_arg234='int *' 
5354   ac_cv_func_select_arg5='struct timeval *'
5355  fi
5356  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5357  cat >> confdefs.h <<EOF
5358 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5359 EOF
5360
5361  cat >> confdefs.h <<EOF
5362 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5363 EOF
5364
5365  cat >> confdefs.h <<EOF
5366 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5367 EOF
5368
5369
5370 fi
5371
5372
5373 for ac_hdr in regex.h 
5374 do
5375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5377 echo "configure:5378: checking for $ac_hdr" >&5
5378 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5379   echo $ac_n "(cached) $ac_c" 1>&6
5380 else
5381   cat > conftest.$ac_ext <<EOF
5382 #line 5383 "configure"
5383 #include "confdefs.h"
5384 #include <$ac_hdr>
5385 EOF
5386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5387 { (eval echo configure:5388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5389 if test -z "$ac_err"; then
5390   rm -rf conftest*
5391   eval "ac_cv_header_$ac_safe=yes"
5392 else
5393   echo "$ac_err" >&5
5394   echo "configure: failed program was:" >&5
5395   cat conftest.$ac_ext >&5
5396   rm -rf conftest*
5397   eval "ac_cv_header_$ac_safe=no"
5398 fi
5399 rm -f conftest*
5400 fi
5401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5402   echo "$ac_t""yes" 1>&6
5403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5404   cat >> confdefs.h <<EOF
5405 #define $ac_tr_hdr 1
5406 EOF
5407  
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411 done
5412
5413 if test "$ac_cv_header_regex_h" != yes ; then
5414         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5415 fi
5416 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5417 echo "configure:5418: checking for regfree" >&5
5418 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5419   echo $ac_n "(cached) $ac_c" 1>&6
5420 else
5421   cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 /* System header to define __stub macros and hopefully few prototypes,
5425     which can conflict with char regfree(); below.  */
5426 #include <assert.h>
5427 /* Override any gcc2 internal prototype to avoid an error.  */
5428 /* We use char because int might match the return type of a gcc2
5429     builtin and then its argument prototype would still apply.  */
5430 char regfree();
5431 char (*f)();
5432
5433 int main() {
5434
5435 /* The GNU C library defines this for functions which it implements
5436     to always fail with ENOSYS.  Some functions are actually named
5437     something starting with __ and the normal name is an alias.  */
5438 #if defined (__stub_regfree) || defined (__stub___regfree)
5439 choke me
5440 #else
5441 f = regfree;
5442 #endif
5443
5444 ; return 0; }
5445 EOF
5446 if { (eval echo configure:5447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5447   rm -rf conftest*
5448   eval "ac_cv_func_regfree=yes"
5449 else
5450   echo "configure: failed program was:" >&5
5451   cat conftest.$ac_ext >&5
5452   rm -rf conftest*
5453   eval "ac_cv_func_regfree=no"
5454 fi
5455 rm -f conftest*
5456 fi
5457
5458 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5459   echo "$ac_t""yes" 1>&6
5460   :
5461 else
5462   echo "$ac_t""no" 1>&6
5463 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5464 fi
5465
5466
5467
5468 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5469 echo "configure:5470: checking for compatible POSIX regex" >&5
5470 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5471   echo $ac_n "(cached) $ac_c" 1>&6
5472 else
5473   
5474         if test "$cross_compiling" = yes; then
5475   ol_cv_c_posix_regex=cross
5476 else
5477   cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5480
5481 #include <sys/types.h>
5482 #include <regex.h>
5483 static char *pattern, *string;
5484 main()
5485 {
5486         int rc;
5487         regex_t re;
5488
5489         pattern = "^A";
5490
5491         if(regcomp(&re, pattern, 0)) {
5492                 return -1;
5493         }
5494         
5495         string = "ALL MATCH";
5496         
5497         rc = regexec(&re, string, 0, (void*)0, 0);
5498
5499         regfree(&re);
5500
5501         return rc;
5502 }
5503 EOF
5504 if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5505 then
5506   ol_cv_c_posix_regex=yes
5507 else
5508   echo "configure: failed program was:" >&5
5509   cat conftest.$ac_ext >&5
5510   rm -fr conftest*
5511   ol_cv_c_posix_regex=no
5512 fi
5513 rm -fr conftest*
5514 fi
5515
5516 fi
5517
5518 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5519
5520 if test "$ol_cv_c_posix_regex" = no ; then
5521         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5522 fi
5523
5524 ol_link_dnssrv=no
5525 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5526 echo "configure:5527: checking for res_query" >&5
5527 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5528   echo $ac_n "(cached) $ac_c" 1>&6
5529 else
5530   cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 /* System header to define __stub macros and hopefully few prototypes,
5534     which can conflict with char res_query(); below.  */
5535 #include <assert.h>
5536 /* Override any gcc2 internal prototype to avoid an error.  */
5537 /* We use char because int might match the return type of a gcc2
5538     builtin and then its argument prototype would still apply.  */
5539 char res_query();
5540 char (*f)();
5541
5542 int main() {
5543
5544 /* The GNU C library defines this for functions which it implements
5545     to always fail with ENOSYS.  Some functions are actually named
5546     something starting with __ and the normal name is an alias.  */
5547 #if defined (__stub_res_query) || defined (__stub___res_query)
5548 choke me
5549 #else
5550 f = res_query;
5551 #endif
5552
5553 ; return 0; }
5554 EOF
5555 if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5556   rm -rf conftest*
5557   eval "ac_cv_func_res_query=yes"
5558 else
5559   echo "configure: failed program was:" >&5
5560   cat conftest.$ac_ext >&5
5561   rm -rf conftest*
5562   eval "ac_cv_func_res_query=no"
5563 fi
5564 rm -f conftest*
5565 fi
5566
5567 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5568   echo "$ac_t""yes" 1>&6
5569   :
5570 else
5571   echo "$ac_t""no" 1>&6
5572 fi
5573
5574 if test $ac_cv_func_res_query = no ; then 
5575         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5576 echo "configure:5577: checking for res_query in -lbind" >&5
5577 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5579   echo $ac_n "(cached) $ac_c" 1>&6
5580 else
5581   ac_save_LIBS="$LIBS"
5582 LIBS="-lbind  $LIBS"
5583 cat > conftest.$ac_ext <<EOF
5584 #line 5585 "configure"
5585 #include "confdefs.h"
5586 /* Override any gcc2 internal prototype to avoid an error.  */
5587 /* We use char because int might match the return type of a gcc2
5588     builtin and then its argument prototype would still apply.  */
5589 char res_query();
5590
5591 int main() {
5592 res_query()
5593 ; return 0; }
5594 EOF
5595 if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5596   rm -rf conftest*
5597   eval "ac_cv_lib_$ac_lib_var=yes"
5598 else
5599   echo "configure: failed program was:" >&5
5600   cat conftest.$ac_ext >&5
5601   rm -rf conftest*
5602   eval "ac_cv_lib_$ac_lib_var=no"
5603 fi
5604 rm -f conftest*
5605 LIBS="$ac_save_LIBS"
5606
5607 fi
5608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5609   echo "$ac_t""yes" 1>&6
5610     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5611     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5612   cat >> confdefs.h <<EOF
5613 #define $ac_tr_lib 1
5614 EOF
5615
5616   LIBS="-lbind $LIBS"
5617
5618 else
5619   echo "$ac_t""no" 1>&6
5620 fi
5621
5622         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5623 fi
5624
5625 if test $ac_cv_func_res_query = no ; then 
5626         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5627 echo "configure:5628: checking for __res_query in -lbind" >&5
5628 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5630   echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632   ac_save_LIBS="$LIBS"
5633 LIBS="-lbind  $LIBS"
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 /* Override any gcc2 internal prototype to avoid an error.  */
5638 /* We use char because int might match the return type of a gcc2
5639     builtin and then its argument prototype would still apply.  */
5640 char __res_query();
5641
5642 int main() {
5643 __res_query()
5644 ; return 0; }
5645 EOF
5646 if { (eval echo configure:5647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5647   rm -rf conftest*
5648   eval "ac_cv_lib_$ac_lib_var=yes"
5649 else
5650   echo "configure: failed program was:" >&5
5651   cat conftest.$ac_ext >&5
5652   rm -rf conftest*
5653   eval "ac_cv_lib_$ac_lib_var=no"
5654 fi
5655 rm -f conftest*
5656 LIBS="$ac_save_LIBS"
5657
5658 fi
5659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5660   echo "$ac_t""yes" 1>&6
5661     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5662     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5663   cat >> confdefs.h <<EOF
5664 #define $ac_tr_lib 1
5665 EOF
5666
5667   LIBS="-lbind $LIBS"
5668
5669 else
5670   echo "$ac_t""no" 1>&6
5671 fi
5672
5673         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5674 fi
5675
5676 if test $ac_cv_func_res_query = no ; then 
5677         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5678 echo "configure:5679: checking for res_query in -lresolv" >&5
5679 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5681   echo $ac_n "(cached) $ac_c" 1>&6
5682 else
5683   ac_save_LIBS="$LIBS"
5684 LIBS="-lresolv  $LIBS"
5685 cat > conftest.$ac_ext <<EOF
5686 #line 5687 "configure"
5687 #include "confdefs.h"
5688 /* Override any gcc2 internal prototype to avoid an error.  */
5689 /* We use char because int might match the return type of a gcc2
5690     builtin and then its argument prototype would still apply.  */
5691 char res_query();
5692
5693 int main() {
5694 res_query()
5695 ; return 0; }
5696 EOF
5697 if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5698   rm -rf conftest*
5699   eval "ac_cv_lib_$ac_lib_var=yes"
5700 else
5701   echo "configure: failed program was:" >&5
5702   cat conftest.$ac_ext >&5
5703   rm -rf conftest*
5704   eval "ac_cv_lib_$ac_lib_var=no"
5705 fi
5706 rm -f conftest*
5707 LIBS="$ac_save_LIBS"
5708
5709 fi
5710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5711   echo "$ac_t""yes" 1>&6
5712     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5713     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5714   cat >> confdefs.h <<EOF
5715 #define $ac_tr_lib 1
5716 EOF
5717
5718   LIBS="-lresolv $LIBS"
5719
5720 else
5721   echo "$ac_t""no" 1>&6
5722 fi
5723
5724         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5725 fi
5726
5727 if test "$ac_cv_func_res_query" = yes ; then
5728         cat >> confdefs.h <<\EOF
5729 #define HAVE_RES_QUERY 1
5730 EOF
5731
5732
5733         if test $ol_enable_dnssrv != no ; then
5734                 ol_link_dnssrv=yes
5735         fi
5736 fi
5737
5738 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5739         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5740 fi
5741
5742 ol_link_kbind=no
5743 ol_link_kpasswd=no
5744 ol_link_krb5=no
5745 ol_link_krb4=no
5746
5747 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5748         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5749
5750         for ac_hdr in krb5.h
5751 do
5752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5754 echo "configure:5755: checking for $ac_hdr" >&5
5755 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5756   echo $ac_n "(cached) $ac_c" 1>&6
5757 else
5758   cat > conftest.$ac_ext <<EOF
5759 #line 5760 "configure"
5760 #include "confdefs.h"
5761 #include <$ac_hdr>
5762 EOF
5763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5764 { (eval echo configure:5765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5766 if test -z "$ac_err"; then
5767   rm -rf conftest*
5768   eval "ac_cv_header_$ac_safe=yes"
5769 else
5770   echo "$ac_err" >&5
5771   echo "configure: failed program was:" >&5
5772   cat conftest.$ac_ext >&5
5773   rm -rf conftest*
5774   eval "ac_cv_header_$ac_safe=no"
5775 fi
5776 rm -f conftest*
5777 fi
5778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5779   echo "$ac_t""yes" 1>&6
5780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5781   cat >> confdefs.h <<EOF
5782 #define $ac_tr_hdr 1
5783 EOF
5784  
5785 else
5786   echo "$ac_t""no" 1>&6
5787 fi
5788 done
5789
5790
5791         if test $ac_cv_header_krb5_h = yes ; then
5792                                 for ac_hdr in heim_err.h
5793 do
5794 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5795 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5796 echo "configure:5797: checking for $ac_hdr" >&5
5797 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5798   echo $ac_n "(cached) $ac_c" 1>&6
5799 else
5800   cat > conftest.$ac_ext <<EOF
5801 #line 5802 "configure"
5802 #include "confdefs.h"
5803 #include <$ac_hdr>
5804 EOF
5805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5806 { (eval echo configure:5807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5808 if test -z "$ac_err"; then
5809   rm -rf conftest*
5810   eval "ac_cv_header_$ac_safe=yes"
5811 else
5812   echo "$ac_err" >&5
5813   echo "configure: failed program was:" >&5
5814   cat conftest.$ac_ext >&5
5815   rm -rf conftest*
5816   eval "ac_cv_header_$ac_safe=no"
5817 fi
5818 rm -f conftest*
5819 fi
5820 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5821   echo "$ac_t""yes" 1>&6
5822     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5823   cat >> confdefs.h <<EOF
5824 #define $ac_tr_hdr 1
5825 EOF
5826  
5827 else
5828   echo "$ac_t""no" 1>&6
5829 fi
5830 done
5831
5832                 if test $ac_cv_header_heim_err_h = yes ; then
5833                         krb5_impl=heimdal
5834                 else
5835                         krb5_impl=mit
5836                 fi
5837
5838                 if test $krb5_impl = mit; then
5839                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5840 echo "configure:5841: checking for main in -lkrb5" >&5
5841 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5843   echo $ac_n "(cached) $ac_c" 1>&6
5844 else
5845   ac_save_LIBS="$LIBS"
5846 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5847 cat > conftest.$ac_ext <<EOF
5848 #line 5849 "configure"
5849 #include "confdefs.h"
5850
5851 int main() {
5852 main()
5853 ; return 0; }
5854 EOF
5855 if { (eval echo configure:5856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5856   rm -rf conftest*
5857   eval "ac_cv_lib_$ac_lib_var=yes"
5858 else
5859   echo "configure: failed program was:" >&5
5860   cat conftest.$ac_ext >&5
5861   rm -rf conftest*
5862   eval "ac_cv_lib_$ac_lib_var=no"
5863 fi
5864 rm -f conftest*
5865 LIBS="$ac_save_LIBS"
5866
5867 fi
5868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5869   echo "$ac_t""yes" 1>&6
5870   have_krb5=yes
5871                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5872 else
5873   echo "$ac_t""no" 1>&6
5874 have_krb5=no
5875 fi
5876
5877
5878                 elif test $krb5_impl = heimdal; then
5879                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5880 echo "configure:5881: checking for main in -lkrb5" >&5
5881 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5882 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5883   echo $ac_n "(cached) $ac_c" 1>&6
5884 else
5885   ac_save_LIBS="$LIBS"
5886 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5887 cat > conftest.$ac_ext <<EOF
5888 #line 5889 "configure"
5889 #include "confdefs.h"
5890
5891 int main() {
5892 main()
5893 ; return 0; }
5894 EOF
5895 if { (eval echo configure:5896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5896   rm -rf conftest*
5897   eval "ac_cv_lib_$ac_lib_var=yes"
5898 else
5899   echo "configure: failed program was:" >&5
5900   cat conftest.$ac_ext >&5
5901   rm -rf conftest*
5902   eval "ac_cv_lib_$ac_lib_var=no"
5903 fi
5904 rm -f conftest*
5905 LIBS="$ac_save_LIBS"
5906
5907 fi
5908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5909   echo "$ac_t""yes" 1>&6
5910   have_krb5=yes
5911                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5912 else
5913   echo "$ac_t""no" 1>&6
5914 have_krb5=no
5915 fi
5916
5917
5918                         cat >> confdefs.h <<\EOF
5919 #define HAVE_HEIMDAL_KERBEROS 1
5920 EOF
5921
5922                 else
5923                         have_krb5=no
5924                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5925                 fi
5926
5927                 if test $have_krb5 = yes ; then
5928                         ol_link_krb5=yes
5929
5930                         cat >> confdefs.h <<\EOF
5931 #define HAVE_KRB5 1
5932 EOF
5933
5934
5935                         if test $ol_enable_kpasswd != no ; then
5936                                 ol_link_kpasswd=yes;
5937                         fi
5938
5939                         if test $ol_with_kerberos = k5only ; then
5940                                 ol_with_kerberos=found
5941                         fi
5942
5943                 elif test $ol_with_kerberos != auto ; then
5944                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5945                 fi
5946
5947         fi
5948 fi
5949
5950 if test $ol_link_krb5 = yes -a \
5951         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5952
5953         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5954 do
5955 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5956 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5957 echo "configure:5958: checking for $ac_hdr" >&5
5958 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5959   echo $ac_n "(cached) $ac_c" 1>&6
5960 else
5961   cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 #include <$ac_hdr>
5965 EOF
5966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5967 { (eval echo configure:5968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5969 if test -z "$ac_err"; then
5970   rm -rf conftest*
5971   eval "ac_cv_header_$ac_safe=yes"
5972 else
5973   echo "$ac_err" >&5
5974   echo "configure: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   rm -rf conftest*
5977   eval "ac_cv_header_$ac_safe=no"
5978 fi
5979 rm -f conftest*
5980 fi
5981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5982   echo "$ac_t""yes" 1>&6
5983     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5984   cat >> confdefs.h <<EOF
5985 #define $ac_tr_hdr 1
5986 EOF
5987  
5988 else
5989   echo "$ac_t""no" 1>&6
5990 fi
5991 done
5992
5993
5994         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5995                 if test $krb5_impl = mit; then
5996                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5997 echo "configure:5998: checking for main in -lkrb4" >&5
5998 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6000   echo $ac_n "(cached) $ac_c" 1>&6
6001 else
6002   ac_save_LIBS="$LIBS"
6003 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6004 cat > conftest.$ac_ext <<EOF
6005 #line 6006 "configure"
6006 #include "confdefs.h"
6007
6008 int main() {
6009 main()
6010 ; return 0; }
6011 EOF
6012 if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6013   rm -rf conftest*
6014   eval "ac_cv_lib_$ac_lib_var=yes"
6015 else
6016   echo "configure: failed program was:" >&5
6017   cat conftest.$ac_ext >&5
6018   rm -rf conftest*
6019   eval "ac_cv_lib_$ac_lib_var=no"
6020 fi
6021 rm -f conftest*
6022 LIBS="$ac_save_LIBS"
6023
6024 fi
6025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6026   echo "$ac_t""yes" 1>&6
6027   have_k425=yes
6028                                 KRB4_LIBS="-lkrb4 -ldes425"
6029 else
6030   echo "$ac_t""no" 1>&6
6031 have_k425=no
6032 fi
6033
6034
6035                 elif test $krb5_impl = heimdal; then
6036                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6037 echo "configure:6038: checking for main in -lkrb4" >&5
6038 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6039 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6040   echo $ac_n "(cached) $ac_c" 1>&6
6041 else
6042   ac_save_LIBS="$LIBS"
6043 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6044 cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047
6048 int main() {
6049 main()
6050 ; return 0; }
6051 EOF
6052 if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6053   rm -rf conftest*
6054   eval "ac_cv_lib_$ac_lib_var=yes"
6055 else
6056   echo "configure: failed program was:" >&5
6057   cat conftest.$ac_ext >&5
6058   rm -rf conftest*
6059   eval "ac_cv_lib_$ac_lib_var=no"
6060 fi
6061 rm -f conftest*
6062 LIBS="$ac_save_LIBS"
6063
6064 fi
6065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6066   echo "$ac_t""yes" 1>&6
6067   have_k425=yes
6068                                 KRB4_LIBS="-lkrb4"
6069 else
6070   echo "$ac_t""no" 1>&6
6071 have_k425=no
6072 fi
6073
6074
6075                 else
6076                         have_425=no
6077                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6078                 fi
6079
6080                 if test $have_k425 = yes ; then
6081                         ol_with_kerberos=found
6082                         ol_link_krb4=yes
6083
6084                         cat >> confdefs.h <<\EOF
6085 #define HAVE_KRB425 1
6086 EOF
6087
6088                         cat >> confdefs.h <<\EOF
6089 #define HAVE_KRB4 1
6090 EOF
6091
6092
6093                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6094 echo "configure:6095: checking for des_debug in Kerberos libraries" >&5
6095 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6096   echo $ac_n "(cached) $ac_c" 1>&6
6097 else
6098   
6099                                                                 save_LIBS="$LIBS"
6100                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6101                                 cat > conftest.$ac_ext <<EOF
6102 #line 6103 "configure"
6103 #include "confdefs.h"
6104
6105 #include <kerberosIV/krb.h>
6106 #include <kerberosIV/des.h>
6107 extern int des_debug;
6108
6109 int main() {
6110
6111 des_debug = 1;
6112
6113 ; return 0; }
6114 EOF
6115 if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6116   rm -rf conftest*
6117   ol_cv_var_des_debug=yes
6118 else
6119   echo "configure: failed program was:" >&5
6120   cat conftest.$ac_ext >&5
6121   rm -rf conftest*
6122   ol_cv_var_des_debug=no
6123 fi
6124 rm -f conftest*
6125                                                                 LIBS="$save_LIBS"
6126                         
6127 fi
6128
6129 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6130
6131                         if test $ol_cv_var_des_debug = yes ; then
6132                                 cat >> confdefs.h <<\EOF
6133 #define HAVE_DES_DEBUG 1
6134 EOF
6135
6136                         fi
6137
6138                         LIBS="$save_LIBS"
6139                 fi
6140         fi
6141 fi
6142
6143 if test $ol_link_krb5 = yes ; then
6144         ol_with_kerberos=found
6145 fi
6146
6147 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6148         -o $ol_with_kerberos = kth ; then
6149
6150         for ac_hdr in krb.h des.h krb-archaeology.h 
6151 do
6152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6154 echo "configure:6155: checking for $ac_hdr" >&5
6155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6156   echo $ac_n "(cached) $ac_c" 1>&6
6157 else
6158   cat > conftest.$ac_ext <<EOF
6159 #line 6160 "configure"
6160 #include "confdefs.h"
6161 #include <$ac_hdr>
6162 EOF
6163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6164 { (eval echo configure:6165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6166 if test -z "$ac_err"; then
6167   rm -rf conftest*
6168   eval "ac_cv_header_$ac_safe=yes"
6169 else
6170   echo "$ac_err" >&5
6171   echo "configure: failed program was:" >&5
6172   cat conftest.$ac_ext >&5
6173   rm -rf conftest*
6174   eval "ac_cv_header_$ac_safe=no"
6175 fi
6176 rm -f conftest*
6177 fi
6178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6179   echo "$ac_t""yes" 1>&6
6180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6181   cat >> confdefs.h <<EOF
6182 #define $ac_tr_hdr 1
6183 EOF
6184  
6185 else
6186   echo "$ac_t""no" 1>&6
6187 fi
6188 done
6189
6190
6191         if test $ac_cv_header_krb_h = yes ; then
6192                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6193 echo "configure:6194: checking for main in -lkrb" >&5
6194 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6195 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6196   echo $ac_n "(cached) $ac_c" 1>&6
6197 else
6198   ac_save_LIBS="$LIBS"
6199 LIBS="-lkrb -ldes $LIBS"
6200 cat > conftest.$ac_ext <<EOF
6201 #line 6202 "configure"
6202 #include "confdefs.h"
6203
6204 int main() {
6205 main()
6206 ; return 0; }
6207 EOF
6208 if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6209   rm -rf conftest*
6210   eval "ac_cv_lib_$ac_lib_var=yes"
6211 else
6212   echo "configure: failed program was:" >&5
6213   cat conftest.$ac_ext >&5
6214   rm -rf conftest*
6215   eval "ac_cv_lib_$ac_lib_var=no"
6216 fi
6217 rm -f conftest*
6218 LIBS="$ac_save_LIBS"
6219
6220 fi
6221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6222   echo "$ac_t""yes" 1>&6
6223   have_k4=yes
6224 else
6225   echo "$ac_t""no" 1>&6
6226 have_k4=no
6227 fi
6228
6229
6230                 if test $have_k4 = yes ; then
6231                         ol_with_kerberos=found
6232                         ol_link_krb4=yes
6233
6234                         cat >> confdefs.h <<\EOF
6235 #define HAVE_KRB4 1
6236 EOF
6237
6238
6239                         KRB4_LIBS="-lkrb -ldes"
6240
6241                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6242                                 cat >> confdefs.h <<\EOF
6243 #define HAVE_KTH_KERBEROS 1
6244 EOF
6245
6246                         fi
6247                 fi
6248         fi
6249 fi
6250
6251 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6252         ol_link_kpasswd=yes;
6253 fi
6254
6255 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6256         cat >> confdefs.h <<\EOF
6257 #define HAVE_KERBEROS 1
6258 EOF
6259
6260
6261 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6262         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6263 fi
6264
6265 ol_link_tls=no
6266 if test $ol_with_tls != no ; then
6267         for ac_hdr in openssl/ssl.h ssl.h
6268 do
6269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6271 echo "configure:6272: checking for $ac_hdr" >&5
6272 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6273   echo $ac_n "(cached) $ac_c" 1>&6
6274 else
6275   cat > conftest.$ac_ext <<EOF
6276 #line 6277 "configure"
6277 #include "confdefs.h"
6278 #include <$ac_hdr>
6279 EOF
6280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6281 { (eval echo configure:6282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6283 if test -z "$ac_err"; then
6284   rm -rf conftest*
6285   eval "ac_cv_header_$ac_safe=yes"
6286 else
6287   echo "$ac_err" >&5
6288   echo "configure: failed program was:" >&5
6289   cat conftest.$ac_ext >&5
6290   rm -rf conftest*
6291   eval "ac_cv_header_$ac_safe=no"
6292 fi
6293 rm -f conftest*
6294 fi
6295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6296   echo "$ac_t""yes" 1>&6
6297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6298   cat >> confdefs.h <<EOF
6299 #define $ac_tr_hdr 1
6300 EOF
6301  
6302 else
6303   echo "$ac_t""no" 1>&6
6304 fi
6305 done
6306
6307         
6308         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6309                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6310 echo "configure:6311: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6311 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6313   echo $ac_n "(cached) $ac_c" 1>&6
6314 else
6315   ac_save_LIBS="$LIBS"
6316 LIBS="-lssl -lcrypto $LIBS"
6317 cat > conftest.$ac_ext <<EOF
6318 #line 6319 "configure"
6319 #include "confdefs.h"
6320 /* Override any gcc2 internal prototype to avoid an error.  */
6321 /* We use char because int might match the return type of a gcc2
6322     builtin and then its argument prototype would still apply.  */
6323 char SSLeay_add_ssl_algorithms();
6324
6325 int main() {
6326 SSLeay_add_ssl_algorithms()
6327 ; return 0; }
6328 EOF
6329 if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6330   rm -rf conftest*
6331   eval "ac_cv_lib_$ac_lib_var=yes"
6332 else
6333   echo "configure: failed program was:" >&5
6334   cat conftest.$ac_ext >&5
6335   rm -rf conftest*
6336   eval "ac_cv_lib_$ac_lib_var=no"
6337 fi
6338 rm -f conftest*
6339 LIBS="$ac_save_LIBS"
6340
6341 fi
6342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6343   echo "$ac_t""yes" 1>&6
6344   have_ssleay=yes
6345                         need_rsaref=no
6346 else
6347   echo "$ac_t""no" 1>&6
6348 have_ssleay=no
6349 fi
6350
6351                         
6352                 if test $have_ssleay = no ; then
6353                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6354 echo "configure:6355: checking for SSL_library_init in -lssl" >&5
6355 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6357   echo $ac_n "(cached) $ac_c" 1>&6
6358 else
6359   ac_save_LIBS="$LIBS"
6360 LIBS="-lssl -lcrypto $LIBS"
6361 cat > conftest.$ac_ext <<EOF
6362 #line 6363 "configure"
6363 #include "confdefs.h"
6364 /* Override any gcc2 internal prototype to avoid an error.  */
6365 /* We use char because int might match the return type of a gcc2
6366     builtin and then its argument prototype would still apply.  */
6367 char SSL_library_init();
6368
6369 int main() {
6370 SSL_library_init()
6371 ; return 0; }
6372 EOF
6373 if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6374   rm -rf conftest*
6375   eval "ac_cv_lib_$ac_lib_var=yes"
6376 else
6377   echo "configure: failed program was:" >&5
6378   cat conftest.$ac_ext >&5
6379   rm -rf conftest*
6380   eval "ac_cv_lib_$ac_lib_var=no"
6381 fi
6382 rm -f conftest*
6383 LIBS="$ac_save_LIBS"
6384
6385 fi
6386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6387   echo "$ac_t""yes" 1>&6
6388   have_ssleay=yes
6389                                 need_rsaref=no
6390 else
6391   echo "$ac_t""no" 1>&6
6392 have_ssleay=no
6393 fi
6394
6395                 fi
6396
6397                 if test $have_ssleay = no ; then
6398                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6399 echo "configure:6400: checking for ssl3_accept in -lssl" >&5
6400 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6402   echo $ac_n "(cached) $ac_c" 1>&6
6403 else
6404   ac_save_LIBS="$LIBS"
6405 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6406 cat > conftest.$ac_ext <<EOF
6407 #line 6408 "configure"
6408 #include "confdefs.h"
6409 /* Override any gcc2 internal prototype to avoid an error.  */
6410 /* We use char because int might match the return type of a gcc2
6411     builtin and then its argument prototype would still apply.  */
6412 char ssl3_accept();
6413
6414 int main() {
6415 ssl3_accept()
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6419   rm -rf conftest*
6420   eval "ac_cv_lib_$ac_lib_var=yes"
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=no"
6426 fi
6427 rm -f conftest*
6428 LIBS="$ac_save_LIBS"
6429
6430 fi
6431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6432   echo "$ac_t""yes" 1>&6
6433   have_ssleay=yes
6434                                 need_rsaref=yes
6435 else
6436   echo "$ac_t""no" 1>&6
6437 have_ssleay=no
6438 fi
6439
6440                 fi
6441
6442                 if test $have_ssleay = yes ; then
6443                         ol_with_tls=found
6444                         ol_link_tls=yes
6445
6446                         cat >> confdefs.h <<\EOF
6447 #define HAVE_SSLEAY 1
6448 EOF
6449
6450
6451                         if test $need_rsaref = yes; then
6452                                 cat >> confdefs.h <<\EOF
6453 #define HAVE_RSAREF 1
6454 EOF
6455
6456
6457                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6458                         else
6459                                 TLS_LIBS="-lssl -lcrypto"
6460                         fi
6461                 fi
6462         fi
6463
6464 else
6465         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6466 fi
6467
6468 if test $ol_link_tls = yes ; then
6469         cat >> confdefs.h <<\EOF
6470 #define HAVE_TLS 1
6471 EOF
6472
6473
6474 elif test $ol_with_tls = auto ; then
6475         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6476         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6477
6478 elif test $ol_with_tls != no ; then
6479         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6480 fi
6481
6482 for ac_func in \
6483         ctime_r                 \
6484         gethostbyname_r gethostbyaddr_r \
6485
6486 do
6487 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6488 echo "configure:6489: checking for $ac_func" >&5
6489 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6490   echo $ac_n "(cached) $ac_c" 1>&6
6491 else
6492   cat > conftest.$ac_ext <<EOF
6493 #line 6494 "configure"
6494 #include "confdefs.h"
6495 /* System header to define __stub macros and hopefully few prototypes,
6496     which can conflict with char $ac_func(); below.  */
6497 #include <assert.h>
6498 /* Override any gcc2 internal prototype to avoid an error.  */
6499 /* We use char because int might match the return type of a gcc2
6500     builtin and then its argument prototype would still apply.  */
6501 char $ac_func();
6502 char (*f)();
6503
6504 int main() {
6505
6506 /* The GNU C library defines this for functions which it implements
6507     to always fail with ENOSYS.  Some functions are actually named
6508     something starting with __ and the normal name is an alias.  */
6509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6510 choke me
6511 #else
6512 f = $ac_func;
6513 #endif
6514
6515 ; return 0; }
6516 EOF
6517 if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6518   rm -rf conftest*
6519   eval "ac_cv_func_$ac_func=yes"
6520 else
6521   echo "configure: failed program was:" >&5
6522   cat conftest.$ac_ext >&5
6523   rm -rf conftest*
6524   eval "ac_cv_func_$ac_func=no"
6525 fi
6526 rm -f conftest*
6527 fi
6528
6529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6530   echo "$ac_t""yes" 1>&6
6531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6532   cat >> confdefs.h <<EOF
6533 #define $ac_tr_func 1
6534 EOF
6535  
6536 else
6537   echo "$ac_t""no" 1>&6
6538 fi
6539 done
6540
6541
6542 if test "$ac_cv_func_ctime_r" = no ; then
6543         ol_cv_func_ctime_r_nargs=0
6544 else
6545         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6546 echo "configure:6547: checking number of arguments of ctime_r" >&5
6547 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6548   echo $ac_n "(cached) $ac_c" 1>&6
6549 else
6550   cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553 #include <time.h>
6554 int main() {
6555 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6556 ; return 0; }
6557 EOF
6558 if { (eval echo configure:6559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6559   rm -rf conftest*
6560   ol_cv_func_ctime_r_nargs3=yes
6561 else
6562   echo "configure: failed program was:" >&5
6563   cat conftest.$ac_ext >&5
6564   rm -rf conftest*
6565   ol_cv_func_ctime_r_nargs3=no
6566 fi
6567 rm -f conftest*
6568
6569         cat > conftest.$ac_ext <<EOF
6570 #line 6571 "configure"
6571 #include "confdefs.h"
6572 #include <time.h>
6573 int main() {
6574 time_t ti; char *buffer; ctime_r(&ti,buffer);
6575 ; return 0; }
6576 EOF
6577 if { (eval echo configure:6578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6578   rm -rf conftest*
6579   ol_cv_func_ctime_r_nargs2=yes
6580 else
6581   echo "configure: failed program was:" >&5
6582   cat conftest.$ac_ext >&5
6583   rm -rf conftest*
6584   ol_cv_func_ctime_r_nargs2=no
6585 fi
6586 rm -f conftest*
6587
6588         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6589                 $ol_cv_func_ctime_r_nargs2 = no ; then
6590
6591                 ol_cv_func_ctime_r_nargs=3
6592
6593         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6594                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6595
6596                 ol_cv_func_ctime_r_nargs=2
6597
6598         else
6599                 ol_cv_func_ctime_r_nargs=0
6600         fi
6601   
6602 fi
6603
6604 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6605
6606   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6607         cat >> confdefs.h <<EOF
6608 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6609 EOF
6610
6611   fi
6612
6613 fi
6614
6615 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6616         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6617 echo "configure:6618: checking number of arguments of gethostbyname_r" >&5
6618 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6619   echo $ac_n "(cached) $ac_c" 1>&6
6620 else
6621   cat > conftest.$ac_ext <<EOF
6622 #line 6623 "configure"
6623 #include "confdefs.h"
6624 #include <sys/types.h>
6625 #include <sys/socket.h>
6626 #include <netinet/in.h>
6627 #include <netdb.h>
6628 #define BUFSIZE (sizeof(struct hostent)+10)
6629 int main() {
6630 struct hostent hent; char buffer[BUFSIZE];
6631                 int bufsize=BUFSIZE;int h_errno;
6632                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6633                         buffer, bufsize, &h_errno);
6634 ; return 0; }
6635 EOF
6636 if { (eval echo configure:6637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6637   rm -rf conftest*
6638   ol_cv_func_gethostbyname_r_nargs5=yes
6639 else
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   ol_cv_func_gethostbyname_r_nargs5=no
6644 fi
6645 rm -f conftest*
6646
6647         cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650 #include <sys/types.h>
6651 #include <sys/socket.h>
6652 #include <netinet/in.h>
6653 #include <netdb.h>
6654 #define BUFSIZE (sizeof(struct hostent)+10)
6655 int main() {
6656 struct hostent hent;struct hostent *rhent;
6657                 char buffer[BUFSIZE];
6658                 int bufsize=BUFSIZE;int h_errno;
6659                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6660                         &rhent, &h_errno);
6661 ; return 0; }
6662 EOF
6663 if { (eval echo configure:6664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6664   rm -rf conftest*
6665   ol_cv_func_gethostbyname_r_nargs6=yes
6666 else
6667   echo "configure: failed program was:" >&5
6668   cat conftest.$ac_ext >&5
6669   rm -rf conftest*
6670   ol_cv_func_gethostbyname_r_nargs6=no
6671 fi
6672 rm -f conftest*
6673
6674         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6675                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6676
6677                 ol_cv_func_gethostbyname_r_nargs=5
6678
6679         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6680                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6681
6682                 ol_cv_func_gethostbyname_r_nargs=6
6683
6684         else
6685                 ol_cv_func_gethostbyname_r_nargs=0
6686         fi
6687   
6688 fi
6689
6690 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6691   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6692         cat >> confdefs.h <<EOF
6693 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6694 EOF
6695
6696   fi
6697
6698 else
6699         ol_cv_func_gethostbyname_r_nargs=0
6700 fi
6701  
6702 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6703         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6704 echo "configure:6705: checking number of arguments of gethostbyaddr_r" >&5
6705 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6706   echo $ac_n "(cached) $ac_c" 1>&6
6707 else
6708   cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 #include <sys/types.h>
6712 #include <sys/socket.h>
6713 #include <netinet/in.h>
6714 #include <netdb.h>
6715 #define BUFSIZE (sizeof(struct hostent)+10)
6716 int main() {
6717 struct hostent hent; char buffer[BUFSIZE]; 
6718             struct in_addr add;
6719             size_t alen=sizeof(struct in_addr);
6720             int bufsize=BUFSIZE;int h_errno;
6721                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6722                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6726   rm -rf conftest*
6727   ol_cv_func_gethostbyaddr_r_nargs7=yes
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   ol_cv_func_gethostbyaddr_r_nargs7=no
6733 fi
6734 rm -f conftest*
6735
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;
6746                 struct hostent *rhent; char buffer[BUFSIZE]; 
6747                 struct in_addr add;
6748                 size_t alen=sizeof(struct in_addr);
6749                 int bufsize=BUFSIZE;int h_errno;
6750                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6751                         alen, AF_INET, &hent, buffer, bufsize, 
6752                         &rhent, &h_errno);
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6756   rm -rf conftest*
6757   ol_cv_func_gethostbyaddr_r_nargs8=yes
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   ol_cv_func_gethostbyaddr_r_nargs8=no
6763 fi
6764 rm -f conftest*
6765
6766         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6767                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6768
6769                 ol_cv_func_gethostbyaddr_r_nargs=7
6770
6771         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6772                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6773
6774                 ol_cv_func_gethostbyaddr_r_nargs=8
6775
6776         else
6777                 ol_cv_func_gethostbyaddr_r_nargs=0
6778         fi
6779   
6780 fi
6781
6782 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6783   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6784     cat >> confdefs.h <<EOF
6785 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6786 EOF
6787
6788   fi
6789
6790 else
6791         ol_cv_func_gethostbyaddr_r_nargs=0
6792 fi
6793
6794 if test "$ac_cv_func_ctime_r" = yes \
6795         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6796         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6797         -a "$ac_cv_func_gethostbyname_r" = yes \
6798         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6799         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6800         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6801         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6802         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6803         ; then
6804  
6805         cat >> confdefs.h <<\EOF
6806 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6807 EOF
6808
6809 fi
6810
6811 ol_link_threads=no
6812
6813 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6814         -o $ol_with_threads = nt ; then
6815
6816         
6817         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6818 echo "configure:6819: checking for NT Threads" >&5
6819 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6820   echo $ac_n "(cached) $ac_c" 1>&6
6821 else
6822   
6823                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6824 echo "configure:6825: checking for _beginthread" >&5
6825 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* System header to define __stub macros and hopefully few prototypes,
6832     which can conflict with char _beginthread(); below.  */
6833 #include <assert.h>
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char _beginthread();
6838 char (*f)();
6839
6840 int main() {
6841
6842 /* The GNU C library defines this for functions which it implements
6843     to always fail with ENOSYS.  Some functions are actually named
6844     something starting with __ and the normal name is an alias.  */
6845 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6846 choke me
6847 #else
6848 f = _beginthread;
6849 #endif
6850
6851 ; return 0; }
6852 EOF
6853 if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6854   rm -rf conftest*
6855   eval "ac_cv_func__beginthread=yes"
6856 else
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -rf conftest*
6860   eval "ac_cv_func__beginthread=no"
6861 fi
6862 rm -f conftest*
6863 fi
6864
6865 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6866   echo "$ac_t""yes" 1>&6
6867   ol_cv_nt_threads=yes
6868 else
6869   echo "$ac_t""no" 1>&6
6870 ol_cv_nt_threads=no
6871 fi
6872
6873         
6874 fi
6875
6876 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6877
6878         if test $ol_cv_nt_threads = yes ; then
6879                 cat >> confdefs.h <<\EOF
6880 #define HAVE_NT_THREADS 1
6881 EOF
6882
6883         fi
6884
6885
6886         if test "$ol_cv_nt_threads" = yes ; then
6887         ol_link_threads=nt
6888         ol_with_threads=found
6889         ol_with_yielding_select=yes
6890
6891                 cat >> confdefs.h <<\EOF
6892 #define HAVE_NT_SERVICE_MANAGER 1
6893 EOF
6894
6895                 cat >> confdefs.h <<\EOF
6896 #define HAVE_NT_EVENT_LOG 1
6897 EOF
6898
6899         fi
6900
6901         if test $ol_with_threads = nt ; then
6902                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6903         fi
6904 fi
6905
6906 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6907         -o $ol_with_threads = posix ; then
6908
6909         for ac_hdr in pthread.h
6910 do
6911 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6912 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6913 echo "configure:6914: checking for $ac_hdr" >&5
6914 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6915   echo $ac_n "(cached) $ac_c" 1>&6
6916 else
6917   cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6920 #include <$ac_hdr>
6921 EOF
6922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6923 { (eval echo configure:6924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6925 if test -z "$ac_err"; then
6926   rm -rf conftest*
6927   eval "ac_cv_header_$ac_safe=yes"
6928 else
6929   echo "$ac_err" >&5
6930   echo "configure: failed program was:" >&5
6931   cat conftest.$ac_ext >&5
6932   rm -rf conftest*
6933   eval "ac_cv_header_$ac_safe=no"
6934 fi
6935 rm -f conftest*
6936 fi
6937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6938   echo "$ac_t""yes" 1>&6
6939     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6940   cat >> confdefs.h <<EOF
6941 #define $ac_tr_hdr 1
6942 EOF
6943  
6944 else
6945   echo "$ac_t""no" 1>&6
6946 fi
6947 done
6948
6949
6950         if test $ac_cv_header_pthread_h = yes ; then
6951                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6952 echo "configure:6953: checking POSIX thread version" >&5
6953 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6954   echo $ac_n "(cached) $ac_c" 1>&6
6955 else
6956   
6957         cat > conftest.$ac_ext <<EOF
6958 #line 6959 "configure"
6959 #include "confdefs.h"
6960
6961 #               include <pthread.h>
6962                 /* this check could be improved */
6963 #               ifdef PTHREAD_ONCE_INIT
6964                         pthread_version_final;
6965 #               endif
6966         
6967 EOF
6968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6969   egrep "pthread_version_final" >/dev/null 2>&1; then
6970   rm -rf conftest*
6971   ol_pthread_final=yes
6972 else
6973   rm -rf conftest*
6974   ol_pthread_final=no
6975 fi
6976 rm -f conftest*
6977
6978
6979         cat > conftest.$ac_ext <<EOF
6980 #line 6981 "configure"
6981 #include "confdefs.h"
6982
6983 #               include <pthread.h>
6984                 /* this check could be improved */
6985 #               ifdef pthread_once_init
6986                         pthread_version_draft4;
6987 #               endif
6988         
6989 EOF
6990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6991   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6992   rm -rf conftest*
6993   ol_pthread_draft4=yes
6994 else
6995   rm -rf conftest*
6996   ol_pthread_draft4=no
6997 fi
6998 rm -f conftest*
6999
7000
7001         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7002                 ol_cv_pthread_version=final
7003         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7004                 ol_cv_pthread_version=draft4
7005         else
7006                 ol_cv_pthread_version=unknown
7007         fi
7008
7009 fi
7010
7011 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7012
7013
7014                 if test $ol_cv_pthread_version = final ; then
7015                         cat >> confdefs.h <<\EOF
7016 #define HAVE_PTHREADS_FINAL 1
7017 EOF
7018
7019                 elif test $ol_cv_pthread_version = draft4 ; then
7020                         cat >> confdefs.h <<\EOF
7021 #define HAVE_PTHREADS_D4 1
7022 EOF
7023
7024                 else
7025                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7026                 fi
7027
7028                 # consider threads found
7029                 ol_with_threads=found
7030
7031                 
7032         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7033 echo "configure:7034: checking for LinuxThreads pthread.h" >&5
7034 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7035   echo $ac_n "(cached) $ac_c" 1>&6
7036 else
7037   cat > conftest.$ac_ext <<EOF
7038 #line 7039 "configure"
7039 #include "confdefs.h"
7040 #include <pthread.h>
7041 EOF
7042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7043   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7044   rm -rf conftest*
7045   ol_cv_header_linux_threads=yes
7046 else
7047   rm -rf conftest*
7048   ol_cv_header_linux_threads=no
7049 fi
7050 rm -f conftest*
7051
7052                 
7053 fi
7054
7055 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7056         if test $ol_cv_header_linux_threads = yes; then
7057                 cat >> confdefs.h <<\EOF
7058 #define HAVE_LINUX_THREADS 1
7059 EOF
7060
7061         fi
7062
7063                 
7064         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7065 echo "configure:7066: checking for GNU Pth pthread.h" >&5
7066 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7067   echo $ac_n "(cached) $ac_c" 1>&6
7068 else
7069   cat > conftest.$ac_ext <<EOF
7070 #line 7071 "configure"
7071 #include "confdefs.h"
7072 #include <pthread.h>
7073 #ifdef _POSIX_THREAD_IS_GNU_PTH
7074         __gnu_pth__;
7075 #endif
7076
7077 EOF
7078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7079   egrep "__gnu_pth__" >/dev/null 2>&1; then
7080   rm -rf conftest*
7081   ol_cv_header_gnu_pth_pthread_h=yes
7082 else
7083   rm -rf conftest*
7084   ol_cv_header_gnu_pth_pthread_h=no
7085 fi
7086 rm -f conftest*
7087
7088                 
7089 fi
7090
7091 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7092
7093
7094                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7095                         for ac_hdr in sched.h
7096 do
7097 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7098 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7099 echo "configure:7100: checking for $ac_hdr" >&5
7100 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7101   echo $ac_n "(cached) $ac_c" 1>&6
7102 else
7103   cat > conftest.$ac_ext <<EOF
7104 #line 7105 "configure"
7105 #include "confdefs.h"
7106 #include <$ac_hdr>
7107 EOF
7108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7109 { (eval echo configure:7110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7111 if test -z "$ac_err"; then
7112   rm -rf conftest*
7113   eval "ac_cv_header_$ac_safe=yes"
7114 else
7115   echo "$ac_err" >&5
7116   echo "configure: failed program was:" >&5
7117   cat conftest.$ac_ext >&5
7118   rm -rf conftest*
7119   eval "ac_cv_header_$ac_safe=no"
7120 fi
7121 rm -f conftest*
7122 fi
7123 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7124   echo "$ac_t""yes" 1>&6
7125     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7126   cat >> confdefs.h <<EOF
7127 #define $ac_tr_hdr 1
7128 EOF
7129  
7130 else
7131   echo "$ac_t""no" 1>&6
7132 fi
7133 done
7134
7135                 fi
7136
7137                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7138                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7139 echo "configure:7140: checking for pthread_create in default libraries" >&5
7140 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7141   echo $ac_n "(cached) $ac_c" 1>&6
7142 else
7143   
7144                 if test "$cross_compiling" = yes; then
7145   cat > conftest.$ac_ext <<EOF
7146 #line 7147 "configure"
7147 #include "confdefs.h"
7148 /* pthread test headers */
7149 #include <pthread.h>
7150 #ifndef NULL
7151 #define NULL (void*)0
7152 #endif
7153
7154 static void *task(p)
7155         void *p;
7156 {
7157         return (void *) (p == NULL);
7158 }
7159
7160 int main() {
7161
7162         /* pthread test function */
7163         pthread_t t;
7164         int status;
7165 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7166         /* This system (e.g. AIX) defaults detached; must override */
7167         pthread_attr_t attr;
7168
7169         status = pthread_attr_init(&attr);
7170         if( status ) exit( status );
7171
7172         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7173         if( status ) exit( status );
7174
7175 #define ATTR    &attr
7176 #else
7177 #if HAVE_PTHREADS_D4
7178 #define ATTR    pthread_attr_default
7179 #else
7180 #define ATTR    NULL
7181 #endif
7182 #endif
7183         /* make sure pthread_create() isn't just a stub */
7184         status = pthread_create(&t, ATTR, task, NULL);
7185         if( status ) exit( status );
7186
7187         /* make sure pthread_detach() isn't just a stub */
7188 #if HAVE_PTHREADS_D4
7189         status = pthread_detach( &t );
7190 #else
7191         status = pthread_detach( t );
7192 #endif
7193
7194 #ifdef HAVE_LINUX_THREADS
7195         pthread_kill_other_threads_np();
7196 #endif
7197
7198         exit( status );
7199
7200 ; return 0; }
7201 EOF
7202 if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7203   rm -rf conftest*
7204   ol_cv_pthread_create=yes
7205 else
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208   rm -rf conftest*
7209   ol_cv_pthread_create=no
7210 fi
7211 rm -f conftest*
7212 else
7213   cat > conftest.$ac_ext <<EOF
7214 #line 7215 "configure"
7215 #include "confdefs.h"
7216 /* pthread test headers */
7217 #include <pthread.h>
7218 #ifndef NULL
7219 #define NULL (void*)0
7220 #endif
7221
7222 static void *task(p)
7223         void *p;
7224 {
7225         return (void *) (p == NULL);
7226 }
7227
7228
7229 int main(argc, argv)
7230         int argc;
7231         char **argv;
7232 {
7233
7234         /* pthread test function */
7235         pthread_t t;
7236         int status;
7237 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7238         /* This system (e.g. AIX) defaults detached; must override */
7239         pthread_attr_t attr;
7240
7241         status = pthread_attr_init(&attr);
7242         if( status ) exit( status );
7243
7244         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7245         if( status ) exit( status );
7246
7247 #define ATTR    &attr
7248 #else
7249 #if HAVE_PTHREADS_D4
7250 #define ATTR    pthread_attr_default
7251 #else
7252 #define ATTR    NULL
7253 #endif
7254 #endif
7255         /* make sure pthread_create() isn't just a stub */
7256         status = pthread_create(&t, ATTR, task, NULL);
7257         if( status ) exit( status );
7258
7259         /* make sure pthread_detach() isn't just a stub */
7260 #if HAVE_PTHREADS_D4
7261         status = pthread_detach( &t );
7262 #else
7263         status = pthread_detach( t );
7264 #endif
7265
7266 #ifdef HAVE_LINUX_THREADS
7267         pthread_kill_other_threads_np();
7268 #endif
7269
7270         exit( status );
7271
7272 }
7273
7274 EOF
7275 if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7276 then
7277   ol_cv_pthread_create=yes
7278 else
7279   echo "configure: failed program was:" >&5
7280   cat conftest.$ac_ext >&5
7281   rm -fr conftest*
7282   ol_cv_pthread_create=no
7283 fi
7284 rm -fr conftest*
7285 fi
7286
7287 fi
7288
7289 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7290
7291                 if test $ol_cv_pthread_create != no ; then
7292                         ol_link_threads=posix
7293                         ol_link_pthreads=""
7294                 fi
7295                 
7296                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7297 if test "$ol_link_threads" = no ; then
7298         # try -kthread
7299         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7300 echo "configure:7301: checking for pthread link with -kthread" >&5
7301 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7302   echo $ac_n "(cached) $ac_c" 1>&6
7303 else
7304   
7305                 # save the flags
7306                 ol_LIBS="$LIBS"
7307                 LIBS="-kthread $LIBS"
7308
7309                 if test "$cross_compiling" = yes; then
7310   cat > conftest.$ac_ext <<EOF
7311 #line 7312 "configure"
7312 #include "confdefs.h"
7313 /* pthread test headers */
7314 #include <pthread.h>
7315 #ifndef NULL
7316 #define NULL (void*)0
7317 #endif
7318
7319 static void *task(p)
7320         void *p;
7321 {
7322         return (void *) (p == NULL);
7323 }
7324
7325 int main() {
7326
7327         /* pthread test function */
7328         pthread_t t;
7329         int status;
7330 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7331         /* This system (e.g. AIX) defaults detached; must override */
7332         pthread_attr_t attr;
7333
7334         status = pthread_attr_init(&attr);
7335         if( status ) exit( status );
7336
7337         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7338         if( status ) exit( status );
7339
7340 #define ATTR    &attr
7341 #else
7342 #if HAVE_PTHREADS_D4
7343 #define ATTR    pthread_attr_default
7344 #else
7345 #define ATTR    NULL
7346 #endif
7347 #endif
7348         /* make sure pthread_create() isn't just a stub */
7349         status = pthread_create(&t, ATTR, task, NULL);
7350         if( status ) exit( status );
7351
7352         /* make sure pthread_detach() isn't just a stub */
7353 #if HAVE_PTHREADS_D4
7354         status = pthread_detach( &t );
7355 #else
7356         status = pthread_detach( t );
7357 #endif
7358
7359 #ifdef HAVE_LINUX_THREADS
7360         pthread_kill_other_threads_np();
7361 #endif
7362
7363         exit( status );
7364
7365 ; return 0; }
7366 EOF
7367 if { (eval echo configure:7368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7368   rm -rf conftest*
7369   ol_cv_pthread_kthread=yes
7370 else
7371   echo "configure: failed program was:" >&5
7372   cat conftest.$ac_ext >&5
7373   rm -rf conftest*
7374   ol_cv_pthread_kthread=no
7375 fi
7376 rm -f conftest*
7377 else
7378   cat > conftest.$ac_ext <<EOF
7379 #line 7380 "configure"
7380 #include "confdefs.h"
7381 /* pthread test headers */
7382 #include <pthread.h>
7383 #ifndef NULL
7384 #define NULL (void*)0
7385 #endif
7386
7387 static void *task(p)
7388         void *p;
7389 {
7390         return (void *) (p == NULL);
7391 }
7392
7393
7394 int main(argc, argv)
7395         int argc;
7396         char **argv;
7397 {
7398
7399         /* pthread test function */
7400         pthread_t t;
7401         int status;
7402 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7403         /* This system (e.g. AIX) defaults detached; must override */
7404         pthread_attr_t attr;
7405
7406         status = pthread_attr_init(&attr);
7407         if( status ) exit( status );
7408
7409         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7410         if( status ) exit( status );
7411
7412 #define ATTR    &attr
7413 #else
7414 #if HAVE_PTHREADS_D4
7415 #define ATTR    pthread_attr_default
7416 #else
7417 #define ATTR    NULL
7418 #endif
7419 #endif
7420         /* make sure pthread_create() isn't just a stub */
7421         status = pthread_create(&t, ATTR, task, NULL);
7422         if( status ) exit( status );
7423
7424         /* make sure pthread_detach() isn't just a stub */
7425 #if HAVE_PTHREADS_D4
7426         status = pthread_detach( &t );
7427 #else
7428         status = pthread_detach( t );
7429 #endif
7430
7431 #ifdef HAVE_LINUX_THREADS
7432         pthread_kill_other_threads_np();
7433 #endif
7434
7435         exit( status );
7436
7437 }
7438
7439 EOF
7440 if { (eval echo configure:7441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7441 then
7442   ol_cv_pthread_kthread=yes
7443 else
7444   echo "configure: failed program was:" >&5
7445   cat conftest.$ac_ext >&5
7446   rm -fr conftest*
7447   ol_cv_pthread_kthread=no
7448 fi
7449 rm -fr conftest*
7450 fi
7451
7452
7453                 # restore the LIBS
7454                 LIBS="$ol_LIBS"
7455         
7456 fi
7457
7458 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7459
7460         if test $ol_cv_pthread_kthread = yes ; then
7461                 ol_link_pthreads="-kthread"
7462                 ol_link_threads=posix
7463         fi
7464 fi
7465
7466                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7467 if test "$ol_link_threads" = no ; then
7468         # try -pthread
7469         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7470 echo "configure:7471: checking for pthread link with -pthread" >&5
7471 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7472   echo $ac_n "(cached) $ac_c" 1>&6
7473 else
7474   
7475                 # save the flags
7476                 ol_LIBS="$LIBS"
7477                 LIBS="-pthread $LIBS"
7478
7479                 if test "$cross_compiling" = yes; then
7480   cat > conftest.$ac_ext <<EOF
7481 #line 7482 "configure"
7482 #include "confdefs.h"
7483 /* pthread test headers */
7484 #include <pthread.h>
7485 #ifndef NULL
7486 #define NULL (void*)0
7487 #endif
7488
7489 static void *task(p)
7490         void *p;
7491 {
7492         return (void *) (p == NULL);
7493 }
7494
7495 int main() {
7496
7497         /* pthread test function */
7498         pthread_t t;
7499         int status;
7500 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7501         /* This system (e.g. AIX) defaults detached; must override */
7502         pthread_attr_t attr;
7503
7504         status = pthread_attr_init(&attr);
7505         if( status ) exit( status );
7506
7507         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7508         if( status ) exit( status );
7509
7510 #define ATTR    &attr
7511 #else
7512 #if HAVE_PTHREADS_D4
7513 #define ATTR    pthread_attr_default
7514 #else
7515 #define ATTR    NULL
7516 #endif
7517 #endif
7518         /* make sure pthread_create() isn't just a stub */
7519         status = pthread_create(&t, ATTR, task, NULL);
7520         if( status ) exit( status );
7521
7522         /* make sure pthread_detach() isn't just a stub */
7523 #if HAVE_PTHREADS_D4
7524         status = pthread_detach( &t );
7525 #else
7526         status = pthread_detach( t );
7527 #endif
7528
7529 #ifdef HAVE_LINUX_THREADS
7530         pthread_kill_other_threads_np();
7531 #endif
7532
7533         exit( status );
7534
7535 ; return 0; }
7536 EOF
7537 if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7538   rm -rf conftest*
7539   ol_cv_pthread_pthread=yes
7540 else
7541   echo "configure: failed program was:" >&5
7542   cat conftest.$ac_ext >&5
7543   rm -rf conftest*
7544   ol_cv_pthread_pthread=no
7545 fi
7546 rm -f conftest*
7547 else
7548   cat > conftest.$ac_ext <<EOF
7549 #line 7550 "configure"
7550 #include "confdefs.h"
7551 /* pthread test headers */
7552 #include <pthread.h>
7553 #ifndef NULL
7554 #define NULL (void*)0
7555 #endif
7556
7557 static void *task(p)
7558         void *p;
7559 {
7560         return (void *) (p == NULL);
7561 }
7562
7563
7564 int main(argc, argv)
7565         int argc;
7566         char **argv;
7567 {
7568
7569         /* pthread test function */
7570         pthread_t t;
7571         int status;
7572 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7573         /* This system (e.g. AIX) defaults detached; must override */
7574         pthread_attr_t attr;
7575
7576         status = pthread_attr_init(&attr);
7577         if( status ) exit( status );
7578
7579         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7580         if( status ) exit( status );
7581
7582 #define ATTR    &attr
7583 #else
7584 #if HAVE_PTHREADS_D4
7585 #define ATTR    pthread_attr_default
7586 #else
7587 #define ATTR    NULL
7588 #endif
7589 #endif
7590         /* make sure pthread_create() isn't just a stub */
7591         status = pthread_create(&t, ATTR, task, NULL);
7592         if( status ) exit( status );
7593
7594         /* make sure pthread_detach() isn't just a stub */
7595 #if HAVE_PTHREADS_D4
7596         status = pthread_detach( &t );
7597 #else
7598         status = pthread_detach( t );
7599 #endif
7600
7601 #ifdef HAVE_LINUX_THREADS
7602         pthread_kill_other_threads_np();
7603 #endif
7604
7605         exit( status );
7606
7607 }
7608
7609 EOF
7610 if { (eval echo configure:7611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7611 then
7612   ol_cv_pthread_pthread=yes
7613 else
7614   echo "configure: failed program was:" >&5
7615   cat conftest.$ac_ext >&5
7616   rm -fr conftest*
7617   ol_cv_pthread_pthread=no
7618 fi
7619 rm -fr conftest*
7620 fi
7621
7622
7623                 # restore the LIBS
7624                 LIBS="$ol_LIBS"
7625         
7626 fi
7627
7628 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7629
7630         if test $ol_cv_pthread_pthread = yes ; then
7631                 ol_link_pthreads="-pthread"
7632                 ol_link_threads=posix
7633         fi
7634 fi
7635
7636                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7637 if test "$ol_link_threads" = no ; then
7638         # try -pthreads
7639         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7640 echo "configure:7641: checking for pthread link with -pthreads" >&5
7641 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7642   echo $ac_n "(cached) $ac_c" 1>&6
7643 else
7644   
7645                 # save the flags
7646                 ol_LIBS="$LIBS"
7647                 LIBS="-pthreads $LIBS"
7648
7649                 if test "$cross_compiling" = yes; then
7650   cat > conftest.$ac_ext <<EOF
7651 #line 7652 "configure"
7652 #include "confdefs.h"
7653 /* pthread test headers */
7654 #include <pthread.h>
7655 #ifndef NULL
7656 #define NULL (void*)0
7657 #endif
7658
7659 static void *task(p)
7660         void *p;
7661 {
7662         return (void *) (p == NULL);
7663 }
7664
7665 int main() {
7666
7667         /* pthread test function */
7668         pthread_t t;
7669         int status;
7670 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7671         /* This system (e.g. AIX) defaults detached; must override */
7672         pthread_attr_t attr;
7673
7674         status = pthread_attr_init(&attr);
7675         if( status ) exit( status );
7676
7677         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7678         if( status ) exit( status );
7679
7680 #define ATTR    &attr
7681 #else
7682 #if HAVE_PTHREADS_D4
7683 #define ATTR    pthread_attr_default
7684 #else
7685 #define ATTR    NULL
7686 #endif
7687 #endif
7688         /* make sure pthread_create() isn't just a stub */
7689         status = pthread_create(&t, ATTR, task, NULL);
7690         if( status ) exit( status );
7691
7692         /* make sure pthread_detach() isn't just a stub */
7693 #if HAVE_PTHREADS_D4
7694         status = pthread_detach( &t );
7695 #else
7696         status = pthread_detach( t );
7697 #endif
7698
7699 #ifdef HAVE_LINUX_THREADS
7700         pthread_kill_other_threads_np();
7701 #endif
7702
7703         exit( status );
7704
7705 ; return 0; }
7706 EOF
7707 if { (eval echo configure:7708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7708   rm -rf conftest*
7709   ol_cv_pthread_pthreads=yes
7710 else
7711   echo "configure: failed program was:" >&5
7712   cat conftest.$ac_ext >&5
7713   rm -rf conftest*
7714   ol_cv_pthread_pthreads=no
7715 fi
7716 rm -f conftest*
7717 else
7718   cat > conftest.$ac_ext <<EOF
7719 #line 7720 "configure"
7720 #include "confdefs.h"
7721 /* pthread test headers */
7722 #include <pthread.h>
7723 #ifndef NULL
7724 #define NULL (void*)0
7725 #endif
7726
7727 static void *task(p)
7728         void *p;
7729 {
7730         return (void *) (p == NULL);
7731 }
7732
7733
7734 int main(argc, argv)
7735         int argc;
7736         char **argv;
7737 {
7738
7739         /* pthread test function */
7740         pthread_t t;
7741         int status;
7742 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7743         /* This system (e.g. AIX) defaults detached; must override */
7744         pthread_attr_t attr;
7745
7746         status = pthread_attr_init(&attr);
7747         if( status ) exit( status );
7748
7749         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7750         if( status ) exit( status );
7751
7752 #define ATTR    &attr
7753 #else
7754 #if HAVE_PTHREADS_D4
7755 #define ATTR    pthread_attr_default
7756 #else
7757 #define ATTR    NULL
7758 #endif
7759 #endif
7760         /* make sure pthread_create() isn't just a stub */
7761         status = pthread_create(&t, ATTR, task, NULL);
7762         if( status ) exit( status );
7763
7764         /* make sure pthread_detach() isn't just a stub */
7765 #if HAVE_PTHREADS_D4
7766         status = pthread_detach( &t );
7767 #else
7768         status = pthread_detach( t );
7769 #endif
7770
7771 #ifdef HAVE_LINUX_THREADS
7772         pthread_kill_other_threads_np();
7773 #endif
7774
7775         exit( status );
7776
7777 }
7778
7779 EOF
7780 if { (eval echo configure:7781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7781 then
7782   ol_cv_pthread_pthreads=yes
7783 else
7784   echo "configure: failed program was:" >&5
7785   cat conftest.$ac_ext >&5
7786   rm -fr conftest*
7787   ol_cv_pthread_pthreads=no
7788 fi
7789 rm -fr conftest*
7790 fi
7791
7792
7793                 # restore the LIBS
7794                 LIBS="$ol_LIBS"
7795         
7796 fi
7797
7798 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7799
7800         if test $ol_cv_pthread_pthreads = yes ; then
7801                 ol_link_pthreads="-pthreads"
7802                 ol_link_threads=posix
7803         fi
7804 fi
7805
7806                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7807 if test "$ol_link_threads" = no ; then
7808         # try -mthreads
7809         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7810 echo "configure:7811: checking for pthread link with -mthreads" >&5
7811 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7812   echo $ac_n "(cached) $ac_c" 1>&6
7813 else
7814   
7815                 # save the flags
7816                 ol_LIBS="$LIBS"
7817                 LIBS="-mthreads $LIBS"
7818
7819                 if test "$cross_compiling" = yes; then
7820   cat > conftest.$ac_ext <<EOF
7821 #line 7822 "configure"
7822 #include "confdefs.h"
7823 /* pthread test headers */
7824 #include <pthread.h>
7825 #ifndef NULL
7826 #define NULL (void*)0
7827 #endif
7828
7829 static void *task(p)
7830         void *p;
7831 {
7832         return (void *) (p == NULL);
7833 }
7834
7835 int main() {
7836
7837         /* pthread test function */
7838         pthread_t t;
7839         int status;
7840 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7841         /* This system (e.g. AIX) defaults detached; must override */
7842         pthread_attr_t attr;
7843
7844         status = pthread_attr_init(&attr);
7845         if( status ) exit( status );
7846
7847         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7848         if( status ) exit( status );
7849
7850 #define ATTR    &attr
7851 #else
7852 #if HAVE_PTHREADS_D4
7853 #define ATTR    pthread_attr_default
7854 #else
7855 #define ATTR    NULL
7856 #endif
7857 #endif
7858         /* make sure pthread_create() isn't just a stub */
7859         status = pthread_create(&t, ATTR, task, NULL);
7860         if( status ) exit( status );
7861
7862         /* make sure pthread_detach() isn't just a stub */
7863 #if HAVE_PTHREADS_D4
7864         status = pthread_detach( &t );
7865 #else
7866         status = pthread_detach( t );
7867 #endif
7868
7869 #ifdef HAVE_LINUX_THREADS
7870         pthread_kill_other_threads_np();
7871 #endif
7872
7873         exit( status );
7874
7875 ; return 0; }
7876 EOF
7877 if { (eval echo configure:7878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7878   rm -rf conftest*
7879   ol_cv_pthread_mthreads=yes
7880 else
7881   echo "configure: failed program was:" >&5
7882   cat conftest.$ac_ext >&5
7883   rm -rf conftest*
7884   ol_cv_pthread_mthreads=no
7885 fi
7886 rm -f conftest*
7887 else
7888   cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891 /* pthread test headers */
7892 #include <pthread.h>
7893 #ifndef NULL
7894 #define NULL (void*)0
7895 #endif
7896
7897 static void *task(p)
7898         void *p;
7899 {
7900         return (void *) (p == NULL);
7901 }
7902
7903
7904 int main(argc, argv)
7905         int argc;
7906         char **argv;
7907 {
7908
7909         /* pthread test function */
7910         pthread_t t;
7911         int status;
7912 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7913         /* This system (e.g. AIX) defaults detached; must override */
7914         pthread_attr_t attr;
7915
7916         status = pthread_attr_init(&attr);
7917         if( status ) exit( status );
7918
7919         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7920         if( status ) exit( status );
7921
7922 #define ATTR    &attr
7923 #else
7924 #if HAVE_PTHREADS_D4
7925 #define ATTR    pthread_attr_default
7926 #else
7927 #define ATTR    NULL
7928 #endif
7929 #endif
7930         /* make sure pthread_create() isn't just a stub */
7931         status = pthread_create(&t, ATTR, task, NULL);
7932         if( status ) exit( status );
7933
7934         /* make sure pthread_detach() isn't just a stub */
7935 #if HAVE_PTHREADS_D4
7936         status = pthread_detach( &t );
7937 #else
7938         status = pthread_detach( t );
7939 #endif
7940
7941 #ifdef HAVE_LINUX_THREADS
7942         pthread_kill_other_threads_np();
7943 #endif
7944
7945         exit( status );
7946
7947 }
7948
7949 EOF
7950 if { (eval echo configure:7951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7951 then
7952   ol_cv_pthread_mthreads=yes
7953 else
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -fr conftest*
7957   ol_cv_pthread_mthreads=no
7958 fi
7959 rm -fr conftest*
7960 fi
7961
7962
7963                 # restore the LIBS
7964                 LIBS="$ol_LIBS"
7965         
7966 fi
7967
7968 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7969
7970         if test $ol_cv_pthread_mthreads = yes ; then
7971                 ol_link_pthreads="-mthreads"
7972                 ol_link_threads=posix
7973         fi
7974 fi
7975
7976                 # Pthread try link: -thread (ol_cv_pthread_thread)
7977 if test "$ol_link_threads" = no ; then
7978         # try -thread
7979         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7980 echo "configure:7981: checking for pthread link with -thread" >&5
7981 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7982   echo $ac_n "(cached) $ac_c" 1>&6
7983 else
7984   
7985                 # save the flags
7986                 ol_LIBS="$LIBS"
7987                 LIBS="-thread $LIBS"
7988
7989                 if test "$cross_compiling" = yes; then
7990   cat > conftest.$ac_ext <<EOF
7991 #line 7992 "configure"
7992 #include "confdefs.h"
7993 /* pthread test headers */
7994 #include <pthread.h>
7995 #ifndef NULL
7996 #define NULL (void*)0
7997 #endif
7998
7999 static void *task(p)
8000         void *p;
8001 {
8002         return (void *) (p == NULL);
8003 }
8004
8005 int main() {
8006
8007         /* pthread test function */
8008         pthread_t t;
8009         int status;
8010 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8011         /* This system (e.g. AIX) defaults detached; must override */
8012         pthread_attr_t attr;
8013
8014         status = pthread_attr_init(&attr);
8015         if( status ) exit( status );
8016
8017         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8018         if( status ) exit( status );
8019
8020 #define ATTR    &attr
8021 #else
8022 #if HAVE_PTHREADS_D4
8023 #define ATTR    pthread_attr_default
8024 #else
8025 #define ATTR    NULL
8026 #endif
8027 #endif
8028         /* make sure pthread_create() isn't just a stub */
8029         status = pthread_create(&t, ATTR, task, NULL);
8030         if( status ) exit( status );
8031
8032         /* make sure pthread_detach() isn't just a stub */
8033 #if HAVE_PTHREADS_D4
8034         status = pthread_detach( &t );
8035 #else
8036         status = pthread_detach( t );
8037 #endif
8038
8039 #ifdef HAVE_LINUX_THREADS
8040         pthread_kill_other_threads_np();
8041 #endif
8042
8043         exit( status );
8044
8045 ; return 0; }
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8048   rm -rf conftest*
8049   ol_cv_pthread_thread=yes
8050 else
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -rf conftest*
8054   ol_cv_pthread_thread=no
8055 fi
8056 rm -f conftest*
8057 else
8058   cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061 /* pthread test headers */
8062 #include <pthread.h>
8063 #ifndef NULL
8064 #define NULL (void*)0
8065 #endif
8066
8067 static void *task(p)
8068         void *p;
8069 {
8070         return (void *) (p == NULL);
8071 }
8072
8073
8074 int main(argc, argv)
8075         int argc;
8076         char **argv;
8077 {
8078
8079         /* pthread test function */
8080         pthread_t t;
8081         int status;
8082 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8083         /* This system (e.g. AIX) defaults detached; must override */
8084         pthread_attr_t attr;
8085
8086         status = pthread_attr_init(&attr);
8087         if( status ) exit( status );
8088
8089         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8090         if( status ) exit( status );
8091
8092 #define ATTR    &attr
8093 #else
8094 #if HAVE_PTHREADS_D4
8095 #define ATTR    pthread_attr_default
8096 #else
8097 #define ATTR    NULL
8098 #endif
8099 #endif
8100         /* make sure pthread_create() isn't just a stub */
8101         status = pthread_create(&t, ATTR, task, NULL);
8102         if( status ) exit( status );
8103
8104         /* make sure pthread_detach() isn't just a stub */
8105 #if HAVE_PTHREADS_D4
8106         status = pthread_detach( &t );
8107 #else
8108         status = pthread_detach( t );
8109 #endif
8110
8111 #ifdef HAVE_LINUX_THREADS
8112         pthread_kill_other_threads_np();
8113 #endif
8114
8115         exit( status );
8116
8117 }
8118
8119 EOF
8120 if { (eval echo configure:8121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8121 then
8122   ol_cv_pthread_thread=yes
8123 else
8124   echo "configure: failed program was:" >&5
8125   cat conftest.$ac_ext >&5
8126   rm -fr conftest*
8127   ol_cv_pthread_thread=no
8128 fi
8129 rm -fr conftest*
8130 fi
8131
8132
8133                 # restore the LIBS
8134                 LIBS="$ol_LIBS"
8135         
8136 fi
8137
8138 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8139
8140         if test $ol_cv_pthread_thread = yes ; then
8141                 ol_link_pthreads="-thread"
8142                 ol_link_threads=posix
8143         fi
8144 fi
8145
8146
8147                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8148 if test "$ol_link_threads" = no ; then
8149         # try -lpthread -lmach -lexc -lc_r
8150         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8151 echo "configure:8152: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8152 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8153   echo $ac_n "(cached) $ac_c" 1>&6
8154 else
8155   
8156                 # save the flags
8157                 ol_LIBS="$LIBS"
8158                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8159
8160                 if test "$cross_compiling" = yes; then
8161   cat > conftest.$ac_ext <<EOF
8162 #line 8163 "configure"
8163 #include "confdefs.h"
8164 /* pthread test headers */
8165 #include <pthread.h>
8166 #ifndef NULL
8167 #define NULL (void*)0
8168 #endif
8169
8170 static void *task(p)
8171         void *p;
8172 {
8173         return (void *) (p == NULL);
8174 }
8175
8176 int main() {
8177
8178         /* pthread test function */
8179         pthread_t t;
8180         int status;
8181 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8182         /* This system (e.g. AIX) defaults detached; must override */
8183         pthread_attr_t attr;
8184
8185         status = pthread_attr_init(&attr);
8186         if( status ) exit( status );
8187
8188         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8189         if( status ) exit( status );
8190
8191 #define ATTR    &attr
8192 #else
8193 #if HAVE_PTHREADS_D4
8194 #define ATTR    pthread_attr_default
8195 #else
8196 #define ATTR    NULL
8197 #endif
8198 #endif
8199         /* make sure pthread_create() isn't just a stub */
8200         status = pthread_create(&t, ATTR, task, NULL);
8201         if( status ) exit( status );
8202
8203         /* make sure pthread_detach() isn't just a stub */
8204 #if HAVE_PTHREADS_D4
8205         status = pthread_detach( &t );
8206 #else
8207         status = pthread_detach( t );
8208 #endif
8209
8210 #ifdef HAVE_LINUX_THREADS
8211         pthread_kill_other_threads_np();
8212 #endif
8213
8214         exit( status );
8215
8216 ; return 0; }
8217 EOF
8218 if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8219   rm -rf conftest*
8220   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8221 else
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224   rm -rf conftest*
8225   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8226 fi
8227 rm -f conftest*
8228 else
8229   cat > conftest.$ac_ext <<EOF
8230 #line 8231 "configure"
8231 #include "confdefs.h"
8232 /* pthread test headers */
8233 #include <pthread.h>
8234 #ifndef NULL
8235 #define NULL (void*)0
8236 #endif
8237
8238 static void *task(p)
8239         void *p;
8240 {
8241         return (void *) (p == NULL);
8242 }
8243
8244
8245 int main(argc, argv)
8246         int argc;
8247         char **argv;
8248 {
8249
8250         /* pthread test function */
8251         pthread_t t;
8252         int status;
8253 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8254         /* This system (e.g. AIX) defaults detached; must override */
8255         pthread_attr_t attr;
8256
8257         status = pthread_attr_init(&attr);
8258         if( status ) exit( status );
8259
8260         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8261         if( status ) exit( status );
8262
8263 #define ATTR    &attr
8264 #else
8265 #if HAVE_PTHREADS_D4
8266 #define ATTR    pthread_attr_default
8267 #else
8268 #define ATTR    NULL
8269 #endif
8270 #endif
8271         /* make sure pthread_create() isn't just a stub */
8272         status = pthread_create(&t, ATTR, task, NULL);
8273         if( status ) exit( status );
8274
8275         /* make sure pthread_detach() isn't just a stub */
8276 #if HAVE_PTHREADS_D4
8277         status = pthread_detach( &t );
8278 #else
8279         status = pthread_detach( t );
8280 #endif
8281
8282 #ifdef HAVE_LINUX_THREADS
8283         pthread_kill_other_threads_np();
8284 #endif
8285
8286         exit( status );
8287
8288 }
8289
8290 EOF
8291 if { (eval echo configure:8292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8292 then
8293   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8294 else
8295   echo "configure: failed program was:" >&5
8296   cat conftest.$ac_ext >&5
8297   rm -fr conftest*
8298   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8299 fi
8300 rm -fr conftest*
8301 fi
8302
8303
8304                 # restore the LIBS
8305                 LIBS="$ol_LIBS"
8306         
8307 fi
8308
8309 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8310
8311         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8312                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8313                 ol_link_threads=posix
8314         fi
8315 fi
8316
8317                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8318 if test "$ol_link_threads" = no ; then
8319         # try -lpthread -lmach -lexc
8320         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8321 echo "configure:8322: checking for pthread link with -lpthread -lmach -lexc" >&5
8322 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8323   echo $ac_n "(cached) $ac_c" 1>&6
8324 else
8325   
8326                 # save the flags
8327                 ol_LIBS="$LIBS"
8328                 LIBS="-lpthread -lmach -lexc $LIBS"
8329
8330                 if test "$cross_compiling" = yes; then
8331   cat > conftest.$ac_ext <<EOF
8332 #line 8333 "configure"
8333 #include "confdefs.h"
8334 /* pthread test headers */
8335 #include <pthread.h>
8336 #ifndef NULL
8337 #define NULL (void*)0
8338 #endif
8339
8340 static void *task(p)
8341         void *p;
8342 {
8343         return (void *) (p == NULL);
8344 }
8345
8346 int main() {
8347
8348         /* pthread test function */
8349         pthread_t t;
8350         int status;
8351 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8352         /* This system (e.g. AIX) defaults detached; must override */
8353         pthread_attr_t attr;
8354
8355         status = pthread_attr_init(&attr);
8356         if( status ) exit( status );
8357
8358         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8359         if( status ) exit( status );
8360
8361 #define ATTR    &attr
8362 #else
8363 #if HAVE_PTHREADS_D4
8364 #define ATTR    pthread_attr_default
8365 #else
8366 #define ATTR    NULL
8367 #endif
8368 #endif
8369         /* make sure pthread_create() isn't just a stub */
8370         status = pthread_create(&t, ATTR, task, NULL);
8371         if( status ) exit( status );
8372
8373         /* make sure pthread_detach() isn't just a stub */
8374 #if HAVE_PTHREADS_D4
8375         status = pthread_detach( &t );
8376 #else
8377         status = pthread_detach( t );
8378 #endif
8379
8380 #ifdef HAVE_LINUX_THREADS
8381         pthread_kill_other_threads_np();
8382 #endif
8383
8384         exit( status );
8385
8386 ; return 0; }
8387 EOF
8388 if { (eval echo configure:8389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8389   rm -rf conftest*
8390   ol_cv_pthread_lpthread_lmach_lexc=yes
8391 else
8392   echo "configure: failed program was:" >&5
8393   cat conftest.$ac_ext >&5
8394   rm -rf conftest*
8395   ol_cv_pthread_lpthread_lmach_lexc=no
8396 fi
8397 rm -f conftest*
8398 else
8399   cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402 /* pthread test headers */
8403 #include <pthread.h>
8404 #ifndef NULL
8405 #define NULL (void*)0
8406 #endif
8407
8408 static void *task(p)
8409         void *p;
8410 {
8411         return (void *) (p == NULL);
8412 }
8413
8414
8415 int main(argc, argv)
8416         int argc;
8417         char **argv;
8418 {
8419
8420         /* pthread test function */
8421         pthread_t t;
8422         int status;
8423 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8424         /* This system (e.g. AIX) defaults detached; must override */
8425         pthread_attr_t attr;
8426
8427         status = pthread_attr_init(&attr);
8428         if( status ) exit( status );
8429
8430         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8431         if( status ) exit( status );
8432
8433 #define ATTR    &attr
8434 #else
8435 #if HAVE_PTHREADS_D4
8436 #define ATTR    pthread_attr_default
8437 #else
8438 #define ATTR    NULL
8439 #endif
8440 #endif
8441         /* make sure pthread_create() isn't just a stub */
8442         status = pthread_create(&t, ATTR, task, NULL);
8443         if( status ) exit( status );
8444
8445         /* make sure pthread_detach() isn't just a stub */
8446 #if HAVE_PTHREADS_D4
8447         status = pthread_detach( &t );
8448 #else
8449         status = pthread_detach( t );
8450 #endif
8451
8452 #ifdef HAVE_LINUX_THREADS
8453         pthread_kill_other_threads_np();
8454 #endif
8455
8456         exit( status );
8457
8458 }
8459
8460 EOF
8461 if { (eval echo configure:8462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8462 then
8463   ol_cv_pthread_lpthread_lmach_lexc=yes
8464 else
8465   echo "configure: failed program was:" >&5
8466   cat conftest.$ac_ext >&5
8467   rm -fr conftest*
8468   ol_cv_pthread_lpthread_lmach_lexc=no
8469 fi
8470 rm -fr conftest*
8471 fi
8472
8473
8474                 # restore the LIBS
8475                 LIBS="$ol_LIBS"
8476         
8477 fi
8478
8479 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8480
8481         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8482                 ol_link_pthreads="-lpthread -lmach -lexc"
8483                 ol_link_threads=posix
8484         fi
8485 fi
8486
8487
8488                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8489 if test "$ol_link_threads" = no ; then
8490         # try -lpthread -Wl,-woff,85
8491         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8492 echo "configure:8493: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8493 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8494   echo $ac_n "(cached) $ac_c" 1>&6
8495 else
8496   
8497                 # save the flags
8498                 ol_LIBS="$LIBS"
8499                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8500
8501                 if test "$cross_compiling" = yes; then
8502   cat > conftest.$ac_ext <<EOF
8503 #line 8504 "configure"
8504 #include "confdefs.h"
8505 /* pthread test headers */
8506 #include <pthread.h>
8507 #ifndef NULL
8508 #define NULL (void*)0
8509 #endif
8510
8511 static void *task(p)
8512         void *p;
8513 {
8514         return (void *) (p == NULL);
8515 }
8516
8517 int main() {
8518
8519         /* pthread test function */
8520         pthread_t t;
8521         int status;
8522 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8523         /* This system (e.g. AIX) defaults detached; must override */
8524         pthread_attr_t attr;
8525
8526         status = pthread_attr_init(&attr);
8527         if( status ) exit( status );
8528
8529         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8530         if( status ) exit( status );
8531
8532 #define ATTR    &attr
8533 #else
8534 #if HAVE_PTHREADS_D4
8535 #define ATTR    pthread_attr_default
8536 #else
8537 #define ATTR    NULL
8538 #endif
8539 #endif
8540         /* make sure pthread_create() isn't just a stub */
8541         status = pthread_create(&t, ATTR, task, NULL);
8542         if( status ) exit( status );
8543
8544         /* make sure pthread_detach() isn't just a stub */
8545 #if HAVE_PTHREADS_D4
8546         status = pthread_detach( &t );
8547 #else
8548         status = pthread_detach( t );
8549 #endif
8550
8551 #ifdef HAVE_LINUX_THREADS
8552         pthread_kill_other_threads_np();
8553 #endif
8554
8555         exit( status );
8556
8557 ; return 0; }
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8560   rm -rf conftest*
8561   ol_cv_pthread_lib_lpthread_woff=yes
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -rf conftest*
8566   ol_cv_pthread_lib_lpthread_woff=no
8567 fi
8568 rm -f conftest*
8569 else
8570   cat > conftest.$ac_ext <<EOF
8571 #line 8572 "configure"
8572 #include "confdefs.h"
8573 /* pthread test headers */
8574 #include <pthread.h>
8575 #ifndef NULL
8576 #define NULL (void*)0
8577 #endif
8578
8579 static void *task(p)
8580         void *p;
8581 {
8582         return (void *) (p == NULL);
8583 }
8584
8585
8586 int main(argc, argv)
8587         int argc;
8588         char **argv;
8589 {
8590
8591         /* pthread test function */
8592         pthread_t t;
8593         int status;
8594 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8595         /* This system (e.g. AIX) defaults detached; must override */
8596         pthread_attr_t attr;
8597
8598         status = pthread_attr_init(&attr);
8599         if( status ) exit( status );
8600
8601         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8602         if( status ) exit( status );
8603
8604 #define ATTR    &attr
8605 #else
8606 #if HAVE_PTHREADS_D4
8607 #define ATTR    pthread_attr_default
8608 #else
8609 #define ATTR    NULL
8610 #endif
8611 #endif
8612         /* make sure pthread_create() isn't just a stub */
8613         status = pthread_create(&t, ATTR, task, NULL);
8614         if( status ) exit( status );
8615
8616         /* make sure pthread_detach() isn't just a stub */
8617 #if HAVE_PTHREADS_D4
8618         status = pthread_detach( &t );
8619 #else
8620         status = pthread_detach( t );
8621 #endif
8622
8623 #ifdef HAVE_LINUX_THREADS
8624         pthread_kill_other_threads_np();
8625 #endif
8626
8627         exit( status );
8628
8629 }
8630
8631 EOF
8632 if { (eval echo configure:8633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8633 then
8634   ol_cv_pthread_lib_lpthread_woff=yes
8635 else
8636   echo "configure: failed program was:" >&5
8637   cat conftest.$ac_ext >&5
8638   rm -fr conftest*
8639   ol_cv_pthread_lib_lpthread_woff=no
8640 fi
8641 rm -fr conftest*
8642 fi
8643
8644
8645                 # restore the LIBS
8646                 LIBS="$ol_LIBS"
8647         
8648 fi
8649
8650 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8651
8652         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8653                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8654                 ol_link_threads=posix
8655         fi
8656 fi
8657
8658
8659                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8660 if test "$ol_link_threads" = no ; then
8661         # try -lpthread
8662         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8663 echo "configure:8664: checking for pthread link with -lpthread" >&5
8664 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8665   echo $ac_n "(cached) $ac_c" 1>&6
8666 else
8667   
8668                 # save the flags
8669                 ol_LIBS="$LIBS"
8670                 LIBS="-lpthread $LIBS"
8671
8672                 if test "$cross_compiling" = yes; then
8673   cat > conftest.$ac_ext <<EOF
8674 #line 8675 "configure"
8675 #include "confdefs.h"
8676 /* pthread test headers */
8677 #include <pthread.h>
8678 #ifndef NULL
8679 #define NULL (void*)0
8680 #endif
8681
8682 static void *task(p)
8683         void *p;
8684 {
8685         return (void *) (p == NULL);
8686 }
8687
8688 int main() {
8689
8690         /* pthread test function */
8691         pthread_t t;
8692         int status;
8693 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8694         /* This system (e.g. AIX) defaults detached; must override */
8695         pthread_attr_t attr;
8696
8697         status = pthread_attr_init(&attr);
8698         if( status ) exit( status );
8699
8700         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8701         if( status ) exit( status );
8702
8703 #define ATTR    &attr
8704 #else
8705 #if HAVE_PTHREADS_D4
8706 #define ATTR    pthread_attr_default
8707 #else
8708 #define ATTR    NULL
8709 #endif
8710 #endif
8711         /* make sure pthread_create() isn't just a stub */
8712         status = pthread_create(&t, ATTR, task, NULL);
8713         if( status ) exit( status );
8714
8715         /* make sure pthread_detach() isn't just a stub */
8716 #if HAVE_PTHREADS_D4
8717         status = pthread_detach( &t );
8718 #else
8719         status = pthread_detach( t );
8720 #endif
8721
8722 #ifdef HAVE_LINUX_THREADS
8723         pthread_kill_other_threads_np();
8724 #endif
8725
8726         exit( status );
8727
8728 ; return 0; }
8729 EOF
8730 if { (eval echo configure:8731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8731   rm -rf conftest*
8732   ol_cv_pthread_lpthread=yes
8733 else
8734   echo "configure: failed program was:" >&5
8735   cat conftest.$ac_ext >&5
8736   rm -rf conftest*
8737   ol_cv_pthread_lpthread=no
8738 fi
8739 rm -f conftest*
8740 else
8741   cat > conftest.$ac_ext <<EOF
8742 #line 8743 "configure"
8743 #include "confdefs.h"
8744 /* pthread test headers */
8745 #include <pthread.h>
8746 #ifndef NULL
8747 #define NULL (void*)0
8748 #endif
8749
8750 static void *task(p)
8751         void *p;
8752 {
8753         return (void *) (p == NULL);
8754 }
8755
8756
8757 int main(argc, argv)
8758         int argc;
8759         char **argv;
8760 {
8761
8762         /* pthread test function */
8763         pthread_t t;
8764         int status;
8765 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8766         /* This system (e.g. AIX) defaults detached; must override */
8767         pthread_attr_t attr;
8768
8769         status = pthread_attr_init(&attr);
8770         if( status ) exit( status );
8771
8772         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8773         if( status ) exit( status );
8774
8775 #define ATTR    &attr
8776 #else
8777 #if HAVE_PTHREADS_D4
8778 #define ATTR    pthread_attr_default
8779 #else
8780 #define ATTR    NULL
8781 #endif
8782 #endif
8783         /* make sure pthread_create() isn't just a stub */
8784         status = pthread_create(&t, ATTR, task, NULL);
8785         if( status ) exit( status );
8786
8787         /* make sure pthread_detach() isn't just a stub */
8788 #if HAVE_PTHREADS_D4
8789         status = pthread_detach( &t );
8790 #else
8791         status = pthread_detach( t );
8792 #endif
8793
8794 #ifdef HAVE_LINUX_THREADS
8795         pthread_kill_other_threads_np();
8796 #endif
8797
8798         exit( status );
8799
8800 }
8801
8802 EOF
8803 if { (eval echo configure:8804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8804 then
8805   ol_cv_pthread_lpthread=yes
8806 else
8807   echo "configure: failed program was:" >&5
8808   cat conftest.$ac_ext >&5
8809   rm -fr conftest*
8810   ol_cv_pthread_lpthread=no
8811 fi
8812 rm -fr conftest*
8813 fi
8814
8815
8816                 # restore the LIBS
8817                 LIBS="$ol_LIBS"
8818         
8819 fi
8820
8821 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8822
8823         if test $ol_cv_pthread_lpthread = yes ; then
8824                 ol_link_pthreads="-lpthread"
8825                 ol_link_threads=posix
8826         fi
8827 fi
8828
8829                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8830 if test "$ol_link_threads" = no ; then
8831         # try -lc_r
8832         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8833 echo "configure:8834: checking for pthread link with -lc_r" >&5
8834 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8835   echo $ac_n "(cached) $ac_c" 1>&6
8836 else
8837   
8838                 # save the flags
8839                 ol_LIBS="$LIBS"
8840                 LIBS="-lc_r $LIBS"
8841
8842                 if test "$cross_compiling" = yes; then
8843   cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846 /* pthread test headers */
8847 #include <pthread.h>
8848 #ifndef NULL
8849 #define NULL (void*)0
8850 #endif
8851
8852 static void *task(p)
8853         void *p;
8854 {
8855         return (void *) (p == NULL);
8856 }
8857
8858 int main() {
8859
8860         /* pthread test function */
8861         pthread_t t;
8862         int status;
8863 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8864         /* This system (e.g. AIX) defaults detached; must override */
8865         pthread_attr_t attr;
8866
8867         status = pthread_attr_init(&attr);
8868         if( status ) exit( status );
8869
8870         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8871         if( status ) exit( status );
8872
8873 #define ATTR    &attr
8874 #else
8875 #if HAVE_PTHREADS_D4
8876 #define ATTR    pthread_attr_default
8877 #else
8878 #define ATTR    NULL
8879 #endif
8880 #endif
8881         /* make sure pthread_create() isn't just a stub */
8882         status = pthread_create(&t, ATTR, task, NULL);
8883         if( status ) exit( status );
8884
8885         /* make sure pthread_detach() isn't just a stub */
8886 #if HAVE_PTHREADS_D4
8887         status = pthread_detach( &t );
8888 #else
8889         status = pthread_detach( t );
8890 #endif
8891
8892 #ifdef HAVE_LINUX_THREADS
8893         pthread_kill_other_threads_np();
8894 #endif
8895
8896         exit( status );
8897
8898 ; return 0; }
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8901   rm -rf conftest*
8902   ol_cv_pthread_lc_r=yes
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -rf conftest*
8907   ol_cv_pthread_lc_r=no
8908 fi
8909 rm -f conftest*
8910 else
8911   cat > conftest.$ac_ext <<EOF
8912 #line 8913 "configure"
8913 #include "confdefs.h"
8914 /* pthread test headers */
8915 #include <pthread.h>
8916 #ifndef NULL
8917 #define NULL (void*)0
8918 #endif
8919
8920 static void *task(p)
8921         void *p;
8922 {
8923         return (void *) (p == NULL);
8924 }
8925
8926
8927 int main(argc, argv)
8928         int argc;
8929         char **argv;
8930 {
8931
8932         /* pthread test function */
8933         pthread_t t;
8934         int status;
8935 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8936         /* This system (e.g. AIX) defaults detached; must override */
8937         pthread_attr_t attr;
8938
8939         status = pthread_attr_init(&attr);
8940         if( status ) exit( status );
8941
8942         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8943         if( status ) exit( status );
8944
8945 #define ATTR    &attr
8946 #else
8947 #if HAVE_PTHREADS_D4
8948 #define ATTR    pthread_attr_default
8949 #else
8950 #define ATTR    NULL
8951 #endif
8952 #endif
8953         /* make sure pthread_create() isn't just a stub */
8954         status = pthread_create(&t, ATTR, task, NULL);
8955         if( status ) exit( status );
8956
8957         /* make sure pthread_detach() isn't just a stub */
8958 #if HAVE_PTHREADS_D4
8959         status = pthread_detach( &t );
8960 #else
8961         status = pthread_detach( t );
8962 #endif
8963
8964 #ifdef HAVE_LINUX_THREADS
8965         pthread_kill_other_threads_np();
8966 #endif
8967
8968         exit( status );
8969
8970 }
8971
8972 EOF
8973 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8974 then
8975   ol_cv_pthread_lc_r=yes
8976 else
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -fr conftest*
8980   ol_cv_pthread_lc_r=no
8981 fi
8982 rm -fr conftest*
8983 fi
8984
8985
8986                 # restore the LIBS
8987                 LIBS="$ol_LIBS"
8988         
8989 fi
8990
8991 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8992
8993         if test $ol_cv_pthread_lc_r = yes ; then
8994                 ol_link_pthreads="-lc_r"
8995                 ol_link_threads=posix
8996         fi
8997 fi
8998
8999
9000                 # Pthread try link: -threads (ol_cv_pthread_threads)
9001 if test "$ol_link_threads" = no ; then
9002         # try -threads
9003         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9004 echo "configure:9005: checking for pthread link with -threads" >&5
9005 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9006   echo $ac_n "(cached) $ac_c" 1>&6
9007 else
9008   
9009                 # save the flags
9010                 ol_LIBS="$LIBS"
9011                 LIBS="-threads $LIBS"
9012
9013                 if test "$cross_compiling" = yes; then
9014   cat > conftest.$ac_ext <<EOF
9015 #line 9016 "configure"
9016 #include "confdefs.h"
9017 /* pthread test headers */
9018 #include <pthread.h>
9019 #ifndef NULL
9020 #define NULL (void*)0
9021 #endif
9022
9023 static void *task(p)
9024         void *p;
9025 {
9026         return (void *) (p == NULL);
9027 }
9028
9029 int main() {
9030
9031         /* pthread test function */
9032         pthread_t t;
9033         int status;
9034 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9035         /* This system (e.g. AIX) defaults detached; must override */
9036         pthread_attr_t attr;
9037
9038         status = pthread_attr_init(&attr);
9039         if( status ) exit( status );
9040
9041         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9042         if( status ) exit( status );
9043
9044 #define ATTR    &attr
9045 #else
9046 #if HAVE_PTHREADS_D4
9047 #define ATTR    pthread_attr_default
9048 #else
9049 #define ATTR    NULL
9050 #endif
9051 #endif
9052         /* make sure pthread_create() isn't just a stub */
9053         status = pthread_create(&t, ATTR, task, NULL);
9054         if( status ) exit( status );
9055
9056         /* make sure pthread_detach() isn't just a stub */
9057 #if HAVE_PTHREADS_D4
9058         status = pthread_detach( &t );
9059 #else
9060         status = pthread_detach( t );
9061 #endif
9062
9063 #ifdef HAVE_LINUX_THREADS
9064         pthread_kill_other_threads_np();
9065 #endif
9066
9067         exit( status );
9068
9069 ; return 0; }
9070 EOF
9071 if { (eval echo configure:9072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9072   rm -rf conftest*
9073   ol_cv_pthread_threads=yes
9074 else
9075   echo "configure: failed program was:" >&5
9076   cat conftest.$ac_ext >&5
9077   rm -rf conftest*
9078   ol_cv_pthread_threads=no
9079 fi
9080 rm -f conftest*
9081 else
9082   cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085 /* pthread test headers */
9086 #include <pthread.h>
9087 #ifndef NULL
9088 #define NULL (void*)0
9089 #endif
9090
9091 static void *task(p)
9092         void *p;
9093 {
9094         return (void *) (p == NULL);
9095 }
9096
9097
9098 int main(argc, argv)
9099         int argc;
9100         char **argv;
9101 {
9102
9103         /* pthread test function */
9104         pthread_t t;
9105         int status;
9106 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9107         /* This system (e.g. AIX) defaults detached; must override */
9108         pthread_attr_t attr;
9109
9110         status = pthread_attr_init(&attr);
9111         if( status ) exit( status );
9112
9113         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9114         if( status ) exit( status );
9115
9116 #define ATTR    &attr
9117 #else
9118 #if HAVE_PTHREADS_D4
9119 #define ATTR    pthread_attr_default
9120 #else
9121 #define ATTR    NULL
9122 #endif
9123 #endif
9124         /* make sure pthread_create() isn't just a stub */
9125         status = pthread_create(&t, ATTR, task, NULL);
9126         if( status ) exit( status );
9127
9128         /* make sure pthread_detach() isn't just a stub */
9129 #if HAVE_PTHREADS_D4
9130         status = pthread_detach( &t );
9131 #else
9132         status = pthread_detach( t );
9133 #endif
9134
9135 #ifdef HAVE_LINUX_THREADS
9136         pthread_kill_other_threads_np();
9137 #endif
9138
9139         exit( status );
9140
9141 }
9142
9143 EOF
9144 if { (eval echo configure:9145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9145 then
9146   ol_cv_pthread_threads=yes
9147 else
9148   echo "configure: failed program was:" >&5
9149   cat conftest.$ac_ext >&5
9150   rm -fr conftest*
9151   ol_cv_pthread_threads=no
9152 fi
9153 rm -fr conftest*
9154 fi
9155
9156
9157                 # restore the LIBS
9158                 LIBS="$ol_LIBS"
9159         
9160 fi
9161
9162 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9163
9164         if test $ol_cv_pthread_threads = yes ; then
9165                 ol_link_pthreads="-threads"
9166                 ol_link_threads=posix
9167         fi
9168 fi
9169
9170
9171                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9172 if test "$ol_link_threads" = no ; then
9173         # try -lpthreads -lmach -lexc -lc_r
9174         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9175 echo "configure:9176: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9176 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9177   echo $ac_n "(cached) $ac_c" 1>&6
9178 else
9179   
9180                 # save the flags
9181                 ol_LIBS="$LIBS"
9182                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9183
9184                 if test "$cross_compiling" = yes; then
9185   cat > conftest.$ac_ext <<EOF
9186 #line 9187 "configure"
9187 #include "confdefs.h"
9188 /* pthread test headers */
9189 #include <pthread.h>
9190 #ifndef NULL
9191 #define NULL (void*)0
9192 #endif
9193
9194 static void *task(p)
9195         void *p;
9196 {
9197         return (void *) (p == NULL);
9198 }
9199
9200 int main() {
9201
9202         /* pthread test function */
9203         pthread_t t;
9204         int status;
9205 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9206         /* This system (e.g. AIX) defaults detached; must override */
9207         pthread_attr_t attr;
9208
9209         status = pthread_attr_init(&attr);
9210         if( status ) exit( status );
9211
9212         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9213         if( status ) exit( status );
9214
9215 #define ATTR    &attr
9216 #else
9217 #if HAVE_PTHREADS_D4
9218 #define ATTR    pthread_attr_default
9219 #else
9220 #define ATTR    NULL
9221 #endif
9222 #endif
9223         /* make sure pthread_create() isn't just a stub */
9224         status = pthread_create(&t, ATTR, task, NULL);
9225         if( status ) exit( status );
9226
9227         /* make sure pthread_detach() isn't just a stub */
9228 #if HAVE_PTHREADS_D4
9229         status = pthread_detach( &t );
9230 #else
9231         status = pthread_detach( t );
9232 #endif
9233
9234 #ifdef HAVE_LINUX_THREADS
9235         pthread_kill_other_threads_np();
9236 #endif
9237
9238         exit( status );
9239
9240 ; return 0; }
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9243   rm -rf conftest*
9244   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9250 fi
9251 rm -f conftest*
9252 else
9253   cat > conftest.$ac_ext <<EOF
9254 #line 9255 "configure"
9255 #include "confdefs.h"
9256 /* pthread test headers */
9257 #include <pthread.h>
9258 #ifndef NULL
9259 #define NULL (void*)0
9260 #endif
9261
9262 static void *task(p)
9263         void *p;
9264 {
9265         return (void *) (p == NULL);
9266 }
9267
9268
9269 int main(argc, argv)
9270         int argc;
9271         char **argv;
9272 {
9273
9274         /* pthread test function */
9275         pthread_t t;
9276         int status;
9277 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9278         /* This system (e.g. AIX) defaults detached; must override */
9279         pthread_attr_t attr;
9280
9281         status = pthread_attr_init(&attr);
9282         if( status ) exit( status );
9283
9284         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9285         if( status ) exit( status );
9286
9287 #define ATTR    &attr
9288 #else
9289 #if HAVE_PTHREADS_D4
9290 #define ATTR    pthread_attr_default
9291 #else
9292 #define ATTR    NULL
9293 #endif
9294 #endif
9295         /* make sure pthread_create() isn't just a stub */
9296         status = pthread_create(&t, ATTR, task, NULL);
9297         if( status ) exit( status );
9298
9299         /* make sure pthread_detach() isn't just a stub */
9300 #if HAVE_PTHREADS_D4
9301         status = pthread_detach( &t );
9302 #else
9303         status = pthread_detach( t );
9304 #endif
9305
9306 #ifdef HAVE_LINUX_THREADS
9307         pthread_kill_other_threads_np();
9308 #endif
9309
9310         exit( status );
9311
9312 }
9313
9314 EOF
9315 if { (eval echo configure:9316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9316 then
9317   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9318 else
9319   echo "configure: failed program was:" >&5
9320   cat conftest.$ac_ext >&5
9321   rm -fr conftest*
9322   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9323 fi
9324 rm -fr conftest*
9325 fi
9326
9327
9328                 # restore the LIBS
9329                 LIBS="$ol_LIBS"
9330         
9331 fi
9332
9333 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9334
9335         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9336                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9337                 ol_link_threads=posix
9338         fi
9339 fi
9340
9341                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9342 if test "$ol_link_threads" = no ; then
9343         # try -lpthreads -lmach -lexc
9344         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9345 echo "configure:9346: checking for pthread link with -lpthreads -lmach -lexc" >&5
9346 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9347   echo $ac_n "(cached) $ac_c" 1>&6
9348 else
9349   
9350                 # save the flags
9351                 ol_LIBS="$LIBS"
9352                 LIBS="-lpthreads -lmach -lexc $LIBS"
9353
9354                 if test "$cross_compiling" = yes; then
9355   cat > conftest.$ac_ext <<EOF
9356 #line 9357 "configure"
9357 #include "confdefs.h"
9358 /* pthread test headers */
9359 #include <pthread.h>
9360 #ifndef NULL
9361 #define NULL (void*)0
9362 #endif
9363
9364 static void *task(p)
9365         void *p;
9366 {
9367         return (void *) (p == NULL);
9368 }
9369
9370 int main() {
9371
9372         /* pthread test function */
9373         pthread_t t;
9374         int status;
9375 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9376         /* This system (e.g. AIX) defaults detached; must override */
9377         pthread_attr_t attr;
9378
9379         status = pthread_attr_init(&attr);
9380         if( status ) exit( status );
9381
9382         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9383         if( status ) exit( status );
9384
9385 #define ATTR    &attr
9386 #else
9387 #if HAVE_PTHREADS_D4
9388 #define ATTR    pthread_attr_default
9389 #else
9390 #define ATTR    NULL
9391 #endif
9392 #endif
9393         /* make sure pthread_create() isn't just a stub */
9394         status = pthread_create(&t, ATTR, task, NULL);
9395         if( status ) exit( status );
9396
9397         /* make sure pthread_detach() isn't just a stub */
9398 #if HAVE_PTHREADS_D4
9399         status = pthread_detach( &t );
9400 #else
9401         status = pthread_detach( t );
9402 #endif
9403
9404 #ifdef HAVE_LINUX_THREADS
9405         pthread_kill_other_threads_np();
9406 #endif
9407
9408         exit( status );
9409
9410 ; return 0; }
9411 EOF
9412 if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9413   rm -rf conftest*
9414   ol_cv_pthread_lpthreads_lmach_lexc=yes
9415 else
9416   echo "configure: failed program was:" >&5
9417   cat conftest.$ac_ext >&5
9418   rm -rf conftest*
9419   ol_cv_pthread_lpthreads_lmach_lexc=no
9420 fi
9421 rm -f conftest*
9422 else
9423   cat > conftest.$ac_ext <<EOF
9424 #line 9425 "configure"
9425 #include "confdefs.h"
9426 /* pthread test headers */
9427 #include <pthread.h>
9428 #ifndef NULL
9429 #define NULL (void*)0
9430 #endif
9431
9432 static void *task(p)
9433         void *p;
9434 {
9435         return (void *) (p == NULL);
9436 }
9437
9438
9439 int main(argc, argv)
9440         int argc;
9441         char **argv;
9442 {
9443
9444         /* pthread test function */
9445         pthread_t t;
9446         int status;
9447 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9448         /* This system (e.g. AIX) defaults detached; must override */
9449         pthread_attr_t attr;
9450
9451         status = pthread_attr_init(&attr);
9452         if( status ) exit( status );
9453
9454         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9455         if( status ) exit( status );
9456
9457 #define ATTR    &attr
9458 #else
9459 #if HAVE_PTHREADS_D4
9460 #define ATTR    pthread_attr_default
9461 #else
9462 #define ATTR    NULL
9463 #endif
9464 #endif
9465         /* make sure pthread_create() isn't just a stub */
9466         status = pthread_create(&t, ATTR, task, NULL);
9467         if( status ) exit( status );
9468
9469         /* make sure pthread_detach() isn't just a stub */
9470 #if HAVE_PTHREADS_D4
9471         status = pthread_detach( &t );
9472 #else
9473         status = pthread_detach( t );
9474 #endif
9475
9476 #ifdef HAVE_LINUX_THREADS
9477         pthread_kill_other_threads_np();
9478 #endif
9479
9480         exit( status );
9481
9482 }
9483
9484 EOF
9485 if { (eval echo configure:9486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9486 then
9487   ol_cv_pthread_lpthreads_lmach_lexc=yes
9488 else
9489   echo "configure: failed program was:" >&5
9490   cat conftest.$ac_ext >&5
9491   rm -fr conftest*
9492   ol_cv_pthread_lpthreads_lmach_lexc=no
9493 fi
9494 rm -fr conftest*
9495 fi
9496
9497
9498                 # restore the LIBS
9499                 LIBS="$ol_LIBS"
9500         
9501 fi
9502
9503 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9504
9505         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9506                 ol_link_pthreads="-lpthreads -lmach -lexc"
9507                 ol_link_threads=posix
9508         fi
9509 fi
9510
9511                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9512 if test "$ol_link_threads" = no ; then
9513         # try -lpthreads -lexc
9514         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9515 echo "configure:9516: checking for pthread link with -lpthreads -lexc" >&5
9516 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9517   echo $ac_n "(cached) $ac_c" 1>&6
9518 else
9519   
9520                 # save the flags
9521                 ol_LIBS="$LIBS"
9522                 LIBS="-lpthreads -lexc $LIBS"
9523
9524                 if test "$cross_compiling" = yes; then
9525   cat > conftest.$ac_ext <<EOF
9526 #line 9527 "configure"
9527 #include "confdefs.h"
9528 /* pthread test headers */
9529 #include <pthread.h>
9530 #ifndef NULL
9531 #define NULL (void*)0
9532 #endif
9533
9534 static void *task(p)
9535         void *p;
9536 {
9537         return (void *) (p == NULL);
9538 }
9539
9540 int main() {
9541
9542         /* pthread test function */
9543         pthread_t t;
9544         int status;
9545 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9546         /* This system (e.g. AIX) defaults detached; must override */
9547         pthread_attr_t attr;
9548
9549         status = pthread_attr_init(&attr);
9550         if( status ) exit( status );
9551
9552         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9553         if( status ) exit( status );
9554
9555 #define ATTR    &attr
9556 #else
9557 #if HAVE_PTHREADS_D4
9558 #define ATTR    pthread_attr_default
9559 #else
9560 #define ATTR    NULL
9561 #endif
9562 #endif
9563         /* make sure pthread_create() isn't just a stub */
9564         status = pthread_create(&t, ATTR, task, NULL);
9565         if( status ) exit( status );
9566
9567         /* make sure pthread_detach() isn't just a stub */
9568 #if HAVE_PTHREADS_D4
9569         status = pthread_detach( &t );
9570 #else
9571         status = pthread_detach( t );
9572 #endif
9573
9574 #ifdef HAVE_LINUX_THREADS
9575         pthread_kill_other_threads_np();
9576 #endif
9577
9578         exit( status );
9579
9580 ; return 0; }
9581 EOF
9582 if { (eval echo configure:9583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9583   rm -rf conftest*
9584   ol_cv_pthread_lpthreads_lexc=yes
9585 else
9586   echo "configure: failed program was:" >&5
9587   cat conftest.$ac_ext >&5
9588   rm -rf conftest*
9589   ol_cv_pthread_lpthreads_lexc=no
9590 fi
9591 rm -f conftest*
9592 else
9593   cat > conftest.$ac_ext <<EOF
9594 #line 9595 "configure"
9595 #include "confdefs.h"
9596 /* pthread test headers */
9597 #include <pthread.h>
9598 #ifndef NULL
9599 #define NULL (void*)0
9600 #endif
9601
9602 static void *task(p)
9603         void *p;
9604 {
9605         return (void *) (p == NULL);
9606 }
9607
9608
9609 int main(argc, argv)
9610         int argc;
9611         char **argv;
9612 {
9613
9614         /* pthread test function */
9615         pthread_t t;
9616         int status;
9617 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9618         /* This system (e.g. AIX) defaults detached; must override */
9619         pthread_attr_t attr;
9620
9621         status = pthread_attr_init(&attr);
9622         if( status ) exit( status );
9623
9624         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9625         if( status ) exit( status );
9626
9627 #define ATTR    &attr
9628 #else
9629 #if HAVE_PTHREADS_D4
9630 #define ATTR    pthread_attr_default
9631 #else
9632 #define ATTR    NULL
9633 #endif
9634 #endif
9635         /* make sure pthread_create() isn't just a stub */
9636         status = pthread_create(&t, ATTR, task, NULL);
9637         if( status ) exit( status );
9638
9639         /* make sure pthread_detach() isn't just a stub */
9640 #if HAVE_PTHREADS_D4
9641         status = pthread_detach( &t );
9642 #else
9643         status = pthread_detach( t );
9644 #endif
9645
9646 #ifdef HAVE_LINUX_THREADS
9647         pthread_kill_other_threads_np();
9648 #endif
9649
9650         exit( status );
9651
9652 }
9653
9654 EOF
9655 if { (eval echo configure:9656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9656 then
9657   ol_cv_pthread_lpthreads_lexc=yes
9658 else
9659   echo "configure: failed program was:" >&5
9660   cat conftest.$ac_ext >&5
9661   rm -fr conftest*
9662   ol_cv_pthread_lpthreads_lexc=no
9663 fi
9664 rm -fr conftest*
9665 fi
9666
9667
9668                 # restore the LIBS
9669                 LIBS="$ol_LIBS"
9670         
9671 fi
9672
9673 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9674
9675         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9676                 ol_link_pthreads="-lpthreads -lexc"
9677                 ol_link_threads=posix
9678         fi
9679 fi
9680
9681
9682                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9683 if test "$ol_link_threads" = no ; then
9684         # try -lpthreads
9685         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9686 echo "configure:9687: checking for pthread link with -lpthreads" >&5
9687 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9688   echo $ac_n "(cached) $ac_c" 1>&6
9689 else
9690   
9691                 # save the flags
9692                 ol_LIBS="$LIBS"
9693                 LIBS="-lpthreads $LIBS"
9694
9695                 if test "$cross_compiling" = yes; then
9696   cat > conftest.$ac_ext <<EOF
9697 #line 9698 "configure"
9698 #include "confdefs.h"
9699 /* pthread test headers */
9700 #include <pthread.h>
9701 #ifndef NULL
9702 #define NULL (void*)0
9703 #endif
9704
9705 static void *task(p)
9706         void *p;
9707 {
9708         return (void *) (p == NULL);
9709 }
9710
9711 int main() {
9712
9713         /* pthread test function */
9714         pthread_t t;
9715         int status;
9716 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9717         /* This system (e.g. AIX) defaults detached; must override */
9718         pthread_attr_t attr;
9719
9720         status = pthread_attr_init(&attr);
9721         if( status ) exit( status );
9722
9723         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9724         if( status ) exit( status );
9725
9726 #define ATTR    &attr
9727 #else
9728 #if HAVE_PTHREADS_D4
9729 #define ATTR    pthread_attr_default
9730 #else
9731 #define ATTR    NULL
9732 #endif
9733 #endif
9734         /* make sure pthread_create() isn't just a stub */
9735         status = pthread_create(&t, ATTR, task, NULL);
9736         if( status ) exit( status );
9737
9738         /* make sure pthread_detach() isn't just a stub */
9739 #if HAVE_PTHREADS_D4
9740         status = pthread_detach( &t );
9741 #else
9742         status = pthread_detach( t );
9743 #endif
9744
9745 #ifdef HAVE_LINUX_THREADS
9746         pthread_kill_other_threads_np();
9747 #endif
9748
9749         exit( status );
9750
9751 ; return 0; }
9752 EOF
9753 if { (eval echo configure:9754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9754   rm -rf conftest*
9755   ol_cv_pthread_lib_lpthreads=yes
9756 else
9757   echo "configure: failed program was:" >&5
9758   cat conftest.$ac_ext >&5
9759   rm -rf conftest*
9760   ol_cv_pthread_lib_lpthreads=no
9761 fi
9762 rm -f conftest*
9763 else
9764   cat > conftest.$ac_ext <<EOF
9765 #line 9766 "configure"
9766 #include "confdefs.h"
9767 /* pthread test headers */
9768 #include <pthread.h>
9769 #ifndef NULL
9770 #define NULL (void*)0
9771 #endif
9772
9773 static void *task(p)
9774         void *p;
9775 {
9776         return (void *) (p == NULL);
9777 }
9778
9779
9780 int main(argc, argv)
9781         int argc;
9782         char **argv;
9783 {
9784
9785         /* pthread test function */
9786         pthread_t t;
9787         int status;
9788 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9789         /* This system (e.g. AIX) defaults detached; must override */
9790         pthread_attr_t attr;
9791
9792         status = pthread_attr_init(&attr);
9793         if( status ) exit( status );
9794
9795         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9796         if( status ) exit( status );
9797
9798 #define ATTR    &attr
9799 #else
9800 #if HAVE_PTHREADS_D4
9801 #define ATTR    pthread_attr_default
9802 #else
9803 #define ATTR    NULL
9804 #endif
9805 #endif
9806         /* make sure pthread_create() isn't just a stub */
9807         status = pthread_create(&t, ATTR, task, NULL);
9808         if( status ) exit( status );
9809
9810         /* make sure pthread_detach() isn't just a stub */
9811 #if HAVE_PTHREADS_D4
9812         status = pthread_detach( &t );
9813 #else
9814         status = pthread_detach( t );
9815 #endif
9816
9817 #ifdef HAVE_LINUX_THREADS
9818         pthread_kill_other_threads_np();
9819 #endif
9820
9821         exit( status );
9822
9823 }
9824
9825 EOF
9826 if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9827 then
9828   ol_cv_pthread_lib_lpthreads=yes
9829 else
9830   echo "configure: failed program was:" >&5
9831   cat conftest.$ac_ext >&5
9832   rm -fr conftest*
9833   ol_cv_pthread_lib_lpthreads=no
9834 fi
9835 rm -fr conftest*
9836 fi
9837
9838
9839                 # restore the LIBS
9840                 LIBS="$ol_LIBS"
9841         
9842 fi
9843
9844 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9845
9846         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9847                 ol_link_pthreads="-lpthreads"
9848                 ol_link_threads=posix
9849         fi
9850 fi
9851
9852
9853                 if test $ol_link_threads != no ; then
9854                         cat >> confdefs.h <<\EOF
9855 #define HAVE_PTHREADS 1
9856 EOF
9857
9858
9859                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9860
9861                                                 save_CPPFLAGS="$CPPFLAGS"
9862                         save_LIBS="$LIBS"
9863                         LIBS="$LTHREAD_LIBS $LIBS"
9864
9865                                                                                                 for ac_func in sched_yield pthread_yield
9866 do
9867 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9868 echo "configure:9869: checking for $ac_func" >&5
9869 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9870   echo $ac_n "(cached) $ac_c" 1>&6
9871 else
9872   cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875 /* System header to define __stub macros and hopefully few prototypes,
9876     which can conflict with char $ac_func(); below.  */
9877 #include <assert.h>
9878 /* Override any gcc2 internal prototype to avoid an error.  */
9879 /* We use char because int might match the return type of a gcc2
9880     builtin and then its argument prototype would still apply.  */
9881 char $ac_func();
9882 char (*f)();
9883
9884 int main() {
9885
9886 /* The GNU C library defines this for functions which it implements
9887     to always fail with ENOSYS.  Some functions are actually named
9888     something starting with __ and the normal name is an alias.  */
9889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9890 choke me
9891 #else
9892 f = $ac_func;
9893 #endif
9894
9895 ; return 0; }
9896 EOF
9897 if { (eval echo configure:9898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9898   rm -rf conftest*
9899   eval "ac_cv_func_$ac_func=yes"
9900 else
9901   echo "configure: failed program was:" >&5
9902   cat conftest.$ac_ext >&5
9903   rm -rf conftest*
9904   eval "ac_cv_func_$ac_func=no"
9905 fi
9906 rm -f conftest*
9907 fi
9908
9909 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9910   echo "$ac_t""yes" 1>&6
9911     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9912   cat >> confdefs.h <<EOF
9913 #define $ac_tr_func 1
9914 EOF
9915  
9916 else
9917   echo "$ac_t""no" 1>&6
9918 fi
9919 done
9920
9921
9922                         if test $ac_cv_func_sched_yield = no -a \
9923                                 $ac_cv_func_pthread_yield = no ; then
9924                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9925 echo "configure:9926: checking for sched_yield in -lrt" >&5
9926 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9927 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9928   echo $ac_n "(cached) $ac_c" 1>&6
9929 else
9930   ac_save_LIBS="$LIBS"
9931 LIBS="-lrt  $LIBS"
9932 cat > conftest.$ac_ext <<EOF
9933 #line 9934 "configure"
9934 #include "confdefs.h"
9935 /* Override any gcc2 internal prototype to avoid an error.  */
9936 /* We use char because int might match the return type of a gcc2
9937     builtin and then its argument prototype would still apply.  */
9938 char sched_yield();
9939
9940 int main() {
9941 sched_yield()
9942 ; return 0; }
9943 EOF
9944 if { (eval echo configure:9945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9945   rm -rf conftest*
9946   eval "ac_cv_lib_$ac_lib_var=yes"
9947 else
9948   echo "configure: failed program was:" >&5
9949   cat conftest.$ac_ext >&5
9950   rm -rf conftest*
9951   eval "ac_cv_lib_$ac_lib_var=no"
9952 fi
9953 rm -f conftest*
9954 LIBS="$ac_save_LIBS"
9955
9956 fi
9957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9958   echo "$ac_t""yes" 1>&6
9959   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9960                                         cat >> confdefs.h <<\EOF
9961 #define HAVE_SCHED_YIELD 1
9962 EOF
9963
9964                                         ac_cv_func_sched_yield=yes
9965 else
9966   echo "$ac_t""no" 1>&6
9967 ac_cv_func_sched_yield=no
9968 fi
9969
9970                         fi
9971                         if test $ac_cv_func_sched_yield = no -a \
9972                                 $ac_cv_func_pthread_yield = no ; then
9973                                                                                                 for ac_func in thr_yield
9974 do
9975 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9976 echo "configure:9977: checking for $ac_func" >&5
9977 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9978   echo $ac_n "(cached) $ac_c" 1>&6
9979 else
9980   cat > conftest.$ac_ext <<EOF
9981 #line 9982 "configure"
9982 #include "confdefs.h"
9983 /* System header to define __stub macros and hopefully few prototypes,
9984     which can conflict with char $ac_func(); below.  */
9985 #include <assert.h>
9986 /* Override any gcc2 internal prototype to avoid an error.  */
9987 /* We use char because int might match the return type of a gcc2
9988     builtin and then its argument prototype would still apply.  */
9989 char $ac_func();
9990 char (*f)();
9991
9992 int main() {
9993
9994 /* The GNU C library defines this for functions which it implements
9995     to always fail with ENOSYS.  Some functions are actually named
9996     something starting with __ and the normal name is an alias.  */
9997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9998 choke me
9999 #else
10000 f = $ac_func;
10001 #endif
10002
10003 ; return 0; }
10004 EOF
10005 if { (eval echo configure:10006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10006   rm -rf conftest*
10007   eval "ac_cv_func_$ac_func=yes"
10008 else
10009   echo "configure: failed program was:" >&5
10010   cat conftest.$ac_ext >&5
10011   rm -rf conftest*
10012   eval "ac_cv_func_$ac_func=no"
10013 fi
10014 rm -f conftest*
10015 fi
10016
10017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10018   echo "$ac_t""yes" 1>&6
10019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10020   cat >> confdefs.h <<EOF
10021 #define $ac_tr_func 1
10022 EOF
10023  
10024 else
10025   echo "$ac_t""no" 1>&6
10026 fi
10027 done
10028
10029                         fi
10030                         if test $ac_cv_func_sched_yield = no -a \
10031                                 $ac_cv_func_pthread_yield = no -a \
10032                                 "$ac_cv_func_thr_yield" = no ; then
10033                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10034                         fi
10035
10036                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10037 do
10038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10039 echo "configure:10040: checking for $ac_func" >&5
10040 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10041   echo $ac_n "(cached) $ac_c" 1>&6
10042 else
10043   cat > conftest.$ac_ext <<EOF
10044 #line 10045 "configure"
10045 #include "confdefs.h"
10046 /* System header to define __stub macros and hopefully few prototypes,
10047     which can conflict with char $ac_func(); below.  */
10048 #include <assert.h>
10049 /* Override any gcc2 internal prototype to avoid an error.  */
10050 /* We use char because int might match the return type of a gcc2
10051     builtin and then its argument prototype would still apply.  */
10052 char $ac_func();
10053 char (*f)();
10054
10055 int main() {
10056
10057 /* The GNU C library defines this for functions which it implements
10058     to always fail with ENOSYS.  Some functions are actually named
10059     something starting with __ and the normal name is an alias.  */
10060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10061 choke me
10062 #else
10063 f = $ac_func;
10064 #endif
10065
10066 ; return 0; }
10067 EOF
10068 if { (eval echo configure:10069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10069   rm -rf conftest*
10070   eval "ac_cv_func_$ac_func=yes"
10071 else
10072   echo "configure: failed program was:" >&5
10073   cat conftest.$ac_ext >&5
10074   rm -rf conftest*
10075   eval "ac_cv_func_$ac_func=no"
10076 fi
10077 rm -f conftest*
10078 fi
10079
10080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10081   echo "$ac_t""yes" 1>&6
10082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10083   cat >> confdefs.h <<EOF
10084 #define $ac_tr_func 1
10085 EOF
10086  
10087 else
10088   echo "$ac_t""no" 1>&6
10089 fi
10090 done
10091
10092
10093                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10094 echo "configure:10095: checking for pthread_detach with <pthread.h>" >&5
10095 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10096   echo $ac_n "(cached) $ac_c" 1>&6
10097 else
10098   
10099                                                                 cat > conftest.$ac_ext <<EOF
10100 #line 10101 "configure"
10101 #include "confdefs.h"
10102
10103 #include <pthread.h>
10104 #ifndef NULL
10105 #define NULL (void*)0
10106 #endif
10107
10108 int main() {
10109 pthread_detach(NULL);
10110 ; return 0; }
10111 EOF
10112 if { (eval echo configure:10113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10113   rm -rf conftest*
10114   ol_cv_func_pthread_detach=yes
10115 else
10116   echo "configure: failed program was:" >&5
10117   cat conftest.$ac_ext >&5
10118   rm -rf conftest*
10119   ol_cv_func_pthread_detach=no
10120 fi
10121 rm -f conftest*
10122                         
10123 fi
10124
10125 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10126
10127                         if test $ol_cv_func_pthread_detach = no ; then
10128                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10129                         fi
10130
10131                         cat >> confdefs.h <<\EOF
10132 #define HAVE_PTHREAD_DETACH 1
10133 EOF
10134
10135
10136                                                 for ac_func in \
10137                                 pthread_setconcurrency \
10138                                 pthread_getconcurrency \
10139                                 thr_setconcurrency \
10140                                 thr_getconcurrency \
10141                         
10142 do
10143 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10144 echo "configure:10145: checking for $ac_func" >&5
10145 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10146   echo $ac_n "(cached) $ac_c" 1>&6
10147 else
10148   cat > conftest.$ac_ext <<EOF
10149 #line 10150 "configure"
10150 #include "confdefs.h"
10151 /* System header to define __stub macros and hopefully few prototypes,
10152     which can conflict with char $ac_func(); below.  */
10153 #include <assert.h>
10154 /* Override any gcc2 internal prototype to avoid an error.  */
10155 /* We use char because int might match the return type of a gcc2
10156     builtin and then its argument prototype would still apply.  */
10157 char $ac_func();
10158 char (*f)();
10159
10160 int main() {
10161
10162 /* The GNU C library defines this for functions which it implements
10163     to always fail with ENOSYS.  Some functions are actually named
10164     something starting with __ and the normal name is an alias.  */
10165 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10166 choke me
10167 #else
10168 f = $ac_func;
10169 #endif
10170
10171 ; return 0; }
10172 EOF
10173 if { (eval echo configure:10174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10174   rm -rf conftest*
10175   eval "ac_cv_func_$ac_func=yes"
10176 else
10177   echo "configure: failed program was:" >&5
10178   cat conftest.$ac_ext >&5
10179   rm -rf conftest*
10180   eval "ac_cv_func_$ac_func=no"
10181 fi
10182 rm -f conftest*
10183 fi
10184
10185 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10186   echo "$ac_t""yes" 1>&6
10187     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10188   cat >> confdefs.h <<EOF
10189 #define $ac_tr_func 1
10190 EOF
10191  
10192 else
10193   echo "$ac_t""no" 1>&6
10194 fi
10195 done
10196
10197
10198                         
10199         for ac_func in pthread_kill_other_threads_np
10200 do
10201 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10202 echo "configure:10203: checking for $ac_func" >&5
10203 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10204   echo $ac_n "(cached) $ac_c" 1>&6
10205 else
10206   cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 /* System header to define __stub macros and hopefully few prototypes,
10210     which can conflict with char $ac_func(); below.  */
10211 #include <assert.h>
10212 /* Override any gcc2 internal prototype to avoid an error.  */
10213 /* We use char because int might match the return type of a gcc2
10214     builtin and then its argument prototype would still apply.  */
10215 char $ac_func();
10216 char (*f)();
10217
10218 int main() {
10219
10220 /* The GNU C library defines this for functions which it implements
10221     to always fail with ENOSYS.  Some functions are actually named
10222     something starting with __ and the normal name is an alias.  */
10223 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10224 choke me
10225 #else
10226 f = $ac_func;
10227 #endif
10228
10229 ; return 0; }
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10232   rm -rf conftest*
10233   eval "ac_cv_func_$ac_func=yes"
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   eval "ac_cv_func_$ac_func=no"
10239 fi
10240 rm -f conftest*
10241 fi
10242
10243 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10244   echo "$ac_t""yes" 1>&6
10245     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10246   cat >> confdefs.h <<EOF
10247 #define $ac_tr_func 1
10248 EOF
10249  
10250 else
10251   echo "$ac_t""no" 1>&6
10252 fi
10253 done
10254
10255         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10256 echo "configure:10257: checking for LinuxThreads implementation" >&5
10257 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10258   echo $ac_n "(cached) $ac_c" 1>&6
10259 else
10260   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10261 fi
10262
10263 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10264
10265                         
10266         
10267         
10268         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10269 echo "configure:10270: checking for LinuxThreads consistency" >&5
10270 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10271   echo $ac_n "(cached) $ac_c" 1>&6
10272 else
10273   
10274                 if test $ol_cv_header_linux_threads = yes -a \
10275                         $ol_cv_sys_linux_threads = yes; then
10276                         ol_cv_linux_threads=yes
10277                 elif test $ol_cv_header_linux_threads = no -a \
10278                         $ol_cv_sys_linux_threads = no; then
10279                         ol_cv_linux_threads=no
10280                 else
10281                         ol_cv_linux_threads=error
10282                 fi
10283         
10284 fi
10285
10286 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10287
10288
10289                         if test $ol_cv_linux_threads = error; then
10290                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10291                         fi
10292
10293                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10294 echo "configure:10295: checking if pthread_create() works" >&5
10295 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10296   echo $ac_n "(cached) $ac_c" 1>&6
10297 else
10298   
10299                         if test "$cross_compiling" = yes; then
10300                                 ol_cv_pthread_create_works=yes
10301 else
10302   cat > conftest.$ac_ext <<EOF
10303 #line 10304 "configure"
10304 #include "confdefs.h"
10305 /* pthread test headers */
10306 #include <pthread.h>
10307 #ifndef NULL
10308 #define NULL (void*)0
10309 #endif
10310
10311 static void *task(p)
10312         void *p;
10313 {
10314         return (void *) (p == NULL);
10315 }
10316
10317
10318 int main(argc, argv)
10319         int argc;
10320         char **argv;
10321 {
10322
10323         /* pthread test function */
10324         pthread_t t;
10325         int status;
10326 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10327         /* This system (e.g. AIX) defaults detached; must override */
10328         pthread_attr_t attr;
10329
10330         status = pthread_attr_init(&attr);
10331         if( status ) exit( status );
10332
10333         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10334         if( status ) exit( status );
10335
10336 #define ATTR    &attr
10337 #else
10338 #if HAVE_PTHREADS_D4
10339 #define ATTR    pthread_attr_default
10340 #else
10341 #define ATTR    NULL
10342 #endif
10343 #endif
10344         /* make sure pthread_create() isn't just a stub */
10345         status = pthread_create(&t, ATTR, task, NULL);
10346         if( status ) exit( status );
10347
10348         /* make sure pthread_detach() isn't just a stub */
10349 #if HAVE_PTHREADS_D4
10350         status = pthread_detach( &t );
10351 #else
10352         status = pthread_detach( t );
10353 #endif
10354
10355 #ifdef HAVE_LINUX_THREADS
10356         pthread_kill_other_threads_np();
10357 #endif
10358
10359         exit( status );
10360
10361 }
10362
10363 EOF
10364 if { (eval echo configure:10365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10365 then
10366   ol_cv_pthread_create_works=yes
10367 else
10368   echo "configure: failed program was:" >&5
10369   cat conftest.$ac_ext >&5
10370   rm -fr conftest*
10371   ol_cv_pthread_create_works=no
10372 fi
10373 rm -fr conftest*
10374 fi
10375
10376 fi
10377
10378 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10379
10380                         if test $ol_cv_pthread_create_works = no ; then
10381                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10382                         fi
10383
10384                                                 if test $ol_with_yielding_select = auto ; then
10385                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10386 echo "configure:10387: checking if select yields when using pthreads" >&5
10387 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10388   echo $ac_n "(cached) $ac_c" 1>&6
10389 else
10390   
10391                                 if test "$cross_compiling" = yes; then
10392   ol_cv_pthread_select_yields=cross
10393 else
10394   cat > conftest.$ac_ext <<EOF
10395 #line 10396 "configure"
10396 #include "confdefs.h"
10397
10398 #include <sys/types.h>
10399 #include <sys/time.h>
10400 #include <unistd.h>
10401 #include <pthread.h>
10402 #ifndef NULL
10403 #define NULL (void*) 0
10404 #endif
10405
10406 static int fildes[2];
10407
10408 static void *task(p)
10409         void *p;
10410 {
10411         int i;
10412         struct timeval tv;
10413
10414         fd_set rfds;
10415
10416         tv.tv_sec=10;
10417         tv.tv_usec=0;
10418
10419         FD_ZERO(&rfds);
10420         FD_SET(fildes[0], &rfds);
10421
10422         /* we're not interested in any fds */
10423         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10424
10425         if(i < 0) {
10426                 perror("select");
10427                 exit(10);
10428         }
10429
10430         exit(0); /* if we exit here, the select blocked the whole process */
10431 }
10432
10433 int main(argc, argv)
10434         int argc;
10435         char **argv;
10436 {
10437         pthread_t t;
10438
10439         /* create a pipe to select */
10440         if(pipe(&fildes[0])) {
10441                 perror("select");
10442                 exit(1);
10443         }
10444
10445 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10446         (void) pthread_setconcurrency(2);
10447 #else
10448 #ifdef HAVE_THR_SETCONCURRENCY
10449         /* Set Solaris LWP concurrency to 2 */
10450         thr_setconcurrency(2);
10451 #endif
10452 #endif
10453
10454 #if HAVE_PTHREADS_D4
10455         pthread_create(&t, pthread_attr_default, task, NULL);
10456 #else
10457         pthread_create(&t, NULL, task, NULL);
10458 #endif
10459
10460 #if HAVE_SCHED_YIELD
10461         sched_yield();  /* make sure task runs first */
10462 #else
10463 #ifdef HAVE_PTHREAD_YIELD
10464         pthread_yield();        /* make sure task runs first */
10465 #endif
10466 #endif
10467
10468         exit(2);
10469 }
10470 EOF
10471 if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10472 then
10473   ol_cv_pthread_select_yields=no
10474 else
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -fr conftest*
10478   ol_cv_pthread_select_yields=yes
10479 fi
10480 rm -fr conftest*
10481 fi
10482
10483 fi
10484
10485 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10486
10487                                 if test $ol_cv_pthread_select_yields = cross ; then
10488                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10489                                 fi
10490
10491                                 if test $ol_cv_pthread_select_yields = yes ; then
10492                                         ol_with_yielding_select=yes
10493                                 fi
10494                         fi
10495
10496                                                 CPPFLAGS="$save_CPPFLAGS"
10497                         LIBS="$save_LIBS"
10498                 else
10499                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10500                 fi
10501         fi
10502
10503         if test $ol_with_threads = posix ; then
10504                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10505         fi
10506 fi
10507
10508 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10509         -o $ol_with_threads = mach ; then
10510
10511                 for ac_hdr in mach/cthreads.h
10512 do
10513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10515 echo "configure:10516: checking for $ac_hdr" >&5
10516 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10517   echo $ac_n "(cached) $ac_c" 1>&6
10518 else
10519   cat > conftest.$ac_ext <<EOF
10520 #line 10521 "configure"
10521 #include "confdefs.h"
10522 #include <$ac_hdr>
10523 EOF
10524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10525 { (eval echo configure:10526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10527 if test -z "$ac_err"; then
10528   rm -rf conftest*
10529   eval "ac_cv_header_$ac_safe=yes"
10530 else
10531   echo "$ac_err" >&5
10532   echo "configure: failed program was:" >&5
10533   cat conftest.$ac_ext >&5
10534   rm -rf conftest*
10535   eval "ac_cv_header_$ac_safe=no"
10536 fi
10537 rm -f conftest*
10538 fi
10539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10540   echo "$ac_t""yes" 1>&6
10541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10542   cat >> confdefs.h <<EOF
10543 #define $ac_tr_hdr 1
10544 EOF
10545  
10546 else
10547   echo "$ac_t""no" 1>&6
10548 fi
10549 done
10550
10551         if test $ac_cv_header_mach_cthreads_h = yes ; then
10552                 ol_with_threads=found
10553
10554                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10555 echo "configure:10556: checking for cthread_fork" >&5
10556 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10557   echo $ac_n "(cached) $ac_c" 1>&6
10558 else
10559   cat > conftest.$ac_ext <<EOF
10560 #line 10561 "configure"
10561 #include "confdefs.h"
10562 /* System header to define __stub macros and hopefully few prototypes,
10563     which can conflict with char cthread_fork(); below.  */
10564 #include <assert.h>
10565 /* Override any gcc2 internal prototype to avoid an error.  */
10566 /* We use char because int might match the return type of a gcc2
10567     builtin and then its argument prototype would still apply.  */
10568 char cthread_fork();
10569 char (*f)();
10570
10571 int main() {
10572
10573 /* The GNU C library defines this for functions which it implements
10574     to always fail with ENOSYS.  Some functions are actually named
10575     something starting with __ and the normal name is an alias.  */
10576 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10577 choke me
10578 #else
10579 f = cthread_fork;
10580 #endif
10581
10582 ; return 0; }
10583 EOF
10584 if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10585   rm -rf conftest*
10586   eval "ac_cv_func_cthread_fork=yes"
10587 else
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -rf conftest*
10591   eval "ac_cv_func_cthread_fork=no"
10592 fi
10593 rm -f conftest*
10594 fi
10595
10596 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10597   echo "$ac_t""yes" 1>&6
10598   ol_link_threads=yes
10599 else
10600   echo "$ac_t""no" 1>&6
10601 fi
10602
10603
10604                 if test $ol_link_threads = no ; then
10605                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10606 echo "configure:10607: checking for cthread_fork with -all_load" >&5
10607 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10608   echo $ac_n "(cached) $ac_c" 1>&6
10609 else
10610   
10611                                                                 save_LIBS="$LIBS"
10612                                 LIBS="-all_load $LIBS"
10613                                 cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10616 #include <mach/cthreads.h>
10617 int main() {
10618
10619                                         cthread_fork((void *)0, (void *)0);
10620                                         
10621 ; return 0; }
10622 EOF
10623 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10624   rm -rf conftest*
10625   ol_cv_cthread_all_load=yes
10626 else
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -rf conftest*
10630   ol_cv_cthread_all_load=no
10631 fi
10632 rm -f conftest*
10633                                                                 LIBS="$save_LIBS"
10634                         
10635 fi
10636
10637 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10638
10639                         if test $ol_cv_cthread_all_load = yes ; then
10640                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10641                                 ol_link_threads=mach
10642                         fi
10643                 fi
10644
10645                 if test $ol_link_threads != no ; then
10646                         : check for cthread specific functionality here
10647                         cat >> confdefs.h <<\EOF
10648 #define HAVE_MACH_CTHREADS 1
10649 EOF
10650
10651                 else
10652                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10653                 fi
10654         fi
10655
10656         if test $ol_with_threads = mach ; then
10657                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10658         fi
10659 fi
10660
10661 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10662         -o $ol_with_threads = pth ; then
10663
10664         for ac_hdr in pth.h
10665 do
10666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10668 echo "configure:10669: checking for $ac_hdr" >&5
10669 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10670   echo $ac_n "(cached) $ac_c" 1>&6
10671 else
10672   cat > conftest.$ac_ext <<EOF
10673 #line 10674 "configure"
10674 #include "confdefs.h"
10675 #include <$ac_hdr>
10676 EOF
10677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10678 { (eval echo configure:10679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10680 if test -z "$ac_err"; then
10681   rm -rf conftest*
10682   eval "ac_cv_header_$ac_safe=yes"
10683 else
10684   echo "$ac_err" >&5
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_header_$ac_safe=no"
10689 fi
10690 rm -f conftest*
10691 fi
10692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10693   echo "$ac_t""yes" 1>&6
10694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10695   cat >> confdefs.h <<EOF
10696 #define $ac_tr_hdr 1
10697 EOF
10698  
10699 else
10700   echo "$ac_t""no" 1>&6
10701 fi
10702 done
10703
10704
10705         if test $ac_cv_header_pth_h = yes ; then
10706                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10707 echo "configure:10708: checking for pth_version in -lpth" >&5
10708 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10709 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10710   echo $ac_n "(cached) $ac_c" 1>&6
10711 else
10712   ac_save_LIBS="$LIBS"
10713 LIBS="-lpth  $LIBS"
10714 cat > conftest.$ac_ext <<EOF
10715 #line 10716 "configure"
10716 #include "confdefs.h"
10717 /* Override any gcc2 internal prototype to avoid an error.  */
10718 /* We use char because int might match the return type of a gcc2
10719     builtin and then its argument prototype would still apply.  */
10720 char pth_version();
10721
10722 int main() {
10723 pth_version()
10724 ; return 0; }
10725 EOF
10726 if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=yes"
10729 else
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   eval "ac_cv_lib_$ac_lib_var=no"
10734 fi
10735 rm -f conftest*
10736 LIBS="$ac_save_LIBS"
10737
10738 fi
10739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10740   echo "$ac_t""yes" 1>&6
10741   have_pth=yes
10742 else
10743   echo "$ac_t""no" 1>&6
10744 have_pth=no
10745 fi
10746
10747
10748                 if test $have_pth = yes ; then
10749                         cat >> confdefs.h <<\EOF
10750 #define HAVE_GNU_PTH 1
10751 EOF
10752
10753                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10754                         ol_link_threads=pth
10755
10756                         if test $ol_with_yielding_select = auto ; then
10757                                 ol_with_yielding_select=yes
10758                         fi
10759                 fi
10760         fi
10761 fi
10762
10763 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10764         -o $ol_with_threads = lwp ; then
10765
10766                 for ac_hdr in thread.h synch.h
10767 do
10768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10770 echo "configure:10771: checking for $ac_hdr" >&5
10771 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10772   echo $ac_n "(cached) $ac_c" 1>&6
10773 else
10774   cat > conftest.$ac_ext <<EOF
10775 #line 10776 "configure"
10776 #include "confdefs.h"
10777 #include <$ac_hdr>
10778 EOF
10779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10780 { (eval echo configure:10781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10782 if test -z "$ac_err"; then
10783   rm -rf conftest*
10784   eval "ac_cv_header_$ac_safe=yes"
10785 else
10786   echo "$ac_err" >&5
10787   echo "configure: failed program was:" >&5
10788   cat conftest.$ac_ext >&5
10789   rm -rf conftest*
10790   eval "ac_cv_header_$ac_safe=no"
10791 fi
10792 rm -f conftest*
10793 fi
10794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10795   echo "$ac_t""yes" 1>&6
10796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10797   cat >> confdefs.h <<EOF
10798 #define $ac_tr_hdr 1
10799 EOF
10800  
10801 else
10802   echo "$ac_t""no" 1>&6
10803 fi
10804 done
10805
10806         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10807                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10808 echo "configure:10809: checking for thr_create in -lthread" >&5
10809 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10810 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10811   echo $ac_n "(cached) $ac_c" 1>&6
10812 else
10813   ac_save_LIBS="$LIBS"
10814 LIBS="-lthread  $LIBS"
10815 cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 /* Override any gcc2 internal prototype to avoid an error.  */
10819 /* We use char because int might match the return type of a gcc2
10820     builtin and then its argument prototype would still apply.  */
10821 char thr_create();
10822
10823 int main() {
10824 thr_create()
10825 ; return 0; }
10826 EOF
10827 if { (eval echo configure:10828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10828   rm -rf conftest*
10829   eval "ac_cv_lib_$ac_lib_var=yes"
10830 else
10831   echo "configure: failed program was:" >&5
10832   cat conftest.$ac_ext >&5
10833   rm -rf conftest*
10834   eval "ac_cv_lib_$ac_lib_var=no"
10835 fi
10836 rm -f conftest*
10837 LIBS="$ac_save_LIBS"
10838
10839 fi
10840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10841   echo "$ac_t""yes" 1>&6
10842   have_thr=yes
10843 else
10844   echo "$ac_t""no" 1>&6
10845 have_thr=no
10846 fi
10847
10848
10849                 if test $have_thr = yes ; then
10850                         cat >> confdefs.h <<\EOF
10851 #define HAVE_THR 1
10852 EOF
10853
10854                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10855                         ol_link_threads=thr
10856
10857                         if test $ol_with_yielding_select = auto ; then
10858                                 ol_with_yielding_select=yes
10859                         fi
10860
10861                                                 for ac_func in \
10862                                 thr_setconcurrency \
10863                                 thr_getconcurrency \
10864                         
10865 do
10866 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10867 echo "configure:10868: checking for $ac_func" >&5
10868 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10869   echo $ac_n "(cached) $ac_c" 1>&6
10870 else
10871   cat > conftest.$ac_ext <<EOF
10872 #line 10873 "configure"
10873 #include "confdefs.h"
10874 /* System header to define __stub macros and hopefully few prototypes,
10875     which can conflict with char $ac_func(); below.  */
10876 #include <assert.h>
10877 /* Override any gcc2 internal prototype to avoid an error.  */
10878 /* We use char because int might match the return type of a gcc2
10879     builtin and then its argument prototype would still apply.  */
10880 char $ac_func();
10881 char (*f)();
10882
10883 int main() {
10884
10885 /* The GNU C library defines this for functions which it implements
10886     to always fail with ENOSYS.  Some functions are actually named
10887     something starting with __ and the normal name is an alias.  */
10888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10889 choke me
10890 #else
10891 f = $ac_func;
10892 #endif
10893
10894 ; return 0; }
10895 EOF
10896 if { (eval echo configure:10897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10897   rm -rf conftest*
10898   eval "ac_cv_func_$ac_func=yes"
10899 else
10900   echo "configure: failed program was:" >&5
10901   cat conftest.$ac_ext >&5
10902   rm -rf conftest*
10903   eval "ac_cv_func_$ac_func=no"
10904 fi
10905 rm -f conftest*
10906 fi
10907
10908 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10909   echo "$ac_t""yes" 1>&6
10910     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10911   cat >> confdefs.h <<EOF
10912 #define $ac_tr_func 1
10913 EOF
10914  
10915 else
10916   echo "$ac_t""no" 1>&6
10917 fi
10918 done
10919
10920                 fi
10921         fi
10922
10923                 for ac_hdr in lwp/lwp.h
10924 do
10925 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10926 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10927 echo "configure:10928: checking for $ac_hdr" >&5
10928 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10929   echo $ac_n "(cached) $ac_c" 1>&6
10930 else
10931   cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 #include <$ac_hdr>
10935 EOF
10936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10937 { (eval echo configure:10938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10939 if test -z "$ac_err"; then
10940   rm -rf conftest*
10941   eval "ac_cv_header_$ac_safe=yes"
10942 else
10943   echo "$ac_err" >&5
10944   echo "configure: failed program was:" >&5
10945   cat conftest.$ac_ext >&5
10946   rm -rf conftest*
10947   eval "ac_cv_header_$ac_safe=no"
10948 fi
10949 rm -f conftest*
10950 fi
10951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10952   echo "$ac_t""yes" 1>&6
10953     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10954   cat >> confdefs.h <<EOF
10955 #define $ac_tr_hdr 1
10956 EOF
10957  
10958 else
10959   echo "$ac_t""no" 1>&6
10960 fi
10961 done
10962
10963         if test $ac_cv_header_lwp_lwp_h = yes ; then
10964                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10965 echo "configure:10966: checking for lwp_create in -llwp" >&5
10966 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10967 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10968   echo $ac_n "(cached) $ac_c" 1>&6
10969 else
10970   ac_save_LIBS="$LIBS"
10971 LIBS="-llwp  $LIBS"
10972 cat > conftest.$ac_ext <<EOF
10973 #line 10974 "configure"
10974 #include "confdefs.h"
10975 /* Override any gcc2 internal prototype to avoid an error.  */
10976 /* We use char because int might match the return type of a gcc2
10977     builtin and then its argument prototype would still apply.  */
10978 char lwp_create();
10979
10980 int main() {
10981 lwp_create()
10982 ; return 0; }
10983 EOF
10984 if { (eval echo configure:10985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10985   rm -rf conftest*
10986   eval "ac_cv_lib_$ac_lib_var=yes"
10987 else
10988   echo "configure: failed program was:" >&5
10989   cat conftest.$ac_ext >&5
10990   rm -rf conftest*
10991   eval "ac_cv_lib_$ac_lib_var=no"
10992 fi
10993 rm -f conftest*
10994 LIBS="$ac_save_LIBS"
10995
10996 fi
10997 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10998   echo "$ac_t""yes" 1>&6
10999   have_lwp=yes
11000 else
11001   echo "$ac_t""no" 1>&6
11002 have_lwp=no
11003 fi
11004
11005
11006                 if test $have_lwp = yes ; then
11007                         cat >> confdefs.h <<\EOF
11008 #define HAVE_LWP 1
11009 EOF
11010
11011                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11012                         ol_link_threads=lwp
11013
11014                         if test $ol_with_yielding_select = auto ; then
11015                                 ol_with_yielding_select=no
11016                         fi
11017                 fi
11018         fi
11019 fi
11020
11021 if test $ol_with_yielding_select = yes ; then
11022         cat >> confdefs.h <<\EOF
11023 #define HAVE_YIELDING_SELECT 1
11024 EOF
11025
11026 fi
11027
11028 if test $ol_with_threads = manual ; then
11029                 ol_link_threads=yes
11030
11031         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11032
11033         for ac_hdr in pthread.h sched.h
11034 do
11035 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11036 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11037 echo "configure:11038: checking for $ac_hdr" >&5
11038 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11039   echo $ac_n "(cached) $ac_c" 1>&6
11040 else
11041   cat > conftest.$ac_ext <<EOF
11042 #line 11043 "configure"
11043 #include "confdefs.h"
11044 #include <$ac_hdr>
11045 EOF
11046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11047 { (eval echo configure:11048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11049 if test -z "$ac_err"; then
11050   rm -rf conftest*
11051   eval "ac_cv_header_$ac_safe=yes"
11052 else
11053   echo "$ac_err" >&5
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   eval "ac_cv_header_$ac_safe=no"
11058 fi
11059 rm -f conftest*
11060 fi
11061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11062   echo "$ac_t""yes" 1>&6
11063     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11064   cat >> confdefs.h <<EOF
11065 #define $ac_tr_hdr 1
11066 EOF
11067  
11068 else
11069   echo "$ac_t""no" 1>&6
11070 fi
11071 done
11072
11073         for ac_func in sched_yield pthread_yield
11074 do
11075 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11076 echo "configure:11077: checking for $ac_func" >&5
11077 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11078   echo $ac_n "(cached) $ac_c" 1>&6
11079 else
11080   cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 /* System header to define __stub macros and hopefully few prototypes,
11084     which can conflict with char $ac_func(); below.  */
11085 #include <assert.h>
11086 /* Override any gcc2 internal prototype to avoid an error.  */
11087 /* We use char because int might match the return type of a gcc2
11088     builtin and then its argument prototype would still apply.  */
11089 char $ac_func();
11090 char (*f)();
11091
11092 int main() {
11093
11094 /* The GNU C library defines this for functions which it implements
11095     to always fail with ENOSYS.  Some functions are actually named
11096     something starting with __ and the normal name is an alias.  */
11097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11098 choke me
11099 #else
11100 f = $ac_func;
11101 #endif
11102
11103 ; return 0; }
11104 EOF
11105 if { (eval echo configure:11106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11106   rm -rf conftest*
11107   eval "ac_cv_func_$ac_func=yes"
11108 else
11109   echo "configure: failed program was:" >&5
11110   cat conftest.$ac_ext >&5
11111   rm -rf conftest*
11112   eval "ac_cv_func_$ac_func=no"
11113 fi
11114 rm -f conftest*
11115 fi
11116
11117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11118   echo "$ac_t""yes" 1>&6
11119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11120   cat >> confdefs.h <<EOF
11121 #define $ac_tr_func 1
11122 EOF
11123  
11124 else
11125   echo "$ac_t""no" 1>&6
11126 fi
11127 done
11128
11129         
11130         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11131 echo "configure:11132: checking for LinuxThreads pthread.h" >&5
11132 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11133   echo $ac_n "(cached) $ac_c" 1>&6
11134 else
11135   cat > conftest.$ac_ext <<EOF
11136 #line 11137 "configure"
11137 #include "confdefs.h"
11138 #include <pthread.h>
11139 EOF
11140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11141   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11142   rm -rf conftest*
11143   ol_cv_header_linux_threads=yes
11144 else
11145   rm -rf conftest*
11146   ol_cv_header_linux_threads=no
11147 fi
11148 rm -f conftest*
11149
11150                 
11151 fi
11152
11153 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11154         if test $ol_cv_header_linux_threads = yes; then
11155                 cat >> confdefs.h <<\EOF
11156 #define HAVE_LINUX_THREADS 1
11157 EOF
11158
11159         fi
11160
11161
11162         for ac_hdr in mach/cthreads.h
11163 do
11164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11166 echo "configure:11167: checking for $ac_hdr" >&5
11167 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170   cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 #include <$ac_hdr>
11174 EOF
11175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11176 { (eval echo configure:11177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11178 if test -z "$ac_err"; then
11179   rm -rf conftest*
11180   eval "ac_cv_header_$ac_safe=yes"
11181 else
11182   echo "$ac_err" >&5
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -rf conftest*
11186   eval "ac_cv_header_$ac_safe=no"
11187 fi
11188 rm -f conftest*
11189 fi
11190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11191   echo "$ac_t""yes" 1>&6
11192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11193   cat >> confdefs.h <<EOF
11194 #define $ac_tr_hdr 1
11195 EOF
11196  
11197 else
11198   echo "$ac_t""no" 1>&6
11199 fi
11200 done
11201
11202         for ac_hdr in lwp/lwp.h
11203 do
11204 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11205 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11206 echo "configure:11207: checking for $ac_hdr" >&5
11207 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11208   echo $ac_n "(cached) $ac_c" 1>&6
11209 else
11210   cat > conftest.$ac_ext <<EOF
11211 #line 11212 "configure"
11212 #include "confdefs.h"
11213 #include <$ac_hdr>
11214 EOF
11215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11216 { (eval echo configure:11217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11218 if test -z "$ac_err"; then
11219   rm -rf conftest*
11220   eval "ac_cv_header_$ac_safe=yes"
11221 else
11222   echo "$ac_err" >&5
11223   echo "configure: failed program was:" >&5
11224   cat conftest.$ac_ext >&5
11225   rm -rf conftest*
11226   eval "ac_cv_header_$ac_safe=no"
11227 fi
11228 rm -f conftest*
11229 fi
11230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11231   echo "$ac_t""yes" 1>&6
11232     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11233   cat >> confdefs.h <<EOF
11234 #define $ac_tr_hdr 1
11235 EOF
11236  
11237 else
11238   echo "$ac_t""no" 1>&6
11239 fi
11240 done
11241
11242         for ac_hdr in thread.h synch.h
11243 do
11244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11246 echo "configure:11247: checking for $ac_hdr" >&5
11247 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11248   echo $ac_n "(cached) $ac_c" 1>&6
11249 else
11250   cat > conftest.$ac_ext <<EOF
11251 #line 11252 "configure"
11252 #include "confdefs.h"
11253 #include <$ac_hdr>
11254 EOF
11255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11256 { (eval echo configure:11257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11258 if test -z "$ac_err"; then
11259   rm -rf conftest*
11260   eval "ac_cv_header_$ac_safe=yes"
11261 else
11262   echo "$ac_err" >&5
11263   echo "configure: failed program was:" >&5
11264   cat conftest.$ac_ext >&5
11265   rm -rf conftest*
11266   eval "ac_cv_header_$ac_safe=no"
11267 fi
11268 rm -f conftest*
11269 fi
11270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11271   echo "$ac_t""yes" 1>&6
11272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11273   cat >> confdefs.h <<EOF
11274 #define $ac_tr_hdr 1
11275 EOF
11276  
11277 else
11278   echo "$ac_t""no" 1>&6
11279 fi
11280 done
11281
11282 fi
11283
11284 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11285                         cat >> confdefs.h <<\EOF
11286 #define REENTRANT 1
11287 EOF
11288
11289         cat >> confdefs.h <<\EOF
11290 #define _REENTRANT 1
11291 EOF
11292
11293         cat >> confdefs.h <<\EOF
11294 #define THREAD_SAFE 1
11295 EOF
11296
11297         cat >> confdefs.h <<\EOF
11298 #define _THREAD_SAFE 1
11299 EOF
11300
11301         cat >> confdefs.h <<\EOF
11302 #define THREADSAFE 1
11303 EOF
11304
11305         cat >> confdefs.h <<\EOF
11306 #define _THREADSAFE 1
11307 EOF
11308
11309         cat >> confdefs.h <<\EOF
11310 #define _SGI_MP_SOURCE 1
11311 EOF
11312
11313
11314                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11315 echo "configure:11316: checking for thread specific errno" >&5
11316 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11317   echo $ac_n "(cached) $ac_c" 1>&6
11318 else
11319   
11320                 cat > conftest.$ac_ext <<EOF
11321 #line 11322 "configure"
11322 #include "confdefs.h"
11323 #include <errno.h>
11324 int main() {
11325 errno = 0;
11326 ; return 0; }
11327 EOF
11328 if { (eval echo configure:11329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11329   rm -rf conftest*
11330   ol_cv_errno_thread_specific=yes
11331 else
11332   echo "configure: failed program was:" >&5
11333   cat conftest.$ac_ext >&5
11334   rm -rf conftest*
11335   ol_cv_errno_thread_specific=no
11336 fi
11337 rm -f conftest*
11338         
11339 fi
11340
11341 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11342
11343                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11344 echo "configure:11345: checking for thread specific h_errno" >&5
11345 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11346   echo $ac_n "(cached) $ac_c" 1>&6
11347 else
11348   
11349                 cat > conftest.$ac_ext <<EOF
11350 #line 11351 "configure"
11351 #include "confdefs.h"
11352 #include <netdb.h>
11353 int main() {
11354 h_errno = 0;
11355 ; return 0; }
11356 EOF
11357 if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11358   rm -rf conftest*
11359   ol_cv_h_errno_thread_specific=yes
11360 else
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -rf conftest*
11364   ol_cv_h_errno_thread_specific=no
11365 fi
11366 rm -f conftest*
11367         
11368 fi
11369
11370 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11371
11372         if test $ol_cv_errno_thread_specific != yes \
11373                 -o $ol_cv_h_errno_thread_specific != yes ; then
11374                 LIBS="$LTHREAD_LIBS $LIBS"
11375                 LTHREAD_LIBS=""
11376         fi
11377
11378 fi  
11379
11380 if test $ol_link_threads = no ; then
11381         if test $ol_with_threads = yes ; then
11382                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11383         fi
11384
11385         if test $ol_with_threads = auto ; then
11386                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11387                 ol_with_threads=no
11388         fi
11389
11390         cat >> confdefs.h <<\EOF
11391 #define NO_THREADS 1
11392 EOF
11393
11394         LTHREAD_LIBS=""
11395 fi
11396
11397 if test $ol_link_threads != no ; then
11398         cat >> confdefs.h <<\EOF
11399 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11400 EOF
11401
11402 fi
11403
11404 ol_link_ldbm=no 
11405
11406 if test $ol_with_ldbm_api = auto \
11407         -o $ol_with_ldbm_api = berkeley \
11408         -o $ol_with_ldbm_api = bcompat ; then
11409
11410         if test $ol_with_ldbm_api = bcompat; then \
11411                 ol_cv_berkeley_db=no
11412 for ac_hdr in db_185.h db.h
11413 do
11414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11416 echo "configure:11417: checking for $ac_hdr" >&5
11417 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11418   echo $ac_n "(cached) $ac_c" 1>&6
11419 else
11420   cat > conftest.$ac_ext <<EOF
11421 #line 11422 "configure"
11422 #include "confdefs.h"
11423 #include <$ac_hdr>
11424 EOF
11425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11426 { (eval echo configure:11427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11428 if test -z "$ac_err"; then
11429   rm -rf conftest*
11430   eval "ac_cv_header_$ac_safe=yes"
11431 else
11432   echo "$ac_err" >&5
11433   echo "configure: failed program was:" >&5
11434   cat conftest.$ac_ext >&5
11435   rm -rf conftest*
11436   eval "ac_cv_header_$ac_safe=no"
11437 fi
11438 rm -f conftest*
11439 fi
11440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11441   echo "$ac_t""yes" 1>&6
11442     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11443   cat >> confdefs.h <<EOF
11444 #define $ac_tr_hdr 1
11445 EOF
11446  
11447 else
11448   echo "$ac_t""no" 1>&6
11449 fi
11450 done
11451
11452 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11453         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11454 echo "configure:11455: checking if Berkeley DB header compatibility" >&5
11455 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11456   echo $ac_n "(cached) $ac_c" 1>&6
11457 else
11458   
11459                 cat > conftest.$ac_ext <<EOF
11460 #line 11461 "configure"
11461 #include "confdefs.h"
11462
11463 #if HAVE_DB_185_H
11464 #       include <db_185.h>
11465 #else
11466 #       include <db.h>
11467 #endif
11468
11469  /* this check could be improved */
11470 #ifndef DB_VERSION_MAJOR
11471 #       define DB_VERSION_MAJOR 1
11472 #endif
11473
11474 #if DB_VERSION_MAJOR == 1 
11475         __db_version_1
11476 #endif
11477
11478 EOF
11479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11480   egrep "__db_version_1" >/dev/null 2>&1; then
11481   rm -rf conftest*
11482   ol_cv_header_db1=yes
11483 else
11484   rm -rf conftest*
11485   ol_cv_header_db1=no
11486 fi
11487 rm -f conftest*
11488
11489 fi
11490
11491 echo "$ac_t""$ol_cv_header_db1" 1>&6
11492
11493         if test ol_cv_header_db1=yes ; then
11494                 ol_cv_lib_db=no
11495 if test $ol_cv_lib_db = no ; then
11496         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11497 echo "configure:11498: checking for Berkeley DB link (default)" >&5
11498 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11499   echo $ac_n "(cached) $ac_c" 1>&6
11500 else
11501   
11502         ol_DB_LIB=
11503         ol_LIBS=$LIBS
11504         LIBS="$ol_DB_LIB $LIBS"
11505
11506         cat > conftest.$ac_ext <<EOF
11507 #line 11508 "configure"
11508 #include "confdefs.h"
11509
11510 #ifdef HAVE_DB_185_H
11511 # include <db_185.h>
11512 #else
11513 # include <db.h>
11514 #endif
11515
11516 #ifndef DB_VERSION_MAJOR
11517 # define DB_VERSION_MAJOR 1
11518 #endif
11519
11520 #ifndef NULL
11521 #define NULL ((void*)0)
11522 #endif
11523
11524 int main() {
11525
11526 #if DB_VERSION_MAJOR > 2
11527         db_env_create( NULL, 0 );
11528 #elif DB_VERSION_MAJOR > 1
11529         db_appexit( NULL );
11530 #else
11531         (void) dbopen( NULL, 0, 0, 0, NULL);
11532 #endif
11533
11534 ; return 0; }
11535 EOF
11536 if { (eval echo configure:11537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11537   rm -rf conftest*
11538   ol_cv_db_none=yes
11539 else
11540   echo "configure: failed program was:" >&5
11541   cat conftest.$ac_ext >&5
11542   rm -rf conftest*
11543   ol_cv_db_none=no
11544 fi
11545 rm -f conftest*
11546
11547         LIBS="$ol_LIBS"
11548
11549 fi
11550
11551 echo "$ac_t""$ol_cv_db_none" 1>&6
11552
11553         if test $ol_cv_db_none = yes ; then
11554                 ol_cv_lib_db=yes
11555         fi
11556 fi
11557
11558 if test $ol_cv_lib_db = no ; then
11559         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11560 echo "configure:11561: checking for Berkeley DB link (-ldb)" >&5
11561 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11562   echo $ac_n "(cached) $ac_c" 1>&6
11563 else
11564   
11565         ol_DB_LIB=-ldb
11566         ol_LIBS=$LIBS
11567         LIBS="$ol_DB_LIB $LIBS"
11568
11569         cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572
11573 #ifdef HAVE_DB_185_H
11574 # include <db_185.h>
11575 #else
11576 # include <db.h>
11577 #endif
11578
11579 #ifndef DB_VERSION_MAJOR
11580 # define DB_VERSION_MAJOR 1
11581 #endif
11582
11583 #ifndef NULL
11584 #define NULL ((void*)0)
11585 #endif
11586
11587 int main() {
11588
11589 #if DB_VERSION_MAJOR > 2
11590         db_env_create( NULL, 0 );
11591 #elif DB_VERSION_MAJOR > 1
11592         db_appexit( NULL );
11593 #else
11594         (void) dbopen( NULL, 0, 0, 0, NULL);
11595 #endif
11596
11597 ; return 0; }
11598 EOF
11599 if { (eval echo configure:11600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11600   rm -rf conftest*
11601   ol_cv_db_db=yes
11602 else
11603   echo "configure: failed program was:" >&5
11604   cat conftest.$ac_ext >&5
11605   rm -rf conftest*
11606   ol_cv_db_db=no
11607 fi
11608 rm -f conftest*
11609
11610         LIBS="$ol_LIBS"
11611
11612 fi
11613
11614 echo "$ac_t""$ol_cv_db_db" 1>&6
11615
11616         if test $ol_cv_db_db = yes ; then
11617                 ol_cv_lib_db=-ldb
11618         fi
11619 fi
11620
11621 if test $ol_cv_lib_db = no ; then
11622         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11623 echo "configure:11624: checking for Berkeley DB link (-ldb3)" >&5
11624 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11625   echo $ac_n "(cached) $ac_c" 1>&6
11626 else
11627   
11628         ol_DB_LIB=-ldb3
11629         ol_LIBS=$LIBS
11630         LIBS="$ol_DB_LIB $LIBS"
11631
11632         cat > conftest.$ac_ext <<EOF
11633 #line 11634 "configure"
11634 #include "confdefs.h"
11635
11636 #ifdef HAVE_DB_185_H
11637 # include <db_185.h>
11638 #else
11639 # include <db.h>
11640 #endif
11641
11642 #ifndef DB_VERSION_MAJOR
11643 # define DB_VERSION_MAJOR 1
11644 #endif
11645
11646 #ifndef NULL
11647 #define NULL ((void*)0)
11648 #endif
11649
11650 int main() {
11651
11652 #if DB_VERSION_MAJOR > 2
11653         db_env_create( NULL, 0 );
11654 #elif DB_VERSION_MAJOR > 1
11655         db_appexit( NULL );
11656 #else
11657         (void) dbopen( NULL, 0, 0, 0, NULL);
11658 #endif
11659
11660 ; return 0; }
11661 EOF
11662 if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11663   rm -rf conftest*
11664   ol_cv_db_db3=yes
11665 else
11666   echo "configure: failed program was:" >&5
11667   cat conftest.$ac_ext >&5
11668   rm -rf conftest*
11669   ol_cv_db_db3=no
11670 fi
11671 rm -f conftest*
11672
11673         LIBS="$ol_LIBS"
11674
11675 fi
11676
11677 echo "$ac_t""$ol_cv_db_db3" 1>&6
11678
11679         if test $ol_cv_db_db3 = yes ; then
11680                 ol_cv_lib_db=-ldb3
11681         fi
11682 fi
11683
11684 if test $ol_cv_lib_db = no ; then
11685         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11686 echo "configure:11687: checking for Berkeley DB link (-ldb2)" >&5
11687 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11688   echo $ac_n "(cached) $ac_c" 1>&6
11689 else
11690   
11691         ol_DB_LIB=-ldb2
11692         ol_LIBS=$LIBS
11693         LIBS="$ol_DB_LIB $LIBS"
11694
11695         cat > conftest.$ac_ext <<EOF
11696 #line 11697 "configure"
11697 #include "confdefs.h"
11698
11699 #ifdef HAVE_DB_185_H
11700 # include <db_185.h>
11701 #else
11702 # include <db.h>
11703 #endif
11704
11705 #ifndef DB_VERSION_MAJOR
11706 # define DB_VERSION_MAJOR 1
11707 #endif
11708
11709 #ifndef NULL
11710 #define NULL ((void*)0)
11711 #endif
11712
11713 int main() {
11714
11715 #if DB_VERSION_MAJOR > 2
11716         db_env_create( NULL, 0 );
11717 #elif DB_VERSION_MAJOR > 1
11718         db_appexit( NULL );
11719 #else
11720         (void) dbopen( NULL, 0, 0, 0, NULL);
11721 #endif
11722
11723 ; return 0; }
11724 EOF
11725 if { (eval echo configure:11726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11726   rm -rf conftest*
11727   ol_cv_db_db2=yes
11728 else
11729   echo "configure: failed program was:" >&5
11730   cat conftest.$ac_ext >&5
11731   rm -rf conftest*
11732   ol_cv_db_db2=no
11733 fi
11734 rm -f conftest*
11735
11736         LIBS="$ol_LIBS"
11737
11738 fi
11739
11740 echo "$ac_t""$ol_cv_db_db2" 1>&6
11741
11742         if test $ol_cv_db_db2 = yes ; then
11743                 ol_cv_lib_db=-ldb2
11744         fi
11745 fi
11746
11747 if test $ol_cv_lib_db = no ; then
11748         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11749 echo "configure:11750: checking for Berkeley DB link (-ldb1)" >&5
11750 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11751   echo $ac_n "(cached) $ac_c" 1>&6
11752 else
11753   
11754         ol_DB_LIB=-ldb1
11755         ol_LIBS=$LIBS
11756         LIBS="$ol_DB_LIB $LIBS"
11757
11758         cat > conftest.$ac_ext <<EOF
11759 #line 11760 "configure"
11760 #include "confdefs.h"
11761
11762 #ifdef HAVE_DB_185_H
11763 # include <db_185.h>
11764 #else
11765 # include <db.h>
11766 #endif
11767
11768 #ifndef DB_VERSION_MAJOR
11769 # define DB_VERSION_MAJOR 1
11770 #endif
11771
11772 #ifndef NULL
11773 #define NULL ((void*)0)
11774 #endif
11775
11776 int main() {
11777
11778 #if DB_VERSION_MAJOR > 2
11779         db_env_create( NULL, 0 );
11780 #elif DB_VERSION_MAJOR > 1
11781         db_appexit( NULL );
11782 #else
11783         (void) dbopen( NULL, 0, 0, 0, NULL);
11784 #endif
11785
11786 ; return 0; }
11787 EOF
11788 if { (eval echo configure:11789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11789   rm -rf conftest*
11790   ol_cv_db_db1=yes
11791 else
11792   echo "configure: failed program was:" >&5
11793   cat conftest.$ac_ext >&5
11794   rm -rf conftest*
11795   ol_cv_db_db1=no
11796 fi
11797 rm -f conftest*
11798
11799         LIBS="$ol_LIBS"
11800
11801 fi
11802
11803 echo "$ac_t""$ol_cv_db_db1" 1>&6
11804
11805         if test $ol_cv_db_db1 = yes ; then
11806                 ol_cv_lib_db=-ldb1
11807         fi
11808 fi
11809
11810
11811                 if test "$ol_cv_lib_db" != no ; then
11812                         ol_cv_berkeley_db=yes
11813                 fi
11814         fi
11815 fi
11816
11817         else
11818                 ol_cv_berkeley_db=no
11819 for ac_hdr in db.h
11820 do
11821 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11822 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11823 echo "configure:11824: checking for $ac_hdr" >&5
11824 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11825   echo $ac_n "(cached) $ac_c" 1>&6
11826 else
11827   cat > conftest.$ac_ext <<EOF
11828 #line 11829 "configure"
11829 #include "confdefs.h"
11830 #include <$ac_hdr>
11831 EOF
11832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11833 { (eval echo configure:11834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11835 if test -z "$ac_err"; then
11836   rm -rf conftest*
11837   eval "ac_cv_header_$ac_safe=yes"
11838 else
11839   echo "$ac_err" >&5
11840   echo "configure: failed program was:" >&5
11841   cat conftest.$ac_ext >&5
11842   rm -rf conftest*
11843   eval "ac_cv_header_$ac_safe=no"
11844 fi
11845 rm -f conftest*
11846 fi
11847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11848   echo "$ac_t""yes" 1>&6
11849     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11850   cat >> confdefs.h <<EOF
11851 #define $ac_tr_hdr 1
11852 EOF
11853  
11854 else
11855   echo "$ac_t""no" 1>&6
11856 fi
11857 done
11858
11859 if test $ac_cv_header_db_h = yes; then
11860         ol_cv_lib_db=no
11861 if test $ol_cv_lib_db = no ; then
11862         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11863 echo "configure:11864: checking for Berkeley DB link (default)" >&5
11864 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11865   echo $ac_n "(cached) $ac_c" 1>&6
11866 else
11867   
11868         ol_DB_LIB=
11869         ol_LIBS=$LIBS
11870         LIBS="$ol_DB_LIB $LIBS"
11871
11872         cat > conftest.$ac_ext <<EOF
11873 #line 11874 "configure"
11874 #include "confdefs.h"
11875
11876 #ifdef HAVE_DB_185_H
11877 # include <db_185.h>
11878 #else
11879 # include <db.h>
11880 #endif
11881
11882 #ifndef DB_VERSION_MAJOR
11883 # define DB_VERSION_MAJOR 1
11884 #endif
11885
11886 #ifndef NULL
11887 #define NULL ((void*)0)
11888 #endif
11889
11890 int main() {
11891
11892 #if DB_VERSION_MAJOR > 2
11893         db_env_create( NULL, 0 );
11894 #elif DB_VERSION_MAJOR > 1
11895         db_appexit( NULL );
11896 #else
11897         (void) dbopen( NULL, 0, 0, 0, NULL);
11898 #endif
11899
11900 ; return 0; }
11901 EOF
11902 if { (eval echo configure:11903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11903   rm -rf conftest*
11904   ol_cv_db_none=yes
11905 else
11906   echo "configure: failed program was:" >&5
11907   cat conftest.$ac_ext >&5
11908   rm -rf conftest*
11909   ol_cv_db_none=no
11910 fi
11911 rm -f conftest*
11912
11913         LIBS="$ol_LIBS"
11914
11915 fi
11916
11917 echo "$ac_t""$ol_cv_db_none" 1>&6
11918
11919         if test $ol_cv_db_none = yes ; then
11920                 ol_cv_lib_db=yes
11921         fi
11922 fi
11923
11924 if test $ol_cv_lib_db = no ; then
11925         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11926 echo "configure:11927: checking for Berkeley DB link (-ldb)" >&5
11927 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11928   echo $ac_n "(cached) $ac_c" 1>&6
11929 else
11930   
11931         ol_DB_LIB=-ldb
11932         ol_LIBS=$LIBS
11933         LIBS="$ol_DB_LIB $LIBS"
11934
11935         cat > conftest.$ac_ext <<EOF
11936 #line 11937 "configure"
11937 #include "confdefs.h"
11938
11939 #ifdef HAVE_DB_185_H
11940 # include <db_185.h>
11941 #else
11942 # include <db.h>
11943 #endif
11944
11945 #ifndef DB_VERSION_MAJOR
11946 # define DB_VERSION_MAJOR 1
11947 #endif
11948
11949 #ifndef NULL
11950 #define NULL ((void*)0)
11951 #endif
11952
11953 int main() {
11954
11955 #if DB_VERSION_MAJOR > 2
11956         db_env_create( NULL, 0 );
11957 #elif DB_VERSION_MAJOR > 1
11958         db_appexit( NULL );
11959 #else
11960         (void) dbopen( NULL, 0, 0, 0, NULL);
11961 #endif
11962
11963 ; return 0; }
11964 EOF
11965 if { (eval echo configure:11966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11966   rm -rf conftest*
11967   ol_cv_db_db=yes
11968 else
11969   echo "configure: failed program was:" >&5
11970   cat conftest.$ac_ext >&5
11971   rm -rf conftest*
11972   ol_cv_db_db=no
11973 fi
11974 rm -f conftest*
11975
11976         LIBS="$ol_LIBS"
11977
11978 fi
11979
11980 echo "$ac_t""$ol_cv_db_db" 1>&6
11981
11982         if test $ol_cv_db_db = yes ; then
11983                 ol_cv_lib_db=-ldb
11984         fi
11985 fi
11986
11987 if test $ol_cv_lib_db = no ; then
11988         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11989 echo "configure:11990: checking for Berkeley DB link (-ldb3)" >&5
11990 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11991   echo $ac_n "(cached) $ac_c" 1>&6
11992 else
11993   
11994         ol_DB_LIB=-ldb3
11995         ol_LIBS=$LIBS
11996         LIBS="$ol_DB_LIB $LIBS"
11997
11998         cat > conftest.$ac_ext <<EOF
11999 #line 12000 "configure"
12000 #include "confdefs.h"
12001
12002 #ifdef HAVE_DB_185_H
12003 # include <db_185.h>
12004 #else
12005 # include <db.h>
12006 #endif
12007
12008 #ifndef DB_VERSION_MAJOR
12009 # define DB_VERSION_MAJOR 1
12010 #endif
12011
12012 #ifndef NULL
12013 #define NULL ((void*)0)
12014 #endif
12015
12016 int main() {
12017
12018 #if DB_VERSION_MAJOR > 2
12019         db_env_create( NULL, 0 );
12020 #elif DB_VERSION_MAJOR > 1
12021         db_appexit( NULL );
12022 #else
12023         (void) dbopen( NULL, 0, 0, 0, NULL);
12024 #endif
12025
12026 ; return 0; }
12027 EOF
12028 if { (eval echo configure:12029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12029   rm -rf conftest*
12030   ol_cv_db_db3=yes
12031 else
12032   echo "configure: failed program was:" >&5
12033   cat conftest.$ac_ext >&5
12034   rm -rf conftest*
12035   ol_cv_db_db3=no
12036 fi
12037 rm -f conftest*
12038
12039         LIBS="$ol_LIBS"
12040
12041 fi
12042
12043 echo "$ac_t""$ol_cv_db_db3" 1>&6
12044
12045         if test $ol_cv_db_db3 = yes ; then
12046                 ol_cv_lib_db=-ldb3
12047         fi
12048 fi
12049
12050 if test $ol_cv_lib_db = no ; then
12051         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12052 echo "configure:12053: checking for Berkeley DB link (-ldb2)" >&5
12053 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12054   echo $ac_n "(cached) $ac_c" 1>&6
12055 else
12056   
12057         ol_DB_LIB=-ldb2
12058         ol_LIBS=$LIBS
12059         LIBS="$ol_DB_LIB $LIBS"
12060
12061         cat > conftest.$ac_ext <<EOF
12062 #line 12063 "configure"
12063 #include "confdefs.h"
12064
12065 #ifdef HAVE_DB_185_H
12066 # include <db_185.h>
12067 #else
12068 # include <db.h>
12069 #endif
12070
12071 #ifndef DB_VERSION_MAJOR
12072 # define DB_VERSION_MAJOR 1
12073 #endif
12074
12075 #ifndef NULL
12076 #define NULL ((void*)0)
12077 #endif
12078
12079 int main() {
12080
12081 #if DB_VERSION_MAJOR > 2
12082         db_env_create( NULL, 0 );
12083 #elif DB_VERSION_MAJOR > 1
12084         db_appexit( NULL );
12085 #else
12086         (void) dbopen( NULL, 0, 0, 0, NULL);
12087 #endif
12088
12089 ; return 0; }
12090 EOF
12091 if { (eval echo configure:12092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12092   rm -rf conftest*
12093   ol_cv_db_db2=yes
12094 else
12095   echo "configure: failed program was:" >&5
12096   cat conftest.$ac_ext >&5
12097   rm -rf conftest*
12098   ol_cv_db_db2=no
12099 fi
12100 rm -f conftest*
12101
12102         LIBS="$ol_LIBS"
12103
12104 fi
12105
12106 echo "$ac_t""$ol_cv_db_db2" 1>&6
12107
12108         if test $ol_cv_db_db2 = yes ; then
12109                 ol_cv_lib_db=-ldb2
12110         fi
12111 fi
12112
12113 if test $ol_cv_lib_db = no ; then
12114         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12115 echo "configure:12116: checking for Berkeley DB link (-ldb1)" >&5
12116 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12117   echo $ac_n "(cached) $ac_c" 1>&6
12118 else
12119   
12120         ol_DB_LIB=-ldb1
12121         ol_LIBS=$LIBS
12122         LIBS="$ol_DB_LIB $LIBS"
12123
12124         cat > conftest.$ac_ext <<EOF
12125 #line 12126 "configure"
12126 #include "confdefs.h"
12127
12128 #ifdef HAVE_DB_185_H
12129 # include <db_185.h>
12130 #else
12131 # include <db.h>
12132 #endif
12133
12134 #ifndef DB_VERSION_MAJOR
12135 # define DB_VERSION_MAJOR 1
12136 #endif
12137
12138 #ifndef NULL
12139 #define NULL ((void*)0)
12140 #endif
12141
12142 int main() {
12143
12144 #if DB_VERSION_MAJOR > 2
12145         db_env_create( NULL, 0 );
12146 #elif DB_VERSION_MAJOR > 1
12147         db_appexit( NULL );
12148 #else
12149         (void) dbopen( NULL, 0, 0, 0, NULL);
12150 #endif
12151
12152 ; return 0; }
12153 EOF
12154 if { (eval echo configure:12155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12155   rm -rf conftest*
12156   ol_cv_db_db1=yes
12157 else
12158   echo "configure: failed program was:" >&5
12159   cat conftest.$ac_ext >&5
12160   rm -rf conftest*
12161   ol_cv_db_db1=no
12162 fi
12163 rm -f conftest*
12164
12165         LIBS="$ol_LIBS"
12166
12167 fi
12168
12169 echo "$ac_t""$ol_cv_db_db1" 1>&6
12170
12171         if test $ol_cv_db_db1 = yes ; then
12172                 ol_cv_lib_db=-ldb1
12173         fi
12174 fi
12175
12176
12177         if test "$ol_cv_lib_db" != no ; then
12178                 ol_cv_berkeley_db=yes
12179                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12180 echo "configure:12181: checking for Berkeley DB thread support" >&5
12181 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12182   echo $ac_n "(cached) $ac_c" 1>&6
12183 else
12184   
12185         ol_LIBS="$LIBS"
12186         if test $ol_cv_lib_db != yes ; then
12187                 LIBS="$ol_cv_lib_db"
12188         fi
12189
12190         if test "$cross_compiling" = yes; then
12191   ol_cv_berkeley_db_thread=cross
12192 else
12193   cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196
12197 #ifdef HAVE_DB_185_H
12198         choke me;
12199 #else
12200 #include <db.h>
12201 #endif
12202 #ifndef NULL
12203 #define NULL ((void *)0)
12204 #endif
12205 main()
12206 {
12207         int rc;
12208         u_int32_t flags = DB_CREATE | DB_THREAD;
12209
12210 #if DB_VERSION_MAJOR > 2
12211         DB_ENV *env = NULL;
12212
12213         rc = db_env_create( &env, 0 );
12214
12215         if( rc == 0 ) {
12216 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12217                 rc = env->open( env, NULL, flags, 0 );
12218 #else
12219                 rc = env->open( env, NULL, NULL, flags, 0 );
12220 #endif
12221         }
12222
12223 #else
12224         DB_ENV env;
12225         memset( &env, '\0', sizeof(env) );
12226
12227         rc = db_appinit( NULL, NULL, &env, flags );
12228
12229         if( rc == 0 ) {
12230                 db_appexit( &env );
12231         }
12232 #endif
12233 #if DB_VERSION_MAJOR > 2
12234 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12235         env->remove( env, NULL, DB_FORCE);
12236 #else
12237         env->remove( env, NULL, NULL, DB_FORCE);
12238 #endif
12239 #endif
12240
12241         return rc;
12242 }
12243 EOF
12244 if { (eval echo configure:12245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12245 then
12246   ol_cv_berkeley_db_thread=yes
12247 else
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -fr conftest*
12251   ol_cv_berkeley_db_thread=no
12252 fi
12253 rm -fr conftest*
12254 fi
12255
12256
12257         LIBS="$ol_LIBS"
12258
12259         if test $ol_cv_berkeley_db_thread != no ; then
12260                 cat >> confdefs.h <<\EOF
12261 #define HAVE_BERKELEY_DB_THREAD 1
12262 EOF
12263
12264         fi
12265
12266 fi
12267
12268 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12269         fi
12270 fi
12271
12272         fi
12273
12274         if test $ol_cv_berkeley_db != no ; then
12275                 cat >> confdefs.h <<\EOF
12276 #define HAVE_BERKELEY_DB 1
12277 EOF
12278
12279
12280                 ol_link_ldbm=berkeley
12281                 ol_with_ldbm_api=db
12282
12283                 if test $ol_with_ldbm_type = hash ; then
12284                         cat >> confdefs.h <<\EOF
12285 #define LDBM_USE_DBHASH 1
12286 EOF
12287
12288                 else
12289                         cat >> confdefs.h <<\EOF
12290 #define LDBM_USE_DBBTREE 1
12291 EOF
12292
12293                 fi
12294
12295                                                 if test $ol_cv_lib_db != yes ; then
12296                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12297                 fi
12298         fi
12299 fi
12300
12301 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12302         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12303         ol_with_ldbm_api=none
12304 fi
12305
12306 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12307         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12308 echo "configure:12309: checking for MDBM library" >&5
12309 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12310   echo $ac_n "(cached) $ac_c" 1>&6
12311 else
12312         ol_LIBS="$LIBS"
12313         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12314 echo "configure:12315: checking for mdbm_set_chain" >&5
12315 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12316   echo $ac_n "(cached) $ac_c" 1>&6
12317 else
12318   cat > conftest.$ac_ext <<EOF
12319 #line 12320 "configure"
12320 #include "confdefs.h"
12321 /* System header to define __stub macros and hopefully few prototypes,
12322     which can conflict with char mdbm_set_chain(); below.  */
12323 #include <assert.h>
12324 /* Override any gcc2 internal prototype to avoid an error.  */
12325 /* We use char because int might match the return type of a gcc2
12326     builtin and then its argument prototype would still apply.  */
12327 char mdbm_set_chain();
12328 char (*f)();
12329
12330 int main() {
12331
12332 /* The GNU C library defines this for functions which it implements
12333     to always fail with ENOSYS.  Some functions are actually named
12334     something starting with __ and the normal name is an alias.  */
12335 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12336 choke me
12337 #else
12338 f = mdbm_set_chain;
12339 #endif
12340
12341 ; return 0; }
12342 EOF
12343 if { (eval echo configure:12344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12344   rm -rf conftest*
12345   eval "ac_cv_func_mdbm_set_chain=yes"
12346 else
12347   echo "configure: failed program was:" >&5
12348   cat conftest.$ac_ext >&5
12349   rm -rf conftest*
12350   eval "ac_cv_func_mdbm_set_chain=no"
12351 fi
12352 rm -f conftest*
12353 fi
12354
12355 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12356   echo "$ac_t""yes" 1>&6
12357   ol_cv_lib_mdbm=yes
12358 else
12359   echo "$ac_t""no" 1>&6
12360
12361                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12362 echo "configure:12363: checking for mdbm_set_chain in -lmdbm" >&5
12363 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12365   echo $ac_n "(cached) $ac_c" 1>&6
12366 else
12367   ac_save_LIBS="$LIBS"
12368 LIBS="-lmdbm  $LIBS"
12369 cat > conftest.$ac_ext <<EOF
12370 #line 12371 "configure"
12371 #include "confdefs.h"
12372 /* Override any gcc2 internal prototype to avoid an error.  */
12373 /* We use char because int might match the return type of a gcc2
12374     builtin and then its argument prototype would still apply.  */
12375 char mdbm_set_chain();
12376
12377 int main() {
12378 mdbm_set_chain()
12379 ; return 0; }
12380 EOF
12381 if { (eval echo configure:12382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12382   rm -rf conftest*
12383   eval "ac_cv_lib_$ac_lib_var=yes"
12384 else
12385   echo "configure: failed program was:" >&5
12386   cat conftest.$ac_ext >&5
12387   rm -rf conftest*
12388   eval "ac_cv_lib_$ac_lib_var=no"
12389 fi
12390 rm -f conftest*
12391 LIBS="$ac_save_LIBS"
12392
12393 fi
12394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12395   echo "$ac_t""yes" 1>&6
12396   ol_cv_lib_mdbm=-lmdbm
12397 else
12398   echo "$ac_t""no" 1>&6
12399 ol_cv_lib_mdbm=no
12400 fi
12401
12402         
12403 fi
12404
12405         LIBS="$ol_LIBS"
12406
12407 fi
12408
12409 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12410
12411
12412  for ac_hdr in mdbm.h
12413 do
12414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12416 echo "configure:12417: checking for $ac_hdr" >&5
12417 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12418   echo $ac_n "(cached) $ac_c" 1>&6
12419 else
12420   cat > conftest.$ac_ext <<EOF
12421 #line 12422 "configure"
12422 #include "confdefs.h"
12423 #include <$ac_hdr>
12424 EOF
12425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12426 { (eval echo configure:12427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12428 if test -z "$ac_err"; then
12429   rm -rf conftest*
12430   eval "ac_cv_header_$ac_safe=yes"
12431 else
12432   echo "$ac_err" >&5
12433   echo "configure: failed program was:" >&5
12434   cat conftest.$ac_ext >&5
12435   rm -rf conftest*
12436   eval "ac_cv_header_$ac_safe=no"
12437 fi
12438 rm -f conftest*
12439 fi
12440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12441   echo "$ac_t""yes" 1>&6
12442     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12443   cat >> confdefs.h <<EOF
12444 #define $ac_tr_hdr 1
12445 EOF
12446  
12447 else
12448   echo "$ac_t""no" 1>&6
12449 fi
12450 done
12451
12452  echo $ac_n "checking for db""... $ac_c" 1>&6
12453 echo "configure:12454: checking for db" >&5
12454 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12455   echo $ac_n "(cached) $ac_c" 1>&6
12456 else
12457   
12458         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12459                 ol_cv_mdbm=no
12460         else
12461                 ol_cv_mdbm=yes
12462         fi
12463
12464 fi
12465
12466 echo "$ac_t""$ol_cv_mdbm" 1>&6
12467  if test $ol_cv_mdbm = yes ; then
12468         cat >> confdefs.h <<\EOF
12469 #define HAVE_MDBM 1
12470 EOF
12471
12472  fi
12473
12474
12475         if test $ol_cv_mdbm = yes ; then
12476                 ol_link_ldbm=mdbm
12477                 ol_with_ldbm_api=mdbm
12478                 if test $ol_cv_lib_mdbm != yes ; then
12479                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12480                 fi
12481         fi
12482 fi
12483
12484 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12485         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12486 echo "configure:12487: checking for GDBM library" >&5
12487 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12488   echo $ac_n "(cached) $ac_c" 1>&6
12489 else
12490         ol_LIBS="$LIBS"
12491         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12492 echo "configure:12493: checking for gdbm_open" >&5
12493 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12494   echo $ac_n "(cached) $ac_c" 1>&6
12495 else
12496   cat > conftest.$ac_ext <<EOF
12497 #line 12498 "configure"
12498 #include "confdefs.h"
12499 /* System header to define __stub macros and hopefully few prototypes,
12500     which can conflict with char gdbm_open(); below.  */
12501 #include <assert.h>
12502 /* Override any gcc2 internal prototype to avoid an error.  */
12503 /* We use char because int might match the return type of a gcc2
12504     builtin and then its argument prototype would still apply.  */
12505 char gdbm_open();
12506 char (*f)();
12507
12508 int main() {
12509
12510 /* The GNU C library defines this for functions which it implements
12511     to always fail with ENOSYS.  Some functions are actually named
12512     something starting with __ and the normal name is an alias.  */
12513 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12514 choke me
12515 #else
12516 f = gdbm_open;
12517 #endif
12518
12519 ; return 0; }
12520 EOF
12521 if { (eval echo configure:12522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12522   rm -rf conftest*
12523   eval "ac_cv_func_gdbm_open=yes"
12524 else
12525   echo "configure: failed program was:" >&5
12526   cat conftest.$ac_ext >&5
12527   rm -rf conftest*
12528   eval "ac_cv_func_gdbm_open=no"
12529 fi
12530 rm -f conftest*
12531 fi
12532
12533 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12534   echo "$ac_t""yes" 1>&6
12535   ol_cv_lib_gdbm=yes
12536 else
12537   echo "$ac_t""no" 1>&6
12538
12539                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12540 echo "configure:12541: checking for gdbm_open in -lgdbm" >&5
12541 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12543   echo $ac_n "(cached) $ac_c" 1>&6
12544 else
12545   ac_save_LIBS="$LIBS"
12546 LIBS="-lgdbm  $LIBS"
12547 cat > conftest.$ac_ext <<EOF
12548 #line 12549 "configure"
12549 #include "confdefs.h"
12550 /* Override any gcc2 internal prototype to avoid an error.  */
12551 /* We use char because int might match the return type of a gcc2
12552     builtin and then its argument prototype would still apply.  */
12553 char gdbm_open();
12554
12555 int main() {
12556 gdbm_open()
12557 ; return 0; }
12558 EOF
12559 if { (eval echo configure:12560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12560   rm -rf conftest*
12561   eval "ac_cv_lib_$ac_lib_var=yes"
12562 else
12563   echo "configure: failed program was:" >&5
12564   cat conftest.$ac_ext >&5
12565   rm -rf conftest*
12566   eval "ac_cv_lib_$ac_lib_var=no"
12567 fi
12568 rm -f conftest*
12569 LIBS="$ac_save_LIBS"
12570
12571 fi
12572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12573   echo "$ac_t""yes" 1>&6
12574   ol_cv_lib_gdbm=-lgdbm
12575 else
12576   echo "$ac_t""no" 1>&6
12577 ol_cv_lib_gdbm=no
12578 fi
12579
12580         
12581 fi
12582
12583         LIBS="$ol_LIBS"
12584
12585 fi
12586
12587 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12588
12589
12590  for ac_hdr in gdbm.h
12591 do
12592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12594 echo "configure:12595: checking for $ac_hdr" >&5
12595 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12596   echo $ac_n "(cached) $ac_c" 1>&6
12597 else
12598   cat > conftest.$ac_ext <<EOF
12599 #line 12600 "configure"
12600 #include "confdefs.h"
12601 #include <$ac_hdr>
12602 EOF
12603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12604 { (eval echo configure:12605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12606 if test -z "$ac_err"; then
12607   rm -rf conftest*
12608   eval "ac_cv_header_$ac_safe=yes"
12609 else
12610   echo "$ac_err" >&5
12611   echo "configure: failed program was:" >&5
12612   cat conftest.$ac_ext >&5
12613   rm -rf conftest*
12614   eval "ac_cv_header_$ac_safe=no"
12615 fi
12616 rm -f conftest*
12617 fi
12618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12619   echo "$ac_t""yes" 1>&6
12620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12621   cat >> confdefs.h <<EOF
12622 #define $ac_tr_hdr 1
12623 EOF
12624  
12625 else
12626   echo "$ac_t""no" 1>&6
12627 fi
12628 done
12629
12630  echo $ac_n "checking for db""... $ac_c" 1>&6
12631 echo "configure:12632: checking for db" >&5
12632 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12633   echo $ac_n "(cached) $ac_c" 1>&6
12634 else
12635   
12636         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12637                 ol_cv_gdbm=no
12638         else
12639                 ol_cv_gdbm=yes
12640         fi
12641
12642 fi
12643
12644 echo "$ac_t""$ol_cv_gdbm" 1>&6
12645  if test $ol_cv_gdbm = yes ; then
12646         cat >> confdefs.h <<\EOF
12647 #define HAVE_GDBM 1
12648 EOF
12649
12650  fi
12651
12652
12653         if test $ol_cv_gdbm = yes ; then
12654                 ol_link_ldbm=gdbm
12655                 ol_with_ldbm_api=gdbm
12656
12657                 if test $ol_cv_lib_gdbm != yes ; then
12658                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12659                 fi
12660         fi
12661 fi
12662
12663 if test $ol_with_ldbm_api = ndbm ; then
12664         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12665 echo "configure:12666: checking for NDBM library" >&5
12666 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12667   echo $ac_n "(cached) $ac_c" 1>&6
12668 else
12669         ol_LIBS="$LIBS"
12670         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12671 echo "configure:12672: checking for dbm_open" >&5
12672 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12673   echo $ac_n "(cached) $ac_c" 1>&6
12674 else
12675   cat > conftest.$ac_ext <<EOF
12676 #line 12677 "configure"
12677 #include "confdefs.h"
12678 /* System header to define __stub macros and hopefully few prototypes,
12679     which can conflict with char dbm_open(); below.  */
12680 #include <assert.h>
12681 /* Override any gcc2 internal prototype to avoid an error.  */
12682 /* We use char because int might match the return type of a gcc2
12683     builtin and then its argument prototype would still apply.  */
12684 char dbm_open();
12685 char (*f)();
12686
12687 int main() {
12688
12689 /* The GNU C library defines this for functions which it implements
12690     to always fail with ENOSYS.  Some functions are actually named
12691     something starting with __ and the normal name is an alias.  */
12692 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12693 choke me
12694 #else
12695 f = dbm_open;
12696 #endif
12697
12698 ; return 0; }
12699 EOF
12700 if { (eval echo configure:12701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12701   rm -rf conftest*
12702   eval "ac_cv_func_dbm_open=yes"
12703 else
12704   echo "configure: failed program was:" >&5
12705   cat conftest.$ac_ext >&5
12706   rm -rf conftest*
12707   eval "ac_cv_func_dbm_open=no"
12708 fi
12709 rm -f conftest*
12710 fi
12711
12712 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12713   echo "$ac_t""yes" 1>&6
12714   ol_cv_lib_ndbm=yes
12715 else
12716   echo "$ac_t""no" 1>&6
12717
12718                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12719 echo "configure:12720: checking for dbm_open in -lndbm" >&5
12720 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12721 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12722   echo $ac_n "(cached) $ac_c" 1>&6
12723 else
12724   ac_save_LIBS="$LIBS"
12725 LIBS="-lndbm  $LIBS"
12726 cat > conftest.$ac_ext <<EOF
12727 #line 12728 "configure"
12728 #include "confdefs.h"
12729 /* Override any gcc2 internal prototype to avoid an error.  */
12730 /* We use char because int might match the return type of a gcc2
12731     builtin and then its argument prototype would still apply.  */
12732 char dbm_open();
12733
12734 int main() {
12735 dbm_open()
12736 ; return 0; }
12737 EOF
12738 if { (eval echo configure:12739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12739   rm -rf conftest*
12740   eval "ac_cv_lib_$ac_lib_var=yes"
12741 else
12742   echo "configure: failed program was:" >&5
12743   cat conftest.$ac_ext >&5
12744   rm -rf conftest*
12745   eval "ac_cv_lib_$ac_lib_var=no"
12746 fi
12747 rm -f conftest*
12748 LIBS="$ac_save_LIBS"
12749
12750 fi
12751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12752   echo "$ac_t""yes" 1>&6
12753   ol_cv_lib_ndbm=-lndbm
12754 else
12755   echo "$ac_t""no" 1>&6
12756
12757                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12758 echo "configure:12759: checking for dbm_open in -ldbm" >&5
12759 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12760 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12761   echo $ac_n "(cached) $ac_c" 1>&6
12762 else
12763   ac_save_LIBS="$LIBS"
12764 LIBS="-ldbm  $LIBS"
12765 cat > conftest.$ac_ext <<EOF
12766 #line 12767 "configure"
12767 #include "confdefs.h"
12768 /* Override any gcc2 internal prototype to avoid an error.  */
12769 /* We use char because int might match the return type of a gcc2
12770     builtin and then its argument prototype would still apply.  */
12771 char dbm_open();
12772
12773 int main() {
12774 dbm_open()
12775 ; return 0; }
12776 EOF
12777 if { (eval echo configure:12778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12778   rm -rf conftest*
12779   eval "ac_cv_lib_$ac_lib_var=yes"
12780 else
12781   echo "configure: failed program was:" >&5
12782   cat conftest.$ac_ext >&5
12783   rm -rf conftest*
12784   eval "ac_cv_lib_$ac_lib_var=no"
12785 fi
12786 rm -f conftest*
12787 LIBS="$ac_save_LIBS"
12788
12789 fi
12790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12791   echo "$ac_t""yes" 1>&6
12792   ol_cv_lib_ndbm=-ldbm
12793 else
12794   echo "$ac_t""no" 1>&6
12795 ol_cv_lib_ndbm=no
12796 fi
12797                 
12798 fi
12799
12800         
12801 fi
12802
12803         LIBS="$ol_LIBS"
12804
12805 fi
12806
12807 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12808
12809
12810  for ac_hdr in ndbm.h
12811 do
12812 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12813 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12814 echo "configure:12815: checking for $ac_hdr" >&5
12815 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12816   echo $ac_n "(cached) $ac_c" 1>&6
12817 else
12818   cat > conftest.$ac_ext <<EOF
12819 #line 12820 "configure"
12820 #include "confdefs.h"
12821 #include <$ac_hdr>
12822 EOF
12823 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12824 { (eval echo configure:12825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12825 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12826 if test -z "$ac_err"; then
12827   rm -rf conftest*
12828   eval "ac_cv_header_$ac_safe=yes"
12829 else
12830   echo "$ac_err" >&5
12831   echo "configure: failed program was:" >&5
12832   cat conftest.$ac_ext >&5
12833   rm -rf conftest*
12834   eval "ac_cv_header_$ac_safe=no"
12835 fi
12836 rm -f conftest*
12837 fi
12838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12839   echo "$ac_t""yes" 1>&6
12840     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12841   cat >> confdefs.h <<EOF
12842 #define $ac_tr_hdr 1
12843 EOF
12844  
12845 else
12846   echo "$ac_t""no" 1>&6
12847 fi
12848 done
12849
12850  echo $ac_n "checking for db""... $ac_c" 1>&6
12851 echo "configure:12852: checking for db" >&5
12852 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12853   echo $ac_n "(cached) $ac_c" 1>&6
12854 else
12855   
12856         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12857                 ol_cv_ndbm=no
12858         else
12859                 ol_cv_ndbm=yes
12860         fi
12861
12862 fi
12863
12864 echo "$ac_t""$ol_cv_ndbm" 1>&6
12865  if test $ol_cv_ndbm = yes ; then
12866         cat >> confdefs.h <<\EOF
12867 #define HAVE_NDBM 1
12868 EOF
12869
12870  fi
12871
12872
12873         if test $ol_cv_ndbm = yes ; then
12874                 ol_link_ldbm=ndbm
12875                 ol_with_ldbm_api=ndbm
12876
12877                 if test $ol_cv_lib_ndbm != yes ; then
12878                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12879                 fi
12880         fi
12881 fi
12882
12883 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12884         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12885         if test $ol_enable_ldbm = yes ; then
12886                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12887         fi
12888
12889         echo "configure: warning: disabling LDBM" 1>&2
12890         ol_enable_ldbm=no
12891 fi
12892
12893 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12894         LINK_BINS_DYNAMIC="yes"
12895 else
12896         LINK_BINS_DYNAMIC="no"
12897 fi
12898
12899 if test $ol_enable_wrappers != no ; then
12900         for ac_hdr in tcpd.h
12901 do
12902 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12903 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12904 echo "configure:12905: checking for $ac_hdr" >&5
12905 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12906   echo $ac_n "(cached) $ac_c" 1>&6
12907 else
12908   cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 #include <$ac_hdr>
12912 EOF
12913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12914 { (eval echo configure:12915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12916 if test -z "$ac_err"; then
12917   rm -rf conftest*
12918   eval "ac_cv_header_$ac_safe=yes"
12919 else
12920   echo "$ac_err" >&5
12921   echo "configure: failed program was:" >&5
12922   cat conftest.$ac_ext >&5
12923   rm -rf conftest*
12924   eval "ac_cv_header_$ac_safe=no"
12925 fi
12926 rm -f conftest*
12927 fi
12928 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12929   echo "$ac_t""yes" 1>&6
12930     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12931   cat >> confdefs.h <<EOF
12932 #define $ac_tr_hdr 1
12933 EOF
12934  
12935 else
12936   echo "$ac_t""no" 1>&6
12937 fi
12938 done
12939
12940
12941         if test $ac_cv_header_tcpd_h != yes ; then
12942                 have_wrappers=no
12943         else
12944                 cat > conftest.$ac_ext <<EOF
12945 #line 12946 "configure"
12946 #include "confdefs.h"
12947
12948 int allow_severity = 0;
12949 int deny_severity  = 0;
12950                 
12951 int main() {
12952 hosts_access()
12953 ; return 0; }
12954 EOF
12955 if { (eval echo configure:12956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12956   rm -rf conftest*
12957   have_wrappers=yes
12958 else
12959   echo "configure: failed program was:" >&5
12960   cat conftest.$ac_ext >&5
12961   rm -rf conftest*
12962   have_wrappers=no
12963 fi
12964 rm -f conftest*
12965         fi
12966
12967         if test $have_wrappers = yes ; then
12968                 cat >> confdefs.h <<\EOF
12969 #define HAVE_TCPD 1
12970 EOF
12971
12972                 WRAP_LIBS="-lwrap"
12973
12974                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12975 echo "configure:12976: checking for main in -lnsl" >&5
12976 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12978   echo $ac_n "(cached) $ac_c" 1>&6
12979 else
12980   ac_save_LIBS="$LIBS"
12981 LIBS="-lnsl  $LIBS"
12982 cat > conftest.$ac_ext <<EOF
12983 #line 12984 "configure"
12984 #include "confdefs.h"
12985
12986 int main() {
12987 main()
12988 ; return 0; }
12989 EOF
12990 if { (eval echo configure:12991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12991   rm -rf conftest*
12992   eval "ac_cv_lib_$ac_lib_var=yes"
12993 else
12994   echo "configure: failed program was:" >&5
12995   cat conftest.$ac_ext >&5
12996   rm -rf conftest*
12997   eval "ac_cv_lib_$ac_lib_var=no"
12998 fi
12999 rm -f conftest*
13000 LIBS="$ac_save_LIBS"
13001
13002 fi
13003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13004   echo "$ac_t""yes" 1>&6
13005     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13006     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13007   cat >> confdefs.h <<EOF
13008 #define $ac_tr_lib 1
13009 EOF
13010
13011   LIBS="-lnsl $LIBS"
13012
13013 else
13014   echo "$ac_t""no" 1>&6
13015 fi
13016
13017         else
13018                 echo "configure: warning: could not find -lwrap" 1>&2
13019                 if test $ol_enable_wrappers = yes ; then
13020                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13021                 fi
13022
13023                 echo "configure: warning: disabling wrappers support" 1>&2
13024                 ol_enable_wrappers=no
13025                 WRAP_LIBS=""
13026         fi
13027 fi
13028
13029 if test $ol_enable_syslog != no ; then
13030         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13031 echo "configure:13032: checking for openlog" >&5
13032 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13033   echo $ac_n "(cached) $ac_c" 1>&6
13034 else
13035   cat > conftest.$ac_ext <<EOF
13036 #line 13037 "configure"
13037 #include "confdefs.h"
13038 /* System header to define __stub macros and hopefully few prototypes,
13039     which can conflict with char openlog(); below.  */
13040 #include <assert.h>
13041 /* Override any gcc2 internal prototype to avoid an error.  */
13042 /* We use char because int might match the return type of a gcc2
13043     builtin and then its argument prototype would still apply.  */
13044 char openlog();
13045 char (*f)();
13046
13047 int main() {
13048
13049 /* The GNU C library defines this for functions which it implements
13050     to always fail with ENOSYS.  Some functions are actually named
13051     something starting with __ and the normal name is an alias.  */
13052 #if defined (__stub_openlog) || defined (__stub___openlog)
13053 choke me
13054 #else
13055 f = openlog;
13056 #endif
13057
13058 ; return 0; }
13059 EOF
13060 if { (eval echo configure:13061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13061   rm -rf conftest*
13062   eval "ac_cv_func_openlog=yes"
13063 else
13064   echo "configure: failed program was:" >&5
13065   cat conftest.$ac_ext >&5
13066   rm -rf conftest*
13067   eval "ac_cv_func_openlog=no"
13068 fi
13069 rm -f conftest*
13070 fi
13071
13072 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13073   echo "$ac_t""yes" 1>&6
13074   :
13075 else
13076   echo "$ac_t""no" 1>&6
13077 fi
13078
13079         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13080                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13081         fi
13082         ol_enable_syslog=$ac_cv_func_openlog
13083 fi
13084
13085
13086 ol_link_sql=no
13087 if test $ol_enable_sql != no ; then
13088         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13089 echo "configure:13090: checking for SQLDriverConnect in -liodbc" >&5
13090 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13091 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13092   echo $ac_n "(cached) $ac_c" 1>&6
13093 else
13094   ac_save_LIBS="$LIBS"
13095 LIBS="-liodbc  $LIBS"
13096 cat > conftest.$ac_ext <<EOF
13097 #line 13098 "configure"
13098 #include "confdefs.h"
13099 /* Override any gcc2 internal prototype to avoid an error.  */
13100 /* We use char because int might match the return type of a gcc2
13101     builtin and then its argument prototype would still apply.  */
13102 char SQLDriverConnect();
13103
13104 int main() {
13105 SQLDriverConnect()
13106 ; return 0; }
13107 EOF
13108 if { (eval echo configure:13109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13109   rm -rf conftest*
13110   eval "ac_cv_lib_$ac_lib_var=yes"
13111 else
13112   echo "configure: failed program was:" >&5
13113   cat conftest.$ac_ext >&5
13114   rm -rf conftest*
13115   eval "ac_cv_lib_$ac_lib_var=no"
13116 fi
13117 rm -f conftest*
13118 LIBS="$ac_save_LIBS"
13119
13120 fi
13121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13122   echo "$ac_t""yes" 1>&6
13123   have_iodbc=yes
13124 else
13125   echo "$ac_t""no" 1>&6
13126 have_iodbc=no
13127 fi
13128
13129         if test $have_iodbc = yes ; then
13130                 ol_link_sql="-liodbc"
13131         else
13132                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13133 echo "configure:13134: checking for SQLDriverConnect in -lodbc" >&5
13134 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13135 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13136   echo $ac_n "(cached) $ac_c" 1>&6
13137 else
13138   ac_save_LIBS="$LIBS"
13139 LIBS="-lodbc  $LIBS"
13140 cat > conftest.$ac_ext <<EOF
13141 #line 13142 "configure"
13142 #include "confdefs.h"
13143 /* Override any gcc2 internal prototype to avoid an error.  */
13144 /* We use char because int might match the return type of a gcc2
13145     builtin and then its argument prototype would still apply.  */
13146 char SQLDriverConnect();
13147
13148 int main() {
13149 SQLDriverConnect()
13150 ; return 0; }
13151 EOF
13152 if { (eval echo configure:13153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13153   rm -rf conftest*
13154   eval "ac_cv_lib_$ac_lib_var=yes"
13155 else
13156   echo "configure: failed program was:" >&5
13157   cat conftest.$ac_ext >&5
13158   rm -rf conftest*
13159   eval "ac_cv_lib_$ac_lib_var=no"
13160 fi
13161 rm -f conftest*
13162 LIBS="$ac_save_LIBS"
13163
13164 fi
13165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13166   echo "$ac_t""yes" 1>&6
13167   have_odbc=yes
13168 else
13169   echo "$ac_t""no" 1>&6
13170 have_odbc=no
13171 fi
13172
13173                 if test $have_odbc = yes ; then
13174                         ol_link_sql="-lodbc"
13175                 fi
13176         fi
13177
13178         if test $ol_link_sql != no ; then
13179                 SLAPD_SQL_LIBS="$ol_link_sql"
13180
13181         elif test $ol_enable_sql != auto ; then
13182                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13183         fi
13184 fi
13185
13186 if test $ol_enable_tcl != no ; then
13187         for ac_hdr in tcl.h
13188 do
13189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13191 echo "configure:13192: checking for $ac_hdr" >&5
13192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13193   echo $ac_n "(cached) $ac_c" 1>&6
13194 else
13195   cat > conftest.$ac_ext <<EOF
13196 #line 13197 "configure"
13197 #include "confdefs.h"
13198 #include <$ac_hdr>
13199 EOF
13200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13201 { (eval echo configure:13202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13203 if test -z "$ac_err"; then
13204   rm -rf conftest*
13205   eval "ac_cv_header_$ac_safe=yes"
13206 else
13207   echo "$ac_err" >&5
13208   echo "configure: failed program was:" >&5
13209   cat conftest.$ac_ext >&5
13210   rm -rf conftest*
13211   eval "ac_cv_header_$ac_safe=no"
13212 fi
13213 rm -f conftest*
13214 fi
13215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13216   echo "$ac_t""yes" 1>&6
13217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13218   cat >> confdefs.h <<EOF
13219 #define $ac_tr_hdr 1
13220 EOF
13221  
13222 else
13223   echo "$ac_t""no" 1>&6
13224 fi
13225 done
13226
13227
13228         if test $ac_cv_header_tcl_h != yes ; then
13229                 have_tcl=no
13230         else
13231                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13232                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13233 echo "configure:13234: checking for main in -l$lib" >&5
13234 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13236   echo $ac_n "(cached) $ac_c" 1>&6
13237 else
13238   ac_save_LIBS="$LIBS"
13239 LIBS="-l$lib  $LIBS"
13240 cat > conftest.$ac_ext <<EOF
13241 #line 13242 "configure"
13242 #include "confdefs.h"
13243
13244 int main() {
13245 main()
13246 ; return 0; }
13247 EOF
13248 if { (eval echo configure:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13249   rm -rf conftest*
13250   eval "ac_cv_lib_$ac_lib_var=yes"
13251 else
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -rf conftest*
13255   eval "ac_cv_lib_$ac_lib_var=no"
13256 fi
13257 rm -f conftest*
13258 LIBS="$ac_save_LIBS"
13259
13260 fi
13261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13262   echo "$ac_t""yes" 1>&6
13263   have_tcl=yes
13264                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13265                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13266                            else
13267                                MOD_TCL_LIB="-l${lib}"
13268                            fi;break
13269 else
13270   echo "$ac_t""no" 1>&6
13271 have_tcl=no
13272 fi
13273
13274                 done
13275         fi
13276
13277         if test $have_tcl != yes ; then
13278                 echo "configure: warning: could not find -ltcl" 1>&2
13279                 if test $ol_enable_tcl = yes ; then
13280                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13281                 fi
13282
13283                 ol_enable_tcl=no
13284         fi
13285 fi
13286
13287 ol_link_termcap=no
13288 for ac_hdr in termcap.h ncurses.h
13289 do
13290 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13291 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13292 echo "configure:13293: checking for $ac_hdr" >&5
13293 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13294   echo $ac_n "(cached) $ac_c" 1>&6
13295 else
13296   cat > conftest.$ac_ext <<EOF
13297 #line 13298 "configure"
13298 #include "confdefs.h"
13299 #include <$ac_hdr>
13300 EOF
13301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13302 { (eval echo configure:13303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13304 if test -z "$ac_err"; then
13305   rm -rf conftest*
13306   eval "ac_cv_header_$ac_safe=yes"
13307 else
13308   echo "$ac_err" >&5
13309   echo "configure: failed program was:" >&5
13310   cat conftest.$ac_ext >&5
13311   rm -rf conftest*
13312   eval "ac_cv_header_$ac_safe=no"
13313 fi
13314 rm -f conftest*
13315 fi
13316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13317   echo "$ac_t""yes" 1>&6
13318     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13319   cat >> confdefs.h <<EOF
13320 #define $ac_tr_hdr 1
13321 EOF
13322  
13323 else
13324   echo "$ac_t""no" 1>&6
13325 fi
13326 done
13327
13328
13329 if test $ol_link_termcap = no ; then
13330         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13331 echo "configure:13332: checking for tputs in -ltermcap" >&5
13332 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13333 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13334   echo $ac_n "(cached) $ac_c" 1>&6
13335 else
13336   ac_save_LIBS="$LIBS"
13337 LIBS="-ltermcap  $LIBS"
13338 cat > conftest.$ac_ext <<EOF
13339 #line 13340 "configure"
13340 #include "confdefs.h"
13341 /* Override any gcc2 internal prototype to avoid an error.  */
13342 /* We use char because int might match the return type of a gcc2
13343     builtin and then its argument prototype would still apply.  */
13344 char tputs();
13345
13346 int main() {
13347 tputs()
13348 ; return 0; }
13349 EOF
13350 if { (eval echo configure:13351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13351   rm -rf conftest*
13352   eval "ac_cv_lib_$ac_lib_var=yes"
13353 else
13354   echo "configure: failed program was:" >&5
13355   cat conftest.$ac_ext >&5
13356   rm -rf conftest*
13357   eval "ac_cv_lib_$ac_lib_var=no"
13358 fi
13359 rm -f conftest*
13360 LIBS="$ac_save_LIBS"
13361
13362 fi
13363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13364   echo "$ac_t""yes" 1>&6
13365   have_termcap=yes
13366 else
13367   echo "$ac_t""no" 1>&6
13368 have_termcap=no
13369 fi
13370
13371         if test $have_termcap = yes ; then
13372                 cat >> confdefs.h <<\EOF
13373 #define HAVE_TERMCAP 1
13374 EOF
13375
13376                 ol_link_termcap=yes
13377                 TERMCAP_LIBS=-ltermcap
13378         fi
13379 fi
13380
13381 if test $ol_link_termcap = no ; then
13382         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13383 echo "configure:13384: checking for initscr in -lncurses" >&5
13384 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13385 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13386   echo $ac_n "(cached) $ac_c" 1>&6
13387 else
13388   ac_save_LIBS="$LIBS"
13389 LIBS="-lncurses  $LIBS"
13390 cat > conftest.$ac_ext <<EOF
13391 #line 13392 "configure"
13392 #include "confdefs.h"
13393 /* Override any gcc2 internal prototype to avoid an error.  */
13394 /* We use char because int might match the return type of a gcc2
13395     builtin and then its argument prototype would still apply.  */
13396 char initscr();
13397
13398 int main() {
13399 initscr()
13400 ; return 0; }
13401 EOF
13402 if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13403   rm -rf conftest*
13404   eval "ac_cv_lib_$ac_lib_var=yes"
13405 else
13406   echo "configure: failed program was:" >&5
13407   cat conftest.$ac_ext >&5
13408   rm -rf conftest*
13409   eval "ac_cv_lib_$ac_lib_var=no"
13410 fi
13411 rm -f conftest*
13412 LIBS="$ac_save_LIBS"
13413
13414 fi
13415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13416   echo "$ac_t""yes" 1>&6
13417   have_ncurses=yes
13418 else
13419   echo "$ac_t""no" 1>&6
13420 have_ncurses=no
13421 fi
13422
13423         if test $have_ncurses = yes ; then
13424                 cat >> confdefs.h <<\EOF
13425 #define HAVE_NCURSES 1
13426 EOF
13427
13428                 ol_link_termcap=yes
13429                 TERMCAP_LIBS=-lncurses
13430         fi
13431 fi
13432
13433 if test $ol_link_termcap = no ; then
13434         cat >> confdefs.h <<\EOF
13435 #define NO_TERMCAP 1
13436 EOF
13437
13438         TERMCAP_LIBS=
13439 fi
13440
13441 ol_link_sasl=no
13442 ol_link_spasswd=no
13443 if test $ol_with_cyrus_sasl != no ; then
13444         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13445 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13446 echo "configure:13447: checking for sasl.h" >&5
13447 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13448   echo $ac_n "(cached) $ac_c" 1>&6
13449 else
13450   cat > conftest.$ac_ext <<EOF
13451 #line 13452 "configure"
13452 #include "confdefs.h"
13453 #include <sasl.h>
13454 EOF
13455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13456 { (eval echo configure:13457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13458 if test -z "$ac_err"; then
13459   rm -rf conftest*
13460   eval "ac_cv_header_$ac_safe=yes"
13461 else
13462   echo "$ac_err" >&5
13463   echo "configure: failed program was:" >&5
13464   cat conftest.$ac_ext >&5
13465   rm -rf conftest*
13466   eval "ac_cv_header_$ac_safe=no"
13467 fi
13468 rm -f conftest*
13469 fi
13470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13471   echo "$ac_t""yes" 1>&6
13472   :
13473 else
13474   echo "$ac_t""no" 1>&6
13475 fi
13476
13477
13478         if test $ac_cv_header_sasl_h = yes ; then
13479                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13480 echo "configure:13481: checking for sasl_client_init in -lsasl" >&5
13481 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13483   echo $ac_n "(cached) $ac_c" 1>&6
13484 else
13485   ac_save_LIBS="$LIBS"
13486 LIBS="-lsasl  $LIBS"
13487 cat > conftest.$ac_ext <<EOF
13488 #line 13489 "configure"
13489 #include "confdefs.h"
13490 /* Override any gcc2 internal prototype to avoid an error.  */
13491 /* We use char because int might match the return type of a gcc2
13492     builtin and then its argument prototype would still apply.  */
13493 char sasl_client_init();
13494
13495 int main() {
13496 sasl_client_init()
13497 ; return 0; }
13498 EOF
13499 if { (eval echo configure:13500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13500   rm -rf conftest*
13501   eval "ac_cv_lib_$ac_lib_var=yes"
13502 else
13503   echo "configure: failed program was:" >&5
13504   cat conftest.$ac_ext >&5
13505   rm -rf conftest*
13506   eval "ac_cv_lib_$ac_lib_var=no"
13507 fi
13508 rm -f conftest*
13509 LIBS="$ac_save_LIBS"
13510
13511 fi
13512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13513   echo "$ac_t""yes" 1>&6
13514   have_cyrus_sasl=yes
13515 else
13516   echo "$ac_t""no" 1>&6
13517 have_cyrus_sasl=no
13518 fi
13519
13520
13521                 if test $have_cyrus_sasl != no ; then
13522                         SASL_LIBS="-lsasl"
13523                         cat >> confdefs.h <<\EOF
13524 #define HAVE_CYRUS_SASL 1
13525 EOF
13526
13527                         ol_link_sasl=yes
13528                 fi
13529         fi
13530
13531         if test $ol_link_sasl = no ; then
13532                 if test $ol_with_cyrus_sasl != auto ; then
13533                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13534                 else
13535                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13536                         echo "configure: warning: SASL authentication not supported!" 1>&2
13537                         if test $ol_link_tls = no ; then
13538                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13539                         fi
13540                 fi
13541         fi
13542 else
13543         echo "configure: warning: SASL authentication not supported!" 1>&2
13544         if test $ol_link_tls = no ; then
13545                 echo "configure: warning: Strong authentication not supported!" 1>&2
13546         fi
13547 fi
13548
13549 if test $cross_compiling != yes ; then
13550         dev=no
13551         if test -r /dev/urandom ; then
13552                 dev="/dev/urandom";
13553         elif test -r /idev/urandom ; then
13554                 dev="/idev/urandom";
13555         elif test -r /dev/srandom ; then
13556                 dev="/dev/srandom";
13557         elif test -r /dev/random ; then
13558                 dev="/dev/random";
13559         elif test -r /idev/random ; then
13560                 dev="/idev/random";
13561         fi
13562
13563         if test $dev != no ; then
13564                 cat >> confdefs.h <<EOF
13565 #define URANDOM_DEVICE "$dev"
13566 EOF
13567
13568         fi
13569 fi
13570
13571 ol_link_fetch=no
13572 if test $ol_with_fetch != no ; then
13573         ol_LIBS=$LIBS
13574 LIBS="-lfetch -lcom_err $LIBS"
13575 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13576 echo "configure:13577: checking fetch(3) library" >&5
13577 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13578   echo $ac_n "(cached) $ac_c" 1>&6
13579 else
13580   
13581         cat > conftest.$ac_ext <<EOF
13582 #line 13583 "configure"
13583 #include "confdefs.h"
13584
13585 #include <sys/param.h>
13586 #include <stdio.h>
13587 #include <fetch.h>
13588 int main() {
13589 struct url *u = fetchParseURL("file:///"); 
13590 ; return 0; }
13591 EOF
13592 if { (eval echo configure:13593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13593   rm -rf conftest*
13594   ol_cv_lib_fetch=yes
13595 else
13596   echo "configure: failed program was:" >&5
13597   cat conftest.$ac_ext >&5
13598   rm -rf conftest*
13599   ol_cv_lib_fetch=no
13600 fi
13601 rm -f conftest*
13602 fi
13603
13604 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13605 LIBS=$ol_LIBS
13606 if test $ol_cv_lib_fetch != no ; then
13607         ol_link_fetch="-lfetch -lcom_err"
13608         cat >> confdefs.h <<\EOF
13609 #define HAVE_FETCH 1
13610 EOF
13611
13612 fi
13613
13614
13615         if test $ol_cv_lib_fetch != no ; then
13616                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13617                 ol_link_fetch=freebsd
13618
13619         elif test $ol_with_fetch != auto ; then
13620                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13621         fi 
13622 fi
13623
13624 ol_link_readline=no
13625 if test $ol_with_readline != no ; then
13626         for ac_hdr in readline/readline.h readline/history.h
13627 do
13628 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13629 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13630 echo "configure:13631: checking for $ac_hdr" >&5
13631 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13632   echo $ac_n "(cached) $ac_c" 1>&6
13633 else
13634   cat > conftest.$ac_ext <<EOF
13635 #line 13636 "configure"
13636 #include "confdefs.h"
13637 #include <$ac_hdr>
13638 EOF
13639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13640 { (eval echo configure:13641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13642 if test -z "$ac_err"; then
13643   rm -rf conftest*
13644   eval "ac_cv_header_$ac_safe=yes"
13645 else
13646   echo "$ac_err" >&5
13647   echo "configure: failed program was:" >&5
13648   cat conftest.$ac_ext >&5
13649   rm -rf conftest*
13650   eval "ac_cv_header_$ac_safe=no"
13651 fi
13652 rm -f conftest*
13653 fi
13654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13655   echo "$ac_t""yes" 1>&6
13656     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13657   cat >> confdefs.h <<EOF
13658 #define $ac_tr_hdr 1
13659 EOF
13660  
13661 else
13662   echo "$ac_t""no" 1>&6
13663 fi
13664 done
13665
13666
13667         if test $ac_cv_header_readline_readline_h = yes ; then
13668                 save_LIBS="$LIBS"
13669                 LIBS="$TERMCAP_LIBS $LIBS"
13670                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13671 echo "configure:13672: checking for readline in -lreadline" >&5
13672 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13673 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13674   echo $ac_n "(cached) $ac_c" 1>&6
13675 else
13676   ac_save_LIBS="$LIBS"
13677 LIBS="-lreadline  $LIBS"
13678 cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 /* Override any gcc2 internal prototype to avoid an error.  */
13682 /* We use char because int might match the return type of a gcc2
13683     builtin and then its argument prototype would still apply.  */
13684 char readline();
13685
13686 int main() {
13687 readline()
13688 ; return 0; }
13689 EOF
13690 if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13691   rm -rf conftest*
13692   eval "ac_cv_lib_$ac_lib_var=yes"
13693 else
13694   echo "configure: failed program was:" >&5
13695   cat conftest.$ac_ext >&5
13696   rm -rf conftest*
13697   eval "ac_cv_lib_$ac_lib_var=no"
13698 fi
13699 rm -f conftest*
13700 LIBS="$ac_save_LIBS"
13701
13702 fi
13703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13704   echo "$ac_t""yes" 1>&6
13705   have_readline=yes
13706 else
13707   echo "$ac_t""no" 1>&6
13708 have_readline=no
13709 fi
13710
13711                 LIBS="$save_LIBS"
13712                         
13713                 if test $have_readline = yes ; then
13714                         ol_with_readline=found
13715                         ol_link_readline=yes
13716
13717                         READLINE_LIBS="-lreadline"
13718                 fi
13719         fi
13720 fi
13721
13722 if test $ol_link_readline = yes ; then
13723         cat >> confdefs.h <<\EOF
13724 #define HAVE_READLINE 1
13725 EOF
13726
13727 fi
13728
13729
13730 if test $ol_enable_crypt != no ; then
13731         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13732 echo "configure:13733: checking for crypt" >&5
13733 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13734   echo $ac_n "(cached) $ac_c" 1>&6
13735 else
13736   cat > conftest.$ac_ext <<EOF
13737 #line 13738 "configure"
13738 #include "confdefs.h"
13739 /* System header to define __stub macros and hopefully few prototypes,
13740     which can conflict with char crypt(); below.  */
13741 #include <assert.h>
13742 /* Override any gcc2 internal prototype to avoid an error.  */
13743 /* We use char because int might match the return type of a gcc2
13744     builtin and then its argument prototype would still apply.  */
13745 char crypt();
13746 char (*f)();
13747
13748 int main() {
13749
13750 /* The GNU C library defines this for functions which it implements
13751     to always fail with ENOSYS.  Some functions are actually named
13752     something starting with __ and the normal name is an alias.  */
13753 #if defined (__stub_crypt) || defined (__stub___crypt)
13754 choke me
13755 #else
13756 f = crypt;
13757 #endif
13758
13759 ; return 0; }
13760 EOF
13761 if { (eval echo configure:13762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13762   rm -rf conftest*
13763   eval "ac_cv_func_crypt=yes"
13764 else
13765   echo "configure: failed program was:" >&5
13766   cat conftest.$ac_ext >&5
13767   rm -rf conftest*
13768   eval "ac_cv_func_crypt=no"
13769 fi
13770 rm -f conftest*
13771 fi
13772
13773 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13774   echo "$ac_t""yes" 1>&6
13775   have_crypt=yes
13776 else
13777   echo "$ac_t""no" 1>&6
13778
13779                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13780 echo "configure:13781: checking for crypt in -lcrypt" >&5
13781 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13783   echo $ac_n "(cached) $ac_c" 1>&6
13784 else
13785   ac_save_LIBS="$LIBS"
13786 LIBS="-lcrypt  $LIBS"
13787 cat > conftest.$ac_ext <<EOF
13788 #line 13789 "configure"
13789 #include "confdefs.h"
13790 /* Override any gcc2 internal prototype to avoid an error.  */
13791 /* We use char because int might match the return type of a gcc2
13792     builtin and then its argument prototype would still apply.  */
13793 char crypt();
13794
13795 int main() {
13796 crypt()
13797 ; return 0; }
13798 EOF
13799 if { (eval echo configure:13800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13800   rm -rf conftest*
13801   eval "ac_cv_lib_$ac_lib_var=yes"
13802 else
13803   echo "configure: failed program was:" >&5
13804   cat conftest.$ac_ext >&5
13805   rm -rf conftest*
13806   eval "ac_cv_lib_$ac_lib_var=no"
13807 fi
13808 rm -f conftest*
13809 LIBS="$ac_save_LIBS"
13810
13811 fi
13812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13813   echo "$ac_t""yes" 1>&6
13814   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13815                         have_crypt=yes
13816 else
13817   echo "$ac_t""no" 1>&6
13818 have_crypt=no
13819 fi
13820
13821 fi
13822
13823
13824         if test $have_crypt = yes ; then
13825                 cat >> confdefs.h <<\EOF
13826 #define HAVE_CRYPT 1
13827 EOF
13828
13829         else
13830                 echo "configure: warning: could not find crypt" 1>&2
13831                 if test $ol_enable_crypt = yes ; then
13832                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13833                 fi
13834
13835                 echo "configure: warning: disabling crypt support" 1>&2
13836                 ol_enable_crypt=no
13837         fi
13838 fi
13839
13840 if test $ol_enable_proctitle != no ; then
13841         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13842 echo "configure:13843: checking for setproctitle" >&5
13843 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13844   echo $ac_n "(cached) $ac_c" 1>&6
13845 else
13846   cat > conftest.$ac_ext <<EOF
13847 #line 13848 "configure"
13848 #include "confdefs.h"
13849 /* System header to define __stub macros and hopefully few prototypes,
13850     which can conflict with char setproctitle(); below.  */
13851 #include <assert.h>
13852 /* Override any gcc2 internal prototype to avoid an error.  */
13853 /* We use char because int might match the return type of a gcc2
13854     builtin and then its argument prototype would still apply.  */
13855 char setproctitle();
13856 char (*f)();
13857
13858 int main() {
13859
13860 /* The GNU C library defines this for functions which it implements
13861     to always fail with ENOSYS.  Some functions are actually named
13862     something starting with __ and the normal name is an alias.  */
13863 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13864 choke me
13865 #else
13866 f = setproctitle;
13867 #endif
13868
13869 ; return 0; }
13870 EOF
13871 if { (eval echo configure:13872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13872   rm -rf conftest*
13873   eval "ac_cv_func_setproctitle=yes"
13874 else
13875   echo "configure: failed program was:" >&5
13876   cat conftest.$ac_ext >&5
13877   rm -rf conftest*
13878   eval "ac_cv_func_setproctitle=no"
13879 fi
13880 rm -f conftest*
13881 fi
13882
13883 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13884   echo "$ac_t""yes" 1>&6
13885   have_setproctitle=yes
13886 else
13887   echo "$ac_t""no" 1>&6
13888
13889                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13890 echo "configure:13891: checking for setproctitle in -lutil" >&5
13891 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13892 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13893   echo $ac_n "(cached) $ac_c" 1>&6
13894 else
13895   ac_save_LIBS="$LIBS"
13896 LIBS="-lutil  $LIBS"
13897 cat > conftest.$ac_ext <<EOF
13898 #line 13899 "configure"
13899 #include "confdefs.h"
13900 /* Override any gcc2 internal prototype to avoid an error.  */
13901 /* We use char because int might match the return type of a gcc2
13902     builtin and then its argument prototype would still apply.  */
13903 char setproctitle();
13904
13905 int main() {
13906 setproctitle()
13907 ; return 0; }
13908 EOF
13909 if { (eval echo configure:13910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13910   rm -rf conftest*
13911   eval "ac_cv_lib_$ac_lib_var=yes"
13912 else
13913   echo "configure: failed program was:" >&5
13914   cat conftest.$ac_ext >&5
13915   rm -rf conftest*
13916   eval "ac_cv_lib_$ac_lib_var=no"
13917 fi
13918 rm -f conftest*
13919 LIBS="$ac_save_LIBS"
13920
13921 fi
13922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13923   echo "$ac_t""yes" 1>&6
13924   have_setproctitle=yes
13925                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13926 else
13927   echo "$ac_t""no" 1>&6
13928 have_setproctitle=no
13929                         LIBOBJS="$LIBOBJS setproctitle.o"
13930                         LIBSRCS="$LIBSRCS setproctitle.c"
13931 fi
13932
13933 fi
13934
13935
13936         if test $have_setproctitle = yes ; then
13937                 cat >> confdefs.h <<\EOF
13938 #define HAVE_SETPROCTITLE 1
13939 EOF
13940
13941         fi
13942 fi
13943
13944 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13945 echo "configure:13946: checking for ANSI C header files" >&5
13946 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13947   echo $ac_n "(cached) $ac_c" 1>&6
13948 else
13949   cat > conftest.$ac_ext <<EOF
13950 #line 13951 "configure"
13951 #include "confdefs.h"
13952 #include <stdlib.h>
13953 #include <stdarg.h>
13954 #include <string.h>
13955 #include <float.h>
13956 EOF
13957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13958 { (eval echo configure:13959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13960 if test -z "$ac_err"; then
13961   rm -rf conftest*
13962   ac_cv_header_stdc=yes
13963 else
13964   echo "$ac_err" >&5
13965   echo "configure: failed program was:" >&5
13966   cat conftest.$ac_ext >&5
13967   rm -rf conftest*
13968   ac_cv_header_stdc=no
13969 fi
13970 rm -f conftest*
13971
13972 if test $ac_cv_header_stdc = yes; then
13973   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13974 cat > conftest.$ac_ext <<EOF
13975 #line 13976 "configure"
13976 #include "confdefs.h"
13977 #include <string.h>
13978 EOF
13979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13980   egrep "memchr" >/dev/null 2>&1; then
13981   :
13982 else
13983   rm -rf conftest*
13984   ac_cv_header_stdc=no
13985 fi
13986 rm -f conftest*
13987
13988 fi
13989
13990 if test $ac_cv_header_stdc = yes; then
13991   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13992 cat > conftest.$ac_ext <<EOF
13993 #line 13994 "configure"
13994 #include "confdefs.h"
13995 #include <stdlib.h>
13996 EOF
13997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13998   egrep "free" >/dev/null 2>&1; then
13999   :
14000 else
14001   rm -rf conftest*
14002   ac_cv_header_stdc=no
14003 fi
14004 rm -f conftest*
14005
14006 fi
14007
14008 if test $ac_cv_header_stdc = yes; then
14009   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14010 if test "$cross_compiling" = yes; then
14011   :
14012 else
14013   cat > conftest.$ac_ext <<EOF
14014 #line 14015 "configure"
14015 #include "confdefs.h"
14016 #include <ctype.h>
14017 #if ((' ' & 0x0FF) == 0x020)
14018 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14019 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14020 #else
14021 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14022  || ('j' <= (c) && (c) <= 'r') \
14023  || ('s' <= (c) && (c) <= 'z'))
14024 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14025 #endif
14026 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14027 int main () { int i; for (i = 0; i < 256; i++)
14028 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14029 exit (0); }
14030
14031 EOF
14032 if { (eval echo configure:14033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14033 then
14034   :
14035 else
14036   echo "configure: failed program was:" >&5
14037   cat conftest.$ac_ext >&5
14038   rm -fr conftest*
14039   ac_cv_header_stdc=no
14040 fi
14041 rm -fr conftest*
14042 fi
14043
14044 fi
14045 fi
14046
14047 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14048 if test $ac_cv_header_stdc = yes; then
14049   cat >> confdefs.h <<\EOF
14050 #define STDC_HEADERS 1
14051 EOF
14052
14053 fi
14054
14055 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14056 echo "configure:14057: checking for mode_t" >&5
14057 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14058   echo $ac_n "(cached) $ac_c" 1>&6
14059 else
14060   cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063 #include <sys/types.h>
14064 #if STDC_HEADERS
14065 #include <stdlib.h>
14066 #include <stddef.h>
14067 #endif
14068
14069 EOF
14070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14071   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14072   rm -rf conftest*
14073   eval "ac_cv_type_mode_t=yes"
14074 else
14075   rm -rf conftest*
14076   eval "ac_cv_type_mode_t=no"
14077 fi
14078 rm -f conftest*
14079
14080 fi
14081 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14082   echo "$ac_t""yes" 1>&6
14083 else
14084   echo "$ac_t""no" 1>&6
14085   cat >> confdefs.h <<EOF
14086 #define mode_t int
14087 EOF
14088
14089 fi
14090
14091 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14092 echo "configure:14093: checking for off_t" >&5
14093 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14094   echo $ac_n "(cached) $ac_c" 1>&6
14095 else
14096   cat > conftest.$ac_ext <<EOF
14097 #line 14098 "configure"
14098 #include "confdefs.h"
14099 #include <sys/types.h>
14100 #if STDC_HEADERS
14101 #include <stdlib.h>
14102 #include <stddef.h>
14103 #endif
14104
14105 EOF
14106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14107   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14108   rm -rf conftest*
14109   eval "ac_cv_type_off_t=yes"
14110 else
14111   rm -rf conftest*
14112   eval "ac_cv_type_off_t=no"
14113 fi
14114 rm -f conftest*
14115
14116 fi
14117 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14118   echo "$ac_t""yes" 1>&6
14119 else
14120   echo "$ac_t""no" 1>&6
14121   cat >> confdefs.h <<EOF
14122 #define off_t long
14123 EOF
14124
14125 fi
14126
14127 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14128 echo "configure:14129: checking for pid_t" >&5
14129 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14130   echo $ac_n "(cached) $ac_c" 1>&6
14131 else
14132   cat > conftest.$ac_ext <<EOF
14133 #line 14134 "configure"
14134 #include "confdefs.h"
14135 #include <sys/types.h>
14136 #if STDC_HEADERS
14137 #include <stdlib.h>
14138 #include <stddef.h>
14139 #endif
14140
14141 EOF
14142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14143   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14144   rm -rf conftest*
14145   eval "ac_cv_type_pid_t=yes"
14146 else
14147   rm -rf conftest*
14148   eval "ac_cv_type_pid_t=no"
14149 fi
14150 rm -f conftest*
14151
14152 fi
14153 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14154   echo "$ac_t""yes" 1>&6
14155 else
14156   echo "$ac_t""no" 1>&6
14157   cat >> confdefs.h <<EOF
14158 #define pid_t int
14159 EOF
14160
14161 fi
14162
14163 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14164 echo "configure:14165: checking for ptrdiff_t" >&5
14165 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14166   echo $ac_n "(cached) $ac_c" 1>&6
14167 else
14168   cat > conftest.$ac_ext <<EOF
14169 #line 14170 "configure"
14170 #include "confdefs.h"
14171 #include <stddef.h>
14172 int main() {
14173 ptrdiff_t p
14174 ; return 0; }
14175 EOF
14176 if { (eval echo configure:14177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14177   rm -rf conftest*
14178   am_cv_type_ptrdiff_t=yes
14179 else
14180   echo "configure: failed program was:" >&5
14181   cat conftest.$ac_ext >&5
14182   rm -rf conftest*
14183   am_cv_type_ptrdiff_t=no
14184 fi
14185 rm -f conftest*
14186 fi
14187
14188 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14189    if test $am_cv_type_ptrdiff_t = yes; then
14190      cat >> confdefs.h <<\EOF
14191 #define HAVE_PTRDIFF_T 1
14192 EOF
14193
14194    fi
14195
14196 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14197 echo "configure:14198: checking return type of signal handlers" >&5
14198 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14199   echo $ac_n "(cached) $ac_c" 1>&6
14200 else
14201   cat > conftest.$ac_ext <<EOF
14202 #line 14203 "configure"
14203 #include "confdefs.h"
14204 #include <sys/types.h>
14205 #include <signal.h>
14206 #ifdef signal
14207 #undef signal
14208 #endif
14209 #ifdef __cplusplus
14210 extern "C" void (*signal (int, void (*)(int)))(int);
14211 #else
14212 void (*signal ()) ();
14213 #endif
14214
14215 int main() {
14216 int i;
14217 ; return 0; }
14218 EOF
14219 if { (eval echo configure:14220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14220   rm -rf conftest*
14221   ac_cv_type_signal=void
14222 else
14223   echo "configure: failed program was:" >&5
14224   cat conftest.$ac_ext >&5
14225   rm -rf conftest*
14226   ac_cv_type_signal=int
14227 fi
14228 rm -f conftest*
14229 fi
14230
14231 echo "$ac_t""$ac_cv_type_signal" 1>&6
14232 cat >> confdefs.h <<EOF
14233 #define RETSIGTYPE $ac_cv_type_signal
14234 EOF
14235
14236
14237 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14238 echo "configure:14239: checking for size_t" >&5
14239 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14240   echo $ac_n "(cached) $ac_c" 1>&6
14241 else
14242   cat > conftest.$ac_ext <<EOF
14243 #line 14244 "configure"
14244 #include "confdefs.h"
14245 #include <sys/types.h>
14246 #if STDC_HEADERS
14247 #include <stdlib.h>
14248 #include <stddef.h>
14249 #endif
14250
14251 EOF
14252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14253   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14254   rm -rf conftest*
14255   eval "ac_cv_type_size_t=yes"
14256 else
14257   rm -rf conftest*
14258   eval "ac_cv_type_size_t=no"
14259 fi
14260 rm -f conftest*
14261
14262 fi
14263 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14264   echo "$ac_t""yes" 1>&6
14265 else
14266   echo "$ac_t""no" 1>&6
14267   cat >> confdefs.h <<EOF
14268 #define size_t unsigned
14269 EOF
14270
14271 fi
14272
14273
14274 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14275 echo "configure:14276: checking for ssize_t" >&5
14276 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14277   echo $ac_n "(cached) $ac_c" 1>&6
14278 else
14279   cat > conftest.$ac_ext <<EOF
14280 #line 14281 "configure"
14281 #include "confdefs.h"
14282 #include <sys/types.h>
14283 #if STDC_HEADERS
14284 #include <stdlib.h>
14285 #include <stddef.h>
14286 #endif
14287
14288 EOF
14289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14290   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14291   rm -rf conftest*
14292   eval "ac_cv_type_ssize_t=yes"
14293 else
14294   rm -rf conftest*
14295   eval "ac_cv_type_ssize_t=no"
14296 fi
14297 rm -f conftest*
14298
14299 fi
14300 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14301   echo "$ac_t""yes" 1>&6
14302 else
14303   echo "$ac_t""no" 1>&6
14304   cat >> confdefs.h <<EOF
14305 #define ssize_t signed int
14306 EOF
14307
14308 fi
14309
14310 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14311 echo "configure:14312: checking for caddr_t" >&5
14312 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14313   echo $ac_n "(cached) $ac_c" 1>&6
14314 else
14315   cat > conftest.$ac_ext <<EOF
14316 #line 14317 "configure"
14317 #include "confdefs.h"
14318 #include <sys/types.h>
14319 #if STDC_HEADERS
14320 #include <stdlib.h>
14321 #include <stddef.h>
14322 #endif
14323
14324 EOF
14325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14326   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14327   rm -rf conftest*
14328   eval "ac_cv_type_caddr_t=yes"
14329 else
14330   rm -rf conftest*
14331   eval "ac_cv_type_caddr_t=no"
14332 fi
14333 rm -f conftest*
14334
14335 fi
14336 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14337   echo "$ac_t""yes" 1>&6
14338 else
14339   echo "$ac_t""no" 1>&6
14340   cat >> confdefs.h <<EOF
14341 #define caddr_t char *
14342 EOF
14343
14344 fi
14345
14346
14347 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14348 echo "configure:14349: checking for socklen_t" >&5
14349 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14350   echo $ac_n "(cached) $ac_c" 1>&6
14351 else
14352   cat > conftest.$ac_ext <<EOF
14353 #line 14354 "configure"
14354 #include "confdefs.h"
14355
14356 #ifdef HAVE_SYS_TYPES_H
14357 #include <sys/types.h>
14358 #endif
14359 #ifdef HAVE_SYS_SOCKET_H
14360 #include <sys/socket.h>
14361 #endif
14362
14363 int main() {
14364 socklen_t len;
14365 ; return 0; }
14366 EOF
14367 if { (eval echo configure:14368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14368   rm -rf conftest*
14369   ol_cv_type_socklen_t=yes
14370 else
14371   echo "configure: failed program was:" >&5
14372   cat conftest.$ac_ext >&5
14373   rm -rf conftest*
14374   ol_cv_type_socklen_t=no
14375 fi
14376 rm -f conftest*
14377 fi
14378
14379 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14380   if test $ol_cv_type_socklen_t = no; then
14381     cat >> confdefs.h <<\EOF
14382 #define socklen_t int
14383 EOF
14384
14385   fi
14386  
14387 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14388 echo "configure:14389: checking for member st_blksize in aggregate type struct stat" >&5
14389 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14390   echo $ac_n "(cached) $ac_c" 1>&6
14391 else
14392   cat > conftest.$ac_ext <<EOF
14393 #line 14394 "configure"
14394 #include "confdefs.h"
14395 #include <sys/types.h>
14396 #include <sys/stat.h>
14397 int main() {
14398 struct stat foo; foo.st_blksize;
14399 ; return 0; }
14400 EOF
14401 if { (eval echo configure:14402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14402   rm -rf conftest*
14403   ac_cv_c_struct_member_st_blksize=yes
14404 else
14405   echo "configure: failed program was:" >&5
14406   cat conftest.$ac_ext >&5
14407   rm -rf conftest*
14408   ac_cv_c_struct_member_st_blksize=no
14409 fi
14410 rm -f conftest*
14411 fi
14412
14413 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14414 st_blksize="$ac_cv_c_struct_member_st_blksize"
14415 if test $ac_cv_c_struct_member_st_blksize = yes; then
14416   cat >> confdefs.h <<\EOF
14417 #define HAVE_ST_BLKSIZE 1
14418 EOF
14419
14420 fi
14421
14422 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14423 echo "configure:14424: checking whether time.h and sys/time.h may both be included" >&5
14424 if eval "test \"\${ac_cv_header_time+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/time.h>
14432 #include <time.h>
14433 int main() {
14434 struct tm *tp;
14435 ; return 0; }
14436 EOF
14437 if { (eval echo configure:14438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14438   rm -rf conftest*
14439   ac_cv_header_time=yes
14440 else
14441   echo "configure: failed program was:" >&5
14442   cat conftest.$ac_ext >&5
14443   rm -rf conftest*
14444   ac_cv_header_time=no
14445 fi
14446 rm -f conftest*
14447 fi
14448
14449 echo "$ac_t""$ac_cv_header_time" 1>&6
14450 if test $ac_cv_header_time = yes; then
14451   cat >> confdefs.h <<\EOF
14452 #define TIME_WITH_SYS_TIME 1
14453 EOF
14454
14455 fi
14456
14457 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14458 echo "configure:14459: checking whether struct tm is in sys/time.h or time.h" >&5
14459 if eval "test \"\${ac_cv_struct_tm+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 <time.h>
14467 int main() {
14468 struct tm *tp; tp->tm_sec;
14469 ; return 0; }
14470 EOF
14471 if { (eval echo configure:14472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14472   rm -rf conftest*
14473   ac_cv_struct_tm=time.h
14474 else
14475   echo "configure: failed program was:" >&5
14476   cat conftest.$ac_ext >&5
14477   rm -rf conftest*
14478   ac_cv_struct_tm=sys/time.h
14479 fi
14480 rm -f conftest*
14481 fi
14482
14483 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14484 if test $ac_cv_struct_tm = sys/time.h; then
14485   cat >> confdefs.h <<\EOF
14486 #define TM_IN_SYS_TIME 1
14487 EOF
14488
14489 fi
14490
14491 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14492 echo "configure:14493: checking for uid_t in sys/types.h" >&5
14493 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14494   echo $ac_n "(cached) $ac_c" 1>&6
14495 else
14496   cat > conftest.$ac_ext <<EOF
14497 #line 14498 "configure"
14498 #include "confdefs.h"
14499 #include <sys/types.h>
14500 EOF
14501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14502   egrep "uid_t" >/dev/null 2>&1; then
14503   rm -rf conftest*
14504   ac_cv_type_uid_t=yes
14505 else
14506   rm -rf conftest*
14507   ac_cv_type_uid_t=no
14508 fi
14509 rm -f conftest*
14510
14511 fi
14512
14513 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14514 if test $ac_cv_type_uid_t = no; then
14515   cat >> confdefs.h <<\EOF
14516 #define uid_t int
14517 EOF
14518
14519   cat >> confdefs.h <<\EOF
14520 #define gid_t int
14521 EOF
14522
14523 fi
14524
14525 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14526 echo "configure:14527: checking for sig_atomic_t" >&5
14527 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14528   echo $ac_n "(cached) $ac_c" 1>&6
14529 else
14530   cat > conftest.$ac_ext <<EOF
14531 #line 14532 "configure"
14532 #include "confdefs.h"
14533 #include <signal.h>
14534 int main() {
14535 sig_atomic_t atomic;
14536 ; return 0; }
14537 EOF
14538 if { (eval echo configure:14539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14539   rm -rf conftest*
14540   ol_cv_type_sig_atomic_t=yes
14541 else
14542   echo "configure: failed program was:" >&5
14543   cat conftest.$ac_ext >&5
14544   rm -rf conftest*
14545   ol_cv_type_sig_atomic_t=no
14546 fi
14547 rm -f conftest*
14548 fi
14549
14550 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14551   if test $ol_cv_type_sig_atomic_t = no; then
14552     cat >> confdefs.h <<\EOF
14553 #define sig_atomic_t int
14554 EOF
14555
14556   fi
14557  
14558
14559
14560 # test for pw_gecos in struct passwd
14561 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14562 echo "configure:14563: checking struct passwd for pw_gecos" >&5
14563 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14564   echo $ac_n "(cached) $ac_c" 1>&6
14565 else
14566   
14567         cat > conftest.$ac_ext <<EOF
14568 #line 14569 "configure"
14569 #include "confdefs.h"
14570 #include <pwd.h>
14571 int main() {
14572
14573         struct passwd pwd;
14574         pwd.pw_gecos = pwd.pw_name;
14575
14576 ; return 0; }
14577 EOF
14578 if { (eval echo configure:14579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14579   rm -rf conftest*
14580   ol_cv_struct_passwd_pw_gecos=yes
14581 else
14582   echo "configure: failed program was:" >&5
14583   cat conftest.$ac_ext >&5
14584   rm -rf conftest*
14585   ol_cv_struct_passwd_pw_gecos=no
14586 fi
14587 rm -f conftest*
14588 fi
14589
14590 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14591 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14592         cat >> confdefs.h <<\EOF
14593 #define HAVE_PW_GECOS 1
14594 EOF
14595
14596 fi
14597
14598 # test for pw_passwd in struct passwd
14599 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14600 echo "configure:14601: checking struct passwd for pw_passwd" >&5
14601 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14602   echo $ac_n "(cached) $ac_c" 1>&6
14603 else
14604   
14605         cat > conftest.$ac_ext <<EOF
14606 #line 14607 "configure"
14607 #include "confdefs.h"
14608 #include <pwd.h>
14609 int main() {
14610
14611         struct passwd pwd;
14612         pwd.pw_passwd = pwd.pw_name;
14613
14614 ; return 0; }
14615 EOF
14616 if { (eval echo configure:14617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14617   rm -rf conftest*
14618   ol_cv_struct_passwd_pw_passwd=yes
14619 else
14620   echo "configure: failed program was:" >&5
14621   cat conftest.$ac_ext >&5
14622   rm -rf conftest*
14623   ol_cv_struct_passwd_pw_passwd=no
14624 fi
14625 rm -f conftest*
14626 fi
14627
14628 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14629 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14630         cat >> confdefs.h <<\EOF
14631 #define HAVE_PW_PASSWD 1
14632 EOF
14633
14634 fi
14635
14636
14637 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14638 echo "configure:14639: checking if toupper() requires islower()" >&5
14639 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14640   echo $ac_n "(cached) $ac_c" 1>&6
14641 else
14642   
14643         if test "$cross_compiling" = yes; then
14644   ol_cv_c_upper_lower=safe
14645 else
14646   cat > conftest.$ac_ext <<EOF
14647 #line 14648 "configure"
14648 #include "confdefs.h"
14649
14650 #include <ctype.h>
14651 main()
14652 {
14653         if ('C' == toupper('C'))
14654                 exit(0);
14655         else
14656                 exit(1);
14657 }
14658 EOF
14659 if { (eval echo configure:14660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14660 then
14661   ol_cv_c_upper_lower=no
14662 else
14663   echo "configure: failed program was:" >&5
14664   cat conftest.$ac_ext >&5
14665   rm -fr conftest*
14666   ol_cv_c_upper_lower=yes
14667 fi
14668 rm -fr conftest*
14669 fi
14670
14671 fi
14672
14673 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14674 if test $ol_cv_c_upper_lower != no ; then
14675         cat >> confdefs.h <<\EOF
14676 #define C_UPPER_LOWER 1
14677 EOF
14678
14679 fi
14680
14681 echo $ac_n "checking for working const""... $ac_c" 1>&6
14682 echo "configure:14683: checking for working const" >&5
14683 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14684   echo $ac_n "(cached) $ac_c" 1>&6
14685 else
14686   cat > conftest.$ac_ext <<EOF
14687 #line 14688 "configure"
14688 #include "confdefs.h"
14689
14690 int main() {
14691
14692 /* Ultrix mips cc rejects this.  */
14693 typedef int charset[2]; const charset x;
14694 /* SunOS 4.1.1 cc rejects this.  */
14695 char const *const *ccp;
14696 char **p;
14697 /* NEC SVR4.0.2 mips cc rejects this.  */
14698 struct point {int x, y;};
14699 static struct point const zero = {0,0};
14700 /* AIX XL C 1.02.0.0 rejects this.
14701    It does not let you subtract one const X* pointer from another in an arm
14702    of an if-expression whose if-part is not a constant expression */
14703 const char *g = "string";
14704 ccp = &g + (g ? g-g : 0);
14705 /* HPUX 7.0 cc rejects these. */
14706 ++ccp;
14707 p = (char**) ccp;
14708 ccp = (char const *const *) p;
14709 { /* SCO 3.2v4 cc rejects this.  */
14710   char *t;
14711   char const *s = 0 ? (char *) 0 : (char const *) 0;
14712
14713   *t++ = 0;
14714 }
14715 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14716   int x[] = {25, 17};
14717   const int *foo = &x[0];
14718   ++foo;
14719 }
14720 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14721   typedef const int *iptr;
14722   iptr p = 0;
14723   ++p;
14724 }
14725 { /* AIX XL C 1.02.0.0 rejects this saying
14726      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14727   struct s { int j; const int *ap[3]; };
14728   struct s *b; b->j = 5;
14729 }
14730 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14731   const int foo = 10;
14732 }
14733
14734 ; return 0; }
14735 EOF
14736 if { (eval echo configure:14737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14737   rm -rf conftest*
14738   ac_cv_c_const=yes
14739 else
14740   echo "configure: failed program was:" >&5
14741   cat conftest.$ac_ext >&5
14742   rm -rf conftest*
14743   ac_cv_c_const=no
14744 fi
14745 rm -f conftest*
14746 fi
14747
14748 echo "$ac_t""$ac_cv_c_const" 1>&6
14749 if test $ac_cv_c_const = no; then
14750   cat >> confdefs.h <<\EOF
14751 #define const 
14752 EOF
14753
14754 fi
14755
14756 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14757 echo "configure:14758: checking if compiler understands volatile" >&5
14758 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14759   echo $ac_n "(cached) $ac_c" 1>&6
14760 else
14761   cat > conftest.$ac_ext <<EOF
14762 #line 14763 "configure"
14763 #include "confdefs.h"
14764 int x, y, z;
14765 int main() {
14766 volatile int a; int * volatile b = x ? &y : &z;
14767       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14768       *b = 0;
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   ol_cv_c_volatile=yes
14774 else
14775   echo "configure: failed program was:" >&5
14776   cat conftest.$ac_ext >&5
14777   rm -rf conftest*
14778   ol_cv_c_volatile=no
14779 fi
14780 rm -f conftest*
14781 fi
14782
14783 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14784   if test $ol_cv_c_volatile = yes; then
14785     : 
14786   else
14787     cat >> confdefs.h <<\EOF
14788 #define volatile 
14789 EOF
14790
14791   fi
14792  
14793
14794 if test $cross_compiling = yes ; then
14795         cat >> confdefs.h <<\EOF
14796 #define CROSS_COMPILING 1
14797 EOF
14798
14799 else
14800         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14801 echo "configure:14802: checking whether byte ordering is bigendian" >&5
14802 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14803   echo $ac_n "(cached) $ac_c" 1>&6
14804 else
14805   ac_cv_c_bigendian=unknown
14806 # See if sys/param.h defines the BYTE_ORDER macro.
14807 cat > conftest.$ac_ext <<EOF
14808 #line 14809 "configure"
14809 #include "confdefs.h"
14810 #include <sys/types.h>
14811 #include <sys/param.h>
14812 int main() {
14813
14814 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14815  bogus endian macros
14816 #endif
14817 ; return 0; }
14818 EOF
14819 if { (eval echo configure:14820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14820   rm -rf conftest*
14821   # It does; now see whether it defined to BIG_ENDIAN or not.
14822 cat > conftest.$ac_ext <<EOF
14823 #line 14824 "configure"
14824 #include "confdefs.h"
14825 #include <sys/types.h>
14826 #include <sys/param.h>
14827 int main() {
14828
14829 #if BYTE_ORDER != BIG_ENDIAN
14830  not big endian
14831 #endif
14832 ; return 0; }
14833 EOF
14834 if { (eval echo configure:14835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14835   rm -rf conftest*
14836   ac_cv_c_bigendian=yes
14837 else
14838   echo "configure: failed program was:" >&5
14839   cat conftest.$ac_ext >&5
14840   rm -rf conftest*
14841   ac_cv_c_bigendian=no
14842 fi
14843 rm -f conftest*
14844 else
14845   echo "configure: failed program was:" >&5
14846   cat conftest.$ac_ext >&5
14847 fi
14848 rm -f conftest*
14849 if test $ac_cv_c_bigendian = unknown; then
14850 if test "$cross_compiling" = yes; then
14851     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14852 else
14853   cat > conftest.$ac_ext <<EOF
14854 #line 14855 "configure"
14855 #include "confdefs.h"
14856 main () {
14857   /* Are we little or big endian?  From Harbison&Steele.  */
14858   union
14859   {
14860     long l;
14861     char c[sizeof (long)];
14862   } u;
14863   u.l = 1;
14864   exit (u.c[sizeof (long) - 1] == 1);
14865 }
14866 EOF
14867 if { (eval echo configure:14868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14868 then
14869   ac_cv_c_bigendian=no
14870 else
14871   echo "configure: failed program was:" >&5
14872   cat conftest.$ac_ext >&5
14873   rm -fr conftest*
14874   ac_cv_c_bigendian=yes
14875 fi
14876 rm -fr conftest*
14877 fi
14878
14879 fi
14880 fi
14881
14882 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14883 if test $ac_cv_c_bigendian = yes; then
14884   cat >> confdefs.h <<\EOF
14885 #define WORDS_BIGENDIAN 1
14886 EOF
14887
14888 fi
14889
14890 fi
14891
14892 echo $ac_n "checking size of short""... $ac_c" 1>&6
14893 echo "configure:14894: checking size of short" >&5 
14894 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14895   echo $ac_n "(cached) $ac_c" 1>&6
14896 else
14897   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14898   cat > conftest.$ac_ext <<EOF
14899 #line 14900 "configure"
14900 #include "confdefs.h"
14901 #include "confdefs.h" 
14902 #include <sys/types.h> 
14903  
14904
14905 int main() {
14906 switch (0) case 0: case (sizeof (short) == $ac_size):;
14907 ; return 0; }
14908 EOF
14909 if { (eval echo configure:14910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14910   rm -rf conftest*
14911   ac_cv_sizeof_short=$ac_size
14912 else
14913   echo "configure: failed program was:" >&5
14914   cat conftest.$ac_ext >&5
14915 fi
14916 rm -f conftest* 
14917   if test x$ac_cv_sizeof_short != x ; then break; fi 
14918 done 
14919
14920 fi
14921  
14922 if test x$ac_cv_sizeof_short = x ; then 
14923   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14924 fi 
14925 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14926 cat >> confdefs.h <<EOF
14927 #define SIZEOF_SHORT $ac_cv_sizeof_short
14928 EOF
14929  
14930  
14931 echo $ac_n "checking size of int""... $ac_c" 1>&6
14932 echo "configure:14933: checking size of int" >&5 
14933 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14934   echo $ac_n "(cached) $ac_c" 1>&6
14935 else
14936   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14937   cat > conftest.$ac_ext <<EOF
14938 #line 14939 "configure"
14939 #include "confdefs.h"
14940 #include "confdefs.h" 
14941 #include <sys/types.h> 
14942  
14943
14944 int main() {
14945 switch (0) case 0: case (sizeof (int) == $ac_size):;
14946 ; return 0; }
14947 EOF
14948 if { (eval echo configure:14949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14949   rm -rf conftest*
14950   ac_cv_sizeof_int=$ac_size
14951 else
14952   echo "configure: failed program was:" >&5
14953   cat conftest.$ac_ext >&5
14954 fi
14955 rm -f conftest* 
14956   if test x$ac_cv_sizeof_int != x ; then break; fi 
14957 done 
14958
14959 fi
14960  
14961 if test x$ac_cv_sizeof_int = x ; then 
14962   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14963 fi 
14964 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14965 cat >> confdefs.h <<EOF
14966 #define SIZEOF_INT $ac_cv_sizeof_int
14967 EOF
14968  
14969  
14970 echo $ac_n "checking size of long""... $ac_c" 1>&6
14971 echo "configure:14972: checking size of long" >&5 
14972 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14973   echo $ac_n "(cached) $ac_c" 1>&6
14974 else
14975   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14976   cat > conftest.$ac_ext <<EOF
14977 #line 14978 "configure"
14978 #include "confdefs.h"
14979 #include "confdefs.h" 
14980 #include <sys/types.h> 
14981  
14982
14983 int main() {
14984 switch (0) case 0: case (sizeof (long) == $ac_size):;
14985 ; return 0; }
14986 EOF
14987 if { (eval echo configure:14988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14988   rm -rf conftest*
14989   ac_cv_sizeof_long=$ac_size
14990 else
14991   echo "configure: failed program was:" >&5
14992   cat conftest.$ac_ext >&5
14993 fi
14994 rm -f conftest* 
14995   if test x$ac_cv_sizeof_long != x ; then break; fi 
14996 done 
14997
14998 fi
14999  
15000 if test x$ac_cv_sizeof_long = x ; then 
15001   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15002 fi 
15003 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15004 cat >> confdefs.h <<EOF
15005 #define SIZEOF_LONG $ac_cv_sizeof_long
15006 EOF
15007  
15008
15009
15010 if test "$ac_cv_sizeof_int" -lt 4 ; then
15011         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15012
15013         cat >> confdefs.h <<\EOF
15014 #define LBER_INT_T long
15015 EOF
15016
15017 else
15018         cat >> confdefs.h <<\EOF
15019 #define LBER_INT_T int
15020 EOF
15021
15022 fi
15023
15024 cat >> confdefs.h <<\EOF
15025 #define LBER_LEN_T long
15026 EOF
15027
15028 cat >> confdefs.h <<\EOF
15029 #define LBER_SOCKET_T int
15030 EOF
15031
15032 cat >> confdefs.h <<\EOF
15033 #define LBER_TAG_T long
15034 EOF
15035
15036
15037 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15038 echo "configure:15039: checking for 8-bit clean memcmp" >&5
15039 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15040   echo $ac_n "(cached) $ac_c" 1>&6
15041 else
15042   if test "$cross_compiling" = yes; then
15043   ac_cv_func_memcmp_clean=no
15044 else
15045   cat > conftest.$ac_ext <<EOF
15046 #line 15047 "configure"
15047 #include "confdefs.h"
15048
15049 main()
15050 {
15051   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15052   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15053 }
15054
15055 EOF
15056 if { (eval echo configure:15057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15057 then
15058   ac_cv_func_memcmp_clean=yes
15059 else
15060   echo "configure: failed program was:" >&5
15061   cat conftest.$ac_ext >&5
15062   rm -fr conftest*
15063   ac_cv_func_memcmp_clean=no
15064 fi
15065 rm -fr conftest*
15066 fi
15067
15068 fi
15069
15070 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15071 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15072
15073 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15074 echo "configure:15075: checking for strftime" >&5
15075 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15076   echo $ac_n "(cached) $ac_c" 1>&6
15077 else
15078   cat > conftest.$ac_ext <<EOF
15079 #line 15080 "configure"
15080 #include "confdefs.h"
15081 /* System header to define __stub macros and hopefully few prototypes,
15082     which can conflict with char strftime(); below.  */
15083 #include <assert.h>
15084 /* Override any gcc2 internal prototype to avoid an error.  */
15085 /* We use char because int might match the return type of a gcc2
15086     builtin and then its argument prototype would still apply.  */
15087 char strftime();
15088 char (*f)();
15089
15090 int main() {
15091
15092 /* The GNU C library defines this for functions which it implements
15093     to always fail with ENOSYS.  Some functions are actually named
15094     something starting with __ and the normal name is an alias.  */
15095 #if defined (__stub_strftime) || defined (__stub___strftime)
15096 choke me
15097 #else
15098 f = strftime;
15099 #endif
15100
15101 ; return 0; }
15102 EOF
15103 if { (eval echo configure:15104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15104   rm -rf conftest*
15105   eval "ac_cv_func_strftime=yes"
15106 else
15107   echo "configure: failed program was:" >&5
15108   cat conftest.$ac_ext >&5
15109   rm -rf conftest*
15110   eval "ac_cv_func_strftime=no"
15111 fi
15112 rm -f conftest*
15113 fi
15114
15115 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15116   echo "$ac_t""yes" 1>&6
15117   cat >> confdefs.h <<\EOF
15118 #define HAVE_STRFTIME 1
15119 EOF
15120
15121 else
15122   echo "$ac_t""no" 1>&6
15123 # strftime is in -lintl on SCO UNIX.
15124 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15125 echo "configure:15126: checking for strftime in -lintl" >&5
15126 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15128   echo $ac_n "(cached) $ac_c" 1>&6
15129 else
15130   ac_save_LIBS="$LIBS"
15131 LIBS="-lintl  $LIBS"
15132 cat > conftest.$ac_ext <<EOF
15133 #line 15134 "configure"
15134 #include "confdefs.h"
15135 /* Override any gcc2 internal prototype to avoid an error.  */
15136 /* We use char because int might match the return type of a gcc2
15137     builtin and then its argument prototype would still apply.  */
15138 char strftime();
15139
15140 int main() {
15141 strftime()
15142 ; return 0; }
15143 EOF
15144 if { (eval echo configure:15145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15145   rm -rf conftest*
15146   eval "ac_cv_lib_$ac_lib_var=yes"
15147 else
15148   echo "configure: failed program was:" >&5
15149   cat conftest.$ac_ext >&5
15150   rm -rf conftest*
15151   eval "ac_cv_lib_$ac_lib_var=no"
15152 fi
15153 rm -f conftest*
15154 LIBS="$ac_save_LIBS"
15155
15156 fi
15157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15158   echo "$ac_t""yes" 1>&6
15159   cat >> confdefs.h <<\EOF
15160 #define HAVE_STRFTIME 1
15161 EOF
15162
15163 LIBS="-lintl $LIBS"
15164 else
15165   echo "$ac_t""no" 1>&6
15166 fi
15167
15168 fi
15169
15170
15171 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15172 echo "configure:15173: checking for inet_aton()" >&5
15173 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15174   echo $ac_n "(cached) $ac_c" 1>&6
15175 else
15176   cat > conftest.$ac_ext <<EOF
15177 #line 15178 "configure"
15178 #include "confdefs.h"
15179
15180 #ifdef HAVE_SYS_TYPES_H
15181 #       include <sys/types.h>
15182 #endif
15183 #ifdef HAVE_SYS_SOCKET_H
15184 #       include <sys/socket.h>
15185 #       ifdef HAVE_SYS_SELECT_H
15186 #               include <sys/select.h>
15187 #       endif
15188 #       include <netinet/in.h>
15189 #       ifdef HAVE_ARPA_INET_H
15190 #               include <arpa/inet.h>
15191 #       endif
15192 #endif
15193
15194 int main() {
15195 struct in_addr in;
15196 int rc = inet_aton( "255.255.255.255", &in );
15197 ; return 0; }
15198 EOF
15199 if { (eval echo configure:15200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15200   rm -rf conftest*
15201   ol_cv_func_inet_aton=yes
15202 else
15203   echo "configure: failed program was:" >&5
15204   cat conftest.$ac_ext >&5
15205   rm -rf conftest*
15206   ol_cv_func_inet_aton=no
15207 fi
15208 rm -f conftest*
15209 fi
15210
15211 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15212   if test $ol_cv_func_inet_aton != no; then
15213     cat >> confdefs.h <<\EOF
15214 #define HAVE_INET_ATON 1
15215 EOF
15216
15217   fi
15218  
15219
15220 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15221 echo "configure:15222: checking for _spawnlp" >&5
15222 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15223   echo $ac_n "(cached) $ac_c" 1>&6
15224 else
15225   cat > conftest.$ac_ext <<EOF
15226 #line 15227 "configure"
15227 #include "confdefs.h"
15228 /* System header to define __stub macros and hopefully few prototypes,
15229     which can conflict with char _spawnlp(); below.  */
15230 #include <assert.h>
15231 /* Override any gcc2 internal prototype to avoid an error.  */
15232 /* We use char because int might match the return type of a gcc2
15233     builtin and then its argument prototype would still apply.  */
15234 char _spawnlp();
15235 char (*f)();
15236
15237 int main() {
15238
15239 /* The GNU C library defines this for functions which it implements
15240     to always fail with ENOSYS.  Some functions are actually named
15241     something starting with __ and the normal name is an alias.  */
15242 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15243 choke me
15244 #else
15245 f = _spawnlp;
15246 #endif
15247
15248 ; return 0; }
15249 EOF
15250 if { (eval echo configure:15251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15251   rm -rf conftest*
15252   eval "ac_cv_func__spawnlp=yes"
15253 else
15254   echo "configure: failed program was:" >&5
15255   cat conftest.$ac_ext >&5
15256   rm -rf conftest*
15257   eval "ac_cv_func__spawnlp=no"
15258 fi
15259 rm -f conftest*
15260 fi
15261
15262 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15263   echo "$ac_t""yes" 1>&6
15264   cat >> confdefs.h <<\EOF
15265 #define HAVE_SPAWNLP 1
15266 EOF
15267
15268 else
15269   echo "$ac_t""no" 1>&6
15270 fi
15271
15272
15273 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15274 echo "configure:15275: checking for _snprintf" >&5
15275 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15276   echo $ac_n "(cached) $ac_c" 1>&6
15277 else
15278   cat > conftest.$ac_ext <<EOF
15279 #line 15280 "configure"
15280 #include "confdefs.h"
15281 /* System header to define __stub macros and hopefully few prototypes,
15282     which can conflict with char _snprintf(); below.  */
15283 #include <assert.h>
15284 /* Override any gcc2 internal prototype to avoid an error.  */
15285 /* We use char because int might match the return type of a gcc2
15286     builtin and then its argument prototype would still apply.  */
15287 char _snprintf();
15288 char (*f)();
15289
15290 int main() {
15291
15292 /* The GNU C library defines this for functions which it implements
15293     to always fail with ENOSYS.  Some functions are actually named
15294     something starting with __ and the normal name is an alias.  */
15295 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15296 choke me
15297 #else
15298 f = _snprintf;
15299 #endif
15300
15301 ; return 0; }
15302 EOF
15303 if { (eval echo configure:15304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15304   rm -rf conftest*
15305   eval "ac_cv_func__snprintf=yes"
15306 else
15307   echo "configure: failed program was:" >&5
15308   cat conftest.$ac_ext >&5
15309   rm -rf conftest*
15310   eval "ac_cv_func__snprintf=no"
15311 fi
15312 rm -f conftest*
15313 fi
15314
15315 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15316   echo "$ac_t""yes" 1>&6
15317   ac_cv_func_snprintf=yes
15318         cat >> confdefs.h <<\EOF
15319 #define snprintf _snprintf
15320 EOF
15321
15322
15323 else
15324   echo "$ac_t""no" 1>&6
15325 fi
15326
15327
15328 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15329 echo "configure:15330: checking for _vsnprintf" >&5
15330 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15331   echo $ac_n "(cached) $ac_c" 1>&6
15332 else
15333   cat > conftest.$ac_ext <<EOF
15334 #line 15335 "configure"
15335 #include "confdefs.h"
15336 /* System header to define __stub macros and hopefully few prototypes,
15337     which can conflict with char _vsnprintf(); below.  */
15338 #include <assert.h>
15339 /* Override any gcc2 internal prototype to avoid an error.  */
15340 /* We use char because int might match the return type of a gcc2
15341     builtin and then its argument prototype would still apply.  */
15342 char _vsnprintf();
15343 char (*f)();
15344
15345 int main() {
15346
15347 /* The GNU C library defines this for functions which it implements
15348     to always fail with ENOSYS.  Some functions are actually named
15349     something starting with __ and the normal name is an alias.  */
15350 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15351 choke me
15352 #else
15353 f = _vsnprintf;
15354 #endif
15355
15356 ; return 0; }
15357 EOF
15358 if { (eval echo configure:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15359   rm -rf conftest*
15360   eval "ac_cv_func__vsnprintf=yes"
15361 else
15362   echo "configure: failed program was:" >&5
15363   cat conftest.$ac_ext >&5
15364   rm -rf conftest*
15365   eval "ac_cv_func__vsnprintf=no"
15366 fi
15367 rm -f conftest*
15368 fi
15369
15370 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15371   echo "$ac_t""yes" 1>&6
15372   ac_cv_func_vsnprintf=yes
15373         cat >> confdefs.h <<\EOF
15374 #define vsnprintf _vsnprintf
15375 EOF
15376
15377
15378 else
15379   echo "$ac_t""no" 1>&6
15380 fi
15381
15382
15383 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15384 echo "configure:15385: checking for vprintf" >&5
15385 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15386   echo $ac_n "(cached) $ac_c" 1>&6
15387 else
15388   cat > conftest.$ac_ext <<EOF
15389 #line 15390 "configure"
15390 #include "confdefs.h"
15391 /* System header to define __stub macros and hopefully few prototypes,
15392     which can conflict with char vprintf(); below.  */
15393 #include <assert.h>
15394 /* Override any gcc2 internal prototype to avoid an error.  */
15395 /* We use char because int might match the return type of a gcc2
15396     builtin and then its argument prototype would still apply.  */
15397 char vprintf();
15398 char (*f)();
15399
15400 int main() {
15401
15402 /* The GNU C library defines this for functions which it implements
15403     to always fail with ENOSYS.  Some functions are actually named
15404     something starting with __ and the normal name is an alias.  */
15405 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15406 choke me
15407 #else
15408 f = vprintf;
15409 #endif
15410
15411 ; return 0; }
15412 EOF
15413 if { (eval echo configure:15414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15414   rm -rf conftest*
15415   eval "ac_cv_func_vprintf=yes"
15416 else
15417   echo "configure: failed program was:" >&5
15418   cat conftest.$ac_ext >&5
15419   rm -rf conftest*
15420   eval "ac_cv_func_vprintf=no"
15421 fi
15422 rm -f conftest*
15423 fi
15424
15425 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15426   echo "$ac_t""yes" 1>&6
15427   cat >> confdefs.h <<\EOF
15428 #define HAVE_VPRINTF 1
15429 EOF
15430
15431 else
15432   echo "$ac_t""no" 1>&6
15433 fi
15434
15435 if test "$ac_cv_func_vprintf" != yes; then
15436 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15437 echo "configure:15438: checking for _doprnt" >&5
15438 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15439   echo $ac_n "(cached) $ac_c" 1>&6
15440 else
15441   cat > conftest.$ac_ext <<EOF
15442 #line 15443 "configure"
15443 #include "confdefs.h"
15444 /* System header to define __stub macros and hopefully few prototypes,
15445     which can conflict with char _doprnt(); below.  */
15446 #include <assert.h>
15447 /* Override any gcc2 internal prototype to avoid an error.  */
15448 /* We use char because int might match the return type of a gcc2
15449     builtin and then its argument prototype would still apply.  */
15450 char _doprnt();
15451 char (*f)();
15452
15453 int main() {
15454
15455 /* The GNU C library defines this for functions which it implements
15456     to always fail with ENOSYS.  Some functions are actually named
15457     something starting with __ and the normal name is an alias.  */
15458 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15459 choke me
15460 #else
15461 f = _doprnt;
15462 #endif
15463
15464 ; return 0; }
15465 EOF
15466 if { (eval echo configure:15467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15467   rm -rf conftest*
15468   eval "ac_cv_func__doprnt=yes"
15469 else
15470   echo "configure: failed program was:" >&5
15471   cat conftest.$ac_ext >&5
15472   rm -rf conftest*
15473   eval "ac_cv_func__doprnt=no"
15474 fi
15475 rm -f conftest*
15476 fi
15477
15478 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15479   echo "$ac_t""yes" 1>&6
15480   cat >> confdefs.h <<\EOF
15481 #define HAVE_DOPRNT 1
15482 EOF
15483
15484 else
15485   echo "$ac_t""no" 1>&6
15486 fi
15487
15488 fi
15489
15490
15491 if test $ac_cv_func_vprintf = yes ; then
15492                 for ac_func in vsnprintf vsprintf
15493 do
15494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15495 echo "configure:15496: checking for $ac_func" >&5
15496 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15497   echo $ac_n "(cached) $ac_c" 1>&6
15498 else
15499   cat > conftest.$ac_ext <<EOF
15500 #line 15501 "configure"
15501 #include "confdefs.h"
15502 /* System header to define __stub macros and hopefully few prototypes,
15503     which can conflict with char $ac_func(); below.  */
15504 #include <assert.h>
15505 /* Override any gcc2 internal prototype to avoid an error.  */
15506 /* We use char because int might match the return type of a gcc2
15507     builtin and then its argument prototype would still apply.  */
15508 char $ac_func();
15509 char (*f)();
15510
15511 int main() {
15512
15513 /* The GNU C library defines this for functions which it implements
15514     to always fail with ENOSYS.  Some functions are actually named
15515     something starting with __ and the normal name is an alias.  */
15516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15517 choke me
15518 #else
15519 f = $ac_func;
15520 #endif
15521
15522 ; return 0; }
15523 EOF
15524 if { (eval echo configure:15525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15525   rm -rf conftest*
15526   eval "ac_cv_func_$ac_func=yes"
15527 else
15528   echo "configure: failed program was:" >&5
15529   cat conftest.$ac_ext >&5
15530   rm -rf conftest*
15531   eval "ac_cv_func_$ac_func=no"
15532 fi
15533 rm -f conftest*
15534 fi
15535
15536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15537   echo "$ac_t""yes" 1>&6
15538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15539   cat >> confdefs.h <<EOF
15540 #define $ac_tr_func 1
15541 EOF
15542  
15543 else
15544   echo "$ac_t""no" 1>&6
15545 fi
15546 done
15547
15548 fi
15549
15550 for ac_func in \
15551         bcopy                   \
15552         closesocket             \
15553         chroot                  \
15554         endgrent                \
15555         endpwent                \
15556         flock                   \
15557         getdtablesize   \
15558         getgrgid                \
15559         gethostname             \
15560         getpass                 \
15561         getpassphrase   \
15562         getpwuid                \
15563         getpwnam                \
15564         getspnam                \
15565         gettimeofday    \
15566         initgroups              \
15567         lockf                   \
15568         memcpy                  \
15569         memmove                 \
15570         mkstemp                 \
15571         pipe                    \
15572         read                    \
15573         recv                    \
15574         recvfrom                \
15575         setpwfile               \
15576         setgid                  \
15577         setegid                 \
15578         setsid                  \
15579         setuid                  \
15580         seteuid                 \
15581         sigaction               \
15582         signal                  \
15583         sigset                  \
15584         snprintf                \
15585         strdup                  \
15586         strerror                \
15587         strpbrk                 \
15588         strrchr                 \
15589         strsep                  \
15590         strstr                  \
15591         strtol                  \
15592         strtoul                 \
15593         strspn                  \
15594         sysconf                 \
15595         waitpid                 \
15596         wait4                   \
15597         write                   \
15598         send                    \
15599         sendto                  \
15600
15601 do
15602 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15603 echo "configure:15604: checking for $ac_func" >&5
15604 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15605   echo $ac_n "(cached) $ac_c" 1>&6
15606 else
15607   cat > conftest.$ac_ext <<EOF
15608 #line 15609 "configure"
15609 #include "confdefs.h"
15610 /* System header to define __stub macros and hopefully few prototypes,
15611     which can conflict with char $ac_func(); below.  */
15612 #include <assert.h>
15613 /* Override any gcc2 internal prototype to avoid an error.  */
15614 /* We use char because int might match the return type of a gcc2
15615     builtin and then its argument prototype would still apply.  */
15616 char $ac_func();
15617 char (*f)();
15618
15619 int main() {
15620
15621 /* The GNU C library defines this for functions which it implements
15622     to always fail with ENOSYS.  Some functions are actually named
15623     something starting with __ and the normal name is an alias.  */
15624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15625 choke me
15626 #else
15627 f = $ac_func;
15628 #endif
15629
15630 ; return 0; }
15631 EOF
15632 if { (eval echo configure:15633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15633   rm -rf conftest*
15634   eval "ac_cv_func_$ac_func=yes"
15635 else
15636   echo "configure: failed program was:" >&5
15637   cat conftest.$ac_ext >&5
15638   rm -rf conftest*
15639   eval "ac_cv_func_$ac_func=no"
15640 fi
15641 rm -f conftest*
15642 fi
15643
15644 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15645   echo "$ac_t""yes" 1>&6
15646     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15647   cat >> confdefs.h <<EOF
15648 #define $ac_tr_func 1
15649 EOF
15650  
15651 else
15652   echo "$ac_t""no" 1>&6
15653 fi
15654 done
15655
15656
15657 for ac_func in getopt tempnam
15658 do
15659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15660 echo "configure:15661: checking for $ac_func" >&5
15661 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15662   echo $ac_n "(cached) $ac_c" 1>&6
15663 else
15664   cat > conftest.$ac_ext <<EOF
15665 #line 15666 "configure"
15666 #include "confdefs.h"
15667 /* System header to define __stub macros and hopefully few prototypes,
15668     which can conflict with char $ac_func(); below.  */
15669 #include <assert.h>
15670 /* Override any gcc2 internal prototype to avoid an error.  */
15671 /* We use char because int might match the return type of a gcc2
15672     builtin and then its argument prototype would still apply.  */
15673 char $ac_func();
15674 char (*f)();
15675
15676 int main() {
15677
15678 /* The GNU C library defines this for functions which it implements
15679     to always fail with ENOSYS.  Some functions are actually named
15680     something starting with __ and the normal name is an alias.  */
15681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15682 choke me
15683 #else
15684 f = $ac_func;
15685 #endif
15686
15687 ; return 0; }
15688 EOF
15689 if { (eval echo configure:15690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15690   rm -rf conftest*
15691   eval "ac_cv_func_$ac_func=yes"
15692 else
15693   echo "configure: failed program was:" >&5
15694   cat conftest.$ac_ext >&5
15695   rm -rf conftest*
15696   eval "ac_cv_func_$ac_func=no"
15697 fi
15698 rm -f conftest*
15699 fi
15700
15701 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15702   echo "$ac_t""yes" 1>&6
15703     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15704   cat >> confdefs.h <<EOF
15705 #define $ac_tr_func 1
15706 EOF
15707  
15708 else
15709   echo "$ac_t""no" 1>&6
15710 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15711 fi
15712 done
15713
15714
15715
15716 if test "$ac_cv_func_getopt" != yes; then
15717     LIBSRCS="$LIBSRCS getopt.c"
15718 fi
15719
15720 if test "$ac_cv_func_tempnam" != yes; then
15721     LIBSRCS="$LIBSRCS tempnam.c"
15722 fi
15723
15724 # Check Configuration
15725 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15726 echo "configure:15727: checking declaration of sys_errlist" >&5
15727 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15728   echo $ac_n "(cached) $ac_c" 1>&6
15729 else
15730   
15731         cat > conftest.$ac_ext <<EOF
15732 #line 15733 "configure"
15733 #include "confdefs.h"
15734
15735 #include <stdio.h>
15736 #include <sys/types.h>
15737 #include <errno.h>
15738 #ifdef WINNT
15739 #include <stdlib.h>
15740 #endif 
15741 int main() {
15742 char *c = (char *) *sys_errlist
15743 ; return 0; }
15744 EOF
15745 if { (eval echo configure:15746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15746   rm -rf conftest*
15747   ol_cv_dcl_sys_errlist=yes
15748         ol_cv_have_sys_errlist=yes
15749 else
15750   echo "configure: failed program was:" >&5
15751   cat conftest.$ac_ext >&5
15752   rm -rf conftest*
15753   ol_cv_dcl_sys_errlist=no
15754 fi
15755 rm -f conftest*
15756 fi
15757
15758 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15759 #
15760 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15761 if test $ol_cv_dcl_sys_errlist = no ; then
15762         cat >> confdefs.h <<\EOF
15763 #define DECL_SYS_ERRLIST 1
15764 EOF
15765
15766
15767         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15768 echo "configure:15769: checking existence of sys_errlist" >&5
15769 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15770   echo $ac_n "(cached) $ac_c" 1>&6
15771 else
15772   
15773                 cat > conftest.$ac_ext <<EOF
15774 #line 15775 "configure"
15775 #include "confdefs.h"
15776 #include <errno.h>
15777 int main() {
15778 char *c = (char *) *sys_errlist
15779 ; return 0; }
15780 EOF
15781 if { (eval echo configure:15782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15782   rm -rf conftest*
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_have_sys_errlist=no
15789 fi
15790 rm -f conftest*
15791 fi
15792
15793 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15794 fi
15795 if test $ol_cv_have_sys_errlist = yes ; then
15796         cat >> confdefs.h <<\EOF
15797 #define HAVE_SYS_ERRLIST 1
15798 EOF
15799
15800 fi
15801
15802
15803
15804 if test "$ol_enable_debug" != no ; then
15805         cat >> confdefs.h <<\EOF
15806 #define LDAP_DEBUG 1
15807 EOF
15808
15809 fi
15810 if test "$ol_enable_syslog" = yes ; then
15811         cat >> confdefs.h <<\EOF
15812 #define LDAP_SYSLOG 1
15813 EOF
15814
15815 fi
15816 if test "$ol_enable_libui" = yes ; then
15817         cat >> confdefs.h <<\EOF
15818 #define LDAP_LIBUI 1
15819 EOF
15820
15821 fi
15822 if test "$ol_enable_cache" = no ; then
15823         cat >> confdefs.h <<\EOF
15824 #define LDAP_NOCACHE 1
15825 EOF
15826
15827 fi
15828 if test "$ol_link_kbind" != no ; then
15829         cat >> confdefs.h <<\EOF
15830 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15831 EOF
15832
15833 fi
15834 if test "$ol_enable_proctitle" != no ; then
15835         cat >> confdefs.h <<\EOF
15836 #define LDAP_PROCTITLE 1
15837 EOF
15838
15839 fi
15840 if test "$ol_enable_referrals" != no ; then
15841         cat >> confdefs.h <<\EOF
15842 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15843 EOF
15844
15845 fi
15846 if test "$ol_enable_local" != no; then
15847         cat >> confdefs.h <<\EOF
15848 #define LDAP_PF_LOCAL 1
15849 EOF
15850
15851 fi
15852 if test "$ol_enable_ipv6" != no; then
15853         cat >> confdefs.h <<\EOF
15854 #define LDAP_PF_INET6 1
15855 EOF
15856
15857 fi
15858 if test "$ol_enable_cleartext" != no ; then
15859         cat >> confdefs.h <<\EOF
15860 #define SLAPD_CLEARTEXT 1
15861 EOF
15862
15863 fi
15864 if test "$ol_enable_crypt" != no ; then
15865         cat >> confdefs.h <<\EOF
15866 #define SLAPD_CRYPT 1
15867 EOF
15868
15869 fi
15870 if test "$ol_link_kpasswd" != no ; then
15871         cat >> confdefs.h <<\EOF
15872 #define SLAPD_KPASSWD 1
15873 EOF
15874
15875 fi
15876 if test "$ol_link_spasswd" != no ; then
15877         cat >> confdefs.h <<\EOF
15878 #define SLAPD_SPASSWD 1
15879 EOF
15880
15881 fi
15882 if test "$ol_enable_multimaster" != no ; then
15883         cat >> confdefs.h <<\EOF
15884 #define SLAPD_MULTIMASTER 1
15885 EOF
15886
15887 fi
15888 if test "$ol_enable_phonetic" != no ; then
15889         cat >> confdefs.h <<\EOF
15890 #define SLAPD_PHONETIC 1
15891 EOF
15892
15893 fi
15894 if test "$ol_enable_rlookups" != no ; then
15895         cat >> confdefs.h <<\EOF
15896 #define SLAPD_RLOOKUPS 1
15897 EOF
15898
15899 fi
15900 if test "$ol_enable_aci" != no ; then
15901         cat >> confdefs.h <<\EOF
15902 #define SLAPD_ACI_ENABLED 1
15903 EOF
15904
15905 fi
15906
15907 if test "$ol_link_modules" != no ; then
15908         cat >> confdefs.h <<\EOF
15909 #define SLAPD_MODULES 1
15910 EOF
15911
15912         BUILD_SLAPD=yes
15913         SLAPD_MODULES_LDFLAGS="-dlopen self"
15914 fi
15915
15916 if test "$ol_link_dnssrv" != no ; then
15917         cat >> confdefs.h <<\EOF
15918 #define SLAPD_DNSSRV 1
15919 EOF
15920
15921         BUILD_SLAPD=yes
15922         BUILD_DNSSRV=yes
15923         if test "$ol_with_dnssrv_module" != static ; then
15924                 cat >> confdefs.h <<\EOF
15925 #define SLAPD_DNSSRV_DYNAMIC 1
15926 EOF
15927
15928                 BUILD_DNSSRV=mod
15929                 BUILD_DNSSRV_DYNAMIC=shared
15930                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15931         fi
15932 fi
15933
15934 if test "$ol_enable_ldap" != no ; then
15935         cat >> confdefs.h <<\EOF
15936 #define SLAPD_LDAP 1
15937 EOF
15938
15939         BUILD_SLAPD=yes
15940         BUILD_LDAP=yes
15941         if test "$ol_with_ldap_module" != static ; then
15942                 cat >> confdefs.h <<\EOF
15943 #define SLAPD_LDAP_DYNAMIC 1
15944 EOF
15945
15946                 BUILD_LDAP=mod
15947                 BUILD_LDAP_DYNAMIC=shared
15948                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15949         fi
15950 fi
15951
15952 if test "$ol_link_ldbm" != no ; then
15953         cat >> confdefs.h <<\EOF
15954 #define SLAPD_LDBM 1
15955 EOF
15956
15957         BUILD_SLAPD=yes
15958         BUILD_LDBM=yes
15959         if test "$ol_with_ldbm_module" != static ; then
15960                 cat >> confdefs.h <<\EOF
15961 #define SLAPD_LDBM_DYNAMIC 1
15962 EOF
15963
15964                 BUILD_LDBM=mod
15965                 BUILD_LDBM_DYNAMIC=shared
15966                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15967         fi
15968 fi
15969
15970 if test "$ol_enable_passwd" != no ; then
15971         cat >> confdefs.h <<\EOF
15972 #define SLAPD_PASSWD 1
15973 EOF
15974
15975         BUILD_SLAPD=yes
15976         BUILD_PASSWD=yes
15977         if test "$ol_with_passwd_module" != static ; then
15978                 cat >> confdefs.h <<\EOF
15979 #define SLAPD_PASSWD_DYNAMIC 1
15980 EOF
15981
15982                 BUILD_PASSWD=mod
15983                 BUILD_PASSWD_DYNAMIC=shared
15984                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15985         fi
15986 fi
15987
15988 if test "$ol_link_perl" != no ; then
15989         cat >> confdefs.h <<\EOF
15990 #define SLAPD_PERL 1
15991 EOF
15992
15993         BUILD_SLAPD=yes
15994         BUILD_PERL=yes
15995         if test "$ol_with_perl_module" != static ; then
15996                 cat >> confdefs.h <<\EOF
15997 #define SLAPD_PERL_DYNAMIC 1
15998 EOF
15999
16000                 BUILD_PERL=mod
16001                 BUILD_PERL_DYNAMIC=shared
16002                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16003         fi
16004 fi
16005
16006 if test "$ol_enable_shell" != no ; then
16007         cat >> confdefs.h <<\EOF
16008 #define SLAPD_SHELL 1
16009 EOF
16010
16011         BUILD_SLAPD=yes
16012         BUILD_SHELL=yes
16013         if test "$ol_with_shell_module" != static ; then
16014                 cat >> confdefs.h <<\EOF
16015 #define SLAPD_SHELL_DYNAMIC 1
16016 EOF
16017
16018                 BUILD_SHELL=mod
16019                 BUILD_SHELL_DYNAMIC=shared
16020                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16021         fi
16022 fi
16023
16024 if test "$ol_enable_tcl" != no ; then
16025         cat >> confdefs.h <<\EOF
16026 #define SLAPD_TCL 1
16027 EOF
16028
16029         BUILD_SLAPD=yes
16030         BUILD_TCL=yes
16031         if test "$ol_with_tcl_module" != static; then
16032                 cat >> confdefs.h <<\EOF
16033 #define SLAPD_TCL_DYNAMIC 1
16034 EOF
16035
16036                 BUILD_TCL=mod
16037                 BUILD_TCL_DYNAMIC=shared
16038                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16039         fi
16040 fi
16041
16042 if test "$ol_link_sql" != no ; then
16043         cat >> confdefs.h <<\EOF
16044 #define SLAPD_SQL 1
16045 EOF
16046
16047         BUILD_SLAPD=yes
16048         BUILD_SQL=yes
16049         if test "$ol_with_sql_module" != static; then
16050                 cat >> confdefs.h <<\EOF
16051 #define SLAPD_SQL_DYNAMIC 1
16052 EOF
16053
16054                 BUILD_SQL=mod
16055                 BUILD_SQL_DYNAMIC=shared
16056                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16057         fi
16058 fi
16059
16060 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16061         $BUILD_SLAPD = yes ; then
16062         BUILD_SLURPD=yes
16063 fi
16064
16065
16066 if test "$LINK_BINS_DYNAMIC" = yes; then
16067     LIB_LINKAGE=DYN
16068     LT_LIB_LINKAGE=shared
16069 else
16070     LIB_LINKAGE=STAT
16071     LT_LIB_LINKAGE=static
16072 fi
16073
16074 if test "$ac_cv_mingw32" = yes ; then
16075     PLAT=NT
16076     DYN_EXT=dll
16077 else
16078     PLAT=UNIX
16079     DYN_EXT=so
16080 fi
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090   
16091   
16092   
16093   
16094   
16095   
16096   
16097   
16098   
16099   
16100   
16101   
16102   
16103   
16104   
16105   
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141 trap '' 1 2 15
16142
16143 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16144
16145 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16146 # Let make expand exec_prefix.
16147 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16148
16149 # Any assignment to VPATH causes Sun make to only execute
16150 # the first set of double-colon rules, so remove it if not needed.
16151 # If there is a colon in the path, we need to keep it.
16152 if test "x$srcdir" = x.; then
16153   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16154 fi
16155
16156 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16157
16158 DEFS=-DHAVE_CONFIG_H
16159
16160 # Without the "./", some shells look in PATH for config.status.
16161 : ${CONFIG_STATUS=./config.status}
16162
16163 echo creating $CONFIG_STATUS
16164 rm -f $CONFIG_STATUS
16165 cat > $CONFIG_STATUS <<EOF
16166 #! /bin/sh
16167 # Generated automatically by configure.
16168 # Run this file to recreate the current configuration.
16169 # This directory was configured as follows,
16170 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16171 #
16172 # $0 $ac_configure_args
16173 #
16174 # Compiler output produced by configure, useful for debugging
16175 # configure, is in ./config.log if it exists.
16176
16177 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16178 for ac_option
16179 do
16180   case "\$ac_option" in
16181   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16182     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16183     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16184   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16185     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16186     exit 0 ;;
16187   -help | --help | --hel | --he | --h)
16188     echo "\$ac_cs_usage"; exit 0 ;;
16189   *) echo "\$ac_cs_usage"; exit 1 ;;
16190   esac
16191 done
16192
16193 ac_given_srcdir=$srcdir
16194 ac_given_INSTALL="$INSTALL"
16195
16196 trap 'rm -fr `echo "\
16197 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16198 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16199 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16200 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16201 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16202 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16203 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16204 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16205 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16206 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16207 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16208 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16209 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16210 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16211 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16212 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16213 include/Makefile:build/top.mk:include/Makefile.in \
16214 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16215 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16216 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16217 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16218 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16219 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16220 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16221 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16222 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16223 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16224 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16225 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16226 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16227 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16228 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16229 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16230 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16231 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16232 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16233 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16234 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16235 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16236 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16237 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16238 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16239 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16240 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16241  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16242 EOF
16243 cat >> $CONFIG_STATUS <<EOF
16244
16245 # Protect against being on the right side of a sed subst in config.status.
16246 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16247  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16248 $ac_vpsub
16249 $extrasub
16250 s%@SHELL@%$SHELL%g
16251 s%@CFLAGS@%$CFLAGS%g
16252 s%@CPPFLAGS@%$CPPFLAGS%g
16253 s%@CXXFLAGS@%$CXXFLAGS%g
16254 s%@FFLAGS@%$FFLAGS%g
16255 s%@DEFS@%$DEFS%g
16256 s%@LDFLAGS@%$LDFLAGS%g
16257 s%@LIBS@%$LIBS%g
16258 s%@exec_prefix@%$exec_prefix%g
16259 s%@prefix@%$prefix%g
16260 s%@program_transform_name@%$program_transform_name%g
16261 s%@bindir@%$bindir%g
16262 s%@sbindir@%$sbindir%g
16263 s%@libexecdir@%$libexecdir%g
16264 s%@datadir@%$datadir%g
16265 s%@sysconfdir@%$sysconfdir%g
16266 s%@sharedstatedir@%$sharedstatedir%g
16267 s%@localstatedir@%$localstatedir%g
16268 s%@libdir@%$libdir%g
16269 s%@includedir@%$includedir%g
16270 s%@oldincludedir@%$oldincludedir%g
16271 s%@infodir@%$infodir%g
16272 s%@mandir@%$mandir%g
16273 s%@host@%$host%g
16274 s%@host_alias@%$host_alias%g
16275 s%@host_cpu@%$host_cpu%g
16276 s%@host_vendor@%$host_vendor%g
16277 s%@host_os@%$host_os%g
16278 s%@target@%$target%g
16279 s%@target_alias@%$target_alias%g
16280 s%@target_cpu@%$target_cpu%g
16281 s%@target_vendor@%$target_vendor%g
16282 s%@target_os@%$target_os%g
16283 s%@build@%$build%g
16284 s%@build_alias@%$build_alias%g
16285 s%@build_cpu@%$build_cpu%g
16286 s%@build_vendor@%$build_vendor%g
16287 s%@build_os@%$build_os%g
16288 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16289 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16290 s%@INSTALL_DATA@%$INSTALL_DATA%g
16291 s%@PACKAGE@%$PACKAGE%g
16292 s%@VERSION@%$VERSION%g
16293 s%@ACLOCAL@%$ACLOCAL%g
16294 s%@AUTOCONF@%$AUTOCONF%g
16295 s%@AUTOMAKE@%$AUTOMAKE%g
16296 s%@AUTOHEADER@%$AUTOHEADER%g
16297 s%@MAKEINFO@%$MAKEINFO%g
16298 s%@install_sh@%$install_sh%g
16299 s%@AMTAR@%$AMTAR%g
16300 s%@AWK@%$AWK%g
16301 s%@AMTARFLAGS@%$AMTARFLAGS%g
16302 s%@SET_MAKE@%$SET_MAKE%g
16303 s%@top_builddir@%$top_builddir%g
16304 s%@ldap_subdir@%$ldap_subdir%g
16305 s%@CC@%$CC%g
16306 s%@RANLIB@%$RANLIB%g
16307 s%@LN_S@%$LN_S%g
16308 s%@DLLTOOL@%$DLLTOOL%g
16309 s%@AS@%$AS%g
16310 s%@OBJDUMP@%$OBJDUMP%g
16311 s%@LIBTOOL@%$LIBTOOL%g
16312 s%@LN_H@%$LN_H%g
16313 s%@SENDMAIL@%$SENDMAIL%g
16314 s%@EDITOR@%$EDITOR%g
16315 s%@FINGER@%$FINGER%g
16316 s%@PERLBIN@%$PERLBIN%g
16317 s%@CPP@%$CPP%g
16318 s%@EXEEXT@%$EXEEXT%g
16319 s%@OBJEXT@%$OBJEXT%g
16320 s%@OL_MKDEP@%$OL_MKDEP%g
16321 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16322 s%@LIBOBJS@%$LIBOBJS%g
16323 s%@LIBSRCS@%$LIBSRCS%g
16324 s%@PLAT@%$PLAT%g
16325 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16326 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16327 s%@DYN_EXT@%$DYN_EXT%g
16328 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16329 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16330 s%@BUILD_LDAP@%$BUILD_LDAP%g
16331 s%@BUILD_LDBM@%$BUILD_LDBM%g
16332 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16333 s%@BUILD_PERL@%$BUILD_PERL%g
16334 s%@BUILD_SHELL@%$BUILD_SHELL%g
16335 s%@BUILD_SQL@%$BUILD_SQL%g
16336 s%@BUILD_TCL@%$BUILD_TCL%g
16337 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16338 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16339 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16340 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16341 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16342 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16343 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16344 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16345 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16346 s%@LDAP_LIBS@%$LDAP_LIBS%g
16347 s%@LDIF_LIBS@%$LDIF_LIBS%g
16348 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16349 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16350 s%@LDBM_LIBS@%$LDBM_LIBS%g
16351 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16352 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16353 s%@WRAP_LIBS@%$WRAP_LIBS%g
16354 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16355 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16356 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16357 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16358 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16359 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16360 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16361 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16362 s%@KRB4_LIBS@%$KRB4_LIBS%g
16363 s%@KRB5_LIBS@%$KRB5_LIBS%g
16364 s%@READLINE_LIBS@%$READLINE_LIBS%g
16365 s%@SASL_LIBS@%$SASL_LIBS%g
16366 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16367 s%@TLS_LIBS@%$TLS_LIBS%g
16368 s%@MODULES_LIBS@%$MODULES_LIBS%g
16369 s%@AUTH_LIBS@%$AUTH_LIBS%g
16370 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16371 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16372 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16373
16374 CEOF
16375 EOF
16376
16377 cat >> $CONFIG_STATUS <<\EOF
16378
16379 # Split the substitutions into bite-sized pieces for seds with
16380 # small command number limits, like on Digital OSF/1 and HP-UX.
16381 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16382 ac_file=1 # Number of current file.
16383 ac_beg=1 # First line for current file.
16384 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16385 ac_more_lines=:
16386 ac_sed_cmds=""
16387 while $ac_more_lines; do
16388   if test $ac_beg -gt 1; then
16389     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16390   else
16391     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16392   fi
16393   if test ! -s conftest.s$ac_file; then
16394     ac_more_lines=false
16395     rm -f conftest.s$ac_file
16396   else
16397     if test -z "$ac_sed_cmds"; then
16398       ac_sed_cmds="sed -f conftest.s$ac_file"
16399     else
16400       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16401     fi
16402     ac_file=`expr $ac_file + 1`
16403     ac_beg=$ac_end
16404     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16405   fi
16406 done
16407 if test -z "$ac_sed_cmds"; then
16408   ac_sed_cmds=cat
16409 fi
16410 EOF
16411
16412 cat >> $CONFIG_STATUS <<EOF
16413
16414 CONFIG_FILES=\${CONFIG_FILES-"\
16415 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16416 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16417 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16418 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16419 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16420 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16421 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16422 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16423 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16424 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16425 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16426 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16427 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16428 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16429 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16430 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16431 include/Makefile:build/top.mk:include/Makefile.in \
16432 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16433 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16434 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16435 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16436 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16437 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16438 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16439 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16440 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16441 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16442 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16443 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16444 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16445 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16446 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16447 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16448 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16449 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16450 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16451 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16452 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16453 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16454 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16455 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16456 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16457 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16458 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16459 "}
16460 EOF
16461 cat >> $CONFIG_STATUS <<\EOF
16462 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16463   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16464   case "$ac_file" in
16465   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16466        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16467   *) ac_file_in="${ac_file}.in" ;;
16468   esac
16469
16470   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16471
16472   # Remove last slash and all that follows it.  Not all systems have dirname.
16473   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16474   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16475     # The file is in a subdirectory.
16476     test ! -d "$ac_dir" && mkdir "$ac_dir"
16477     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16478     # A "../" for each directory in $ac_dir_suffix.
16479     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16480   else
16481     ac_dir_suffix= ac_dots=
16482   fi
16483
16484   case "$ac_given_srcdir" in
16485   .)  srcdir=.
16486       if test -z "$ac_dots"; then top_srcdir=.
16487       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16488   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16489   *) # Relative path.
16490     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16491     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16492   esac
16493
16494   case "$ac_given_INSTALL" in
16495   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16496   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16497   esac
16498
16499   echo creating "$ac_file"
16500   rm -f "$ac_file"
16501   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16502   case "$ac_file" in
16503   *[Mm]akefile*) ac_comsub="1i\\
16504 # $configure_input" ;;
16505   *) ac_comsub= ;;
16506   esac
16507
16508   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16509   sed -e "$ac_comsub
16510 s%@configure_input@%$configure_input%g
16511 s%@srcdir@%$srcdir%g
16512 s%@top_srcdir@%$top_srcdir%g
16513 s%@INSTALL@%$INSTALL%g
16514 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16515 fi; done
16516 rm -f conftest.s*
16517
16518 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16519 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16520 #
16521 # ac_d sets the value in "#define NAME VALUE" lines.
16522 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16523 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16524 ac_dC='\3'
16525 ac_dD='%g'
16526 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16527 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16528 ac_uB='\([      ]\)%\1#\2define\3'
16529 ac_uC=' '
16530 ac_uD='\4%g'
16531 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16532 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16533 ac_eB='$%\1#\2define\3'
16534 ac_eC=' '
16535 ac_eD='%g'
16536
16537 if test "${CONFIG_HEADERS+set}" != set; then
16538 EOF
16539 cat >> $CONFIG_STATUS <<EOF
16540   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16541 EOF
16542 cat >> $CONFIG_STATUS <<\EOF
16543 fi
16544 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16545   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16546   case "$ac_file" in
16547   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16548        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16549   *) ac_file_in="${ac_file}.in" ;;
16550   esac
16551
16552   echo creating $ac_file
16553
16554   rm -f conftest.frag conftest.in conftest.out
16555   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16556   cat $ac_file_inputs > conftest.in
16557
16558 EOF
16559
16560 # Transform confdefs.h into a sed script conftest.vals that substitutes
16561 # the proper values into config.h.in to produce config.h.  And first:
16562 # Protect against being on the right side of a sed subst in config.status.
16563 # Protect against being in an unquoted here document in config.status.
16564 rm -f conftest.vals
16565 cat > conftest.hdr <<\EOF
16566 s/[\\&%]/\\&/g
16567 s%[\\$`]%\\&%g
16568 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16569 s%ac_d%ac_u%gp
16570 s%ac_u%ac_e%gp
16571 EOF
16572 sed -n -f conftest.hdr confdefs.h > conftest.vals
16573 rm -f conftest.hdr
16574
16575 # This sed command replaces #undef with comments.  This is necessary, for
16576 # example, in the case of _POSIX_SOURCE, which is predefined and required
16577 # on some systems where configure will not decide to define it.
16578 cat >> conftest.vals <<\EOF
16579 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16580 EOF
16581
16582 # Break up conftest.vals because some shells have a limit on
16583 # the size of here documents, and old seds have small limits too.
16584
16585 rm -f conftest.tail
16586 while :
16587 do
16588   ac_lines=`grep -c . conftest.vals`
16589   # grep -c gives empty output for an empty file on some AIX systems.
16590   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16591   # Write a limited-size here document to conftest.frag.
16592   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16593   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16594   echo 'CEOF
16595   sed -f conftest.frag conftest.in > conftest.out
16596   rm -f conftest.in
16597   mv conftest.out conftest.in
16598 ' >> $CONFIG_STATUS
16599   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16600   rm -f conftest.vals
16601   mv conftest.tail conftest.vals
16602 done
16603 rm -f conftest.vals
16604
16605 cat >> $CONFIG_STATUS <<\EOF
16606   rm -f conftest.frag conftest.h
16607   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16608   cat conftest.in >> conftest.h
16609   rm -f conftest.in
16610   if cmp -s $ac_file conftest.h 2>/dev/null; then
16611     echo "$ac_file is unchanged"
16612     rm -f conftest.h
16613   else
16614     # Remove last slash and all that follows it.  Not all systems have dirname.
16615       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16616       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16617       # The file is in a subdirectory.
16618       test ! -d "$ac_dir" && mkdir "$ac_dir"
16619     fi
16620     rm -f $ac_file
16621     mv conftest.h $ac_file
16622   fi
16623 fi; done
16624
16625 EOF
16626 cat >> $CONFIG_STATUS <<EOF
16627
16628 EOF
16629 cat >> $CONFIG_STATUS <<\EOF
16630
16631 date > stamp-h
16632 echo Please \"make depend\" to build dependencies
16633
16634 exit 0
16635 EOF
16636 chmod +x $CONFIG_STATUS
16637 rm -fr confdefs* $ac_clean_files
16638 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16639