]> git.sur5r.net Git - openldap/blob - configure
Rebuild using:
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.282 1999/11/26 22:32:19 kdz Exp  
4
5 # Copyright 1998,1999 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-1999 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
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-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-x-compile    enable cross compiling (no)"
45 ac_help="$ac_help
46   --enable-dmalloc      enable debug malloc support (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 Kerberos support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use 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 LDAPD (X.500-to-LDAP Gateway) Options:"
63 ac_help="$ac_help
64   --enable-ldapd        enable building ldapd (no)"
65 ac_help="$ac_help
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd        enable building slapd (yes)"
69 ac_help="$ac_help
70     --enable-cleartext  enable cleartext passwords (yes)"
71 ac_help="$ac_help
72     --enable-crypt      enable crypt(3) passwords (auto)"
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-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-discreteaci        enable discrete rights in ACIs (no)"
87 ac_help="$ac_help
88     --enable-wrappers   enable tcp wrapper support (no)"
89 ac_help="$ac_help
90     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
91 ac_help="$ac_help
92     --enable-bdb2       enable bdb2 backend (no)"
93 ac_help="$ac_help
94       --with-bdb2-module        module type (static)"
95 ac_help="$ac_help
96     --enable-ldap       enable ldap backend (no)"
97 ac_help="$ac_help
98       --with-ldap-module        module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm       enable ldbm backend (yes)"
101 ac_help="$ac_help
102       --with-ldbm-api   use LDBM API (auto)"
103 ac_help="$ac_help
104       --with-ldbm-module        module type (static)"
105 ac_help="$ac_help
106       --with-ldbm-type  use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd     enable passwd backend (no)"
109 ac_help="$ac_help
110       --with-passwd-module      module type (static)"
111 ac_help="$ac_help
112     --enable-perl       enable perl backend (no)"
113 ac_help="$ac_help
114       --with-perl-module        module type (static)"
115 ac_help="$ac_help
116     --enable-shell      enable shell backend (no)"
117 ac_help="$ac_help
118       --with-shell-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 ac_aux_dir=
642 for ac_dir in build $srcdir/build; do
643   if test -f $ac_dir/install-sh; then
644     ac_aux_dir=$ac_dir
645     ac_install_sh="$ac_aux_dir/install-sh -c"
646     break
647   elif test -f $ac_dir/install.sh; then
648     ac_aux_dir=$ac_dir
649     ac_install_sh="$ac_aux_dir/install.sh -c"
650     break
651   elif test -f $ac_dir/shtool; then
652     ac_aux_dir=$ac_dir
653     ac_install_sh="$ac_aux_dir/shtool install -c"
654     break
655   fi
656 done
657 if test -z "$ac_aux_dir"; then
658   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
659 fi
660 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
661 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
662 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
663
664 OL_VERSION=`cat $ac_aux_dir/version`
665 if test -z "$OL_VERSION"; then
666         { echo "configure: error: could not determine version" 1>&2; exit 1; }
667 fi
668
669 echo "Configuring OpenLDAP $OL_VERSION ..."
670
671
672 echo $ac_n "checking host system type""... $ac_c" 1>&6
673 echo "configure:674: checking host system type" >&5
674 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
675
676 # Make sure we can run config.sub.
677   if $ac_config_sub sun4 >/dev/null 2>&1; then :
678     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
679   fi
680
681   ac_cv_host_alias=$host
682   case "$ac_cv_host_alias" in
683   NONE)
684     case $nonopt in
685     NONE)
686       if ac_cv_host_alias=`$ac_config_guess`; then :
687       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
688       fi ;;
689     *) ac_cv_host_alias=$nonopt ;;
690     esac ;;
691   esac
692
693   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
694   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
695   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
696   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
697 else
698   echo $ac_n "(cached) $ac_c" 1>&6
699 fi
700
701 echo "$ac_t""$ac_cv_host" 1>&6
702
703 host=$ac_cv_host
704 host_alias=$ac_cv_host_alias
705 host_cpu=$ac_cv_host_cpu
706 host_vendor=$ac_cv_host_vendor
707 host_os=$ac_cv_host_os
708
709
710
711
712
713 echo $ac_n "checking target system type""... $ac_c" 1>&6
714 echo "configure:715: checking target system type" >&5
715 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
716
717 # Make sure we can run config.sub.
718   if $ac_config_sub sun4 >/dev/null 2>&1; then :
719     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
720   fi
721
722   ac_cv_target_alias=$target
723   case "$ac_cv_target_alias" in
724   NONE)
725     case $nonopt in
726     NONE)
727       ac_cv_target_alias=$host_alias ;;
728
729     *) ac_cv_target_alias=$nonopt ;;
730     esac ;;
731   esac
732
733   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
734   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
735   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
736   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
737 else
738   echo $ac_n "(cached) $ac_c" 1>&6
739 fi
740
741 echo "$ac_t""$ac_cv_target" 1>&6
742
743 target=$ac_cv_target
744 target_alias=$ac_cv_target_alias
745 target_cpu=$ac_cv_target_cpu
746 target_vendor=$ac_cv_target_vendor
747 target_os=$ac_cv_target_os
748
749
750
751
752
753 echo $ac_n "checking build system type""... $ac_c" 1>&6
754 echo "configure:755: checking build system type" >&5
755 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
756
757 # Make sure we can run config.sub.
758   if $ac_config_sub sun4 >/dev/null 2>&1; then :
759     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
760   fi
761
762   ac_cv_build_alias=$build
763   case "$ac_cv_build_alias" in
764   NONE)
765     case $nonopt in
766     NONE)
767       ac_cv_build_alias=$host_alias ;;
768
769     *) ac_cv_build_alias=$nonopt ;;
770     esac ;;
771   esac
772
773   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
774   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
775   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
776   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
777 else
778   echo $ac_n "(cached) $ac_c" 1>&6
779 fi
780
781 echo "$ac_t""$ac_cv_build" 1>&6
782
783 build=$ac_cv_build
784 build_alias=$ac_cv_build_alias
785 build_cpu=$ac_cv_build_cpu
786 build_vendor=$ac_cv_build_vendor
787 build_os=$ac_cv_build_os
788
789
790
791
792
793 # Do some error checking and defaulting for the host and target type.
794 # The inputs are:
795 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
796 #
797 # The rules are:
798 # 1. You are not allowed to specify --host, --target, and nonopt at the
799 #    same time.
800 # 2. Host defaults to nonopt.
801 # 3. If nonopt is not specified, then host defaults to the current host,
802 #    as determined by config.guess.
803 # 4. Target and build default to nonopt.
804 # 5. If nonopt is not specified, then target and build default to host.
805
806 # The aliases save the names the user supplied, while $host etc.
807 # will get canonicalized.
808 case $host---$target---$nonopt in
809 NONE---*---* | *---NONE---* | *---*---NONE) ;;
810 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
811 esac
812
813 test "$host_alias" != "$target_alias" &&
814   test "$program_prefix$program_suffix$program_transform_name" = \
815     NONENONEs,x,x, &&
816   program_prefix=${target_alias}-
817
818
819 # Find a good install program.  We prefer a C program (faster),
820 # so one script is as good as another.  But avoid the broken or
821 # incompatible versions:
822 # SysV /etc/install, /usr/sbin/install
823 # SunOS /usr/etc/install
824 # IRIX /sbin/install
825 # AIX /bin/install
826 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
827 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
828 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
829 # ./install, which can be erroneously created by make from ./install.sh.
830 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
831 echo "configure:832: checking for a BSD compatible install" >&5
832 if test -z "$INSTALL"; then
833 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
834   echo $ac_n "(cached) $ac_c" 1>&6
835 else
836     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
837   for ac_dir in $PATH; do
838     # Account for people who put trailing slashes in PATH elements.
839     case "$ac_dir/" in
840     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
841     *)
842       # OSF1 and SCO ODT 3.0 have their own names for install.
843       # Don't use installbsd from OSF since it installs stuff as root
844       # by default.
845       for ac_prog in ginstall scoinst install; do
846         if test -f $ac_dir/$ac_prog; then
847           if test $ac_prog = install &&
848             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
849             # AIX install.  It has an incompatible calling convention.
850             :
851           elif test $ac_prog = install &&
852             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
853             # program-specific install script used by HP pwplus--don't use.
854             :
855           else
856             ac_cv_path_install="$ac_dir/$ac_prog -c"
857             break 2
858           fi
859         fi
860       done
861       ;;
862     esac
863   done
864   IFS="$ac_save_IFS"
865
866 fi
867   if test "${ac_cv_path_install+set}" = set; then
868     INSTALL="$ac_cv_path_install"
869   else
870     # As a last resort, use the slow shell script.  We don't cache a
871     # path for INSTALL within a source directory, because that will
872     # break other packages using the cache if that directory is
873     # removed, or if the path is relative.
874     INSTALL="$ac_install_sh"
875   fi
876 fi
877 echo "$ac_t""$INSTALL" 1>&6
878
879 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
880 # It thinks the first close brace ends the variable substitution.
881 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
882
883 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
884
885 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
886
887 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
888 echo "configure:889: checking whether build environment is sane" >&5
889 # Just in case
890 sleep 1
891 echo timestamp > conftestfile
892 # Do `set' in a subshell so we don't clobber the current shell's
893 # arguments.  Must try -L first in case configure is actually a
894 # symlink; some systems play weird games with the mod time of symlinks
895 # (eg FreeBSD returns the mod time of the symlink's containing
896 # directory).
897 if (
898    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
899    if test "$*" = "X"; then
900       # -L didn't work.
901       set X `ls -t $srcdir/configure conftestfile`
902    fi
903    if test "$*" != "X $srcdir/configure conftestfile" \
904       && test "$*" != "X conftestfile $srcdir/configure"; then
905
906       # If neither matched, then we have a broken ls.  This can happen
907       # if, for instance, CONFIG_SHELL is bash and it inherits a
908       # broken ls alias from the environment.  This has actually
909       # happened.  Such a system could not be considered "sane".
910       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
911 alias in your environment" 1>&2; exit 1; }
912    fi
913
914    test "$2" = conftestfile
915    )
916 then
917    # Ok.
918    :
919 else
920    { echo "configure: error: newly created file is older than distributed files!
921 Check your system clock" 1>&2; exit 1; }
922 fi
923 rm -f conftest*
924 echo "$ac_t""yes" 1>&6
925 if test "$program_transform_name" = s,x,x,; then
926   program_transform_name=
927 else
928   # Double any \ or $.  echo might interpret backslashes.
929   cat <<\EOF_SED > conftestsed
930 s,\\,\\\\,g; s,\$,$$,g
931 EOF_SED
932   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
933   rm -f conftestsed
934 fi
935 test "$program_prefix" != NONE &&
936   program_transform_name="s,^,${program_prefix},;$program_transform_name"
937 # Use a double $ so make ignores it.
938 test "$program_suffix" != NONE &&
939   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
940
941 # sed with no file args requires a program.
942 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
943
944 for ac_prog in mawk gawk nawk awk
945 do
946 # Extract the first word of "$ac_prog", so it can be a program name with args.
947 set dummy $ac_prog; ac_word=$2
948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
949 echo "configure:950: checking for $ac_word" >&5
950 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
951   echo $ac_n "(cached) $ac_c" 1>&6
952 else
953   if test -n "$AWK"; then
954   ac_cv_prog_AWK="$AWK" # Let the user override the test.
955 else
956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
957   ac_dummy="$PATH"
958   for ac_dir in $ac_dummy; do
959     test -z "$ac_dir" && ac_dir=.
960     if test -f $ac_dir/$ac_word; then
961       ac_cv_prog_AWK="$ac_prog"
962       break
963     fi
964   done
965   IFS="$ac_save_ifs"
966 fi
967 fi
968 AWK="$ac_cv_prog_AWK"
969 if test -n "$AWK"; then
970   echo "$ac_t""$AWK" 1>&6
971 else
972   echo "$ac_t""no" 1>&6
973 fi
974
975 test -n "$AWK" && break
976 done
977
978 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
979 echo "configure:980: checking whether ${MAKE-make} sets \${MAKE}" >&5
980 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
981 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
982   echo $ac_n "(cached) $ac_c" 1>&6
983 else
984   cat > conftestmake <<\EOF
985 all:
986         @echo 'ac_maketemp="${MAKE}"'
987 EOF
988 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
989 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
990 if test -n "$ac_maketemp"; then
991   eval ac_cv_prog_make_${ac_make}_set=yes
992 else
993   eval ac_cv_prog_make_${ac_make}_set=no
994 fi
995 rm -f conftestmake
996 fi
997 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
998   echo "$ac_t""yes" 1>&6
999   SET_MAKE=
1000 else
1001   echo "$ac_t""no" 1>&6
1002   SET_MAKE="MAKE=${MAKE-make}"
1003 fi
1004
1005
1006
1007 PACKAGE=OpenLDAP
1008
1009 VERSION=$OL_VERSION
1010
1011 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1012   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1013 fi
1014
1015
1016
1017 missing_dir=`cd $ac_aux_dir && pwd`
1018 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1019 echo "configure:1020: checking for working aclocal" >&5
1020 # Run test in a subshell; some versions of sh will print an error if
1021 # an executable is not found, even if stderr is redirected.
1022 # Redirect stdin to placate older versions of autoconf.  Sigh.
1023 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1024    ACLOCAL=aclocal
1025    echo "$ac_t""found" 1>&6
1026 else
1027    ACLOCAL="$missing_dir/missing aclocal"
1028    echo "$ac_t""missing" 1>&6
1029 fi
1030
1031 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1032 echo "configure:1033: checking for working autoconf" >&5
1033 # Run test in a subshell; some versions of sh will print an error if
1034 # an executable is not found, even if stderr is redirected.
1035 # Redirect stdin to placate older versions of autoconf.  Sigh.
1036 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1037    AUTOCONF=autoconf
1038    echo "$ac_t""found" 1>&6
1039 else
1040    AUTOCONF="$missing_dir/missing autoconf"
1041    echo "$ac_t""missing" 1>&6
1042 fi
1043
1044 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1045 echo "configure:1046: checking for working automake" >&5
1046 # Run test in a subshell; some versions of sh will print an error if
1047 # an executable is not found, even if stderr is redirected.
1048 # Redirect stdin to placate older versions of autoconf.  Sigh.
1049 if (automake --version) < /dev/null > /dev/null 2>&1; then
1050    AUTOMAKE=automake
1051    echo "$ac_t""found" 1>&6
1052 else
1053    AUTOMAKE="$missing_dir/missing automake"
1054    echo "$ac_t""missing" 1>&6
1055 fi
1056
1057 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1058 echo "configure:1059: checking for working autoheader" >&5
1059 # Run test in a subshell; some versions of sh will print an error if
1060 # an executable is not found, even if stderr is redirected.
1061 # Redirect stdin to placate older versions of autoconf.  Sigh.
1062 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1063    AUTOHEADER=autoheader
1064    echo "$ac_t""found" 1>&6
1065 else
1066    AUTOHEADER="$missing_dir/missing autoheader"
1067    echo "$ac_t""missing" 1>&6
1068 fi
1069
1070 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1071 echo "configure:1072: checking for working makeinfo" >&5
1072 # Run test in a subshell; some versions of sh will print an error if
1073 # an executable is not found, even if stderr is redirected.
1074 # Redirect stdin to placate older versions of autoconf.  Sigh.
1075 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1076    MAKEINFO=makeinfo
1077    echo "$ac_t""found" 1>&6
1078 else
1079    MAKEINFO="$missing_dir/missing makeinfo"
1080    echo "$ac_t""missing" 1>&6
1081 fi
1082
1083 install_sh="$missing_dir/install-sh"
1084 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1085
1086 for ac_prog in gnutar gtar tar
1087 do
1088 # Extract the first word of "$ac_prog", so it can be a program name with args.
1089 set dummy $ac_prog; ac_word=$2
1090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1091 echo "configure:1092: checking for $ac_word" >&5
1092 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1093   echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095   if test -n "$AMTAR"; then
1096   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1097 else
1098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1099   ac_dummy="$PATH"
1100   for ac_dir in $ac_dummy; do
1101     test -z "$ac_dir" && ac_dir=.
1102     if test -f $ac_dir/$ac_word; then
1103       ac_cv_prog_AMTAR="$ac_prog"
1104       break
1105     fi
1106   done
1107   IFS="$ac_save_ifs"
1108 fi
1109 fi
1110 AMTAR="$ac_cv_prog_AMTAR"
1111 if test -n "$AMTAR"; then
1112   echo "$ac_t""$AMTAR" 1>&6
1113 else
1114   echo "$ac_t""no" 1>&6
1115 fi
1116
1117 test -n "$AMTAR" && break
1118 done
1119
1120
1121 AMTARFLAGS=
1122 if test -n "$AMTAR"; then
1123   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1124         AMTARFLAGS=o
1125   fi
1126 fi
1127
1128
1129
1130 cat >> confdefs.h <<EOF
1131 #define OPENLDAP_PACKAGE "$PACKAGE"
1132 EOF
1133
1134 cat >> confdefs.h <<EOF
1135 #define OPENLDAP_VERSION "$VERSION"
1136 EOF
1137
1138
1139
1140
1141 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1142 echo "configure:1143: checking configure arguments" >&5
1143
1144
1145 top_builddir=`pwd`
1146
1147 ldap_subdir="/openldap"
1148
1149 # Check whether --with-subdir or --without-subdir was given.
1150 if test "${with_subdir+set}" = set; then
1151   withval="$with_subdir"
1152   case "$withval" in
1153         no) ldap_subdir=""
1154                 ;;
1155         yes)
1156                 ;;
1157         /*|\\*)
1158                 ldap_subdir="$withval"
1159                 ;;
1160         *)
1161                 ldap_subdir="/$withval"
1162                 ;;
1163 esac
1164
1165 fi
1166
1167
1168 # OpenLDAP --enable-debug
1169         # Check whether --enable-debug or --disable-debug was given.
1170 if test "${enable_debug+set}" = set; then
1171   enableval="$enable_debug"
1172   
1173         ol_arg=invalid
1174         for ol_val in auto yes no ; do
1175                 if test "$enableval" = "$ol_val" ; then
1176                         ol_arg="$ol_val"
1177                 fi
1178         done
1179         if test "$ol_arg" = "invalid" ; then
1180                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1181         fi
1182         ol_enable_debug="$ol_arg"
1183
1184 else
1185         ol_enable_debug="yes"
1186 fi
1187 # end --enable-debug
1188 # OpenLDAP --enable-syslog
1189         # Check whether --enable-syslog or --disable-syslog was given.
1190 if test "${enable_syslog+set}" = set; then
1191   enableval="$enable_syslog"
1192   
1193         ol_arg=invalid
1194         for ol_val in auto yes no ; do
1195                 if test "$enableval" = "$ol_val" ; then
1196                         ol_arg="$ol_val"
1197                 fi
1198         done
1199         if test "$ol_arg" = "invalid" ; then
1200                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1201         fi
1202         ol_enable_syslog="$ol_arg"
1203
1204 else
1205         ol_enable_syslog="auto"
1206 fi
1207 # end --enable-syslog
1208 # OpenLDAP --enable-proctitle
1209         # Check whether --enable-proctitle or --disable-proctitle was given.
1210 if test "${enable_proctitle+set}" = set; then
1211   enableval="$enable_proctitle"
1212   
1213         ol_arg=invalid
1214         for ol_val in auto yes no ; do
1215                 if test "$enableval" = "$ol_val" ; then
1216                         ol_arg="$ol_val"
1217                 fi
1218         done
1219         if test "$ol_arg" = "invalid" ; then
1220                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1221         fi
1222         ol_enable_proctitle="$ol_arg"
1223
1224 else
1225         ol_enable_proctitle="yes"
1226 fi
1227 # end --enable-proctitle
1228 # OpenLDAP --enable-cache
1229         # Check whether --enable-cache or --disable-cache was given.
1230 if test "${enable_cache+set}" = set; then
1231   enableval="$enable_cache"
1232   
1233         ol_arg=invalid
1234         for ol_val in auto yes no ; do
1235                 if test "$enableval" = "$ol_val" ; then
1236                         ol_arg="$ol_val"
1237                 fi
1238         done
1239         if test "$ol_arg" = "invalid" ; then
1240                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1241         fi
1242         ol_enable_cache="$ol_arg"
1243
1244 else
1245         ol_enable_cache="yes"
1246 fi
1247 # end --enable-cache
1248 # OpenLDAP --enable-dns
1249         # Check whether --enable-dns or --disable-dns was given.
1250 if test "${enable_dns+set}" = set; then
1251   enableval="$enable_dns"
1252   
1253         ol_arg=invalid
1254         for ol_val in auto yes no ; do
1255                 if test "$enableval" = "$ol_val" ; then
1256                         ol_arg="$ol_val"
1257                 fi
1258         done
1259         if test "$ol_arg" = "invalid" ; then
1260                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1261         fi
1262         ol_enable_dns="$ol_arg"
1263
1264 else
1265         ol_enable_dns="no"
1266 fi
1267 # end --enable-dns
1268 # OpenLDAP --enable-referrals
1269         # Check whether --enable-referrals or --disable-referrals was given.
1270 if test "${enable_referrals+set}" = set; then
1271   enableval="$enable_referrals"
1272   
1273         ol_arg=invalid
1274         for ol_val in auto yes no ; do
1275                 if test "$enableval" = "$ol_val" ; then
1276                         ol_arg="$ol_val"
1277                 fi
1278         done
1279         if test "$ol_arg" = "invalid" ; then
1280                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1281         fi
1282         ol_enable_referrals="$ol_arg"
1283
1284 else
1285         ol_enable_referrals="yes"
1286 fi
1287 # end --enable-referrals
1288 # OpenLDAP --enable-cldap
1289         # Check whether --enable-cldap or --disable-cldap was given.
1290 if test "${enable_cldap+set}" = set; then
1291   enableval="$enable_cldap"
1292   
1293         ol_arg=invalid
1294         for ol_val in auto yes no ; do
1295                 if test "$enableval" = "$ol_val" ; then
1296                         ol_arg="$ol_val"
1297                 fi
1298         done
1299         if test "$ol_arg" = "invalid" ; then
1300                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1301         fi
1302         ol_enable_cldap="$ol_arg"
1303
1304 else
1305         ol_enable_cldap="no"
1306 fi
1307 # end --enable-cldap
1308 # OpenLDAP --enable-x_compile
1309         # Check whether --enable-x_compile or --disable-x_compile was given.
1310 if test "${enable_x_compile+set}" = set; then
1311   enableval="$enable_x_compile"
1312   
1313         ol_arg=invalid
1314         for ol_val in yes no ; do
1315                 if test "$enableval" = "$ol_val" ; then
1316                         ol_arg="$ol_val"
1317                 fi
1318         done
1319         if test "$ol_arg" = "invalid" ; then
1320                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1321         fi
1322         ol_enable_x_compile="$ol_arg"
1323
1324 else
1325         ol_enable_x_compile="no"
1326 fi
1327 # end --enable-x_compile
1328
1329 # OpenLDAP --enable-dmalloc
1330         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1331 if test "${enable_dmalloc+set}" = set; then
1332   enableval="$enable_dmalloc"
1333   
1334         ol_arg=invalid
1335         for ol_val in auto yes no ; do
1336                 if test "$enableval" = "$ol_val" ; then
1337                         ol_arg="$ol_val"
1338                 fi
1339         done
1340         if test "$ol_arg" = "invalid" ; then
1341                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1342         fi
1343         ol_enable_dmalloc="$ol_arg"
1344
1345 else
1346         ol_enable_dmalloc="no"
1347 fi
1348 # end --enable-dmalloc
1349
1350 # OpenLDAP --with-cyrus_sasl
1351         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1352 if test "${with_cyrus_sasl+set}" = set; then
1353   withval="$with_cyrus_sasl"
1354   
1355         ol_arg=invalid
1356         for ol_val in auto yes no  ; do
1357                 if test "$withval" = "$ol_val" ; then
1358                         ol_arg="$ol_val"
1359                 fi
1360         done
1361         if test "$ol_arg" = "invalid" ; then
1362                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1363         fi
1364         ol_with_cyrus_sasl="$ol_arg"
1365
1366 else
1367         ol_with_cyrus_sasl="auto"
1368 fi
1369 # end --with-cyrus_sasl
1370
1371 # OpenLDAP --with-fetch
1372         # Check whether --with-fetch or --without-fetch was given.
1373 if test "${with_fetch+set}" = set; then
1374   withval="$with_fetch"
1375   
1376         ol_arg=invalid
1377         for ol_val in auto yes no  ; do
1378                 if test "$withval" = "$ol_val" ; then
1379                         ol_arg="$ol_val"
1380                 fi
1381         done
1382         if test "$ol_arg" = "invalid" ; then
1383                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1384         fi
1385         ol_with_fetch="$ol_arg"
1386
1387 else
1388         ol_with_fetch="auto"
1389 fi
1390 # end --with-fetch
1391
1392 # OpenLDAP --with-kerberos
1393         # Check whether --with-kerberos or --without-kerberos was given.
1394 if test "${with_kerberos+set}" = set; then
1395   withval="$with_kerberos"
1396   
1397         ol_arg=invalid
1398         for ol_val in auto k5 kth k4 afs yes no ; do
1399                 if test "$withval" = "$ol_val" ; then
1400                         ol_arg="$ol_val"
1401                 fi
1402         done
1403         if test "$ol_arg" = "invalid" ; then
1404                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1405         fi
1406         ol_with_kerberos="$ol_arg"
1407
1408 else
1409         ol_with_kerberos="auto"
1410 fi
1411 # end --with-kerberos
1412
1413 # OpenLDAP --with-readline
1414         # Check whether --with-readline or --without-readline was given.
1415 if test "${with_readline+set}" = set; then
1416   withval="$with_readline"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no  ; do
1420                 if test "$withval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1426         fi
1427         ol_with_readline="$ol_arg"
1428
1429 else
1430         ol_with_readline="auto"
1431 fi
1432 # end --with-readline
1433
1434 # OpenLDAP --with-threads
1435         # Check whether --with-threads or --without-threads was given.
1436 if test "${with_threads+set}" = set; then
1437   withval="$with_threads"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1441                 if test "$withval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1447         fi
1448         ol_with_threads="$ol_arg"
1449
1450 else
1451         ol_with_threads="auto"
1452 fi
1453 # end --with-threads
1454
1455 # OpenLDAP --with-tls
1456         # Check whether --with-tls or --without-tls was given.
1457 if test "${with_tls+set}" = set; then
1458   withval="$with_tls"
1459   
1460         ol_arg=invalid
1461         for ol_val in auto ssleay openssl yes no  ; do
1462                 if test "$withval" = "$ol_val" ; then
1463                         ol_arg="$ol_val"
1464                 fi
1465         done
1466         if test "$ol_arg" = "invalid" ; then
1467                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1468         fi
1469         ol_with_tls="$ol_arg"
1470
1471 else
1472         ol_with_tls="auto"
1473 fi
1474 # end --with-tls
1475
1476 # OpenLDAP --with-yielding_select
1477         # Check whether --with-yielding_select or --without-yielding_select was given.
1478 if test "${with_yielding_select+set}" = set; then
1479   withval="$with_yielding_select"
1480   
1481         ol_arg=invalid
1482         for ol_val in auto yes no manual  ; do
1483                 if test "$withval" = "$ol_val" ; then
1484                         ol_arg="$ol_val"
1485                 fi
1486         done
1487         if test "$ol_arg" = "invalid" ; then
1488                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1489         fi
1490         ol_with_yielding_select="$ol_arg"
1491
1492 else
1493         ol_with_yielding_select="auto"
1494 fi
1495 # end --with-yielding_select
1496
1497
1498 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1499 if test "${with_xxldapdoptions+set}" = set; then
1500   withval="$with_xxldapdoptions"
1501   :
1502 fi
1503
1504 # OpenLDAP --enable-ldapd
1505         # Check whether --enable-ldapd or --disable-ldapd was given.
1506 if test "${enable_ldapd+set}" = set; then
1507   enableval="$enable_ldapd"
1508   
1509         ol_arg=invalid
1510         for ol_val in auto yes no ; do
1511                 if test "$enableval" = "$ol_val" ; then
1512                         ol_arg="$ol_val"
1513                 fi
1514         done
1515         if test "$ol_arg" = "invalid" ; then
1516                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1517         fi
1518         ol_enable_ldapd="$ol_arg"
1519
1520 else
1521         ol_enable_ldapd="no"
1522 fi
1523 # end --enable-ldapd
1524
1525 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1526 if test "${with_xxslapdoptions+set}" = set; then
1527   withval="$with_xxslapdoptions"
1528   :
1529 fi
1530
1531 # OpenLDAP --enable-slapd
1532         # Check whether --enable-slapd or --disable-slapd was given.
1533 if test "${enable_slapd+set}" = set; then
1534   enableval="$enable_slapd"
1535   
1536         ol_arg=invalid
1537         for ol_val in auto yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1544         fi
1545         ol_enable_slapd="$ol_arg"
1546
1547 else
1548         ol_enable_slapd="yes"
1549 fi
1550 # end --enable-slapd
1551 # OpenLDAP --enable-cleartext
1552         # Check whether --enable-cleartext or --disable-cleartext was given.
1553 if test "${enable_cleartext+set}" = set; then
1554   enableval="$enable_cleartext"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto yes no ; do
1558                 if test "$enableval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1564         fi
1565         ol_enable_cleartext="$ol_arg"
1566
1567 else
1568         ol_enable_cleartext="yes"
1569 fi
1570 # end --enable-cleartext
1571 # OpenLDAP --enable-crypt
1572         # Check whether --enable-crypt or --disable-crypt was given.
1573 if test "${enable_crypt+set}" = set; then
1574   enableval="$enable_crypt"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto yes no ; do
1578                 if test "$enableval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1584         fi
1585         ol_enable_crypt="$ol_arg"
1586
1587 else
1588         ol_enable_crypt="auto"
1589 fi
1590 # end --enable-crypt
1591 # OpenLDAP --enable-modules
1592         # Check whether --enable-modules or --disable-modules was given.
1593 if test "${enable_modules+set}" = set; then
1594   enableval="$enable_modules"
1595   
1596         ol_arg=invalid
1597         for ol_val in auto yes no ; do
1598                 if test "$enableval" = "$ol_val" ; then
1599                         ol_arg="$ol_val"
1600                 fi
1601         done
1602         if test "$ol_arg" = "invalid" ; then
1603                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1604         fi
1605         ol_enable_modules="$ol_arg"
1606
1607 else
1608         ol_enable_modules="no"
1609 fi
1610 # end --enable-modules
1611 # OpenLDAP --enable-multimaster
1612         # Check whether --enable-multimaster or --disable-multimaster was given.
1613 if test "${enable_multimaster+set}" = set; then
1614   enableval="$enable_multimaster"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto yes no ; do
1618                 if test "$enableval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1624         fi
1625         ol_enable_multimaster="$ol_arg"
1626
1627 else
1628         ol_enable_multimaster="no"
1629 fi
1630 # end --enable-multimaster
1631 # OpenLDAP --enable-phonetic
1632         # Check whether --enable-phonetic or --disable-phonetic was given.
1633 if test "${enable_phonetic+set}" = set; then
1634   enableval="$enable_phonetic"
1635   
1636         ol_arg=invalid
1637         for ol_val in auto yes no ; do
1638                 if test "$enableval" = "$ol_val" ; then
1639                         ol_arg="$ol_val"
1640                 fi
1641         done
1642         if test "$ol_arg" = "invalid" ; then
1643                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1644         fi
1645         ol_enable_phonetic="$ol_arg"
1646
1647 else
1648         ol_enable_phonetic="no"
1649 fi
1650 # end --enable-phonetic
1651 # OpenLDAP --enable-quipu
1652         # Check whether --enable-quipu or --disable-quipu was given.
1653 if test "${enable_quipu+set}" = set; then
1654   enableval="$enable_quipu"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1664         fi
1665         ol_enable_quipu="$ol_arg"
1666
1667 else
1668         ol_enable_quipu="no"
1669 fi
1670 # end --enable-quipu
1671 # OpenLDAP --enable-rlookups
1672         # Check whether --enable-rlookups or --disable-rlookups was given.
1673 if test "${enable_rlookups+set}" = set; then
1674   enableval="$enable_rlookups"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1684         fi
1685         ol_enable_rlookups="$ol_arg"
1686
1687 else
1688         ol_enable_rlookups="auto"
1689 fi
1690 # end --enable-rlookups
1691 # OpenLDAP --enable-aci
1692         # Check whether --enable-aci or --disable-aci was given.
1693 if test "${enable_aci+set}" = set; then
1694   enableval="$enable_aci"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1704         fi
1705         ol_enable_aci="$ol_arg"
1706
1707 else
1708         ol_enable_aci="no"
1709 fi
1710 # end --enable-aci
1711 # OpenLDAP --enable-discreteaci
1712         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1713 if test "${enable_discreteaci+set}" = set; then
1714   enableval="$enable_discreteaci"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1724         fi
1725         ol_enable_discreteaci="$ol_arg"
1726
1727 else
1728         ol_enable_discreteaci="no"
1729 fi
1730 # end --enable-discreteaci
1731 # OpenLDAP --enable-wrappers
1732         # Check whether --enable-wrappers or --disable-wrappers was given.
1733 if test "${enable_wrappers+set}" = set; then
1734   enableval="$enable_wrappers"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1744         fi
1745         ol_enable_wrappers="$ol_arg"
1746
1747 else
1748         ol_enable_wrappers="no"
1749 fi
1750 # end --enable-wrappers
1751 # OpenLDAP --enable-dynamic
1752         # Check whether --enable-dynamic or --disable-dynamic was given.
1753 if test "${enable_dynamic+set}" = set; then
1754   enableval="$enable_dynamic"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1764         fi
1765         ol_enable_dynamic="$ol_arg"
1766
1767 else
1768         ol_enable_dynamic="no"
1769 fi
1770 # end --enable-dynamic
1771
1772 # OpenLDAP --enable-bdb2
1773         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1774 if test "${enable_bdb2+set}" = set; then
1775   enableval="$enable_bdb2"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1785         fi
1786         ol_enable_bdb2="$ol_arg"
1787
1788 else
1789         ol_enable_bdb2="no"
1790 fi
1791 # end --enable-bdb2
1792 # OpenLDAP --with-bdb2_module
1793         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1794 if test "${with_bdb2_module+set}" = set; then
1795   withval="$with_bdb2_module"
1796   
1797         ol_arg=invalid
1798         for ol_val in static dynamic ; do
1799                 if test "$withval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1805         fi
1806         ol_with_bdb2_module="$ol_arg"
1807
1808 else
1809         ol_with_bdb2_module="static"
1810 fi
1811 # end --with-bdb2_module
1812
1813 # OpenLDAP --enable-ldap
1814         # Check whether --enable-ldap or --disable-ldap was given.
1815 if test "${enable_ldap+set}" = set; then
1816   enableval="$enable_ldap"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto yes no ; do
1820                 if test "$enableval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1826         fi
1827         ol_enable_ldap="$ol_arg"
1828
1829 else
1830         ol_enable_ldap="no"
1831 fi
1832 # end --enable-ldap
1833 # OpenLDAP --with-ldap_module
1834         # Check whether --with-ldap_module or --without-ldap_module was given.
1835 if test "${with_ldap_module+set}" = set; then
1836   withval="$with_ldap_module"
1837   
1838         ol_arg=invalid
1839         for ol_val in static dynamic ; do
1840                 if test "$withval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1846         fi
1847         ol_with_ldap_module="$ol_arg"
1848
1849 else
1850         ol_with_ldap_module="static"
1851 fi
1852 # end --with-ldap_module
1853
1854 # OpenLDAP --enable-ldbm
1855         # Check whether --enable-ldbm or --disable-ldbm was given.
1856 if test "${enable_ldbm+set}" = set; then
1857   enableval="$enable_ldbm"
1858   
1859         ol_arg=invalid
1860         for ol_val in auto yes no ; do
1861                 if test "$enableval" = "$ol_val" ; then
1862                         ol_arg="$ol_val"
1863                 fi
1864         done
1865         if test "$ol_arg" = "invalid" ; then
1866                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1867         fi
1868         ol_enable_ldbm="$ol_arg"
1869
1870 else
1871         ol_enable_ldbm="yes"
1872 fi
1873 # end --enable-ldbm
1874 # OpenLDAP --with-ldbm_api
1875         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1876 if test "${with_ldbm_api+set}" = set; then
1877   withval="$with_ldbm_api"
1878   
1879         ol_arg=invalid
1880         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1881                 if test "$withval" = "$ol_val" ; then
1882                         ol_arg="$ol_val"
1883                 fi
1884         done
1885         if test "$ol_arg" = "invalid" ; then
1886                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1887         fi
1888         ol_with_ldbm_api="$ol_arg"
1889
1890 else
1891         ol_with_ldbm_api="auto"
1892 fi
1893 # end --with-ldbm_api
1894
1895 # OpenLDAP --with-ldbm_module
1896         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1897 if test "${with_ldbm_module+set}" = set; then
1898   withval="$with_ldbm_module"
1899   
1900         ol_arg=invalid
1901         for ol_val in static dynamic ; do
1902                 if test "$withval" = "$ol_val" ; then
1903                         ol_arg="$ol_val"
1904                 fi
1905         done
1906         if test "$ol_arg" = "invalid" ; then
1907                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1908         fi
1909         ol_with_ldbm_module="$ol_arg"
1910
1911 else
1912         ol_with_ldbm_module="static"
1913 fi
1914 # end --with-ldbm_module
1915
1916 # OpenLDAP --with-ldbm_type
1917         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1918 if test "${with_ldbm_type+set}" = set; then
1919   withval="$with_ldbm_type"
1920   
1921         ol_arg=invalid
1922         for ol_val in auto btree hash ; do
1923                 if test "$withval" = "$ol_val" ; then
1924                         ol_arg="$ol_val"
1925                 fi
1926         done
1927         if test "$ol_arg" = "invalid" ; then
1928                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1929         fi
1930         ol_with_ldbm_type="$ol_arg"
1931
1932 else
1933         ol_with_ldbm_type="auto"
1934 fi
1935 # end --with-ldbm_type
1936
1937
1938 # OpenLDAP --enable-passwd
1939         # Check whether --enable-passwd or --disable-passwd was given.
1940 if test "${enable_passwd+set}" = set; then
1941   enableval="$enable_passwd"
1942   
1943         ol_arg=invalid
1944         for ol_val in auto yes no ; do
1945                 if test "$enableval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1951         fi
1952         ol_enable_passwd="$ol_arg"
1953
1954 else
1955         ol_enable_passwd="no"
1956 fi
1957 # end --enable-passwd
1958 # OpenLDAP --with-passwd_module
1959         # Check whether --with-passwd_module or --without-passwd_module was given.
1960 if test "${with_passwd_module+set}" = set; then
1961   withval="$with_passwd_module"
1962   
1963         ol_arg=invalid
1964         for ol_val in static dynamic ; do
1965                 if test "$withval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1971         fi
1972         ol_with_passwd_module="$ol_arg"
1973
1974 else
1975         ol_with_passwd_module="static"
1976 fi
1977 # end --with-passwd_module
1978
1979 # OpenLDAP --enable-perl
1980         # Check whether --enable-perl or --disable-perl was given.
1981 if test "${enable_perl+set}" = set; then
1982   enableval="$enable_perl"
1983   
1984         ol_arg=invalid
1985         for ol_val in auto yes no ; do
1986                 if test "$enableval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1992         fi
1993         ol_enable_perl="$ol_arg"
1994
1995 else
1996         ol_enable_perl="no"
1997 fi
1998 # end --enable-perl
1999 # OpenLDAP --with-perl_module
2000         # Check whether --with-perl_module or --without-perl_module was given.
2001 if test "${with_perl_module+set}" = set; then
2002   withval="$with_perl_module"
2003   
2004         ol_arg=invalid
2005         for ol_val in static dynamic ; do
2006                 if test "$withval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2012         fi
2013         ol_with_perl_module="$ol_arg"
2014
2015 else
2016         ol_with_perl_module="static"
2017 fi
2018 # end --with-perl_module
2019
2020 # OpenLDAP --enable-shell
2021         # Check whether --enable-shell or --disable-shell was given.
2022 if test "${enable_shell+set}" = set; then
2023   enableval="$enable_shell"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2033         fi
2034         ol_enable_shell="$ol_arg"
2035
2036 else
2037         ol_enable_shell="no"
2038 fi
2039 # end --enable-shell
2040 # OpenLDAP --with-shell_module
2041         # Check whether --with-shell_module or --without-shell_module was given.
2042 if test "${with_shell_module+set}" = set; then
2043   withval="$with_shell_module"
2044   
2045         ol_arg=invalid
2046         for ol_val in static dynamic ; do
2047                 if test "$withval" = "$ol_val" ; then
2048                         ol_arg="$ol_val"
2049                 fi
2050         done
2051         if test "$ol_arg" = "invalid" ; then
2052                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2053         fi
2054         ol_with_shell_module="$ol_arg"
2055
2056 else
2057         ol_with_shell_module="static"
2058 fi
2059 # end --with-shell_module
2060
2061 # OpenLDAP --enable-tcl
2062         # Check whether --enable-tcl or --disable-tcl was given.
2063 if test "${enable_tcl+set}" = set; then
2064   enableval="$enable_tcl"
2065   
2066         ol_arg=invalid
2067         for ol_val in auto yes no ; do
2068                 if test "$enableval" = "$ol_val" ; then
2069                         ol_arg="$ol_val"
2070                 fi
2071         done
2072         if test "$ol_arg" = "invalid" ; then
2073                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2074         fi
2075         ol_enable_tcl="$ol_arg"
2076
2077 else
2078         ol_enable_tcl="no"
2079 fi
2080 # end --enable-tcl
2081 # OpenLDAP --with-tcl_module
2082         # Check whether --with-tcl_module or --without-tcl_module was given.
2083 if test "${with_tcl_module+set}" = set; then
2084   withval="$with_tcl_module"
2085   
2086         ol_arg=invalid
2087         for ol_val in static dynamic ; do
2088                 if test "$withval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2094         fi
2095         ol_with_tcl_module="$ol_arg"
2096
2097 else
2098         ol_with_tcl_module="static"
2099 fi
2100 # end --with-tcl_module
2101
2102
2103 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2104 if test "${with_xxslurpdoptions+set}" = set; then
2105   withval="$with_xxslurpdoptions"
2106   :
2107 fi
2108
2109 # OpenLDAP --enable-slurpd
2110         # Check whether --enable-slurpd or --disable-slurpd was given.
2111 if test "${enable_slurpd+set}" = set; then
2112   enableval="$enable_slurpd"
2113   
2114         ol_arg=invalid
2115         for ol_val in auto yes no ; do
2116                 if test "$enableval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2122         fi
2123         ol_enable_slurpd="$ol_arg"
2124
2125 else
2126         ol_enable_slurpd="auto"
2127 fi
2128 # end --enable-slurpd
2129
2130 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2131 if test "${with_xxliboptions+set}" = set; then
2132   withval="$with_xxliboptions"
2133   :
2134 fi
2135
2136 # Check whether --enable-static or --disable-static was given.
2137 if test "${enable_static+set}" = set; then
2138   enableval="$enable_static"
2139   p=${PACKAGE-default}
2140 case "$enableval" in
2141 yes) enable_static=yes ;;
2142 no) enable_static=no ;;
2143 *)
2144   enable_static=no
2145   # Look at the argument we got.  We use all the common list separators.
2146   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2147   for pkg in $enableval; do
2148     if test "X$pkg" = "X$p"; then
2149       enable_static=yes
2150     fi
2151   done
2152   IFS="$ac_save_ifs"
2153   ;;
2154 esac
2155 else
2156   enable_static=yes
2157 fi
2158
2159 # Check whether --enable-shared or --disable-shared was given.
2160 if test "${enable_shared+set}" = set; then
2161   enableval="$enable_shared"
2162   p=${PACKAGE-default}
2163 case "$enableval" in
2164 yes) enable_shared=yes ;;
2165 no) enable_shared=no ;;
2166 *)
2167   enable_shared=no
2168   # Look at the argument we got.  We use all the common list separators.
2169   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2170   for pkg in $enableval; do
2171     if test "X$pkg" = "X$p"; then
2172       enable_shared=yes
2173     fi
2174   done
2175   IFS="$ac_save_ifs"
2176   ;;
2177 esac
2178 else
2179   enable_shared=yes
2180 fi
2181
2182
2183
2184 # validate options
2185 if test $ol_enable_dns = yes ; then
2186         if test $ol_enable_referrals = no ; then
2187                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2188         fi
2189         if test $ol_enable_referrals = auto ; then
2190                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2191                 ol_enable_referrals=yes
2192         fi
2193 fi
2194
2195 if test $ol_enable_slapd = no ; then
2196                 if test $ol_enable_bdb2 = yes ; then
2197                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2198         fi
2199         if test $ol_enable_ldap = yes ; then
2200                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2201         fi
2202         if test $ol_enable_ldbm = yes ; then
2203                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2204         fi
2205         if test $ol_enable_passwd = yes ; then
2206                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2207         fi
2208         if test $ol_enable_perl = yes ; then
2209                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2210         fi
2211         if test $ol_enable_shell = yes ; then
2212                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2213         fi
2214         if test $ol_enable_tcl = yes ; then
2215                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2216         fi
2217         if test $ol_enable_modules = yes ; then
2218                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2219         fi
2220         if test $ol_enable_multimaster = yes ; then
2221                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2222         fi
2223         if test $ol_enable_wrappers = yes ; then
2224                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2225         fi
2226         if test $ol_enable_phonetic = yes ; then
2227                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2228         fi
2229         if test $ol_enable_quipu = yes ; then
2230                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2231         fi
2232         if test $ol_enable_rlookups = yes ; then
2233                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2234         fi
2235         if test $ol_enable_aci = yes ; then
2236                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2237         fi
2238         if test $ol_enable_discreteaci = yes ; then
2239                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2240         fi
2241         if test $ol_with_ldbm_api != auto ; then
2242                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2243         fi
2244         if test $ol_with_ldbm_type != auto ; then
2245                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2246         fi
2247         if test $ol_with_bdb2_module != static ; then
2248                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2249         fi
2250         if test $ol_with_ldap_module != static ; then
2251                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2252         fi
2253         if test $ol_with_ldbm_module != static ; then
2254                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2255         fi
2256         if test $ol_with_passwd_module != static ; then
2257                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2258         fi
2259         if test $ol_with_perl_module != static ; then
2260                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2261         fi
2262         if test $ol_with_shell_module != static ; then
2263                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2264         fi
2265         if test $ol_with_tcl_module != static ; then
2266                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2267         fi
2268         if test $ol_enable_slurpd = yes ; then
2269                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2270         fi
2271
2272         # force settings to no
2273         ol_enable_bdb2=no
2274         ol_enable_ldap=no
2275         ol_enable_ldbm=no
2276         ol_enable_passwd=no
2277         ol_enable_perl=no
2278         ol_enable_shell=no
2279         ol_enable_tcl=no
2280
2281         ol_enable_modules=no
2282         ol_enable_multimaster=no
2283         ol_enable_phonetic=no
2284         ol_enable_quipu=no
2285         ol_enable_rlookups=no
2286         ol_enable_aci=no
2287         ol_enable_discreteaci=no
2288         ol_enable_wrappers=no
2289         ol_enable_dynamic=no
2290
2291         ol_with_ldbm_api=no
2292         ol_with_ldbm_type=no
2293
2294         ol_with_bdb2_module=static
2295         ol_with_ldap_module=static
2296         ol_with_ldbm_module=static
2297         ol_with_passwd_module=static
2298         ol_with_perl_module=static
2299         ol_with_shell_module=static
2300         ol_with_tcl_module=static
2301
2302         ol_enable_slurpd=no
2303
2304 elif test $ol_enable_ldbm = no ; then
2305         
2306         if test $ol_with_ldbm_api != auto ; then
2307                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2308         fi
2309
2310         if test $ol_with_ldbm_type != auto ; then
2311                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2312         fi
2313
2314         if test $ol_with_ldbm_module != static ; then
2315                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2316         fi
2317
2318         if test $ol_enable_bdb2 = yes ; then
2319                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2320         fi
2321
2322         if test $ol_enable_modules != yes -a \
2323                 $ol_enable_ldap = no -a \
2324                 $ol_enable_passwd = no -a \
2325                 $ol_enable_perl = no -a \
2326                 $ol_enable_shell = no -a \
2327                 $ol_enable_tcl = no ; then
2328                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2329         fi
2330
2331         ol_with_ldbm_api=no
2332         ol_with_ldbm_type=no
2333         ol_with_ldbm_module=static
2334
2335 elif test $ol_enable_bdb2 = yes ; then
2336         
2337         if test $ol_with_ldbm_api != auto -a \
2338                 $ol_with_ldbm_api != db2 ; then
2339                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2340         fi
2341
2342         ol_with_ldbm_api=db2
2343
2344 else
2345         
2346         if test $ol_enable_bdb2 != no ; then
2347                 if test $ol_with_ldbm_api != auto -a \
2348                         $ol_with_ldbm_api != db2 ; then
2349                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2350                         ol_enable_bdb2=no
2351                 fi
2352         fi
2353
2354         if test $ol_with_ldbm_api = gdbm -a \
2355                 $ol_with_ldbm_type = btree ; then
2356                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2357         fi
2358         if test $ol_with_ldbm_api = mdbm -a \
2359                 $ol_with_ldbm_type = btree ; then
2360                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2361         fi
2362         if test $ol_with_ldbm_api = ndbm -a \
2363                 $ol_with_ldbm_type = btree ; then
2364                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2365         fi
2366 fi
2367
2368 if test $ol_enable_slurpd = yes ; then
2369                 if test $ol_with_threads = no ; then
2370                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2371         fi
2372 fi
2373
2374 echo "$ac_t""done" 1>&6
2375
2376 LDAP_LIBS=
2377 LDIF_LIBS=
2378 LDBM_LIBS=
2379 LTHREAD_LIBS=
2380 LUTIL_LIBS=
2381
2382 LDAPD_LIBS=
2383 SLAPD_LIBS=
2384 SLURPD_LIBS=
2385
2386 BUILD_LDAPD=no
2387 BUILD_SLAPD=no
2388 BUILD_SLURPD=no
2389
2390 BUILD_BDB2=no
2391 BUILD_LDAP=no
2392 BUILD_LDBM=no
2393 BUILD_PASSWD=no
2394 BUILD_PERL=no
2395 BUILD_QUIPU=no
2396 BUILD_SHELL=no
2397 BUILD_TCL=no
2398 BUILD_THREAD=no
2399
2400 BUILD_BDB2_DYNAMIC=static
2401 BUILD_LDAP_DYNAMIC=static
2402 BUILD_LDBM_DYNAMIC=static
2403 BUILD_PASSWD_DYNAMIC=static
2404 BUILD_PERL_DYNAMIC=static
2405 BUILD_SHELL_DYNAMIC=static
2406 BUILD_TCL_DYNAMIC=static
2407
2408 SLAPD_MODULES_LDFLAGS=
2409 SLAPD_MODULES_CPPFLAGS=
2410 SLAPD_MODULES_LIST=
2411
2412 SLAPD_PERL_LDFLAGS=
2413 MOD_PERL_LDFLAGS=
2414 PERL_CPPFLAGS=
2415
2416 MOD_TCL_LIB=
2417 KRB_LIBS=
2418 READLINE_LIBS=
2419 SASL_LIBS=
2420 TERMCAP_LIBS=
2421 TLS_LIBS=
2422 MODULES_LIBS=
2423
2424
2425
2426 cat >> confdefs.h <<\EOF
2427 #define HAVE_MKVERSION 1
2428 EOF
2429
2430
2431
2432
2433 ol_aix_threads=no
2434 case "$target" in
2435 *-*-aix*)       if test -z "$CC" ; then
2436                 case "$ol_with_threads" in
2437                 auto | yes |  posix) ol_aix_threads=yes ;;
2438                 esac
2439         fi
2440 ;;
2441 esac
2442
2443 if test $ol_aix_threads = yes ; then
2444         if test -z "${CC}" ; then
2445                 for ac_prog in cc_r xlc_r cc
2446 do
2447 # Extract the first word of "$ac_prog", so it can be a program name with args.
2448 set dummy $ac_prog; ac_word=$2
2449 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2450 echo "configure:2451: checking for $ac_word" >&5
2451 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2452   echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454   if test -n "$CC"; then
2455   ac_cv_prog_CC="$CC" # Let the user override the test.
2456 else
2457   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2458   ac_dummy="$PATH"
2459   for ac_dir in $ac_dummy; do
2460     test -z "$ac_dir" && ac_dir=.
2461     if test -f $ac_dir/$ac_word; then
2462       ac_cv_prog_CC="$ac_prog"
2463       break
2464     fi
2465   done
2466   IFS="$ac_save_ifs"
2467 fi
2468 fi
2469 CC="$ac_cv_prog_CC"
2470 if test -n "$CC"; then
2471   echo "$ac_t""$CC" 1>&6
2472 else
2473   echo "$ac_t""no" 1>&6
2474 fi
2475
2476 test -n "$CC" && break
2477 done
2478
2479
2480                 if test "$CC" = cc ; then
2481                                                 if test $ol_with_threads != auto ; then
2482                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2483                         else
2484                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2485                         fi
2486                         ol_with_threads=no
2487                 fi
2488         fi
2489
2490         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2491                 ol_with_threads=posix
2492                 ol_cv_pthread_create=yes
2493         fi
2494 fi
2495
2496 if test -z "${CC}"; then
2497         for ac_prog in cc
2498 do
2499 # Extract the first word of "$ac_prog", so it can be a program name with args.
2500 set dummy $ac_prog; ac_word=$2
2501 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2502 echo "configure:2503: checking for $ac_word" >&5
2503 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2504   echo $ac_n "(cached) $ac_c" 1>&6
2505 else
2506   if test -n "$CC"; then
2507   ac_cv_prog_CC="$CC" # Let the user override the test.
2508 else
2509   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2510   ac_dummy="$PATH"
2511   for ac_dir in $ac_dummy; do
2512     test -z "$ac_dir" && ac_dir=.
2513     if test -f $ac_dir/$ac_word; then
2514       ac_cv_prog_CC="$ac_prog"
2515       break
2516     fi
2517   done
2518   IFS="$ac_save_ifs"
2519 fi
2520 fi
2521 CC="$ac_cv_prog_CC"
2522 if test -n "$CC"; then
2523   echo "$ac_t""$CC" 1>&6
2524 else
2525   echo "$ac_t""no" 1>&6
2526 fi
2527
2528 test -n "$CC" && break
2529 done
2530
2531 fi
2532
2533
2534
2535
2536 # Check whether --enable-fast-install or --disable-fast-install was given.
2537 if test "${enable_fast_install+set}" = set; then
2538   enableval="$enable_fast_install"
2539   p=${PACKAGE-default}
2540 case "$enableval" in
2541 yes) enable_fast_install=yes ;;
2542 no) enable_fast_install=no ;;
2543 *)
2544   enable_fast_install=no
2545   # Look at the argument we got.  We use all the common list separators.
2546   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2547   for pkg in $enableval; do
2548     if test "X$pkg" = "X$p"; then
2549       enable_fast_install=yes
2550     fi
2551   done
2552   IFS="$ac_save_ifs"
2553   ;;
2554 esac
2555 else
2556   enable_fast_install=yes
2557 fi
2558
2559 # Extract the first word of "ranlib", so it can be a program name with args.
2560 set dummy ranlib; ac_word=$2
2561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2562 echo "configure:2563: checking for $ac_word" >&5
2563 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2564   echo $ac_n "(cached) $ac_c" 1>&6
2565 else
2566   if test -n "$RANLIB"; then
2567   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2568 else
2569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2570   ac_dummy="$PATH"
2571   for ac_dir in $ac_dummy; do
2572     test -z "$ac_dir" && ac_dir=.
2573     if test -f $ac_dir/$ac_word; then
2574       ac_cv_prog_RANLIB="ranlib"
2575       break
2576     fi
2577   done
2578   IFS="$ac_save_ifs"
2579   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2580 fi
2581 fi
2582 RANLIB="$ac_cv_prog_RANLIB"
2583 if test -n "$RANLIB"; then
2584   echo "$ac_t""$RANLIB" 1>&6
2585 else
2586   echo "$ac_t""no" 1>&6
2587 fi
2588
2589 # Extract the first word of "gcc", so it can be a program name with args.
2590 set dummy gcc; ac_word=$2
2591 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2592 echo "configure:2593: checking for $ac_word" >&5
2593 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2594   echo $ac_n "(cached) $ac_c" 1>&6
2595 else
2596   if test -n "$CC"; then
2597   ac_cv_prog_CC="$CC" # Let the user override the test.
2598 else
2599   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2600   ac_dummy="$PATH"
2601   for ac_dir in $ac_dummy; do
2602     test -z "$ac_dir" && ac_dir=.
2603     if test -f $ac_dir/$ac_word; then
2604       ac_cv_prog_CC="gcc"
2605       break
2606     fi
2607   done
2608   IFS="$ac_save_ifs"
2609 fi
2610 fi
2611 CC="$ac_cv_prog_CC"
2612 if test -n "$CC"; then
2613   echo "$ac_t""$CC" 1>&6
2614 else
2615   echo "$ac_t""no" 1>&6
2616 fi
2617
2618 if test -z "$CC"; then
2619   # Extract the first word of "cc", so it can be a program name with args.
2620 set dummy cc; ac_word=$2
2621 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2622 echo "configure:2623: checking for $ac_word" >&5
2623 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2624   echo $ac_n "(cached) $ac_c" 1>&6
2625 else
2626   if test -n "$CC"; then
2627   ac_cv_prog_CC="$CC" # Let the user override the test.
2628 else
2629   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2630   ac_prog_rejected=no
2631   ac_dummy="$PATH"
2632   for ac_dir in $ac_dummy; do
2633     test -z "$ac_dir" && ac_dir=.
2634     if test -f $ac_dir/$ac_word; then
2635       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2636         ac_prog_rejected=yes
2637         continue
2638       fi
2639       ac_cv_prog_CC="cc"
2640       break
2641     fi
2642   done
2643   IFS="$ac_save_ifs"
2644 if test $ac_prog_rejected = yes; then
2645   # We found a bogon in the path, so make sure we never use it.
2646   set dummy $ac_cv_prog_CC
2647   shift
2648   if test $# -gt 0; then
2649     # We chose a different compiler from the bogus one.
2650     # However, it has the same basename, so the bogon will be chosen
2651     # first if we set CC to just the basename; use the full file name.
2652     shift
2653     set dummy "$ac_dir/$ac_word" "$@"
2654     shift
2655     ac_cv_prog_CC="$@"
2656   fi
2657 fi
2658 fi
2659 fi
2660 CC="$ac_cv_prog_CC"
2661 if test -n "$CC"; then
2662   echo "$ac_t""$CC" 1>&6
2663 else
2664   echo "$ac_t""no" 1>&6
2665 fi
2666
2667   if test -z "$CC"; then
2668     case "`uname -s`" in
2669     *win32* | *WIN32* | *CYGWIN*)
2670       # Extract the first word of "cl", so it can be a program name with args.
2671 set dummy cl; ac_word=$2
2672 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2673 echo "configure:2674: checking for $ac_word" >&5
2674 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2675   echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677   if test -n "$CC"; then
2678   ac_cv_prog_CC="$CC" # Let the user override the test.
2679 else
2680   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2681   ac_dummy="$PATH"
2682   for ac_dir in $ac_dummy; do
2683     test -z "$ac_dir" && ac_dir=.
2684     if test -f $ac_dir/$ac_word; then
2685       ac_cv_prog_CC="cl"
2686       break
2687     fi
2688   done
2689   IFS="$ac_save_ifs"
2690 fi
2691 fi
2692 CC="$ac_cv_prog_CC"
2693 if test -n "$CC"; then
2694   echo "$ac_t""$CC" 1>&6
2695 else
2696   echo "$ac_t""no" 1>&6
2697 fi
2698  ;;
2699     esac
2700   fi
2701   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2702 fi
2703
2704 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2705 echo "configure:2706: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2706
2707 ac_ext=c
2708 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2709 ac_cpp='$CPP $CPPFLAGS'
2710 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2711 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2712 cross_compiling=$ac_cv_prog_cc_cross
2713
2714 cat > conftest.$ac_ext << EOF
2715
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718
2719 main(){return(0);}
2720 EOF
2721 if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2722   ac_cv_prog_cc_works=yes
2723   # If we can't run a trivial program, we are probably using a cross compiler.
2724   if (./conftest; exit) 2>/dev/null; then
2725     ac_cv_prog_cc_cross=no
2726   else
2727     ac_cv_prog_cc_cross=yes
2728   fi
2729 else
2730   echo "configure: failed program was:" >&5
2731   cat conftest.$ac_ext >&5
2732   ac_cv_prog_cc_works=no
2733 fi
2734 rm -fr conftest*
2735 ac_ext=c
2736 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2737 ac_cpp='$CPP $CPPFLAGS'
2738 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2739 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2740 cross_compiling=$ac_cv_prog_cc_cross
2741
2742 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2743 if test $ac_cv_prog_cc_works = no; then
2744   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2745 fi
2746 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2747 echo "configure:2748: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2748 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2749 cross_compiling=$ac_cv_prog_cc_cross
2750
2751 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2752 echo "configure:2753: checking whether we are using GNU C" >&5
2753 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2754   echo $ac_n "(cached) $ac_c" 1>&6
2755 else
2756   cat > conftest.c <<EOF
2757 #ifdef __GNUC__
2758   yes;
2759 #endif
2760 EOF
2761 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2762   ac_cv_prog_gcc=yes
2763 else
2764   ac_cv_prog_gcc=no
2765 fi
2766 fi
2767
2768 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2769
2770 if test $ac_cv_prog_gcc = yes; then
2771   GCC=yes
2772 else
2773   GCC=
2774 fi
2775
2776 ac_test_CFLAGS="${CFLAGS+set}"
2777 ac_save_CFLAGS="$CFLAGS"
2778 CFLAGS=
2779 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2780 echo "configure:2781: checking whether ${CC-cc} accepts -g" >&5
2781 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2782   echo $ac_n "(cached) $ac_c" 1>&6
2783 else
2784   echo 'void f(){}' > conftest.c
2785 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2786   ac_cv_prog_cc_g=yes
2787 else
2788   ac_cv_prog_cc_g=no
2789 fi
2790 rm -f conftest*
2791
2792 fi
2793
2794 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2795 if test "$ac_test_CFLAGS" = set; then
2796   CFLAGS="$ac_save_CFLAGS"
2797 elif test $ac_cv_prog_cc_g = yes; then
2798   if test "$GCC" = yes; then
2799     CFLAGS="-g -O2"
2800   else
2801     CFLAGS="-g"
2802   fi
2803 else
2804   if test "$GCC" = yes; then
2805     CFLAGS="-O2"
2806   else
2807     CFLAGS=
2808   fi
2809 fi
2810
2811 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2812 if test "${with_gnu_ld+set}" = set; then
2813   withval="$with_gnu_ld"
2814   test "$withval" = no || with_gnu_ld=yes
2815 else
2816   with_gnu_ld=no
2817 fi
2818
2819 ac_prog=ld
2820 if test "$ac_cv_prog_gcc" = yes; then
2821   # Check if gcc -print-prog-name=ld gives a path.
2822   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2823 echo "configure:2824: checking for ld used by GCC" >&5
2824   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2825   case "$ac_prog" in
2826     # Accept absolute paths.
2827     [\\/]* | [A-Za-z]:[\\/]*)
2828       re_direlt='/[^/][^/]*/\.\./'
2829       # Canonicalize the path of ld
2830       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2831       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2832         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2833       done
2834       test -z "$LD" && LD="$ac_prog"
2835       ;;
2836   "")
2837     # If it fails, then pretend we aren't using GCC.
2838     ac_prog=ld
2839     ;;
2840   *)
2841     # If it is relative, then search for the first ld in PATH.
2842     with_gnu_ld=unknown
2843     ;;
2844   esac
2845 elif test "$with_gnu_ld" = yes; then
2846   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2847 echo "configure:2848: checking for GNU ld" >&5
2848 else
2849   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2850 echo "configure:2851: checking for non-GNU ld" >&5
2851 fi
2852 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2853   echo $ac_n "(cached) $ac_c" 1>&6
2854 else
2855   if test -z "$LD"; then
2856   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2857   for ac_dir in $PATH; do
2858     test -z "$ac_dir" && ac_dir=.
2859     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2860       ac_cv_path_LD="$ac_dir/$ac_prog"
2861       # Check to see if the program is GNU ld.  I'd rather use --version,
2862       # but apparently some GNU ld's only accept -v.
2863       # Break only if it was the GNU/non-GNU ld that we prefer.
2864       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2865         test "$with_gnu_ld" != no && break
2866       else
2867         test "$with_gnu_ld" != yes && break
2868       fi
2869     fi
2870   done
2871   IFS="$ac_save_ifs"
2872 else
2873   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2874 fi
2875 fi
2876
2877 LD="$ac_cv_path_LD"
2878 if test -n "$LD"; then
2879   echo "$ac_t""$LD" 1>&6
2880 else
2881   echo "$ac_t""no" 1>&6
2882 fi
2883 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2884
2885 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2886 echo "configure:2887: checking if the linker ($LD) is GNU ld" >&5
2887 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2888   echo $ac_n "(cached) $ac_c" 1>&6
2889 else
2890   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2891 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2892   ac_cv_prog_gnu_ld=yes
2893 else
2894   ac_cv_prog_gnu_ld=no
2895 fi
2896 fi
2897
2898 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2899
2900
2901 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2902 echo "configure:2903: checking for BSD-compatible nm" >&5
2903 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906   if test -n "$NM"; then
2907   # Let the user override the test.
2908   ac_cv_path_NM="$NM"
2909 else
2910   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2911   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2912     test -z "$ac_dir" && ac_dir=.
2913     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2914       # Check to see if the nm accepts a BSD-compat flag.
2915       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2916       #   nm: unknown option "B" ignored
2917       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2918         ac_cv_path_NM="$ac_dir/nm -B"
2919         break
2920       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2921         ac_cv_path_NM="$ac_dir/nm -p"
2922         break
2923       else
2924         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2925         continue # so that we can try to find one that supports BSD flags
2926       fi
2927     fi
2928   done
2929   IFS="$ac_save_ifs"
2930   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2931 fi
2932 fi
2933
2934 NM="$ac_cv_path_NM"
2935 echo "$ac_t""$NM" 1>&6
2936
2937
2938 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2939 echo "configure:2940: checking whether ln -s works" >&5
2940 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2941   echo $ac_n "(cached) $ac_c" 1>&6
2942 else
2943   rm -f conftestdata
2944 if ln -s X conftestdata 2>/dev/null
2945 then
2946   rm -f conftestdata
2947   ac_cv_prog_LN_S="ln -s"
2948 else
2949   ac_cv_prog_LN_S=ln
2950 fi
2951 fi
2952 LN_S="$ac_cv_prog_LN_S"
2953 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2954   echo "$ac_t""yes" 1>&6
2955 else
2956   echo "$ac_t""no" 1>&6
2957 fi
2958
2959 if test $host != $build; then
2960   ac_tool_prefix=${host_alias}-
2961 else
2962   ac_tool_prefix=
2963 fi
2964
2965
2966 # Check for any special flags to pass to ltconfig.
2967 libtool_flags="--cache-file=$cache_file"
2968 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2969 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2970 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2971 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2972 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2973 libtool_flags="$libtool_flags --enable-dlopen"
2974 libtool_flags="$libtool_flags --enable-win32-dll"
2975 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2976 if test "${enable_libtool_lock+set}" = set; then
2977   enableval="$enable_libtool_lock"
2978   :
2979 fi
2980
2981 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2982 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2983
2984 # Some flags need to be propagated to the compiler or linker for good
2985 # libtool support.
2986 case "$host" in
2987 *-*-irix6*)
2988   # Find out which ABI we are using.
2989   echo '#line 2990 "configure"' > conftest.$ac_ext
2990   if { (eval echo configure:2991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2991     case "`/usr/bin/file conftest.o`" in
2992     *32-bit*)
2993       LD="${LD-ld} -32"
2994       ;;
2995     *N32*)
2996       LD="${LD-ld} -n32"
2997       ;;
2998     *64-bit*)
2999       LD="${LD-ld} -64"
3000       ;;
3001     esac
3002   fi
3003   rm -rf conftest*
3004   ;;
3005
3006 *-*-sco3.2v5*)
3007   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3008   SAVE_CFLAGS="$CFLAGS"
3009   CFLAGS="$CFLAGS -belf"
3010   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3011 echo "configure:3012: checking whether the C compiler needs -belf" >&5
3012 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3013   echo $ac_n "(cached) $ac_c" 1>&6
3014 else
3015   cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018
3019 int main() {
3020
3021 ; return 0; }
3022 EOF
3023 if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3024   rm -rf conftest*
3025   lt_cv_cc_needs_belf=yes
3026 else
3027   echo "configure: failed program was:" >&5
3028   cat conftest.$ac_ext >&5
3029   rm -rf conftest*
3030   lt_cv_cc_needs_belf=no
3031 fi
3032 rm -f conftest*
3033 fi
3034
3035 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3036   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3037     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3038     CFLAGS="$SAVE_CFLAGS"
3039   fi
3040   ;;
3041
3042 *-*-cygwin* | *-*-mingw*)
3043   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3044 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3045 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3046 echo "configure:3047: checking for $ac_word" >&5
3047 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3048   echo $ac_n "(cached) $ac_c" 1>&6
3049 else
3050   if test -n "$DLLTOOL"; then
3051   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3052 else
3053   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3054   ac_dummy="$PATH"
3055   for ac_dir in $ac_dummy; do
3056     test -z "$ac_dir" && ac_dir=.
3057     if test -f $ac_dir/$ac_word; then
3058       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3059       break
3060     fi
3061   done
3062   IFS="$ac_save_ifs"
3063 fi
3064 fi
3065 DLLTOOL="$ac_cv_prog_DLLTOOL"
3066 if test -n "$DLLTOOL"; then
3067   echo "$ac_t""$DLLTOOL" 1>&6
3068 else
3069   echo "$ac_t""no" 1>&6
3070 fi
3071
3072
3073 if test -z "$ac_cv_prog_DLLTOOL"; then
3074 if test -n "$ac_tool_prefix"; then
3075   # Extract the first word of "dlltool", so it can be a program name with args.
3076 set dummy dlltool; ac_word=$2
3077 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3078 echo "configure:3079: checking for $ac_word" >&5
3079 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3080   echo $ac_n "(cached) $ac_c" 1>&6
3081 else
3082   if test -n "$DLLTOOL"; then
3083   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3084 else
3085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3086   ac_dummy="$PATH"
3087   for ac_dir in $ac_dummy; do
3088     test -z "$ac_dir" && ac_dir=.
3089     if test -f $ac_dir/$ac_word; then
3090       ac_cv_prog_DLLTOOL="dlltool"
3091       break
3092     fi
3093   done
3094   IFS="$ac_save_ifs"
3095   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3096 fi
3097 fi
3098 DLLTOOL="$ac_cv_prog_DLLTOOL"
3099 if test -n "$DLLTOOL"; then
3100   echo "$ac_t""$DLLTOOL" 1>&6
3101 else
3102   echo "$ac_t""no" 1>&6
3103 fi
3104
3105 else
3106   DLLTOOL="false"
3107 fi
3108 fi
3109
3110   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3111 set dummy ${ac_tool_prefix}as; ac_word=$2
3112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3113 echo "configure:3114: checking for $ac_word" >&5
3114 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117   if test -n "$AS"; then
3118   ac_cv_prog_AS="$AS" # Let the user override the test.
3119 else
3120   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3121   ac_dummy="$PATH"
3122   for ac_dir in $ac_dummy; do
3123     test -z "$ac_dir" && ac_dir=.
3124     if test -f $ac_dir/$ac_word; then
3125       ac_cv_prog_AS="${ac_tool_prefix}as"
3126       break
3127     fi
3128   done
3129   IFS="$ac_save_ifs"
3130 fi
3131 fi
3132 AS="$ac_cv_prog_AS"
3133 if test -n "$AS"; then
3134   echo "$ac_t""$AS" 1>&6
3135 else
3136   echo "$ac_t""no" 1>&6
3137 fi
3138
3139
3140 if test -z "$ac_cv_prog_AS"; then
3141 if test -n "$ac_tool_prefix"; then
3142   # Extract the first word of "as", so it can be a program name with args.
3143 set dummy as; ac_word=$2
3144 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3145 echo "configure:3146: checking for $ac_word" >&5
3146 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3147   echo $ac_n "(cached) $ac_c" 1>&6
3148 else
3149   if test -n "$AS"; then
3150   ac_cv_prog_AS="$AS" # Let the user override the test.
3151 else
3152   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3153   ac_dummy="$PATH"
3154   for ac_dir in $ac_dummy; do
3155     test -z "$ac_dir" && ac_dir=.
3156     if test -f $ac_dir/$ac_word; then
3157       ac_cv_prog_AS="as"
3158       break
3159     fi
3160   done
3161   IFS="$ac_save_ifs"
3162   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3163 fi
3164 fi
3165 AS="$ac_cv_prog_AS"
3166 if test -n "$AS"; then
3167   echo "$ac_t""$AS" 1>&6
3168 else
3169   echo "$ac_t""no" 1>&6
3170 fi
3171
3172 else
3173   AS="false"
3174 fi
3175 fi
3176
3177   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3178 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3179 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3180 echo "configure:3181: checking for $ac_word" >&5
3181 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3182   echo $ac_n "(cached) $ac_c" 1>&6
3183 else
3184   if test -n "$OBJDUMP"; then
3185   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3186 else
3187   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3188   ac_dummy="$PATH"
3189   for ac_dir in $ac_dummy; do
3190     test -z "$ac_dir" && ac_dir=.
3191     if test -f $ac_dir/$ac_word; then
3192       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3193       break
3194     fi
3195   done
3196   IFS="$ac_save_ifs"
3197 fi
3198 fi
3199 OBJDUMP="$ac_cv_prog_OBJDUMP"
3200 if test -n "$OBJDUMP"; then
3201   echo "$ac_t""$OBJDUMP" 1>&6
3202 else
3203   echo "$ac_t""no" 1>&6
3204 fi
3205
3206
3207 if test -z "$ac_cv_prog_OBJDUMP"; then
3208 if test -n "$ac_tool_prefix"; then
3209   # Extract the first word of "objdump", so it can be a program name with args.
3210 set dummy objdump; ac_word=$2
3211 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3212 echo "configure:3213: checking for $ac_word" >&5
3213 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   if test -n "$OBJDUMP"; then
3217   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3218 else
3219   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3220   ac_dummy="$PATH"
3221   for ac_dir in $ac_dummy; do
3222     test -z "$ac_dir" && ac_dir=.
3223     if test -f $ac_dir/$ac_word; then
3224       ac_cv_prog_OBJDUMP="objdump"
3225       break
3226     fi
3227   done
3228   IFS="$ac_save_ifs"
3229   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3230 fi
3231 fi
3232 OBJDUMP="$ac_cv_prog_OBJDUMP"
3233 if test -n "$OBJDUMP"; then
3234   echo "$ac_t""$OBJDUMP" 1>&6
3235 else
3236   echo "$ac_t""no" 1>&6
3237 fi
3238
3239 else
3240   OBJDUMP="false"
3241 fi
3242 fi
3243
3244   ;;
3245
3246 esac
3247
3248
3249 # Save cache, so that ltconfig can load it
3250
3251
3252 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3253 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3254 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3255 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3256 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3257 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3258 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3259 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3260
3261 # Reload cache, that may have been modified by ltconfig
3262
3263
3264 # This can be used to rebuild libtool when needed
3265 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3266
3267 # Always use our own libtool.
3268 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3269
3270 # Redirect the config.log output again, so that the ltconfig log is not
3271 # clobbered by the next message.
3272 exec 5>>./config.log
3273
3274
3275 for ac_prog in mawk gawk nawk awk
3276 do
3277 # Extract the first word of "$ac_prog", so it can be a program name with args.
3278 set dummy $ac_prog; ac_word=$2
3279 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3280 echo "configure:3281: checking for $ac_word" >&5
3281 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3282   echo $ac_n "(cached) $ac_c" 1>&6
3283 else
3284   if test -n "$AWK"; then
3285   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3286 else
3287   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3288   ac_dummy="$PATH"
3289   for ac_dir in $ac_dummy; do
3290     test -z "$ac_dir" && ac_dir=.
3291     if test -f $ac_dir/$ac_word; then
3292       ac_cv_prog_AWK="$ac_prog"
3293       break
3294     fi
3295   done
3296   IFS="$ac_save_ifs"
3297 fi
3298 fi
3299 AWK="$ac_cv_prog_AWK"
3300 if test -n "$AWK"; then
3301   echo "$ac_t""$AWK" 1>&6
3302 else
3303   echo "$ac_t""no" 1>&6
3304 fi
3305
3306 test -n "$AWK" && break
3307 done
3308
3309 # test for ln hardlink support
3310 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3311 echo "configure:3312: checking whether ln works" >&5
3312 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3313   echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315   rm -f conftest.src conftest.dst
3316 echo "conftest" > conftest.src
3317 if ln conftest.src conftest.dst 2>/dev/null
3318 then
3319   ol_cv_prog_LN_H="ln"
3320 else
3321   ol_cv_prog_LN_H="cp"
3322 fi
3323 rm -f conftest.src conftest.dst
3324
3325 fi
3326 LN_H="$ol_cv_prog_LN_H"
3327 if test "$ol_cv_prog_LN_H" = "ln"; then
3328         echo "$ac_t""yes" 1>&6
3329 else
3330         echo "$ac_t""no" 1>&6
3331 fi
3332
3333 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3334 echo "configure:3335: checking whether ln -s works" >&5
3335 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3336   echo $ac_n "(cached) $ac_c" 1>&6
3337 else
3338   rm -f conftestdata
3339 if ln -s X conftestdata 2>/dev/null
3340 then
3341   rm -f conftestdata
3342   ac_cv_prog_LN_S="ln -s"
3343 else
3344   ac_cv_prog_LN_S=ln
3345 fi
3346 fi
3347 LN_S="$ac_cv_prog_LN_S"
3348 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3349   echo "$ac_t""yes" 1>&6
3350 else
3351   echo "$ac_t""no" 1>&6
3352 fi
3353
3354
3355 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3356         LN_S="$LN_H"
3357 fi
3358
3359 # Extract the first word of "sendmail", so it can be a program name with args.
3360 set dummy sendmail; ac_word=$2
3361 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3362 echo "configure:3363: checking for $ac_word" >&5
3363 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3364   echo $ac_n "(cached) $ac_c" 1>&6
3365 else
3366   case "$SENDMAIL" in
3367   /*)
3368   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3369   ;;
3370   ?:/*)
3371   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3372   ;;
3373   *)
3374   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3375   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3376   for ac_dir in $ac_dummy; do 
3377     test -z "$ac_dir" && ac_dir=.
3378     if test -f $ac_dir/$ac_word; then
3379       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3380       break
3381     fi
3382   done
3383   IFS="$ac_save_ifs"
3384   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3385   ;;
3386 esac
3387 fi
3388 SENDMAIL="$ac_cv_path_SENDMAIL"
3389 if test -n "$SENDMAIL"; then
3390   echo "$ac_t""$SENDMAIL" 1>&6
3391 else
3392   echo "$ac_t""no" 1>&6
3393 fi
3394
3395 # Extract the first word of "vi", so it can be a program name with args.
3396 set dummy vi; ac_word=$2
3397 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3398 echo "configure:3399: checking for $ac_word" >&5
3399 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3400   echo $ac_n "(cached) $ac_c" 1>&6
3401 else
3402   case "$EDITOR" in
3403   /*)
3404   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3405   ;;
3406   ?:/*)
3407   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3408   ;;
3409   *)
3410   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3411   ac_dummy="$PATH:/usr/ucb"
3412   for ac_dir in $ac_dummy; do 
3413     test -z "$ac_dir" && ac_dir=.
3414     if test -f $ac_dir/$ac_word; then
3415       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3416       break
3417     fi
3418   done
3419   IFS="$ac_save_ifs"
3420   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3421   ;;
3422 esac
3423 fi
3424 EDITOR="$ac_cv_path_EDITOR"
3425 if test -n "$EDITOR"; then
3426   echo "$ac_t""$EDITOR" 1>&6
3427 else
3428   echo "$ac_t""no" 1>&6
3429 fi
3430
3431 # Extract the first word of "finger", so it can be a program name with args.
3432 set dummy finger; ac_word=$2
3433 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3434 echo "configure:3435: checking for $ac_word" >&5
3435 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   case "$FINGER" in
3439   /*)
3440   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3441   ;;
3442   ?:/*)
3443   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3444   ;;
3445   *)
3446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3447   ac_dummy="$PATH:/usr/ucb"
3448   for ac_dir in $ac_dummy; do 
3449     test -z "$ac_dir" && ac_dir=.
3450     if test -f $ac_dir/$ac_word; then
3451       ac_cv_path_FINGER="$ac_dir/$ac_word"
3452       break
3453     fi
3454   done
3455   IFS="$ac_save_ifs"
3456   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3457   ;;
3458 esac
3459 fi
3460 FINGER="$ac_cv_path_FINGER"
3461 if test -n "$FINGER"; then
3462   echo "$ac_t""$FINGER" 1>&6
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466
3467
3468 ol_link_perl=no
3469 if test $ol_enable_perl != no ; then
3470         # Extract the first word of "perl", so it can be a program name with args.
3471 set dummy perl; ac_word=$2
3472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3473 echo "configure:3474: checking for $ac_word" >&5
3474 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3475   echo $ac_n "(cached) $ac_c" 1>&6
3476 else
3477   case "$PERLBIN" in
3478   /*)
3479   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3480   ;;
3481   ?:/*)
3482   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3483   ;;
3484   *)
3485   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3486   ac_dummy="$PATH"
3487   for ac_dir in $ac_dummy; do 
3488     test -z "$ac_dir" && ac_dir=.
3489     if test -f $ac_dir/$ac_word; then
3490       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3491       break
3492     fi
3493   done
3494   IFS="$ac_save_ifs"
3495   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3496   ;;
3497 esac
3498 fi
3499 PERLBIN="$ac_cv_path_PERLBIN"
3500 if test -n "$PERLBIN"; then
3501   echo "$ac_t""$PERLBIN" 1>&6
3502 else
3503   echo "$ac_t""no" 1>&6
3504 fi
3505
3506
3507         if test "no$PERLBIN" = "no" ; then
3508                 if test $ol_enable_perl = yes ; then
3509                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3510                 fi
3511
3512         else
3513                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3514                 if test x"$ol_with_perl_module" = "xstatic" ; then
3515                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3516                 else
3517                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3518                 fi
3519                                 ol_link_perl=yes
3520         fi
3521 fi
3522
3523 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3524 echo "configure:3525: checking how to run the C preprocessor" >&5
3525 # On Suns, sometimes $CPP names a directory.
3526 if test -n "$CPP" && test -d "$CPP"; then
3527   CPP=
3528 fi
3529 if test -z "$CPP"; then
3530 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533     # This must be in double quotes, not single quotes, because CPP may get
3534   # substituted into the Makefile and "${CC-cc}" will confuse make.
3535   CPP="${CC-cc} -E"
3536   # On the NeXT, cc -E runs the code through the compiler's parser,
3537   # not just through cpp.
3538   cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 #include <assert.h>
3542 Syntax Error
3543 EOF
3544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3545 { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3547 if test -z "$ac_err"; then
3548   :
3549 else
3550   echo "$ac_err" >&5
3551   echo "configure: failed program was:" >&5
3552   cat conftest.$ac_ext >&5
3553   rm -rf conftest*
3554   CPP="${CC-cc} -E -traditional-cpp"
3555   cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 #include <assert.h>
3559 Syntax Error
3560 EOF
3561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3562 { (eval echo configure:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3564 if test -z "$ac_err"; then
3565   :
3566 else
3567   echo "$ac_err" >&5
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   CPP="${CC-cc} -nologo -E"
3572   cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3575 #include <assert.h>
3576 Syntax Error
3577 EOF
3578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3579 { (eval echo configure:3580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3581 if test -z "$ac_err"; then
3582   :
3583 else
3584   echo "$ac_err" >&5
3585   echo "configure: failed program was:" >&5
3586   cat conftest.$ac_ext >&5
3587   rm -rf conftest*
3588   CPP=/lib/cpp
3589 fi
3590 rm -f conftest*
3591 fi
3592 rm -f conftest*
3593 fi
3594 rm -f conftest*
3595   ac_cv_prog_CPP="$CPP"
3596 fi
3597   CPP="$ac_cv_prog_CPP"
3598 else
3599   ac_cv_prog_CPP="$CPP"
3600 fi
3601 echo "$ac_t""$CPP" 1>&6
3602
3603
3604 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3605         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3606
3607 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3608         echo "configure: warning: programs compiled here do run here..." 1>&2
3609         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3610
3611 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3612         echo "configure: warning: programs compiled here do not run here..." 1>&2
3613         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3614 fi
3615
3616 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3617 echo "configure:3618: checking for AIX" >&5
3618 cat > conftest.$ac_ext <<EOF
3619 #line 3620 "configure"
3620 #include "confdefs.h"
3621 #ifdef _AIX
3622   yes
3623 #endif
3624
3625 EOF
3626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3627   egrep "yes" >/dev/null 2>&1; then
3628   rm -rf conftest*
3629   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3630 #define _ALL_SOURCE 1
3631 EOF
3632
3633 else
3634   rm -rf conftest*
3635   echo "$ac_t""no" 1>&6
3636 fi
3637 rm -f conftest*
3638
3639
3640 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3641 echo "configure:3642: checking for POSIXized ISC" >&5
3642 if test -d /etc/conf/kconfig.d &&
3643   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3644 then
3645   echo "$ac_t""yes" 1>&6
3646   ISC=yes # If later tests want to check for ISC.
3647   cat >> confdefs.h <<\EOF
3648 #define _POSIX_SOURCE 1
3649 EOF
3650
3651   if test "$GCC" = yes; then
3652     CC="$CC -posix"
3653   else
3654     CC="$CC -Xp"
3655   fi
3656 else
3657   echo "$ac_t""no" 1>&6
3658   ISC=
3659 fi
3660
3661 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3662 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3663 echo "configure:3664: checking for minix/config.h" >&5
3664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3665   echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667   cat > conftest.$ac_ext <<EOF
3668 #line 3669 "configure"
3669 #include "confdefs.h"
3670 #include <minix/config.h>
3671 EOF
3672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3673 { (eval echo configure:3674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3675 if test -z "$ac_err"; then
3676   rm -rf conftest*
3677   eval "ac_cv_header_$ac_safe=yes"
3678 else
3679   echo "$ac_err" >&5
3680   echo "configure: failed program was:" >&5
3681   cat conftest.$ac_ext >&5
3682   rm -rf conftest*
3683   eval "ac_cv_header_$ac_safe=no"
3684 fi
3685 rm -f conftest*
3686 fi
3687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3688   echo "$ac_t""yes" 1>&6
3689   MINIX=yes
3690 else
3691   echo "$ac_t""no" 1>&6
3692 MINIX=
3693 fi
3694
3695 if test "$MINIX" = yes; then
3696   cat >> confdefs.h <<\EOF
3697 #define _POSIX_SOURCE 1
3698 EOF
3699
3700   cat >> confdefs.h <<\EOF
3701 #define _POSIX_1_SOURCE 2
3702 EOF
3703
3704   cat >> confdefs.h <<\EOF
3705 #define _MINIX 1
3706 EOF
3707
3708 fi
3709
3710
3711 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3712 echo "configure:3713: checking for Cygwin environment" >&5
3713 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3714   echo $ac_n "(cached) $ac_c" 1>&6
3715 else
3716   cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719
3720 int main() {
3721
3722 #ifndef __CYGWIN__
3723 #define __CYGWIN__ __CYGWIN32__
3724 #endif
3725 return __CYGWIN__;
3726 ; return 0; }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3729   rm -rf conftest*
3730   ac_cv_cygwin=yes
3731 else
3732   echo "configure: failed program was:" >&5
3733   cat conftest.$ac_ext >&5
3734   rm -rf conftest*
3735   ac_cv_cygwin=no
3736 fi
3737 rm -f conftest*
3738 fi
3739
3740 echo "$ac_t""$ac_cv_cygwin" 1>&6
3741 CYGWIN=
3742 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3743 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3744 echo "configure:3745: checking for mingw32 environment" >&5
3745 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3746   echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748   cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751
3752 int main() {
3753 return __MINGW32__;
3754 ; return 0; }
3755 EOF
3756 if { (eval echo configure:3757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3757   rm -rf conftest*
3758   ac_cv_mingw32=yes
3759 else
3760   echo "configure: failed program was:" >&5
3761   cat conftest.$ac_ext >&5
3762   rm -rf conftest*
3763   ac_cv_mingw32=no
3764 fi
3765 rm -f conftest*
3766 fi
3767
3768 echo "$ac_t""$ac_cv_mingw32" 1>&6
3769 MINGW32=
3770 test "$ac_cv_mingw32" = yes && MINGW32=yes
3771 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3772 echo "configure:3773: checking for EMX OS/2 environment" >&5
3773 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3774   echo $ac_n "(cached) $ac_c" 1>&6
3775 else
3776   cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779
3780 int main() {
3781 return __EMX__;
3782 ; return 0; }
3783 EOF
3784 if { (eval echo configure:3785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3785   rm -rf conftest*
3786   ac_cv_emxos2=yes
3787 else
3788   echo "configure: failed program was:" >&5
3789   cat conftest.$ac_ext >&5
3790   rm -rf conftest*
3791   ac_cv_emxos2=no
3792 fi
3793 rm -f conftest*
3794 fi
3795
3796 echo "$ac_t""$ac_cv_emxos2" 1>&6
3797 EMXOS2=
3798 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3799
3800
3801
3802 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3803 echo "configure:3804: checking for executable suffix" >&5
3804 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3805   echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3808   ac_cv_exeext=.exe
3809 else
3810   rm -f conftest*
3811   echo 'int main () { return 0; }' > conftest.$ac_ext
3812   ac_cv_exeext=
3813   if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3814     for file in conftest.*; do
3815       case $file in
3816       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3817       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3818       esac
3819     done
3820   else
3821     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3822   fi
3823   rm -f conftest*
3824   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3825 fi
3826 fi
3827
3828 EXEEXT=""
3829 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3830 echo "$ac_t""${ac_cv_exeext}" 1>&6
3831 ac_exeext=$EXEEXT
3832
3833 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3834 echo "configure:3835: checking for object suffix" >&5
3835 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3836   echo $ac_n "(cached) $ac_c" 1>&6
3837 else
3838   rm -f conftest*
3839 echo 'int i = 1;' > conftest.$ac_ext
3840 if { (eval echo configure:3841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3841   for ac_file in conftest.*; do
3842     case $ac_file in
3843     *.c) ;;
3844     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3845     esac
3846   done
3847 else
3848   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3849 fi
3850 rm -f conftest*
3851 fi
3852
3853 echo "$ac_t""$ac_cv_objext" 1>&6
3854 OBJEXT=$ac_cv_objext
3855 ac_objext=$ac_cv_objext
3856
3857
3858 cat >> confdefs.h <<EOF
3859 #define EXEEXT "${EXEEXT}"
3860 EOF
3861
3862
3863 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3864 echo "configure:3865: checking for be_app in -lbe" >&5
3865 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   ac_save_LIBS="$LIBS"
3870 LIBS="-lbe -lroot -lnet $LIBS"
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 /* Override any gcc2 internal prototype to avoid an error.  */
3875 /* We use char because int might match the return type of a gcc2
3876     builtin and then its argument prototype would still apply.  */
3877 char be_app();
3878
3879 int main() {
3880 be_app()
3881 ; return 0; }
3882 EOF
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3884   rm -rf conftest*
3885   eval "ac_cv_lib_$ac_lib_var=yes"
3886 else
3887   echo "configure: failed program was:" >&5
3888   cat conftest.$ac_ext >&5
3889   rm -rf conftest*
3890   eval "ac_cv_lib_$ac_lib_var=no"
3891 fi
3892 rm -f conftest*
3893 LIBS="$ac_save_LIBS"
3894
3895 fi
3896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3897   echo "$ac_t""yes" 1>&6
3898   LIBS="$LIBS -lbe -lroot -lnet"
3899 else
3900   echo "$ac_t""no" 1>&6
3901 :
3902 fi
3903
3904
3905
3906
3907
3908 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3909 echo "configure:3910: checking for ${CC-cc} option to accept ANSI C" >&5
3910 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   am_cv_prog_cc_stdc=no
3914 ac_save_CC="$CC"
3915 # Don't try gcc -ansi; that turns off useful extensions and
3916 # breaks some systems' header files.
3917 # AIX                   -qlanglvl=ansi
3918 # Ultrix and OSF/1      -std1
3919 # HP-UX 10.20 and later -Ae
3920 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3921 # SVR4                  -Xc -D__EXTENSIONS__
3922 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3923 do
3924   CC="$ac_save_CC $ac_arg"
3925   cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928 #include <stdarg.h>
3929 #include <stdio.h>
3930 #include <sys/types.h>
3931 #include <sys/stat.h>
3932 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3933 struct buf { int x; };
3934 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3935 static char *e (p, i)
3936      char **p;
3937      int i;
3938 {
3939   return p[i];
3940 }
3941 static char *f (char * (*g) (char **, int), char **p, ...)
3942 {
3943   char *s;
3944   va_list v;
3945   va_start (v,p);
3946   s = g (p, va_arg (v,int));
3947   va_end (v);
3948   return s;
3949 }
3950 int test (int i, double x);
3951 struct s1 {int (*f) (int a);};
3952 struct s2 {int (*f) (double a);};
3953 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3954 int argc;
3955 char **argv;
3956
3957 int main() {
3958
3959 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3960
3961 ; return 0; }
3962 EOF
3963 if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3964   rm -rf conftest*
3965   am_cv_prog_cc_stdc="$ac_arg"; break
3966 else
3967   echo "configure: failed program was:" >&5
3968   cat conftest.$ac_ext >&5
3969 fi
3970 rm -f conftest*
3971 done
3972 CC="$ac_save_CC"
3973
3974 fi
3975
3976 if test -z "$am_cv_prog_cc_stdc"; then
3977   echo "$ac_t""none needed" 1>&6
3978 else
3979   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3980 fi
3981 case "x$am_cv_prog_cc_stdc" in
3982   x|xno) ;;
3983   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3984 esac
3985
3986 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3987         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3988 fi
3989
3990 # test for make depend flag
3991 OL_MKDEP=
3992 OL_MKDEP_FLAGS=
3993 if test -z "${MKDEP}"; then
3994         OL_MKDEP="${CC-cc}"
3995         if test -z "${MKDEP_FLAGS}"; then
3996                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3997 echo "configure:3998: checking for ${OL_MKDEP} depend flag" >&5
3998 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3999   echo $ac_n "(cached) $ac_c" 1>&6
4000 else
4001   
4002                         ol_cv_mkdep=no
4003                         for flag in "-M" "-xM"; do
4004                                 cat > conftest.c <<EOF
4005  noCode;
4006 EOF
4007                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4008                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4009                                 then
4010                                         if test ! -f conftest."${ac_object}" ; then
4011                                                 ol_cv_mkdep=$flag
4012                                                 OL_MKDEP_FLAGS="$flag"
4013                                                 break
4014                                         fi
4015                                 fi
4016                         done
4017                         rm -f conftest*
4018                 
4019 fi
4020
4021 echo "$ac_t""$ol_cv_mkdep" 1>&6
4022         else
4023                 cc_cv_mkdep=yes
4024                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4025         fi
4026 else
4027         cc_cv_mkdep=yes
4028         OL_MKDEP="${MKDEP}"
4029         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4030 fi
4031
4032
4033
4034 if test "${ol_cv_mkdep}" = no ; then
4035         # this will soon become an error
4036         echo "configure: warning: do not know how to generate dependencies" 1>&2
4037 fi
4038
4039 ol_link_modules=no
4040 if test $ol_enable_modules != no ; then
4041         for ac_hdr in ltdl.h
4042 do
4043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4045 echo "configure:4046: checking for $ac_hdr" >&5
4046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4047   echo $ac_n "(cached) $ac_c" 1>&6
4048 else
4049   cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 #include <$ac_hdr>
4053 EOF
4054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4055 { (eval echo configure:4056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4057 if test -z "$ac_err"; then
4058   rm -rf conftest*
4059   eval "ac_cv_header_$ac_safe=yes"
4060 else
4061   echo "$ac_err" >&5
4062   echo "configure: failed program was:" >&5
4063   cat conftest.$ac_ext >&5
4064   rm -rf conftest*
4065   eval "ac_cv_header_$ac_safe=no"
4066 fi
4067 rm -f conftest*
4068 fi
4069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4070   echo "$ac_t""yes" 1>&6
4071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4072   cat >> confdefs.h <<EOF
4073 #define $ac_tr_hdr 1
4074 EOF
4075  
4076 else
4077   echo "$ac_t""no" 1>&6
4078 fi
4079 done
4080
4081
4082         if test $ac_cv_header_ltdl_h = no ; then
4083                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4084         fi
4085
4086         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4087 echo "configure:4088: checking for lt_dlinit in -lltdl" >&5
4088 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4090   echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092   ac_save_LIBS="$LIBS"
4093 LIBS="-lltdl  $LIBS"
4094 cat > conftest.$ac_ext <<EOF
4095 #line 4096 "configure"
4096 #include "confdefs.h"
4097 /* Override any gcc2 internal prototype to avoid an error.  */
4098 /* We use char because int might match the return type of a gcc2
4099     builtin and then its argument prototype would still apply.  */
4100 char lt_dlinit();
4101
4102 int main() {
4103 lt_dlinit()
4104 ; return 0; }
4105 EOF
4106 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4107   rm -rf conftest*
4108   eval "ac_cv_lib_$ac_lib_var=yes"
4109 else
4110   echo "configure: failed program was:" >&5
4111   cat conftest.$ac_ext >&5
4112   rm -rf conftest*
4113   eval "ac_cv_lib_$ac_lib_var=no"
4114 fi
4115 rm -f conftest*
4116 LIBS="$ac_save_LIBS"
4117
4118 fi
4119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4120   echo "$ac_t""yes" 1>&6
4121   
4122             MODULES_LIBS=-lltdl
4123             cat >> confdefs.h <<\EOF
4124 #define HAVE_LIBLTDL 1
4125 EOF
4126
4127         
4128 else
4129   echo "$ac_t""no" 1>&6
4130 fi
4131
4132
4133         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4134                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4135         fi
4136         ol_link_modules=yes
4137 else
4138         ol_with_bdb2_module=static
4139         ol_with_ldap_module=static
4140         ol_with_ldbm_module=static
4141         ol_with_passwd_module=static
4142         ol_with_perl_module=static
4143         ol_with_shell_module=static
4144         ol_with_tcl_module=static
4145 fi
4146
4147 # test for EBCDIC
4148 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4149 echo "configure:4150: checking for EBCDIC" >&5
4150 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4151   echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153   
4154         cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157
4158 #if !('M' == 0xd4)
4159 #include <__ASCII__/generate_error.h>
4160 #endif
4161
4162 EOF
4163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4164 { (eval echo configure:4165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4166 if test -z "$ac_err"; then
4167   rm -rf conftest*
4168   ol_cv_cpp_ebcdic=yes
4169 else
4170   echo "$ac_err" >&5
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   ol_cv_cpp_ebcdic=no
4175 fi
4176 rm -f conftest*
4177 fi
4178
4179 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4180 if test $ol_cv_cpp_ebcdic = yes ; then
4181         cat >> confdefs.h <<\EOF
4182 #define HAVE_EBCDIC 1
4183 EOF
4184
4185 fi
4186
4187 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4188 echo "configure:4189: checking for ANSI C header files" >&5
4189 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4190   echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192   cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 #include <stdlib.h>
4196 #include <stdarg.h>
4197 #include <string.h>
4198 #include <float.h>
4199 EOF
4200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4201 { (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4203 if test -z "$ac_err"; then
4204   rm -rf conftest*
4205   ol_cv_header_stdc=yes
4206 else
4207   echo "$ac_err" >&5
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   ol_cv_header_stdc=no
4212 fi
4213 rm -f conftest*
4214
4215 if test $ol_cv_header_stdc = yes; then
4216   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4217 cat > conftest.$ac_ext <<EOF
4218 #line 4219 "configure"
4219 #include "confdefs.h"
4220 #include <string.h>
4221 EOF
4222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4223   egrep "memchr" >/dev/null 2>&1; then
4224   :
4225 else
4226   rm -rf conftest*
4227   ol_cv_header_stdc=no
4228 fi
4229 rm -f conftest*
4230
4231 fi
4232
4233 if test $ol_cv_header_stdc = yes; then
4234   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4235 cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include <stdlib.h>
4239 EOF
4240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4241   egrep "free" >/dev/null 2>&1; then
4242   :
4243 else
4244   rm -rf conftest*
4245   ol_cv_header_stdc=no
4246 fi
4247 rm -f conftest*
4248
4249 fi
4250
4251 if test $ol_cv_header_stdc = yes; then
4252   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4253 if test "$cross_compiling" = yes; then
4254   :
4255 else
4256   cat > conftest.$ac_ext <<EOF
4257 #line 4258 "configure"
4258 #include "confdefs.h"
4259 #include <ctype.h>
4260 #ifndef HAVE_EBCDIC
4261 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4262 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4263 #else
4264 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4265                 || ('j' <= (c) && (c) <= 'r') \
4266                 || ('s' <= (c) && (c) <= 'z'))
4267 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4268 #endif
4269 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4270 int main () { int i; for (i = 0; i < 256; i++)
4271 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4272 exit (0); }
4273
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4276 then
4277   :
4278 else
4279   echo "configure: failed program was:" >&5
4280   cat conftest.$ac_ext >&5
4281   rm -fr conftest*
4282   ol_cv_header_stdc=no
4283 fi
4284 rm -fr conftest*
4285 fi
4286
4287 fi
4288 fi
4289
4290 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4291 if test $ol_cv_header_stdc = yes; then
4292   cat >> confdefs.h <<\EOF
4293 #define STDC_HEADERS 1
4294 EOF
4295
4296 fi
4297 ac_cv_header_stdc=disable
4298
4299
4300 if test $ol_cv_header_stdc != yes; then
4301         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4302 fi
4303
4304 ac_header_dirent=no
4305 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4306 do
4307 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4308 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4309 echo "configure:4310: checking for $ac_hdr that defines DIR" >&5
4310 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4311   echo $ac_n "(cached) $ac_c" 1>&6
4312 else
4313   cat > conftest.$ac_ext <<EOF
4314 #line 4315 "configure"
4315 #include "confdefs.h"
4316 #include <sys/types.h>
4317 #include <$ac_hdr>
4318 int main() {
4319 DIR *dirp = 0;
4320 ; return 0; }
4321 EOF
4322 if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4323   rm -rf conftest*
4324   eval "ac_cv_header_dirent_$ac_safe=yes"
4325 else
4326   echo "configure: failed program was:" >&5
4327   cat conftest.$ac_ext >&5
4328   rm -rf conftest*
4329   eval "ac_cv_header_dirent_$ac_safe=no"
4330 fi
4331 rm -f conftest*
4332 fi
4333 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4334   echo "$ac_t""yes" 1>&6
4335     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4336   cat >> confdefs.h <<EOF
4337 #define $ac_tr_hdr 1
4338 EOF
4339  ac_header_dirent=$ac_hdr; break
4340 else
4341   echo "$ac_t""no" 1>&6
4342 fi
4343 done
4344 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4345 if test $ac_header_dirent = dirent.h; then
4346 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4347 echo "configure:4348: checking for opendir in -ldir" >&5
4348 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4349 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4350   echo $ac_n "(cached) $ac_c" 1>&6
4351 else
4352   ac_save_LIBS="$LIBS"
4353 LIBS="-ldir  $LIBS"
4354 cat > conftest.$ac_ext <<EOF
4355 #line 4356 "configure"
4356 #include "confdefs.h"
4357 /* Override any gcc2 internal prototype to avoid an error.  */
4358 /* We use char because int might match the return type of a gcc2
4359     builtin and then its argument prototype would still apply.  */
4360 char opendir();
4361
4362 int main() {
4363 opendir()
4364 ; return 0; }
4365 EOF
4366 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4367   rm -rf conftest*
4368   eval "ac_cv_lib_$ac_lib_var=yes"
4369 else
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -rf conftest*
4373   eval "ac_cv_lib_$ac_lib_var=no"
4374 fi
4375 rm -f conftest*
4376 LIBS="$ac_save_LIBS"
4377
4378 fi
4379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4380   echo "$ac_t""yes" 1>&6
4381   LIBS="$LIBS -ldir"
4382 else
4383   echo "$ac_t""no" 1>&6
4384 fi
4385
4386 else
4387 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4388 echo "configure:4389: checking for opendir in -lx" >&5
4389 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4391   echo $ac_n "(cached) $ac_c" 1>&6
4392 else
4393   ac_save_LIBS="$LIBS"
4394 LIBS="-lx  $LIBS"
4395 cat > conftest.$ac_ext <<EOF
4396 #line 4397 "configure"
4397 #include "confdefs.h"
4398 /* Override any gcc2 internal prototype to avoid an error.  */
4399 /* We use char because int might match the return type of a gcc2
4400     builtin and then its argument prototype would still apply.  */
4401 char opendir();
4402
4403 int main() {
4404 opendir()
4405 ; return 0; }
4406 EOF
4407 if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4408   rm -rf conftest*
4409   eval "ac_cv_lib_$ac_lib_var=yes"
4410 else
4411   echo "configure: failed program was:" >&5
4412   cat conftest.$ac_ext >&5
4413   rm -rf conftest*
4414   eval "ac_cv_lib_$ac_lib_var=no"
4415 fi
4416 rm -f conftest*
4417 LIBS="$ac_save_LIBS"
4418
4419 fi
4420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4421   echo "$ac_t""yes" 1>&6
4422   LIBS="$LIBS -lx"
4423 else
4424   echo "$ac_t""no" 1>&6
4425 fi
4426
4427 fi
4428
4429 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4430 echo "configure:4431: checking for sys/wait.h that is POSIX.1 compatible" >&5
4431 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4432   echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4434   cat > conftest.$ac_ext <<EOF
4435 #line 4436 "configure"
4436 #include "confdefs.h"
4437 #include <sys/types.h>
4438 #include <sys/wait.h>
4439 #ifndef WEXITSTATUS
4440 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4441 #endif
4442 #ifndef WIFEXITED
4443 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4444 #endif
4445 int main() {
4446 int s;
4447 wait (&s);
4448 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4449 ; return 0; }
4450 EOF
4451 if { (eval echo configure:4452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4452   rm -rf conftest*
4453   ac_cv_header_sys_wait_h=yes
4454 else
4455   echo "configure: failed program was:" >&5
4456   cat conftest.$ac_ext >&5
4457   rm -rf conftest*
4458   ac_cv_header_sys_wait_h=no
4459 fi
4460 rm -f conftest*
4461 fi
4462
4463 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4464 if test $ac_cv_header_sys_wait_h = yes; then
4465   cat >> confdefs.h <<\EOF
4466 #define HAVE_SYS_WAIT_H 1
4467 EOF
4468
4469 fi
4470
4471 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4472 echo "configure:4473: checking POSIX termios" >&5
4473 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4474   echo $ac_n "(cached) $ac_c" 1>&6
4475 else
4476   cat > conftest.$ac_ext <<EOF
4477 #line 4478 "configure"
4478 #include "confdefs.h"
4479 #include <sys/types.h>
4480 #include <unistd.h>
4481 #include <termios.h>
4482 int main() {
4483 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4484    tcgetattr(0, 0);
4485 ; return 0; }
4486 EOF
4487 if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4488   rm -rf conftest*
4489   am_cv_sys_posix_termios=yes
4490 else
4491   echo "configure: failed program was:" >&5
4492   cat conftest.$ac_ext >&5
4493   rm -rf conftest*
4494   am_cv_sys_posix_termios=no
4495 fi
4496 rm -f conftest*
4497 fi
4498
4499 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4500
4501
4502  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4503 echo "configure:4504: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4504 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4505   echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4507   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4508
4509   gwinsz_in_termios_h=no
4510   if test $am_cv_sys_posix_termios = yes; then
4511     cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 #include <sys/types.h>
4515 #     include <termios.h>
4516 #     ifdef TIOCGWINSZ
4517         yes
4518 #     endif
4519     
4520 EOF
4521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4522   egrep "yes" >/dev/null 2>&1; then
4523   rm -rf conftest*
4524   gwinsz_in_termios_h=yes
4525 fi
4526 rm -f conftest*
4527
4528   fi
4529
4530   if test $gwinsz_in_termios_h = no; then
4531     cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534 #include <sys/types.h>
4535 #     include <sys/ioctl.h>
4536 #     ifdef TIOCGWINSZ
4537         yes
4538 #     endif
4539     
4540 EOF
4541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4542   egrep "yes" >/dev/null 2>&1; then
4543   rm -rf conftest*
4544   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4545 fi
4546 rm -f conftest*
4547
4548   fi
4549   
4550 fi
4551
4552 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4553   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4554     cat >> confdefs.h <<\EOF
4555 #define GWINSZ_IN_SYS_IOCTL 1
4556 EOF
4557
4558   fi
4559
4560 if test $am_cv_sys_posix_termios = yes ; then
4561         cat >> confdefs.h <<\EOF
4562 #define HAVE_POSIX_TERMIOS 1
4563 EOF
4564
4565 fi
4566
4567 for ac_hdr in \
4568         arpa/inet.h             \
4569         arpa/nameser.h  \
4570         assert.h                \
4571         conio.h                 \
4572         crypt.h                 \
4573         direct.h                \
4574         errno.h                 \
4575         fcntl.h                 \
4576         filio.h                 \
4577         getopt.h                \
4578         grp.h                   \
4579         io.h                    \
4580         libutil.h               \
4581         limits.h                \
4582         locale.h                \
4583         netinet/tcp.h   \
4584         malloc.h                \
4585         memory.h                \
4586         psap.h                  \
4587         pwd.h                   \
4588         process.h               \
4589         resolv.h                \
4590         sgtty.h                 \
4591         shadow.h                \
4592         stddef.h                \
4593         string.h                \
4594         strings.h               \
4595         sysexits.h              \
4596         sys/file.h              \
4597         sys/filio.h             \
4598         sys/errno.h             \
4599         sys/ioctl.h             \
4600         sys/param.h             \
4601         sys/resource.h  \
4602         sys/select.h    \
4603         sys/socket.h    \
4604         sys/syslog.h    \
4605         sys/time.h              \
4606         sys/types.h             \
4607         syslog.h                \
4608         termios.h               \
4609         unistd.h                \
4610         winsock.h               \
4611
4612 do
4613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4615 echo "configure:4616: checking for $ac_hdr" >&5
4616 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4617   echo $ac_n "(cached) $ac_c" 1>&6
4618 else
4619   cat > conftest.$ac_ext <<EOF
4620 #line 4621 "configure"
4621 #include "confdefs.h"
4622 #include <$ac_hdr>
4623 EOF
4624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4625 { (eval echo configure:4626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4627 if test -z "$ac_err"; then
4628   rm -rf conftest*
4629   eval "ac_cv_header_$ac_safe=yes"
4630 else
4631   echo "$ac_err" >&5
4632   echo "configure: failed program was:" >&5
4633   cat conftest.$ac_ext >&5
4634   rm -rf conftest*
4635   eval "ac_cv_header_$ac_safe=no"
4636 fi
4637 rm -f conftest*
4638 fi
4639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4640   echo "$ac_t""yes" 1>&6
4641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4642   cat >> confdefs.h <<EOF
4643 #define $ac_tr_hdr 1
4644 EOF
4645  
4646 else
4647   echo "$ac_t""no" 1>&6
4648 fi
4649 done
4650
4651
4652
4653
4654 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4655 echo "configure:4656: checking for sigset in -lV3" >&5
4656 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4657 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4658   echo $ac_n "(cached) $ac_c" 1>&6
4659 else
4660   ac_save_LIBS="$LIBS"
4661 LIBS="-lV3  $LIBS"
4662 cat > conftest.$ac_ext <<EOF
4663 #line 4664 "configure"
4664 #include "confdefs.h"
4665 /* Override any gcc2 internal prototype to avoid an error.  */
4666 /* We use char because int might match the return type of a gcc2
4667     builtin and then its argument prototype would still apply.  */
4668 char sigset();
4669
4670 int main() {
4671 sigset()
4672 ; return 0; }
4673 EOF
4674 if { (eval echo configure:4675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4675   rm -rf conftest*
4676   eval "ac_cv_lib_$ac_lib_var=yes"
4677 else
4678   echo "configure: failed program was:" >&5
4679   cat conftest.$ac_ext >&5
4680   rm -rf conftest*
4681   eval "ac_cv_lib_$ac_lib_var=no"
4682 fi
4683 rm -f conftest*
4684 LIBS="$ac_save_LIBS"
4685
4686 fi
4687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4688   echo "$ac_t""yes" 1>&6
4689     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4690     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4691   cat >> confdefs.h <<EOF
4692 #define $ac_tr_lib 1
4693 EOF
4694
4695   LIBS="-lV3 $LIBS"
4696
4697 else
4698   echo "$ac_t""no" 1>&6
4699 fi
4700
4701
4702 if test $ac_cv_header_winsock_h = yes; then
4703         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4704 echo "configure:4705: checking for winsock" >&5
4705 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4706   echo $ac_n "(cached) $ac_c" 1>&6
4707 else
4708   cat > conftest.$ac_ext <<EOF
4709 #line 4710 "configure"
4710 #include "confdefs.h"
4711 #include <winsock.h>
4712 int main() {
4713
4714                         socket(0,0,0);
4715                         select(0,NULL,NULL,NULL,NULL);
4716                         closesocket(0);
4717                         gethostname(NULL,0);
4718         
4719 ; return 0; }
4720 EOF
4721 if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4722   rm -rf conftest*
4723   ol_cv_winsock=yes
4724 else
4725   echo "configure: failed program was:" >&5
4726   cat conftest.$ac_ext >&5
4727   rm -rf conftest*
4728   ol_cv_winsock=no
4729 fi
4730 rm -f conftest*]
4731 fi
4732
4733 echo "$ac_t""$ol_cv_winsock" 1>&6
4734
4735         if test $ol_cv_winsock = yes ; then
4736                 cat >> confdefs.h <<\EOF
4737 #define HAVE_WINSOCK 1
4738 EOF
4739
4740                 ac_cv_func_socket=yes
4741                 ac_cv_func_select=yes
4742                 ac_cv_func_closesocket=yes
4743                 ac_cv_func_gethostname=yes
4744         fi
4745 fi
4746
4747
4748 echo $ac_n "checking for socket""... $ac_c" 1>&6
4749 echo "configure:4750: checking for socket" >&5
4750 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4751   echo $ac_n "(cached) $ac_c" 1>&6
4752 else
4753   cat > conftest.$ac_ext <<EOF
4754 #line 4755 "configure"
4755 #include "confdefs.h"
4756 /* System header to define __stub macros and hopefully few prototypes,
4757     which can conflict with char socket(); below.  */
4758 #include <assert.h>
4759 /* Override any gcc2 internal prototype to avoid an error.  */
4760 /* We use char because int might match the return type of a gcc2
4761     builtin and then its argument prototype would still apply.  */
4762 char socket();
4763 char (*f)();
4764
4765 int main() {
4766
4767 /* The GNU C library defines this for functions which it implements
4768     to always fail with ENOSYS.  Some functions are actually named
4769     something starting with __ and the normal name is an alias.  */
4770 #if defined (__stub_socket) || defined (__stub___socket)
4771 choke me
4772 #else
4773 f = socket;
4774 #endif
4775
4776 ; return 0; }
4777 EOF
4778 if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4779   rm -rf conftest*
4780   eval "ac_cv_func_socket=yes"
4781 else
4782   echo "configure: failed program was:" >&5
4783   cat conftest.$ac_ext >&5
4784   rm -rf conftest*
4785   eval "ac_cv_func_socket=no"
4786 fi
4787 rm -f conftest*
4788 fi
4789
4790 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4791   echo "$ac_t""yes" 1>&6
4792   :
4793 else
4794   echo "$ac_t""no" 1>&6
4795         
4796         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4797 echo "configure:4798: checking for main in -lsocket" >&5
4798 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4799 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4800   echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802   ac_save_LIBS="$LIBS"
4803 LIBS="-lsocket  $LIBS"
4804 cat > conftest.$ac_ext <<EOF
4805 #line 4806 "configure"
4806 #include "confdefs.h"
4807
4808 int main() {
4809 main()
4810 ; return 0; }
4811 EOF
4812 if { (eval echo configure:4813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4813   rm -rf conftest*
4814   eval "ac_cv_lib_$ac_lib_var=yes"
4815 else
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818   rm -rf conftest*
4819   eval "ac_cv_lib_$ac_lib_var=no"
4820 fi
4821 rm -f conftest*
4822 LIBS="$ac_save_LIBS"
4823
4824 fi
4825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4826   echo "$ac_t""yes" 1>&6
4827     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4828     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4829   cat >> confdefs.h <<EOF
4830 #define $ac_tr_lib 1
4831 EOF
4832
4833   LIBS="-lsocket $LIBS"
4834
4835 else
4836   echo "$ac_t""no" 1>&6
4837 fi
4838
4839         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4840 echo "configure:4841: checking for main in -lnet" >&5
4841 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   ac_save_LIBS="$LIBS"
4846 LIBS="-lnet  $LIBS"
4847 cat > conftest.$ac_ext <<EOF
4848 #line 4849 "configure"
4849 #include "confdefs.h"
4850
4851 int main() {
4852 main()
4853 ; return 0; }
4854 EOF
4855 if { (eval echo configure:4856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4856   rm -rf conftest*
4857   eval "ac_cv_lib_$ac_lib_var=yes"
4858 else
4859   echo "configure: failed program was:" >&5
4860   cat conftest.$ac_ext >&5
4861   rm -rf conftest*
4862   eval "ac_cv_lib_$ac_lib_var=no"
4863 fi
4864 rm -f conftest*
4865 LIBS="$ac_save_LIBS"
4866
4867 fi
4868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4869   echo "$ac_t""yes" 1>&6
4870     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4871     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4872   cat >> confdefs.h <<EOF
4873 #define $ac_tr_lib 1
4874 EOF
4875
4876   LIBS="-lnet $LIBS"
4877
4878 else
4879   echo "$ac_t""no" 1>&6
4880 fi
4881
4882         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4883 echo "configure:4884: checking for main in -lnsl_s" >&5
4884 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4885 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4886   echo $ac_n "(cached) $ac_c" 1>&6
4887 else
4888   ac_save_LIBS="$LIBS"
4889 LIBS="-lnsl_s  $LIBS"
4890 cat > conftest.$ac_ext <<EOF
4891 #line 4892 "configure"
4892 #include "confdefs.h"
4893
4894 int main() {
4895 main()
4896 ; return 0; }
4897 EOF
4898 if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4899   rm -rf conftest*
4900   eval "ac_cv_lib_$ac_lib_var=yes"
4901 else
4902   echo "configure: failed program was:" >&5
4903   cat conftest.$ac_ext >&5
4904   rm -rf conftest*
4905   eval "ac_cv_lib_$ac_lib_var=no"
4906 fi
4907 rm -f conftest*
4908 LIBS="$ac_save_LIBS"
4909
4910 fi
4911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4912   echo "$ac_t""yes" 1>&6
4913     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4914     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4915   cat >> confdefs.h <<EOF
4916 #define $ac_tr_lib 1
4917 EOF
4918
4919   LIBS="-lnsl_s $LIBS"
4920
4921 else
4922   echo "$ac_t""no" 1>&6
4923 fi
4924
4925         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4926 echo "configure:4927: checking for main in -lnsl" >&5
4927 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4928 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   ac_save_LIBS="$LIBS"
4932 LIBS="-lnsl  $LIBS"
4933 cat > conftest.$ac_ext <<EOF
4934 #line 4935 "configure"
4935 #include "confdefs.h"
4936
4937 int main() {
4938 main()
4939 ; return 0; }
4940 EOF
4941 if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4942   rm -rf conftest*
4943   eval "ac_cv_lib_$ac_lib_var=yes"
4944 else
4945   echo "configure: failed program was:" >&5
4946   cat conftest.$ac_ext >&5
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=no"
4949 fi
4950 rm -f conftest*
4951 LIBS="$ac_save_LIBS"
4952
4953 fi
4954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4955   echo "$ac_t""yes" 1>&6
4956     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4957     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4958   cat >> confdefs.h <<EOF
4959 #define $ac_tr_lib 1
4960 EOF
4961
4962   LIBS="-lnsl $LIBS"
4963
4964 else
4965   echo "$ac_t""no" 1>&6
4966 fi
4967
4968         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4969 echo "configure:4970: checking for socket in -linet" >&5
4970 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4971 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4972   echo $ac_n "(cached) $ac_c" 1>&6
4973 else
4974   ac_save_LIBS="$LIBS"
4975 LIBS="-linet  $LIBS"
4976 cat > conftest.$ac_ext <<EOF
4977 #line 4978 "configure"
4978 #include "confdefs.h"
4979 /* Override any gcc2 internal prototype to avoid an error.  */
4980 /* We use char because int might match the return type of a gcc2
4981     builtin and then its argument prototype would still apply.  */
4982 char socket();
4983
4984 int main() {
4985 socket()
4986 ; return 0; }
4987 EOF
4988 if { (eval echo configure:4989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4989   rm -rf conftest*
4990   eval "ac_cv_lib_$ac_lib_var=yes"
4991 else
4992   echo "configure: failed program was:" >&5
4993   cat conftest.$ac_ext >&5
4994   rm -rf conftest*
4995   eval "ac_cv_lib_$ac_lib_var=no"
4996 fi
4997 rm -f conftest*
4998 LIBS="$ac_save_LIBS"
4999
5000 fi
5001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5002   echo "$ac_t""yes" 1>&6
5003     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5004     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5005   cat >> confdefs.h <<EOF
5006 #define $ac_tr_lib 1
5007 EOF
5008
5009   LIBS="-linet $LIBS"
5010
5011 else
5012   echo "$ac_t""no" 1>&6
5013 fi
5014
5015         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5016 echo "configure:5017: checking for main in -lgen" >&5
5017 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5018 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5019   echo $ac_n "(cached) $ac_c" 1>&6
5020 else
5021   ac_save_LIBS="$LIBS"
5022 LIBS="-lgen  $LIBS"
5023 cat > conftest.$ac_ext <<EOF
5024 #line 5025 "configure"
5025 #include "confdefs.h"
5026
5027 int main() {
5028 main()
5029 ; return 0; }
5030 EOF
5031 if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5032   rm -rf conftest*
5033   eval "ac_cv_lib_$ac_lib_var=yes"
5034 else
5035   echo "configure: failed program was:" >&5
5036   cat conftest.$ac_ext >&5
5037   rm -rf conftest*
5038   eval "ac_cv_lib_$ac_lib_var=no"
5039 fi
5040 rm -f conftest*
5041 LIBS="$ac_save_LIBS"
5042
5043 fi
5044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5045   echo "$ac_t""yes" 1>&6
5046     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5047     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5048   cat >> confdefs.h <<EOF
5049 #define $ac_tr_lib 1
5050 EOF
5051
5052   LIBS="-lgen $LIBS"
5053
5054 else
5055   echo "$ac_t""no" 1>&6
5056 fi
5057
5058
5059 fi
5060
5061
5062 echo $ac_n "checking for select""... $ac_c" 1>&6
5063 echo "configure:5064: checking for select" >&5
5064 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5065   echo $ac_n "(cached) $ac_c" 1>&6
5066 else
5067   cat > conftest.$ac_ext <<EOF
5068 #line 5069 "configure"
5069 #include "confdefs.h"
5070 /* System header to define __stub macros and hopefully few prototypes,
5071     which can conflict with char select(); below.  */
5072 #include <assert.h>
5073 /* Override any gcc2 internal prototype to avoid an error.  */
5074 /* We use char because int might match the return type of a gcc2
5075     builtin and then its argument prototype would still apply.  */
5076 char select();
5077 char (*f)();
5078
5079 int main() {
5080
5081 /* The GNU C library defines this for functions which it implements
5082     to always fail with ENOSYS.  Some functions are actually named
5083     something starting with __ and the normal name is an alias.  */
5084 #if defined (__stub_select) || defined (__stub___select)
5085 choke me
5086 #else
5087 f = select;
5088 #endif
5089
5090 ; return 0; }
5091 EOF
5092 if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5093   rm -rf conftest*
5094   eval "ac_cv_func_select=yes"
5095 else
5096   echo "configure: failed program was:" >&5
5097   cat conftest.$ac_ext >&5
5098   rm -rf conftest*
5099   eval "ac_cv_func_select=no"
5100 fi
5101 rm -f conftest*
5102 fi
5103
5104 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5105   echo "$ac_t""yes" 1>&6
5106   :
5107 else
5108   echo "$ac_t""no" 1>&6
5109 { echo "configure: error: select() required." 1>&2; exit 1; }
5110 fi
5111
5112
5113 if test "${ac_cv_header_winsock_h}" != yes; then
5114                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5115 echo "configure:5116: checking types of arguments for select()" >&5
5116  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5117   echo $ac_n "(cached) $ac_c" 1>&6
5118 else
5119    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5120   echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5123   echo $ac_n "(cached) $ac_c" 1>&6
5124 else
5125      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5126      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5127       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5128        cat > conftest.$ac_ext <<EOF
5129 #line 5130 "configure"
5130 #include "confdefs.h"
5131 #ifdef HAVE_SYS_TYPES_H
5132 #include <sys/types.h>
5133 #endif
5134 #ifdef HAVE_SYS_TIME_H
5135 #include <sys/time.h>
5136 #endif
5137 #ifdef HAVE_SYS_SELECT_H
5138 #include <sys/select.h>
5139 #endif
5140 #ifdef HAVE_SYS_SOCKET_H
5141 #include <sys/socket.h>
5142 #endif
5143 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);
5144 int main() {
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5149   rm -rf conftest*
5150           ac_not_found=no ; break 3
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154   rm -rf conftest*
5155   ac_not_found=yes
5156 fi
5157 rm -f conftest*
5158       done
5159      done
5160     done
5161    
5162 fi
5163   
5164 fi
5165  
5166 fi
5167  if test "$ac_not_found" = yes; then
5168   ac_cv_func_select_arg1=int 
5169   ac_cv_func_select_arg234='int *' 
5170   ac_cv_func_select_arg5='struct timeval *'
5171  fi
5172  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5173  cat >> confdefs.h <<EOF
5174 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5175 EOF
5176
5177  cat >> confdefs.h <<EOF
5178 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5179 EOF
5180
5181  cat >> confdefs.h <<EOF
5182 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5183 EOF
5184
5185
5186 fi
5187
5188
5189 for ac_hdr in regex.h 
5190 do
5191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5193 echo "configure:5194: checking for $ac_hdr" >&5
5194 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5195   echo $ac_n "(cached) $ac_c" 1>&6
5196 else
5197   cat > conftest.$ac_ext <<EOF
5198 #line 5199 "configure"
5199 #include "confdefs.h"
5200 #include <$ac_hdr>
5201 EOF
5202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5203 { (eval echo configure:5204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5205 if test -z "$ac_err"; then
5206   rm -rf conftest*
5207   eval "ac_cv_header_$ac_safe=yes"
5208 else
5209   echo "$ac_err" >&5
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212   rm -rf conftest*
5213   eval "ac_cv_header_$ac_safe=no"
5214 fi
5215 rm -f conftest*
5216 fi
5217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5218   echo "$ac_t""yes" 1>&6
5219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5220   cat >> confdefs.h <<EOF
5221 #define $ac_tr_hdr 1
5222 EOF
5223  
5224 else
5225   echo "$ac_t""no" 1>&6
5226 fi
5227 done
5228
5229 if test "$ac_cv_header_regex_h" != yes ; then
5230         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5231 fi
5232 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5233 echo "configure:5234: checking for regfree" >&5
5234 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5235   echo $ac_n "(cached) $ac_c" 1>&6
5236 else
5237   cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240 /* System header to define __stub macros and hopefully few prototypes,
5241     which can conflict with char regfree(); below.  */
5242 #include <assert.h>
5243 /* Override any gcc2 internal prototype to avoid an error.  */
5244 /* We use char because int might match the return type of a gcc2
5245     builtin and then its argument prototype would still apply.  */
5246 char regfree();
5247 char (*f)();
5248
5249 int main() {
5250
5251 /* The GNU C library defines this for functions which it implements
5252     to always fail with ENOSYS.  Some functions are actually named
5253     something starting with __ and the normal name is an alias.  */
5254 #if defined (__stub_regfree) || defined (__stub___regfree)
5255 choke me
5256 #else
5257 f = regfree;
5258 #endif
5259
5260 ; return 0; }
5261 EOF
5262 if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5263   rm -rf conftest*
5264   eval "ac_cv_func_regfree=yes"
5265 else
5266   echo "configure: failed program was:" >&5
5267   cat conftest.$ac_ext >&5
5268   rm -rf conftest*
5269   eval "ac_cv_func_regfree=no"
5270 fi
5271 rm -f conftest*
5272 fi
5273
5274 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5275   echo "$ac_t""yes" 1>&6
5276   :
5277 else
5278   echo "$ac_t""no" 1>&6
5279 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5280 fi
5281
5282
5283
5284 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5285 echo "configure:5286: checking for compatible POSIX regex" >&5
5286 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5287   echo $ac_n "(cached) $ac_c" 1>&6
5288 else
5289   
5290         if test "$cross_compiling" = yes; then
5291   ol_cv_c_posix_regex=cross
5292 else
5293   cat > conftest.$ac_ext <<EOF
5294 #line 5295 "configure"
5295 #include "confdefs.h"
5296
5297 #include <sys/types.h>
5298 #include <regex.h>
5299 static char *pattern, *string;
5300 main()
5301 {
5302         int rc;
5303         regex_t re;
5304
5305         pattern = "^A";
5306
5307         if(regcomp(&re, pattern, 0)) {
5308                 return -1;
5309         }
5310         
5311         string = "ALL MATCH";
5312         
5313         rc = regexec(&re, string, 0, (void*)0, 0);
5314
5315         regfree(&re);
5316
5317         return rc;
5318 }
5319 EOF
5320 if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5321 then
5322   ol_cv_c_posix_regex=yes
5323 else
5324   echo "configure: failed program was:" >&5
5325   cat conftest.$ac_ext >&5
5326   rm -fr conftest*
5327   ol_cv_c_posix_regex=no
5328 fi
5329 rm -fr conftest*
5330 fi
5331
5332 fi
5333
5334 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5335
5336 if test "$ol_cv_c_posix_regex" = no ; then
5337         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5338 fi
5339
5340 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5341 echo "configure:5342: checking for res_search" >&5
5342 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 /* System header to define __stub macros and hopefully few prototypes,
5349     which can conflict with char res_search(); below.  */
5350 #include <assert.h>
5351 /* Override any gcc2 internal prototype to avoid an error.  */
5352 /* We use char because int might match the return type of a gcc2
5353     builtin and then its argument prototype would still apply.  */
5354 char res_search();
5355 char (*f)();
5356
5357 int main() {
5358
5359 /* The GNU C library defines this for functions which it implements
5360     to always fail with ENOSYS.  Some functions are actually named
5361     something starting with __ and the normal name is an alias.  */
5362 #if defined (__stub_res_search) || defined (__stub___res_search)
5363 choke me
5364 #else
5365 f = res_search;
5366 #endif
5367
5368 ; return 0; }
5369 EOF
5370 if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5371   rm -rf conftest*
5372   eval "ac_cv_func_res_search=yes"
5373 else
5374   echo "configure: failed program was:" >&5
5375   cat conftest.$ac_ext >&5
5376   rm -rf conftest*
5377   eval "ac_cv_func_res_search=no"
5378 fi
5379 rm -f conftest*
5380 fi
5381
5382 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5383   echo "$ac_t""yes" 1>&6
5384   :
5385 else
5386   echo "$ac_t""no" 1>&6
5387 fi
5388
5389 if test $ac_cv_func_res_search = no ; then 
5390         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5391 echo "configure:5392: checking for res_search in -lbind" >&5
5392 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5393 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5394   echo $ac_n "(cached) $ac_c" 1>&6
5395 else
5396   ac_save_LIBS="$LIBS"
5397 LIBS="-lbind  $LIBS"
5398 cat > conftest.$ac_ext <<EOF
5399 #line 5400 "configure"
5400 #include "confdefs.h"
5401 /* Override any gcc2 internal prototype to avoid an error.  */
5402 /* We use char because int might match the return type of a gcc2
5403     builtin and then its argument prototype would still apply.  */
5404 char res_search();
5405
5406 int main() {
5407 res_search()
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_lib_$ac_lib_var=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_lib_$ac_lib_var=no"
5418 fi
5419 rm -f conftest*
5420 LIBS="$ac_save_LIBS"
5421
5422 fi
5423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5424   echo "$ac_t""yes" 1>&6
5425     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5426     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5427   cat >> confdefs.h <<EOF
5428 #define $ac_tr_lib 1
5429 EOF
5430
5431   LIBS="-lbind $LIBS"
5432
5433 else
5434   echo "$ac_t""no" 1>&6
5435 fi
5436
5437         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5438 fi
5439
5440 if test $ac_cv_func_res_search = no ; then 
5441         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5442 echo "configure:5443: checking for __res_search in -lbind" >&5
5443 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5444 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5445   echo $ac_n "(cached) $ac_c" 1>&6
5446 else
5447   ac_save_LIBS="$LIBS"
5448 LIBS="-lbind  $LIBS"
5449 cat > conftest.$ac_ext <<EOF
5450 #line 5451 "configure"
5451 #include "confdefs.h"
5452 /* Override any gcc2 internal prototype to avoid an error.  */
5453 /* We use char because int might match the return type of a gcc2
5454     builtin and then its argument prototype would still apply.  */
5455 char __res_search();
5456
5457 int main() {
5458 __res_search()
5459 ; return 0; }
5460 EOF
5461 if { (eval echo configure:5462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5462   rm -rf conftest*
5463   eval "ac_cv_lib_$ac_lib_var=yes"
5464 else
5465   echo "configure: failed program was:" >&5
5466   cat conftest.$ac_ext >&5
5467   rm -rf conftest*
5468   eval "ac_cv_lib_$ac_lib_var=no"
5469 fi
5470 rm -f conftest*
5471 LIBS="$ac_save_LIBS"
5472
5473 fi
5474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5475   echo "$ac_t""yes" 1>&6
5476     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5478   cat >> confdefs.h <<EOF
5479 #define $ac_tr_lib 1
5480 EOF
5481
5482   LIBS="-lbind $LIBS"
5483
5484 else
5485   echo "$ac_t""no" 1>&6
5486 fi
5487
5488         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5489 fi
5490
5491 if test $ac_cv_func_res_search = no ; then 
5492         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5493 echo "configure:5494: checking for res_search in -lresolv" >&5
5494 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5495 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5496   echo $ac_n "(cached) $ac_c" 1>&6
5497 else
5498   ac_save_LIBS="$LIBS"
5499 LIBS="-lresolv  $LIBS"
5500 cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 /* Override any gcc2 internal prototype to avoid an error.  */
5504 /* We use char because int might match the return type of a gcc2
5505     builtin and then its argument prototype would still apply.  */
5506 char res_search();
5507
5508 int main() {
5509 res_search()
5510 ; return 0; }
5511 EOF
5512 if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5513   rm -rf conftest*
5514   eval "ac_cv_lib_$ac_lib_var=yes"
5515 else
5516   echo "configure: failed program was:" >&5
5517   cat conftest.$ac_ext >&5
5518   rm -rf conftest*
5519   eval "ac_cv_lib_$ac_lib_var=no"
5520 fi
5521 rm -f conftest*
5522 LIBS="$ac_save_LIBS"
5523
5524 fi
5525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5526   echo "$ac_t""yes" 1>&6
5527     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5528     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5529   cat >> confdefs.h <<EOF
5530 #define $ac_tr_lib 1
5531 EOF
5532
5533   LIBS="-lresolv $LIBS"
5534
5535 else
5536   echo "$ac_t""no" 1>&6
5537 fi
5538
5539         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5540 fi
5541
5542 if test "$ac_cv_func_res_search" = yes ; then
5543         cat >> confdefs.h <<\EOF
5544 #define HAVE_RES_SEARCH 1
5545 EOF
5546
5547 elif test $ol_enable_dns = yes ; then
5548         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5549 elif test $ol_enable_dns != no ; then
5550         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5551 fi
5552
5553
5554 ol_link_isode=no
5555 if test $ol_enable_ldapd != no ; then
5556         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5557
5558                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5559 echo "configure:5560: checking for main in -lxtpp" >&5
5560 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5562   echo $ac_n "(cached) $ac_c" 1>&6
5563 else
5564   ac_save_LIBS="$LIBS"
5565 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5566 cat > conftest.$ac_ext <<EOF
5567 #line 5568 "configure"
5568 #include "confdefs.h"
5569
5570 int main() {
5571 main()
5572 ; return 0; }
5573 EOF
5574 if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5575   rm -rf conftest*
5576   eval "ac_cv_lib_$ac_lib_var=yes"
5577 else
5578   echo "configure: failed program was:" >&5
5579   cat conftest.$ac_ext >&5
5580   rm -rf conftest*
5581   eval "ac_cv_lib_$ac_lib_var=no"
5582 fi
5583 rm -f conftest*
5584 LIBS="$ac_save_LIBS"
5585
5586 fi
5587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5588   echo "$ac_t""yes" 1>&6
5589   
5590                 ol_link_isode=yes
5591                 cat >> confdefs.h <<\EOF
5592 #define HAVE_XTPP 1
5593 EOF
5594
5595                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5596                 
5597 else
5598   echo "$ac_t""no" 1>&6
5599 :
5600 fi
5601
5602         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5603 echo "configure:5604: checking for main in -ldsap" >&5
5604 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5605 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5606   echo $ac_n "(cached) $ac_c" 1>&6
5607 else
5608   ac_save_LIBS="$LIBS"
5609 LIBS="-ldsap -lisode $LIBS"
5610 cat > conftest.$ac_ext <<EOF
5611 #line 5612 "configure"
5612 #include "confdefs.h"
5613
5614 int main() {
5615 main()
5616 ; return 0; }
5617 EOF
5618 if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5619   rm -rf conftest*
5620   eval "ac_cv_lib_$ac_lib_var=yes"
5621 else
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   eval "ac_cv_lib_$ac_lib_var=no"
5626 fi
5627 rm -f conftest*
5628 LIBS="$ac_save_LIBS"
5629
5630 fi
5631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5632   echo "$ac_t""yes" 1>&6
5633   
5634                 ol_link_isode=yes
5635                 cat >> confdefs.h <<\EOF
5636 #define HAVE_DSAP 1
5637 EOF
5638
5639                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5640                 
5641 else
5642   echo "$ac_t""no" 1>&6
5643 :
5644 fi
5645
5646         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5647 echo "configure:5648: checking for main in -lisode" >&5
5648 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5650   echo $ac_n "(cached) $ac_c" 1>&6
5651 else
5652   ac_save_LIBS="$LIBS"
5653 LIBS="-lisode  $LIBS"
5654 cat > conftest.$ac_ext <<EOF
5655 #line 5656 "configure"
5656 #include "confdefs.h"
5657
5658 int main() {
5659 main()
5660 ; return 0; }
5661 EOF
5662 if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5663   rm -rf conftest*
5664   eval "ac_cv_lib_$ac_lib_var=yes"
5665 else
5666   echo "configure: failed program was:" >&5
5667   cat conftest.$ac_ext >&5
5668   rm -rf conftest*
5669   eval "ac_cv_lib_$ac_lib_var=no"
5670 fi
5671 rm -f conftest*
5672 LIBS="$ac_save_LIBS"
5673
5674 fi
5675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5676   echo "$ac_t""yes" 1>&6
5677   
5678                 ol_link_isode=yes
5679                 cat >> confdefs.h <<\EOF
5680 #define HAVE_ISODE 1
5681 EOF
5682
5683                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5684                 
5685 else
5686   echo "$ac_t""no" 1>&6
5687 :
5688 fi
5689
5690 fi
5691
5692 if test $ol_link_isode != no; then
5693         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5694 echo "configure:5695: checking for main in -lpp" >&5
5695 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5697   echo $ac_n "(cached) $ac_c" 1>&6
5698 else
5699   ac_save_LIBS="$LIBS"
5700 LIBS="-lpp  $LIBS"
5701 cat > conftest.$ac_ext <<EOF
5702 #line 5703 "configure"
5703 #include "confdefs.h"
5704
5705 int main() {
5706 main()
5707 ; return 0; }
5708 EOF
5709 if { (eval echo configure:5710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5710   rm -rf conftest*
5711   eval "ac_cv_lib_$ac_lib_var=yes"
5712 else
5713   echo "configure: failed program was:" >&5
5714   cat conftest.$ac_ext >&5
5715   rm -rf conftest*
5716   eval "ac_cv_lib_$ac_lib_var=no"
5717 fi
5718 rm -f conftest*
5719 LIBS="$ac_save_LIBS"
5720
5721 fi
5722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5723   echo "$ac_t""yes" 1>&6
5724   
5725                 cat >> confdefs.h <<\EOF
5726 #define HAVE_PP 1
5727 EOF
5728
5729                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5730                 
5731 else
5732   echo "$ac_t""no" 1>&6
5733 :
5734 fi
5735
5736
5737         # Extract the first word of "pepsy", so it can be a program name with args.
5738 set dummy pepsy; ac_word=$2
5739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5740 echo "configure:5741: checking for $ac_word" >&5
5741 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5742   echo $ac_n "(cached) $ac_c" 1>&6
5743 else
5744   case "$PEPSY" in
5745   /*)
5746   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5747   ;;
5748   ?:/*)
5749   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5750   ;;
5751   *)
5752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5753   ac_dummy="$PATH"
5754   for ac_dir in $ac_dummy; do 
5755     test -z "$ac_dir" && ac_dir=.
5756     if test -f $ac_dir/$ac_word; then
5757       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5758       break
5759     fi
5760   done
5761   IFS="$ac_save_ifs"
5762   ;;
5763 esac
5764 fi
5765 PEPSY="$ac_cv_path_PEPSY"
5766 if test -n "$PEPSY"; then
5767   echo "$ac_t""$PEPSY" 1>&6
5768 else
5769   echo "$ac_t""no" 1>&6
5770 fi
5771
5772 fi
5773
5774 if test $ol_enable_quipu != no ; then
5775         for ac_hdr in quipu/commonarg.h
5776 do
5777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5779 echo "configure:5780: checking for $ac_hdr" >&5
5780 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5781   echo $ac_n "(cached) $ac_c" 1>&6
5782 else
5783   cat > conftest.$ac_ext <<EOF
5784 #line 5785 "configure"
5785 #include "confdefs.h"
5786 #include <$ac_hdr>
5787 EOF
5788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5789 { (eval echo configure:5790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5791 if test -z "$ac_err"; then
5792   rm -rf conftest*
5793   eval "ac_cv_header_$ac_safe=yes"
5794 else
5795   echo "$ac_err" >&5
5796   echo "configure: failed program was:" >&5
5797   cat conftest.$ac_ext >&5
5798   rm -rf conftest*
5799   eval "ac_cv_header_$ac_safe=no"
5800 fi
5801 rm -f conftest*
5802 fi
5803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5804   echo "$ac_t""yes" 1>&6
5805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5806   cat >> confdefs.h <<EOF
5807 #define $ac_tr_hdr 1
5808 EOF
5809  
5810 else
5811   echo "$ac_t""no" 1>&6
5812 fi
5813 done
5814
5815
5816         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5817                 BUILD_QUIPU=yes
5818         elif test $ol_enable_quipu = auto ; then
5819                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5820         else
5821                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5822         fi
5823 fi
5824
5825 ol_link_kerberos=no
5826
5827 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5828         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5829 do
5830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5832 echo "configure:5833: checking for $ac_hdr" >&5
5833 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5834   echo $ac_n "(cached) $ac_c" 1>&6
5835 else
5836   cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 #include <$ac_hdr>
5840 EOF
5841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5842 { (eval echo configure:5843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5844 if test -z "$ac_err"; then
5845   rm -rf conftest*
5846   eval "ac_cv_header_$ac_safe=yes"
5847 else
5848   echo "$ac_err" >&5
5849   echo "configure: failed program was:" >&5
5850   cat conftest.$ac_ext >&5
5851   rm -rf conftest*
5852   eval "ac_cv_header_$ac_safe=no"
5853 fi
5854 rm -f conftest*
5855 fi
5856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5857   echo "$ac_t""yes" 1>&6
5858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5859   cat >> confdefs.h <<EOF
5860 #define $ac_tr_hdr 1
5861 EOF
5862  
5863 else
5864   echo "$ac_t""no" 1>&6
5865 fi
5866 done
5867
5868
5869         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5870                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5871 echo "configure:5872: checking for main in -lkrb4" >&5
5872 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5873 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5874   echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876   ac_save_LIBS="$LIBS"
5877 LIBS="-lkrb4 -lkrb5 -ldes425 -lcrypto -lcom_err $LIBS"
5878 cat > conftest.$ac_ext <<EOF
5879 #line 5880 "configure"
5880 #include "confdefs.h"
5881
5882 int main() {
5883 main()
5884 ; return 0; }
5885 EOF
5886 if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5887   rm -rf conftest*
5888   eval "ac_cv_lib_$ac_lib_var=yes"
5889 else
5890   echo "configure: failed program was:" >&5
5891   cat conftest.$ac_ext >&5
5892   rm -rf conftest*
5893   eval "ac_cv_lib_$ac_lib_var=no"
5894 fi
5895 rm -f conftest*
5896 LIBS="$ac_save_LIBS"
5897
5898 fi
5899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5900   echo "$ac_t""yes" 1>&6
5901   have_k5=yes
5902 else
5903   echo "$ac_t""no" 1>&6
5904 have_k5=no
5905 fi
5906
5907
5908                 if test $have_k5 = yes ; then
5909                         ol_with_kerberos=found
5910                         ol_link_kerberos=yes
5911
5912                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425 -lcrypto -lcom_err"
5913
5914                         LIBS="$KRB_LIBS $LIBS"
5915
5916                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5917 echo "configure:5918: checking for des_debug in Kerberos libraries" >&5
5918 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5919   echo $ac_n "(cached) $ac_c" 1>&6
5920 else
5921   
5922                                                                 save_LIBS="$LIBS"
5923                                 LIBS="$KRB_LIBS $LIBS"
5924                                 cat > conftest.$ac_ext <<EOF
5925 #line 5926 "configure"
5926 #include "confdefs.h"
5927
5928 #include <kerberosIV/krb.h>
5929 #include <kerberosIV/des.h>
5930 extern int des_debug;
5931
5932 int main() {
5933
5934 des_debug = 1;
5935
5936 ; return 0; }
5937 EOF
5938 if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5939   rm -rf conftest*
5940   ol_cv_var_des_debug=yes
5941 else
5942   echo "configure: failed program was:" >&5
5943   cat conftest.$ac_ext >&5
5944   rm -rf conftest*
5945   ol_cv_var_des_debug=no
5946 fi
5947 rm -f conftest*
5948                                                                 LIBS="$save_LIBS"
5949                         
5950 fi
5951
5952 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5953
5954                         if test $ol_cv_var_des_debug = yes ; then
5955                                 cat >> confdefs.h <<\EOF
5956 #define HAVE_DES_DEBUG 1
5957 EOF
5958
5959                         fi
5960
5961                         LIBS="$save_LIBS"
5962                 fi
5963         fi
5964 fi
5965
5966 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
5967         -o $ol_with_kerberos = kth ; then
5968
5969         for ac_hdr in krb.h des.h krb-archaeology.h 
5970 do
5971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5973 echo "configure:5974: checking for $ac_hdr" >&5
5974 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5975   echo $ac_n "(cached) $ac_c" 1>&6
5976 else
5977   cat > conftest.$ac_ext <<EOF
5978 #line 5979 "configure"
5979 #include "confdefs.h"
5980 #include <$ac_hdr>
5981 EOF
5982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5983 { (eval echo configure:5984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5985 if test -z "$ac_err"; then
5986   rm -rf conftest*
5987   eval "ac_cv_header_$ac_safe=yes"
5988 else
5989   echo "$ac_err" >&5
5990   echo "configure: failed program was:" >&5
5991   cat conftest.$ac_ext >&5
5992   rm -rf conftest*
5993   eval "ac_cv_header_$ac_safe=no"
5994 fi
5995 rm -f conftest*
5996 fi
5997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5998   echo "$ac_t""yes" 1>&6
5999     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6000   cat >> confdefs.h <<EOF
6001 #define $ac_tr_hdr 1
6002 EOF
6003  
6004 else
6005   echo "$ac_t""no" 1>&6
6006 fi
6007 done
6008
6009
6010         if test $ac_cv_header_krb_h = yes ; then
6011                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6012 echo "configure:6013: checking for main in -lkrb" >&5
6013 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6015   echo $ac_n "(cached) $ac_c" 1>&6
6016 else
6017   ac_save_LIBS="$LIBS"
6018 LIBS="-lkrb -ldes $LIBS"
6019 cat > conftest.$ac_ext <<EOF
6020 #line 6021 "configure"
6021 #include "confdefs.h"
6022
6023 int main() {
6024 main()
6025 ; return 0; }
6026 EOF
6027 if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6028   rm -rf conftest*
6029   eval "ac_cv_lib_$ac_lib_var=yes"
6030 else
6031   echo "configure: failed program was:" >&5
6032   cat conftest.$ac_ext >&5
6033   rm -rf conftest*
6034   eval "ac_cv_lib_$ac_lib_var=no"
6035 fi
6036 rm -f conftest*
6037 LIBS="$ac_save_LIBS"
6038
6039 fi
6040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6041   echo "$ac_t""yes" 1>&6
6042   have_k4=yes
6043 else
6044   echo "$ac_t""no" 1>&6
6045 have_k4=no
6046 fi
6047
6048
6049                 if test $have_k4 = yes ; then
6050                         ol_with_kerberos=found
6051                         ol_link_kerberos=yes
6052
6053                         KRB_LIBS="-lkrb -ldes"
6054
6055                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6056                                 cat >> confdefs.h <<\EOF
6057 #define HAVE_KTH_KERBEROS 1
6058 EOF
6059
6060                         fi
6061                 fi
6062         fi
6063 fi
6064
6065 if test $ol_link_kerberos = yes ; then
6066         cat >> confdefs.h <<\EOF
6067 #define HAVE_KERBEROS 1
6068 EOF
6069
6070
6071 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6072         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6073 fi
6074
6075 ol_link_tls=no
6076 if test $ol_with_tls != no ; then
6077         
6078         for ac_hdr in openssl/ssl.h ssl.h
6079 do
6080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6082 echo "configure:6083: checking for $ac_hdr" >&5
6083 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6084   echo $ac_n "(cached) $ac_c" 1>&6
6085 else
6086   cat > conftest.$ac_ext <<EOF
6087 #line 6088 "configure"
6088 #include "confdefs.h"
6089 #include <$ac_hdr>
6090 EOF
6091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6092 { (eval echo configure:6093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6094 if test -z "$ac_err"; then
6095   rm -rf conftest*
6096   eval "ac_cv_header_$ac_safe=yes"
6097 else
6098   echo "$ac_err" >&5
6099   echo "configure: failed program was:" >&5
6100   cat conftest.$ac_ext >&5
6101   rm -rf conftest*
6102   eval "ac_cv_header_$ac_safe=no"
6103 fi
6104 rm -f conftest*
6105 fi
6106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6107   echo "$ac_t""yes" 1>&6
6108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6109   cat >> confdefs.h <<EOF
6110 #define $ac_tr_hdr 1
6111 EOF
6112  
6113 else
6114   echo "$ac_t""no" 1>&6
6115 fi
6116 done
6117
6118         
6119         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6120                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6121 echo "configure:6122: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6122 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6123 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6124   echo $ac_n "(cached) $ac_c" 1>&6
6125 else
6126   ac_save_LIBS="$LIBS"
6127 LIBS="-lssl -lcrypto $LIBS"
6128 cat > conftest.$ac_ext <<EOF
6129 #line 6130 "configure"
6130 #include "confdefs.h"
6131 /* Override any gcc2 internal prototype to avoid an error.  */
6132 /* We use char because int might match the return type of a gcc2
6133     builtin and then its argument prototype would still apply.  */
6134 char SSLeay_add_ssl_algorithms();
6135
6136 int main() {
6137 SSLeay_add_ssl_algorithms()
6138 ; return 0; }
6139 EOF
6140 if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6141   rm -rf conftest*
6142   eval "ac_cv_lib_$ac_lib_var=yes"
6143 else
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   eval "ac_cv_lib_$ac_lib_var=no"
6148 fi
6149 rm -f conftest*
6150 LIBS="$ac_save_LIBS"
6151
6152 fi
6153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6154   echo "$ac_t""yes" 1>&6
6155   have_ssleay=yes
6156                         need_rsaref=no
6157 else
6158   echo "$ac_t""no" 1>&6
6159 have_ssleay=no
6160 fi
6161
6162                         
6163                 if test $have_ssleay = no ; then
6164                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6165 echo "configure:6166: checking for SSL_library_init in -lssl" >&5
6166 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6167 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6168   echo $ac_n "(cached) $ac_c" 1>&6
6169 else
6170   ac_save_LIBS="$LIBS"
6171 LIBS="-lssl -lcrypto $LIBS"
6172 cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175 /* Override any gcc2 internal prototype to avoid an error.  */
6176 /* We use char because int might match the return type of a gcc2
6177     builtin and then its argument prototype would still apply.  */
6178 char SSL_library_init();
6179
6180 int main() {
6181 SSL_library_init()
6182 ; return 0; }
6183 EOF
6184 if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6185   rm -rf conftest*
6186   eval "ac_cv_lib_$ac_lib_var=yes"
6187 else
6188   echo "configure: failed program was:" >&5
6189   cat conftest.$ac_ext >&5
6190   rm -rf conftest*
6191   eval "ac_cv_lib_$ac_lib_var=no"
6192 fi
6193 rm -f conftest*
6194 LIBS="$ac_save_LIBS"
6195
6196 fi
6197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6198   echo "$ac_t""yes" 1>&6
6199   have_ssleay=yes
6200                                 need_rsaref=no
6201 else
6202   echo "$ac_t""no" 1>&6
6203 have_ssleay=no
6204 fi
6205
6206                 fi
6207
6208                 if test $have_ssleay = no ; then
6209                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6210 echo "configure:6211: checking for ssl3_accept in -lssl" >&5
6211 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6213   echo $ac_n "(cached) $ac_c" 1>&6
6214 else
6215   ac_save_LIBS="$LIBS"
6216 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6217 cat > conftest.$ac_ext <<EOF
6218 #line 6219 "configure"
6219 #include "confdefs.h"
6220 /* Override any gcc2 internal prototype to avoid an error.  */
6221 /* We use char because int might match the return type of a gcc2
6222     builtin and then its argument prototype would still apply.  */
6223 char ssl3_accept();
6224
6225 int main() {
6226 ssl3_accept()
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6230   rm -rf conftest*
6231   eval "ac_cv_lib_$ac_lib_var=yes"
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   eval "ac_cv_lib_$ac_lib_var=no"
6237 fi
6238 rm -f conftest*
6239 LIBS="$ac_save_LIBS"
6240
6241 fi
6242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6243   echo "$ac_t""yes" 1>&6
6244   have_ssleay=yes
6245                                 need_rsaref=yes
6246 else
6247   echo "$ac_t""no" 1>&6
6248 have_ssleay=no
6249 fi
6250
6251                 fi
6252
6253                 if test $have_ssleay = yes ; then
6254                         ol_with_tls=found
6255                         ol_link_tls=yes
6256
6257                         cat >> confdefs.h <<\EOF
6258 #define HAVE_SSLEAY 1
6259 EOF
6260
6261
6262                         if test $need_rsaref = yes; then
6263                                 cat >> confdefs.h <<\EOF
6264 #define HAVE_RSAREF 1
6265 EOF
6266
6267
6268                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6269                         else
6270                                 TLS_LIBS="-lssl -lcrypto"
6271                         fi
6272                 fi
6273         fi
6274 fi
6275
6276 if test $ol_link_tls = yes ; then
6277         cat >> confdefs.h <<\EOF
6278 #define HAVE_TLS 1
6279 EOF
6280
6281 fi      
6282
6283 for ac_func in \
6284         ctime_r                 \
6285         gethostbyname_r gethostbyaddr_r \
6286
6287 do
6288 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6289 echo "configure:6290: checking for $ac_func" >&5
6290 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6291   echo $ac_n "(cached) $ac_c" 1>&6
6292 else
6293   cat > conftest.$ac_ext <<EOF
6294 #line 6295 "configure"
6295 #include "confdefs.h"
6296 /* System header to define __stub macros and hopefully few prototypes,
6297     which can conflict with char $ac_func(); below.  */
6298 #include <assert.h>
6299 /* Override any gcc2 internal prototype to avoid an error.  */
6300 /* We use char because int might match the return type of a gcc2
6301     builtin and then its argument prototype would still apply.  */
6302 char $ac_func();
6303 char (*f)();
6304
6305 int main() {
6306
6307 /* The GNU C library defines this for functions which it implements
6308     to always fail with ENOSYS.  Some functions are actually named
6309     something starting with __ and the normal name is an alias.  */
6310 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6311 choke me
6312 #else
6313 f = $ac_func;
6314 #endif
6315
6316 ; return 0; }
6317 EOF
6318 if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6319   rm -rf conftest*
6320   eval "ac_cv_func_$ac_func=yes"
6321 else
6322   echo "configure: failed program was:" >&5
6323   cat conftest.$ac_ext >&5
6324   rm -rf conftest*
6325   eval "ac_cv_func_$ac_func=no"
6326 fi
6327 rm -f conftest*
6328 fi
6329
6330 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6331   echo "$ac_t""yes" 1>&6
6332     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6333   cat >> confdefs.h <<EOF
6334 #define $ac_tr_func 1
6335 EOF
6336  
6337 else
6338   echo "$ac_t""no" 1>&6
6339 fi
6340 done
6341
6342
6343 if test "$ac_cv_func_ctime_r" = no ; then
6344         ol_cv_func_ctime_r_nargs=0
6345 else
6346         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6347 echo "configure:6348: checking number of arguments of ctime_r" >&5
6348 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6349   echo $ac_n "(cached) $ac_c" 1>&6
6350 else
6351   cat > conftest.$ac_ext <<EOF
6352 #line 6353 "configure"
6353 #include "confdefs.h"
6354 #include <time.h>
6355 int main() {
6356 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6357 ; return 0; }
6358 EOF
6359 if { (eval echo configure:6360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6360   rm -rf conftest*
6361   ol_cv_func_ctime_r_nargs3=yes
6362 else
6363   echo "configure: failed program was:" >&5
6364   cat conftest.$ac_ext >&5
6365   rm -rf conftest*
6366   ol_cv_func_ctime_r_nargs3=no
6367 fi
6368 rm -f conftest*
6369
6370         cat > conftest.$ac_ext <<EOF
6371 #line 6372 "configure"
6372 #include "confdefs.h"
6373 #include <time.h>
6374 int main() {
6375 time_t ti; char *buffer; ctime_r(&ti,buffer);
6376 ; return 0; }
6377 EOF
6378 if { (eval echo configure:6379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6379   rm -rf conftest*
6380   ol_cv_func_ctime_r_nargs2=yes
6381 else
6382   echo "configure: failed program was:" >&5
6383   cat conftest.$ac_ext >&5
6384   rm -rf conftest*
6385   ol_cv_func_ctime_r_nargs2=no
6386 fi
6387 rm -f conftest*
6388
6389         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6390                 $ol_cv_func_ctime_r_nargs2 = no ; then
6391
6392                 ol_cv_func_ctime_r_nargs=3
6393
6394         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6395                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6396
6397                 ol_cv_func_ctime_r_nargs=2
6398
6399         else
6400                 ol_cv_func_ctime_r_nargs=0
6401         fi
6402   
6403 fi
6404
6405 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6406
6407   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6408         cat >> confdefs.h <<EOF
6409 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6410 EOF
6411
6412   fi
6413
6414 fi
6415
6416 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6417         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6418 echo "configure:6419: checking number of arguments of gethostbyname_r" >&5
6419 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6420   echo $ac_n "(cached) $ac_c" 1>&6
6421 else
6422   cat > conftest.$ac_ext <<EOF
6423 #line 6424 "configure"
6424 #include "confdefs.h"
6425 #include <sys/types.h>
6426 #include <sys/socket.h>
6427 #include <netinet/in.h>
6428 #include <netdb.h>
6429 #define BUFSIZE (sizeof(struct hostent)+10)
6430 int main() {
6431 struct hostent hent; char buffer[BUFSIZE];
6432                 int bufsize=BUFSIZE;int h_errno;
6433                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6434                         buffer, bufsize, &h_errno);
6435 ; return 0; }
6436 EOF
6437 if { (eval echo configure:6438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6438   rm -rf conftest*
6439   ol_cv_func_gethostbyname_r_nargs5=yes
6440 else
6441   echo "configure: failed program was:" >&5
6442   cat conftest.$ac_ext >&5
6443   rm -rf conftest*
6444   ol_cv_func_gethostbyname_r_nargs5=no
6445 fi
6446 rm -f conftest*
6447
6448         cat > conftest.$ac_ext <<EOF
6449 #line 6450 "configure"
6450 #include "confdefs.h"
6451 #include <sys/types.h>
6452 #include <sys/socket.h>
6453 #include <netinet/in.h>
6454 #include <netdb.h>
6455 #define BUFSIZE (sizeof(struct hostent)+10)
6456 int main() {
6457 struct hostent hent;struct hostent *rhent;
6458                 char buffer[BUFSIZE];
6459                 int bufsize=BUFSIZE;int h_errno;
6460                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6461                         &rhent, &h_errno);
6462 ; return 0; }
6463 EOF
6464 if { (eval echo configure:6465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6465   rm -rf conftest*
6466   ol_cv_func_gethostbyname_r_nargs6=yes
6467 else
6468   echo "configure: failed program was:" >&5
6469   cat conftest.$ac_ext >&5
6470   rm -rf conftest*
6471   ol_cv_func_gethostbyname_r_nargs6=no
6472 fi
6473 rm -f conftest*
6474
6475         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6476                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6477
6478                 ol_cv_func_gethostbyname_r_nargs=5
6479
6480         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6481                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6482
6483                 ol_cv_func_gethostbyname_r_nargs=6
6484
6485         else
6486                 ol_cv_func_gethostbyname_r_nargs=0
6487         fi
6488   
6489 fi
6490
6491 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6492   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6493         cat >> confdefs.h <<EOF
6494 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6495 EOF
6496
6497   fi
6498
6499 else
6500         ol_cv_func_gethostbyname_r_nargs=0
6501 fi
6502  
6503 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6504         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6505 echo "configure:6506: checking number of arguments of gethostbyaddr_r" >&5
6506 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6507   echo $ac_n "(cached) $ac_c" 1>&6
6508 else
6509   cat > conftest.$ac_ext <<EOF
6510 #line 6511 "configure"
6511 #include "confdefs.h"
6512 #include <sys/types.h>
6513 #include <sys/socket.h>
6514 #include <netinet/in.h>
6515 #include <netdb.h>
6516 #define BUFSIZE (sizeof(struct hostent)+10)
6517 int main() {
6518 struct hostent hent; char buffer[BUFSIZE]; 
6519             struct in_addr add;
6520             size_t alen=sizeof(struct in_addr);
6521             int bufsize=BUFSIZE;int h_errno;
6522                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6523                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6524 ; return 0; }
6525 EOF
6526 if { (eval echo configure:6527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6527   rm -rf conftest*
6528   ol_cv_func_gethostbyaddr_r_nargs7=yes
6529 else
6530   echo "configure: failed program was:" >&5
6531   cat conftest.$ac_ext >&5
6532   rm -rf conftest*
6533   ol_cv_func_gethostbyaddr_r_nargs7=no
6534 fi
6535 rm -f conftest*
6536
6537         cat > conftest.$ac_ext <<EOF
6538 #line 6539 "configure"
6539 #include "confdefs.h"
6540 #include <sys/types.h>
6541 #include <sys/socket.h>
6542 #include <netinet/in.h>
6543 #include <netdb.h>
6544 #define BUFSIZE (sizeof(struct hostent)+10)
6545 int main() {
6546 struct hostent hent;
6547                 struct hostent *rhent; char buffer[BUFSIZE]; 
6548                 struct in_addr add;
6549                 size_t alen=sizeof(struct in_addr);
6550                 int bufsize=BUFSIZE;int h_errno;
6551                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6552                         alen, AF_INET, &hent, buffer, bufsize, 
6553                         &rhent, &h_errno);
6554 ; return 0; }
6555 EOF
6556 if { (eval echo configure:6557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6557   rm -rf conftest*
6558   ol_cv_func_gethostbyaddr_r_nargs8=yes
6559 else
6560   echo "configure: failed program was:" >&5
6561   cat conftest.$ac_ext >&5
6562   rm -rf conftest*
6563   ol_cv_func_gethostbyaddr_r_nargs8=no
6564 fi
6565 rm -f conftest*
6566
6567         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6568                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6569
6570                 ol_cv_func_gethostbyaddr_r_nargs=7
6571
6572         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6573                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6574
6575                 ol_cv_func_gethostbyaddr_r_nargs=8
6576
6577         else
6578                 ol_cv_func_gethostbyaddr_r_nargs=0
6579         fi
6580   
6581 fi
6582
6583 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6584   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6585     cat >> confdefs.h <<EOF
6586 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6587 EOF
6588
6589   fi
6590
6591 else
6592         ol_cv_func_gethostbyaddr_r_nargs=0
6593 fi
6594
6595 if test "$ac_cv_func_ctime_r" = yes \
6596         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6597         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6598         -a "$ac_cv_func_gethostbyname_r" = yes \
6599         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6600         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6601         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6602         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6603         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6604         ; then
6605  
6606         cat >> confdefs.h <<\EOF
6607 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6608 EOF
6609
6610 fi
6611
6612 ol_link_threads=no
6613
6614 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6615         -o $ol_with_threads = nt ; then
6616
6617         
6618         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6619 echo "configure:6620: checking for NT Threads" >&5
6620 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6621   echo $ac_n "(cached) $ac_c" 1>&6
6622 else
6623   
6624                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6625 echo "configure:6626: checking for _beginthread" >&5
6626 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6627   echo $ac_n "(cached) $ac_c" 1>&6
6628 else
6629   cat > conftest.$ac_ext <<EOF
6630 #line 6631 "configure"
6631 #include "confdefs.h"
6632 /* System header to define __stub macros and hopefully few prototypes,
6633     which can conflict with char _beginthread(); below.  */
6634 #include <assert.h>
6635 /* Override any gcc2 internal prototype to avoid an error.  */
6636 /* We use char because int might match the return type of a gcc2
6637     builtin and then its argument prototype would still apply.  */
6638 char _beginthread();
6639 char (*f)();
6640
6641 int main() {
6642
6643 /* The GNU C library defines this for functions which it implements
6644     to always fail with ENOSYS.  Some functions are actually named
6645     something starting with __ and the normal name is an alias.  */
6646 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6647 choke me
6648 #else
6649 f = _beginthread;
6650 #endif
6651
6652 ; return 0; }
6653 EOF
6654 if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6655   rm -rf conftest*
6656   eval "ac_cv_func__beginthread=yes"
6657 else
6658   echo "configure: failed program was:" >&5
6659   cat conftest.$ac_ext >&5
6660   rm -rf conftest*
6661   eval "ac_cv_func__beginthread=no"
6662 fi
6663 rm -f conftest*
6664 fi
6665
6666 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6667   echo "$ac_t""yes" 1>&6
6668   ol_cv_nt_threads=yes
6669 else
6670   echo "$ac_t""no" 1>&6
6671 ol_cv_nt_threads=no
6672 fi
6673
6674         
6675 fi
6676
6677 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6678
6679         if test $ol_cv_nt_threads = yes ; then
6680                 cat >> confdefs.h <<\EOF
6681 #define HAVE_NT_THREADS 1
6682 EOF
6683
6684         fi
6685
6686
6687         if test "$ol_cv_nt_threads" = yes ; then
6688         ol_link_threads=nt
6689         ol_with_threads=found
6690         ol_with_yielding_select=yes
6691
6692                 cat >> confdefs.h <<\EOF
6693 #define HAVE_NT_SERVICE_MANAGER 1
6694 EOF
6695
6696                 cat >> confdefs.h <<\EOF
6697 #define HAVE_NT_EVENT_LOG 1
6698 EOF
6699
6700         fi
6701
6702         if test $ol_with_threads = nt ; then
6703                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6704         fi
6705 fi
6706
6707 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6708         -o $ol_with_threads = posix ; then
6709
6710         for ac_hdr in pthread.h
6711 do
6712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6714 echo "configure:6715: checking for $ac_hdr" >&5
6715 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6716   echo $ac_n "(cached) $ac_c" 1>&6
6717 else
6718   cat > conftest.$ac_ext <<EOF
6719 #line 6720 "configure"
6720 #include "confdefs.h"
6721 #include <$ac_hdr>
6722 EOF
6723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6724 { (eval echo configure:6725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6726 if test -z "$ac_err"; then
6727   rm -rf conftest*
6728   eval "ac_cv_header_$ac_safe=yes"
6729 else
6730   echo "$ac_err" >&5
6731   echo "configure: failed program was:" >&5
6732   cat conftest.$ac_ext >&5
6733   rm -rf conftest*
6734   eval "ac_cv_header_$ac_safe=no"
6735 fi
6736 rm -f conftest*
6737 fi
6738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6739   echo "$ac_t""yes" 1>&6
6740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6741   cat >> confdefs.h <<EOF
6742 #define $ac_tr_hdr 1
6743 EOF
6744  
6745 else
6746   echo "$ac_t""no" 1>&6
6747 fi
6748 done
6749
6750
6751         if test $ac_cv_header_pthread_h = yes ; then
6752                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6753 echo "configure:6754: checking POSIX thread version" >&5
6754 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6755   echo $ac_n "(cached) $ac_c" 1>&6
6756 else
6757   
6758         cat > conftest.$ac_ext <<EOF
6759 #line 6760 "configure"
6760 #include "confdefs.h"
6761
6762 #               include <pthread.h>
6763                 /* this check could be improved */
6764 #               ifdef PTHREAD_ONCE_INIT
6765                         pthread_version_final;
6766 #               endif
6767         
6768 EOF
6769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6770   egrep "pthread_version_final" >/dev/null 2>&1; then
6771   rm -rf conftest*
6772   ol_pthread_final=yes
6773 else
6774   rm -rf conftest*
6775   ol_pthread_final=no
6776 fi
6777 rm -f conftest*
6778
6779
6780         cat > conftest.$ac_ext <<EOF
6781 #line 6782 "configure"
6782 #include "confdefs.h"
6783
6784 #               include <pthread.h>
6785                 /* this check could be improved */
6786 #               ifdef pthread_once_init
6787                         pthread_version_draft4;
6788 #               endif
6789         
6790 EOF
6791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6792   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6793   rm -rf conftest*
6794   ol_pthread_draft4=yes
6795 else
6796   rm -rf conftest*
6797   ol_pthread_draft4=no
6798 fi
6799 rm -f conftest*
6800
6801
6802         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6803                 ol_cv_pthread_version=final
6804         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6805                 ol_cv_pthread_version=draft4
6806         else
6807                 ol_cv_pthread_version=unknown
6808         fi
6809
6810 fi
6811
6812 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6813
6814
6815                 if test $ol_cv_pthread_version = final ; then
6816                         cat >> confdefs.h <<\EOF
6817 #define HAVE_PTHREADS_FINAL 1
6818 EOF
6819
6820                 elif test $ol_cv_pthread_version = draft4 ; then
6821                         cat >> confdefs.h <<\EOF
6822 #define HAVE_PTHREADS_D4 1
6823 EOF
6824
6825                 else
6826                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6827                 fi
6828
6829                 # consider threads found
6830                 ol_with_threads=found
6831
6832                 
6833         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6834 echo "configure:6835: checking for LinuxThreads pthread.h" >&5
6835 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6836   echo $ac_n "(cached) $ac_c" 1>&6
6837 else
6838   cat > conftest.$ac_ext <<EOF
6839 #line 6840 "configure"
6840 #include "confdefs.h"
6841 #include <pthread.h>
6842 EOF
6843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6844   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6845   rm -rf conftest*
6846   ol_cv_header_linux_threads=yes
6847 else
6848   rm -rf conftest*
6849   ol_cv_header_linux_threads=no
6850 fi
6851 rm -f conftest*
6852
6853                 
6854 fi
6855
6856 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6857         if test $ol_cv_header_linux_threads = yes; then
6858                 cat >> confdefs.h <<\EOF
6859 #define HAVE_LINUX_THREADS 1
6860 EOF
6861
6862         fi
6863
6864                 
6865         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6866 echo "configure:6867: checking for GNU Pth pthread.h" >&5
6867 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6868   echo $ac_n "(cached) $ac_c" 1>&6
6869 else
6870   cat > conftest.$ac_ext <<EOF
6871 #line 6872 "configure"
6872 #include "confdefs.h"
6873 #include <pthread.h>
6874 #ifdef _POSIX_THREAD_IS_GNU_PTH
6875         __gnu_pth__;
6876 #endif
6877
6878 EOF
6879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6880   egrep "__gnu_pth__" >/dev/null 2>&1; then
6881   rm -rf conftest*
6882   ol_cv_header_gnu_pth_pthread_h=yes
6883 else
6884   rm -rf conftest*
6885   ol_cv_header_gnu_pth_pthread_h=no
6886 fi
6887 rm -f conftest*
6888
6889                 
6890 fi
6891
6892 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6893
6894
6895                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6896                         for ac_hdr in sched.h
6897 do
6898 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6899 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6900 echo "configure:6901: checking for $ac_hdr" >&5
6901 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6902   echo $ac_n "(cached) $ac_c" 1>&6
6903 else
6904   cat > conftest.$ac_ext <<EOF
6905 #line 6906 "configure"
6906 #include "confdefs.h"
6907 #include <$ac_hdr>
6908 EOF
6909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6910 { (eval echo configure:6911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6912 if test -z "$ac_err"; then
6913   rm -rf conftest*
6914   eval "ac_cv_header_$ac_safe=yes"
6915 else
6916   echo "$ac_err" >&5
6917   echo "configure: failed program was:" >&5
6918   cat conftest.$ac_ext >&5
6919   rm -rf conftest*
6920   eval "ac_cv_header_$ac_safe=no"
6921 fi
6922 rm -f conftest*
6923 fi
6924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6925   echo "$ac_t""yes" 1>&6
6926     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6927   cat >> confdefs.h <<EOF
6928 #define $ac_tr_hdr 1
6929 EOF
6930  
6931 else
6932   echo "$ac_t""no" 1>&6
6933 fi
6934 done
6935
6936                 fi
6937
6938                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6939                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6940 echo "configure:6941: checking for pthread_create in default libraries" >&5
6941 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6942   echo $ac_n "(cached) $ac_c" 1>&6
6943 else
6944   
6945                 if test "$cross_compiling" = yes; then
6946   cat > conftest.$ac_ext <<EOF
6947 #line 6948 "configure"
6948 #include "confdefs.h"
6949 /* pthread test headers */
6950 #include <pthread.h>
6951 #ifndef NULL
6952 #define NULL (void*)0
6953 #endif
6954
6955 static void *task(p)
6956         void *p;
6957 {
6958         return (void *) (p == NULL);
6959 }
6960
6961 int main() {
6962
6963         /* pthread test function */
6964         pthread_t t;
6965         int status;
6966
6967         /* make sure pthread_create() isn't just a stub */
6968 #if HAVE_PTHREADS_D4
6969         status = pthread_create(&t, pthread_attr_default, task, NULL);
6970 #else
6971         status = pthread_create(&t, NULL, task, NULL);
6972 #endif
6973
6974         if( status ) exit( status );
6975
6976         /* make sure pthread_detach() isn't just a stub */
6977 #if HAVE_PTHREADS_D4
6978         status = pthread_detach( &t );
6979 #else
6980         status = pthread_detach( t );
6981 #endif
6982
6983 #ifdef HAVE_LINUX_THREADS
6984         pthread_kill_other_threads_np();
6985 #endif
6986
6987         exit( status );
6988
6989 ; return 0; }
6990 EOF
6991 if { (eval echo configure:6992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6992   rm -rf conftest*
6993   ol_cv_pthread_create=yes
6994 else
6995   echo "configure: failed program was:" >&5
6996   cat conftest.$ac_ext >&5
6997   rm -rf conftest*
6998   ol_cv_pthread_create=no
6999 fi
7000 rm -f conftest*
7001 else
7002   cat > conftest.$ac_ext <<EOF
7003 #line 7004 "configure"
7004 #include "confdefs.h"
7005 /* pthread test headers */
7006 #include <pthread.h>
7007 #ifndef NULL
7008 #define NULL (void*)0
7009 #endif
7010
7011 static void *task(p)
7012         void *p;
7013 {
7014         return (void *) (p == NULL);
7015 }
7016
7017
7018 int main(argc, argv)
7019         int argc;
7020         char **argv;
7021 {
7022
7023         /* pthread test function */
7024         pthread_t t;
7025         int status;
7026
7027         /* make sure pthread_create() isn't just a stub */
7028 #if HAVE_PTHREADS_D4
7029         status = pthread_create(&t, pthread_attr_default, task, NULL);
7030 #else
7031         status = pthread_create(&t, NULL, task, NULL);
7032 #endif
7033
7034         if( status ) exit( status );
7035
7036         /* make sure pthread_detach() isn't just a stub */
7037 #if HAVE_PTHREADS_D4
7038         status = pthread_detach( &t );
7039 #else
7040         status = pthread_detach( t );
7041 #endif
7042
7043 #ifdef HAVE_LINUX_THREADS
7044         pthread_kill_other_threads_np();
7045 #endif
7046
7047         exit( status );
7048
7049 }
7050
7051 EOF
7052 if { (eval echo configure:7053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7053 then
7054   ol_cv_pthread_create=yes
7055 else
7056   echo "configure: failed program was:" >&5
7057   cat conftest.$ac_ext >&5
7058   rm -fr conftest*
7059   ol_cv_pthread_create=no
7060 fi
7061 rm -fr conftest*
7062 fi
7063
7064 fi
7065
7066 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7067
7068                 if test $ol_cv_pthread_create != no ; then
7069                         ol_link_threads=posix
7070                         ol_link_pthreads=""
7071                 fi
7072                 
7073                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7074 if test "$ol_link_threads" = no ; then
7075         # try -kthread
7076         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7077 echo "configure:7078: checking for pthread link with -kthread" >&5
7078 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7079   echo $ac_n "(cached) $ac_c" 1>&6
7080 else
7081   
7082                 # save the flags
7083                 ol_LIBS="$LIBS"
7084                 LIBS="-kthread $LIBS"
7085
7086                 if test "$cross_compiling" = yes; then
7087   cat > conftest.$ac_ext <<EOF
7088 #line 7089 "configure"
7089 #include "confdefs.h"
7090 /* pthread test headers */
7091 #include <pthread.h>
7092 #ifndef NULL
7093 #define NULL (void*)0
7094 #endif
7095
7096 static void *task(p)
7097         void *p;
7098 {
7099         return (void *) (p == NULL);
7100 }
7101
7102 int main() {
7103
7104         /* pthread test function */
7105         pthread_t t;
7106         int status;
7107
7108         /* make sure pthread_create() isn't just a stub */
7109 #if HAVE_PTHREADS_D4
7110         status = pthread_create(&t, pthread_attr_default, task, NULL);
7111 #else
7112         status = pthread_create(&t, NULL, task, NULL);
7113 #endif
7114
7115         if( status ) exit( status );
7116
7117         /* make sure pthread_detach() isn't just a stub */
7118 #if HAVE_PTHREADS_D4
7119         status = pthread_detach( &t );
7120 #else
7121         status = pthread_detach( t );
7122 #endif
7123
7124 #ifdef HAVE_LINUX_THREADS
7125         pthread_kill_other_threads_np();
7126 #endif
7127
7128         exit( status );
7129
7130 ; return 0; }
7131 EOF
7132 if { (eval echo configure:7133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7133   rm -rf conftest*
7134   ol_cv_pthread_kthread=yes
7135 else
7136   echo "configure: failed program was:" >&5
7137   cat conftest.$ac_ext >&5
7138   rm -rf conftest*
7139   ol_cv_pthread_kthread=no
7140 fi
7141 rm -f conftest*
7142 else
7143   cat > conftest.$ac_ext <<EOF
7144 #line 7145 "configure"
7145 #include "confdefs.h"
7146 /* pthread test headers */
7147 #include <pthread.h>
7148 #ifndef NULL
7149 #define NULL (void*)0
7150 #endif
7151
7152 static void *task(p)
7153         void *p;
7154 {
7155         return (void *) (p == NULL);
7156 }
7157
7158
7159 int main(argc, argv)
7160         int argc;
7161         char **argv;
7162 {
7163
7164         /* pthread test function */
7165         pthread_t t;
7166         int status;
7167
7168         /* make sure pthread_create() isn't just a stub */
7169 #if HAVE_PTHREADS_D4
7170         status = pthread_create(&t, pthread_attr_default, task, NULL);
7171 #else
7172         status = pthread_create(&t, NULL, task, NULL);
7173 #endif
7174
7175         if( status ) exit( status );
7176
7177         /* make sure pthread_detach() isn't just a stub */
7178 #if HAVE_PTHREADS_D4
7179         status = pthread_detach( &t );
7180 #else
7181         status = pthread_detach( t );
7182 #endif
7183
7184 #ifdef HAVE_LINUX_THREADS
7185         pthread_kill_other_threads_np();
7186 #endif
7187
7188         exit( status );
7189
7190 }
7191
7192 EOF
7193 if { (eval echo configure:7194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7194 then
7195   ol_cv_pthread_kthread=yes
7196 else
7197   echo "configure: failed program was:" >&5
7198   cat conftest.$ac_ext >&5
7199   rm -fr conftest*
7200   ol_cv_pthread_kthread=no
7201 fi
7202 rm -fr conftest*
7203 fi
7204
7205
7206                 # restore the LIBS
7207                 LIBS="$ol_LIBS"
7208         
7209 fi
7210
7211 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7212
7213         if test $ol_cv_pthread_kthread = yes ; then
7214                 ol_link_pthreads="-kthread"
7215                 ol_link_threads=posix
7216         fi
7217 fi
7218
7219                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7220 if test "$ol_link_threads" = no ; then
7221         # try -pthread
7222         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7223 echo "configure:7224: checking for pthread link with -pthread" >&5
7224 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7225   echo $ac_n "(cached) $ac_c" 1>&6
7226 else
7227   
7228                 # save the flags
7229                 ol_LIBS="$LIBS"
7230                 LIBS="-pthread $LIBS"
7231
7232                 if test "$cross_compiling" = yes; then
7233   cat > conftest.$ac_ext <<EOF
7234 #line 7235 "configure"
7235 #include "confdefs.h"
7236 /* pthread test headers */
7237 #include <pthread.h>
7238 #ifndef NULL
7239 #define NULL (void*)0
7240 #endif
7241
7242 static void *task(p)
7243         void *p;
7244 {
7245         return (void *) (p == NULL);
7246 }
7247
7248 int main() {
7249
7250         /* pthread test function */
7251         pthread_t t;
7252         int status;
7253
7254         /* make sure pthread_create() isn't just a stub */
7255 #if HAVE_PTHREADS_D4
7256         status = pthread_create(&t, pthread_attr_default, task, NULL);
7257 #else
7258         status = pthread_create(&t, NULL, task, NULL);
7259 #endif
7260
7261         if( status ) exit( status );
7262
7263         /* make sure pthread_detach() isn't just a stub */
7264 #if HAVE_PTHREADS_D4
7265         status = pthread_detach( &t );
7266 #else
7267         status = pthread_detach( t );
7268 #endif
7269
7270 #ifdef HAVE_LINUX_THREADS
7271         pthread_kill_other_threads_np();
7272 #endif
7273
7274         exit( status );
7275
7276 ; return 0; }
7277 EOF
7278 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7279   rm -rf conftest*
7280   ol_cv_pthread_pthread=yes
7281 else
7282   echo "configure: failed program was:" >&5
7283   cat conftest.$ac_ext >&5
7284   rm -rf conftest*
7285   ol_cv_pthread_pthread=no
7286 fi
7287 rm -f conftest*
7288 else
7289   cat > conftest.$ac_ext <<EOF
7290 #line 7291 "configure"
7291 #include "confdefs.h"
7292 /* pthread test headers */
7293 #include <pthread.h>
7294 #ifndef NULL
7295 #define NULL (void*)0
7296 #endif
7297
7298 static void *task(p)
7299         void *p;
7300 {
7301         return (void *) (p == NULL);
7302 }
7303
7304
7305 int main(argc, argv)
7306         int argc;
7307         char **argv;
7308 {
7309
7310         /* pthread test function */
7311         pthread_t t;
7312         int status;
7313
7314         /* make sure pthread_create() isn't just a stub */
7315 #if HAVE_PTHREADS_D4
7316         status = pthread_create(&t, pthread_attr_default, task, NULL);
7317 #else
7318         status = pthread_create(&t, NULL, task, NULL);
7319 #endif
7320
7321         if( status ) exit( status );
7322
7323         /* make sure pthread_detach() isn't just a stub */
7324 #if HAVE_PTHREADS_D4
7325         status = pthread_detach( &t );
7326 #else
7327         status = pthread_detach( t );
7328 #endif
7329
7330 #ifdef HAVE_LINUX_THREADS
7331         pthread_kill_other_threads_np();
7332 #endif
7333
7334         exit( status );
7335
7336 }
7337
7338 EOF
7339 if { (eval echo configure:7340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7340 then
7341   ol_cv_pthread_pthread=yes
7342 else
7343   echo "configure: failed program was:" >&5
7344   cat conftest.$ac_ext >&5
7345   rm -fr conftest*
7346   ol_cv_pthread_pthread=no
7347 fi
7348 rm -fr conftest*
7349 fi
7350
7351
7352                 # restore the LIBS
7353                 LIBS="$ol_LIBS"
7354         
7355 fi
7356
7357 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7358
7359         if test $ol_cv_pthread_pthread = yes ; then
7360                 ol_link_pthreads="-pthread"
7361                 ol_link_threads=posix
7362         fi
7363 fi
7364
7365                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7366 if test "$ol_link_threads" = no ; then
7367         # try -pthreads
7368         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7369 echo "configure:7370: checking for pthread link with -pthreads" >&5
7370 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7371   echo $ac_n "(cached) $ac_c" 1>&6
7372 else
7373   
7374                 # save the flags
7375                 ol_LIBS="$LIBS"
7376                 LIBS="-pthreads $LIBS"
7377
7378                 if test "$cross_compiling" = yes; then
7379   cat > conftest.$ac_ext <<EOF
7380 #line 7381 "configure"
7381 #include "confdefs.h"
7382 /* pthread test headers */
7383 #include <pthread.h>
7384 #ifndef NULL
7385 #define NULL (void*)0
7386 #endif
7387
7388 static void *task(p)
7389         void *p;
7390 {
7391         return (void *) (p == NULL);
7392 }
7393
7394 int main() {
7395
7396         /* pthread test function */
7397         pthread_t t;
7398         int status;
7399
7400         /* make sure pthread_create() isn't just a stub */
7401 #if HAVE_PTHREADS_D4
7402         status = pthread_create(&t, pthread_attr_default, task, NULL);
7403 #else
7404         status = pthread_create(&t, NULL, task, NULL);
7405 #endif
7406
7407         if( status ) exit( status );
7408
7409         /* make sure pthread_detach() isn't just a stub */
7410 #if HAVE_PTHREADS_D4
7411         status = pthread_detach( &t );
7412 #else
7413         status = pthread_detach( t );
7414 #endif
7415
7416 #ifdef HAVE_LINUX_THREADS
7417         pthread_kill_other_threads_np();
7418 #endif
7419
7420         exit( status );
7421
7422 ; return 0; }
7423 EOF
7424 if { (eval echo configure:7425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7425   rm -rf conftest*
7426   ol_cv_pthread_pthreads=yes
7427 else
7428   echo "configure: failed program was:" >&5
7429   cat conftest.$ac_ext >&5
7430   rm -rf conftest*
7431   ol_cv_pthread_pthreads=no
7432 fi
7433 rm -f conftest*
7434 else
7435   cat > conftest.$ac_ext <<EOF
7436 #line 7437 "configure"
7437 #include "confdefs.h"
7438 /* pthread test headers */
7439 #include <pthread.h>
7440 #ifndef NULL
7441 #define NULL (void*)0
7442 #endif
7443
7444 static void *task(p)
7445         void *p;
7446 {
7447         return (void *) (p == NULL);
7448 }
7449
7450
7451 int main(argc, argv)
7452         int argc;
7453         char **argv;
7454 {
7455
7456         /* pthread test function */
7457         pthread_t t;
7458         int status;
7459
7460         /* make sure pthread_create() isn't just a stub */
7461 #if HAVE_PTHREADS_D4
7462         status = pthread_create(&t, pthread_attr_default, task, NULL);
7463 #else
7464         status = pthread_create(&t, NULL, task, NULL);
7465 #endif
7466
7467         if( status ) exit( status );
7468
7469         /* make sure pthread_detach() isn't just a stub */
7470 #if HAVE_PTHREADS_D4
7471         status = pthread_detach( &t );
7472 #else
7473         status = pthread_detach( t );
7474 #endif
7475
7476 #ifdef HAVE_LINUX_THREADS
7477         pthread_kill_other_threads_np();
7478 #endif
7479
7480         exit( status );
7481
7482 }
7483
7484 EOF
7485 if { (eval echo configure:7486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7486 then
7487   ol_cv_pthread_pthreads=yes
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -fr conftest*
7492   ol_cv_pthread_pthreads=no
7493 fi
7494 rm -fr conftest*
7495 fi
7496
7497
7498                 # restore the LIBS
7499                 LIBS="$ol_LIBS"
7500         
7501 fi
7502
7503 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7504
7505         if test $ol_cv_pthread_pthreads = yes ; then
7506                 ol_link_pthreads="-pthreads"
7507                 ol_link_threads=posix
7508         fi
7509 fi
7510
7511                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7512 if test "$ol_link_threads" = no ; then
7513         # try -mthreads
7514         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7515 echo "configure:7516: checking for pthread link with -mthreads" >&5
7516 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7517   echo $ac_n "(cached) $ac_c" 1>&6
7518 else
7519   
7520                 # save the flags
7521                 ol_LIBS="$LIBS"
7522                 LIBS="-mthreads $LIBS"
7523
7524                 if test "$cross_compiling" = yes; then
7525   cat > conftest.$ac_ext <<EOF
7526 #line 7527 "configure"
7527 #include "confdefs.h"
7528 /* pthread test headers */
7529 #include <pthread.h>
7530 #ifndef NULL
7531 #define NULL (void*)0
7532 #endif
7533
7534 static void *task(p)
7535         void *p;
7536 {
7537         return (void *) (p == NULL);
7538 }
7539
7540 int main() {
7541
7542         /* pthread test function */
7543         pthread_t t;
7544         int status;
7545
7546         /* make sure pthread_create() isn't just a stub */
7547 #if HAVE_PTHREADS_D4
7548         status = pthread_create(&t, pthread_attr_default, task, NULL);
7549 #else
7550         status = pthread_create(&t, NULL, task, NULL);
7551 #endif
7552
7553         if( status ) exit( status );
7554
7555         /* make sure pthread_detach() isn't just a stub */
7556 #if HAVE_PTHREADS_D4
7557         status = pthread_detach( &t );
7558 #else
7559         status = pthread_detach( t );
7560 #endif
7561
7562 #ifdef HAVE_LINUX_THREADS
7563         pthread_kill_other_threads_np();
7564 #endif
7565
7566         exit( status );
7567
7568 ; return 0; }
7569 EOF
7570 if { (eval echo configure:7571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7571   rm -rf conftest*
7572   ol_cv_pthread_mthreads=yes
7573 else
7574   echo "configure: failed program was:" >&5
7575   cat conftest.$ac_ext >&5
7576   rm -rf conftest*
7577   ol_cv_pthread_mthreads=no
7578 fi
7579 rm -f conftest*
7580 else
7581   cat > conftest.$ac_ext <<EOF
7582 #line 7583 "configure"
7583 #include "confdefs.h"
7584 /* pthread test headers */
7585 #include <pthread.h>
7586 #ifndef NULL
7587 #define NULL (void*)0
7588 #endif
7589
7590 static void *task(p)
7591         void *p;
7592 {
7593         return (void *) (p == NULL);
7594 }
7595
7596
7597 int main(argc, argv)
7598         int argc;
7599         char **argv;
7600 {
7601
7602         /* pthread test function */
7603         pthread_t t;
7604         int status;
7605
7606         /* make sure pthread_create() isn't just a stub */
7607 #if HAVE_PTHREADS_D4
7608         status = pthread_create(&t, pthread_attr_default, task, NULL);
7609 #else
7610         status = pthread_create(&t, NULL, task, NULL);
7611 #endif
7612
7613         if( status ) exit( status );
7614
7615         /* make sure pthread_detach() isn't just a stub */
7616 #if HAVE_PTHREADS_D4
7617         status = pthread_detach( &t );
7618 #else
7619         status = pthread_detach( t );
7620 #endif
7621
7622 #ifdef HAVE_LINUX_THREADS
7623         pthread_kill_other_threads_np();
7624 #endif
7625
7626         exit( status );
7627
7628 }
7629
7630 EOF
7631 if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7632 then
7633   ol_cv_pthread_mthreads=yes
7634 else
7635   echo "configure: failed program was:" >&5
7636   cat conftest.$ac_ext >&5
7637   rm -fr conftest*
7638   ol_cv_pthread_mthreads=no
7639 fi
7640 rm -fr conftest*
7641 fi
7642
7643
7644                 # restore the LIBS
7645                 LIBS="$ol_LIBS"
7646         
7647 fi
7648
7649 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7650
7651         if test $ol_cv_pthread_mthreads = yes ; then
7652                 ol_link_pthreads="-mthreads"
7653                 ol_link_threads=posix
7654         fi
7655 fi
7656
7657                 # Pthread try link: -thread (ol_cv_pthread_thread)
7658 if test "$ol_link_threads" = no ; then
7659         # try -thread
7660         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7661 echo "configure:7662: checking for pthread link with -thread" >&5
7662 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7663   echo $ac_n "(cached) $ac_c" 1>&6
7664 else
7665   
7666                 # save the flags
7667                 ol_LIBS="$LIBS"
7668                 LIBS="-thread $LIBS"
7669
7670                 if test "$cross_compiling" = yes; then
7671   cat > conftest.$ac_ext <<EOF
7672 #line 7673 "configure"
7673 #include "confdefs.h"
7674 /* pthread test headers */
7675 #include <pthread.h>
7676 #ifndef NULL
7677 #define NULL (void*)0
7678 #endif
7679
7680 static void *task(p)
7681         void *p;
7682 {
7683         return (void *) (p == NULL);
7684 }
7685
7686 int main() {
7687
7688         /* pthread test function */
7689         pthread_t t;
7690         int status;
7691
7692         /* make sure pthread_create() isn't just a stub */
7693 #if HAVE_PTHREADS_D4
7694         status = pthread_create(&t, pthread_attr_default, task, NULL);
7695 #else
7696         status = pthread_create(&t, NULL, task, NULL);
7697 #endif
7698
7699         if( status ) exit( status );
7700
7701         /* make sure pthread_detach() isn't just a stub */
7702 #if HAVE_PTHREADS_D4
7703         status = pthread_detach( &t );
7704 #else
7705         status = pthread_detach( t );
7706 #endif
7707
7708 #ifdef HAVE_LINUX_THREADS
7709         pthread_kill_other_threads_np();
7710 #endif
7711
7712         exit( status );
7713
7714 ; return 0; }
7715 EOF
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7717   rm -rf conftest*
7718   ol_cv_pthread_thread=yes
7719 else
7720   echo "configure: failed program was:" >&5
7721   cat conftest.$ac_ext >&5
7722   rm -rf conftest*
7723   ol_cv_pthread_thread=no
7724 fi
7725 rm -f conftest*
7726 else
7727   cat > conftest.$ac_ext <<EOF
7728 #line 7729 "configure"
7729 #include "confdefs.h"
7730 /* pthread test headers */
7731 #include <pthread.h>
7732 #ifndef NULL
7733 #define NULL (void*)0
7734 #endif
7735
7736 static void *task(p)
7737         void *p;
7738 {
7739         return (void *) (p == NULL);
7740 }
7741
7742
7743 int main(argc, argv)
7744         int argc;
7745         char **argv;
7746 {
7747
7748         /* pthread test function */
7749         pthread_t t;
7750         int status;
7751
7752         /* make sure pthread_create() isn't just a stub */
7753 #if HAVE_PTHREADS_D4
7754         status = pthread_create(&t, pthread_attr_default, task, NULL);
7755 #else
7756         status = pthread_create(&t, NULL, task, NULL);
7757 #endif
7758
7759         if( status ) exit( status );
7760
7761         /* make sure pthread_detach() isn't just a stub */
7762 #if HAVE_PTHREADS_D4
7763         status = pthread_detach( &t );
7764 #else
7765         status = pthread_detach( t );
7766 #endif
7767
7768 #ifdef HAVE_LINUX_THREADS
7769         pthread_kill_other_threads_np();
7770 #endif
7771
7772         exit( status );
7773
7774 }
7775
7776 EOF
7777 if { (eval echo configure:7778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7778 then
7779   ol_cv_pthread_thread=yes
7780 else
7781   echo "configure: failed program was:" >&5
7782   cat conftest.$ac_ext >&5
7783   rm -fr conftest*
7784   ol_cv_pthread_thread=no
7785 fi
7786 rm -fr conftest*
7787 fi
7788
7789
7790                 # restore the LIBS
7791                 LIBS="$ol_LIBS"
7792         
7793 fi
7794
7795 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7796
7797         if test $ol_cv_pthread_thread = yes ; then
7798                 ol_link_pthreads="-thread"
7799                 ol_link_threads=posix
7800         fi
7801 fi
7802
7803
7804                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7805 if test "$ol_link_threads" = no ; then
7806         # try -lpthread -lmach -lexc -lc_r
7807         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7808 echo "configure:7809: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7809 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7810   echo $ac_n "(cached) $ac_c" 1>&6
7811 else
7812   
7813                 # save the flags
7814                 ol_LIBS="$LIBS"
7815                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7816
7817                 if test "$cross_compiling" = yes; then
7818   cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821 /* pthread test headers */
7822 #include <pthread.h>
7823 #ifndef NULL
7824 #define NULL (void*)0
7825 #endif
7826
7827 static void *task(p)
7828         void *p;
7829 {
7830         return (void *) (p == NULL);
7831 }
7832
7833 int main() {
7834
7835         /* pthread test function */
7836         pthread_t t;
7837         int status;
7838
7839         /* make sure pthread_create() isn't just a stub */
7840 #if HAVE_PTHREADS_D4
7841         status = pthread_create(&t, pthread_attr_default, task, NULL);
7842 #else
7843         status = pthread_create(&t, NULL, task, NULL);
7844 #endif
7845
7846         if( status ) exit( status );
7847
7848         /* make sure pthread_detach() isn't just a stub */
7849 #if HAVE_PTHREADS_D4
7850         status = pthread_detach( &t );
7851 #else
7852         status = pthread_detach( t );
7853 #endif
7854
7855 #ifdef HAVE_LINUX_THREADS
7856         pthread_kill_other_threads_np();
7857 #endif
7858
7859         exit( status );
7860
7861 ; return 0; }
7862 EOF
7863 if { (eval echo configure:7864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7864   rm -rf conftest*
7865   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7866 else
7867   echo "configure: failed program was:" >&5
7868   cat conftest.$ac_ext >&5
7869   rm -rf conftest*
7870   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7871 fi
7872 rm -f conftest*
7873 else
7874   cat > conftest.$ac_ext <<EOF
7875 #line 7876 "configure"
7876 #include "confdefs.h"
7877 /* pthread test headers */
7878 #include <pthread.h>
7879 #ifndef NULL
7880 #define NULL (void*)0
7881 #endif
7882
7883 static void *task(p)
7884         void *p;
7885 {
7886         return (void *) (p == NULL);
7887 }
7888
7889
7890 int main(argc, argv)
7891         int argc;
7892         char **argv;
7893 {
7894
7895         /* pthread test function */
7896         pthread_t t;
7897         int status;
7898
7899         /* make sure pthread_create() isn't just a stub */
7900 #if HAVE_PTHREADS_D4
7901         status = pthread_create(&t, pthread_attr_default, task, NULL);
7902 #else
7903         status = pthread_create(&t, NULL, task, NULL);
7904 #endif
7905
7906         if( status ) exit( status );
7907
7908         /* make sure pthread_detach() isn't just a stub */
7909 #if HAVE_PTHREADS_D4
7910         status = pthread_detach( &t );
7911 #else
7912         status = pthread_detach( t );
7913 #endif
7914
7915 #ifdef HAVE_LINUX_THREADS
7916         pthread_kill_other_threads_np();
7917 #endif
7918
7919         exit( status );
7920
7921 }
7922
7923 EOF
7924 if { (eval echo configure:7925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7925 then
7926   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7927 else
7928   echo "configure: failed program was:" >&5
7929   cat conftest.$ac_ext >&5
7930   rm -fr conftest*
7931   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7932 fi
7933 rm -fr conftest*
7934 fi
7935
7936
7937                 # restore the LIBS
7938                 LIBS="$ol_LIBS"
7939         
7940 fi
7941
7942 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7943
7944         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7945                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7946                 ol_link_threads=posix
7947         fi
7948 fi
7949
7950                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7951 if test "$ol_link_threads" = no ; then
7952         # try -lpthread -lmach -lexc
7953         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7954 echo "configure:7955: checking for pthread link with -lpthread -lmach -lexc" >&5
7955 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7956   echo $ac_n "(cached) $ac_c" 1>&6
7957 else
7958   
7959                 # save the flags
7960                 ol_LIBS="$LIBS"
7961                 LIBS="-lpthread -lmach -lexc $LIBS"
7962
7963                 if test "$cross_compiling" = yes; then
7964   cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 /* pthread test headers */
7968 #include <pthread.h>
7969 #ifndef NULL
7970 #define NULL (void*)0
7971 #endif
7972
7973 static void *task(p)
7974         void *p;
7975 {
7976         return (void *) (p == NULL);
7977 }
7978
7979 int main() {
7980
7981         /* pthread test function */
7982         pthread_t t;
7983         int status;
7984
7985         /* make sure pthread_create() isn't just a stub */
7986 #if HAVE_PTHREADS_D4
7987         status = pthread_create(&t, pthread_attr_default, task, NULL);
7988 #else
7989         status = pthread_create(&t, NULL, task, NULL);
7990 #endif
7991
7992         if( status ) exit( status );
7993
7994         /* make sure pthread_detach() isn't just a stub */
7995 #if HAVE_PTHREADS_D4
7996         status = pthread_detach( &t );
7997 #else
7998         status = pthread_detach( t );
7999 #endif
8000
8001 #ifdef HAVE_LINUX_THREADS
8002         pthread_kill_other_threads_np();
8003 #endif
8004
8005         exit( status );
8006
8007 ; return 0; }
8008 EOF
8009 if { (eval echo configure:8010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8010   rm -rf conftest*
8011   ol_cv_pthread_lpthread_lmach_lexc=yes
8012 else
8013   echo "configure: failed program was:" >&5
8014   cat conftest.$ac_ext >&5
8015   rm -rf conftest*
8016   ol_cv_pthread_lpthread_lmach_lexc=no
8017 fi
8018 rm -f conftest*
8019 else
8020   cat > conftest.$ac_ext <<EOF
8021 #line 8022 "configure"
8022 #include "confdefs.h"
8023 /* pthread test headers */
8024 #include <pthread.h>
8025 #ifndef NULL
8026 #define NULL (void*)0
8027 #endif
8028
8029 static void *task(p)
8030         void *p;
8031 {
8032         return (void *) (p == NULL);
8033 }
8034
8035
8036 int main(argc, argv)
8037         int argc;
8038         char **argv;
8039 {
8040
8041         /* pthread test function */
8042         pthread_t t;
8043         int status;
8044
8045         /* make sure pthread_create() isn't just a stub */
8046 #if HAVE_PTHREADS_D4
8047         status = pthread_create(&t, pthread_attr_default, task, NULL);
8048 #else
8049         status = pthread_create(&t, NULL, task, NULL);
8050 #endif
8051
8052         if( status ) exit( status );
8053
8054         /* make sure pthread_detach() isn't just a stub */
8055 #if HAVE_PTHREADS_D4
8056         status = pthread_detach( &t );
8057 #else
8058         status = pthread_detach( t );
8059 #endif
8060
8061 #ifdef HAVE_LINUX_THREADS
8062         pthread_kill_other_threads_np();
8063 #endif
8064
8065         exit( status );
8066
8067 }
8068
8069 EOF
8070 if { (eval echo configure:8071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8071 then
8072   ol_cv_pthread_lpthread_lmach_lexc=yes
8073 else
8074   echo "configure: failed program was:" >&5
8075   cat conftest.$ac_ext >&5
8076   rm -fr conftest*
8077   ol_cv_pthread_lpthread_lmach_lexc=no
8078 fi
8079 rm -fr conftest*
8080 fi
8081
8082
8083                 # restore the LIBS
8084                 LIBS="$ol_LIBS"
8085         
8086 fi
8087
8088 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8089
8090         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8091                 ol_link_pthreads="-lpthread -lmach -lexc"
8092                 ol_link_threads=posix
8093         fi
8094 fi
8095
8096
8097                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8098 if test "$ol_link_threads" = no ; then
8099         # try -lpthread -Wl,-woff,85
8100         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8101 echo "configure:8102: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8102 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8103   echo $ac_n "(cached) $ac_c" 1>&6
8104 else
8105   
8106                 # save the flags
8107                 ol_LIBS="$LIBS"
8108                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8109
8110                 if test "$cross_compiling" = yes; then
8111   cat > conftest.$ac_ext <<EOF
8112 #line 8113 "configure"
8113 #include "confdefs.h"
8114 /* pthread test headers */
8115 #include <pthread.h>
8116 #ifndef NULL
8117 #define NULL (void*)0
8118 #endif
8119
8120 static void *task(p)
8121         void *p;
8122 {
8123         return (void *) (p == NULL);
8124 }
8125
8126 int main() {
8127
8128         /* pthread test function */
8129         pthread_t t;
8130         int status;
8131
8132         /* make sure pthread_create() isn't just a stub */
8133 #if HAVE_PTHREADS_D4
8134         status = pthread_create(&t, pthread_attr_default, task, NULL);
8135 #else
8136         status = pthread_create(&t, NULL, task, NULL);
8137 #endif
8138
8139         if( status ) exit( status );
8140
8141         /* make sure pthread_detach() isn't just a stub */
8142 #if HAVE_PTHREADS_D4
8143         status = pthread_detach( &t );
8144 #else
8145         status = pthread_detach( t );
8146 #endif
8147
8148 #ifdef HAVE_LINUX_THREADS
8149         pthread_kill_other_threads_np();
8150 #endif
8151
8152         exit( status );
8153
8154 ; return 0; }
8155 EOF
8156 if { (eval echo configure:8157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8157   rm -rf conftest*
8158   ol_cv_pthread_lib_lpthread_woff=yes
8159 else
8160   echo "configure: failed program was:" >&5
8161   cat conftest.$ac_ext >&5
8162   rm -rf conftest*
8163   ol_cv_pthread_lib_lpthread_woff=no
8164 fi
8165 rm -f conftest*
8166 else
8167   cat > conftest.$ac_ext <<EOF
8168 #line 8169 "configure"
8169 #include "confdefs.h"
8170 /* pthread test headers */
8171 #include <pthread.h>
8172 #ifndef NULL
8173 #define NULL (void*)0
8174 #endif
8175
8176 static void *task(p)
8177         void *p;
8178 {
8179         return (void *) (p == NULL);
8180 }
8181
8182
8183 int main(argc, argv)
8184         int argc;
8185         char **argv;
8186 {
8187
8188         /* pthread test function */
8189         pthread_t t;
8190         int status;
8191
8192         /* make sure pthread_create() isn't just a stub */
8193 #if HAVE_PTHREADS_D4
8194         status = pthread_create(&t, pthread_attr_default, task, NULL);
8195 #else
8196         status = pthread_create(&t, NULL, task, NULL);
8197 #endif
8198
8199         if( status ) exit( status );
8200
8201         /* make sure pthread_detach() isn't just a stub */
8202 #if HAVE_PTHREADS_D4
8203         status = pthread_detach( &t );
8204 #else
8205         status = pthread_detach( t );
8206 #endif
8207
8208 #ifdef HAVE_LINUX_THREADS
8209         pthread_kill_other_threads_np();
8210 #endif
8211
8212         exit( status );
8213
8214 }
8215
8216 EOF
8217 if { (eval echo configure:8218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8218 then
8219   ol_cv_pthread_lib_lpthread_woff=yes
8220 else
8221   echo "configure: failed program was:" >&5
8222   cat conftest.$ac_ext >&5
8223   rm -fr conftest*
8224   ol_cv_pthread_lib_lpthread_woff=no
8225 fi
8226 rm -fr conftest*
8227 fi
8228
8229
8230                 # restore the LIBS
8231                 LIBS="$ol_LIBS"
8232         
8233 fi
8234
8235 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8236
8237         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8238                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8239                 ol_link_threads=posix
8240         fi
8241 fi
8242
8243
8244                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8245 if test "$ol_link_threads" = no ; then
8246         # try -lpthread
8247         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8248 echo "configure:8249: checking for pthread link with -lpthread" >&5
8249 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8250   echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252   
8253                 # save the flags
8254                 ol_LIBS="$LIBS"
8255                 LIBS="-lpthread $LIBS"
8256
8257                 if test "$cross_compiling" = yes; then
8258   cat > conftest.$ac_ext <<EOF
8259 #line 8260 "configure"
8260 #include "confdefs.h"
8261 /* pthread test headers */
8262 #include <pthread.h>
8263 #ifndef NULL
8264 #define NULL (void*)0
8265 #endif
8266
8267 static void *task(p)
8268         void *p;
8269 {
8270         return (void *) (p == NULL);
8271 }
8272
8273 int main() {
8274
8275         /* pthread test function */
8276         pthread_t t;
8277         int status;
8278
8279         /* make sure pthread_create() isn't just a stub */
8280 #if HAVE_PTHREADS_D4
8281         status = pthread_create(&t, pthread_attr_default, task, NULL);
8282 #else
8283         status = pthread_create(&t, NULL, task, NULL);
8284 #endif
8285
8286         if( status ) exit( status );
8287
8288         /* make sure pthread_detach() isn't just a stub */
8289 #if HAVE_PTHREADS_D4
8290         status = pthread_detach( &t );
8291 #else
8292         status = pthread_detach( t );
8293 #endif
8294
8295 #ifdef HAVE_LINUX_THREADS
8296         pthread_kill_other_threads_np();
8297 #endif
8298
8299         exit( status );
8300
8301 ; return 0; }
8302 EOF
8303 if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8304   rm -rf conftest*
8305   ol_cv_pthread_lpthread=yes
8306 else
8307   echo "configure: failed program was:" >&5
8308   cat conftest.$ac_ext >&5
8309   rm -rf conftest*
8310   ol_cv_pthread_lpthread=no
8311 fi
8312 rm -f conftest*
8313 else
8314   cat > conftest.$ac_ext <<EOF
8315 #line 8316 "configure"
8316 #include "confdefs.h"
8317 /* pthread test headers */
8318 #include <pthread.h>
8319 #ifndef NULL
8320 #define NULL (void*)0
8321 #endif
8322
8323 static void *task(p)
8324         void *p;
8325 {
8326         return (void *) (p == NULL);
8327 }
8328
8329
8330 int main(argc, argv)
8331         int argc;
8332         char **argv;
8333 {
8334
8335         /* pthread test function */
8336         pthread_t t;
8337         int status;
8338
8339         /* make sure pthread_create() isn't just a stub */
8340 #if HAVE_PTHREADS_D4
8341         status = pthread_create(&t, pthread_attr_default, task, NULL);
8342 #else
8343         status = pthread_create(&t, NULL, task, NULL);
8344 #endif
8345
8346         if( status ) exit( status );
8347
8348         /* make sure pthread_detach() isn't just a stub */
8349 #if HAVE_PTHREADS_D4
8350         status = pthread_detach( &t );
8351 #else
8352         status = pthread_detach( t );
8353 #endif
8354
8355 #ifdef HAVE_LINUX_THREADS
8356         pthread_kill_other_threads_np();
8357 #endif
8358
8359         exit( status );
8360
8361 }
8362
8363 EOF
8364 if { (eval echo configure:8365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8365 then
8366   ol_cv_pthread_lpthread=yes
8367 else
8368   echo "configure: failed program was:" >&5
8369   cat conftest.$ac_ext >&5
8370   rm -fr conftest*
8371   ol_cv_pthread_lpthread=no
8372 fi
8373 rm -fr conftest*
8374 fi
8375
8376
8377                 # restore the LIBS
8378                 LIBS="$ol_LIBS"
8379         
8380 fi
8381
8382 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8383
8384         if test $ol_cv_pthread_lpthread = yes ; then
8385                 ol_link_pthreads="-lpthread"
8386                 ol_link_threads=posix
8387         fi
8388 fi
8389
8390                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8391 if test "$ol_link_threads" = no ; then
8392         # try -lc_r
8393         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8394 echo "configure:8395: checking for pthread link with -lc_r" >&5
8395 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8396   echo $ac_n "(cached) $ac_c" 1>&6
8397 else
8398   
8399                 # save the flags
8400                 ol_LIBS="$LIBS"
8401                 LIBS="-lc_r $LIBS"
8402
8403                 if test "$cross_compiling" = yes; then
8404   cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 /* pthread test headers */
8408 #include <pthread.h>
8409 #ifndef NULL
8410 #define NULL (void*)0
8411 #endif
8412
8413 static void *task(p)
8414         void *p;
8415 {
8416         return (void *) (p == NULL);
8417 }
8418
8419 int main() {
8420
8421         /* pthread test function */
8422         pthread_t t;
8423         int status;
8424
8425         /* make sure pthread_create() isn't just a stub */
8426 #if HAVE_PTHREADS_D4
8427         status = pthread_create(&t, pthread_attr_default, task, NULL);
8428 #else
8429         status = pthread_create(&t, NULL, task, NULL);
8430 #endif
8431
8432         if( status ) exit( status );
8433
8434         /* make sure pthread_detach() isn't just a stub */
8435 #if HAVE_PTHREADS_D4
8436         status = pthread_detach( &t );
8437 #else
8438         status = pthread_detach( t );
8439 #endif
8440
8441 #ifdef HAVE_LINUX_THREADS
8442         pthread_kill_other_threads_np();
8443 #endif
8444
8445         exit( status );
8446
8447 ; return 0; }
8448 EOF
8449 if { (eval echo configure:8450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8450   rm -rf conftest*
8451   ol_cv_pthread_lc_r=yes
8452 else
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   ol_cv_pthread_lc_r=no
8457 fi
8458 rm -f conftest*
8459 else
8460   cat > conftest.$ac_ext <<EOF
8461 #line 8462 "configure"
8462 #include "confdefs.h"
8463 /* pthread test headers */
8464 #include <pthread.h>
8465 #ifndef NULL
8466 #define NULL (void*)0
8467 #endif
8468
8469 static void *task(p)
8470         void *p;
8471 {
8472         return (void *) (p == NULL);
8473 }
8474
8475
8476 int main(argc, argv)
8477         int argc;
8478         char **argv;
8479 {
8480
8481         /* pthread test function */
8482         pthread_t t;
8483         int status;
8484
8485         /* make sure pthread_create() isn't just a stub */
8486 #if HAVE_PTHREADS_D4
8487         status = pthread_create(&t, pthread_attr_default, task, NULL);
8488 #else
8489         status = pthread_create(&t, NULL, task, NULL);
8490 #endif
8491
8492         if( status ) exit( status );
8493
8494         /* make sure pthread_detach() isn't just a stub */
8495 #if HAVE_PTHREADS_D4
8496         status = pthread_detach( &t );
8497 #else
8498         status = pthread_detach( t );
8499 #endif
8500
8501 #ifdef HAVE_LINUX_THREADS
8502         pthread_kill_other_threads_np();
8503 #endif
8504
8505         exit( status );
8506
8507 }
8508
8509 EOF
8510 if { (eval echo configure:8511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8511 then
8512   ol_cv_pthread_lc_r=yes
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -fr conftest*
8517   ol_cv_pthread_lc_r=no
8518 fi
8519 rm -fr conftest*
8520 fi
8521
8522
8523                 # restore the LIBS
8524                 LIBS="$ol_LIBS"
8525         
8526 fi
8527
8528 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8529
8530         if test $ol_cv_pthread_lc_r = yes ; then
8531                 ol_link_pthreads="-lc_r"
8532                 ol_link_threads=posix
8533         fi
8534 fi
8535
8536
8537                 # Pthread try link: -threads (ol_cv_pthread_threads)
8538 if test "$ol_link_threads" = no ; then
8539         # try -threads
8540         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8541 echo "configure:8542: checking for pthread link with -threads" >&5
8542 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8543   echo $ac_n "(cached) $ac_c" 1>&6
8544 else
8545   
8546                 # save the flags
8547                 ol_LIBS="$LIBS"
8548                 LIBS="-threads $LIBS"
8549
8550                 if test "$cross_compiling" = yes; then
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* pthread test headers */
8555 #include <pthread.h>
8556 #ifndef NULL
8557 #define NULL (void*)0
8558 #endif
8559
8560 static void *task(p)
8561         void *p;
8562 {
8563         return (void *) (p == NULL);
8564 }
8565
8566 int main() {
8567
8568         /* pthread test function */
8569         pthread_t t;
8570         int status;
8571
8572         /* make sure pthread_create() isn't just a stub */
8573 #if HAVE_PTHREADS_D4
8574         status = pthread_create(&t, pthread_attr_default, task, NULL);
8575 #else
8576         status = pthread_create(&t, NULL, task, NULL);
8577 #endif
8578
8579         if( status ) exit( status );
8580
8581         /* make sure pthread_detach() isn't just a stub */
8582 #if HAVE_PTHREADS_D4
8583         status = pthread_detach( &t );
8584 #else
8585         status = pthread_detach( t );
8586 #endif
8587
8588 #ifdef HAVE_LINUX_THREADS
8589         pthread_kill_other_threads_np();
8590 #endif
8591
8592         exit( status );
8593
8594 ; return 0; }
8595 EOF
8596 if { (eval echo configure:8597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8597   rm -rf conftest*
8598   ol_cv_pthread_threads=yes
8599 else
8600   echo "configure: failed program was:" >&5
8601   cat conftest.$ac_ext >&5
8602   rm -rf conftest*
8603   ol_cv_pthread_threads=no
8604 fi
8605 rm -f conftest*
8606 else
8607   cat > conftest.$ac_ext <<EOF
8608 #line 8609 "configure"
8609 #include "confdefs.h"
8610 /* pthread test headers */
8611 #include <pthread.h>
8612 #ifndef NULL
8613 #define NULL (void*)0
8614 #endif
8615
8616 static void *task(p)
8617         void *p;
8618 {
8619         return (void *) (p == NULL);
8620 }
8621
8622
8623 int main(argc, argv)
8624         int argc;
8625         char **argv;
8626 {
8627
8628         /* pthread test function */
8629         pthread_t t;
8630         int status;
8631
8632         /* make sure pthread_create() isn't just a stub */
8633 #if HAVE_PTHREADS_D4
8634         status = pthread_create(&t, pthread_attr_default, task, NULL);
8635 #else
8636         status = pthread_create(&t, NULL, task, NULL);
8637 #endif
8638
8639         if( status ) exit( status );
8640
8641         /* make sure pthread_detach() isn't just a stub */
8642 #if HAVE_PTHREADS_D4
8643         status = pthread_detach( &t );
8644 #else
8645         status = pthread_detach( t );
8646 #endif
8647
8648 #ifdef HAVE_LINUX_THREADS
8649         pthread_kill_other_threads_np();
8650 #endif
8651
8652         exit( status );
8653
8654 }
8655
8656 EOF
8657 if { (eval echo configure:8658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8658 then
8659   ol_cv_pthread_threads=yes
8660 else
8661   echo "configure: failed program was:" >&5
8662   cat conftest.$ac_ext >&5
8663   rm -fr conftest*
8664   ol_cv_pthread_threads=no
8665 fi
8666 rm -fr conftest*
8667 fi
8668
8669
8670                 # restore the LIBS
8671                 LIBS="$ol_LIBS"
8672         
8673 fi
8674
8675 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8676
8677         if test $ol_cv_pthread_threads = yes ; then
8678                 ol_link_pthreads="-threads"
8679                 ol_link_threads=posix
8680         fi
8681 fi
8682
8683
8684                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8685 if test "$ol_link_threads" = no ; then
8686         # try -lpthreads -lmach -lexc -lc_r
8687         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8688 echo "configure:8689: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8689 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8690   echo $ac_n "(cached) $ac_c" 1>&6
8691 else
8692   
8693                 # save the flags
8694                 ol_LIBS="$LIBS"
8695                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8696
8697                 if test "$cross_compiling" = yes; then
8698   cat > conftest.$ac_ext <<EOF
8699 #line 8700 "configure"
8700 #include "confdefs.h"
8701 /* pthread test headers */
8702 #include <pthread.h>
8703 #ifndef NULL
8704 #define NULL (void*)0
8705 #endif
8706
8707 static void *task(p)
8708         void *p;
8709 {
8710         return (void *) (p == NULL);
8711 }
8712
8713 int main() {
8714
8715         /* pthread test function */
8716         pthread_t t;
8717         int status;
8718
8719         /* make sure pthread_create() isn't just a stub */
8720 #if HAVE_PTHREADS_D4
8721         status = pthread_create(&t, pthread_attr_default, task, NULL);
8722 #else
8723         status = pthread_create(&t, NULL, task, NULL);
8724 #endif
8725
8726         if( status ) exit( status );
8727
8728         /* make sure pthread_detach() isn't just a stub */
8729 #if HAVE_PTHREADS_D4
8730         status = pthread_detach( &t );
8731 #else
8732         status = pthread_detach( t );
8733 #endif
8734
8735 #ifdef HAVE_LINUX_THREADS
8736         pthread_kill_other_threads_np();
8737 #endif
8738
8739         exit( status );
8740
8741 ; return 0; }
8742 EOF
8743 if { (eval echo configure:8744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8744   rm -rf conftest*
8745   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8746 else
8747   echo "configure: failed program was:" >&5
8748   cat conftest.$ac_ext >&5
8749   rm -rf conftest*
8750   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8751 fi
8752 rm -f conftest*
8753 else
8754   cat > conftest.$ac_ext <<EOF
8755 #line 8756 "configure"
8756 #include "confdefs.h"
8757 /* pthread test headers */
8758 #include <pthread.h>
8759 #ifndef NULL
8760 #define NULL (void*)0
8761 #endif
8762
8763 static void *task(p)
8764         void *p;
8765 {
8766         return (void *) (p == NULL);
8767 }
8768
8769
8770 int main(argc, argv)
8771         int argc;
8772         char **argv;
8773 {
8774
8775         /* pthread test function */
8776         pthread_t t;
8777         int status;
8778
8779         /* make sure pthread_create() isn't just a stub */
8780 #if HAVE_PTHREADS_D4
8781         status = pthread_create(&t, pthread_attr_default, task, NULL);
8782 #else
8783         status = pthread_create(&t, NULL, task, NULL);
8784 #endif
8785
8786         if( status ) exit( status );
8787
8788         /* make sure pthread_detach() isn't just a stub */
8789 #if HAVE_PTHREADS_D4
8790         status = pthread_detach( &t );
8791 #else
8792         status = pthread_detach( t );
8793 #endif
8794
8795 #ifdef HAVE_LINUX_THREADS
8796         pthread_kill_other_threads_np();
8797 #endif
8798
8799         exit( status );
8800
8801 }
8802
8803 EOF
8804 if { (eval echo configure:8805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8805 then
8806   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8807 else
8808   echo "configure: failed program was:" >&5
8809   cat conftest.$ac_ext >&5
8810   rm -fr conftest*
8811   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8812 fi
8813 rm -fr conftest*
8814 fi
8815
8816
8817                 # restore the LIBS
8818                 LIBS="$ol_LIBS"
8819         
8820 fi
8821
8822 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8823
8824         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8825                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8826                 ol_link_threads=posix
8827         fi
8828 fi
8829
8830                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8831 if test "$ol_link_threads" = no ; then
8832         # try -lpthreads -lmach -lexc
8833         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8834 echo "configure:8835: checking for pthread link with -lpthreads -lmach -lexc" >&5
8835 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8836   echo $ac_n "(cached) $ac_c" 1>&6
8837 else
8838   
8839                 # save the flags
8840                 ol_LIBS="$LIBS"
8841                 LIBS="-lpthreads -lmach -lexc $LIBS"
8842
8843                 if test "$cross_compiling" = yes; then
8844   cat > conftest.$ac_ext <<EOF
8845 #line 8846 "configure"
8846 #include "confdefs.h"
8847 /* pthread test headers */
8848 #include <pthread.h>
8849 #ifndef NULL
8850 #define NULL (void*)0
8851 #endif
8852
8853 static void *task(p)
8854         void *p;
8855 {
8856         return (void *) (p == NULL);
8857 }
8858
8859 int main() {
8860
8861         /* pthread test function */
8862         pthread_t t;
8863         int status;
8864
8865         /* make sure pthread_create() isn't just a stub */
8866 #if HAVE_PTHREADS_D4
8867         status = pthread_create(&t, pthread_attr_default, task, NULL);
8868 #else
8869         status = pthread_create(&t, NULL, task, NULL);
8870 #endif
8871
8872         if( status ) exit( status );
8873
8874         /* make sure pthread_detach() isn't just a stub */
8875 #if HAVE_PTHREADS_D4
8876         status = pthread_detach( &t );
8877 #else
8878         status = pthread_detach( t );
8879 #endif
8880
8881 #ifdef HAVE_LINUX_THREADS
8882         pthread_kill_other_threads_np();
8883 #endif
8884
8885         exit( status );
8886
8887 ; return 0; }
8888 EOF
8889 if { (eval echo configure:8890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8890   rm -rf conftest*
8891   ol_cv_pthread_lpthreads_lmach_lexc=yes
8892 else
8893   echo "configure: failed program was:" >&5
8894   cat conftest.$ac_ext >&5
8895   rm -rf conftest*
8896   ol_cv_pthread_lpthreads_lmach_lexc=no
8897 fi
8898 rm -f conftest*
8899 else
8900   cat > conftest.$ac_ext <<EOF
8901 #line 8902 "configure"
8902 #include "confdefs.h"
8903 /* pthread test headers */
8904 #include <pthread.h>
8905 #ifndef NULL
8906 #define NULL (void*)0
8907 #endif
8908
8909 static void *task(p)
8910         void *p;
8911 {
8912         return (void *) (p == NULL);
8913 }
8914
8915
8916 int main(argc, argv)
8917         int argc;
8918         char **argv;
8919 {
8920
8921         /* pthread test function */
8922         pthread_t t;
8923         int status;
8924
8925         /* make sure pthread_create() isn't just a stub */
8926 #if HAVE_PTHREADS_D4
8927         status = pthread_create(&t, pthread_attr_default, task, NULL);
8928 #else
8929         status = pthread_create(&t, NULL, task, NULL);
8930 #endif
8931
8932         if( status ) exit( status );
8933
8934         /* make sure pthread_detach() isn't just a stub */
8935 #if HAVE_PTHREADS_D4
8936         status = pthread_detach( &t );
8937 #else
8938         status = pthread_detach( t );
8939 #endif
8940
8941 #ifdef HAVE_LINUX_THREADS
8942         pthread_kill_other_threads_np();
8943 #endif
8944
8945         exit( status );
8946
8947 }
8948
8949 EOF
8950 if { (eval echo configure:8951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8951 then
8952   ol_cv_pthread_lpthreads_lmach_lexc=yes
8953 else
8954   echo "configure: failed program was:" >&5
8955   cat conftest.$ac_ext >&5
8956   rm -fr conftest*
8957   ol_cv_pthread_lpthreads_lmach_lexc=no
8958 fi
8959 rm -fr conftest*
8960 fi
8961
8962
8963                 # restore the LIBS
8964                 LIBS="$ol_LIBS"
8965         
8966 fi
8967
8968 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8969
8970         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8971                 ol_link_pthreads="-lpthreads -lmach -lexc"
8972                 ol_link_threads=posix
8973         fi
8974 fi
8975
8976                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8977 if test "$ol_link_threads" = no ; then
8978         # try -lpthreads -lexc
8979         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8980 echo "configure:8981: checking for pthread link with -lpthreads -lexc" >&5
8981 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   
8985                 # save the flags
8986                 ol_LIBS="$LIBS"
8987                 LIBS="-lpthreads -lexc $LIBS"
8988
8989                 if test "$cross_compiling" = yes; then
8990   cat > conftest.$ac_ext <<EOF
8991 #line 8992 "configure"
8992 #include "confdefs.h"
8993 /* pthread test headers */
8994 #include <pthread.h>
8995 #ifndef NULL
8996 #define NULL (void*)0
8997 #endif
8998
8999 static void *task(p)
9000         void *p;
9001 {
9002         return (void *) (p == NULL);
9003 }
9004
9005 int main() {
9006
9007         /* pthread test function */
9008         pthread_t t;
9009         int status;
9010
9011         /* make sure pthread_create() isn't just a stub */
9012 #if HAVE_PTHREADS_D4
9013         status = pthread_create(&t, pthread_attr_default, task, NULL);
9014 #else
9015         status = pthread_create(&t, NULL, task, NULL);
9016 #endif
9017
9018         if( status ) exit( status );
9019
9020         /* make sure pthread_detach() isn't just a stub */
9021 #if HAVE_PTHREADS_D4
9022         status = pthread_detach( &t );
9023 #else
9024         status = pthread_detach( t );
9025 #endif
9026
9027 #ifdef HAVE_LINUX_THREADS
9028         pthread_kill_other_threads_np();
9029 #endif
9030
9031         exit( status );
9032
9033 ; return 0; }
9034 EOF
9035 if { (eval echo configure:9036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9036   rm -rf conftest*
9037   ol_cv_pthread_lpthreads_lexc=yes
9038 else
9039   echo "configure: failed program was:" >&5
9040   cat conftest.$ac_ext >&5
9041   rm -rf conftest*
9042   ol_cv_pthread_lpthreads_lexc=no
9043 fi
9044 rm -f conftest*
9045 else
9046   cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049 /* pthread test headers */
9050 #include <pthread.h>
9051 #ifndef NULL
9052 #define NULL (void*)0
9053 #endif
9054
9055 static void *task(p)
9056         void *p;
9057 {
9058         return (void *) (p == NULL);
9059 }
9060
9061
9062 int main(argc, argv)
9063         int argc;
9064         char **argv;
9065 {
9066
9067         /* pthread test function */
9068         pthread_t t;
9069         int status;
9070
9071         /* make sure pthread_create() isn't just a stub */
9072 #if HAVE_PTHREADS_D4
9073         status = pthread_create(&t, pthread_attr_default, task, NULL);
9074 #else
9075         status = pthread_create(&t, NULL, task, NULL);
9076 #endif
9077
9078         if( status ) exit( status );
9079
9080         /* make sure pthread_detach() isn't just a stub */
9081 #if HAVE_PTHREADS_D4
9082         status = pthread_detach( &t );
9083 #else
9084         status = pthread_detach( t );
9085 #endif
9086
9087 #ifdef HAVE_LINUX_THREADS
9088         pthread_kill_other_threads_np();
9089 #endif
9090
9091         exit( status );
9092
9093 }
9094
9095 EOF
9096 if { (eval echo configure:9097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9097 then
9098   ol_cv_pthread_lpthreads_lexc=yes
9099 else
9100   echo "configure: failed program was:" >&5
9101   cat conftest.$ac_ext >&5
9102   rm -fr conftest*
9103   ol_cv_pthread_lpthreads_lexc=no
9104 fi
9105 rm -fr conftest*
9106 fi
9107
9108
9109                 # restore the LIBS
9110                 LIBS="$ol_LIBS"
9111         
9112 fi
9113
9114 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9115
9116         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9117                 ol_link_pthreads="-lpthreads -lexc"
9118                 ol_link_threads=posix
9119         fi
9120 fi
9121
9122
9123                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9124 if test "$ol_link_threads" = no ; then
9125         # try -lpthreads
9126         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9127 echo "configure:9128: checking for pthread link with -lpthreads" >&5
9128 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9129   echo $ac_n "(cached) $ac_c" 1>&6
9130 else
9131   
9132                 # save the flags
9133                 ol_LIBS="$LIBS"
9134                 LIBS="-lpthreads $LIBS"
9135
9136                 if test "$cross_compiling" = yes; then
9137   cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 /* pthread test headers */
9141 #include <pthread.h>
9142 #ifndef NULL
9143 #define NULL (void*)0
9144 #endif
9145
9146 static void *task(p)
9147         void *p;
9148 {
9149         return (void *) (p == NULL);
9150 }
9151
9152 int main() {
9153
9154         /* pthread test function */
9155         pthread_t t;
9156         int status;
9157
9158         /* make sure pthread_create() isn't just a stub */
9159 #if HAVE_PTHREADS_D4
9160         status = pthread_create(&t, pthread_attr_default, task, NULL);
9161 #else
9162         status = pthread_create(&t, NULL, task, NULL);
9163 #endif
9164
9165         if( status ) exit( status );
9166
9167         /* make sure pthread_detach() isn't just a stub */
9168 #if HAVE_PTHREADS_D4
9169         status = pthread_detach( &t );
9170 #else
9171         status = pthread_detach( t );
9172 #endif
9173
9174 #ifdef HAVE_LINUX_THREADS
9175         pthread_kill_other_threads_np();
9176 #endif
9177
9178         exit( status );
9179
9180 ; return 0; }
9181 EOF
9182 if { (eval echo configure:9183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9183   rm -rf conftest*
9184   ol_cv_pthread_lib_lpthreads=yes
9185 else
9186   echo "configure: failed program was:" >&5
9187   cat conftest.$ac_ext >&5
9188   rm -rf conftest*
9189   ol_cv_pthread_lib_lpthreads=no
9190 fi
9191 rm -f conftest*
9192 else
9193   cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 /* pthread test headers */
9197 #include <pthread.h>
9198 #ifndef NULL
9199 #define NULL (void*)0
9200 #endif
9201
9202 static void *task(p)
9203         void *p;
9204 {
9205         return (void *) (p == NULL);
9206 }
9207
9208
9209 int main(argc, argv)
9210         int argc;
9211         char **argv;
9212 {
9213
9214         /* pthread test function */
9215         pthread_t t;
9216         int status;
9217
9218         /* make sure pthread_create() isn't just a stub */
9219 #if HAVE_PTHREADS_D4
9220         status = pthread_create(&t, pthread_attr_default, task, NULL);
9221 #else
9222         status = pthread_create(&t, NULL, task, NULL);
9223 #endif
9224
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 }
9241
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9244 then
9245   ol_cv_pthread_lib_lpthreads=yes
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -fr conftest*
9250   ol_cv_pthread_lib_lpthreads=no
9251 fi
9252 rm -fr conftest*
9253 fi
9254
9255
9256                 # restore the LIBS
9257                 LIBS="$ol_LIBS"
9258         
9259 fi
9260
9261 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9262
9263         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9264                 ol_link_pthreads="-lpthreads"
9265                 ol_link_threads=posix
9266         fi
9267 fi
9268
9269
9270                 if test $ol_link_threads != no ; then
9271                         cat >> confdefs.h <<\EOF
9272 #define HAVE_PTHREADS 1
9273 EOF
9274
9275
9276                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9277
9278                                                 save_CPPFLAGS="$CPPFLAGS"
9279                         save_LIBS="$LIBS"
9280                         LIBS="$LTHREAD_LIBS $LIBS"
9281
9282                                                                                                 for ac_func in sched_yield pthread_yield
9283 do
9284 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9285 echo "configure:9286: checking for $ac_func" >&5
9286 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9287   echo $ac_n "(cached) $ac_c" 1>&6
9288 else
9289   cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292 /* System header to define __stub macros and hopefully few prototypes,
9293     which can conflict with char $ac_func(); below.  */
9294 #include <assert.h>
9295 /* Override any gcc2 internal prototype to avoid an error.  */
9296 /* We use char because int might match the return type of a gcc2
9297     builtin and then its argument prototype would still apply.  */
9298 char $ac_func();
9299 char (*f)();
9300
9301 int main() {
9302
9303 /* The GNU C library defines this for functions which it implements
9304     to always fail with ENOSYS.  Some functions are actually named
9305     something starting with __ and the normal name is an alias.  */
9306 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9307 choke me
9308 #else
9309 f = $ac_func;
9310 #endif
9311
9312 ; return 0; }
9313 EOF
9314 if { (eval echo configure:9315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9315   rm -rf conftest*
9316   eval "ac_cv_func_$ac_func=yes"
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320   rm -rf conftest*
9321   eval "ac_cv_func_$ac_func=no"
9322 fi
9323 rm -f conftest*
9324 fi
9325
9326 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9327   echo "$ac_t""yes" 1>&6
9328     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9329   cat >> confdefs.h <<EOF
9330 #define $ac_tr_func 1
9331 EOF
9332  
9333 else
9334   echo "$ac_t""no" 1>&6
9335 fi
9336 done
9337
9338
9339                         if test $ac_cv_func_sched_yield = no -a \
9340                                 $ac_cv_func_pthread_yield = no ; then
9341                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9342 echo "configure:9343: checking for sched_yield in -lrt" >&5
9343 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9344 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9345   echo $ac_n "(cached) $ac_c" 1>&6
9346 else
9347   ac_save_LIBS="$LIBS"
9348 LIBS="-lrt  $LIBS"
9349 cat > conftest.$ac_ext <<EOF
9350 #line 9351 "configure"
9351 #include "confdefs.h"
9352 /* Override any gcc2 internal prototype to avoid an error.  */
9353 /* We use char because int might match the return type of a gcc2
9354     builtin and then its argument prototype would still apply.  */
9355 char sched_yield();
9356
9357 int main() {
9358 sched_yield()
9359 ; return 0; }
9360 EOF
9361 if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9362   rm -rf conftest*
9363   eval "ac_cv_lib_$ac_lib_var=yes"
9364 else
9365   echo "configure: failed program was:" >&5
9366   cat conftest.$ac_ext >&5
9367   rm -rf conftest*
9368   eval "ac_cv_lib_$ac_lib_var=no"
9369 fi
9370 rm -f conftest*
9371 LIBS="$ac_save_LIBS"
9372
9373 fi
9374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9375   echo "$ac_t""yes" 1>&6
9376   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9377                                         cat >> confdefs.h <<\EOF
9378 #define HAVE_SCHED_YIELD 1
9379 EOF
9380
9381                                         ac_cv_func_sched_yield=yes
9382 else
9383   echo "$ac_t""no" 1>&6
9384 ac_cv_func_sched_yield=no
9385 fi
9386
9387                         fi
9388                         if test $ac_cv_func_sched_yield = no -a \
9389                                 $ac_cv_func_pthread_yield = no ; then
9390                                                                                                 for ac_func in thr_yield
9391 do
9392 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9393 echo "configure:9394: checking for $ac_func" >&5
9394 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9395   echo $ac_n "(cached) $ac_c" 1>&6
9396 else
9397   cat > conftest.$ac_ext <<EOF
9398 #line 9399 "configure"
9399 #include "confdefs.h"
9400 /* System header to define __stub macros and hopefully few prototypes,
9401     which can conflict with char $ac_func(); below.  */
9402 #include <assert.h>
9403 /* Override any gcc2 internal prototype to avoid an error.  */
9404 /* We use char because int might match the return type of a gcc2
9405     builtin and then its argument prototype would still apply.  */
9406 char $ac_func();
9407 char (*f)();
9408
9409 int main() {
9410
9411 /* The GNU C library defines this for functions which it implements
9412     to always fail with ENOSYS.  Some functions are actually named
9413     something starting with __ and the normal name is an alias.  */
9414 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9415 choke me
9416 #else
9417 f = $ac_func;
9418 #endif
9419
9420 ; return 0; }
9421 EOF
9422 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9423   rm -rf conftest*
9424   eval "ac_cv_func_$ac_func=yes"
9425 else
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -rf conftest*
9429   eval "ac_cv_func_$ac_func=no"
9430 fi
9431 rm -f conftest*
9432 fi
9433
9434 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9435   echo "$ac_t""yes" 1>&6
9436     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9437   cat >> confdefs.h <<EOF
9438 #define $ac_tr_func 1
9439 EOF
9440  
9441 else
9442   echo "$ac_t""no" 1>&6
9443 fi
9444 done
9445
9446                         fi
9447                         if test $ac_cv_func_sched_yield = no -a \
9448                                 $ac_cv_func_pthread_yield = no -a \
9449                                 "$ac_cv_func_thr_yield" = no ; then
9450                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9451                         fi
9452
9453                                                 for ac_func in pthread_kill
9454 do
9455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9456 echo "configure:9457: checking for $ac_func" >&5
9457 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9458   echo $ac_n "(cached) $ac_c" 1>&6
9459 else
9460   cat > conftest.$ac_ext <<EOF
9461 #line 9462 "configure"
9462 #include "confdefs.h"
9463 /* System header to define __stub macros and hopefully few prototypes,
9464     which can conflict with char $ac_func(); below.  */
9465 #include <assert.h>
9466 /* Override any gcc2 internal prototype to avoid an error.  */
9467 /* We use char because int might match the return type of a gcc2
9468     builtin and then its argument prototype would still apply.  */
9469 char $ac_func();
9470 char (*f)();
9471
9472 int main() {
9473
9474 /* The GNU C library defines this for functions which it implements
9475     to always fail with ENOSYS.  Some functions are actually named
9476     something starting with __ and the normal name is an alias.  */
9477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9478 choke me
9479 #else
9480 f = $ac_func;
9481 #endif
9482
9483 ; return 0; }
9484 EOF
9485 if { (eval echo configure:9486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9486   rm -rf conftest*
9487   eval "ac_cv_func_$ac_func=yes"
9488 else
9489   echo "configure: failed program was:" >&5
9490   cat conftest.$ac_ext >&5
9491   rm -rf conftest*
9492   eval "ac_cv_func_$ac_func=no"
9493 fi
9494 rm -f conftest*
9495 fi
9496
9497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9498   echo "$ac_t""yes" 1>&6
9499     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9500   cat >> confdefs.h <<EOF
9501 #define $ac_tr_func 1
9502 EOF
9503  
9504 else
9505   echo "$ac_t""no" 1>&6
9506 fi
9507 done
9508
9509
9510                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9511 echo "configure:9512: checking for pthread_detach with <pthread.h>" >&5
9512 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9513   echo $ac_n "(cached) $ac_c" 1>&6
9514 else
9515   
9516                                                                 cat > conftest.$ac_ext <<EOF
9517 #line 9518 "configure"
9518 #include "confdefs.h"
9519
9520 #include <pthread.h>
9521 #ifndef NULL
9522 #define NULL (void*)0
9523 #endif
9524
9525 int main() {
9526 pthread_detach(NULL);
9527 ; return 0; }
9528 EOF
9529 if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9530   rm -rf conftest*
9531   ol_cv_func_pthread_detach=yes
9532 else
9533   echo "configure: failed program was:" >&5
9534   cat conftest.$ac_ext >&5
9535   rm -rf conftest*
9536   ol_cv_func_pthread_detach=no
9537 fi
9538 rm -f conftest*
9539                         
9540 fi
9541
9542 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9543
9544                         if test $ol_cv_func_pthread_detach = no ; then
9545                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9546                         fi
9547
9548                         cat >> confdefs.h <<\EOF
9549 #define HAVE_PTHREAD_DETACH 1
9550 EOF
9551
9552
9553                                                 for ac_func in \
9554                                 pthread_setconcurrency \
9555                                 pthread_getconcurrency \
9556                                 thr_setconcurrency \
9557                                 thr_getconcurrency \
9558                         
9559 do
9560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9561 echo "configure:9562: checking for $ac_func" >&5
9562 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9563   echo $ac_n "(cached) $ac_c" 1>&6
9564 else
9565   cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 /* System header to define __stub macros and hopefully few prototypes,
9569     which can conflict with char $ac_func(); below.  */
9570 #include <assert.h>
9571 /* Override any gcc2 internal prototype to avoid an error.  */
9572 /* We use char because int might match the return type of a gcc2
9573     builtin and then its argument prototype would still apply.  */
9574 char $ac_func();
9575 char (*f)();
9576
9577 int main() {
9578
9579 /* The GNU C library defines this for functions which it implements
9580     to always fail with ENOSYS.  Some functions are actually named
9581     something starting with __ and the normal name is an alias.  */
9582 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9583 choke me
9584 #else
9585 f = $ac_func;
9586 #endif
9587
9588 ; return 0; }
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9591   rm -rf conftest*
9592   eval "ac_cv_func_$ac_func=yes"
9593 else
9594   echo "configure: failed program was:" >&5
9595   cat conftest.$ac_ext >&5
9596   rm -rf conftest*
9597   eval "ac_cv_func_$ac_func=no"
9598 fi
9599 rm -f conftest*
9600 fi
9601
9602 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9603   echo "$ac_t""yes" 1>&6
9604     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9605   cat >> confdefs.h <<EOF
9606 #define $ac_tr_func 1
9607 EOF
9608  
9609 else
9610   echo "$ac_t""no" 1>&6
9611 fi
9612 done
9613
9614
9615                         
9616         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9617 echo "configure:9618: checking for pthread_kill_other_threads_np" >&5
9618 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9619   echo $ac_n "(cached) $ac_c" 1>&6
9620 else
9621   cat > conftest.$ac_ext <<EOF
9622 #line 9623 "configure"
9623 #include "confdefs.h"
9624 /* System header to define __stub macros and hopefully few prototypes,
9625     which can conflict with char pthread_kill_other_threads_np(); below.  */
9626 #include <assert.h>
9627 /* Override any gcc2 internal prototype to avoid an error.  */
9628 /* We use char because int might match the return type of a gcc2
9629     builtin and then its argument prototype would still apply.  */
9630 char pthread_kill_other_threads_np();
9631 char (*f)();
9632
9633 int main() {
9634
9635 /* The GNU C library defines this for functions which it implements
9636     to always fail with ENOSYS.  Some functions are actually named
9637     something starting with __ and the normal name is an alias.  */
9638 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9639 choke me
9640 #else
9641 f = pthread_kill_other_threads_np;
9642 #endif
9643
9644 ; return 0; }
9645 EOF
9646 if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9647   rm -rf conftest*
9648   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9649 else
9650   echo "configure: failed program was:" >&5
9651   cat conftest.$ac_ext >&5
9652   rm -rf conftest*
9653   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9654 fi
9655 rm -f conftest*
9656 fi
9657
9658 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9659   echo "$ac_t""yes" 1>&6
9660   :
9661 else
9662   echo "$ac_t""no" 1>&6
9663 fi
9664
9665         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9666 echo "configure:9667: checking for LinuxThreads implementation" >&5
9667 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9668   echo $ac_n "(cached) $ac_c" 1>&6
9669 else
9670   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9671 fi
9672
9673 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9674
9675                         
9676         
9677         
9678         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9679 echo "configure:9680: checking for LinuxThreads consistency" >&5
9680 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9681   echo $ac_n "(cached) $ac_c" 1>&6
9682 else
9683   
9684                 if test $ol_cv_header_linux_threads = yes -a \
9685                         $ol_cv_sys_linux_threads = yes; then
9686                         ol_cv_linux_threads=yes
9687                 elif test $ol_cv_header_linux_threads = no -a \
9688                         $ol_cv_sys_linux_threads = no; then
9689                         ol_cv_linux_threads=no
9690                 else
9691                         ol_cv_linux_threads=error
9692                 fi
9693         
9694 fi
9695
9696 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9697
9698
9699                         if test $ol_cv_linux_threads = error; then
9700                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9701                         fi
9702
9703                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9704 echo "configure:9705: checking if pthread_create() works" >&5
9705 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9706   echo $ac_n "(cached) $ac_c" 1>&6
9707 else
9708   
9709                         if test "$cross_compiling" = yes; then
9710                                 ol_cv_pthread_create_works=yes
9711 else
9712   cat > conftest.$ac_ext <<EOF
9713 #line 9714 "configure"
9714 #include "confdefs.h"
9715 /* pthread test headers */
9716 #include <pthread.h>
9717 #ifndef NULL
9718 #define NULL (void*)0
9719 #endif
9720
9721 static void *task(p)
9722         void *p;
9723 {
9724         return (void *) (p == NULL);
9725 }
9726
9727
9728 int main(argc, argv)
9729         int argc;
9730         char **argv;
9731 {
9732
9733         /* pthread test function */
9734         pthread_t t;
9735         int status;
9736
9737         /* make sure pthread_create() isn't just a stub */
9738 #if HAVE_PTHREADS_D4
9739         status = pthread_create(&t, pthread_attr_default, task, NULL);
9740 #else
9741         status = pthread_create(&t, NULL, task, NULL);
9742 #endif
9743
9744         if( status ) exit( status );
9745
9746         /* make sure pthread_detach() isn't just a stub */
9747 #if HAVE_PTHREADS_D4
9748         status = pthread_detach( &t );
9749 #else
9750         status = pthread_detach( t );
9751 #endif
9752
9753 #ifdef HAVE_LINUX_THREADS
9754         pthread_kill_other_threads_np();
9755 #endif
9756
9757         exit( status );
9758
9759 }
9760
9761 EOF
9762 if { (eval echo configure:9763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9763 then
9764   ol_cv_pthread_create_works=yes
9765 else
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768   rm -fr conftest*
9769   ol_cv_pthread_create_works=no
9770 fi
9771 rm -fr conftest*
9772 fi
9773
9774 fi
9775
9776 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9777
9778                         if test $ol_cv_pthread_create_works = no ; then
9779                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9780                         fi
9781
9782                                                 if test $ol_with_yielding_select = auto ; then
9783                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9784 echo "configure:9785: checking if select yields when using pthreads" >&5
9785 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9786   echo $ac_n "(cached) $ac_c" 1>&6
9787 else
9788   
9789                                 if test "$cross_compiling" = yes; then
9790   ol_cv_pthread_select_yields=cross
9791 else
9792   cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795
9796 #include <sys/types.h>
9797 #include <sys/time.h>
9798 #include <unistd.h>
9799 #include <pthread.h>
9800 #ifndef NULL
9801 #define NULL (void*) 0
9802 #endif
9803
9804 static int fildes[2];
9805
9806 static void *task(p)
9807         void *p;
9808 {
9809         int i;
9810         struct timeval tv;
9811
9812         fd_set rfds;
9813
9814         tv.tv_sec=10;
9815         tv.tv_usec=0;
9816
9817         FD_ZERO(&rfds);
9818         FD_SET(fildes[0], &rfds);
9819
9820         /* we're not interested in any fds */
9821         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9822
9823         if(i < 0) {
9824                 perror("select");
9825                 exit(10);
9826         }
9827
9828         exit(0); /* if we exit here, the select blocked the whole process */
9829 }
9830
9831 int main(argc, argv)
9832         int argc;
9833         char **argv;
9834 {
9835         pthread_t t;
9836
9837         /* create a pipe to select */
9838         if(pipe(&fildes[0])) {
9839                 perror("select");
9840                 exit(1);
9841         }
9842
9843 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9844         (void) pthread_setconcurrency(2);
9845 #else
9846 #ifdef HAVE_THR_SETCONCURRENCY
9847         /* Set Solaris LWP concurrency to 2 */
9848         thr_setconcurrency(2);
9849 #endif
9850 #endif
9851
9852 #if HAVE_PTHREADS_D4
9853         pthread_create(&t, pthread_attr_default, task, NULL);
9854 #else
9855         pthread_create(&t, NULL, task, NULL);
9856 #endif
9857
9858 #if HAVE_SCHED_YIELD
9859         sched_yield();  /* make sure task runs first */
9860 #else
9861 #ifdef HAVE_PTHREAD_YIELD
9862         pthread_yield();        /* make sure task runs first */
9863 #endif
9864 #endif
9865
9866         exit(2);
9867 }
9868 EOF
9869 if { (eval echo configure:9870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9870 then
9871   ol_cv_pthread_select_yields=no
9872 else
9873   echo "configure: failed program was:" >&5
9874   cat conftest.$ac_ext >&5
9875   rm -fr conftest*
9876   ol_cv_pthread_select_yields=yes
9877 fi
9878 rm -fr conftest*
9879 fi
9880
9881 fi
9882
9883 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9884
9885                                 if test $ol_cv_pthread_select_yields = cross ; then
9886                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9887                                 fi
9888
9889                                 if test $ol_cv_pthread_select_yields = yes ; then
9890                                         ol_with_yielding_select=yes
9891                                 fi
9892                         fi
9893
9894                                                 CPPFLAGS="$save_CPPFLAGS"
9895                         LIBS="$save_LIBS"
9896                 else
9897                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9898                 fi
9899         fi
9900
9901         if test $ol_with_threads = posix ; then
9902                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9903         fi
9904 fi
9905
9906 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9907         -o $ol_with_threads = mach ; then
9908
9909                 for ac_hdr in mach/cthreads.h
9910 do
9911 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9912 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9913 echo "configure:9914: checking for $ac_hdr" >&5
9914 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9915   echo $ac_n "(cached) $ac_c" 1>&6
9916 else
9917   cat > conftest.$ac_ext <<EOF
9918 #line 9919 "configure"
9919 #include "confdefs.h"
9920 #include <$ac_hdr>
9921 EOF
9922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9923 { (eval echo configure:9924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9925 if test -z "$ac_err"; then
9926   rm -rf conftest*
9927   eval "ac_cv_header_$ac_safe=yes"
9928 else
9929   echo "$ac_err" >&5
9930   echo "configure: failed program was:" >&5
9931   cat conftest.$ac_ext >&5
9932   rm -rf conftest*
9933   eval "ac_cv_header_$ac_safe=no"
9934 fi
9935 rm -f conftest*
9936 fi
9937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9938   echo "$ac_t""yes" 1>&6
9939     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9940   cat >> confdefs.h <<EOF
9941 #define $ac_tr_hdr 1
9942 EOF
9943  
9944 else
9945   echo "$ac_t""no" 1>&6
9946 fi
9947 done
9948
9949         if test $ac_cv_header_mach_cthreads_h = yes ; then
9950                 ol_with_threads=found
9951
9952                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9953 echo "configure:9954: checking for cthread_fork" >&5
9954 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9955   echo $ac_n "(cached) $ac_c" 1>&6
9956 else
9957   cat > conftest.$ac_ext <<EOF
9958 #line 9959 "configure"
9959 #include "confdefs.h"
9960 /* System header to define __stub macros and hopefully few prototypes,
9961     which can conflict with char cthread_fork(); below.  */
9962 #include <assert.h>
9963 /* Override any gcc2 internal prototype to avoid an error.  */
9964 /* We use char because int might match the return type of a gcc2
9965     builtin and then its argument prototype would still apply.  */
9966 char cthread_fork();
9967 char (*f)();
9968
9969 int main() {
9970
9971 /* The GNU C library defines this for functions which it implements
9972     to always fail with ENOSYS.  Some functions are actually named
9973     something starting with __ and the normal name is an alias.  */
9974 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9975 choke me
9976 #else
9977 f = cthread_fork;
9978 #endif
9979
9980 ; return 0; }
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9983   rm -rf conftest*
9984   eval "ac_cv_func_cthread_fork=yes"
9985 else
9986   echo "configure: failed program was:" >&5
9987   cat conftest.$ac_ext >&5
9988   rm -rf conftest*
9989   eval "ac_cv_func_cthread_fork=no"
9990 fi
9991 rm -f conftest*
9992 fi
9993
9994 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9995   echo "$ac_t""yes" 1>&6
9996   ol_link_threads=yes
9997 else
9998   echo "$ac_t""no" 1>&6
9999 fi
10000
10001
10002                 if test $ol_link_threads = no ; then
10003                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10004 echo "configure:10005: checking for cthread_fork with -all_load" >&5
10005 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10006   echo $ac_n "(cached) $ac_c" 1>&6
10007 else
10008   
10009                                                                 save_LIBS="$LIBS"
10010                                 LIBS="-all_load $LIBS"
10011                                 cat > conftest.$ac_ext <<EOF
10012 #line 10013 "configure"
10013 #include "confdefs.h"
10014 #include <mach/cthreads.h>
10015 int main() {
10016
10017                                         cthread_fork((void *)0, (void *)0);
10018                                         
10019 ; return 0; }
10020 EOF
10021 if { (eval echo configure:10022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10022   rm -rf conftest*
10023   ol_cv_cthread_all_load=yes
10024 else
10025   echo "configure: failed program was:" >&5
10026   cat conftest.$ac_ext >&5
10027   rm -rf conftest*
10028   ol_cv_cthread_all_load=no
10029 fi
10030 rm -f conftest*
10031                                                                 LIBS="$save_LIBS"
10032                         
10033 fi
10034
10035 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10036
10037                         if test $ol_cv_cthread_all_load = yes ; then
10038                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10039                                 ol_link_threads=mach
10040                         fi
10041                 fi
10042
10043                 if test $ol_link_threads != no ; then
10044                         : check for cthread specific functionality here
10045                         cat >> confdefs.h <<\EOF
10046 #define HAVE_MACH_CTHREADS 1
10047 EOF
10048
10049                 else
10050                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10051                 fi
10052         fi
10053
10054         if test $ol_with_threads = mach ; then
10055                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10056         fi
10057 fi
10058
10059 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10060         -o $ol_with_threads = pth ; then
10061
10062         for ac_hdr in pth.h
10063 do
10064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10066 echo "configure:10067: checking for $ac_hdr" >&5
10067 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10068   echo $ac_n "(cached) $ac_c" 1>&6
10069 else
10070   cat > conftest.$ac_ext <<EOF
10071 #line 10072 "configure"
10072 #include "confdefs.h"
10073 #include <$ac_hdr>
10074 EOF
10075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10076 { (eval echo configure:10077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10078 if test -z "$ac_err"; then
10079   rm -rf conftest*
10080   eval "ac_cv_header_$ac_safe=yes"
10081 else
10082   echo "$ac_err" >&5
10083   echo "configure: failed program was:" >&5
10084   cat conftest.$ac_ext >&5
10085   rm -rf conftest*
10086   eval "ac_cv_header_$ac_safe=no"
10087 fi
10088 rm -f conftest*
10089 fi
10090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10091   echo "$ac_t""yes" 1>&6
10092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10093   cat >> confdefs.h <<EOF
10094 #define $ac_tr_hdr 1
10095 EOF
10096  
10097 else
10098   echo "$ac_t""no" 1>&6
10099 fi
10100 done
10101
10102
10103         if test $ac_cv_header_pth_h = yes ; then
10104                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10105 echo "configure:10106: checking for pth_version in -lpth" >&5
10106 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10107 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10108   echo $ac_n "(cached) $ac_c" 1>&6
10109 else
10110   ac_save_LIBS="$LIBS"
10111 LIBS="-lpth  $LIBS"
10112 cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 /* Override any gcc2 internal prototype to avoid an error.  */
10116 /* We use char because int might match the return type of a gcc2
10117     builtin and then its argument prototype would still apply.  */
10118 char pth_version();
10119
10120 int main() {
10121 pth_version()
10122 ; return 0; }
10123 EOF
10124 if { (eval echo configure:10125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10125   rm -rf conftest*
10126   eval "ac_cv_lib_$ac_lib_var=yes"
10127 else
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   eval "ac_cv_lib_$ac_lib_var=no"
10132 fi
10133 rm -f conftest*
10134 LIBS="$ac_save_LIBS"
10135
10136 fi
10137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10138   echo "$ac_t""yes" 1>&6
10139   have_pth=yes
10140 else
10141   echo "$ac_t""no" 1>&6
10142 have_pth=no
10143 fi
10144
10145
10146                 if test $have_pth = yes ; then
10147                         cat >> confdefs.h <<\EOF
10148 #define HAVE_GNU_PTH 1
10149 EOF
10150
10151                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10152                         ol_link_threads=pth
10153
10154                         if test $ol_with_yielding_select = auto ; then
10155                                 ol_with_yielding_select=yes
10156                         fi
10157                 fi
10158         fi
10159 fi
10160
10161 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10162         -o $ol_with_threads = lwp ; then
10163
10164                 for ac_hdr in thread.h synch.h
10165 do
10166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10168 echo "configure:10169: checking for $ac_hdr" >&5
10169 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10170   echo $ac_n "(cached) $ac_c" 1>&6
10171 else
10172   cat > conftest.$ac_ext <<EOF
10173 #line 10174 "configure"
10174 #include "confdefs.h"
10175 #include <$ac_hdr>
10176 EOF
10177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10178 { (eval echo configure:10179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10180 if test -z "$ac_err"; then
10181   rm -rf conftest*
10182   eval "ac_cv_header_$ac_safe=yes"
10183 else
10184   echo "$ac_err" >&5
10185   echo "configure: failed program was:" >&5
10186   cat conftest.$ac_ext >&5
10187   rm -rf conftest*
10188   eval "ac_cv_header_$ac_safe=no"
10189 fi
10190 rm -f conftest*
10191 fi
10192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10193   echo "$ac_t""yes" 1>&6
10194     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10195   cat >> confdefs.h <<EOF
10196 #define $ac_tr_hdr 1
10197 EOF
10198  
10199 else
10200   echo "$ac_t""no" 1>&6
10201 fi
10202 done
10203
10204         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10205                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10206 echo "configure:10207: checking for thr_create in -lthread" >&5
10207 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10209   echo $ac_n "(cached) $ac_c" 1>&6
10210 else
10211   ac_save_LIBS="$LIBS"
10212 LIBS="-lthread  $LIBS"
10213 cat > conftest.$ac_ext <<EOF
10214 #line 10215 "configure"
10215 #include "confdefs.h"
10216 /* Override any gcc2 internal prototype to avoid an error.  */
10217 /* We use char because int might match the return type of a gcc2
10218     builtin and then its argument prototype would still apply.  */
10219 char thr_create();
10220
10221 int main() {
10222 thr_create()
10223 ; return 0; }
10224 EOF
10225 if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10226   rm -rf conftest*
10227   eval "ac_cv_lib_$ac_lib_var=yes"
10228 else
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231   rm -rf conftest*
10232   eval "ac_cv_lib_$ac_lib_var=no"
10233 fi
10234 rm -f conftest*
10235 LIBS="$ac_save_LIBS"
10236
10237 fi
10238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10239   echo "$ac_t""yes" 1>&6
10240   have_thr=yes
10241 else
10242   echo "$ac_t""no" 1>&6
10243 have_thr=no
10244 fi
10245
10246
10247                 if test $have_thr = yes ; then
10248                         cat >> confdefs.h <<\EOF
10249 #define HAVE_THR 1
10250 EOF
10251
10252                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10253                         ol_link_threads=thr
10254
10255                         if test $ol_with_yielding_select = auto ; then
10256                                 ol_with_yielding_select=yes
10257                         fi
10258
10259                                                 for ac_func in \
10260                                 thr_setconcurrency \
10261                                 thr_getconcurrency \
10262                         
10263 do
10264 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10265 echo "configure:10266: checking for $ac_func" >&5
10266 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   cat > conftest.$ac_ext <<EOF
10270 #line 10271 "configure"
10271 #include "confdefs.h"
10272 /* System header to define __stub macros and hopefully few prototypes,
10273     which can conflict with char $ac_func(); below.  */
10274 #include <assert.h>
10275 /* Override any gcc2 internal prototype to avoid an error.  */
10276 /* We use char because int might match the return type of a gcc2
10277     builtin and then its argument prototype would still apply.  */
10278 char $ac_func();
10279 char (*f)();
10280
10281 int main() {
10282
10283 /* The GNU C library defines this for functions which it implements
10284     to always fail with ENOSYS.  Some functions are actually named
10285     something starting with __ and the normal name is an alias.  */
10286 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10287 choke me
10288 #else
10289 f = $ac_func;
10290 #endif
10291
10292 ; return 0; }
10293 EOF
10294 if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10295   rm -rf conftest*
10296   eval "ac_cv_func_$ac_func=yes"
10297 else
10298   echo "configure: failed program was:" >&5
10299   cat conftest.$ac_ext >&5
10300   rm -rf conftest*
10301   eval "ac_cv_func_$ac_func=no"
10302 fi
10303 rm -f conftest*
10304 fi
10305
10306 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10307   echo "$ac_t""yes" 1>&6
10308     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10309   cat >> confdefs.h <<EOF
10310 #define $ac_tr_func 1
10311 EOF
10312  
10313 else
10314   echo "$ac_t""no" 1>&6
10315 fi
10316 done
10317
10318                 fi
10319         fi
10320
10321                 for ac_hdr in lwp/lwp.h
10322 do
10323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10325 echo "configure:10326: checking for $ac_hdr" >&5
10326 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10327   echo $ac_n "(cached) $ac_c" 1>&6
10328 else
10329   cat > conftest.$ac_ext <<EOF
10330 #line 10331 "configure"
10331 #include "confdefs.h"
10332 #include <$ac_hdr>
10333 EOF
10334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10335 { (eval echo configure:10336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10337 if test -z "$ac_err"; then
10338   rm -rf conftest*
10339   eval "ac_cv_header_$ac_safe=yes"
10340 else
10341   echo "$ac_err" >&5
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -rf conftest*
10345   eval "ac_cv_header_$ac_safe=no"
10346 fi
10347 rm -f conftest*
10348 fi
10349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10350   echo "$ac_t""yes" 1>&6
10351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10352   cat >> confdefs.h <<EOF
10353 #define $ac_tr_hdr 1
10354 EOF
10355  
10356 else
10357   echo "$ac_t""no" 1>&6
10358 fi
10359 done
10360
10361         if test $ac_cv_header_lwp_lwp_h = yes ; then
10362                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10363 echo "configure:10364: checking for lwp_create in -llwp" >&5
10364 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   ac_save_LIBS="$LIBS"
10369 LIBS="-llwp  $LIBS"
10370 cat > conftest.$ac_ext <<EOF
10371 #line 10372 "configure"
10372 #include "confdefs.h"
10373 /* Override any gcc2 internal prototype to avoid an error.  */
10374 /* We use char because int might match the return type of a gcc2
10375     builtin and then its argument prototype would still apply.  */
10376 char lwp_create();
10377
10378 int main() {
10379 lwp_create()
10380 ; return 0; }
10381 EOF
10382 if { (eval echo configure:10383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10383   rm -rf conftest*
10384   eval "ac_cv_lib_$ac_lib_var=yes"
10385 else
10386   echo "configure: failed program was:" >&5
10387   cat conftest.$ac_ext >&5
10388   rm -rf conftest*
10389   eval "ac_cv_lib_$ac_lib_var=no"
10390 fi
10391 rm -f conftest*
10392 LIBS="$ac_save_LIBS"
10393
10394 fi
10395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10396   echo "$ac_t""yes" 1>&6
10397   have_lwp=yes
10398 else
10399   echo "$ac_t""no" 1>&6
10400 have_lwp=no
10401 fi
10402
10403
10404                 if test $have_lwp = yes ; then
10405                         cat >> confdefs.h <<\EOF
10406 #define HAVE_LWP 1
10407 EOF
10408
10409                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10410                         ol_link_threads=lwp
10411
10412                         if test $ol_with_yielding_select = auto ; then
10413                                 ol_with_yielding_select=no
10414                         fi
10415                 fi
10416         fi
10417 fi
10418
10419 if test $ol_with_yielding_select = yes ; then
10420         cat >> confdefs.h <<\EOF
10421 #define HAVE_YIELDING_SELECT 1
10422 EOF
10423
10424 fi
10425
10426 if test $ol_with_threads = manual ; then
10427                 ol_link_threads=yes
10428
10429         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10430
10431         for ac_hdr in pthread.h sched.h
10432 do
10433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10435 echo "configure:10436: checking for $ac_hdr" >&5
10436 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10437   echo $ac_n "(cached) $ac_c" 1>&6
10438 else
10439   cat > conftest.$ac_ext <<EOF
10440 #line 10441 "configure"
10441 #include "confdefs.h"
10442 #include <$ac_hdr>
10443 EOF
10444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10445 { (eval echo configure:10446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10447 if test -z "$ac_err"; then
10448   rm -rf conftest*
10449   eval "ac_cv_header_$ac_safe=yes"
10450 else
10451   echo "$ac_err" >&5
10452   echo "configure: failed program was:" >&5
10453   cat conftest.$ac_ext >&5
10454   rm -rf conftest*
10455   eval "ac_cv_header_$ac_safe=no"
10456 fi
10457 rm -f conftest*
10458 fi
10459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10460   echo "$ac_t""yes" 1>&6
10461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10462   cat >> confdefs.h <<EOF
10463 #define $ac_tr_hdr 1
10464 EOF
10465  
10466 else
10467   echo "$ac_t""no" 1>&6
10468 fi
10469 done
10470
10471         for ac_func in sched_yield pthread_yield
10472 do
10473 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10474 echo "configure:10475: checking for $ac_func" >&5
10475 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10476   echo $ac_n "(cached) $ac_c" 1>&6
10477 else
10478   cat > conftest.$ac_ext <<EOF
10479 #line 10480 "configure"
10480 #include "confdefs.h"
10481 /* System header to define __stub macros and hopefully few prototypes,
10482     which can conflict with char $ac_func(); below.  */
10483 #include <assert.h>
10484 /* Override any gcc2 internal prototype to avoid an error.  */
10485 /* We use char because int might match the return type of a gcc2
10486     builtin and then its argument prototype would still apply.  */
10487 char $ac_func();
10488 char (*f)();
10489
10490 int main() {
10491
10492 /* The GNU C library defines this for functions which it implements
10493     to always fail with ENOSYS.  Some functions are actually named
10494     something starting with __ and the normal name is an alias.  */
10495 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10496 choke me
10497 #else
10498 f = $ac_func;
10499 #endif
10500
10501 ; return 0; }
10502 EOF
10503 if { (eval echo configure:10504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10504   rm -rf conftest*
10505   eval "ac_cv_func_$ac_func=yes"
10506 else
10507   echo "configure: failed program was:" >&5
10508   cat conftest.$ac_ext >&5
10509   rm -rf conftest*
10510   eval "ac_cv_func_$ac_func=no"
10511 fi
10512 rm -f conftest*
10513 fi
10514
10515 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10516   echo "$ac_t""yes" 1>&6
10517     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10518   cat >> confdefs.h <<EOF
10519 #define $ac_tr_func 1
10520 EOF
10521  
10522 else
10523   echo "$ac_t""no" 1>&6
10524 fi
10525 done
10526
10527         
10528         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10529 echo "configure:10530: checking for LinuxThreads pthread.h" >&5
10530 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10531   echo $ac_n "(cached) $ac_c" 1>&6
10532 else
10533   cat > conftest.$ac_ext <<EOF
10534 #line 10535 "configure"
10535 #include "confdefs.h"
10536 #include <pthread.h>
10537 EOF
10538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10539   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10540   rm -rf conftest*
10541   ol_cv_header_linux_threads=yes
10542 else
10543   rm -rf conftest*
10544   ol_cv_header_linux_threads=no
10545 fi
10546 rm -f conftest*
10547
10548                 
10549 fi
10550
10551 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10552         if test $ol_cv_header_linux_threads = yes; then
10553                 cat >> confdefs.h <<\EOF
10554 #define HAVE_LINUX_THREADS 1
10555 EOF
10556
10557         fi
10558
10559
10560         for ac_hdr in mach/cthreads.h
10561 do
10562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10564 echo "configure:10565: checking for $ac_hdr" >&5
10565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10566   echo $ac_n "(cached) $ac_c" 1>&6
10567 else
10568   cat > conftest.$ac_ext <<EOF
10569 #line 10570 "configure"
10570 #include "confdefs.h"
10571 #include <$ac_hdr>
10572 EOF
10573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10574 { (eval echo configure:10575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10576 if test -z "$ac_err"; then
10577   rm -rf conftest*
10578   eval "ac_cv_header_$ac_safe=yes"
10579 else
10580   echo "$ac_err" >&5
10581   echo "configure: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   rm -rf conftest*
10584   eval "ac_cv_header_$ac_safe=no"
10585 fi
10586 rm -f conftest*
10587 fi
10588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10589   echo "$ac_t""yes" 1>&6
10590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10591   cat >> confdefs.h <<EOF
10592 #define $ac_tr_hdr 1
10593 EOF
10594  
10595 else
10596   echo "$ac_t""no" 1>&6
10597 fi
10598 done
10599
10600         for ac_hdr in lwp/lwp.h
10601 do
10602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10603 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10604 echo "configure:10605: checking for $ac_hdr" >&5
10605 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10606   echo $ac_n "(cached) $ac_c" 1>&6
10607 else
10608   cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10611 #include <$ac_hdr>
10612 EOF
10613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10614 { (eval echo configure:10615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10616 if test -z "$ac_err"; then
10617   rm -rf conftest*
10618   eval "ac_cv_header_$ac_safe=yes"
10619 else
10620   echo "$ac_err" >&5
10621   echo "configure: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   rm -rf conftest*
10624   eval "ac_cv_header_$ac_safe=no"
10625 fi
10626 rm -f conftest*
10627 fi
10628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10629   echo "$ac_t""yes" 1>&6
10630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10631   cat >> confdefs.h <<EOF
10632 #define $ac_tr_hdr 1
10633 EOF
10634  
10635 else
10636   echo "$ac_t""no" 1>&6
10637 fi
10638 done
10639
10640         for ac_hdr in thread.h synch.h
10641 do
10642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10644 echo "configure:10645: checking for $ac_hdr" >&5
10645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10646   echo $ac_n "(cached) $ac_c" 1>&6
10647 else
10648   cat > conftest.$ac_ext <<EOF
10649 #line 10650 "configure"
10650 #include "confdefs.h"
10651 #include <$ac_hdr>
10652 EOF
10653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10654 { (eval echo configure:10655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10656 if test -z "$ac_err"; then
10657   rm -rf conftest*
10658   eval "ac_cv_header_$ac_safe=yes"
10659 else
10660   echo "$ac_err" >&5
10661   echo "configure: failed program was:" >&5
10662   cat conftest.$ac_ext >&5
10663   rm -rf conftest*
10664   eval "ac_cv_header_$ac_safe=no"
10665 fi
10666 rm -f conftest*
10667 fi
10668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10669   echo "$ac_t""yes" 1>&6
10670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10671   cat >> confdefs.h <<EOF
10672 #define $ac_tr_hdr 1
10673 EOF
10674  
10675 else
10676   echo "$ac_t""no" 1>&6
10677 fi
10678 done
10679
10680 fi
10681
10682 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10683                         cat >> confdefs.h <<\EOF
10684 #define REENTRANT 1
10685 EOF
10686
10687         cat >> confdefs.h <<\EOF
10688 #define _REENTRANT 1
10689 EOF
10690
10691         cat >> confdefs.h <<\EOF
10692 #define THREAD_SAFE 1
10693 EOF
10694
10695         cat >> confdefs.h <<\EOF
10696 #define _THREAD_SAFE 1
10697 EOF
10698
10699         cat >> confdefs.h <<\EOF
10700 #define THREADSAFE 1
10701 EOF
10702
10703         cat >> confdefs.h <<\EOF
10704 #define _THREADSAFE 1
10705 EOF
10706
10707         cat >> confdefs.h <<\EOF
10708 #define _SGI_MP_SOURCE 1
10709 EOF
10710
10711
10712                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10713 echo "configure:10714: checking for thread specific errno" >&5
10714 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10715   echo $ac_n "(cached) $ac_c" 1>&6
10716 else
10717   
10718                 cat > conftest.$ac_ext <<EOF
10719 #line 10720 "configure"
10720 #include "confdefs.h"
10721 #include <errno.h>
10722 int main() {
10723 errno = 0;
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   ol_cv_errno_thread_specific=yes
10729 else
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   ol_cv_errno_thread_specific=no
10734 fi
10735 rm -f conftest*
10736         
10737 fi
10738
10739 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10740
10741                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10742 echo "configure:10743: checking for thread specific h_errno" >&5
10743 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10744   echo $ac_n "(cached) $ac_c" 1>&6
10745 else
10746   
10747                 cat > conftest.$ac_ext <<EOF
10748 #line 10749 "configure"
10749 #include "confdefs.h"
10750 #include <netdb.h>
10751 int main() {
10752 h_errno = 0;
10753 ; return 0; }
10754 EOF
10755 if { (eval echo configure:10756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10756   rm -rf conftest*
10757   ol_cv_h_errno_thread_specific=yes
10758 else
10759   echo "configure: failed program was:" >&5
10760   cat conftest.$ac_ext >&5
10761   rm -rf conftest*
10762   ol_cv_h_errno_thread_specific=no
10763 fi
10764 rm -f conftest*
10765         
10766 fi
10767
10768 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10769
10770         if test $ol_cv_errno_thread_specific != yes \
10771                 -o $ol_cv_h_errno_thread_specific != yes ; then
10772                 LIBS="$LTHREAD_LIBS $LIBS"
10773                 LTHREAD_LIBS=""
10774         fi
10775
10776 fi  
10777
10778 if test $ol_link_threads = no ; then
10779         if test $ol_with_threads = yes ; then
10780                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10781         fi
10782
10783         if test $ol_with_threads = auto ; then
10784                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10785                 ol_with_threads=no
10786         fi
10787
10788         cat >> confdefs.h <<\EOF
10789 #define NO_THREADS 1
10790 EOF
10791
10792         LTHREAD_LIBS=""
10793 fi
10794
10795 if test $ol_link_threads != no ; then
10796         cat >> confdefs.h <<\EOF
10797 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10798 EOF
10799
10800 fi
10801
10802
10803 ol_link_ldbm=no 
10804 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10805         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10806 echo "configure:10807: checking for DB2 library" >&5
10807 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10808   echo $ac_n "(cached) $ac_c" 1>&6
10809 else
10810         ol_LIBS="$LIBS"
10811         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10812 echo "configure:10813: checking for db_appexit in -ldb" >&5
10813 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10814 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10815   echo $ac_n "(cached) $ac_c" 1>&6
10816 else
10817   ac_save_LIBS="$LIBS"
10818 LIBS="-ldb  $LIBS"
10819 cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822 /* Override any gcc2 internal prototype to avoid an error.  */
10823 /* We use char because int might match the return type of a gcc2
10824     builtin and then its argument prototype would still apply.  */
10825 char db_appexit();
10826
10827 int main() {
10828 db_appexit()
10829 ; return 0; }
10830 EOF
10831 if { (eval echo configure:10832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10832   rm -rf conftest*
10833   eval "ac_cv_lib_$ac_lib_var=yes"
10834 else
10835   echo "configure: failed program was:" >&5
10836   cat conftest.$ac_ext >&5
10837   rm -rf conftest*
10838   eval "ac_cv_lib_$ac_lib_var=no"
10839 fi
10840 rm -f conftest*
10841 LIBS="$ac_save_LIBS"
10842
10843 fi
10844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10845   echo "$ac_t""yes" 1>&6
10846   ol_cv_lib_db2=-ldb
10847 else
10848   echo "$ac_t""no" 1>&6
10849 ol_cv_lib_db2=no
10850 fi
10851
10852         LIBS="$ol_LIBS"
10853
10854 fi
10855
10856 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10857
10858 for ac_hdr in db.h
10859 do
10860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10862 echo "configure:10863: checking for $ac_hdr" >&5
10863 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   cat > conftest.$ac_ext <<EOF
10867 #line 10868 "configure"
10868 #include "confdefs.h"
10869 #include <$ac_hdr>
10870 EOF
10871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10872 { (eval echo configure:10873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10874 if test -z "$ac_err"; then
10875   rm -rf conftest*
10876   eval "ac_cv_header_$ac_safe=yes"
10877 else
10878   echo "$ac_err" >&5
10879   echo "configure: failed program was:" >&5
10880   cat conftest.$ac_ext >&5
10881   rm -rf conftest*
10882   eval "ac_cv_header_$ac_safe=no"
10883 fi
10884 rm -f conftest*
10885 fi
10886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10887   echo "$ac_t""yes" 1>&6
10888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10889   cat >> confdefs.h <<EOF
10890 #define $ac_tr_hdr 1
10891 EOF
10892  
10893 else
10894   echo "$ac_t""no" 1>&6
10895 fi
10896 done
10897
10898 if test $ac_cv_header_db_h = yes ; then
10899         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10900 echo "configure:10901: checking if db.h is DB2" >&5
10901 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10902   echo $ac_n "(cached) $ac_c" 1>&6
10903 else
10904   
10905                 cat > conftest.$ac_ext <<EOF
10906 #line 10907 "configure"
10907 #include "confdefs.h"
10908
10909 #                       include <db.h>
10910                         /* this check could be improved */
10911 #                       ifdef DB_VERSION_MAJOR
10912 #                               if DB_VERSION_MAJOR == 2
10913                                         __db_version_2;
10914 #                               endif
10915 #                       endif
10916                 
10917 EOF
10918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10919   egrep "__db_version_2" >/dev/null 2>&1; then
10920   rm -rf conftest*
10921   ol_cv_header_db2=yes
10922 else
10923   rm -rf conftest*
10924   ol_cv_header_db2=no
10925 fi
10926 rm -f conftest*
10927
10928 fi
10929
10930 echo "$ac_t""$ol_cv_header_db2" 1>&6
10931 else
10932         ol_cv_header_db2=no
10933 fi
10934
10935
10936  
10937  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10938 echo "configure:10939: checking for Berkeley DB2" >&5
10939 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10940   echo $ac_n "(cached) $ac_c" 1>&6
10941 else
10942   
10943         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10944                 ol_cv_berkeley_db2=no
10945         else
10946                 ol_cv_berkeley_db2=yes
10947         fi
10948
10949 fi
10950
10951 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10952  if test $ol_cv_berkeley_db2 = yes ; then
10953         cat >> confdefs.h <<\EOF
10954 #define HAVE_BERKELEY_DB2 1
10955 EOF
10956
10957  fi
10958
10959
10960         if test $ol_cv_berkeley_db2 = yes ; then
10961                 ol_link_ldbm=db2
10962                 ol_with_ldbm_api=db2
10963
10964                 if test $ol_with_ldbm_type = hash ; then
10965                         cat >> confdefs.h <<\EOF
10966 #define LDBM_USE_DBHASH 1
10967 EOF
10968
10969                 else
10970                         cat >> confdefs.h <<\EOF
10971 #define LDBM_USE_DBBTREE 1
10972 EOF
10973
10974                 fi
10975
10976                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
10977 echo "configure:10978: checking for DB_THREAD support" >&5
10978 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
10979   echo $ac_n "(cached) $ac_c" 1>&6
10980 else
10981   
10982         ol_LIBS="$LIBS"
10983         if test $ol_cv_lib_db2 != yes ; then
10984                 LIBS="$ol_cv_lib_db2"
10985         fi
10986
10987         if test "$cross_compiling" = yes; then
10988   ol_cv_berkeley_db2_db_thread=cross
10989 else
10990   cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993
10994 #include <db.h>
10995 #ifndef NULL
10996 #define NULL ((void *)0)
10997 #endif
10998 main()
10999 {
11000         int rc;
11001         DB_ENV env;
11002         u_int32_t flags = DB_CREATE | DB_THREAD;
11003
11004         memset( &env, '\0', sizeof(env) );
11005
11006         rc = db_appinit( NULL, NULL, &env, flags );
11007
11008         if( rc == 0 ) {
11009                 db_appexit( &env );
11010         }
11011
11012         return rc;
11013 }
11014 EOF
11015 if { (eval echo configure:11016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11016 then
11017   ol_cv_berkeley_db2_db_thread=yes
11018 else
11019   echo "configure: failed program was:" >&5
11020   cat conftest.$ac_ext >&5
11021   rm -fr conftest*
11022   ol_cv_berkeley_db2_db_thread=no
11023 fi
11024 rm -fr conftest*
11025 fi
11026
11027
11028         LIBS="$ol_LIBS"
11029
11030         if test $ol_cv_berkeley_db2_db_thread != no ; then
11031                 cat >> confdefs.h <<\EOF
11032 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11033 EOF
11034
11035         fi
11036
11037 fi
11038
11039 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11040
11041                                                 if test $ol_cv_lib_db2 != yes ; then
11042                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11043                 fi
11044         fi
11045 fi
11046
11047 ol_link_bdb2=no
11048 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11049         if test $ol_cv_berkeley_db2_db_thread != no ; then
11050                 ol_link_bdb2=yes
11051         else
11052                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11053         fi
11054 fi
11055
11056 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11057         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11058 echo "configure:11059: checking for Berkeley DB library" >&5
11059 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11060   echo $ac_n "(cached) $ac_c" 1>&6
11061 else
11062   
11063         for ac_hdr in db1/db.h
11064 do
11065 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11066 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11067 echo "configure:11068: checking for $ac_hdr" >&5
11068 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11069   echo $ac_n "(cached) $ac_c" 1>&6
11070 else
11071   cat > conftest.$ac_ext <<EOF
11072 #line 11073 "configure"
11073 #include "confdefs.h"
11074 #include <$ac_hdr>
11075 EOF
11076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11077 { (eval echo configure:11078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11079 if test -z "$ac_err"; then
11080   rm -rf conftest*
11081   eval "ac_cv_header_$ac_safe=yes"
11082 else
11083   echo "$ac_err" >&5
11084   echo "configure: failed program was:" >&5
11085   cat conftest.$ac_ext >&5
11086   rm -rf conftest*
11087   eval "ac_cv_header_$ac_safe=no"
11088 fi
11089 rm -f conftest*
11090 fi
11091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11092   echo "$ac_t""yes" 1>&6
11093     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11094   cat >> confdefs.h <<EOF
11095 #define $ac_tr_hdr 1
11096 EOF
11097  
11098 else
11099   echo "$ac_t""no" 1>&6
11100 fi
11101 done
11102
11103         ol_LIBS="$LIBS"
11104         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11105 echo "configure:11106: checking for dbopen" >&5
11106 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112 /* System header to define __stub macros and hopefully few prototypes,
11113     which can conflict with char dbopen(); below.  */
11114 #include <assert.h>
11115 /* Override any gcc2 internal prototype to avoid an error.  */
11116 /* We use char because int might match the return type of a gcc2
11117     builtin and then its argument prototype would still apply.  */
11118 char dbopen();
11119 char (*f)();
11120
11121 int main() {
11122
11123 /* The GNU C library defines this for functions which it implements
11124     to always fail with ENOSYS.  Some functions are actually named
11125     something starting with __ and the normal name is an alias.  */
11126 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11127 choke me
11128 #else
11129 f = dbopen;
11130 #endif
11131
11132 ; return 0; }
11133 EOF
11134 if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11135   rm -rf conftest*
11136   eval "ac_cv_func_dbopen=yes"
11137 else
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -rf conftest*
11141   eval "ac_cv_func_dbopen=no"
11142 fi
11143 rm -f conftest*
11144 fi
11145
11146 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11147   echo "$ac_t""yes" 1>&6
11148   ol_cv_lib_db=yes
11149 else
11150   echo "$ac_t""no" 1>&6
11151
11152                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11153 echo "configure:11154: checking for dbopen in -ldb1" >&5
11154 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11156   echo $ac_n "(cached) $ac_c" 1>&6
11157 else
11158   ac_save_LIBS="$LIBS"
11159 LIBS="-ldb1  $LIBS"
11160 cat > conftest.$ac_ext <<EOF
11161 #line 11162 "configure"
11162 #include "confdefs.h"
11163 /* Override any gcc2 internal prototype to avoid an error.  */
11164 /* We use char because int might match the return type of a gcc2
11165     builtin and then its argument prototype would still apply.  */
11166 char dbopen();
11167
11168 int main() {
11169 dbopen()
11170 ; return 0; }
11171 EOF
11172 if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=yes"
11175 else
11176   echo "configure: failed program was:" >&5
11177   cat conftest.$ac_ext >&5
11178   rm -rf conftest*
11179   eval "ac_cv_lib_$ac_lib_var=no"
11180 fi
11181 rm -f conftest*
11182 LIBS="$ac_save_LIBS"
11183
11184 fi
11185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11186   echo "$ac_t""yes" 1>&6
11187   ol_cv_lib_db=-ldb1
11188 else
11189   echo "$ac_t""no" 1>&6
11190
11191                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11192 echo "configure:11193: checking for dbopen in -ldb" >&5
11193 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11195   echo $ac_n "(cached) $ac_c" 1>&6
11196 else
11197   ac_save_LIBS="$LIBS"
11198 LIBS="-ldb  $LIBS"
11199 cat > conftest.$ac_ext <<EOF
11200 #line 11201 "configure"
11201 #include "confdefs.h"
11202 /* Override any gcc2 internal prototype to avoid an error.  */
11203 /* We use char because int might match the return type of a gcc2
11204     builtin and then its argument prototype would still apply.  */
11205 char dbopen();
11206
11207 int main() {
11208 dbopen()
11209 ; return 0; }
11210 EOF
11211 if { (eval echo configure:11212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11212   rm -rf conftest*
11213   eval "ac_cv_lib_$ac_lib_var=yes"
11214 else
11215   echo "configure: failed program was:" >&5
11216   cat conftest.$ac_ext >&5
11217   rm -rf conftest*
11218   eval "ac_cv_lib_$ac_lib_var=no"
11219 fi
11220 rm -f conftest*
11221 LIBS="$ac_save_LIBS"
11222
11223 fi
11224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11225   echo "$ac_t""yes" 1>&6
11226   ol_cv_lib_db=-ldb
11227 else
11228   echo "$ac_t""no" 1>&6
11229 ol_cv_lib_db=no
11230 fi
11231
11232                 
11233 fi
11234
11235         
11236 fi
11237
11238         LIBS="$ol_LIBS"
11239
11240 fi
11241
11242 echo "$ac_t""$ol_cv_lib_db" 1>&6
11243
11244
11245 for ac_hdr in db_185.h
11246 do
11247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11249 echo "configure:11250: checking for $ac_hdr" >&5
11250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11251   echo $ac_n "(cached) $ac_c" 1>&6
11252 else
11253   cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 #include <$ac_hdr>
11257 EOF
11258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11259 { (eval echo configure:11260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11261 if test -z "$ac_err"; then
11262   rm -rf conftest*
11263   eval "ac_cv_header_$ac_safe=yes"
11264 else
11265   echo "$ac_err" >&5
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -rf conftest*
11269   eval "ac_cv_header_$ac_safe=no"
11270 fi
11271 rm -f conftest*
11272 fi
11273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11274   echo "$ac_t""yes" 1>&6
11275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11276   cat >> confdefs.h <<EOF
11277 #define $ac_tr_hdr 1
11278 EOF
11279  
11280 else
11281   echo "$ac_t""no" 1>&6
11282 fi
11283 done
11284
11285 if test "$ol_cv_header_db2" = yes ; then
11286         
11287         ol_cv_header_db=$ac_cv_header_db_185_h
11288 else
11289         ol_cv_header_db=$ac_cv_header_db_h
11290 fi
11291
11292
11293  
11294  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11295 echo "configure:11296: checking for Berkeley DB" >&5
11296 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11297   echo $ac_n "(cached) $ac_c" 1>&6
11298 else
11299   
11300         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11301                 ol_cv_berkeley_db=no
11302         else
11303                 ol_cv_berkeley_db=yes
11304         fi
11305
11306 fi
11307
11308 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11309  if test $ol_cv_berkeley_db = yes ; then
11310         cat >> confdefs.h <<\EOF
11311 #define HAVE_BERKELEY_DB 1
11312 EOF
11313
11314  fi
11315
11316
11317         if test $ol_cv_berkeley_db = yes ; then
11318                 ol_link_ldbm=db
11319                 ol_with_ldbm_api=db
11320
11321                 if test $ol_with_ldbm_type = hash ; then
11322                         cat >> confdefs.h <<\EOF
11323 #define LDBM_USE_DBHASH 1
11324 EOF
11325
11326                 else
11327                         cat >> confdefs.h <<\EOF
11328 #define LDBM_USE_DBBTREE 1
11329 EOF
11330
11331                 fi
11332
11333                                                 if test $ol_cv_lib_db != yes ; then
11334                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11335                 fi
11336         fi
11337 fi
11338
11339 if test $ol_with_ldbm_api = manual ; then
11340                 ol_link_ldbm=yes
11341
11342         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11343
11344         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11345 do
11346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11348 echo "configure:11349: checking for $ac_hdr" >&5
11349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11350   echo $ac_n "(cached) $ac_c" 1>&6
11351 else
11352   cat > conftest.$ac_ext <<EOF
11353 #line 11354 "configure"
11354 #include "confdefs.h"
11355 #include <$ac_hdr>
11356 EOF
11357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11358 { (eval echo configure:11359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11360 if test -z "$ac_err"; then
11361   rm -rf conftest*
11362   eval "ac_cv_header_$ac_safe=yes"
11363 else
11364   echo "$ac_err" >&5
11365   echo "configure: failed program was:" >&5
11366   cat conftest.$ac_ext >&5
11367   rm -rf conftest*
11368   eval "ac_cv_header_$ac_safe=no"
11369 fi
11370 rm -f conftest*
11371 fi
11372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11373   echo "$ac_t""yes" 1>&6
11374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11375   cat >> confdefs.h <<EOF
11376 #define $ac_tr_hdr 1
11377 EOF
11378  
11379 else
11380   echo "$ac_t""no" 1>&6
11381 fi
11382 done
11383
11384 fi
11385
11386 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11387         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11388         ol_with_ldbm_api=none
11389 fi
11390
11391 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11392         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11393 echo "configure:11394: checking for MDBM library" >&5
11394 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11395   echo $ac_n "(cached) $ac_c" 1>&6
11396 else
11397         ol_LIBS="$LIBS"
11398         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11399 echo "configure:11400: checking for mdbm_set_chain" >&5
11400 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11401   echo $ac_n "(cached) $ac_c" 1>&6
11402 else
11403   cat > conftest.$ac_ext <<EOF
11404 #line 11405 "configure"
11405 #include "confdefs.h"
11406 /* System header to define __stub macros and hopefully few prototypes,
11407     which can conflict with char mdbm_set_chain(); below.  */
11408 #include <assert.h>
11409 /* Override any gcc2 internal prototype to avoid an error.  */
11410 /* We use char because int might match the return type of a gcc2
11411     builtin and then its argument prototype would still apply.  */
11412 char mdbm_set_chain();
11413 char (*f)();
11414
11415 int main() {
11416
11417 /* The GNU C library defines this for functions which it implements
11418     to always fail with ENOSYS.  Some functions are actually named
11419     something starting with __ and the normal name is an alias.  */
11420 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11421 choke me
11422 #else
11423 f = mdbm_set_chain;
11424 #endif
11425
11426 ; return 0; }
11427 EOF
11428 if { (eval echo configure:11429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11429   rm -rf conftest*
11430   eval "ac_cv_func_mdbm_set_chain=yes"
11431 else
11432   echo "configure: failed program was:" >&5
11433   cat conftest.$ac_ext >&5
11434   rm -rf conftest*
11435   eval "ac_cv_func_mdbm_set_chain=no"
11436 fi
11437 rm -f conftest*
11438 fi
11439
11440 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11441   echo "$ac_t""yes" 1>&6
11442   ol_cv_lib_mdbm=yes
11443 else
11444   echo "$ac_t""no" 1>&6
11445
11446                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11447 echo "configure:11448: checking for mdbm_set_chain in -lmdbm" >&5
11448 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11450   echo $ac_n "(cached) $ac_c" 1>&6
11451 else
11452   ac_save_LIBS="$LIBS"
11453 LIBS="-lmdbm  $LIBS"
11454 cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457 /* Override any gcc2 internal prototype to avoid an error.  */
11458 /* We use char because int might match the return type of a gcc2
11459     builtin and then its argument prototype would still apply.  */
11460 char mdbm_set_chain();
11461
11462 int main() {
11463 mdbm_set_chain()
11464 ; return 0; }
11465 EOF
11466 if { (eval echo configure:11467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11467   rm -rf conftest*
11468   eval "ac_cv_lib_$ac_lib_var=yes"
11469 else
11470   echo "configure: failed program was:" >&5
11471   cat conftest.$ac_ext >&5
11472   rm -rf conftest*
11473   eval "ac_cv_lib_$ac_lib_var=no"
11474 fi
11475 rm -f conftest*
11476 LIBS="$ac_save_LIBS"
11477
11478 fi
11479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11480   echo "$ac_t""yes" 1>&6
11481   ol_cv_lib_mdbm=-lmdbm
11482 else
11483   echo "$ac_t""no" 1>&6
11484 ol_cv_lib_mdbm=no
11485 fi
11486
11487         
11488 fi
11489
11490         LIBS="$ol_LIBS"
11491
11492 fi
11493
11494 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11495
11496
11497  for ac_hdr in mdbm.h
11498 do
11499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11501 echo "configure:11502: checking for $ac_hdr" >&5
11502 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11503   echo $ac_n "(cached) $ac_c" 1>&6
11504 else
11505   cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508 #include <$ac_hdr>
11509 EOF
11510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11511 { (eval echo configure:11512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11513 if test -z "$ac_err"; then
11514   rm -rf conftest*
11515   eval "ac_cv_header_$ac_safe=yes"
11516 else
11517   echo "$ac_err" >&5
11518   echo "configure: failed program was:" >&5
11519   cat conftest.$ac_ext >&5
11520   rm -rf conftest*
11521   eval "ac_cv_header_$ac_safe=no"
11522 fi
11523 rm -f conftest*
11524 fi
11525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11526   echo "$ac_t""yes" 1>&6
11527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11528   cat >> confdefs.h <<EOF
11529 #define $ac_tr_hdr 1
11530 EOF
11531  
11532 else
11533   echo "$ac_t""no" 1>&6
11534 fi
11535 done
11536
11537  echo $ac_n "checking for db""... $ac_c" 1>&6
11538 echo "configure:11539: checking for db" >&5
11539 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11540   echo $ac_n "(cached) $ac_c" 1>&6
11541 else
11542   
11543         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11544                 ol_cv_mdbm=no
11545         else
11546                 ol_cv_mdbm=yes
11547         fi
11548
11549 fi
11550
11551 echo "$ac_t""$ol_cv_mdbm" 1>&6
11552  if test $ol_cv_mdbm = yes ; then
11553         cat >> confdefs.h <<\EOF
11554 #define HAVE_MDBM 1
11555 EOF
11556
11557  fi
11558
11559
11560         if test $ol_cv_mdbm = yes ; then
11561                 ol_link_ldbm=mdbm
11562                 ol_with_ldbm_api=mdbm
11563                 if test $ol_cv_lib_mdbm != yes ; then
11564                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11565                 fi
11566         fi
11567 fi
11568
11569 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11570         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11571 echo "configure:11572: checking for GDBM library" >&5
11572 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11573   echo $ac_n "(cached) $ac_c" 1>&6
11574 else
11575         ol_LIBS="$LIBS"
11576         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11577 echo "configure:11578: checking for gdbm_open" >&5
11578 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11579   echo $ac_n "(cached) $ac_c" 1>&6
11580 else
11581   cat > conftest.$ac_ext <<EOF
11582 #line 11583 "configure"
11583 #include "confdefs.h"
11584 /* System header to define __stub macros and hopefully few prototypes,
11585     which can conflict with char gdbm_open(); below.  */
11586 #include <assert.h>
11587 /* Override any gcc2 internal prototype to avoid an error.  */
11588 /* We use char because int might match the return type of a gcc2
11589     builtin and then its argument prototype would still apply.  */
11590 char gdbm_open();
11591 char (*f)();
11592
11593 int main() {
11594
11595 /* The GNU C library defines this for functions which it implements
11596     to always fail with ENOSYS.  Some functions are actually named
11597     something starting with __ and the normal name is an alias.  */
11598 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11599 choke me
11600 #else
11601 f = gdbm_open;
11602 #endif
11603
11604 ; return 0; }
11605 EOF
11606 if { (eval echo configure:11607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11607   rm -rf conftest*
11608   eval "ac_cv_func_gdbm_open=yes"
11609 else
11610   echo "configure: failed program was:" >&5
11611   cat conftest.$ac_ext >&5
11612   rm -rf conftest*
11613   eval "ac_cv_func_gdbm_open=no"
11614 fi
11615 rm -f conftest*
11616 fi
11617
11618 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11619   echo "$ac_t""yes" 1>&6
11620   ol_cv_lib_gdbm=yes
11621 else
11622   echo "$ac_t""no" 1>&6
11623
11624                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11625 echo "configure:11626: checking for gdbm_open in -lgdbm" >&5
11626 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11628   echo $ac_n "(cached) $ac_c" 1>&6
11629 else
11630   ac_save_LIBS="$LIBS"
11631 LIBS="-lgdbm  $LIBS"
11632 cat > conftest.$ac_ext <<EOF
11633 #line 11634 "configure"
11634 #include "confdefs.h"
11635 /* Override any gcc2 internal prototype to avoid an error.  */
11636 /* We use char because int might match the return type of a gcc2
11637     builtin and then its argument prototype would still apply.  */
11638 char gdbm_open();
11639
11640 int main() {
11641 gdbm_open()
11642 ; return 0; }
11643 EOF
11644 if { (eval echo configure:11645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11645   rm -rf conftest*
11646   eval "ac_cv_lib_$ac_lib_var=yes"
11647 else
11648   echo "configure: failed program was:" >&5
11649   cat conftest.$ac_ext >&5
11650   rm -rf conftest*
11651   eval "ac_cv_lib_$ac_lib_var=no"
11652 fi
11653 rm -f conftest*
11654 LIBS="$ac_save_LIBS"
11655
11656 fi
11657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11658   echo "$ac_t""yes" 1>&6
11659   ol_cv_lib_gdbm=-lgdbm
11660 else
11661   echo "$ac_t""no" 1>&6
11662 ol_cv_lib_gdbm=no
11663 fi
11664
11665         
11666 fi
11667
11668         LIBS="$ol_LIBS"
11669
11670 fi
11671
11672 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11673
11674
11675  for ac_hdr in gdbm.h
11676 do
11677 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11678 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11679 echo "configure:11680: checking for $ac_hdr" >&5
11680 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11681   echo $ac_n "(cached) $ac_c" 1>&6
11682 else
11683   cat > conftest.$ac_ext <<EOF
11684 #line 11685 "configure"
11685 #include "confdefs.h"
11686 #include <$ac_hdr>
11687 EOF
11688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11689 { (eval echo configure:11690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11691 if test -z "$ac_err"; then
11692   rm -rf conftest*
11693   eval "ac_cv_header_$ac_safe=yes"
11694 else
11695   echo "$ac_err" >&5
11696   echo "configure: failed program was:" >&5
11697   cat conftest.$ac_ext >&5
11698   rm -rf conftest*
11699   eval "ac_cv_header_$ac_safe=no"
11700 fi
11701 rm -f conftest*
11702 fi
11703 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11704   echo "$ac_t""yes" 1>&6
11705     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11706   cat >> confdefs.h <<EOF
11707 #define $ac_tr_hdr 1
11708 EOF
11709  
11710 else
11711   echo "$ac_t""no" 1>&6
11712 fi
11713 done
11714
11715  echo $ac_n "checking for db""... $ac_c" 1>&6
11716 echo "configure:11717: checking for db" >&5
11717 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11718   echo $ac_n "(cached) $ac_c" 1>&6
11719 else
11720   
11721         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11722                 ol_cv_gdbm=no
11723         else
11724                 ol_cv_gdbm=yes
11725         fi
11726
11727 fi
11728
11729 echo "$ac_t""$ol_cv_gdbm" 1>&6
11730  if test $ol_cv_gdbm = yes ; then
11731         cat >> confdefs.h <<\EOF
11732 #define HAVE_GDBM 1
11733 EOF
11734
11735  fi
11736
11737
11738         if test $ol_cv_gdbm = yes ; then
11739                 ol_link_ldbm=gdbm
11740                 ol_with_ldbm_api=gdbm
11741
11742                 if test $ol_cv_lib_gdbm != yes ; then
11743                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11744                 fi
11745         fi
11746 fi
11747
11748 if test $ol_with_ldbm_api = auto ; then
11749         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11750 elif test $ol_with_ldbm_api = ndbm ; then
11751         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11752 echo "configure:11753: checking for NDBM library" >&5
11753 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11754   echo $ac_n "(cached) $ac_c" 1>&6
11755 else
11756         ol_LIBS="$LIBS"
11757         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11758 echo "configure:11759: checking for dbm_open" >&5
11759 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11760   echo $ac_n "(cached) $ac_c" 1>&6
11761 else
11762   cat > conftest.$ac_ext <<EOF
11763 #line 11764 "configure"
11764 #include "confdefs.h"
11765 /* System header to define __stub macros and hopefully few prototypes,
11766     which can conflict with char dbm_open(); below.  */
11767 #include <assert.h>
11768 /* Override any gcc2 internal prototype to avoid an error.  */
11769 /* We use char because int might match the return type of a gcc2
11770     builtin and then its argument prototype would still apply.  */
11771 char dbm_open();
11772 char (*f)();
11773
11774 int main() {
11775
11776 /* The GNU C library defines this for functions which it implements
11777     to always fail with ENOSYS.  Some functions are actually named
11778     something starting with __ and the normal name is an alias.  */
11779 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11780 choke me
11781 #else
11782 f = dbm_open;
11783 #endif
11784
11785 ; return 0; }
11786 EOF
11787 if { (eval echo configure:11788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11788   rm -rf conftest*
11789   eval "ac_cv_func_dbm_open=yes"
11790 else
11791   echo "configure: failed program was:" >&5
11792   cat conftest.$ac_ext >&5
11793   rm -rf conftest*
11794   eval "ac_cv_func_dbm_open=no"
11795 fi
11796 rm -f conftest*
11797 fi
11798
11799 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11800   echo "$ac_t""yes" 1>&6
11801   ol_cv_lib_ndbm=yes
11802 else
11803   echo "$ac_t""no" 1>&6
11804
11805                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11806 echo "configure:11807: checking for dbm_open in -lndbm" >&5
11807 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11809   echo $ac_n "(cached) $ac_c" 1>&6
11810 else
11811   ac_save_LIBS="$LIBS"
11812 LIBS="-lndbm  $LIBS"
11813 cat > conftest.$ac_ext <<EOF
11814 #line 11815 "configure"
11815 #include "confdefs.h"
11816 /* Override any gcc2 internal prototype to avoid an error.  */
11817 /* We use char because int might match the return type of a gcc2
11818     builtin and then its argument prototype would still apply.  */
11819 char dbm_open();
11820
11821 int main() {
11822 dbm_open()
11823 ; return 0; }
11824 EOF
11825 if { (eval echo configure:11826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11826   rm -rf conftest*
11827   eval "ac_cv_lib_$ac_lib_var=yes"
11828 else
11829   echo "configure: failed program was:" >&5
11830   cat conftest.$ac_ext >&5
11831   rm -rf conftest*
11832   eval "ac_cv_lib_$ac_lib_var=no"
11833 fi
11834 rm -f conftest*
11835 LIBS="$ac_save_LIBS"
11836
11837 fi
11838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11839   echo "$ac_t""yes" 1>&6
11840   ol_cv_lib_ndbm=-lndbm
11841 else
11842   echo "$ac_t""no" 1>&6
11843
11844                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11845 echo "configure:11846: checking for dbm_open in -ldbm" >&5
11846 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11848   echo $ac_n "(cached) $ac_c" 1>&6
11849 else
11850   ac_save_LIBS="$LIBS"
11851 LIBS="-ldbm  $LIBS"
11852 cat > conftest.$ac_ext <<EOF
11853 #line 11854 "configure"
11854 #include "confdefs.h"
11855 /* Override any gcc2 internal prototype to avoid an error.  */
11856 /* We use char because int might match the return type of a gcc2
11857     builtin and then its argument prototype would still apply.  */
11858 char dbm_open();
11859
11860 int main() {
11861 dbm_open()
11862 ; return 0; }
11863 EOF
11864 if { (eval echo configure:11865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11865   rm -rf conftest*
11866   eval "ac_cv_lib_$ac_lib_var=yes"
11867 else
11868   echo "configure: failed program was:" >&5
11869   cat conftest.$ac_ext >&5
11870   rm -rf conftest*
11871   eval "ac_cv_lib_$ac_lib_var=no"
11872 fi
11873 rm -f conftest*
11874 LIBS="$ac_save_LIBS"
11875
11876 fi
11877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11878   echo "$ac_t""yes" 1>&6
11879   ol_cv_lib_ndbm=-ldbm
11880 else
11881   echo "$ac_t""no" 1>&6
11882 ol_cv_lib_ndbm=no
11883 fi
11884                 
11885 fi
11886
11887         
11888 fi
11889
11890         LIBS="$ol_LIBS"
11891
11892 fi
11893
11894 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11895
11896
11897  for ac_hdr in ndbm.h
11898 do
11899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11901 echo "configure:11902: checking for $ac_hdr" >&5
11902 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11903   echo $ac_n "(cached) $ac_c" 1>&6
11904 else
11905   cat > conftest.$ac_ext <<EOF
11906 #line 11907 "configure"
11907 #include "confdefs.h"
11908 #include <$ac_hdr>
11909 EOF
11910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11911 { (eval echo configure:11912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11913 if test -z "$ac_err"; then
11914   rm -rf conftest*
11915   eval "ac_cv_header_$ac_safe=yes"
11916 else
11917   echo "$ac_err" >&5
11918   echo "configure: failed program was:" >&5
11919   cat conftest.$ac_ext >&5
11920   rm -rf conftest*
11921   eval "ac_cv_header_$ac_safe=no"
11922 fi
11923 rm -f conftest*
11924 fi
11925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11926   echo "$ac_t""yes" 1>&6
11927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11928   cat >> confdefs.h <<EOF
11929 #define $ac_tr_hdr 1
11930 EOF
11931  
11932 else
11933   echo "$ac_t""no" 1>&6
11934 fi
11935 done
11936
11937  echo $ac_n "checking for db""... $ac_c" 1>&6
11938 echo "configure:11939: checking for db" >&5
11939 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11940   echo $ac_n "(cached) $ac_c" 1>&6
11941 else
11942   
11943         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11944                 ol_cv_ndbm=no
11945         else
11946                 ol_cv_ndbm=yes
11947         fi
11948
11949 fi
11950
11951 echo "$ac_t""$ol_cv_ndbm" 1>&6
11952  if test $ol_cv_ndbm = yes ; then
11953         cat >> confdefs.h <<\EOF
11954 #define HAVE_NDBM 1
11955 EOF
11956
11957  fi
11958
11959
11960         if test $ol_cv_ndbm = yes ; then
11961                 ol_link_ldbm=ndbm
11962                 ol_with_ldbm_api=ndbm
11963
11964                 if test $ol_cv_lib_ndbm != yes ; then
11965                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11966                 fi
11967         fi
11968 fi
11969
11970 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11971         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11972         if test $ol_enable_ldbm = yes ; then
11973                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11974         fi
11975
11976         echo "configure: warning: disabling LDBM" 1>&2
11977         ol_enable_ldbm=no
11978 fi
11979
11980 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
11981         LINK_BINS_DYNAMIC="yes"
11982 else
11983         LINK_BINS_DYNAMIC="no"
11984 fi
11985
11986 if test $ol_enable_wrappers != no ; then
11987         for ac_hdr in tcpd.h
11988 do
11989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11991 echo "configure:11992: checking for $ac_hdr" >&5
11992 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11993   echo $ac_n "(cached) $ac_c" 1>&6
11994 else
11995   cat > conftest.$ac_ext <<EOF
11996 #line 11997 "configure"
11997 #include "confdefs.h"
11998 #include <$ac_hdr>
11999 EOF
12000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12001 { (eval echo configure:12002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12003 if test -z "$ac_err"; then
12004   rm -rf conftest*
12005   eval "ac_cv_header_$ac_safe=yes"
12006 else
12007   echo "$ac_err" >&5
12008   echo "configure: failed program was:" >&5
12009   cat conftest.$ac_ext >&5
12010   rm -rf conftest*
12011   eval "ac_cv_header_$ac_safe=no"
12012 fi
12013 rm -f conftest*
12014 fi
12015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12016   echo "$ac_t""yes" 1>&6
12017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12018   cat >> confdefs.h <<EOF
12019 #define $ac_tr_hdr 1
12020 EOF
12021  
12022 else
12023   echo "$ac_t""no" 1>&6
12024 fi
12025 done
12026
12027
12028         if test $ac_cv_header_tcpd_h != yes ; then
12029                 have_wrappers=no
12030         else
12031                 cat > conftest.$ac_ext <<EOF
12032 #line 12033 "configure"
12033 #include "confdefs.h"
12034
12035 int allow_severity = 0;
12036 int deny_severity  = 0;
12037                 
12038 int main() {
12039 hosts_access()
12040 ; return 0; }
12041 EOF
12042 if { (eval echo configure:12043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12043   rm -rf conftest*
12044   have_wrappers=yes
12045 else
12046   echo "configure: failed program was:" >&5
12047   cat conftest.$ac_ext >&5
12048   rm -rf conftest*
12049   have_wrappers=no
12050 fi
12051 rm -f conftest*
12052         fi
12053
12054         if test $have_wrappers = yes ; then
12055                 cat >> confdefs.h <<\EOF
12056 #define HAVE_TCPD 1
12057 EOF
12058
12059                 WRAP_LIBS="-lwrap"
12060
12061                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12062 echo "configure:12063: checking for main in -lnsl" >&5
12063 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12065   echo $ac_n "(cached) $ac_c" 1>&6
12066 else
12067   ac_save_LIBS="$LIBS"
12068 LIBS="-lnsl  $LIBS"
12069 cat > conftest.$ac_ext <<EOF
12070 #line 12071 "configure"
12071 #include "confdefs.h"
12072
12073 int main() {
12074 main()
12075 ; return 0; }
12076 EOF
12077 if { (eval echo configure:12078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12078   rm -rf conftest*
12079   eval "ac_cv_lib_$ac_lib_var=yes"
12080 else
12081   echo "configure: failed program was:" >&5
12082   cat conftest.$ac_ext >&5
12083   rm -rf conftest*
12084   eval "ac_cv_lib_$ac_lib_var=no"
12085 fi
12086 rm -f conftest*
12087 LIBS="$ac_save_LIBS"
12088
12089 fi
12090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12091   echo "$ac_t""yes" 1>&6
12092     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12093     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12094   cat >> confdefs.h <<EOF
12095 #define $ac_tr_lib 1
12096 EOF
12097
12098   LIBS="-lnsl $LIBS"
12099
12100 else
12101   echo "$ac_t""no" 1>&6
12102 fi
12103
12104         else
12105                 echo "configure: warning: could not find -lwrap" 1>&2
12106                 if test $ol_enable_wrappers = yes ; then
12107                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12108                 fi
12109
12110                 echo "configure: warning: disabling wrappers support" 1>&2
12111                 ol_enable_wrappers=no
12112                 WRAP_LIBS=""
12113         fi
12114 fi
12115
12116 if test $ol_enable_syslog != no ; then
12117         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12118 echo "configure:12119: checking for openlog" >&5
12119 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12120   echo $ac_n "(cached) $ac_c" 1>&6
12121 else
12122   cat > conftest.$ac_ext <<EOF
12123 #line 12124 "configure"
12124 #include "confdefs.h"
12125 /* System header to define __stub macros and hopefully few prototypes,
12126     which can conflict with char openlog(); below.  */
12127 #include <assert.h>
12128 /* Override any gcc2 internal prototype to avoid an error.  */
12129 /* We use char because int might match the return type of a gcc2
12130     builtin and then its argument prototype would still apply.  */
12131 char openlog();
12132 char (*f)();
12133
12134 int main() {
12135
12136 /* The GNU C library defines this for functions which it implements
12137     to always fail with ENOSYS.  Some functions are actually named
12138     something starting with __ and the normal name is an alias.  */
12139 #if defined (__stub_openlog) || defined (__stub___openlog)
12140 choke me
12141 #else
12142 f = openlog;
12143 #endif
12144
12145 ; return 0; }
12146 EOF
12147 if { (eval echo configure:12148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12148   rm -rf conftest*
12149   eval "ac_cv_func_openlog=yes"
12150 else
12151   echo "configure: failed program was:" >&5
12152   cat conftest.$ac_ext >&5
12153   rm -rf conftest*
12154   eval "ac_cv_func_openlog=no"
12155 fi
12156 rm -f conftest*
12157 fi
12158
12159 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12160   echo "$ac_t""yes" 1>&6
12161   :
12162 else
12163   echo "$ac_t""no" 1>&6
12164 fi
12165
12166         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12167                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12168         fi
12169         ol_enable_syslog=$ac_cv_func_openlog
12170 fi
12171
12172 if test $ol_enable_dmalloc != no ; then
12173         for ac_hdr in dmalloc.h
12174 do
12175 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12176 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12177 echo "configure:12178: checking for $ac_hdr" >&5
12178 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12179   echo $ac_n "(cached) $ac_c" 1>&6
12180 else
12181   cat > conftest.$ac_ext <<EOF
12182 #line 12183 "configure"
12183 #include "confdefs.h"
12184 #include <$ac_hdr>
12185 EOF
12186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12187 { (eval echo configure:12188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12189 if test -z "$ac_err"; then
12190   rm -rf conftest*
12191   eval "ac_cv_header_$ac_safe=yes"
12192 else
12193   echo "$ac_err" >&5
12194   echo "configure: failed program was:" >&5
12195   cat conftest.$ac_ext >&5
12196   rm -rf conftest*
12197   eval "ac_cv_header_$ac_safe=no"
12198 fi
12199 rm -f conftest*
12200 fi
12201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12202   echo "$ac_t""yes" 1>&6
12203     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12204   cat >> confdefs.h <<EOF
12205 #define $ac_tr_hdr 1
12206 EOF
12207  
12208 else
12209   echo "$ac_t""no" 1>&6
12210 fi
12211 done
12212
12213         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12214 echo "configure:12215: checking for dmalloc_shutdown in -ldmalloc" >&5
12215 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12217   echo $ac_n "(cached) $ac_c" 1>&6
12218 else
12219   ac_save_LIBS="$LIBS"
12220 LIBS="-ldmalloc  $LIBS"
12221 cat > conftest.$ac_ext <<EOF
12222 #line 12223 "configure"
12223 #include "confdefs.h"
12224 /* Override any gcc2 internal prototype to avoid an error.  */
12225 /* We use char because int might match the return type of a gcc2
12226     builtin and then its argument prototype would still apply.  */
12227 char dmalloc_shutdown();
12228
12229 int main() {
12230 dmalloc_shutdown()
12231 ; return 0; }
12232 EOF
12233 if { (eval echo configure:12234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12234   rm -rf conftest*
12235   eval "ac_cv_lib_$ac_lib_var=yes"
12236 else
12237   echo "configure: failed program was:" >&5
12238   cat conftest.$ac_ext >&5
12239   rm -rf conftest*
12240   eval "ac_cv_lib_$ac_lib_var=no"
12241 fi
12242 rm -f conftest*
12243 LIBS="$ac_save_LIBS"
12244
12245 fi
12246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12247   echo "$ac_t""yes" 1>&6
12248     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12249     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12250   cat >> confdefs.h <<EOF
12251 #define $ac_tr_lib 1
12252 EOF
12253
12254   LIBS="-ldmalloc $LIBS"
12255
12256 else
12257   echo "$ac_t""no" 1>&6
12258 fi
12259
12260 fi
12261
12262 if test $ol_enable_tcl != no ; then
12263         for ac_hdr in tcl.h
12264 do
12265 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12266 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12267 echo "configure:12268: checking for $ac_hdr" >&5
12268 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12269   echo $ac_n "(cached) $ac_c" 1>&6
12270 else
12271   cat > conftest.$ac_ext <<EOF
12272 #line 12273 "configure"
12273 #include "confdefs.h"
12274 #include <$ac_hdr>
12275 EOF
12276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12277 { (eval echo configure:12278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12279 if test -z "$ac_err"; then
12280   rm -rf conftest*
12281   eval "ac_cv_header_$ac_safe=yes"
12282 else
12283   echo "$ac_err" >&5
12284   echo "configure: failed program was:" >&5
12285   cat conftest.$ac_ext >&5
12286   rm -rf conftest*
12287   eval "ac_cv_header_$ac_safe=no"
12288 fi
12289 rm -f conftest*
12290 fi
12291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12292   echo "$ac_t""yes" 1>&6
12293     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12294   cat >> confdefs.h <<EOF
12295 #define $ac_tr_hdr 1
12296 EOF
12297  
12298 else
12299   echo "$ac_t""no" 1>&6
12300 fi
12301 done
12302
12303
12304         if test $ac_cv_header_tcl_h != yes ; then
12305                 have_tcl=no
12306         else
12307                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12308                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12309 echo "configure:12310: checking for main in -l$lib" >&5
12310 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12312   echo $ac_n "(cached) $ac_c" 1>&6
12313 else
12314   ac_save_LIBS="$LIBS"
12315 LIBS="-l$lib  $LIBS"
12316 cat > conftest.$ac_ext <<EOF
12317 #line 12318 "configure"
12318 #include "confdefs.h"
12319
12320 int main() {
12321 main()
12322 ; return 0; }
12323 EOF
12324 if { (eval echo configure:12325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12325   rm -rf conftest*
12326   eval "ac_cv_lib_$ac_lib_var=yes"
12327 else
12328   echo "configure: failed program was:" >&5
12329   cat conftest.$ac_ext >&5
12330   rm -rf conftest*
12331   eval "ac_cv_lib_$ac_lib_var=no"
12332 fi
12333 rm -f conftest*
12334 LIBS="$ac_save_LIBS"
12335
12336 fi
12337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12338   echo "$ac_t""yes" 1>&6
12339   have_tcl=yes
12340                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12341                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12342                            else
12343                                MOD_TCL_LIB="-l${lib}"
12344                            fi;break
12345 else
12346   echo "$ac_t""no" 1>&6
12347 have_tcl=no
12348 fi
12349
12350                 done
12351         fi
12352
12353         if test $have_tcl != yes ; then
12354                 echo "configure: warning: could not find -ltcl" 1>&2
12355                 if test $ol_enable_tcl = yes ; then
12356                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12357                 fi
12358
12359                 ol_enable_tcl=no
12360         fi
12361 fi
12362
12363 ol_link_termcap=no
12364 for ac_hdr in termcap.h ncurses.h
12365 do
12366 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12367 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12368 echo "configure:12369: checking for $ac_hdr" >&5
12369 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12370   echo $ac_n "(cached) $ac_c" 1>&6
12371 else
12372   cat > conftest.$ac_ext <<EOF
12373 #line 12374 "configure"
12374 #include "confdefs.h"
12375 #include <$ac_hdr>
12376 EOF
12377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12378 { (eval echo configure:12379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12380 if test -z "$ac_err"; then
12381   rm -rf conftest*
12382   eval "ac_cv_header_$ac_safe=yes"
12383 else
12384   echo "$ac_err" >&5
12385   echo "configure: failed program was:" >&5
12386   cat conftest.$ac_ext >&5
12387   rm -rf conftest*
12388   eval "ac_cv_header_$ac_safe=no"
12389 fi
12390 rm -f conftest*
12391 fi
12392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12393   echo "$ac_t""yes" 1>&6
12394     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12395   cat >> confdefs.h <<EOF
12396 #define $ac_tr_hdr 1
12397 EOF
12398  
12399 else
12400   echo "$ac_t""no" 1>&6
12401 fi
12402 done
12403
12404
12405 if test $ol_link_termcap = no ; then
12406         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12407 echo "configure:12408: checking for tputs in -ltermcap" >&5
12408 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12410   echo $ac_n "(cached) $ac_c" 1>&6
12411 else
12412   ac_save_LIBS="$LIBS"
12413 LIBS="-ltermcap  $LIBS"
12414 cat > conftest.$ac_ext <<EOF
12415 #line 12416 "configure"
12416 #include "confdefs.h"
12417 /* Override any gcc2 internal prototype to avoid an error.  */
12418 /* We use char because int might match the return type of a gcc2
12419     builtin and then its argument prototype would still apply.  */
12420 char tputs();
12421
12422 int main() {
12423 tputs()
12424 ; return 0; }
12425 EOF
12426 if { (eval echo configure:12427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12427   rm -rf conftest*
12428   eval "ac_cv_lib_$ac_lib_var=yes"
12429 else
12430   echo "configure: failed program was:" >&5
12431   cat conftest.$ac_ext >&5
12432   rm -rf conftest*
12433   eval "ac_cv_lib_$ac_lib_var=no"
12434 fi
12435 rm -f conftest*
12436 LIBS="$ac_save_LIBS"
12437
12438 fi
12439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12440   echo "$ac_t""yes" 1>&6
12441   have_termcap=yes
12442 else
12443   echo "$ac_t""no" 1>&6
12444 have_termcap=no
12445 fi
12446
12447         if test $have_termcap = yes ; then
12448                 cat >> confdefs.h <<\EOF
12449 #define HAVE_TERMCAP 1
12450 EOF
12451
12452                 ol_link_termcap=yes
12453                 TERMCAP_LIBS=-ltermcap
12454         fi
12455 fi
12456
12457 if test $ol_link_termcap = no ; then
12458         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12459 echo "configure:12460: checking for initscr in -lncurses" >&5
12460 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12461 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12462   echo $ac_n "(cached) $ac_c" 1>&6
12463 else
12464   ac_save_LIBS="$LIBS"
12465 LIBS="-lncurses  $LIBS"
12466 cat > conftest.$ac_ext <<EOF
12467 #line 12468 "configure"
12468 #include "confdefs.h"
12469 /* Override any gcc2 internal prototype to avoid an error.  */
12470 /* We use char because int might match the return type of a gcc2
12471     builtin and then its argument prototype would still apply.  */
12472 char initscr();
12473
12474 int main() {
12475 initscr()
12476 ; return 0; }
12477 EOF
12478 if { (eval echo configure:12479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12479   rm -rf conftest*
12480   eval "ac_cv_lib_$ac_lib_var=yes"
12481 else
12482   echo "configure: failed program was:" >&5
12483   cat conftest.$ac_ext >&5
12484   rm -rf conftest*
12485   eval "ac_cv_lib_$ac_lib_var=no"
12486 fi
12487 rm -f conftest*
12488 LIBS="$ac_save_LIBS"
12489
12490 fi
12491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12492   echo "$ac_t""yes" 1>&6
12493   have_ncurses=yes
12494 else
12495   echo "$ac_t""no" 1>&6
12496 have_ncurses=no
12497 fi
12498
12499         if test $have_ncurses = yes ; then
12500                 cat >> confdefs.h <<\EOF
12501 #define HAVE_NCURSES 1
12502 EOF
12503
12504                 ol_link_termcap=yes
12505                 TERMCAP_LIBS=-lncurses
12506         fi
12507 fi
12508
12509 if test $ol_link_termcap = no ; then
12510         cat >> confdefs.h <<\EOF
12511 #define NO_TERMCAP 1
12512 EOF
12513
12514         TERMCAP_LIBS=
12515 fi
12516
12517 ol_link_sasl=no
12518 if test $ol_with_cyrus_sasl != no ; then
12519         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12520 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12521 echo "configure:12522: checking for sasl.h" >&5
12522 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12523   echo $ac_n "(cached) $ac_c" 1>&6
12524 else
12525   cat > conftest.$ac_ext <<EOF
12526 #line 12527 "configure"
12527 #include "confdefs.h"
12528 #include <sasl.h>
12529 EOF
12530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12531 { (eval echo configure:12532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12533 if test -z "$ac_err"; then
12534   rm -rf conftest*
12535   eval "ac_cv_header_$ac_safe=yes"
12536 else
12537   echo "$ac_err" >&5
12538   echo "configure: failed program was:" >&5
12539   cat conftest.$ac_ext >&5
12540   rm -rf conftest*
12541   eval "ac_cv_header_$ac_safe=no"
12542 fi
12543 rm -f conftest*
12544 fi
12545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12546   echo "$ac_t""yes" 1>&6
12547   :
12548 else
12549   echo "$ac_t""no" 1>&6
12550 fi
12551
12552
12553         if test $ac_cv_header_sasl_h = yes ; then
12554                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12555 echo "configure:12556: checking for sasl_client_init in -lsasl" >&5
12556 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12558   echo $ac_n "(cached) $ac_c" 1>&6
12559 else
12560   ac_save_LIBS="$LIBS"
12561 LIBS="-lsasl  $LIBS"
12562 cat > conftest.$ac_ext <<EOF
12563 #line 12564 "configure"
12564 #include "confdefs.h"
12565 /* Override any gcc2 internal prototype to avoid an error.  */
12566 /* We use char because int might match the return type of a gcc2
12567     builtin and then its argument prototype would still apply.  */
12568 char sasl_client_init();
12569
12570 int main() {
12571 sasl_client_init()
12572 ; return 0; }
12573 EOF
12574 if { (eval echo configure:12575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12575   rm -rf conftest*
12576   eval "ac_cv_lib_$ac_lib_var=yes"
12577 else
12578   echo "configure: failed program was:" >&5
12579   cat conftest.$ac_ext >&5
12580   rm -rf conftest*
12581   eval "ac_cv_lib_$ac_lib_var=no"
12582 fi
12583 rm -f conftest*
12584 LIBS="$ac_save_LIBS"
12585
12586 fi
12587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12588   echo "$ac_t""yes" 1>&6
12589   have_cyrus_sasl=yes
12590 else
12591   echo "$ac_t""no" 1>&6
12592 have_cyrus_sasl=no
12593 fi
12594
12595
12596                 if test $have_cyrus_sasl != no ; then
12597                         SASL_LIBS="-lsasl"
12598                         cat >> confdefs.h <<\EOF
12599 #define HAVE_CYRUS_SASL 1
12600 EOF
12601
12602                         ol_link_sasl=yes
12603                 fi
12604         fi
12605
12606         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12607                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12608         fi
12609 fi
12610
12611 if test $cross_compiling != yes ; then
12612         dev=no
12613         if test -r /dev/urandom ; then
12614                 dev="/dev/urandom";
12615         elif test -r /idev/urandom ; then
12616                 dev="/idev/urandom";
12617         elif test -r /dev/srandom ; then
12618                 dev="/dev/srandom";
12619         elif test -r /dev/random ; then
12620                 dev="/dev/random";
12621         elif test -r /idev/random ; then
12622                 dev="/idev/random";
12623         fi
12624
12625         if test $dev != no ; then
12626                 cat >> confdefs.h <<EOF
12627 #define URANDOM_DEVICE "$dev"
12628 EOF
12629
12630         fi
12631 fi
12632
12633 ol_link_fetch=no
12634 if test $ol_with_fetch != no ; then
12635         ol=$LIBS
12636 LIBS="-lfetch -lcom_err $LIBS"
12637 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12638 echo "configure:12639: checking fetch(3) library" >&5
12639 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12640   echo $ac_n "(cached) $ac_c" 1>&6
12641 else
12642   
12643         cat > conftest.$ac_ext <<EOF
12644 #line 12645 "configure"
12645 #include "confdefs.h"
12646
12647 #include <sys/param.h>
12648 #include <stdio.h>
12649 #include <fetch.h>
12650 int main() {
12651 struct url *u = fetchParseURL("file:///"); 
12652 ; return 0; }
12653 EOF
12654 if { (eval echo configure:12655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12655   rm -rf conftest*
12656   ol_cv_lib_fetch=yes
12657 else
12658   echo "configure: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   rm -rf conftest*
12661   ol_cv_lib_fetch=no
12662 fi
12663 rm -f conftest*
12664 fi
12665
12666 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12667 LIBS=$ol_LIBS
12668 if test $ol_cv_lib_fetch != no ; then
12669         ol_link_fetch="-lfetch -lcom_err"
12670         cat >> confdefs.h <<\EOF
12671 #define HAVE_FETCH 1
12672 EOF
12673
12674 fi
12675
12676
12677         if test $ol_cv_lib_fetch != no ; then
12678                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12679                 ol_link_fetch=freebsd
12680
12681         elif test $ol_with_fetch != auto ; then
12682                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12683         fi 
12684 fi
12685
12686 ol_link_readline=no
12687 if test $ol_with_readline != no ; then
12688         for ac_hdr in readline/readline.h readline/history.h
12689 do
12690 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12691 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12692 echo "configure:12693: checking for $ac_hdr" >&5
12693 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12694   echo $ac_n "(cached) $ac_c" 1>&6
12695 else
12696   cat > conftest.$ac_ext <<EOF
12697 #line 12698 "configure"
12698 #include "confdefs.h"
12699 #include <$ac_hdr>
12700 EOF
12701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12702 { (eval echo configure:12703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12703 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12704 if test -z "$ac_err"; then
12705   rm -rf conftest*
12706   eval "ac_cv_header_$ac_safe=yes"
12707 else
12708   echo "$ac_err" >&5
12709   echo "configure: failed program was:" >&5
12710   cat conftest.$ac_ext >&5
12711   rm -rf conftest*
12712   eval "ac_cv_header_$ac_safe=no"
12713 fi
12714 rm -f conftest*
12715 fi
12716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12717   echo "$ac_t""yes" 1>&6
12718     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12719   cat >> confdefs.h <<EOF
12720 #define $ac_tr_hdr 1
12721 EOF
12722  
12723 else
12724   echo "$ac_t""no" 1>&6
12725 fi
12726 done
12727
12728
12729         if test $ac_cv_header_readline_readline_h = yes ; then
12730                 save_LIBS="$LIBS"
12731                 LIBS="$TERMCAP_LIBS $LIBS"
12732                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12733 echo "configure:12734: checking for readline in -lreadline" >&5
12734 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12735 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12736   echo $ac_n "(cached) $ac_c" 1>&6
12737 else
12738   ac_save_LIBS="$LIBS"
12739 LIBS="-lreadline  $LIBS"
12740 cat > conftest.$ac_ext <<EOF
12741 #line 12742 "configure"
12742 #include "confdefs.h"
12743 /* Override any gcc2 internal prototype to avoid an error.  */
12744 /* We use char because int might match the return type of a gcc2
12745     builtin and then its argument prototype would still apply.  */
12746 char readline();
12747
12748 int main() {
12749 readline()
12750 ; return 0; }
12751 EOF
12752 if { (eval echo configure:12753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12753   rm -rf conftest*
12754   eval "ac_cv_lib_$ac_lib_var=yes"
12755 else
12756   echo "configure: failed program was:" >&5
12757   cat conftest.$ac_ext >&5
12758   rm -rf conftest*
12759   eval "ac_cv_lib_$ac_lib_var=no"
12760 fi
12761 rm -f conftest*
12762 LIBS="$ac_save_LIBS"
12763
12764 fi
12765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12766   echo "$ac_t""yes" 1>&6
12767   have_readline=yes
12768 else
12769   echo "$ac_t""no" 1>&6
12770 have_readline=no
12771 fi
12772
12773                 LIBS="$save_LIBS"
12774                         
12775                 if test $have_readline = yes ; then
12776                         ol_with_readline=found
12777                         ol_link_readline=yes
12778
12779                         READLINE_LIBS="-lreadline"
12780                 fi
12781         fi
12782 fi
12783
12784 if test $ol_link_readline = yes ; then
12785         cat >> confdefs.h <<\EOF
12786 #define HAVE_READLINE 1
12787 EOF
12788
12789 fi
12790
12791
12792 if test $ol_enable_crypt != no ; then
12793         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12794 echo "configure:12795: checking for crypt" >&5
12795 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12796   echo $ac_n "(cached) $ac_c" 1>&6
12797 else
12798   cat > conftest.$ac_ext <<EOF
12799 #line 12800 "configure"
12800 #include "confdefs.h"
12801 /* System header to define __stub macros and hopefully few prototypes,
12802     which can conflict with char crypt(); below.  */
12803 #include <assert.h>
12804 /* Override any gcc2 internal prototype to avoid an error.  */
12805 /* We use char because int might match the return type of a gcc2
12806     builtin and then its argument prototype would still apply.  */
12807 char crypt();
12808 char (*f)();
12809
12810 int main() {
12811
12812 /* The GNU C library defines this for functions which it implements
12813     to always fail with ENOSYS.  Some functions are actually named
12814     something starting with __ and the normal name is an alias.  */
12815 #if defined (__stub_crypt) || defined (__stub___crypt)
12816 choke me
12817 #else
12818 f = crypt;
12819 #endif
12820
12821 ; return 0; }
12822 EOF
12823 if { (eval echo configure:12824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12824   rm -rf conftest*
12825   eval "ac_cv_func_crypt=yes"
12826 else
12827   echo "configure: failed program was:" >&5
12828   cat conftest.$ac_ext >&5
12829   rm -rf conftest*
12830   eval "ac_cv_func_crypt=no"
12831 fi
12832 rm -f conftest*
12833 fi
12834
12835 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12836   echo "$ac_t""yes" 1>&6
12837   have_crypt=yes
12838 else
12839   echo "$ac_t""no" 1>&6
12840
12841                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12842 echo "configure:12843: checking for crypt in -lcrypt" >&5
12843 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12844 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12845   echo $ac_n "(cached) $ac_c" 1>&6
12846 else
12847   ac_save_LIBS="$LIBS"
12848 LIBS="-lcrypt  $LIBS"
12849 cat > conftest.$ac_ext <<EOF
12850 #line 12851 "configure"
12851 #include "confdefs.h"
12852 /* Override any gcc2 internal prototype to avoid an error.  */
12853 /* We use char because int might match the return type of a gcc2
12854     builtin and then its argument prototype would still apply.  */
12855 char crypt();
12856
12857 int main() {
12858 crypt()
12859 ; return 0; }
12860 EOF
12861 if { (eval echo configure:12862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12862   rm -rf conftest*
12863   eval "ac_cv_lib_$ac_lib_var=yes"
12864 else
12865   echo "configure: failed program was:" >&5
12866   cat conftest.$ac_ext >&5
12867   rm -rf conftest*
12868   eval "ac_cv_lib_$ac_lib_var=no"
12869 fi
12870 rm -f conftest*
12871 LIBS="$ac_save_LIBS"
12872
12873 fi
12874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12875   echo "$ac_t""yes" 1>&6
12876   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12877                         have_crypt=yes
12878 else
12879   echo "$ac_t""no" 1>&6
12880 have_crypt=no
12881 fi
12882
12883 fi
12884
12885
12886         if test $have_crypt = yes ; then
12887                 cat >> confdefs.h <<\EOF
12888 #define HAVE_CRYPT 1
12889 EOF
12890
12891         else
12892                 echo "configure: warning: could not find crypt" 1>&2
12893                 if test $ol_enable_crypt = yes ; then
12894                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12895                 fi
12896
12897                 echo "configure: warning: disabling crypt support" 1>&2
12898                 ol_enable_crypt=no
12899         fi
12900 fi
12901
12902 if test $ol_enable_proctitle != no ; then
12903         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12904 echo "configure:12905: checking for setproctitle" >&5
12905 if eval "test \"\${ac_cv_func_setproctitle+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 /* System header to define __stub macros and hopefully few prototypes,
12912     which can conflict with char setproctitle(); below.  */
12913 #include <assert.h>
12914 /* Override any gcc2 internal prototype to avoid an error.  */
12915 /* We use char because int might match the return type of a gcc2
12916     builtin and then its argument prototype would still apply.  */
12917 char setproctitle();
12918 char (*f)();
12919
12920 int main() {
12921
12922 /* The GNU C library defines this for functions which it implements
12923     to always fail with ENOSYS.  Some functions are actually named
12924     something starting with __ and the normal name is an alias.  */
12925 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12926 choke me
12927 #else
12928 f = setproctitle;
12929 #endif
12930
12931 ; return 0; }
12932 EOF
12933 if { (eval echo configure:12934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12934   rm -rf conftest*
12935   eval "ac_cv_func_setproctitle=yes"
12936 else
12937   echo "configure: failed program was:" >&5
12938   cat conftest.$ac_ext >&5
12939   rm -rf conftest*
12940   eval "ac_cv_func_setproctitle=no"
12941 fi
12942 rm -f conftest*
12943 fi
12944
12945 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12946   echo "$ac_t""yes" 1>&6
12947   have_setproctitle=yes
12948 else
12949   echo "$ac_t""no" 1>&6
12950
12951                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12952 echo "configure:12953: checking for setproctitle in -lutil" >&5
12953 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12954 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12955   echo $ac_n "(cached) $ac_c" 1>&6
12956 else
12957   ac_save_LIBS="$LIBS"
12958 LIBS="-lutil  $LIBS"
12959 cat > conftest.$ac_ext <<EOF
12960 #line 12961 "configure"
12961 #include "confdefs.h"
12962 /* Override any gcc2 internal prototype to avoid an error.  */
12963 /* We use char because int might match the return type of a gcc2
12964     builtin and then its argument prototype would still apply.  */
12965 char setproctitle();
12966
12967 int main() {
12968 setproctitle()
12969 ; return 0; }
12970 EOF
12971 if { (eval echo configure:12972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12972   rm -rf conftest*
12973   eval "ac_cv_lib_$ac_lib_var=yes"
12974 else
12975   echo "configure: failed program was:" >&5
12976   cat conftest.$ac_ext >&5
12977   rm -rf conftest*
12978   eval "ac_cv_lib_$ac_lib_var=no"
12979 fi
12980 rm -f conftest*
12981 LIBS="$ac_save_LIBS"
12982
12983 fi
12984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12985   echo "$ac_t""yes" 1>&6
12986   have_setproctitle=yes
12987                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12988 else
12989   echo "$ac_t""no" 1>&6
12990 have_setproctitle=no
12991                         LIBOBJS="$LIBOBJS setproctitle.o"
12992                         LIBSRCS="$LIBSRCS setproctitle.c"
12993 fi
12994
12995 fi
12996
12997
12998         if test $have_setproctitle = yes ; then
12999                 cat >> confdefs.h <<\EOF
13000 #define HAVE_SETPROCTITLE 1
13001 EOF
13002
13003         fi
13004 fi
13005
13006 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13007 echo "configure:13008: checking for ANSI C header files" >&5
13008 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13009   echo $ac_n "(cached) $ac_c" 1>&6
13010 else
13011   cat > conftest.$ac_ext <<EOF
13012 #line 13013 "configure"
13013 #include "confdefs.h"
13014 #include <stdlib.h>
13015 #include <stdarg.h>
13016 #include <string.h>
13017 #include <float.h>
13018 EOF
13019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13020 { (eval echo configure:13021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13022 if test -z "$ac_err"; then
13023   rm -rf conftest*
13024   ac_cv_header_stdc=yes
13025 else
13026   echo "$ac_err" >&5
13027   echo "configure: failed program was:" >&5
13028   cat conftest.$ac_ext >&5
13029   rm -rf conftest*
13030   ac_cv_header_stdc=no
13031 fi
13032 rm -f conftest*
13033
13034 if test $ac_cv_header_stdc = yes; then
13035   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13036 cat > conftest.$ac_ext <<EOF
13037 #line 13038 "configure"
13038 #include "confdefs.h"
13039 #include <string.h>
13040 EOF
13041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13042   egrep "memchr" >/dev/null 2>&1; then
13043   :
13044 else
13045   rm -rf conftest*
13046   ac_cv_header_stdc=no
13047 fi
13048 rm -f conftest*
13049
13050 fi
13051
13052 if test $ac_cv_header_stdc = yes; then
13053   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13054 cat > conftest.$ac_ext <<EOF
13055 #line 13056 "configure"
13056 #include "confdefs.h"
13057 #include <stdlib.h>
13058 EOF
13059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13060   egrep "free" >/dev/null 2>&1; then
13061   :
13062 else
13063   rm -rf conftest*
13064   ac_cv_header_stdc=no
13065 fi
13066 rm -f conftest*
13067
13068 fi
13069
13070 if test $ac_cv_header_stdc = yes; then
13071   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13072 if test "$cross_compiling" = yes; then
13073   :
13074 else
13075   cat > conftest.$ac_ext <<EOF
13076 #line 13077 "configure"
13077 #include "confdefs.h"
13078 #include <ctype.h>
13079 #if ((' ' & 0x0FF) == 0x020)
13080 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13081 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13082 #else
13083 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13084  || ('j' <= (c) && (c) <= 'r') \
13085  || ('s' <= (c) && (c) <= 'z'))
13086 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13087 #endif
13088 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13089 int main () { int i; for (i = 0; i < 256; i++)
13090 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13091 exit (0); }
13092
13093 EOF
13094 if { (eval echo configure:13095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13095 then
13096   :
13097 else
13098   echo "configure: failed program was:" >&5
13099   cat conftest.$ac_ext >&5
13100   rm -fr conftest*
13101   ac_cv_header_stdc=no
13102 fi
13103 rm -fr conftest*
13104 fi
13105
13106 fi
13107 fi
13108
13109 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13110 if test $ac_cv_header_stdc = yes; then
13111   cat >> confdefs.h <<\EOF
13112 #define STDC_HEADERS 1
13113 EOF
13114
13115 fi
13116
13117 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13118 echo "configure:13119: checking for mode_t" >&5
13119 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13120   echo $ac_n "(cached) $ac_c" 1>&6
13121 else
13122   cat > conftest.$ac_ext <<EOF
13123 #line 13124 "configure"
13124 #include "confdefs.h"
13125 #include <sys/types.h>
13126 #if STDC_HEADERS
13127 #include <stdlib.h>
13128 #include <stddef.h>
13129 #endif
13130
13131 EOF
13132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13133   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13134   rm -rf conftest*
13135   eval "ac_cv_type_mode_t=yes"
13136 else
13137   rm -rf conftest*
13138   eval "ac_cv_type_mode_t=no"
13139 fi
13140 rm -f conftest*
13141
13142 fi
13143 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13144   echo "$ac_t""yes" 1>&6
13145 else
13146   echo "$ac_t""no" 1>&6
13147   cat >> confdefs.h <<EOF
13148 #define mode_t int
13149 EOF
13150
13151 fi
13152
13153 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13154 echo "configure:13155: checking for off_t" >&5
13155 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13156   echo $ac_n "(cached) $ac_c" 1>&6
13157 else
13158   cat > conftest.$ac_ext <<EOF
13159 #line 13160 "configure"
13160 #include "confdefs.h"
13161 #include <sys/types.h>
13162 #if STDC_HEADERS
13163 #include <stdlib.h>
13164 #include <stddef.h>
13165 #endif
13166
13167 EOF
13168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13169   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13170   rm -rf conftest*
13171   eval "ac_cv_type_off_t=yes"
13172 else
13173   rm -rf conftest*
13174   eval "ac_cv_type_off_t=no"
13175 fi
13176 rm -f conftest*
13177
13178 fi
13179 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13180   echo "$ac_t""yes" 1>&6
13181 else
13182   echo "$ac_t""no" 1>&6
13183   cat >> confdefs.h <<EOF
13184 #define off_t long
13185 EOF
13186
13187 fi
13188
13189 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13190 echo "configure:13191: checking for pid_t" >&5
13191 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13192   echo $ac_n "(cached) $ac_c" 1>&6
13193 else
13194   cat > conftest.$ac_ext <<EOF
13195 #line 13196 "configure"
13196 #include "confdefs.h"
13197 #include <sys/types.h>
13198 #if STDC_HEADERS
13199 #include <stdlib.h>
13200 #include <stddef.h>
13201 #endif
13202
13203 EOF
13204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13205   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13206   rm -rf conftest*
13207   eval "ac_cv_type_pid_t=yes"
13208 else
13209   rm -rf conftest*
13210   eval "ac_cv_type_pid_t=no"
13211 fi
13212 rm -f conftest*
13213
13214 fi
13215 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13216   echo "$ac_t""yes" 1>&6
13217 else
13218   echo "$ac_t""no" 1>&6
13219   cat >> confdefs.h <<EOF
13220 #define pid_t int
13221 EOF
13222
13223 fi
13224
13225 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13226 echo "configure:13227: checking for ptrdiff_t" >&5
13227 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13228   echo $ac_n "(cached) $ac_c" 1>&6
13229 else
13230   cat > conftest.$ac_ext <<EOF
13231 #line 13232 "configure"
13232 #include "confdefs.h"
13233 #include <stddef.h>
13234 int main() {
13235 ptrdiff_t p
13236 ; return 0; }
13237 EOF
13238 if { (eval echo configure:13239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13239   rm -rf conftest*
13240   am_cv_type_ptrdiff_t=yes
13241 else
13242   echo "configure: failed program was:" >&5
13243   cat conftest.$ac_ext >&5
13244   rm -rf conftest*
13245   am_cv_type_ptrdiff_t=no
13246 fi
13247 rm -f conftest*
13248 fi
13249
13250 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13251    if test $am_cv_type_ptrdiff_t = yes; then
13252      cat >> confdefs.h <<\EOF
13253 #define HAVE_PTRDIFF_T 1
13254 EOF
13255
13256    fi
13257
13258 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13259 echo "configure:13260: checking return type of signal handlers" >&5
13260 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13261   echo $ac_n "(cached) $ac_c" 1>&6
13262 else
13263   cat > conftest.$ac_ext <<EOF
13264 #line 13265 "configure"
13265 #include "confdefs.h"
13266 #include <sys/types.h>
13267 #include <signal.h>
13268 #ifdef signal
13269 #undef signal
13270 #endif
13271 #ifdef __cplusplus
13272 extern "C" void (*signal (int, void (*)(int)))(int);
13273 #else
13274 void (*signal ()) ();
13275 #endif
13276
13277 int main() {
13278 int i;
13279 ; return 0; }
13280 EOF
13281 if { (eval echo configure:13282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13282   rm -rf conftest*
13283   ac_cv_type_signal=void
13284 else
13285   echo "configure: failed program was:" >&5
13286   cat conftest.$ac_ext >&5
13287   rm -rf conftest*
13288   ac_cv_type_signal=int
13289 fi
13290 rm -f conftest*
13291 fi
13292
13293 echo "$ac_t""$ac_cv_type_signal" 1>&6
13294 cat >> confdefs.h <<EOF
13295 #define RETSIGTYPE $ac_cv_type_signal
13296 EOF
13297
13298
13299 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13300 echo "configure:13301: checking for size_t" >&5
13301 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13302   echo $ac_n "(cached) $ac_c" 1>&6
13303 else
13304   cat > conftest.$ac_ext <<EOF
13305 #line 13306 "configure"
13306 #include "confdefs.h"
13307 #include <sys/types.h>
13308 #if STDC_HEADERS
13309 #include <stdlib.h>
13310 #include <stddef.h>
13311 #endif
13312
13313 EOF
13314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13315   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13316   rm -rf conftest*
13317   eval "ac_cv_type_size_t=yes"
13318 else
13319   rm -rf conftest*
13320   eval "ac_cv_type_size_t=no"
13321 fi
13322 rm -f conftest*
13323
13324 fi
13325 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13326   echo "$ac_t""yes" 1>&6
13327 else
13328   echo "$ac_t""no" 1>&6
13329   cat >> confdefs.h <<EOF
13330 #define size_t unsigned
13331 EOF
13332
13333 fi
13334
13335
13336 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13337 echo "configure:13338: checking for ssize_t" >&5
13338 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13339   echo $ac_n "(cached) $ac_c" 1>&6
13340 else
13341   cat > conftest.$ac_ext <<EOF
13342 #line 13343 "configure"
13343 #include "confdefs.h"
13344 #include <sys/types.h>
13345 #if STDC_HEADERS
13346 #include <stdlib.h>
13347 #include <stddef.h>
13348 #endif
13349
13350 EOF
13351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13352   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13353   rm -rf conftest*
13354   eval "ac_cv_type_ssize_t=yes"
13355 else
13356   rm -rf conftest*
13357   eval "ac_cv_type_ssize_t=no"
13358 fi
13359 rm -f conftest*
13360
13361 fi
13362 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13363   echo "$ac_t""yes" 1>&6
13364 else
13365   echo "$ac_t""no" 1>&6
13366   cat >> confdefs.h <<EOF
13367 #define ssize_t signed int
13368 EOF
13369
13370 fi
13371
13372 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13373 echo "configure:13374: checking for caddr_t" >&5
13374 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13375   echo $ac_n "(cached) $ac_c" 1>&6
13376 else
13377   cat > conftest.$ac_ext <<EOF
13378 #line 13379 "configure"
13379 #include "confdefs.h"
13380 #include <sys/types.h>
13381 #if STDC_HEADERS
13382 #include <stdlib.h>
13383 #include <stddef.h>
13384 #endif
13385
13386 EOF
13387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13388   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13389   rm -rf conftest*
13390   eval "ac_cv_type_caddr_t=yes"
13391 else
13392   rm -rf conftest*
13393   eval "ac_cv_type_caddr_t=no"
13394 fi
13395 rm -f conftest*
13396
13397 fi
13398 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13399   echo "$ac_t""yes" 1>&6
13400 else
13401   echo "$ac_t""no" 1>&6
13402   cat >> confdefs.h <<EOF
13403 #define caddr_t char *
13404 EOF
13405
13406 fi
13407
13408
13409 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13410 echo "configure:13411: checking for socklen_t" >&5
13411 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13412   echo $ac_n "(cached) $ac_c" 1>&6
13413 else
13414   cat > conftest.$ac_ext <<EOF
13415 #line 13416 "configure"
13416 #include "confdefs.h"
13417
13418 #ifdef HAVE_SYS_TYPES_H
13419 #include <sys/types.h>
13420 #endif
13421 #ifdef HAVE_SYS_SOCKET_H
13422 #include <sys/socket.h>
13423 #endif
13424
13425 int main() {
13426 socklen_t len;
13427 ; return 0; }
13428 EOF
13429 if { (eval echo configure:13430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13430   rm -rf conftest*
13431   ol_cv_type_socklen_t=yes
13432 else
13433   echo "configure: failed program was:" >&5
13434   cat conftest.$ac_ext >&5
13435   rm -rf conftest*
13436   ol_cv_type_socklen_t=no
13437 fi
13438 rm -f conftest*
13439 fi
13440
13441 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13442   if test $ol_cv_type_socklen_t = no; then
13443     cat >> confdefs.h <<\EOF
13444 #define socklen_t int
13445 EOF
13446
13447   fi
13448  
13449 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13450 echo "configure:13451: checking for member st_blksize in aggregate type struct stat" >&5
13451 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13452   echo $ac_n "(cached) $ac_c" 1>&6
13453 else
13454   cat > conftest.$ac_ext <<EOF
13455 #line 13456 "configure"
13456 #include "confdefs.h"
13457 #include <sys/types.h>
13458 #include <sys/stat.h>
13459 int main() {
13460 struct stat foo; foo.st_blksize;
13461 ; return 0; }
13462 EOF
13463 if { (eval echo configure:13464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13464   rm -rf conftest*
13465   ac_cv_c_struct_member_st_blksize=yes
13466 else
13467   echo "configure: failed program was:" >&5
13468   cat conftest.$ac_ext >&5
13469   rm -rf conftest*
13470   ac_cv_c_struct_member_st_blksize=no
13471 fi
13472 rm -f conftest*
13473 fi
13474
13475 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13476 st_blksize="$ac_cv_c_struct_member_st_blksize"
13477 if test $ac_cv_c_struct_member_st_blksize = yes; then
13478   cat >> confdefs.h <<\EOF
13479 #define HAVE_ST_BLKSIZE 1
13480 EOF
13481
13482 fi
13483
13484 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13485 echo "configure:13486: checking whether time.h and sys/time.h may both be included" >&5
13486 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13487   echo $ac_n "(cached) $ac_c" 1>&6
13488 else
13489   cat > conftest.$ac_ext <<EOF
13490 #line 13491 "configure"
13491 #include "confdefs.h"
13492 #include <sys/types.h>
13493 #include <sys/time.h>
13494 #include <time.h>
13495 int main() {
13496 struct tm *tp;
13497 ; return 0; }
13498 EOF
13499 if { (eval echo configure:13500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13500   rm -rf conftest*
13501   ac_cv_header_time=yes
13502 else
13503   echo "configure: failed program was:" >&5
13504   cat conftest.$ac_ext >&5
13505   rm -rf conftest*
13506   ac_cv_header_time=no
13507 fi
13508 rm -f conftest*
13509 fi
13510
13511 echo "$ac_t""$ac_cv_header_time" 1>&6
13512 if test $ac_cv_header_time = yes; then
13513   cat >> confdefs.h <<\EOF
13514 #define TIME_WITH_SYS_TIME 1
13515 EOF
13516
13517 fi
13518
13519 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13520 echo "configure:13521: checking whether struct tm is in sys/time.h or time.h" >&5
13521 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13522   echo $ac_n "(cached) $ac_c" 1>&6
13523 else
13524   cat > conftest.$ac_ext <<EOF
13525 #line 13526 "configure"
13526 #include "confdefs.h"
13527 #include <sys/types.h>
13528 #include <time.h>
13529 int main() {
13530 struct tm *tp; tp->tm_sec;
13531 ; return 0; }
13532 EOF
13533 if { (eval echo configure:13534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13534   rm -rf conftest*
13535   ac_cv_struct_tm=time.h
13536 else
13537   echo "configure: failed program was:" >&5
13538   cat conftest.$ac_ext >&5
13539   rm -rf conftest*
13540   ac_cv_struct_tm=sys/time.h
13541 fi
13542 rm -f conftest*
13543 fi
13544
13545 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13546 if test $ac_cv_struct_tm = sys/time.h; then
13547   cat >> confdefs.h <<\EOF
13548 #define TM_IN_SYS_TIME 1
13549 EOF
13550
13551 fi
13552
13553 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13554 echo "configure:13555: checking for uid_t in sys/types.h" >&5
13555 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13556   echo $ac_n "(cached) $ac_c" 1>&6
13557 else
13558   cat > conftest.$ac_ext <<EOF
13559 #line 13560 "configure"
13560 #include "confdefs.h"
13561 #include <sys/types.h>
13562 EOF
13563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13564   egrep "uid_t" >/dev/null 2>&1; then
13565   rm -rf conftest*
13566   ac_cv_type_uid_t=yes
13567 else
13568   rm -rf conftest*
13569   ac_cv_type_uid_t=no
13570 fi
13571 rm -f conftest*
13572
13573 fi
13574
13575 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13576 if test $ac_cv_type_uid_t = no; then
13577   cat >> confdefs.h <<\EOF
13578 #define uid_t int
13579 EOF
13580
13581   cat >> confdefs.h <<\EOF
13582 #define gid_t int
13583 EOF
13584
13585 fi
13586
13587 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13588 echo "configure:13589: checking for sig_atomic_t" >&5
13589 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13590   echo $ac_n "(cached) $ac_c" 1>&6
13591 else
13592   cat > conftest.$ac_ext <<EOF
13593 #line 13594 "configure"
13594 #include "confdefs.h"
13595 #include <signal.h>
13596 int main() {
13597 sig_atomic_t atomic;
13598 ; return 0; }
13599 EOF
13600 if { (eval echo configure:13601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13601   rm -rf conftest*
13602   ol_cv_type_sig_atomic_t=yes
13603 else
13604   echo "configure: failed program was:" >&5
13605   cat conftest.$ac_ext >&5
13606   rm -rf conftest*
13607   ol_cv_type_sig_atomic_t=no
13608 fi
13609 rm -f conftest*
13610 fi
13611
13612 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13613   if test $ol_cv_type_sig_atomic_t = no; then
13614     cat >> confdefs.h <<\EOF
13615 #define sig_atomic_t int
13616 EOF
13617
13618   fi
13619  
13620
13621
13622 # test for pw_gecos in struct passwd
13623 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13624 echo "configure:13625: checking struct passwd for pw_gecos" >&5
13625 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13626   echo $ac_n "(cached) $ac_c" 1>&6
13627 else
13628   
13629         cat > conftest.$ac_ext <<EOF
13630 #line 13631 "configure"
13631 #include "confdefs.h"
13632 #include <pwd.h>
13633 int main() {
13634
13635         struct passwd pwd;
13636         pwd.pw_gecos = pwd.pw_name;
13637
13638 ; return 0; }
13639 EOF
13640 if { (eval echo configure:13641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13641   rm -rf conftest*
13642   ol_cv_struct_passwd_pw_gecos=yes
13643 else
13644   echo "configure: failed program was:" >&5
13645   cat conftest.$ac_ext >&5
13646   rm -rf conftest*
13647   ol_cv_struct_passwd_pw_gecos=no
13648 fi
13649 rm -f conftest*
13650 fi
13651
13652 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13653 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13654         cat >> confdefs.h <<\EOF
13655 #define HAVE_PW_GECOS 1
13656 EOF
13657
13658 fi
13659
13660 # test for pw_passwd in struct passwd
13661 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13662 echo "configure:13663: checking struct passwd for pw_passwd" >&5
13663 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13664   echo $ac_n "(cached) $ac_c" 1>&6
13665 else
13666   
13667         cat > conftest.$ac_ext <<EOF
13668 #line 13669 "configure"
13669 #include "confdefs.h"
13670 #include <pwd.h>
13671 int main() {
13672
13673         struct passwd pwd;
13674         pwd.pw_passwd = pwd.pw_name;
13675
13676 ; return 0; }
13677 EOF
13678 if { (eval echo configure:13679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13679   rm -rf conftest*
13680   ol_cv_struct_passwd_pw_passwd=yes
13681 else
13682   echo "configure: failed program was:" >&5
13683   cat conftest.$ac_ext >&5
13684   rm -rf conftest*
13685   ol_cv_struct_passwd_pw_passwd=no
13686 fi
13687 rm -f conftest*
13688 fi
13689
13690 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13691 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13692         cat >> confdefs.h <<\EOF
13693 #define HAVE_PW_PASSWD 1
13694 EOF
13695
13696 fi
13697
13698
13699 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13700 echo "configure:13701: checking if toupper() requires islower()" >&5
13701 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13702   echo $ac_n "(cached) $ac_c" 1>&6
13703 else
13704   
13705         if test "$cross_compiling" = yes; then
13706   ol_cv_c_upper_lower=safe
13707 else
13708   cat > conftest.$ac_ext <<EOF
13709 #line 13710 "configure"
13710 #include "confdefs.h"
13711
13712 #include <ctype.h>
13713 main()
13714 {
13715         if ('C' == toupper('C'))
13716                 exit(0);
13717         else
13718                 exit(1);
13719 }
13720 EOF
13721 if { (eval echo configure:13722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13722 then
13723   ol_cv_c_upper_lower=no
13724 else
13725   echo "configure: failed program was:" >&5
13726   cat conftest.$ac_ext >&5
13727   rm -fr conftest*
13728   ol_cv_c_upper_lower=yes
13729 fi
13730 rm -fr conftest*
13731 fi
13732
13733 fi
13734
13735 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13736 if test $ol_cv_c_upper_lower != no ; then
13737         cat >> confdefs.h <<\EOF
13738 #define C_UPPER_LOWER 1
13739 EOF
13740
13741 fi
13742
13743 echo $ac_n "checking for working const""... $ac_c" 1>&6
13744 echo "configure:13745: checking for working const" >&5
13745 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13746   echo $ac_n "(cached) $ac_c" 1>&6
13747 else
13748   cat > conftest.$ac_ext <<EOF
13749 #line 13750 "configure"
13750 #include "confdefs.h"
13751
13752 int main() {
13753
13754 /* Ultrix mips cc rejects this.  */
13755 typedef int charset[2]; const charset x;
13756 /* SunOS 4.1.1 cc rejects this.  */
13757 char const *const *ccp;
13758 char **p;
13759 /* NEC SVR4.0.2 mips cc rejects this.  */
13760 struct point {int x, y;};
13761 static struct point const zero = {0,0};
13762 /* AIX XL C 1.02.0.0 rejects this.
13763    It does not let you subtract one const X* pointer from another in an arm
13764    of an if-expression whose if-part is not a constant expression */
13765 const char *g = "string";
13766 ccp = &g + (g ? g-g : 0);
13767 /* HPUX 7.0 cc rejects these. */
13768 ++ccp;
13769 p = (char**) ccp;
13770 ccp = (char const *const *) p;
13771 { /* SCO 3.2v4 cc rejects this.  */
13772   char *t;
13773   char const *s = 0 ? (char *) 0 : (char const *) 0;
13774
13775   *t++ = 0;
13776 }
13777 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13778   int x[] = {25, 17};
13779   const int *foo = &x[0];
13780   ++foo;
13781 }
13782 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13783   typedef const int *iptr;
13784   iptr p = 0;
13785   ++p;
13786 }
13787 { /* AIX XL C 1.02.0.0 rejects this saying
13788      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13789   struct s { int j; const int *ap[3]; };
13790   struct s *b; b->j = 5;
13791 }
13792 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13793   const int foo = 10;
13794 }
13795
13796 ; return 0; }
13797 EOF
13798 if { (eval echo configure:13799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13799   rm -rf conftest*
13800   ac_cv_c_const=yes
13801 else
13802   echo "configure: failed program was:" >&5
13803   cat conftest.$ac_ext >&5
13804   rm -rf conftest*
13805   ac_cv_c_const=no
13806 fi
13807 rm -f conftest*
13808 fi
13809
13810 echo "$ac_t""$ac_cv_c_const" 1>&6
13811 if test $ac_cv_c_const = no; then
13812   cat >> confdefs.h <<\EOF
13813 #define const 
13814 EOF
13815
13816 fi
13817
13818 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13819 echo "configure:13820: checking if compiler understands volatile" >&5
13820 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13821   echo $ac_n "(cached) $ac_c" 1>&6
13822 else
13823   cat > conftest.$ac_ext <<EOF
13824 #line 13825 "configure"
13825 #include "confdefs.h"
13826 int x, y, z;
13827 int main() {
13828 volatile int a; int * volatile b = x ? &y : &z;
13829       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13830       *b = 0;
13831 ; return 0; }
13832 EOF
13833 if { (eval echo configure:13834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13834   rm -rf conftest*
13835   ol_cv_c_volatile=yes
13836 else
13837   echo "configure: failed program was:" >&5
13838   cat conftest.$ac_ext >&5
13839   rm -rf conftest*
13840   ol_cv_c_volatile=no
13841 fi
13842 rm -f conftest*
13843 fi
13844
13845 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13846   if test $ol_cv_c_volatile = yes; then
13847     : 
13848   else
13849     cat >> confdefs.h <<\EOF
13850 #define volatile 
13851 EOF
13852
13853   fi
13854  
13855
13856 if test $cross_compiling = yes ; then
13857         cat >> confdefs.h <<\EOF
13858 #define CROSS_COMPILING 1
13859 EOF
13860
13861 else
13862         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13863 echo "configure:13864: checking whether byte ordering is bigendian" >&5
13864 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13865   echo $ac_n "(cached) $ac_c" 1>&6
13866 else
13867   ac_cv_c_bigendian=unknown
13868 # See if sys/param.h defines the BYTE_ORDER macro.
13869 cat > conftest.$ac_ext <<EOF
13870 #line 13871 "configure"
13871 #include "confdefs.h"
13872 #include <sys/types.h>
13873 #include <sys/param.h>
13874 int main() {
13875
13876 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13877  bogus endian macros
13878 #endif
13879 ; return 0; }
13880 EOF
13881 if { (eval echo configure:13882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13882   rm -rf conftest*
13883   # It does; now see whether it defined to BIG_ENDIAN or not.
13884 cat > conftest.$ac_ext <<EOF
13885 #line 13886 "configure"
13886 #include "confdefs.h"
13887 #include <sys/types.h>
13888 #include <sys/param.h>
13889 int main() {
13890
13891 #if BYTE_ORDER != BIG_ENDIAN
13892  not big endian
13893 #endif
13894 ; return 0; }
13895 EOF
13896 if { (eval echo configure:13897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13897   rm -rf conftest*
13898   ac_cv_c_bigendian=yes
13899 else
13900   echo "configure: failed program was:" >&5
13901   cat conftest.$ac_ext >&5
13902   rm -rf conftest*
13903   ac_cv_c_bigendian=no
13904 fi
13905 rm -f conftest*
13906 else
13907   echo "configure: failed program was:" >&5
13908   cat conftest.$ac_ext >&5
13909 fi
13910 rm -f conftest*
13911 if test $ac_cv_c_bigendian = unknown; then
13912 if test "$cross_compiling" = yes; then
13913     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13914 else
13915   cat > conftest.$ac_ext <<EOF
13916 #line 13917 "configure"
13917 #include "confdefs.h"
13918 main () {
13919   /* Are we little or big endian?  From Harbison&Steele.  */
13920   union
13921   {
13922     long l;
13923     char c[sizeof (long)];
13924   } u;
13925   u.l = 1;
13926   exit (u.c[sizeof (long) - 1] == 1);
13927 }
13928 EOF
13929 if { (eval echo configure:13930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13930 then
13931   ac_cv_c_bigendian=no
13932 else
13933   echo "configure: failed program was:" >&5
13934   cat conftest.$ac_ext >&5
13935   rm -fr conftest*
13936   ac_cv_c_bigendian=yes
13937 fi
13938 rm -fr conftest*
13939 fi
13940
13941 fi
13942 fi
13943
13944 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13945 if test $ac_cv_c_bigendian = yes; then
13946   cat >> confdefs.h <<\EOF
13947 #define WORDS_BIGENDIAN 1
13948 EOF
13949
13950 fi
13951
13952 fi
13953
13954 echo $ac_n "checking size of short""... $ac_c" 1>&6
13955 echo "configure:13956: checking size of short" >&5 
13956 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13957   echo $ac_n "(cached) $ac_c" 1>&6
13958 else
13959   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
13960   cat > conftest.$ac_ext <<EOF
13961 #line 13962 "configure"
13962 #include "confdefs.h"
13963 #include "confdefs.h" 
13964 #include <sys/types.h> 
13965  
13966
13967 int main() {
13968 switch (0) case 0: case (sizeof (short) == $ac_size):;
13969 ; return 0; }
13970 EOF
13971 if { (eval echo configure:13972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13972   rm -rf conftest*
13973   ac_cv_sizeof_short=$ac_size
13974 else
13975   echo "configure: failed program was:" >&5
13976   cat conftest.$ac_ext >&5
13977 fi
13978 rm -f conftest* 
13979   if test x$ac_cv_sizeof_short != x ; then break; fi 
13980 done 
13981
13982 fi
13983  
13984 if test x$ac_cv_sizeof_short = x ; then 
13985   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
13986 fi 
13987 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
13988 cat >> confdefs.h <<EOF
13989 #define SIZEOF_SHORT $ac_cv_sizeof_short
13990 EOF
13991  
13992  
13993 echo $ac_n "checking size of int""... $ac_c" 1>&6
13994 echo "configure:13995: checking size of int" >&5 
13995 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13996   echo $ac_n "(cached) $ac_c" 1>&6
13997 else
13998   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
13999   cat > conftest.$ac_ext <<EOF
14000 #line 14001 "configure"
14001 #include "confdefs.h"
14002 #include "confdefs.h" 
14003 #include <sys/types.h> 
14004  
14005
14006 int main() {
14007 switch (0) case 0: case (sizeof (int) == $ac_size):;
14008 ; return 0; }
14009 EOF
14010 if { (eval echo configure:14011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14011   rm -rf conftest*
14012   ac_cv_sizeof_int=$ac_size
14013 else
14014   echo "configure: failed program was:" >&5
14015   cat conftest.$ac_ext >&5
14016 fi
14017 rm -f conftest* 
14018   if test x$ac_cv_sizeof_int != x ; then break; fi 
14019 done 
14020
14021 fi
14022  
14023 if test x$ac_cv_sizeof_int = x ; then 
14024   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14025 fi 
14026 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14027 cat >> confdefs.h <<EOF
14028 #define SIZEOF_INT $ac_cv_sizeof_int
14029 EOF
14030  
14031  
14032 echo $ac_n "checking size of long""... $ac_c" 1>&6
14033 echo "configure:14034: checking size of long" >&5 
14034 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14035   echo $ac_n "(cached) $ac_c" 1>&6
14036 else
14037   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14038   cat > conftest.$ac_ext <<EOF
14039 #line 14040 "configure"
14040 #include "confdefs.h"
14041 #include "confdefs.h" 
14042 #include <sys/types.h> 
14043  
14044
14045 int main() {
14046 switch (0) case 0: case (sizeof (long) == $ac_size):;
14047 ; return 0; }
14048 EOF
14049 if { (eval echo configure:14050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14050   rm -rf conftest*
14051   ac_cv_sizeof_long=$ac_size
14052 else
14053   echo "configure: failed program was:" >&5
14054   cat conftest.$ac_ext >&5
14055 fi
14056 rm -f conftest* 
14057   if test x$ac_cv_sizeof_long != x ; then break; fi 
14058 done 
14059
14060 fi
14061  
14062 if test x$ac_cv_sizeof_long = x ; then 
14063   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14064 fi 
14065 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14066 cat >> confdefs.h <<EOF
14067 #define SIZEOF_LONG $ac_cv_sizeof_long
14068 EOF
14069  
14070
14071
14072 if test "$ac_cv_sizeof_int" -lt 4 ; then
14073         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14074
14075         cat >> confdefs.h <<\EOF
14076 #define LBER_INT_T long
14077 EOF
14078
14079 else
14080         cat >> confdefs.h <<\EOF
14081 #define LBER_INT_T int
14082 EOF
14083
14084 fi
14085
14086 cat >> confdefs.h <<\EOF
14087 #define LBER_LEN_T long
14088 EOF
14089
14090 cat >> confdefs.h <<\EOF
14091 #define LBER_SOCKET_T int
14092 EOF
14093
14094 cat >> confdefs.h <<\EOF
14095 #define LBER_TAG_T long
14096 EOF
14097
14098
14099 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14100 echo "configure:14101: checking for 8-bit clean memcmp" >&5
14101 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14102   echo $ac_n "(cached) $ac_c" 1>&6
14103 else
14104   if test "$cross_compiling" = yes; then
14105   ac_cv_func_memcmp_clean=no
14106 else
14107   cat > conftest.$ac_ext <<EOF
14108 #line 14109 "configure"
14109 #include "confdefs.h"
14110
14111 main()
14112 {
14113   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14114   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14115 }
14116
14117 EOF
14118 if { (eval echo configure:14119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14119 then
14120   ac_cv_func_memcmp_clean=yes
14121 else
14122   echo "configure: failed program was:" >&5
14123   cat conftest.$ac_ext >&5
14124   rm -fr conftest*
14125   ac_cv_func_memcmp_clean=no
14126 fi
14127 rm -fr conftest*
14128 fi
14129
14130 fi
14131
14132 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14133 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14134
14135 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14136 echo "configure:14137: checking for strftime" >&5
14137 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14138   echo $ac_n "(cached) $ac_c" 1>&6
14139 else
14140   cat > conftest.$ac_ext <<EOF
14141 #line 14142 "configure"
14142 #include "confdefs.h"
14143 /* System header to define __stub macros and hopefully few prototypes,
14144     which can conflict with char strftime(); below.  */
14145 #include <assert.h>
14146 /* Override any gcc2 internal prototype to avoid an error.  */
14147 /* We use char because int might match the return type of a gcc2
14148     builtin and then its argument prototype would still apply.  */
14149 char strftime();
14150 char (*f)();
14151
14152 int main() {
14153
14154 /* The GNU C library defines this for functions which it implements
14155     to always fail with ENOSYS.  Some functions are actually named
14156     something starting with __ and the normal name is an alias.  */
14157 #if defined (__stub_strftime) || defined (__stub___strftime)
14158 choke me
14159 #else
14160 f = strftime;
14161 #endif
14162
14163 ; return 0; }
14164 EOF
14165 if { (eval echo configure:14166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14166   rm -rf conftest*
14167   eval "ac_cv_func_strftime=yes"
14168 else
14169   echo "configure: failed program was:" >&5
14170   cat conftest.$ac_ext >&5
14171   rm -rf conftest*
14172   eval "ac_cv_func_strftime=no"
14173 fi
14174 rm -f conftest*
14175 fi
14176
14177 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14178   echo "$ac_t""yes" 1>&6
14179   cat >> confdefs.h <<\EOF
14180 #define HAVE_STRFTIME 1
14181 EOF
14182
14183 else
14184   echo "$ac_t""no" 1>&6
14185 # strftime is in -lintl on SCO UNIX.
14186 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14187 echo "configure:14188: checking for strftime in -lintl" >&5
14188 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14190   echo $ac_n "(cached) $ac_c" 1>&6
14191 else
14192   ac_save_LIBS="$LIBS"
14193 LIBS="-lintl  $LIBS"
14194 cat > conftest.$ac_ext <<EOF
14195 #line 14196 "configure"
14196 #include "confdefs.h"
14197 /* Override any gcc2 internal prototype to avoid an error.  */
14198 /* We use char because int might match the return type of a gcc2
14199     builtin and then its argument prototype would still apply.  */
14200 char strftime();
14201
14202 int main() {
14203 strftime()
14204 ; return 0; }
14205 EOF
14206 if { (eval echo configure:14207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14207   rm -rf conftest*
14208   eval "ac_cv_lib_$ac_lib_var=yes"
14209 else
14210   echo "configure: failed program was:" >&5
14211   cat conftest.$ac_ext >&5
14212   rm -rf conftest*
14213   eval "ac_cv_lib_$ac_lib_var=no"
14214 fi
14215 rm -f conftest*
14216 LIBS="$ac_save_LIBS"
14217
14218 fi
14219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14220   echo "$ac_t""yes" 1>&6
14221   cat >> confdefs.h <<\EOF
14222 #define HAVE_STRFTIME 1
14223 EOF
14224
14225 LIBS="-lintl $LIBS"
14226 else
14227   echo "$ac_t""no" 1>&6
14228 fi
14229
14230 fi
14231
14232
14233 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14234 echo "configure:14235: checking for inet_aton()" >&5
14235 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14236   echo $ac_n "(cached) $ac_c" 1>&6
14237 else
14238   cat > conftest.$ac_ext <<EOF
14239 #line 14240 "configure"
14240 #include "confdefs.h"
14241
14242 #ifdef HAVE_SYS_TYPES_H
14243 #       include <sys/types.h>
14244 #endif
14245 #ifdef HAVE_SYS_SOCKET_H
14246 #       include <sys/socket.h>
14247 #       ifdef HAVE_SYS_SELECT_H
14248 #               include <sys/select.h>
14249 #       endif
14250 #       include <netinet/in.h>
14251 #       ifdef HAVE_ARPA_INET_H
14252 #               include <arpa/inet.h>
14253 #       endif
14254 #endif
14255
14256 int main() {
14257 struct in_addr in;
14258 int rc = inet_aton( "255.255.255.255", &in );
14259 ; return 0; }
14260 EOF
14261 if { (eval echo configure:14262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14262   rm -rf conftest*
14263   ol_cv_func_inet_aton=yes
14264 else
14265   echo "configure: failed program was:" >&5
14266   cat conftest.$ac_ext >&5
14267   rm -rf conftest*
14268   ol_cv_func_inet_aton=no
14269 fi
14270 rm -f conftest*
14271 fi
14272
14273 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14274   if test $ol_cv_func_inet_aton != no; then
14275     cat >> confdefs.h <<\EOF
14276 #define HAVE_INET_ATON 1
14277 EOF
14278
14279   fi
14280  
14281
14282 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14283 echo "configure:14284: checking for _spawnlp" >&5
14284 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14285   echo $ac_n "(cached) $ac_c" 1>&6
14286 else
14287   cat > conftest.$ac_ext <<EOF
14288 #line 14289 "configure"
14289 #include "confdefs.h"
14290 /* System header to define __stub macros and hopefully few prototypes,
14291     which can conflict with char _spawnlp(); below.  */
14292 #include <assert.h>
14293 /* Override any gcc2 internal prototype to avoid an error.  */
14294 /* We use char because int might match the return type of a gcc2
14295     builtin and then its argument prototype would still apply.  */
14296 char _spawnlp();
14297 char (*f)();
14298
14299 int main() {
14300
14301 /* The GNU C library defines this for functions which it implements
14302     to always fail with ENOSYS.  Some functions are actually named
14303     something starting with __ and the normal name is an alias.  */
14304 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14305 choke me
14306 #else
14307 f = _spawnlp;
14308 #endif
14309
14310 ; return 0; }
14311 EOF
14312 if { (eval echo configure:14313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14313   rm -rf conftest*
14314   eval "ac_cv_func__spawnlp=yes"
14315 else
14316   echo "configure: failed program was:" >&5
14317   cat conftest.$ac_ext >&5
14318   rm -rf conftest*
14319   eval "ac_cv_func__spawnlp=no"
14320 fi
14321 rm -f conftest*
14322 fi
14323
14324 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14325   echo "$ac_t""yes" 1>&6
14326   cat >> confdefs.h <<\EOF
14327 #define HAVE_SPAWNLP 1
14328 EOF
14329
14330 else
14331   echo "$ac_t""no" 1>&6
14332 fi
14333
14334
14335 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14336 echo "configure:14337: checking for _snprintf" >&5
14337 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14338   echo $ac_n "(cached) $ac_c" 1>&6
14339 else
14340   cat > conftest.$ac_ext <<EOF
14341 #line 14342 "configure"
14342 #include "confdefs.h"
14343 /* System header to define __stub macros and hopefully few prototypes,
14344     which can conflict with char _snprintf(); below.  */
14345 #include <assert.h>
14346 /* Override any gcc2 internal prototype to avoid an error.  */
14347 /* We use char because int might match the return type of a gcc2
14348     builtin and then its argument prototype would still apply.  */
14349 char _snprintf();
14350 char (*f)();
14351
14352 int main() {
14353
14354 /* The GNU C library defines this for functions which it implements
14355     to always fail with ENOSYS.  Some functions are actually named
14356     something starting with __ and the normal name is an alias.  */
14357 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14358 choke me
14359 #else
14360 f = _snprintf;
14361 #endif
14362
14363 ; return 0; }
14364 EOF
14365 if { (eval echo configure:14366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14366   rm -rf conftest*
14367   eval "ac_cv_func__snprintf=yes"
14368 else
14369   echo "configure: failed program was:" >&5
14370   cat conftest.$ac_ext >&5
14371   rm -rf conftest*
14372   eval "ac_cv_func__snprintf=no"
14373 fi
14374 rm -f conftest*
14375 fi
14376
14377 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14378   echo "$ac_t""yes" 1>&6
14379   ac_cv_func_snprintf=yes
14380         cat >> confdefs.h <<\EOF
14381 #define snprintf _snprintf
14382 EOF
14383
14384
14385 else
14386   echo "$ac_t""no" 1>&6
14387 fi
14388
14389
14390 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14391 echo "configure:14392: checking for _vsnprintf" >&5
14392 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14393   echo $ac_n "(cached) $ac_c" 1>&6
14394 else
14395   cat > conftest.$ac_ext <<EOF
14396 #line 14397 "configure"
14397 #include "confdefs.h"
14398 /* System header to define __stub macros and hopefully few prototypes,
14399     which can conflict with char _vsnprintf(); below.  */
14400 #include <assert.h>
14401 /* Override any gcc2 internal prototype to avoid an error.  */
14402 /* We use char because int might match the return type of a gcc2
14403     builtin and then its argument prototype would still apply.  */
14404 char _vsnprintf();
14405 char (*f)();
14406
14407 int main() {
14408
14409 /* The GNU C library defines this for functions which it implements
14410     to always fail with ENOSYS.  Some functions are actually named
14411     something starting with __ and the normal name is an alias.  */
14412 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14413 choke me
14414 #else
14415 f = _vsnprintf;
14416 #endif
14417
14418 ; return 0; }
14419 EOF
14420 if { (eval echo configure:14421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14421   rm -rf conftest*
14422   eval "ac_cv_func__vsnprintf=yes"
14423 else
14424   echo "configure: failed program was:" >&5
14425   cat conftest.$ac_ext >&5
14426   rm -rf conftest*
14427   eval "ac_cv_func__vsnprintf=no"
14428 fi
14429 rm -f conftest*
14430 fi
14431
14432 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14433   echo "$ac_t""yes" 1>&6
14434   ac_cv_func_vsnprintf=yes
14435         cat >> confdefs.h <<\EOF
14436 #define vsnprintf _vsnprintf
14437 EOF
14438
14439
14440 else
14441   echo "$ac_t""no" 1>&6
14442 fi
14443
14444
14445 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14446 echo "configure:14447: checking for vprintf" >&5
14447 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14448   echo $ac_n "(cached) $ac_c" 1>&6
14449 else
14450   cat > conftest.$ac_ext <<EOF
14451 #line 14452 "configure"
14452 #include "confdefs.h"
14453 /* System header to define __stub macros and hopefully few prototypes,
14454     which can conflict with char vprintf(); below.  */
14455 #include <assert.h>
14456 /* Override any gcc2 internal prototype to avoid an error.  */
14457 /* We use char because int might match the return type of a gcc2
14458     builtin and then its argument prototype would still apply.  */
14459 char vprintf();
14460 char (*f)();
14461
14462 int main() {
14463
14464 /* The GNU C library defines this for functions which it implements
14465     to always fail with ENOSYS.  Some functions are actually named
14466     something starting with __ and the normal name is an alias.  */
14467 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14468 choke me
14469 #else
14470 f = vprintf;
14471 #endif
14472
14473 ; return 0; }
14474 EOF
14475 if { (eval echo configure:14476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14476   rm -rf conftest*
14477   eval "ac_cv_func_vprintf=yes"
14478 else
14479   echo "configure: failed program was:" >&5
14480   cat conftest.$ac_ext >&5
14481   rm -rf conftest*
14482   eval "ac_cv_func_vprintf=no"
14483 fi
14484 rm -f conftest*
14485 fi
14486
14487 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14488   echo "$ac_t""yes" 1>&6
14489   cat >> confdefs.h <<\EOF
14490 #define HAVE_VPRINTF 1
14491 EOF
14492
14493 else
14494   echo "$ac_t""no" 1>&6
14495 fi
14496
14497 if test "$ac_cv_func_vprintf" != yes; then
14498 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14499 echo "configure:14500: checking for _doprnt" >&5
14500 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14501   echo $ac_n "(cached) $ac_c" 1>&6
14502 else
14503   cat > conftest.$ac_ext <<EOF
14504 #line 14505 "configure"
14505 #include "confdefs.h"
14506 /* System header to define __stub macros and hopefully few prototypes,
14507     which can conflict with char _doprnt(); below.  */
14508 #include <assert.h>
14509 /* Override any gcc2 internal prototype to avoid an error.  */
14510 /* We use char because int might match the return type of a gcc2
14511     builtin and then its argument prototype would still apply.  */
14512 char _doprnt();
14513 char (*f)();
14514
14515 int main() {
14516
14517 /* The GNU C library defines this for functions which it implements
14518     to always fail with ENOSYS.  Some functions are actually named
14519     something starting with __ and the normal name is an alias.  */
14520 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14521 choke me
14522 #else
14523 f = _doprnt;
14524 #endif
14525
14526 ; return 0; }
14527 EOF
14528 if { (eval echo configure:14529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14529   rm -rf conftest*
14530   eval "ac_cv_func__doprnt=yes"
14531 else
14532   echo "configure: failed program was:" >&5
14533   cat conftest.$ac_ext >&5
14534   rm -rf conftest*
14535   eval "ac_cv_func__doprnt=no"
14536 fi
14537 rm -f conftest*
14538 fi
14539
14540 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14541   echo "$ac_t""yes" 1>&6
14542   cat >> confdefs.h <<\EOF
14543 #define HAVE_DOPRNT 1
14544 EOF
14545
14546 else
14547   echo "$ac_t""no" 1>&6
14548 fi
14549
14550 fi
14551
14552
14553 if test $ac_cv_func_vprintf = yes ; then
14554                 for ac_func in vsnprintf vsprintf
14555 do
14556 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14557 echo "configure:14558: checking for $ac_func" >&5
14558 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14559   echo $ac_n "(cached) $ac_c" 1>&6
14560 else
14561   cat > conftest.$ac_ext <<EOF
14562 #line 14563 "configure"
14563 #include "confdefs.h"
14564 /* System header to define __stub macros and hopefully few prototypes,
14565     which can conflict with char $ac_func(); below.  */
14566 #include <assert.h>
14567 /* Override any gcc2 internal prototype to avoid an error.  */
14568 /* We use char because int might match the return type of a gcc2
14569     builtin and then its argument prototype would still apply.  */
14570 char $ac_func();
14571 char (*f)();
14572
14573 int main() {
14574
14575 /* The GNU C library defines this for functions which it implements
14576     to always fail with ENOSYS.  Some functions are actually named
14577     something starting with __ and the normal name is an alias.  */
14578 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14579 choke me
14580 #else
14581 f = $ac_func;
14582 #endif
14583
14584 ; return 0; }
14585 EOF
14586 if { (eval echo configure:14587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14587   rm -rf conftest*
14588   eval "ac_cv_func_$ac_func=yes"
14589 else
14590   echo "configure: failed program was:" >&5
14591   cat conftest.$ac_ext >&5
14592   rm -rf conftest*
14593   eval "ac_cv_func_$ac_func=no"
14594 fi
14595 rm -f conftest*
14596 fi
14597
14598 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14599   echo "$ac_t""yes" 1>&6
14600     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14601   cat >> confdefs.h <<EOF
14602 #define $ac_tr_func 1
14603 EOF
14604  
14605 else
14606   echo "$ac_t""no" 1>&6
14607 fi
14608 done
14609
14610 fi
14611
14612 for ac_func in \
14613         bcopy                   \
14614         closesocket             \
14615         endgrent                \
14616         endpwent                \
14617         flock                   \
14618         getdtablesize   \
14619         getgrgid                \
14620         gethostname             \
14621         getpass                 \
14622         getpwuid                \
14623         getpwnam                \
14624         getspnam                \
14625         gettimeofday    \
14626         initgroups              \
14627         lockf                   \
14628         memcpy                  \
14629         memmove                 \
14630         mkstemp                 \
14631         pipe                    \
14632         read                    \
14633         recv                    \
14634         recvfrom                \
14635         setpwfile               \
14636         setgid                  \
14637         setegid                 \
14638         setsid                  \
14639         setuid                  \
14640         seteuid                 \
14641         sigaction               \
14642         signal                  \
14643         sigset                  \
14644         snprintf                \
14645         strdup                  \
14646         strerror                \
14647         strpbrk                 \
14648         strrchr                 \
14649         strsep                  \
14650         strstr                  \
14651         strtol                  \
14652         strtoul                 \
14653         strspn                  \
14654         sysconf                 \
14655         waitpid                 \
14656         wait4                   \
14657         write                   \
14658         send                    \
14659         sendto                  \
14660
14661 do
14662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14663 echo "configure:14664: checking for $ac_func" >&5
14664 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14665   echo $ac_n "(cached) $ac_c" 1>&6
14666 else
14667   cat > conftest.$ac_ext <<EOF
14668 #line 14669 "configure"
14669 #include "confdefs.h"
14670 /* System header to define __stub macros and hopefully few prototypes,
14671     which can conflict with char $ac_func(); below.  */
14672 #include <assert.h>
14673 /* Override any gcc2 internal prototype to avoid an error.  */
14674 /* We use char because int might match the return type of a gcc2
14675     builtin and then its argument prototype would still apply.  */
14676 char $ac_func();
14677 char (*f)();
14678
14679 int main() {
14680
14681 /* The GNU C library defines this for functions which it implements
14682     to always fail with ENOSYS.  Some functions are actually named
14683     something starting with __ and the normal name is an alias.  */
14684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14685 choke me
14686 #else
14687 f = $ac_func;
14688 #endif
14689
14690 ; return 0; }
14691 EOF
14692 if { (eval echo configure:14693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14693   rm -rf conftest*
14694   eval "ac_cv_func_$ac_func=yes"
14695 else
14696   echo "configure: failed program was:" >&5
14697   cat conftest.$ac_ext >&5
14698   rm -rf conftest*
14699   eval "ac_cv_func_$ac_func=no"
14700 fi
14701 rm -f conftest*
14702 fi
14703
14704 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14705   echo "$ac_t""yes" 1>&6
14706     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14707   cat >> confdefs.h <<EOF
14708 #define $ac_tr_func 1
14709 EOF
14710  
14711 else
14712   echo "$ac_t""no" 1>&6
14713 fi
14714 done
14715
14716
14717 for ac_func in getopt tempnam
14718 do
14719 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14720 echo "configure:14721: checking for $ac_func" >&5
14721 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14722   echo $ac_n "(cached) $ac_c" 1>&6
14723 else
14724   cat > conftest.$ac_ext <<EOF
14725 #line 14726 "configure"
14726 #include "confdefs.h"
14727 /* System header to define __stub macros and hopefully few prototypes,
14728     which can conflict with char $ac_func(); below.  */
14729 #include <assert.h>
14730 /* Override any gcc2 internal prototype to avoid an error.  */
14731 /* We use char because int might match the return type of a gcc2
14732     builtin and then its argument prototype would still apply.  */
14733 char $ac_func();
14734 char (*f)();
14735
14736 int main() {
14737
14738 /* The GNU C library defines this for functions which it implements
14739     to always fail with ENOSYS.  Some functions are actually named
14740     something starting with __ and the normal name is an alias.  */
14741 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14742 choke me
14743 #else
14744 f = $ac_func;
14745 #endif
14746
14747 ; return 0; }
14748 EOF
14749 if { (eval echo configure:14750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14750   rm -rf conftest*
14751   eval "ac_cv_func_$ac_func=yes"
14752 else
14753   echo "configure: failed program was:" >&5
14754   cat conftest.$ac_ext >&5
14755   rm -rf conftest*
14756   eval "ac_cv_func_$ac_func=no"
14757 fi
14758 rm -f conftest*
14759 fi
14760
14761 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14762   echo "$ac_t""yes" 1>&6
14763     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14764   cat >> confdefs.h <<EOF
14765 #define $ac_tr_func 1
14766 EOF
14767  
14768 else
14769   echo "$ac_t""no" 1>&6
14770 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14771 fi
14772 done
14773
14774
14775
14776 if test "$ac_cv_func_getopt" != yes; then
14777     LIBSRCS="$LIBSRCS getopt.c"
14778 fi
14779
14780 if test "$ac_cv_func_tempnam" != yes; then
14781     LIBSRCS="$LIBSRCS tempnam.c"
14782 fi
14783
14784 # Check Configuration
14785 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14786 echo "configure:14787: checking declaration of sys_errlist" >&5
14787 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14788   echo $ac_n "(cached) $ac_c" 1>&6
14789 else
14790   
14791         cat > conftest.$ac_ext <<EOF
14792 #line 14793 "configure"
14793 #include "confdefs.h"
14794
14795 #include <stdio.h>
14796 #include <sys/types.h>
14797 #include <errno.h>
14798 #ifdef WINNT
14799 #include <stdlib.h>
14800 #endif 
14801 int main() {
14802 char *c = (char *) *sys_errlist
14803 ; return 0; }
14804 EOF
14805 if { (eval echo configure:14806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14806   rm -rf conftest*
14807   ol_cv_dcl_sys_errlist=yes
14808         ol_cv_have_sys_errlist=yes
14809 else
14810   echo "configure: failed program was:" >&5
14811   cat conftest.$ac_ext >&5
14812   rm -rf conftest*
14813   ol_cv_dcl_sys_errlist=no
14814 fi
14815 rm -f conftest*
14816 fi
14817
14818 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14819 #
14820 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14821 if test $ol_cv_dcl_sys_errlist = no ; then
14822         cat >> confdefs.h <<\EOF
14823 #define DECL_SYS_ERRLIST 1
14824 EOF
14825
14826
14827         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14828 echo "configure:14829: checking existence of sys_errlist" >&5
14829 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14830   echo $ac_n "(cached) $ac_c" 1>&6
14831 else
14832   
14833                 cat > conftest.$ac_ext <<EOF
14834 #line 14835 "configure"
14835 #include "confdefs.h"
14836 #include <errno.h>
14837 int main() {
14838 char *c = (char *) *sys_errlist
14839 ; return 0; }
14840 EOF
14841 if { (eval echo configure:14842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14842   rm -rf conftest*
14843   ol_cv_have_sys_errlist=yes
14844 else
14845   echo "configure: failed program was:" >&5
14846   cat conftest.$ac_ext >&5
14847   rm -rf conftest*
14848   ol_cv_have_sys_errlist=no
14849 fi
14850 rm -f conftest*
14851 fi
14852
14853 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14854 fi
14855 if test $ol_cv_have_sys_errlist = yes ; then
14856         cat >> confdefs.h <<\EOF
14857 #define HAVE_SYS_ERRLIST 1
14858 EOF
14859
14860 fi
14861
14862
14863
14864 if test "$ol_enable_debug" != no ; then
14865         cat >> confdefs.h <<\EOF
14866 #define LDAP_DEBUG 1
14867 EOF
14868
14869 fi
14870 if test "$ol_enable_syslog" = yes ; then
14871         cat >> confdefs.h <<\EOF
14872 #define LDAP_SYSLOG 1
14873 EOF
14874
14875 fi
14876 if test "$ol_enable_libui" = yes ; then
14877         cat >> confdefs.h <<\EOF
14878 #define LDAP_LIBUI 1
14879 EOF
14880
14881 fi
14882 if test "$ol_enable_cache" = no ; then
14883         cat >> confdefs.h <<\EOF
14884 #define LDAP_NOCACHE 1
14885 EOF
14886
14887 fi
14888 if test "$ol_enable_dns" != no ; then
14889         cat >> confdefs.h <<\EOF
14890 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14891 EOF
14892
14893 fi
14894 if test "$ol_enable_proctitle" != no ; then
14895         cat >> confdefs.h <<\EOF
14896 #define LDAP_PROCTITLE 1
14897 EOF
14898
14899 fi
14900 if test "$ol_enable_referrals" != no ; then
14901         cat >> confdefs.h <<\EOF
14902 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14903 EOF
14904
14905 fi
14906 if test "$ol_enable_cldap" != no ; then
14907         cat >> confdefs.h <<\EOF
14908 #define LDAP_CONNECTIONLESS 1
14909 EOF
14910
14911 fi
14912
14913 if test "$ol_enable_crypt" != no ; then
14914         cat >> confdefs.h <<\EOF
14915 #define SLAPD_CRYPT 1
14916 EOF
14917
14918 fi
14919 if test "$ol_enable_cleartext" != no ; then
14920         cat >> confdefs.h <<\EOF
14921 #define SLAPD_CLEARTEXT 1
14922 EOF
14923
14924 fi
14925 if test "$ol_enable_multimaster" != no ; then
14926         cat >> confdefs.h <<\EOF
14927 #define SLAPD_MULTIMASTER 1
14928 EOF
14929
14930 fi
14931 if test "$ol_enable_phonetic" != no ; then
14932         cat >> confdefs.h <<\EOF
14933 #define SLAPD_PHONETIC 1
14934 EOF
14935
14936 fi
14937 if test "$ol_enable_rlookups" != no ; then
14938         cat >> confdefs.h <<\EOF
14939 #define SLAPD_RLOOKUPS 1
14940 EOF
14941
14942 fi
14943 if test "$ol_enable_aci" != no ; then
14944         cat >> confdefs.h <<\EOF
14945 #define SLAPD_ACI_ENABLED 1
14946 EOF
14947
14948 fi
14949 if test "$ol_enable_discreteaci" != no ; then
14950         cat >> confdefs.h <<\EOF
14951 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14952 EOF
14953
14954 fi
14955
14956 if test "$ol_link_modules" != no ; then
14957         cat >> confdefs.h <<\EOF
14958 #define SLAPD_MODULES 1
14959 EOF
14960
14961         BUILD_SLAPD=yes
14962         SLAPD_MODULES_LDFLAGS="-dlopen self"
14963 fi
14964
14965 if test "$ol_link_bdb2" != no ; then
14966         cat >> confdefs.h <<\EOF
14967 #define SLAPD_BDB2 1
14968 EOF
14969
14970         BUILD_SLAPD=yes
14971         BUILD_BDB2=yes
14972         if test "$ol_with_bdb2_module" != static ; then
14973                 cat >> confdefs.h <<\EOF
14974 #define SLAPD_BDB2_DYNAMIC 1
14975 EOF
14976
14977                 BUILD_BDB2=mod
14978                 BUILD_BDB2_DYNAMIC=shared
14979                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14980         fi
14981 fi
14982
14983 if test "$ol_enable_ldap" != no ; then
14984         cat >> confdefs.h <<\EOF
14985 #define SLAPD_LDAP 1
14986 EOF
14987
14988         BUILD_SLAPD=yes
14989         BUILD_LDAP=yes
14990         if test "$ol_with_ldap_module" != static ; then
14991                 cat >> confdefs.h <<\EOF
14992 #define SLAPD_LDAP_DYNAMIC 1
14993 EOF
14994
14995                 BUILD_LDAP=mod
14996                 BUILD_LDAP_DYNAMIC=shared
14997                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14998         fi
14999 fi
15000
15001 if test "$ol_link_ldbm" != no ; then
15002         cat >> confdefs.h <<\EOF
15003 #define SLAPD_LDBM 1
15004 EOF
15005
15006         BUILD_SLAPD=yes
15007         BUILD_LDBM=yes
15008         if test "$ol_with_ldbm_module" != static ; then
15009                 cat >> confdefs.h <<\EOF
15010 #define SLAPD_LDBM_DYNAMIC 1
15011 EOF
15012
15013                 BUILD_LDBM=mod
15014                 BUILD_LDBM_DYNAMIC=shared
15015                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15016         fi
15017 fi
15018
15019 if test "$ol_enable_passwd" != no ; then
15020         cat >> confdefs.h <<\EOF
15021 #define SLAPD_PASSWD 1
15022 EOF
15023
15024         BUILD_SLAPD=yes
15025         BUILD_PASSWD=yes
15026         if test "$ol_with_passwd_module" != static ; then
15027                 cat >> confdefs.h <<\EOF
15028 #define SLAPD_PASSWD_DYNAMIC 1
15029 EOF
15030
15031                 BUILD_PASSWD=mod
15032                 BUILD_PASSWD_DYNAMIC=shared
15033                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15034         fi
15035 fi
15036
15037 if test "$ol_link_perl" != no ; then
15038         cat >> confdefs.h <<\EOF
15039 #define SLAPD_PERL 1
15040 EOF
15041
15042         BUILD_SLAPD=yes
15043         BUILD_PERL=yes
15044         if test "$ol_with_perl_module" != static ; then
15045                 cat >> confdefs.h <<\EOF
15046 #define SLAPD_PERL_DYNAMIC 1
15047 EOF
15048
15049                 BUILD_PERL=mod
15050                 BUILD_PERL_DYNAMIC=shared
15051                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15052         fi
15053 fi
15054
15055 if test "$ol_enable_shell" != no ; then
15056         cat >> confdefs.h <<\EOF
15057 #define SLAPD_SHELL 1
15058 EOF
15059
15060         BUILD_SLAPD=yes
15061         BUILD_SHELL=yes
15062         if test "$ol_with_shell_module" != static ; then
15063                 cat >> confdefs.h <<\EOF
15064 #define SLAPD_SHELL_DYNAMIC 1
15065 EOF
15066
15067                 BUILD_SHELL=mod
15068                 BUILD_SHELL_DYNAMIC=shared
15069                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15070         fi
15071 fi
15072
15073 if test "$ol_enable_tcl" != no ; then
15074         cat >> confdefs.h <<\EOF
15075 #define SLAPD_TCL 1
15076 EOF
15077
15078         BUILD_SLAPD=yes
15079         BUILD_TCL=yes
15080         if test "$ol_with_tcl_module" != static; then
15081                 cat >> confdefs.h <<\EOF
15082 #define SLAPD_TCL_DYNAMIC 1
15083 EOF
15084
15085                 BUILD_TCL=mod
15086                 BUILD_TCL_DYNAMIC=shared
15087                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15088         fi
15089 fi
15090
15091 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15092         $BUILD_SLAPD = yes ; then
15093         BUILD_SLURPD=yes
15094 fi
15095
15096 if test "$ol_link_isode" != no ; then
15097         BUILD_LDAPD=yes
15098 fi
15099
15100
15101 if test "$LINK_BINS_DYNAMIC" = yes; then
15102     LIB_LINKAGE=DYN
15103     LT_LIB_LINKAGE=shared
15104 else
15105     LIB_LINKAGE=STAT
15106     LT_LIB_LINKAGE=static
15107 fi
15108
15109 if test "$ac_cv_mingw32" = yes ; then
15110     PLAT=NT
15111     DYN_EXT=dll
15112 else
15113     PLAT=UNIX
15114     DYN_EXT=so
15115 fi
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126   
15127   
15128   
15129   
15130   
15131   
15132   
15133   
15134   
15135   
15136   
15137   
15138   
15139   
15140   
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171 trap '' 1 2 15
15172
15173 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15174
15175 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15176 # Let make expand exec_prefix.
15177 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15178
15179 # Any assignment to VPATH causes Sun make to only execute
15180 # the first set of double-colon rules, so remove it if not needed.
15181 # If there is a colon in the path, we need to keep it.
15182 if test "x$srcdir" = x.; then
15183   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15184 fi
15185
15186 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15187
15188 DEFS=-DHAVE_CONFIG_H
15189
15190 # Without the "./", some shells look in PATH for config.status.
15191 : ${CONFIG_STATUS=./config.status}
15192
15193 echo creating $CONFIG_STATUS
15194 rm -f $CONFIG_STATUS
15195 cat > $CONFIG_STATUS <<EOF
15196 #! /bin/sh
15197 # Generated automatically by configure.
15198 # Run this file to recreate the current configuration.
15199 # This directory was configured as follows,
15200 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15201 #
15202 # $0 $ac_configure_args
15203 #
15204 # Compiler output produced by configure, useful for debugging
15205 # configure, is in ./config.log if it exists.
15206
15207 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15208 for ac_option
15209 do
15210   case "\$ac_option" in
15211   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15212     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15213     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15214   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15215     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15216     exit 0 ;;
15217   -help | --help | --hel | --he | --h)
15218     echo "\$ac_cs_usage"; exit 0 ;;
15219   *) echo "\$ac_cs_usage"; exit 1 ;;
15220   esac
15221 done
15222
15223 ac_given_srcdir=$srcdir
15224 ac_given_INSTALL="$INSTALL"
15225
15226 trap 'rm -fr `echo "\
15227 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15228 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15229 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15230 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15231 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15232 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15233 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15234 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15235 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15236 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15237 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15238 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15239 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15240 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15241 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15242 include/Makefile:build/top.mk:include/Makefile.in \
15243 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15244 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15245 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15246 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15247 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15248 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15249 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15250 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15251 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15252 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15253 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15254 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15255 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15256 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15257 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15258 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15259 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15260 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15261 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15262 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15263 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15264 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15265 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15266 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15267 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15268 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15269  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15270 EOF
15271 cat >> $CONFIG_STATUS <<EOF
15272
15273 # Protect against being on the right side of a sed subst in config.status.
15274 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15275  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15276 $ac_vpsub
15277 $extrasub
15278 s%@SHELL@%$SHELL%g
15279 s%@CFLAGS@%$CFLAGS%g
15280 s%@CPPFLAGS@%$CPPFLAGS%g
15281 s%@CXXFLAGS@%$CXXFLAGS%g
15282 s%@FFLAGS@%$FFLAGS%g
15283 s%@DEFS@%$DEFS%g
15284 s%@LDFLAGS@%$LDFLAGS%g
15285 s%@LIBS@%$LIBS%g
15286 s%@exec_prefix@%$exec_prefix%g
15287 s%@prefix@%$prefix%g
15288 s%@program_transform_name@%$program_transform_name%g
15289 s%@bindir@%$bindir%g
15290 s%@sbindir@%$sbindir%g
15291 s%@libexecdir@%$libexecdir%g
15292 s%@datadir@%$datadir%g
15293 s%@sysconfdir@%$sysconfdir%g
15294 s%@sharedstatedir@%$sharedstatedir%g
15295 s%@localstatedir@%$localstatedir%g
15296 s%@libdir@%$libdir%g
15297 s%@includedir@%$includedir%g
15298 s%@oldincludedir@%$oldincludedir%g
15299 s%@infodir@%$infodir%g
15300 s%@mandir@%$mandir%g
15301 s%@host@%$host%g
15302 s%@host_alias@%$host_alias%g
15303 s%@host_cpu@%$host_cpu%g
15304 s%@host_vendor@%$host_vendor%g
15305 s%@host_os@%$host_os%g
15306 s%@target@%$target%g
15307 s%@target_alias@%$target_alias%g
15308 s%@target_cpu@%$target_cpu%g
15309 s%@target_vendor@%$target_vendor%g
15310 s%@target_os@%$target_os%g
15311 s%@build@%$build%g
15312 s%@build_alias@%$build_alias%g
15313 s%@build_cpu@%$build_cpu%g
15314 s%@build_vendor@%$build_vendor%g
15315 s%@build_os@%$build_os%g
15316 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15317 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15318 s%@INSTALL_DATA@%$INSTALL_DATA%g
15319 s%@PACKAGE@%$PACKAGE%g
15320 s%@VERSION@%$VERSION%g
15321 s%@ACLOCAL@%$ACLOCAL%g
15322 s%@AUTOCONF@%$AUTOCONF%g
15323 s%@AUTOMAKE@%$AUTOMAKE%g
15324 s%@AUTOHEADER@%$AUTOHEADER%g
15325 s%@MAKEINFO@%$MAKEINFO%g
15326 s%@install_sh@%$install_sh%g
15327 s%@AMTAR@%$AMTAR%g
15328 s%@AWK@%$AWK%g
15329 s%@AMTARFLAGS@%$AMTARFLAGS%g
15330 s%@SET_MAKE@%$SET_MAKE%g
15331 s%@top_builddir@%$top_builddir%g
15332 s%@ldap_subdir@%$ldap_subdir%g
15333 s%@CC@%$CC%g
15334 s%@RANLIB@%$RANLIB%g
15335 s%@LD@%$LD%g
15336 s%@NM@%$NM%g
15337 s%@LN_S@%$LN_S%g
15338 s%@DLLTOOL@%$DLLTOOL%g
15339 s%@AS@%$AS%g
15340 s%@OBJDUMP@%$OBJDUMP%g
15341 s%@LIBTOOL@%$LIBTOOL%g
15342 s%@LN_H@%$LN_H%g
15343 s%@SENDMAIL@%$SENDMAIL%g
15344 s%@EDITOR@%$EDITOR%g
15345 s%@FINGER@%$FINGER%g
15346 s%@PERLBIN@%$PERLBIN%g
15347 s%@CPP@%$CPP%g
15348 s%@EXEEXT@%$EXEEXT%g
15349 s%@OBJEXT@%$OBJEXT%g
15350 s%@OL_MKDEP@%$OL_MKDEP%g
15351 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15352 s%@PEPSY@%$PEPSY%g
15353 s%@LIBOBJS@%$LIBOBJS%g
15354 s%@LIBSRCS@%$LIBSRCS%g
15355 s%@PLAT@%$PLAT%g
15356 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15357 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15358 s%@DYN_EXT@%$DYN_EXT%g
15359 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15360 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15361 s%@BUILD_BDB2@%$BUILD_BDB2%g
15362 s%@BUILD_LDAP@%$BUILD_LDAP%g
15363 s%@BUILD_LDBM@%$BUILD_LDBM%g
15364 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15365 s%@BUILD_PERL@%$BUILD_PERL%g
15366 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15367 s%@BUILD_SHELL@%$BUILD_SHELL%g
15368 s%@BUILD_TCL@%$BUILD_TCL%g
15369 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15370 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15371 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15372 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15373 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15374 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15375 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15376 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15377 s%@LDAP_LIBS@%$LDAP_LIBS%g
15378 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15379 s%@LDIF_LIBS@%$LDIF_LIBS%g
15380 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15381 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15382 s%@LDBM_LIBS@%$LDBM_LIBS%g
15383 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15384 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15385 s%@WRAP_LIBS@%$WRAP_LIBS%g
15386 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15387 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15388 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15389 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15390 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15391 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15392 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15393 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15394 s%@KRB_LIBS@%$KRB_LIBS%g
15395 s%@READLINE_LIBS@%$READLINE_LIBS%g
15396 s%@SASL_LIBS@%$SASL_LIBS%g
15397 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15398 s%@TLS_LIBS@%$TLS_LIBS%g
15399 s%@MODULES_LIBS@%$MODULES_LIBS%g
15400
15401 CEOF
15402 EOF
15403
15404 cat >> $CONFIG_STATUS <<\EOF
15405
15406 # Split the substitutions into bite-sized pieces for seds with
15407 # small command number limits, like on Digital OSF/1 and HP-UX.
15408 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15409 ac_file=1 # Number of current file.
15410 ac_beg=1 # First line for current file.
15411 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15412 ac_more_lines=:
15413 ac_sed_cmds=""
15414 while $ac_more_lines; do
15415   if test $ac_beg -gt 1; then
15416     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15417   else
15418     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15419   fi
15420   if test ! -s conftest.s$ac_file; then
15421     ac_more_lines=false
15422     rm -f conftest.s$ac_file
15423   else
15424     if test -z "$ac_sed_cmds"; then
15425       ac_sed_cmds="sed -f conftest.s$ac_file"
15426     else
15427       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15428     fi
15429     ac_file=`expr $ac_file + 1`
15430     ac_beg=$ac_end
15431     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15432   fi
15433 done
15434 if test -z "$ac_sed_cmds"; then
15435   ac_sed_cmds=cat
15436 fi
15437 EOF
15438
15439 cat >> $CONFIG_STATUS <<EOF
15440
15441 CONFIG_FILES=\${CONFIG_FILES-"\
15442 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15443 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15444 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15445 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15446 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15447 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15448 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15449 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15450 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15451 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15452 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15453 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15454 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15455 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15456 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15457 include/Makefile:build/top.mk:include/Makefile.in \
15458 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15459 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15460 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15461 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15462 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15463 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15464 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15465 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15466 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15467 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15468 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15469 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15470 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15471 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15472 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15473 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15474 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15475 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15476 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15477 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15478 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15479 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15480 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15481 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15482 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15483 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15484 "}
15485 EOF
15486 cat >> $CONFIG_STATUS <<\EOF
15487 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15488   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15489   case "$ac_file" in
15490   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15491        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15492   *) ac_file_in="${ac_file}.in" ;;
15493   esac
15494
15495   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15496
15497   # Remove last slash and all that follows it.  Not all systems have dirname.
15498   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15499   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15500     # The file is in a subdirectory.
15501     test ! -d "$ac_dir" && mkdir "$ac_dir"
15502     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15503     # A "../" for each directory in $ac_dir_suffix.
15504     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15505   else
15506     ac_dir_suffix= ac_dots=
15507   fi
15508
15509   case "$ac_given_srcdir" in
15510   .)  srcdir=.
15511       if test -z "$ac_dots"; then top_srcdir=.
15512       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15513   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15514   *) # Relative path.
15515     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15516     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15517   esac
15518
15519   case "$ac_given_INSTALL" in
15520   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15521   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15522   esac
15523
15524   echo creating "$ac_file"
15525   rm -f "$ac_file"
15526   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15527   case "$ac_file" in
15528   *[Mm]akefile*) ac_comsub="1i\\
15529 # $configure_input" ;;
15530   *) ac_comsub= ;;
15531   esac
15532
15533   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15534   sed -e "$ac_comsub
15535 s%@configure_input@%$configure_input%g
15536 s%@srcdir@%$srcdir%g
15537 s%@top_srcdir@%$top_srcdir%g
15538 s%@INSTALL@%$INSTALL%g
15539 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15540 fi; done
15541 rm -f conftest.s*
15542
15543 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15544 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15545 #
15546 # ac_d sets the value in "#define NAME VALUE" lines.
15547 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15548 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15549 ac_dC='\3'
15550 ac_dD='%g'
15551 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15552 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15553 ac_uB='\([      ]\)%\1#\2define\3'
15554 ac_uC=' '
15555 ac_uD='\4%g'
15556 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15557 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15558 ac_eB='$%\1#\2define\3'
15559 ac_eC=' '
15560 ac_eD='%g'
15561
15562 if test "${CONFIG_HEADERS+set}" != set; then
15563 EOF
15564 cat >> $CONFIG_STATUS <<EOF
15565   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15566 EOF
15567 cat >> $CONFIG_STATUS <<\EOF
15568 fi
15569 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15570   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15571   case "$ac_file" in
15572   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15573        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15574   *) ac_file_in="${ac_file}.in" ;;
15575   esac
15576
15577   echo creating $ac_file
15578
15579   rm -f conftest.frag conftest.in conftest.out
15580   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15581   cat $ac_file_inputs > conftest.in
15582
15583 EOF
15584
15585 # Transform confdefs.h into a sed script conftest.vals that substitutes
15586 # the proper values into config.h.in to produce config.h.  And first:
15587 # Protect against being on the right side of a sed subst in config.status.
15588 # Protect against being in an unquoted here document in config.status.
15589 rm -f conftest.vals
15590 cat > conftest.hdr <<\EOF
15591 s/[\\&%]/\\&/g
15592 s%[\\$`]%\\&%g
15593 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15594 s%ac_d%ac_u%gp
15595 s%ac_u%ac_e%gp
15596 EOF
15597 sed -n -f conftest.hdr confdefs.h > conftest.vals
15598 rm -f conftest.hdr
15599
15600 # This sed command replaces #undef with comments.  This is necessary, for
15601 # example, in the case of _POSIX_SOURCE, which is predefined and required
15602 # on some systems where configure will not decide to define it.
15603 cat >> conftest.vals <<\EOF
15604 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15605 EOF
15606
15607 # Break up conftest.vals because some shells have a limit on
15608 # the size of here documents, and old seds have small limits too.
15609
15610 rm -f conftest.tail
15611 while :
15612 do
15613   ac_lines=`grep -c . conftest.vals`
15614   # grep -c gives empty output for an empty file on some AIX systems.
15615   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15616   # Write a limited-size here document to conftest.frag.
15617   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15618   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15619   echo 'CEOF
15620   sed -f conftest.frag conftest.in > conftest.out
15621   rm -f conftest.in
15622   mv conftest.out conftest.in
15623 ' >> $CONFIG_STATUS
15624   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15625   rm -f conftest.vals
15626   mv conftest.tail conftest.vals
15627 done
15628 rm -f conftest.vals
15629
15630 cat >> $CONFIG_STATUS <<\EOF
15631   rm -f conftest.frag conftest.h
15632   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15633   cat conftest.in >> conftest.h
15634   rm -f conftest.in
15635   if cmp -s $ac_file conftest.h 2>/dev/null; then
15636     echo "$ac_file is unchanged"
15637     rm -f conftest.h
15638   else
15639     # Remove last slash and all that follows it.  Not all systems have dirname.
15640       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15641       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15642       # The file is in a subdirectory.
15643       test ! -d "$ac_dir" && mkdir "$ac_dir"
15644     fi
15645     rm -f $ac_file
15646     mv conftest.h $ac_file
15647   fi
15648 fi; done
15649
15650 EOF
15651 cat >> $CONFIG_STATUS <<EOF
15652
15653 EOF
15654 cat >> $CONFIG_STATUS <<\EOF
15655
15656 date > stamp-h
15657 echo Please \"make depend\" to build dependencies
15658
15659 exit 0
15660 EOF
15661 chmod +x $CONFIG_STATUS
15662 rm -fr confdefs* $ac_clean_files
15663 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15664