]> git.sur5r.net Git - openldap/blob - configure
Delete obsolete symbols acl_access_allowed and acl_get_applicable
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.267 1999/10/28 05:23:03 hyc 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   fi
652 done
653 if test -z "$ac_aux_dir"; then
654   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
655 fi
656 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
657 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
658 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
659
660 OL_VERSION=`cat $ac_aux_dir/version`
661 if test -z "$OL_VERSION"; then
662         { echo "configure: error: could not determine version" 1>&2; exit 1; }
663 fi
664
665 echo "Configuring OpenLDAP $OL_VERSION ..."
666
667
668 echo $ac_n "checking host system type""... $ac_c" 1>&6
669 echo "configure:670: checking host system type" >&5
670 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
671
672 # Make sure we can run config.sub.
673   if $ac_config_sub sun4 >/dev/null 2>&1; then :
674     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
675   fi
676
677   ac_cv_host_alias=$host
678   case "$ac_cv_host_alias" in
679   NONE)
680     case $nonopt in
681     NONE)
682       if ac_cv_host_alias=`$ac_config_guess`; then :
683       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
684       fi ;;
685     *) ac_cv_host_alias=$nonopt ;;
686     esac ;;
687   esac
688
689   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
690   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
691   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
692   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
693 else
694   echo $ac_n "(cached) $ac_c" 1>&6
695 fi
696
697 echo "$ac_t""$ac_cv_host" 1>&6
698
699 host=$ac_cv_host
700 host_alias=$ac_cv_host_alias
701 host_cpu=$ac_cv_host_cpu
702 host_vendor=$ac_cv_host_vendor
703 host_os=$ac_cv_host_os
704
705
706
707
708
709 echo $ac_n "checking target system type""... $ac_c" 1>&6
710 echo "configure:711: checking target system type" >&5
711 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
712
713 # Make sure we can run config.sub.
714   if $ac_config_sub sun4 >/dev/null 2>&1; then :
715     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
716   fi
717
718   ac_cv_target_alias=$target
719   case "$ac_cv_target_alias" in
720   NONE)
721     case $nonopt in
722     NONE)
723       ac_cv_target_alias=$host_alias ;;
724
725     *) ac_cv_target_alias=$nonopt ;;
726     esac ;;
727   esac
728
729   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
730   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
731   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
732   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
733 else
734   echo $ac_n "(cached) $ac_c" 1>&6
735 fi
736
737 echo "$ac_t""$ac_cv_target" 1>&6
738
739 target=$ac_cv_target
740 target_alias=$ac_cv_target_alias
741 target_cpu=$ac_cv_target_cpu
742 target_vendor=$ac_cv_target_vendor
743 target_os=$ac_cv_target_os
744
745
746
747
748
749 echo $ac_n "checking build system type""... $ac_c" 1>&6
750 echo "configure:751: checking build system type" >&5
751 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
752
753 # Make sure we can run config.sub.
754   if $ac_config_sub sun4 >/dev/null 2>&1; then :
755     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
756   fi
757
758   ac_cv_build_alias=$build
759   case "$ac_cv_build_alias" in
760   NONE)
761     case $nonopt in
762     NONE)
763       ac_cv_build_alias=$host_alias ;;
764
765     *) ac_cv_build_alias=$nonopt ;;
766     esac ;;
767   esac
768
769   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
770   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
771   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
772   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
773 else
774   echo $ac_n "(cached) $ac_c" 1>&6
775 fi
776
777 echo "$ac_t""$ac_cv_build" 1>&6
778
779 build=$ac_cv_build
780 build_alias=$ac_cv_build_alias
781 build_cpu=$ac_cv_build_cpu
782 build_vendor=$ac_cv_build_vendor
783 build_os=$ac_cv_build_os
784
785
786
787
788
789 # Do some error checking and defaulting for the host and target type.
790 # The inputs are:
791 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
792 #
793 # The rules are:
794 # 1. You are not allowed to specify --host, --target, and nonopt at the
795 #    same time.
796 # 2. Host defaults to nonopt.
797 # 3. If nonopt is not specified, then host defaults to the current host,
798 #    as determined by config.guess.
799 # 4. Target and build default to nonopt.
800 # 5. If nonopt is not specified, then target and build default to host.
801
802 # The aliases save the names the user supplied, while $host etc.
803 # will get canonicalized.
804 case $host---$target---$nonopt in
805 NONE---*---* | *---NONE---* | *---*---NONE) ;;
806 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
807 esac
808
809 test "$host_alias" != "$target_alias" &&
810   test "$program_prefix$program_suffix$program_transform_name" = \
811     NONENONEs,x,x, &&
812   program_prefix=${target_alias}-
813
814
815 # Find a good install program.  We prefer a C program (faster),
816 # so one script is as good as another.  But avoid the broken or
817 # incompatible versions:
818 # SysV /etc/install, /usr/sbin/install
819 # SunOS /usr/etc/install
820 # IRIX /sbin/install
821 # AIX /bin/install
822 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
823 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
824 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
825 # ./install, which can be erroneously created by make from ./install.sh.
826 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
827 echo "configure:828: checking for a BSD compatible install" >&5
828 if test -z "$INSTALL"; then
829 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
833   for ac_dir in $PATH; do
834     # Account for people who put trailing slashes in PATH elements.
835     case "$ac_dir/" in
836     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
837     *)
838       # OSF1 and SCO ODT 3.0 have their own names for install.
839       # Don't use installbsd from OSF since it installs stuff as root
840       # by default.
841       for ac_prog in ginstall scoinst install; do
842         if test -f $ac_dir/$ac_prog; then
843           if test $ac_prog = install &&
844             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
845             # AIX install.  It has an incompatible calling convention.
846             :
847           elif test $ac_prog = install &&
848             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
849             # program-specific install script used by HP pwplus--don't use.
850             :
851           else
852             ac_cv_path_install="$ac_dir/$ac_prog -c"
853             break 2
854           fi
855         fi
856       done
857       ;;
858     esac
859   done
860   IFS="$ac_save_IFS"
861
862 fi
863   if test "${ac_cv_path_install+set}" = set; then
864     INSTALL="$ac_cv_path_install"
865   else
866     # As a last resort, use the slow shell script.  We don't cache a
867     # path for INSTALL within a source directory, because that will
868     # break other packages using the cache if that directory is
869     # removed, or if the path is relative.
870     INSTALL="$ac_install_sh"
871   fi
872 fi
873 echo "$ac_t""$INSTALL" 1>&6
874
875 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
876 # It thinks the first close brace ends the variable substitution.
877 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
878
879 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
880
881 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
882
883 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
884 echo "configure:885: checking whether build environment is sane" >&5
885 # Just in case
886 sleep 1
887 echo timestamp > conftestfile
888 # Do `set' in a subshell so we don't clobber the current shell's
889 # arguments.  Must try -L first in case configure is actually a
890 # symlink; some systems play weird games with the mod time of symlinks
891 # (eg FreeBSD returns the mod time of the symlink's containing
892 # directory).
893 if (
894    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
895    if test "$*" = "X"; then
896       # -L didn't work.
897       set X `ls -t $srcdir/configure conftestfile`
898    fi
899    if test "$*" != "X $srcdir/configure conftestfile" \
900       && test "$*" != "X conftestfile $srcdir/configure"; then
901
902       # If neither matched, then we have a broken ls.  This can happen
903       # if, for instance, CONFIG_SHELL is bash and it inherits a
904       # broken ls alias from the environment.  This has actually
905       # happened.  Such a system could not be considered "sane".
906       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
907 alias in your environment" 1>&2; exit 1; }
908    fi
909
910    test "$2" = conftestfile
911    )
912 then
913    # Ok.
914    :
915 else
916    { echo "configure: error: newly created file is older than distributed files!
917 Check your system clock" 1>&2; exit 1; }
918 fi
919 rm -f conftest*
920 echo "$ac_t""yes" 1>&6
921 if test "$program_transform_name" = s,x,x,; then
922   program_transform_name=
923 else
924   # Double any \ or $.  echo might interpret backslashes.
925   cat <<\EOF_SED > conftestsed
926 s,\\,\\\\,g; s,\$,$$,g
927 EOF_SED
928   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
929   rm -f conftestsed
930 fi
931 test "$program_prefix" != NONE &&
932   program_transform_name="s,^,${program_prefix},;$program_transform_name"
933 # Use a double $ so make ignores it.
934 test "$program_suffix" != NONE &&
935   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
936
937 # sed with no file args requires a program.
938 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
939
940 for ac_prog in mawk gawk nawk awk
941 do
942 # Extract the first word of "$ac_prog", so it can be a program name with args.
943 set dummy $ac_prog; ac_word=$2
944 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
945 echo "configure:946: checking for $ac_word" >&5
946 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
947   echo $ac_n "(cached) $ac_c" 1>&6
948 else
949   if test -n "$AWK"; then
950   ac_cv_prog_AWK="$AWK" # Let the user override the test.
951 else
952   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
953   ac_dummy="$PATH"
954   for ac_dir in $ac_dummy; do
955     test -z "$ac_dir" && ac_dir=.
956     if test -f $ac_dir/$ac_word; then
957       ac_cv_prog_AWK="$ac_prog"
958       break
959     fi
960   done
961   IFS="$ac_save_ifs"
962 fi
963 fi
964 AWK="$ac_cv_prog_AWK"
965 if test -n "$AWK"; then
966   echo "$ac_t""$AWK" 1>&6
967 else
968   echo "$ac_t""no" 1>&6
969 fi
970
971 test -n "$AWK" && break
972 done
973
974 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
975 echo "configure:976: checking whether ${MAKE-make} sets \${MAKE}" >&5
976 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
977 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   cat > conftestmake <<\EOF
981 all:
982         @echo 'ac_maketemp="${MAKE}"'
983 EOF
984 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
985 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
986 if test -n "$ac_maketemp"; then
987   eval ac_cv_prog_make_${ac_make}_set=yes
988 else
989   eval ac_cv_prog_make_${ac_make}_set=no
990 fi
991 rm -f conftestmake
992 fi
993 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
994   echo "$ac_t""yes" 1>&6
995   SET_MAKE=
996 else
997   echo "$ac_t""no" 1>&6
998   SET_MAKE="MAKE=${MAKE-make}"
999 fi
1000
1001
1002
1003 PACKAGE=OpenLDAP
1004
1005 VERSION=$OL_VERSION
1006
1007 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1008   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1009 fi
1010
1011
1012
1013 missing_dir=`cd $ac_aux_dir && pwd`
1014 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1015 echo "configure:1016: checking for working aclocal" >&5
1016 # Run test in a subshell; some versions of sh will print an error if
1017 # an executable is not found, even if stderr is redirected.
1018 # Redirect stdin to placate older versions of autoconf.  Sigh.
1019 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1020    ACLOCAL=aclocal
1021    echo "$ac_t""found" 1>&6
1022 else
1023    ACLOCAL="$missing_dir/missing aclocal"
1024    echo "$ac_t""missing" 1>&6
1025 fi
1026
1027 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1028 echo "configure:1029: checking for working autoconf" >&5
1029 # Run test in a subshell; some versions of sh will print an error if
1030 # an executable is not found, even if stderr is redirected.
1031 # Redirect stdin to placate older versions of autoconf.  Sigh.
1032 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1033    AUTOCONF=autoconf
1034    echo "$ac_t""found" 1>&6
1035 else
1036    AUTOCONF="$missing_dir/missing autoconf"
1037    echo "$ac_t""missing" 1>&6
1038 fi
1039
1040 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1041 echo "configure:1042: checking for working automake" >&5
1042 # Run test in a subshell; some versions of sh will print an error if
1043 # an executable is not found, even if stderr is redirected.
1044 # Redirect stdin to placate older versions of autoconf.  Sigh.
1045 if (automake --version) < /dev/null > /dev/null 2>&1; then
1046    AUTOMAKE=automake
1047    echo "$ac_t""found" 1>&6
1048 else
1049    AUTOMAKE="$missing_dir/missing automake"
1050    echo "$ac_t""missing" 1>&6
1051 fi
1052
1053 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1054 echo "configure:1055: checking for working autoheader" >&5
1055 # Run test in a subshell; some versions of sh will print an error if
1056 # an executable is not found, even if stderr is redirected.
1057 # Redirect stdin to placate older versions of autoconf.  Sigh.
1058 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1059    AUTOHEADER=autoheader
1060    echo "$ac_t""found" 1>&6
1061 else
1062    AUTOHEADER="$missing_dir/missing autoheader"
1063    echo "$ac_t""missing" 1>&6
1064 fi
1065
1066 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1067 echo "configure:1068: checking for working makeinfo" >&5
1068 # Run test in a subshell; some versions of sh will print an error if
1069 # an executable is not found, even if stderr is redirected.
1070 # Redirect stdin to placate older versions of autoconf.  Sigh.
1071 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1072    MAKEINFO=makeinfo
1073    echo "$ac_t""found" 1>&6
1074 else
1075    MAKEINFO="$missing_dir/missing makeinfo"
1076    echo "$ac_t""missing" 1>&6
1077 fi
1078
1079 install_sh="$missing_dir/install-sh"
1080 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1081
1082 for ac_prog in gnutar gtar tar
1083 do
1084 # Extract the first word of "$ac_prog", so it can be a program name with args.
1085 set dummy $ac_prog; ac_word=$2
1086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1087 echo "configure:1088: checking for $ac_word" >&5
1088 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1089   echo $ac_n "(cached) $ac_c" 1>&6
1090 else
1091   if test -n "$AMTAR"; then
1092   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1093 else
1094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1095   ac_dummy="$PATH"
1096   for ac_dir in $ac_dummy; do
1097     test -z "$ac_dir" && ac_dir=.
1098     if test -f $ac_dir/$ac_word; then
1099       ac_cv_prog_AMTAR="$ac_prog"
1100       break
1101     fi
1102   done
1103   IFS="$ac_save_ifs"
1104 fi
1105 fi
1106 AMTAR="$ac_cv_prog_AMTAR"
1107 if test -n "$AMTAR"; then
1108   echo "$ac_t""$AMTAR" 1>&6
1109 else
1110   echo "$ac_t""no" 1>&6
1111 fi
1112
1113 test -n "$AMTAR" && break
1114 done
1115
1116
1117 AMTARFLAGS=
1118 if test -n "$AMTAR"; then
1119   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1120         AMTARFLAGS=o
1121   fi
1122 fi
1123
1124
1125
1126 cat >> confdefs.h <<EOF
1127 #define OPENLDAP_PACKAGE "$PACKAGE"
1128 EOF
1129
1130 cat >> confdefs.h <<EOF
1131 #define OPENLDAP_VERSION "$VERSION"
1132 EOF
1133
1134
1135
1136
1137 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1138 echo "configure:1139: checking configure arguments" >&5
1139
1140
1141 top_builddir=`pwd`
1142
1143 ldap_subdir="/openldap"
1144
1145 # Check whether --with-subdir or --without-subdir was given.
1146 if test "${with_subdir+set}" = set; then
1147   withval="$with_subdir"
1148   case "$withval" in
1149         no) ldap_subdir=""
1150                 ;;
1151         yes)
1152                 ;;
1153         /*|\\*)
1154                 ldap_subdir="$withval"
1155                 ;;
1156         *)
1157                 ldap_subdir="/$withval"
1158                 ;;
1159 esac
1160
1161 fi
1162
1163
1164 # OpenLDAP --enable-debug
1165         # Check whether --enable-debug or --disable-debug was given.
1166 if test "${enable_debug+set}" = set; then
1167   enableval="$enable_debug"
1168   
1169         ol_arg=invalid
1170         for ol_val in auto yes no ; do
1171                 if test "$enableval" = "$ol_val" ; then
1172                         ol_arg="$ol_val"
1173                 fi
1174         done
1175         if test "$ol_arg" = "invalid" ; then
1176                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1177         fi
1178         ol_enable_debug="$ol_arg"
1179
1180 else
1181         ol_enable_debug="yes"
1182 fi
1183 # end --enable-debug
1184 # OpenLDAP --enable-syslog
1185         # Check whether --enable-syslog or --disable-syslog was given.
1186 if test "${enable_syslog+set}" = set; then
1187   enableval="$enable_syslog"
1188   
1189         ol_arg=invalid
1190         for ol_val in auto yes no ; do
1191                 if test "$enableval" = "$ol_val" ; then
1192                         ol_arg="$ol_val"
1193                 fi
1194         done
1195         if test "$ol_arg" = "invalid" ; then
1196                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1197         fi
1198         ol_enable_syslog="$ol_arg"
1199
1200 else
1201         ol_enable_syslog="auto"
1202 fi
1203 # end --enable-syslog
1204 # OpenLDAP --enable-proctitle
1205         # Check whether --enable-proctitle or --disable-proctitle was given.
1206 if test "${enable_proctitle+set}" = set; then
1207   enableval="$enable_proctitle"
1208   
1209         ol_arg=invalid
1210         for ol_val in auto yes no ; do
1211                 if test "$enableval" = "$ol_val" ; then
1212                         ol_arg="$ol_val"
1213                 fi
1214         done
1215         if test "$ol_arg" = "invalid" ; then
1216                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1217         fi
1218         ol_enable_proctitle="$ol_arg"
1219
1220 else
1221         ol_enable_proctitle="yes"
1222 fi
1223 # end --enable-proctitle
1224 # OpenLDAP --enable-cache
1225         # Check whether --enable-cache or --disable-cache was given.
1226 if test "${enable_cache+set}" = set; then
1227   enableval="$enable_cache"
1228   
1229         ol_arg=invalid
1230         for ol_val in auto yes no ; do
1231                 if test "$enableval" = "$ol_val" ; then
1232                         ol_arg="$ol_val"
1233                 fi
1234         done
1235         if test "$ol_arg" = "invalid" ; then
1236                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1237         fi
1238         ol_enable_cache="$ol_arg"
1239
1240 else
1241         ol_enable_cache="yes"
1242 fi
1243 # end --enable-cache
1244 # OpenLDAP --enable-dns
1245         # Check whether --enable-dns or --disable-dns was given.
1246 if test "${enable_dns+set}" = set; then
1247   enableval="$enable_dns"
1248   
1249         ol_arg=invalid
1250         for ol_val in auto yes no ; do
1251                 if test "$enableval" = "$ol_val" ; then
1252                         ol_arg="$ol_val"
1253                 fi
1254         done
1255         if test "$ol_arg" = "invalid" ; then
1256                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1257         fi
1258         ol_enable_dns="$ol_arg"
1259
1260 else
1261         ol_enable_dns="no"
1262 fi
1263 # end --enable-dns
1264 # OpenLDAP --enable-referrals
1265         # Check whether --enable-referrals or --disable-referrals was given.
1266 if test "${enable_referrals+set}" = set; then
1267   enableval="$enable_referrals"
1268   
1269         ol_arg=invalid
1270         for ol_val in auto yes no ; do
1271                 if test "$enableval" = "$ol_val" ; then
1272                         ol_arg="$ol_val"
1273                 fi
1274         done
1275         if test "$ol_arg" = "invalid" ; then
1276                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1277         fi
1278         ol_enable_referrals="$ol_arg"
1279
1280 else
1281         ol_enable_referrals="yes"
1282 fi
1283 # end --enable-referrals
1284 # OpenLDAP --enable-cldap
1285         # Check whether --enable-cldap or --disable-cldap was given.
1286 if test "${enable_cldap+set}" = set; then
1287   enableval="$enable_cldap"
1288   
1289         ol_arg=invalid
1290         for ol_val in auto yes no ; do
1291                 if test "$enableval" = "$ol_val" ; then
1292                         ol_arg="$ol_val"
1293                 fi
1294         done
1295         if test "$ol_arg" = "invalid" ; then
1296                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1297         fi
1298         ol_enable_cldap="$ol_arg"
1299
1300 else
1301         ol_enable_cldap="no"
1302 fi
1303 # end --enable-cldap
1304 # OpenLDAP --enable-x_compile
1305         # Check whether --enable-x_compile or --disable-x_compile was given.
1306 if test "${enable_x_compile+set}" = set; then
1307   enableval="$enable_x_compile"
1308   
1309         ol_arg=invalid
1310         for ol_val in yes no ; do
1311                 if test "$enableval" = "$ol_val" ; then
1312                         ol_arg="$ol_val"
1313                 fi
1314         done
1315         if test "$ol_arg" = "invalid" ; then
1316                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1317         fi
1318         ol_enable_x_compile="$ol_arg"
1319
1320 else
1321         ol_enable_x_compile="no"
1322 fi
1323 # end --enable-x_compile
1324
1325 # OpenLDAP --enable-dmalloc
1326         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1327 if test "${enable_dmalloc+set}" = set; then
1328   enableval="$enable_dmalloc"
1329   
1330         ol_arg=invalid
1331         for ol_val in auto yes no ; do
1332                 if test "$enableval" = "$ol_val" ; then
1333                         ol_arg="$ol_val"
1334                 fi
1335         done
1336         if test "$ol_arg" = "invalid" ; then
1337                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1338         fi
1339         ol_enable_dmalloc="$ol_arg"
1340
1341 else
1342         ol_enable_dmalloc="no"
1343 fi
1344 # end --enable-dmalloc
1345
1346 # OpenLDAP --with-cyrus_sasl
1347         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1348 if test "${with_cyrus_sasl+set}" = set; then
1349   withval="$with_cyrus_sasl"
1350   
1351         ol_arg=invalid
1352         for ol_val in auto yes no  ; do
1353                 if test "$withval" = "$ol_val" ; then
1354                         ol_arg="$ol_val"
1355                 fi
1356         done
1357         if test "$ol_arg" = "invalid" ; then
1358                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1359         fi
1360         ol_with_cyrus_sasl="$ol_arg"
1361
1362 else
1363         ol_with_cyrus_sasl="auto"
1364 fi
1365 # end --with-cyrus_sasl
1366
1367 # OpenLDAP --with-fetch
1368         # Check whether --with-fetch or --without-fetch was given.
1369 if test "${with_fetch+set}" = set; then
1370   withval="$with_fetch"
1371   
1372         ol_arg=invalid
1373         for ol_val in auto yes no  ; do
1374                 if test "$withval" = "$ol_val" ; then
1375                         ol_arg="$ol_val"
1376                 fi
1377         done
1378         if test "$ol_arg" = "invalid" ; then
1379                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1380         fi
1381         ol_with_fetch="$ol_arg"
1382
1383 else
1384         ol_with_fetch="auto"
1385 fi
1386 # end --with-fetch
1387
1388 # OpenLDAP --with-kerberos
1389         # Check whether --with-kerberos or --without-kerberos was given.
1390 if test "${with_kerberos+set}" = set; then
1391   withval="$with_kerberos"
1392   
1393         ol_arg=invalid
1394         for ol_val in auto k5 kth k4 afs yes no ; do
1395                 if test "$withval" = "$ol_val" ; then
1396                         ol_arg="$ol_val"
1397                 fi
1398         done
1399         if test "$ol_arg" = "invalid" ; then
1400                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1401         fi
1402         ol_with_kerberos="$ol_arg"
1403
1404 else
1405         ol_with_kerberos="auto"
1406 fi
1407 # end --with-kerberos
1408
1409 # OpenLDAP --with-readline
1410         # Check whether --with-readline or --without-readline was given.
1411 if test "${with_readline+set}" = set; then
1412   withval="$with_readline"
1413   
1414         ol_arg=invalid
1415         for ol_val in auto yes no  ; do
1416                 if test "$withval" = "$ol_val" ; then
1417                         ol_arg="$ol_val"
1418                 fi
1419         done
1420         if test "$ol_arg" = "invalid" ; then
1421                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1422         fi
1423         ol_with_readline="$ol_arg"
1424
1425 else
1426         ol_with_readline="auto"
1427 fi
1428 # end --with-readline
1429
1430 # OpenLDAP --with-threads
1431         # Check whether --with-threads or --without-threads was given.
1432 if test "${with_threads+set}" = set; then
1433   withval="$with_threads"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto posix mach pth lwp yes no manual  ; do
1437                 if test "$withval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1443         fi
1444         ol_with_threads="$ol_arg"
1445
1446 else
1447         ol_with_threads="auto"
1448 fi
1449 # end --with-threads
1450
1451 # OpenLDAP --with-tls
1452         # Check whether --with-tls or --without-tls was given.
1453 if test "${with_tls+set}" = set; then
1454   withval="$with_tls"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto ssleay openssl yes no  ; do
1458                 if test "$withval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1464         fi
1465         ol_with_tls="$ol_arg"
1466
1467 else
1468         ol_with_tls="auto"
1469 fi
1470 # end --with-tls
1471
1472 # OpenLDAP --with-yielding_select
1473         # Check whether --with-yielding_select or --without-yielding_select was given.
1474 if test "${with_yielding_select+set}" = set; then
1475   withval="$with_yielding_select"
1476   
1477         ol_arg=invalid
1478         for ol_val in auto yes no manual  ; do
1479                 if test "$withval" = "$ol_val" ; then
1480                         ol_arg="$ol_val"
1481                 fi
1482         done
1483         if test "$ol_arg" = "invalid" ; then
1484                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1485         fi
1486         ol_with_yielding_select="$ol_arg"
1487
1488 else
1489         ol_with_yielding_select="auto"
1490 fi
1491 # end --with-yielding_select
1492
1493
1494 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1495 if test "${with_xxldapdoptions+set}" = set; then
1496   withval="$with_xxldapdoptions"
1497   :
1498 fi
1499
1500 # OpenLDAP --enable-ldapd
1501         # Check whether --enable-ldapd or --disable-ldapd was given.
1502 if test "${enable_ldapd+set}" = set; then
1503   enableval="$enable_ldapd"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1513         fi
1514         ol_enable_ldapd="$ol_arg"
1515
1516 else
1517         ol_enable_ldapd="no"
1518 fi
1519 # end --enable-ldapd
1520
1521 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1522 if test "${with_xxslapdoptions+set}" = set; then
1523   withval="$with_xxslapdoptions"
1524   :
1525 fi
1526
1527 # OpenLDAP --enable-slapd
1528         # Check whether --enable-slapd or --disable-slapd was given.
1529 if test "${enable_slapd+set}" = set; then
1530   enableval="$enable_slapd"
1531   
1532         ol_arg=invalid
1533         for ol_val in auto yes no ; do
1534                 if test "$enableval" = "$ol_val" ; then
1535                         ol_arg="$ol_val"
1536                 fi
1537         done
1538         if test "$ol_arg" = "invalid" ; then
1539                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1540         fi
1541         ol_enable_slapd="$ol_arg"
1542
1543 else
1544         ol_enable_slapd="yes"
1545 fi
1546 # end --enable-slapd
1547 # OpenLDAP --enable-cleartext
1548         # Check whether --enable-cleartext or --disable-cleartext was given.
1549 if test "${enable_cleartext+set}" = set; then
1550   enableval="$enable_cleartext"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no ; do
1554                 if test "$enableval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1560         fi
1561         ol_enable_cleartext="$ol_arg"
1562
1563 else
1564         ol_enable_cleartext="yes"
1565 fi
1566 # end --enable-cleartext
1567 # OpenLDAP --enable-crypt
1568         # Check whether --enable-crypt or --disable-crypt was given.
1569 if test "${enable_crypt+set}" = set; then
1570   enableval="$enable_crypt"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto yes no ; do
1574                 if test "$enableval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1580         fi
1581         ol_enable_crypt="$ol_arg"
1582
1583 else
1584         ol_enable_crypt="auto"
1585 fi
1586 # end --enable-crypt
1587 # OpenLDAP --enable-modules
1588         # Check whether --enable-modules or --disable-modules was given.
1589 if test "${enable_modules+set}" = set; then
1590   enableval="$enable_modules"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no ; do
1594                 if test "$enableval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1600         fi
1601         ol_enable_modules="$ol_arg"
1602
1603 else
1604         ol_enable_modules="no"
1605 fi
1606 # end --enable-modules
1607 # OpenLDAP --enable-multimaster
1608         # Check whether --enable-multimaster or --disable-multimaster was given.
1609 if test "${enable_multimaster+set}" = set; then
1610   enableval="$enable_multimaster"
1611   
1612         ol_arg=invalid
1613         for ol_val in auto yes no ; do
1614                 if test "$enableval" = "$ol_val" ; then
1615                         ol_arg="$ol_val"
1616                 fi
1617         done
1618         if test "$ol_arg" = "invalid" ; then
1619                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1620         fi
1621         ol_enable_multimaster="$ol_arg"
1622
1623 else
1624         ol_enable_multimaster="no"
1625 fi
1626 # end --enable-multimaster
1627 # OpenLDAP --enable-phonetic
1628         # Check whether --enable-phonetic or --disable-phonetic was given.
1629 if test "${enable_phonetic+set}" = set; then
1630   enableval="$enable_phonetic"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no ; do
1634                 if test "$enableval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1640         fi
1641         ol_enable_phonetic="$ol_arg"
1642
1643 else
1644         ol_enable_phonetic="no"
1645 fi
1646 # end --enable-phonetic
1647 # OpenLDAP --enable-quipu
1648         # Check whether --enable-quipu or --disable-quipu was given.
1649 if test "${enable_quipu+set}" = set; then
1650   enableval="$enable_quipu"
1651   
1652         ol_arg=invalid
1653         for ol_val in auto yes no ; do
1654                 if test "$enableval" = "$ol_val" ; then
1655                         ol_arg="$ol_val"
1656                 fi
1657         done
1658         if test "$ol_arg" = "invalid" ; then
1659                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1660         fi
1661         ol_enable_quipu="$ol_arg"
1662
1663 else
1664         ol_enable_quipu="no"
1665 fi
1666 # end --enable-quipu
1667 # OpenLDAP --enable-rlookups
1668         # Check whether --enable-rlookups or --disable-rlookups was given.
1669 if test "${enable_rlookups+set}" = set; then
1670   enableval="$enable_rlookups"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1680         fi
1681         ol_enable_rlookups="$ol_arg"
1682
1683 else
1684         ol_enable_rlookups="auto"
1685 fi
1686 # end --enable-rlookups
1687 # OpenLDAP --enable-aci
1688         # Check whether --enable-aci or --disable-aci was given.
1689 if test "${enable_aci+set}" = set; then
1690   enableval="$enable_aci"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1700         fi
1701         ol_enable_aci="$ol_arg"
1702
1703 else
1704         ol_enable_aci="no"
1705 fi
1706 # end --enable-aci
1707 # OpenLDAP --enable-discreteaci
1708         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1709 if test "${enable_discreteaci+set}" = set; then
1710   enableval="$enable_discreteaci"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1720         fi
1721         ol_enable_discreteaci="$ol_arg"
1722
1723 else
1724         ol_enable_discreteaci="no"
1725 fi
1726 # end --enable-discreteaci
1727 # OpenLDAP --enable-wrappers
1728         # Check whether --enable-wrappers or --disable-wrappers was given.
1729 if test "${enable_wrappers+set}" = set; then
1730   enableval="$enable_wrappers"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1740         fi
1741         ol_enable_wrappers="$ol_arg"
1742
1743 else
1744         ol_enable_wrappers="no"
1745 fi
1746 # end --enable-wrappers
1747 # OpenLDAP --enable-dynamic
1748         # Check whether --enable-dynamic or --disable-dynamic was given.
1749 if test "${enable_dynamic+set}" = set; then
1750   enableval="$enable_dynamic"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1760         fi
1761         ol_enable_dynamic="$ol_arg"
1762
1763 else
1764         ol_enable_dynamic="no"
1765 fi
1766 # end --enable-dynamic
1767
1768 # OpenLDAP --enable-bdb2
1769         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1770 if test "${enable_bdb2+set}" = set; then
1771   enableval="$enable_bdb2"
1772   
1773         ol_arg=invalid
1774         for ol_val in auto yes no ; do
1775                 if test "$enableval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1781         fi
1782         ol_enable_bdb2="$ol_arg"
1783
1784 else
1785         ol_enable_bdb2="no"
1786 fi
1787 # end --enable-bdb2
1788 # OpenLDAP --with-bdb2_module
1789         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1790 if test "${with_bdb2_module+set}" = set; then
1791   withval="$with_bdb2_module"
1792   
1793         ol_arg=invalid
1794         for ol_val in static dynamic ; do
1795                 if test "$withval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1801         fi
1802         ol_with_bdb2_module="$ol_arg"
1803
1804 else
1805         ol_with_bdb2_module="static"
1806 fi
1807 # end --with-bdb2_module
1808
1809 # OpenLDAP --enable-ldap
1810         # Check whether --enable-ldap or --disable-ldap was given.
1811 if test "${enable_ldap+set}" = set; then
1812   enableval="$enable_ldap"
1813   
1814         ol_arg=invalid
1815         for ol_val in auto yes no ; do
1816                 if test "$enableval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1822         fi
1823         ol_enable_ldap="$ol_arg"
1824
1825 else
1826         ol_enable_ldap="no"
1827 fi
1828 # end --enable-ldap
1829 # OpenLDAP --with-ldap_module
1830         # Check whether --with-ldap_module or --without-ldap_module was given.
1831 if test "${with_ldap_module+set}" = set; then
1832   withval="$with_ldap_module"
1833   
1834         ol_arg=invalid
1835         for ol_val in static dynamic ; do
1836                 if test "$withval" = "$ol_val" ; then
1837                         ol_arg="$ol_val"
1838                 fi
1839         done
1840         if test "$ol_arg" = "invalid" ; then
1841                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1842         fi
1843         ol_with_ldap_module="$ol_arg"
1844
1845 else
1846         ol_with_ldap_module="static"
1847 fi
1848 # end --with-ldap_module
1849
1850 # OpenLDAP --enable-ldbm
1851         # Check whether --enable-ldbm or --disable-ldbm was given.
1852 if test "${enable_ldbm+set}" = set; then
1853   enableval="$enable_ldbm"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto yes no ; do
1857                 if test "$enableval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1863         fi
1864         ol_enable_ldbm="$ol_arg"
1865
1866 else
1867         ol_enable_ldbm="yes"
1868 fi
1869 # end --enable-ldbm
1870 # OpenLDAP --with-ldbm_api
1871         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1872 if test "${with_ldbm_api+set}" = set; then
1873   withval="$with_ldbm_api"
1874   
1875         ol_arg=invalid
1876         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1877                 if test "$withval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1883         fi
1884         ol_with_ldbm_api="$ol_arg"
1885
1886 else
1887         ol_with_ldbm_api="auto"
1888 fi
1889 # end --with-ldbm_api
1890
1891 # OpenLDAP --with-ldbm_module
1892         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1893 if test "${with_ldbm_module+set}" = set; then
1894   withval="$with_ldbm_module"
1895   
1896         ol_arg=invalid
1897         for ol_val in static dynamic ; do
1898                 if test "$withval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1904         fi
1905         ol_with_ldbm_module="$ol_arg"
1906
1907 else
1908         ol_with_ldbm_module="static"
1909 fi
1910 # end --with-ldbm_module
1911
1912 # OpenLDAP --with-ldbm_type
1913         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1914 if test "${with_ldbm_type+set}" = set; then
1915   withval="$with_ldbm_type"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto btree hash ; do
1919                 if test "$withval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1925         fi
1926         ol_with_ldbm_type="$ol_arg"
1927
1928 else
1929         ol_with_ldbm_type="auto"
1930 fi
1931 # end --with-ldbm_type
1932
1933
1934 # OpenLDAP --enable-passwd
1935         # Check whether --enable-passwd or --disable-passwd was given.
1936 if test "${enable_passwd+set}" = set; then
1937   enableval="$enable_passwd"
1938   
1939         ol_arg=invalid
1940         for ol_val in auto yes no ; do
1941                 if test "$enableval" = "$ol_val" ; then
1942                         ol_arg="$ol_val"
1943                 fi
1944         done
1945         if test "$ol_arg" = "invalid" ; then
1946                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1947         fi
1948         ol_enable_passwd="$ol_arg"
1949
1950 else
1951         ol_enable_passwd="no"
1952 fi
1953 # end --enable-passwd
1954 # OpenLDAP --with-passwd_module
1955         # Check whether --with-passwd_module or --without-passwd_module was given.
1956 if test "${with_passwd_module+set}" = set; then
1957   withval="$with_passwd_module"
1958   
1959         ol_arg=invalid
1960         for ol_val in static dynamic ; do
1961                 if test "$withval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1967         fi
1968         ol_with_passwd_module="$ol_arg"
1969
1970 else
1971         ol_with_passwd_module="static"
1972 fi
1973 # end --with-passwd_module
1974
1975 # OpenLDAP --enable-perl
1976         # Check whether --enable-perl or --disable-perl was given.
1977 if test "${enable_perl+set}" = set; then
1978   enableval="$enable_perl"
1979   
1980         ol_arg=invalid
1981         for ol_val in auto yes no ; do
1982                 if test "$enableval" = "$ol_val" ; then
1983                         ol_arg="$ol_val"
1984                 fi
1985         done
1986         if test "$ol_arg" = "invalid" ; then
1987                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1988         fi
1989         ol_enable_perl="$ol_arg"
1990
1991 else
1992         ol_enable_perl="no"
1993 fi
1994 # end --enable-perl
1995 # OpenLDAP --with-perl_module
1996         # Check whether --with-perl_module or --without-perl_module was given.
1997 if test "${with_perl_module+set}" = set; then
1998   withval="$with_perl_module"
1999   
2000         ol_arg=invalid
2001         for ol_val in static dynamic ; do
2002                 if test "$withval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2008         fi
2009         ol_with_perl_module="$ol_arg"
2010
2011 else
2012         ol_with_perl_module="static"
2013 fi
2014 # end --with-perl_module
2015
2016 # OpenLDAP --enable-shell
2017         # Check whether --enable-shell or --disable-shell was given.
2018 if test "${enable_shell+set}" = set; then
2019   enableval="$enable_shell"
2020   
2021         ol_arg=invalid
2022         for ol_val in auto yes no ; do
2023                 if test "$enableval" = "$ol_val" ; then
2024                         ol_arg="$ol_val"
2025                 fi
2026         done
2027         if test "$ol_arg" = "invalid" ; then
2028                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2029         fi
2030         ol_enable_shell="$ol_arg"
2031
2032 else
2033         ol_enable_shell="no"
2034 fi
2035 # end --enable-shell
2036 # OpenLDAP --with-shell_module
2037         # Check whether --with-shell_module or --without-shell_module was given.
2038 if test "${with_shell_module+set}" = set; then
2039   withval="$with_shell_module"
2040   
2041         ol_arg=invalid
2042         for ol_val in static dynamic ; do
2043                 if test "$withval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2049         fi
2050         ol_with_shell_module="$ol_arg"
2051
2052 else
2053         ol_with_shell_module="static"
2054 fi
2055 # end --with-shell_module
2056
2057 # OpenLDAP --enable-tcl
2058         # Check whether --enable-tcl or --disable-tcl was given.
2059 if test "${enable_tcl+set}" = set; then
2060   enableval="$enable_tcl"
2061   
2062         ol_arg=invalid
2063         for ol_val in auto yes no ; do
2064                 if test "$enableval" = "$ol_val" ; then
2065                         ol_arg="$ol_val"
2066                 fi
2067         done
2068         if test "$ol_arg" = "invalid" ; then
2069                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2070         fi
2071         ol_enable_tcl="$ol_arg"
2072
2073 else
2074         ol_enable_tcl="no"
2075 fi
2076 # end --enable-tcl
2077 # OpenLDAP --with-tcl_module
2078         # Check whether --with-tcl_module or --without-tcl_module was given.
2079 if test "${with_tcl_module+set}" = set; then
2080   withval="$with_tcl_module"
2081   
2082         ol_arg=invalid
2083         for ol_val in static dynamic ; do
2084                 if test "$withval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2090         fi
2091         ol_with_tcl_module="$ol_arg"
2092
2093 else
2094         ol_with_tcl_module="static"
2095 fi
2096 # end --with-tcl_module
2097
2098
2099 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2100 if test "${with_xxslurpdoptions+set}" = set; then
2101   withval="$with_xxslurpdoptions"
2102   :
2103 fi
2104
2105 # OpenLDAP --enable-slurpd
2106         # Check whether --enable-slurpd or --disable-slurpd was given.
2107 if test "${enable_slurpd+set}" = set; then
2108   enableval="$enable_slurpd"
2109   
2110         ol_arg=invalid
2111         for ol_val in auto yes no ; do
2112                 if test "$enableval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2118         fi
2119         ol_enable_slurpd="$ol_arg"
2120
2121 else
2122         ol_enable_slurpd="auto"
2123 fi
2124 # end --enable-slurpd
2125
2126 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2127 if test "${with_xxliboptions+set}" = set; then
2128   withval="$with_xxliboptions"
2129   :
2130 fi
2131
2132 # Check whether --enable-static or --disable-static was given.
2133 if test "${enable_static+set}" = set; then
2134   enableval="$enable_static"
2135   p=${PACKAGE-default}
2136 case "$enableval" in
2137 yes) enable_static=yes ;;
2138 no) enable_static=no ;;
2139 *)
2140   enable_static=no
2141   # Look at the argument we got.  We use all the common list separators.
2142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2143   for pkg in $enableval; do
2144     if test "X$pkg" = "X$p"; then
2145       enable_static=yes
2146     fi
2147   done
2148   IFS="$ac_save_ifs"
2149   ;;
2150 esac
2151 else
2152   enable_static=yes
2153 fi
2154
2155 # Check whether --enable-shared or --disable-shared was given.
2156 if test "${enable_shared+set}" = set; then
2157   enableval="$enable_shared"
2158   p=${PACKAGE-default}
2159 case "$enableval" in
2160 yes) enable_shared=yes ;;
2161 no) enable_shared=no ;;
2162 *)
2163   enable_shared=no
2164   # Look at the argument we got.  We use all the common list separators.
2165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2166   for pkg in $enableval; do
2167     if test "X$pkg" = "X$p"; then
2168       enable_shared=yes
2169     fi
2170   done
2171   IFS="$ac_save_ifs"
2172   ;;
2173 esac
2174 else
2175   enable_shared=yes
2176 fi
2177
2178
2179
2180 # validate options
2181 if test $ol_enable_dns = yes ; then
2182         if test $ol_enable_referrals = no ; then
2183                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2184         fi
2185         if test $ol_enable_referrals = auto ; then
2186                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2187                 ol_enable_referrals=yes
2188         fi
2189 fi
2190
2191 if test $ol_enable_slapd = no ; then
2192                 if test $ol_enable_bdb2 = yes ; then
2193                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2194         fi
2195         if test $ol_enable_ldap = yes ; then
2196                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2197         fi
2198         if test $ol_enable_ldbm = yes ; then
2199                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2200         fi
2201         if test $ol_enable_passwd = yes ; then
2202                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2203         fi
2204         if test $ol_enable_perl = yes ; then
2205                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2206         fi
2207         if test $ol_enable_shell = yes ; then
2208                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2209         fi
2210         if test $ol_enable_tcl = yes ; then
2211                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2212         fi
2213         if test $ol_enable_modules = yes ; then
2214                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2215         fi
2216         if test $ol_enable_multimaster = yes ; then
2217                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2218         fi
2219         if test $ol_enable_wrappers = yes ; then
2220                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2221         fi
2222         if test $ol_enable_phonetic = yes ; then
2223                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2224         fi
2225         if test $ol_enable_quipu = yes ; then
2226                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2227         fi
2228         if test $ol_enable_rlookups = yes ; then
2229                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2230         fi
2231         if test $ol_enable_aci = yes ; then
2232                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2233         fi
2234         if test $ol_enable_discreteaci = yes ; then
2235                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2236         fi
2237         if test $ol_with_ldbm_api != auto ; then
2238                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2239         fi
2240         if test $ol_with_ldbm_type != auto ; then
2241                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2242         fi
2243         if test $ol_with_bdb2_module != static ; then
2244                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2245         fi
2246         if test $ol_with_ldap_module != static ; then
2247                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2248         fi
2249         if test $ol_with_ldbm_module != static ; then
2250                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2251         fi
2252         if test $ol_with_passwd_module != static ; then
2253                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2254         fi
2255         if test $ol_with_perl_module != static ; then
2256                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2257         fi
2258         if test $ol_with_shell_module != static ; then
2259                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2260         fi
2261         if test $ol_with_tcl_module != static ; then
2262                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2263         fi
2264         if test $ol_enable_slurpd = yes ; then
2265                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2266         fi
2267
2268         # force settings to no
2269         ol_enable_bdb2=no
2270         ol_enable_ldap=no
2271         ol_enable_ldbm=no
2272         ol_enable_passwd=no
2273         ol_enable_perl=no
2274         ol_enable_shell=no
2275         ol_enable_tcl=no
2276
2277         ol_enable_modules=no
2278         ol_enable_multimaster=no
2279         ol_enable_phonetic=no
2280         ol_enable_quipu=no
2281         ol_enable_rlookups=no
2282         ol_enable_aci=no
2283         ol_enable_discreteaci=no
2284         ol_enable_wrappers=no
2285         ol_enable_dynamic=no
2286
2287         ol_with_ldbm_api=no
2288         ol_with_ldbm_type=no
2289
2290         ol_with_bdb2_module=static
2291         ol_with_ldap_module=static
2292         ol_with_ldbm_module=static
2293         ol_with_passwd_module=static
2294         ol_with_perl_module=static
2295         ol_with_shell_module=static
2296         ol_with_tcl_module=static
2297
2298         ol_enable_slurpd=no
2299
2300 elif test $ol_enable_ldbm = no ; then
2301         
2302         if test $ol_with_ldbm_api != auto ; then
2303                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2304         fi
2305
2306         if test $ol_with_ldbm_type != auto ; then
2307                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2308         fi
2309
2310         if test $ol_with_ldbm_module != static ; then
2311                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2312         fi
2313
2314         if test $ol_enable_bdb2 = yes ; then
2315                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2316         fi
2317
2318         if test $ol_enable_modules != yes -a \
2319                 $ol_enable_ldap = no -a \
2320                 $ol_enable_passwd = no -a \
2321                 $ol_enable_perl = no -a \
2322                 $ol_enable_shell = no -a \
2323                 $ol_enable_tcl = no ; then
2324                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2325         fi
2326
2327         ol_with_ldbm_api=no
2328         ol_with_ldbm_type=no
2329         ol_with_ldbm_module=static
2330
2331 elif test $ol_enable_bdb2 = yes ; then
2332         
2333         if test $ol_with_ldbm_api != auto -a \
2334                 $ol_with_ldbm_api != db2 ; then
2335                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2336         fi
2337
2338         ol_with_ldbm_api=db2
2339
2340 else
2341         
2342         if test $ol_enable_bdb2 != no ; then
2343                 if test $ol_with_ldbm_api != auto -a \
2344                         $ol_with_ldbm_api != db2 ; then
2345                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2346                         ol_enable_bdb2=no
2347                 fi
2348         fi
2349
2350         if test $ol_with_ldbm_api = gdbm -a \
2351                 $ol_with_ldbm_type = btree ; then
2352                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2353         fi
2354         if test $ol_with_ldbm_api = mdbm -a \
2355                 $ol_with_ldbm_type = btree ; then
2356                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2357         fi
2358         if test $ol_with_ldbm_api = ndbm -a \
2359                 $ol_with_ldbm_type = btree ; then
2360                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2361         fi
2362 fi
2363
2364 if test $ol_enable_slurpd = yes ; then
2365                 if test $ol_with_threads = no ; then
2366                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2367         fi
2368 fi
2369
2370 echo "$ac_t""done" 1>&6
2371
2372 LDAP_LIBS=
2373 LDIF_LIBS=
2374 LDBM_LIBS=
2375 LTHREAD_LIBS=
2376 LUTIL_LIBS=
2377
2378 LDAPD_LIBS=
2379 SLAPD_LIBS=
2380 SLURPD_LIBS=
2381
2382 BUILD_LDAPD=no
2383 BUILD_SLAPD=no
2384 BUILD_SLURPD=no
2385
2386 BUILD_BDB2=no
2387 BUILD_LDAP=no
2388 BUILD_LDBM=no
2389 BUILD_PASSWD=no
2390 BUILD_PERL=no
2391 BUILD_QUIPU=no
2392 BUILD_SHELL=no
2393 BUILD_TCL=no
2394 BUILD_THREAD=no
2395
2396 BUILD_BDB2_DYNAMIC=static
2397 BUILD_LDAP_DYNAMIC=static
2398 BUILD_LDBM_DYNAMIC=static
2399 BUILD_PASSWD_DYNAMIC=static
2400 BUILD_PERL_DYNAMIC=static
2401 BUILD_SHELL_DYNAMIC=static
2402 BUILD_TCL_DYNAMIC=static
2403
2404 SLAPD_MODULES_LDFLAGS=
2405 SLAPD_MODULES_CPPFLAGS=
2406 SLAPD_MODULES_LIST=
2407
2408 SLAPD_PERL_LDFLAGS=
2409 MOD_PERL_LDFLAGS=
2410 PERL_CPPFLAGS=
2411
2412 MOD_TCL_LIB=
2413 KRB_LIBS=
2414 READLINE_LIBS=
2415 SASL_LIBS=
2416 TERMCAP_LIBS=
2417 TLS_LIBS=
2418 MODULES_LIBS=
2419
2420
2421
2422 cat >> confdefs.h <<\EOF
2423 #define HAVE_MKVERSION 1
2424 EOF
2425
2426
2427
2428
2429 ol_aix_threads=no
2430 case "$target" in
2431 *-*-aix*)       if test -z "$CC" ; then
2432                 case "$ol_with_threads" in
2433                 auto | yes |  posix) ol_aix_threads=yes ;;
2434                 esac
2435         fi
2436 ;;
2437 esac
2438
2439 if test $ol_aix_threads = yes ; then
2440         if test -z "${CC}" ; then
2441                 for ac_prog in cc_r xlc_r cc
2442 do
2443 # Extract the first word of "$ac_prog", so it can be a program name with args.
2444 set dummy $ac_prog; ac_word=$2
2445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2446 echo "configure:2447: checking for $ac_word" >&5
2447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2448   echo $ac_n "(cached) $ac_c" 1>&6
2449 else
2450   if test -n "$CC"; then
2451   ac_cv_prog_CC="$CC" # Let the user override the test.
2452 else
2453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2454   ac_dummy="$PATH"
2455   for ac_dir in $ac_dummy; do
2456     test -z "$ac_dir" && ac_dir=.
2457     if test -f $ac_dir/$ac_word; then
2458       ac_cv_prog_CC="$ac_prog"
2459       break
2460     fi
2461   done
2462   IFS="$ac_save_ifs"
2463 fi
2464 fi
2465 CC="$ac_cv_prog_CC"
2466 if test -n "$CC"; then
2467   echo "$ac_t""$CC" 1>&6
2468 else
2469   echo "$ac_t""no" 1>&6
2470 fi
2471
2472 test -n "$CC" && break
2473 done
2474
2475
2476                 if test "$CC" = cc ; then
2477                                                 if test $ol_with_threads != auto ; then
2478                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2479                         else
2480                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2481                         fi
2482                         ol_with_threads=no
2483                 fi
2484         fi
2485
2486         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2487                 ol_with_threads=posix
2488                 ol_cv_pthread_create=yes
2489         fi
2490 fi
2491
2492 if test -z "${CC}"; then
2493         for ac_prog in cc
2494 do
2495 # Extract the first word of "$ac_prog", so it can be a program name with args.
2496 set dummy $ac_prog; ac_word=$2
2497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2498 echo "configure:2499: checking for $ac_word" >&5
2499 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2500   echo $ac_n "(cached) $ac_c" 1>&6
2501 else
2502   if test -n "$CC"; then
2503   ac_cv_prog_CC="$CC" # Let the user override the test.
2504 else
2505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2506   ac_dummy="$PATH"
2507   for ac_dir in $ac_dummy; do
2508     test -z "$ac_dir" && ac_dir=.
2509     if test -f $ac_dir/$ac_word; then
2510       ac_cv_prog_CC="$ac_prog"
2511       break
2512     fi
2513   done
2514   IFS="$ac_save_ifs"
2515 fi
2516 fi
2517 CC="$ac_cv_prog_CC"
2518 if test -n "$CC"; then
2519   echo "$ac_t""$CC" 1>&6
2520 else
2521   echo "$ac_t""no" 1>&6
2522 fi
2523
2524 test -n "$CC" && break
2525 done
2526
2527 fi
2528
2529
2530
2531
2532 # Check whether --enable-fast-install or --disable-fast-install was given.
2533 if test "${enable_fast_install+set}" = set; then
2534   enableval="$enable_fast_install"
2535   p=${PACKAGE-default}
2536 case "$enableval" in
2537 yes) enable_fast_install=yes ;;
2538 no) enable_fast_install=no ;;
2539 *)
2540   enable_fast_install=no
2541   # Look at the argument we got.  We use all the common list separators.
2542   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2543   for pkg in $enableval; do
2544     if test "X$pkg" = "X$p"; then
2545       enable_fast_install=yes
2546     fi
2547   done
2548   IFS="$ac_save_ifs"
2549   ;;
2550 esac
2551 else
2552   enable_fast_install=yes
2553 fi
2554
2555 # Extract the first word of "ranlib", so it can be a program name with args.
2556 set dummy ranlib; ac_word=$2
2557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2558 echo "configure:2559: checking for $ac_word" >&5
2559 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2560   echo $ac_n "(cached) $ac_c" 1>&6
2561 else
2562   if test -n "$RANLIB"; then
2563   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2564 else
2565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2566   ac_dummy="$PATH"
2567   for ac_dir in $ac_dummy; do
2568     test -z "$ac_dir" && ac_dir=.
2569     if test -f $ac_dir/$ac_word; then
2570       ac_cv_prog_RANLIB="ranlib"
2571       break
2572     fi
2573   done
2574   IFS="$ac_save_ifs"
2575   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2576 fi
2577 fi
2578 RANLIB="$ac_cv_prog_RANLIB"
2579 if test -n "$RANLIB"; then
2580   echo "$ac_t""$RANLIB" 1>&6
2581 else
2582   echo "$ac_t""no" 1>&6
2583 fi
2584
2585 # Extract the first word of "gcc", so it can be a program name with args.
2586 set dummy gcc; ac_word=$2
2587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2588 echo "configure:2589: checking for $ac_word" >&5
2589 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2590   echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592   if test -n "$CC"; then
2593   ac_cv_prog_CC="$CC" # Let the user override the test.
2594 else
2595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2596   ac_dummy="$PATH"
2597   for ac_dir in $ac_dummy; do
2598     test -z "$ac_dir" && ac_dir=.
2599     if test -f $ac_dir/$ac_word; then
2600       ac_cv_prog_CC="gcc"
2601       break
2602     fi
2603   done
2604   IFS="$ac_save_ifs"
2605 fi
2606 fi
2607 CC="$ac_cv_prog_CC"
2608 if test -n "$CC"; then
2609   echo "$ac_t""$CC" 1>&6
2610 else
2611   echo "$ac_t""no" 1>&6
2612 fi
2613
2614 if test -z "$CC"; then
2615   # Extract the first word of "cc", so it can be a program name with args.
2616 set dummy cc; ac_word=$2
2617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2618 echo "configure:2619: checking for $ac_word" >&5
2619 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2620   echo $ac_n "(cached) $ac_c" 1>&6
2621 else
2622   if test -n "$CC"; then
2623   ac_cv_prog_CC="$CC" # Let the user override the test.
2624 else
2625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2626   ac_prog_rejected=no
2627   ac_dummy="$PATH"
2628   for ac_dir in $ac_dummy; do
2629     test -z "$ac_dir" && ac_dir=.
2630     if test -f $ac_dir/$ac_word; then
2631       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2632         ac_prog_rejected=yes
2633         continue
2634       fi
2635       ac_cv_prog_CC="cc"
2636       break
2637     fi
2638   done
2639   IFS="$ac_save_ifs"
2640 if test $ac_prog_rejected = yes; then
2641   # We found a bogon in the path, so make sure we never use it.
2642   set dummy $ac_cv_prog_CC
2643   shift
2644   if test $# -gt 0; then
2645     # We chose a different compiler from the bogus one.
2646     # However, it has the same basename, so the bogon will be chosen
2647     # first if we set CC to just the basename; use the full file name.
2648     shift
2649     set dummy "$ac_dir/$ac_word" "$@"
2650     shift
2651     ac_cv_prog_CC="$@"
2652   fi
2653 fi
2654 fi
2655 fi
2656 CC="$ac_cv_prog_CC"
2657 if test -n "$CC"; then
2658   echo "$ac_t""$CC" 1>&6
2659 else
2660   echo "$ac_t""no" 1>&6
2661 fi
2662
2663   if test -z "$CC"; then
2664     case "`uname -s`" in
2665     *win32* | *WIN32* | *CYGWIN*)
2666       # Extract the first word of "cl", so it can be a program name with args.
2667 set dummy cl; ac_word=$2
2668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2669 echo "configure:2670: checking for $ac_word" >&5
2670 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2671   echo $ac_n "(cached) $ac_c" 1>&6
2672 else
2673   if test -n "$CC"; then
2674   ac_cv_prog_CC="$CC" # Let the user override the test.
2675 else
2676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2677   ac_dummy="$PATH"
2678   for ac_dir in $ac_dummy; do
2679     test -z "$ac_dir" && ac_dir=.
2680     if test -f $ac_dir/$ac_word; then
2681       ac_cv_prog_CC="cl"
2682       break
2683     fi
2684   done
2685   IFS="$ac_save_ifs"
2686 fi
2687 fi
2688 CC="$ac_cv_prog_CC"
2689 if test -n "$CC"; then
2690   echo "$ac_t""$CC" 1>&6
2691 else
2692   echo "$ac_t""no" 1>&6
2693 fi
2694  ;;
2695     esac
2696   fi
2697   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2698 fi
2699
2700 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2701 echo "configure:2702: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2702
2703 ac_ext=c
2704 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2705 ac_cpp='$CPP $CPPFLAGS'
2706 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2707 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2708 cross_compiling=$ac_cv_prog_cc_cross
2709
2710 cat > conftest.$ac_ext << EOF
2711
2712 #line 2713 "configure"
2713 #include "confdefs.h"
2714
2715 main(){return(0);}
2716 EOF
2717 if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2718   ac_cv_prog_cc_works=yes
2719   # If we can't run a trivial program, we are probably using a cross compiler.
2720   if (./conftest; exit) 2>/dev/null; then
2721     ac_cv_prog_cc_cross=no
2722   else
2723     ac_cv_prog_cc_cross=yes
2724   fi
2725 else
2726   echo "configure: failed program was:" >&5
2727   cat conftest.$ac_ext >&5
2728   ac_cv_prog_cc_works=no
2729 fi
2730 rm -fr conftest*
2731 ac_ext=c
2732 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2733 ac_cpp='$CPP $CPPFLAGS'
2734 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2735 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2736 cross_compiling=$ac_cv_prog_cc_cross
2737
2738 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2739 if test $ac_cv_prog_cc_works = no; then
2740   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2741 fi
2742 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2743 echo "configure:2744: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2744 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2745 cross_compiling=$ac_cv_prog_cc_cross
2746
2747 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2748 echo "configure:2749: checking whether we are using GNU C" >&5
2749 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2750   echo $ac_n "(cached) $ac_c" 1>&6
2751 else
2752   cat > conftest.c <<EOF
2753 #ifdef __GNUC__
2754   yes;
2755 #endif
2756 EOF
2757 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2758   ac_cv_prog_gcc=yes
2759 else
2760   ac_cv_prog_gcc=no
2761 fi
2762 fi
2763
2764 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2765
2766 if test $ac_cv_prog_gcc = yes; then
2767   GCC=yes
2768 else
2769   GCC=
2770 fi
2771
2772 ac_test_CFLAGS="${CFLAGS+set}"
2773 ac_save_CFLAGS="$CFLAGS"
2774 CFLAGS=
2775 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2776 echo "configure:2777: checking whether ${CC-cc} accepts -g" >&5
2777 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2778   echo $ac_n "(cached) $ac_c" 1>&6
2779 else
2780   echo 'void f(){}' > conftest.c
2781 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2782   ac_cv_prog_cc_g=yes
2783 else
2784   ac_cv_prog_cc_g=no
2785 fi
2786 rm -f conftest*
2787
2788 fi
2789
2790 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2791 if test "$ac_test_CFLAGS" = set; then
2792   CFLAGS="$ac_save_CFLAGS"
2793 elif test $ac_cv_prog_cc_g = yes; then
2794   if test "$GCC" = yes; then
2795     CFLAGS="-g -O2"
2796   else
2797     CFLAGS="-g"
2798   fi
2799 else
2800   if test "$GCC" = yes; then
2801     CFLAGS="-O2"
2802   else
2803     CFLAGS=
2804   fi
2805 fi
2806
2807 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2808 if test "${with_gnu_ld+set}" = set; then
2809   withval="$with_gnu_ld"
2810   test "$withval" = no || with_gnu_ld=yes
2811 else
2812   with_gnu_ld=no
2813 fi
2814
2815 ac_prog=ld
2816 if test "$ac_cv_prog_gcc" = yes; then
2817   # Check if gcc -print-prog-name=ld gives a path.
2818   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2819 echo "configure:2820: checking for ld used by GCC" >&5
2820   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2821   case "$ac_prog" in
2822     # Accept absolute paths.
2823     [\\/]* | [A-Za-z]:[\\/]*)
2824       re_direlt='/[^/][^/]*/\.\./'
2825       # Canonicalize the path of ld
2826       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2827       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2828         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2829       done
2830       test -z "$LD" && LD="$ac_prog"
2831       ;;
2832   "")
2833     # If it fails, then pretend we aren't using GCC.
2834     ac_prog=ld
2835     ;;
2836   *)
2837     # If it is relative, then search for the first ld in PATH.
2838     with_gnu_ld=unknown
2839     ;;
2840   esac
2841 elif test "$with_gnu_ld" = yes; then
2842   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2843 echo "configure:2844: checking for GNU ld" >&5
2844 else
2845   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2846 echo "configure:2847: checking for non-GNU ld" >&5
2847 fi
2848 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2849   echo $ac_n "(cached) $ac_c" 1>&6
2850 else
2851   if test -z "$LD"; then
2852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2853   for ac_dir in $PATH; do
2854     test -z "$ac_dir" && ac_dir=.
2855     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2856       ac_cv_path_LD="$ac_dir/$ac_prog"
2857       # Check to see if the program is GNU ld.  I'd rather use --version,
2858       # but apparently some GNU ld's only accept -v.
2859       # Break only if it was the GNU/non-GNU ld that we prefer.
2860       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2861         test "$with_gnu_ld" != no && break
2862       else
2863         test "$with_gnu_ld" != yes && break
2864       fi
2865     fi
2866   done
2867   IFS="$ac_save_ifs"
2868 else
2869   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2870 fi
2871 fi
2872
2873 LD="$ac_cv_path_LD"
2874 if test -n "$LD"; then
2875   echo "$ac_t""$LD" 1>&6
2876 else
2877   echo "$ac_t""no" 1>&6
2878 fi
2879 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2880
2881 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2882 echo "configure:2883: checking if the linker ($LD) is GNU ld" >&5
2883 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2884   echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2887 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2888   ac_cv_prog_gnu_ld=yes
2889 else
2890   ac_cv_prog_gnu_ld=no
2891 fi
2892 fi
2893
2894 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2895
2896
2897 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2898 echo "configure:2899: checking for BSD-compatible nm" >&5
2899 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   if test -n "$NM"; then
2903   # Let the user override the test.
2904   ac_cv_path_NM="$NM"
2905 else
2906   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2907   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2908     test -z "$ac_dir" && ac_dir=.
2909     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2910       # Check to see if the nm accepts a BSD-compat flag.
2911       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2912       #   nm: unknown option "B" ignored
2913       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2914         ac_cv_path_NM="$ac_dir/nm -B"
2915         break
2916       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2917         ac_cv_path_NM="$ac_dir/nm -p"
2918         break
2919       else
2920         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2921         continue # so that we can try to find one that supports BSD flags
2922       fi
2923     fi
2924   done
2925   IFS="$ac_save_ifs"
2926   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2927 fi
2928 fi
2929
2930 NM="$ac_cv_path_NM"
2931 echo "$ac_t""$NM" 1>&6
2932
2933
2934 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2935 echo "configure:2936: checking whether ln -s works" >&5
2936 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2937   echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939   rm -f conftestdata
2940 if ln -s X conftestdata 2>/dev/null
2941 then
2942   rm -f conftestdata
2943   ac_cv_prog_LN_S="ln -s"
2944 else
2945   ac_cv_prog_LN_S=ln
2946 fi
2947 fi
2948 LN_S="$ac_cv_prog_LN_S"
2949 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2950   echo "$ac_t""yes" 1>&6
2951 else
2952   echo "$ac_t""no" 1>&6
2953 fi
2954
2955 if test $host != $build; then
2956   ac_tool_prefix=${host_alias}-
2957 else
2958   ac_tool_prefix=
2959 fi
2960
2961
2962 # Check for any special flags to pass to ltconfig.
2963 libtool_flags="--cache-file=$cache_file"
2964 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2965 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2966 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2967 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2968 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2969 libtool_flags="$libtool_flags --enable-dlopen"
2970 libtool_flags="$libtool_flags --enable-win32-dll"
2971 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2972 if test "${enable_libtool_lock+set}" = set; then
2973   enableval="$enable_libtool_lock"
2974   :
2975 fi
2976
2977 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2978 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2979
2980 # Some flags need to be propagated to the compiler or linker for good
2981 # libtool support.
2982 case "$host" in
2983 *-*-irix6*)
2984   # Find out which ABI we are using.
2985   echo '#line 2986 "configure"' > conftest.$ac_ext
2986   if { (eval echo configure:2987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2987     case "`/usr/bin/file conftest.o`" in
2988     *32-bit*)
2989       LD="${LD-ld} -32"
2990       ;;
2991     *N32*)
2992       LD="${LD-ld} -n32"
2993       ;;
2994     *64-bit*)
2995       LD="${LD-ld} -64"
2996       ;;
2997     esac
2998   fi
2999   rm -rf conftest*
3000   ;;
3001
3002 *-*-sco3.2v5*)
3003   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3004   SAVE_CFLAGS="$CFLAGS"
3005   CFLAGS="$CFLAGS -belf"
3006   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3007 echo "configure:3008: checking whether the C compiler needs -belf" >&5
3008 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3009   echo $ac_n "(cached) $ac_c" 1>&6
3010 else
3011   cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014
3015 int main() {
3016
3017 ; return 0; }
3018 EOF
3019 if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3020   rm -rf conftest*
3021   lt_cv_cc_needs_belf=yes
3022 else
3023   echo "configure: failed program was:" >&5
3024   cat conftest.$ac_ext >&5
3025   rm -rf conftest*
3026   lt_cv_cc_needs_belf=no
3027 fi
3028 rm -f conftest*
3029 fi
3030
3031 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3032   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3033     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3034     CFLAGS="$SAVE_CFLAGS"
3035   fi
3036   ;;
3037
3038 *-*-cygwin* | *-*-mingw*)
3039   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3040 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3042 echo "configure:3043: checking for $ac_word" >&5
3043 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3044   echo $ac_n "(cached) $ac_c" 1>&6
3045 else
3046   if test -n "$DLLTOOL"; then
3047   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3048 else
3049   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3050   ac_dummy="$PATH"
3051   for ac_dir in $ac_dummy; do
3052     test -z "$ac_dir" && ac_dir=.
3053     if test -f $ac_dir/$ac_word; then
3054       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3055       break
3056     fi
3057   done
3058   IFS="$ac_save_ifs"
3059 fi
3060 fi
3061 DLLTOOL="$ac_cv_prog_DLLTOOL"
3062 if test -n "$DLLTOOL"; then
3063   echo "$ac_t""$DLLTOOL" 1>&6
3064 else
3065   echo "$ac_t""no" 1>&6
3066 fi
3067
3068
3069 if test -z "$ac_cv_prog_DLLTOOL"; then
3070 if test -n "$ac_tool_prefix"; then
3071   # Extract the first word of "dlltool", so it can be a program name with args.
3072 set dummy dlltool; ac_word=$2
3073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3074 echo "configure:3075: checking for $ac_word" >&5
3075 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3076   echo $ac_n "(cached) $ac_c" 1>&6
3077 else
3078   if test -n "$DLLTOOL"; then
3079   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3080 else
3081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3082   ac_dummy="$PATH"
3083   for ac_dir in $ac_dummy; do
3084     test -z "$ac_dir" && ac_dir=.
3085     if test -f $ac_dir/$ac_word; then
3086       ac_cv_prog_DLLTOOL="dlltool"
3087       break
3088     fi
3089   done
3090   IFS="$ac_save_ifs"
3091   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3092 fi
3093 fi
3094 DLLTOOL="$ac_cv_prog_DLLTOOL"
3095 if test -n "$DLLTOOL"; then
3096   echo "$ac_t""$DLLTOOL" 1>&6
3097 else
3098   echo "$ac_t""no" 1>&6
3099 fi
3100
3101 else
3102   DLLTOOL="false"
3103 fi
3104 fi
3105
3106   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3107 set dummy ${ac_tool_prefix}as; ac_word=$2
3108 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3109 echo "configure:3110: checking for $ac_word" >&5
3110 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   if test -n "$AS"; then
3114   ac_cv_prog_AS="$AS" # Let the user override the test.
3115 else
3116   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3117   ac_dummy="$PATH"
3118   for ac_dir in $ac_dummy; do
3119     test -z "$ac_dir" && ac_dir=.
3120     if test -f $ac_dir/$ac_word; then
3121       ac_cv_prog_AS="${ac_tool_prefix}as"
3122       break
3123     fi
3124   done
3125   IFS="$ac_save_ifs"
3126 fi
3127 fi
3128 AS="$ac_cv_prog_AS"
3129 if test -n "$AS"; then
3130   echo "$ac_t""$AS" 1>&6
3131 else
3132   echo "$ac_t""no" 1>&6
3133 fi
3134
3135
3136 if test -z "$ac_cv_prog_AS"; then
3137 if test -n "$ac_tool_prefix"; then
3138   # Extract the first word of "as", so it can be a program name with args.
3139 set dummy as; ac_word=$2
3140 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3141 echo "configure:3142: checking for $ac_word" >&5
3142 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3143   echo $ac_n "(cached) $ac_c" 1>&6
3144 else
3145   if test -n "$AS"; then
3146   ac_cv_prog_AS="$AS" # Let the user override the test.
3147 else
3148   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3149   ac_dummy="$PATH"
3150   for ac_dir in $ac_dummy; do
3151     test -z "$ac_dir" && ac_dir=.
3152     if test -f $ac_dir/$ac_word; then
3153       ac_cv_prog_AS="as"
3154       break
3155     fi
3156   done
3157   IFS="$ac_save_ifs"
3158   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3159 fi
3160 fi
3161 AS="$ac_cv_prog_AS"
3162 if test -n "$AS"; then
3163   echo "$ac_t""$AS" 1>&6
3164 else
3165   echo "$ac_t""no" 1>&6
3166 fi
3167
3168 else
3169   AS="false"
3170 fi
3171 fi
3172
3173   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3174 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3176 echo "configure:3177: checking for $ac_word" >&5
3177 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   if test -n "$OBJDUMP"; then
3181   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3182 else
3183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3184   ac_dummy="$PATH"
3185   for ac_dir in $ac_dummy; do
3186     test -z "$ac_dir" && ac_dir=.
3187     if test -f $ac_dir/$ac_word; then
3188       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3189       break
3190     fi
3191   done
3192   IFS="$ac_save_ifs"
3193 fi
3194 fi
3195 OBJDUMP="$ac_cv_prog_OBJDUMP"
3196 if test -n "$OBJDUMP"; then
3197   echo "$ac_t""$OBJDUMP" 1>&6
3198 else
3199   echo "$ac_t""no" 1>&6
3200 fi
3201
3202
3203 if test -z "$ac_cv_prog_OBJDUMP"; then
3204 if test -n "$ac_tool_prefix"; then
3205   # Extract the first word of "objdump", so it can be a program name with args.
3206 set dummy objdump; ac_word=$2
3207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3208 echo "configure:3209: checking for $ac_word" >&5
3209 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   if test -n "$OBJDUMP"; then
3213   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3214 else
3215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3216   ac_dummy="$PATH"
3217   for ac_dir in $ac_dummy; do
3218     test -z "$ac_dir" && ac_dir=.
3219     if test -f $ac_dir/$ac_word; then
3220       ac_cv_prog_OBJDUMP="objdump"
3221       break
3222     fi
3223   done
3224   IFS="$ac_save_ifs"
3225   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3226 fi
3227 fi
3228 OBJDUMP="$ac_cv_prog_OBJDUMP"
3229 if test -n "$OBJDUMP"; then
3230   echo "$ac_t""$OBJDUMP" 1>&6
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234
3235 else
3236   OBJDUMP="false"
3237 fi
3238 fi
3239
3240   ;;
3241
3242 esac
3243
3244
3245 # Save cache, so that ltconfig can load it
3246
3247
3248 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3249 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3250 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3251 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3252 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3253 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3254 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3255 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3256
3257 # Reload cache, that may have been modified by ltconfig
3258
3259
3260 # This can be used to rebuild libtool when needed
3261 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3262
3263 # Always use our own libtool.
3264 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3265
3266 # Redirect the config.log output again, so that the ltconfig log is not
3267 # clobbered by the next message.
3268 exec 5>>./config.log
3269
3270
3271 for ac_prog in mawk gawk nawk awk
3272 do
3273 # Extract the first word of "$ac_prog", so it can be a program name with args.
3274 set dummy $ac_prog; ac_word=$2
3275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3276 echo "configure:3277: checking for $ac_word" >&5
3277 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3278   echo $ac_n "(cached) $ac_c" 1>&6
3279 else
3280   if test -n "$AWK"; then
3281   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3282 else
3283   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3284   ac_dummy="$PATH"
3285   for ac_dir in $ac_dummy; do
3286     test -z "$ac_dir" && ac_dir=.
3287     if test -f $ac_dir/$ac_word; then
3288       ac_cv_prog_AWK="$ac_prog"
3289       break
3290     fi
3291   done
3292   IFS="$ac_save_ifs"
3293 fi
3294 fi
3295 AWK="$ac_cv_prog_AWK"
3296 if test -n "$AWK"; then
3297   echo "$ac_t""$AWK" 1>&6
3298 else
3299   echo "$ac_t""no" 1>&6
3300 fi
3301
3302 test -n "$AWK" && break
3303 done
3304
3305 # test for ln hardlink support
3306 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3307 echo "configure:3308: checking whether ln works" >&5
3308 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   rm -f conftest.src conftest.dst
3312 echo "conftest" > conftest.src
3313 if ln conftest.src conftest.dst 2>/dev/null
3314 then
3315   ol_cv_prog_LN_H="ln"
3316 else
3317   ol_cv_prog_LN_H="cp"
3318 fi
3319 rm -f conftest.src conftest.dst
3320
3321 fi
3322 LN_H="$ol_cv_prog_LN_H"
3323 if test "$ol_cv_prog_LN_H" = "ln"; then
3324         echo "$ac_t""yes" 1>&6
3325 else
3326         echo "$ac_t""no" 1>&6
3327 fi
3328
3329 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3330 echo "configure:3331: checking whether ln -s works" >&5
3331 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3332   echo $ac_n "(cached) $ac_c" 1>&6
3333 else
3334   rm -f conftestdata
3335 if ln -s X conftestdata 2>/dev/null
3336 then
3337   rm -f conftestdata
3338   ac_cv_prog_LN_S="ln -s"
3339 else
3340   ac_cv_prog_LN_S=ln
3341 fi
3342 fi
3343 LN_S="$ac_cv_prog_LN_S"
3344 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3345   echo "$ac_t""yes" 1>&6
3346 else
3347   echo "$ac_t""no" 1>&6
3348 fi
3349
3350
3351 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3352         LN_S="$LN_H"
3353 fi
3354
3355 # Extract the first word of "sendmail", so it can be a program name with args.
3356 set dummy sendmail; ac_word=$2
3357 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3358 echo "configure:3359: checking for $ac_word" >&5
3359 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3360   echo $ac_n "(cached) $ac_c" 1>&6
3361 else
3362   case "$SENDMAIL" in
3363   /*)
3364   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3365   ;;
3366   ?:/*)                  
3367   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3368   ;;
3369   *)
3370   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3371   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3372   for ac_dir in $ac_dummy; do 
3373     test -z "$ac_dir" && ac_dir=.
3374     if test -f $ac_dir/$ac_word; then
3375       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3376       break
3377     fi
3378   done
3379   IFS="$ac_save_ifs"
3380   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3381   ;;
3382 esac
3383 fi
3384 SENDMAIL="$ac_cv_path_SENDMAIL"
3385 if test -n "$SENDMAIL"; then
3386   echo "$ac_t""$SENDMAIL" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 # Extract the first word of "vi", so it can be a program name with args.
3392 set dummy vi; ac_word=$2
3393 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3394 echo "configure:3395: checking for $ac_word" >&5
3395 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3396   echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398   case "$EDITOR" in
3399   /*)
3400   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3401   ;;
3402   ?:/*)                  
3403   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3404   ;;
3405   *)
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_dummy="$PATH:/usr/ucb"
3408   for ac_dir in $ac_dummy; do 
3409     test -z "$ac_dir" && ac_dir=.
3410     if test -f $ac_dir/$ac_word; then
3411       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3417   ;;
3418 esac
3419 fi
3420 EDITOR="$ac_cv_path_EDITOR"
3421 if test -n "$EDITOR"; then
3422   echo "$ac_t""$EDITOR" 1>&6
3423 else
3424   echo "$ac_t""no" 1>&6
3425 fi
3426
3427 # Extract the first word of "finger", so it can be a program name with args.
3428 set dummy finger; ac_word=$2
3429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3430 echo "configure:3431: checking for $ac_word" >&5
3431 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3432   echo $ac_n "(cached) $ac_c" 1>&6
3433 else
3434   case "$FINGER" in
3435   /*)
3436   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3437   ;;
3438   ?:/*)                  
3439   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3440   ;;
3441   *)
3442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3443   ac_dummy="$PATH:/usr/ucb"
3444   for ac_dir in $ac_dummy; do 
3445     test -z "$ac_dir" && ac_dir=.
3446     if test -f $ac_dir/$ac_word; then
3447       ac_cv_path_FINGER="$ac_dir/$ac_word"
3448       break
3449     fi
3450   done
3451   IFS="$ac_save_ifs"
3452   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3453   ;;
3454 esac
3455 fi
3456 FINGER="$ac_cv_path_FINGER"
3457 if test -n "$FINGER"; then
3458   echo "$ac_t""$FINGER" 1>&6
3459 else
3460   echo "$ac_t""no" 1>&6
3461 fi
3462
3463
3464 ol_link_perl=no
3465 if test $ol_enable_perl != no ; then
3466         # Extract the first word of "perl", so it can be a program name with args.
3467 set dummy perl; ac_word=$2
3468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3469 echo "configure:3470: checking for $ac_word" >&5
3470 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3471   echo $ac_n "(cached) $ac_c" 1>&6
3472 else
3473   case "$PERLBIN" in
3474   /*)
3475   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3476   ;;
3477   ?:/*)                  
3478   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3479   ;;
3480   *)
3481   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3482   ac_dummy="$PATH"
3483   for ac_dir in $ac_dummy; do 
3484     test -z "$ac_dir" && ac_dir=.
3485     if test -f $ac_dir/$ac_word; then
3486       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3487       break
3488     fi
3489   done
3490   IFS="$ac_save_ifs"
3491   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3492   ;;
3493 esac
3494 fi
3495 PERLBIN="$ac_cv_path_PERLBIN"
3496 if test -n "$PERLBIN"; then
3497   echo "$ac_t""$PERLBIN" 1>&6
3498 else
3499   echo "$ac_t""no" 1>&6
3500 fi
3501
3502
3503         if test "no$PERLBIN" = "no" ; then
3504                 if test $ol_enable_perl = yes ; then
3505                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3506                 fi
3507
3508         else
3509                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3510                 if test x"$ol_with_perl_module" == "xstatic" ; then
3511                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3512                 else
3513                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3514                 fi
3515                                 ol_link_perl=yes
3516         fi
3517 fi
3518
3519 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3520 echo "configure:3521: checking how to run the C preprocessor" >&5
3521 # On Suns, sometimes $CPP names a directory.
3522 if test -n "$CPP" && test -d "$CPP"; then
3523   CPP=
3524 fi
3525 if test -z "$CPP"; then
3526 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529     # This must be in double quotes, not single quotes, because CPP may get
3530   # substituted into the Makefile and "${CC-cc}" will confuse make.
3531   CPP="${CC-cc} -E"
3532   # On the NeXT, cc -E runs the code through the compiler's parser,
3533   # not just through cpp.
3534   cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 #include <assert.h>
3538 Syntax Error
3539 EOF
3540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3541 { (eval echo configure:3542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3543 if test -z "$ac_err"; then
3544   :
3545 else
3546   echo "$ac_err" >&5
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   CPP="${CC-cc} -E -traditional-cpp"
3551   cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 #include <assert.h>
3555 Syntax Error
3556 EOF
3557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3558 { (eval echo configure:3559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3560 if test -z "$ac_err"; then
3561   :
3562 else
3563   echo "$ac_err" >&5
3564   echo "configure: failed program was:" >&5
3565   cat conftest.$ac_ext >&5
3566   rm -rf conftest*
3567   CPP="${CC-cc} -nologo -E"
3568   cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <assert.h>
3572 Syntax Error
3573 EOF
3574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3575 { (eval echo configure:3576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3577 if test -z "$ac_err"; then
3578   :
3579 else
3580   echo "$ac_err" >&5
3581   echo "configure: failed program was:" >&5
3582   cat conftest.$ac_ext >&5
3583   rm -rf conftest*
3584   CPP=/lib/cpp
3585 fi
3586 rm -f conftest*
3587 fi
3588 rm -f conftest*
3589 fi
3590 rm -f conftest*
3591   ac_cv_prog_CPP="$CPP"
3592 fi
3593   CPP="$ac_cv_prog_CPP"
3594 else
3595   ac_cv_prog_CPP="$CPP"
3596 fi
3597 echo "$ac_t""$CPP" 1>&6
3598
3599
3600 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3601         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3602
3603 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3604         echo "configure: warning: programs compiled here do run here..." 1>&2
3605         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3606
3607 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3608         echo "configure: warning: programs compiled here do not run here..." 1>&2
3609         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3610 fi
3611
3612 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3613 echo "configure:3614: checking for AIX" >&5
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #ifdef _AIX
3618   yes
3619 #endif
3620
3621 EOF
3622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623   egrep "yes" >/dev/null 2>&1; then
3624   rm -rf conftest*
3625   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3626 #define _ALL_SOURCE 1
3627 EOF
3628
3629 else
3630   rm -rf conftest*
3631   echo "$ac_t""no" 1>&6
3632 fi
3633 rm -f conftest*
3634
3635
3636 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3637 echo "configure:3638: checking for POSIXized ISC" >&5
3638 if test -d /etc/conf/kconfig.d &&
3639   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3640 then
3641   echo "$ac_t""yes" 1>&6
3642   ISC=yes # If later tests want to check for ISC.
3643   cat >> confdefs.h <<\EOF
3644 #define _POSIX_SOURCE 1
3645 EOF
3646
3647   if test "$GCC" = yes; then
3648     CC="$CC -posix"
3649   else
3650     CC="$CC -Xp"
3651   fi
3652 else
3653   echo "$ac_t""no" 1>&6
3654   ISC=
3655 fi
3656
3657 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3658 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3659 echo "configure:3660: checking for minix/config.h" >&5
3660 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3661   echo $ac_n "(cached) $ac_c" 1>&6
3662 else
3663   cat > conftest.$ac_ext <<EOF
3664 #line 3665 "configure"
3665 #include "confdefs.h"
3666 #include <minix/config.h>
3667 EOF
3668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3669 { (eval echo configure:3670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3671 if test -z "$ac_err"; then
3672   rm -rf conftest*
3673   eval "ac_cv_header_$ac_safe=yes"
3674 else
3675   echo "$ac_err" >&5
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -rf conftest*
3679   eval "ac_cv_header_$ac_safe=no"
3680 fi
3681 rm -f conftest*
3682 fi
3683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3684   echo "$ac_t""yes" 1>&6
3685   MINIX=yes
3686 else
3687   echo "$ac_t""no" 1>&6
3688 MINIX=
3689 fi
3690
3691 if test "$MINIX" = yes; then
3692   cat >> confdefs.h <<\EOF
3693 #define _POSIX_SOURCE 1
3694 EOF
3695
3696   cat >> confdefs.h <<\EOF
3697 #define _POSIX_1_SOURCE 2
3698 EOF
3699
3700   cat >> confdefs.h <<\EOF
3701 #define _MINIX 1
3702 EOF
3703
3704 fi
3705
3706
3707 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3708 echo "configure:3709: checking for Cygwin environment" >&5
3709 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3710   echo $ac_n "(cached) $ac_c" 1>&6
3711 else
3712   cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715
3716 int main() {
3717
3718 #ifndef __CYGWIN__
3719 #define __CYGWIN__ __CYGWIN32__
3720 #endif
3721 return __CYGWIN__;
3722 ; return 0; }
3723 EOF
3724 if { (eval echo configure:3725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3725   rm -rf conftest*
3726   ac_cv_cygwin=yes
3727 else
3728   echo "configure: failed program was:" >&5
3729   cat conftest.$ac_ext >&5
3730   rm -rf conftest*
3731   ac_cv_cygwin=no
3732 fi
3733 rm -f conftest*
3734 fi
3735
3736 echo "$ac_t""$ac_cv_cygwin" 1>&6
3737 CYGWIN=
3738 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3739 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3740 echo "configure:3741: checking for mingw32 environment" >&5
3741 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3742   echo $ac_n "(cached) $ac_c" 1>&6
3743 else
3744   cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747
3748 int main() {
3749 return __MINGW32__;
3750 ; return 0; }
3751 EOF
3752 if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3753   rm -rf conftest*
3754   ac_cv_mingw32=yes
3755 else
3756   echo "configure: failed program was:" >&5
3757   cat conftest.$ac_ext >&5
3758   rm -rf conftest*
3759   ac_cv_mingw32=no
3760 fi
3761 rm -f conftest*
3762 fi
3763
3764 echo "$ac_t""$ac_cv_mingw32" 1>&6
3765 MINGW32=
3766 test "$ac_cv_mingw32" = yes && MINGW32=yes
3767 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3768 echo "configure:3769: checking for EMX OS/2 environment" >&5
3769 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   cat > conftest.$ac_ext <<EOF
3773 #line 3774 "configure"
3774 #include "confdefs.h"
3775
3776 int main() {
3777 return __EMX__;
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3781   rm -rf conftest*
3782   ac_cv_emxos2=yes
3783 else
3784   echo "configure: failed program was:" >&5
3785   cat conftest.$ac_ext >&5
3786   rm -rf conftest*
3787   ac_cv_emxos2=no
3788 fi
3789 rm -f conftest*
3790 fi
3791
3792 echo "$ac_t""$ac_cv_emxos2" 1>&6
3793 EMXOS2=
3794 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3795
3796
3797
3798 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3799 echo "configure:3800: checking for executable suffix" >&5
3800 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3801   echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3804   ac_cv_exeext=.exe
3805 else
3806   rm -f conftest*
3807   echo 'int main () { return 0; }' > conftest.$ac_ext
3808   ac_cv_exeext=
3809   if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3810     for file in conftest.*; do
3811       case $file in
3812       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3813       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3814       esac
3815     done
3816   else
3817     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3818   fi
3819   rm -f conftest*
3820   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3821 fi
3822 fi
3823
3824 EXEEXT=""
3825 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3826 echo "$ac_t""${ac_cv_exeext}" 1>&6
3827 ac_exeext=$EXEEXT
3828
3829 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3830 echo "configure:3831: checking for object suffix" >&5
3831 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3832   echo $ac_n "(cached) $ac_c" 1>&6
3833 else
3834   rm -f conftest*
3835 echo 'int i = 1;' > conftest.$ac_ext
3836 if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3837   for ac_file in conftest.*; do
3838     case $ac_file in
3839     *.c) ;;
3840     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3841     esac
3842   done
3843 else
3844   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3845 fi
3846 rm -f conftest*
3847 fi
3848
3849 echo "$ac_t""$ac_cv_objext" 1>&6
3850 OBJEXT=$ac_cv_objext
3851 ac_objext=$ac_cv_objext
3852
3853
3854 cat >> confdefs.h <<EOF
3855 #define EXEEXT "${EXEEXT}"
3856 EOF
3857
3858
3859 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3860 echo "configure:3861: checking for be_app in -lbe" >&5
3861 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3862 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   ac_save_LIBS="$LIBS"
3866 LIBS="-lbe -lroot -lnet $LIBS"
3867 cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870 /* Override any gcc2 internal prototype to avoid an error.  */
3871 /* We use char because int might match the return type of a gcc2
3872     builtin and then its argument prototype would still apply.  */
3873 char be_app();
3874
3875 int main() {
3876 be_app()
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=yes"
3882 else
3883   echo "configure: failed program was:" >&5
3884   cat conftest.$ac_ext >&5
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=no"
3887 fi
3888 rm -f conftest*
3889 LIBS="$ac_save_LIBS"
3890
3891 fi
3892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3893   echo "$ac_t""yes" 1>&6
3894   LIBS="$LIBS -lbe -lroot -lnet"
3895 else
3896   echo "$ac_t""no" 1>&6
3897 :
3898 fi
3899
3900
3901
3902
3903
3904 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3905 echo "configure:3906: checking for ${CC-cc} option to accept ANSI C" >&5
3906 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   am_cv_prog_cc_stdc=no
3910 ac_save_CC="$CC"
3911 # Don't try gcc -ansi; that turns off useful extensions and
3912 # breaks some systems' header files.
3913 # AIX                   -qlanglvl=ansi
3914 # Ultrix and OSF/1      -std1
3915 # HP-UX 10.20 and later -Ae
3916 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3917 # SVR4                  -Xc -D__EXTENSIONS__
3918 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3919 do
3920   CC="$ac_save_CC $ac_arg"
3921   cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3924 #include <stdarg.h>
3925 #include <stdio.h>
3926 #include <sys/types.h>
3927 #include <sys/stat.h>
3928 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3929 struct buf { int x; };
3930 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3931 static char *e (p, i)
3932      char **p;
3933      int i;
3934 {
3935   return p[i];
3936 }
3937 static char *f (char * (*g) (char **, int), char **p, ...)
3938 {
3939   char *s;
3940   va_list v;
3941   va_start (v,p);
3942   s = g (p, va_arg (v,int));
3943   va_end (v);
3944   return s;
3945 }
3946 int test (int i, double x);
3947 struct s1 {int (*f) (int a);};
3948 struct s2 {int (*f) (double a);};
3949 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3950 int argc;
3951 char **argv;
3952
3953 int main() {
3954
3955 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3956
3957 ; return 0; }
3958 EOF
3959 if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3960   rm -rf conftest*
3961   am_cv_prog_cc_stdc="$ac_arg"; break
3962 else
3963   echo "configure: failed program was:" >&5
3964   cat conftest.$ac_ext >&5
3965 fi
3966 rm -f conftest*
3967 done
3968 CC="$ac_save_CC"
3969
3970 fi
3971
3972 if test -z "$am_cv_prog_cc_stdc"; then
3973   echo "$ac_t""none needed" 1>&6
3974 else
3975   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3976 fi
3977 case "x$am_cv_prog_cc_stdc" in
3978   x|xno) ;;
3979   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3980 esac
3981
3982 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3983         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3984 fi
3985
3986 # test for make depend flag
3987 OL_MKDEP=
3988 OL_MKDEP_FLAGS=
3989 if test -z "${MKDEP}"; then
3990         OL_MKDEP="${CC-cc}"
3991         if test -z "${MKDEP_FLAGS}"; then
3992                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3993 echo "configure:3994: checking for ${OL_MKDEP} depend flag" >&5
3994 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3995   echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997   
3998                         ol_cv_mkdep=no
3999                         for flag in "-M" "-xM"; do
4000                                 cat > conftest.c <<EOF
4001  noCode;
4002 EOF
4003                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4004                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4005                                 then
4006                                         if test ! -f conftest."${ac_object}" ; then
4007                                                 ol_cv_mkdep=$flag
4008                                                 OL_MKDEP_FLAGS="$flag"
4009                                                 break
4010                                         fi
4011                                 fi
4012                         done
4013                         rm -f conftest*
4014                 
4015 fi
4016
4017 echo "$ac_t""$ol_cv_mkdep" 1>&6
4018         else
4019                 cc_cv_mkdep=yes
4020                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4021         fi
4022 else
4023         cc_cv_mkdep=yes
4024         OL_MKDEP="${MKDEP}"
4025         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4026 fi
4027
4028
4029
4030 if test "${ol_cv_mkdep}" = no ; then
4031         # this will soon become an error
4032         echo "configure: warning: do not know how to generate dependencies" 1>&2
4033 fi
4034
4035 ol_link_modules=no
4036 if test $ol_enable_modules != no ; then
4037         for ac_hdr in ltdl.h
4038 do
4039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4041 echo "configure:4042: checking for $ac_hdr" >&5
4042 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4043   echo $ac_n "(cached) $ac_c" 1>&6
4044 else
4045   cat > conftest.$ac_ext <<EOF
4046 #line 4047 "configure"
4047 #include "confdefs.h"
4048 #include <$ac_hdr>
4049 EOF
4050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4051 { (eval echo configure:4052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4053 if test -z "$ac_err"; then
4054   rm -rf conftest*
4055   eval "ac_cv_header_$ac_safe=yes"
4056 else
4057   echo "$ac_err" >&5
4058   echo "configure: failed program was:" >&5
4059   cat conftest.$ac_ext >&5
4060   rm -rf conftest*
4061   eval "ac_cv_header_$ac_safe=no"
4062 fi
4063 rm -f conftest*
4064 fi
4065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4066   echo "$ac_t""yes" 1>&6
4067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4068   cat >> confdefs.h <<EOF
4069 #define $ac_tr_hdr 1
4070 EOF
4071  
4072 else
4073   echo "$ac_t""no" 1>&6
4074 fi
4075 done
4076
4077
4078         if test $ac_cv_header_ltdl_h = no ; then
4079                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4080         fi
4081
4082         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4083 echo "configure:4084: checking for lt_dlinit in -lltdl" >&5
4084 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   ac_save_LIBS="$LIBS"
4089 LIBS="-lltdl  $LIBS"
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 /* We use char because int might match the return type of a gcc2
4095     builtin and then its argument prototype would still apply.  */
4096 char lt_dlinit();
4097
4098 int main() {
4099 lt_dlinit()
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103   rm -rf conftest*
4104   eval "ac_cv_lib_$ac_lib_var=yes"
4105 else
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   eval "ac_cv_lib_$ac_lib_var=no"
4110 fi
4111 rm -f conftest*
4112 LIBS="$ac_save_LIBS"
4113
4114 fi
4115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4116   echo "$ac_t""yes" 1>&6
4117   
4118             MODULES_LIBS=-lltdl
4119             cat >> confdefs.h <<\EOF
4120 #define HAVE_LIBLTDL 1
4121 EOF
4122
4123         
4124 else
4125   echo "$ac_t""no" 1>&6
4126 fi
4127
4128
4129         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4130                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4131         fi
4132         ol_link_modules=yes
4133 else
4134         ol_with_bdb2_module=static
4135         ol_with_ldap_module=static
4136         ol_with_ldbm_module=static
4137         ol_with_passwd_module=static
4138         ol_with_perl_module=static
4139         ol_with_shell_module=static
4140         ol_with_tcl_module=static
4141 fi
4142
4143 # test for EBCDIC
4144 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4145 echo "configure:4146: checking for EBCDIC" >&5
4146 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4147   echo $ac_n "(cached) $ac_c" 1>&6
4148 else
4149   
4150         cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153
4154 #if !('M' == 0xd4)
4155 #include <__ASCII__/generate_error.h>
4156 #endif
4157
4158 EOF
4159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4160 { (eval echo configure:4161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4162 if test -z "$ac_err"; then
4163   rm -rf conftest*
4164   ol_cv_cpp_ebcdic=yes
4165 else
4166   echo "$ac_err" >&5
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   ol_cv_cpp_ebcdic=no
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4176 if test $ol_cv_cpp_ebcdic = yes ; then
4177         cat >> confdefs.h <<\EOF
4178 #define HAVE_EBCDIC 1
4179 EOF
4180
4181 fi
4182
4183 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4184 echo "configure:4185: checking for ANSI C header files" >&5
4185 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4186   echo $ac_n "(cached) $ac_c" 1>&6
4187 else
4188   cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <stdlib.h>
4192 #include <stdarg.h>
4193 #include <string.h>
4194 #include <float.h>
4195 EOF
4196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4197 { (eval echo configure:4198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4199 if test -z "$ac_err"; then
4200   rm -rf conftest*
4201   ol_cv_header_stdc=yes
4202 else
4203   echo "$ac_err" >&5
4204   echo "configure: failed program was:" >&5
4205   cat conftest.$ac_ext >&5
4206   rm -rf conftest*
4207   ol_cv_header_stdc=no
4208 fi
4209 rm -f conftest*
4210
4211 if test $ol_cv_header_stdc = yes; then
4212   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4213 cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <string.h>
4217 EOF
4218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4219   egrep "memchr" >/dev/null 2>&1; then
4220   :
4221 else
4222   rm -rf conftest*
4223   ol_cv_header_stdc=no
4224 fi
4225 rm -f conftest*
4226
4227 fi
4228
4229 if test $ol_cv_header_stdc = yes; then
4230   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4231 cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4234 #include <stdlib.h>
4235 EOF
4236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4237   egrep "free" >/dev/null 2>&1; then
4238   :
4239 else
4240   rm -rf conftest*
4241   ol_cv_header_stdc=no
4242 fi
4243 rm -f conftest*
4244
4245 fi
4246
4247 if test $ol_cv_header_stdc = yes; then
4248   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4249 if test "$cross_compiling" = yes; then
4250   :
4251 else
4252   cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 #include <ctype.h>
4256 #ifndef HAVE_EBCDIC
4257 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4258 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4259 #else
4260 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4261                 || ('j' <= (c) && (c) <= 'r') \
4262                 || ('s' <= (c) && (c) <= 'z'))
4263 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4264 #endif
4265 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4266 int main () { int i; for (i = 0; i < 256; i++)
4267 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4268 exit (0); }
4269
4270 EOF
4271 if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4272 then
4273   :
4274 else
4275   echo "configure: failed program was:" >&5
4276   cat conftest.$ac_ext >&5
4277   rm -fr conftest*
4278   ol_cv_header_stdc=no
4279 fi
4280 rm -fr conftest*
4281 fi
4282
4283 fi
4284 fi
4285
4286 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4287 if test $ol_cv_header_stdc = yes; then
4288   cat >> confdefs.h <<\EOF
4289 #define STDC_HEADERS 1
4290 EOF
4291
4292 fi
4293 ac_cv_header_stdc=disable
4294
4295
4296 if test $ol_cv_header_stdc != yes; then
4297         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4298 fi
4299
4300 ac_header_dirent=no
4301 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4302 do
4303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4304 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4305 echo "configure:4306: checking for $ac_hdr that defines DIR" >&5
4306 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4307   echo $ac_n "(cached) $ac_c" 1>&6
4308 else
4309   cat > conftest.$ac_ext <<EOF
4310 #line 4311 "configure"
4311 #include "confdefs.h"
4312 #include <sys/types.h>
4313 #include <$ac_hdr>
4314 int main() {
4315 DIR *dirp = 0;
4316 ; return 0; }
4317 EOF
4318 if { (eval echo configure:4319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4319   rm -rf conftest*
4320   eval "ac_cv_header_dirent_$ac_safe=yes"
4321 else
4322   echo "configure: failed program was:" >&5
4323   cat conftest.$ac_ext >&5
4324   rm -rf conftest*
4325   eval "ac_cv_header_dirent_$ac_safe=no"
4326 fi
4327 rm -f conftest*
4328 fi
4329 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4330   echo "$ac_t""yes" 1>&6
4331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4332   cat >> confdefs.h <<EOF
4333 #define $ac_tr_hdr 1
4334 EOF
4335  ac_header_dirent=$ac_hdr; break
4336 else
4337   echo "$ac_t""no" 1>&6
4338 fi
4339 done
4340 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4341 if test $ac_header_dirent = dirent.h; then
4342 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4343 echo "configure:4344: checking for opendir in -ldir" >&5
4344 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4346   echo $ac_n "(cached) $ac_c" 1>&6
4347 else
4348   ac_save_LIBS="$LIBS"
4349 LIBS="-ldir  $LIBS"
4350 cat > conftest.$ac_ext <<EOF
4351 #line 4352 "configure"
4352 #include "confdefs.h"
4353 /* Override any gcc2 internal prototype to avoid an error.  */
4354 /* We use char because int might match the return type of a gcc2
4355     builtin and then its argument prototype would still apply.  */
4356 char opendir();
4357
4358 int main() {
4359 opendir()
4360 ; return 0; }
4361 EOF
4362 if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4363   rm -rf conftest*
4364   eval "ac_cv_lib_$ac_lib_var=yes"
4365 else
4366   echo "configure: failed program was:" >&5
4367   cat conftest.$ac_ext >&5
4368   rm -rf conftest*
4369   eval "ac_cv_lib_$ac_lib_var=no"
4370 fi
4371 rm -f conftest*
4372 LIBS="$ac_save_LIBS"
4373
4374 fi
4375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4376   echo "$ac_t""yes" 1>&6
4377   LIBS="$LIBS -ldir"
4378 else
4379   echo "$ac_t""no" 1>&6
4380 fi
4381
4382 else
4383 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4384 echo "configure:4385: checking for opendir in -lx" >&5
4385 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4387   echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389   ac_save_LIBS="$LIBS"
4390 LIBS="-lx  $LIBS"
4391 cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 /* Override any gcc2 internal prototype to avoid an error.  */
4395 /* We use char because int might match the return type of a gcc2
4396     builtin and then its argument prototype would still apply.  */
4397 char opendir();
4398
4399 int main() {
4400 opendir()
4401 ; return 0; }
4402 EOF
4403 if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4404   rm -rf conftest*
4405   eval "ac_cv_lib_$ac_lib_var=yes"
4406 else
4407   echo "configure: failed program was:" >&5
4408   cat conftest.$ac_ext >&5
4409   rm -rf conftest*
4410   eval "ac_cv_lib_$ac_lib_var=no"
4411 fi
4412 rm -f conftest*
4413 LIBS="$ac_save_LIBS"
4414
4415 fi
4416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4417   echo "$ac_t""yes" 1>&6
4418   LIBS="$LIBS -lx"
4419 else
4420   echo "$ac_t""no" 1>&6
4421 fi
4422
4423 fi
4424
4425 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4426 echo "configure:4427: checking for sys/wait.h that is POSIX.1 compatible" >&5
4427 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4428   echo $ac_n "(cached) $ac_c" 1>&6
4429 else
4430   cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433 #include <sys/types.h>
4434 #include <sys/wait.h>
4435 #ifndef WEXITSTATUS
4436 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4437 #endif
4438 #ifndef WIFEXITED
4439 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4440 #endif
4441 int main() {
4442 int s;
4443 wait (&s);
4444 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4445 ; return 0; }
4446 EOF
4447 if { (eval echo configure:4448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4448   rm -rf conftest*
4449   ac_cv_header_sys_wait_h=yes
4450 else
4451   echo "configure: failed program was:" >&5
4452   cat conftest.$ac_ext >&5
4453   rm -rf conftest*
4454   ac_cv_header_sys_wait_h=no
4455 fi
4456 rm -f conftest*
4457 fi
4458
4459 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4460 if test $ac_cv_header_sys_wait_h = yes; then
4461   cat >> confdefs.h <<\EOF
4462 #define HAVE_SYS_WAIT_H 1
4463 EOF
4464
4465 fi
4466
4467 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4468 echo "configure:4469: checking POSIX termios" >&5
4469 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 #include <sys/types.h>
4476 #include <unistd.h>
4477 #include <termios.h>
4478 int main() {
4479 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4480    tcgetattr(0, 0);
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484   rm -rf conftest*
4485   am_cv_sys_posix_termios=yes
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   am_cv_sys_posix_termios=no
4491 fi
4492 rm -f conftest*
4493 fi
4494
4495 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4496
4497
4498  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4499 echo "configure:4500: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4500 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4501   echo $ac_n "(cached) $ac_c" 1>&6
4502 else
4503   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4504
4505   gwinsz_in_termios_h=no
4506   if test $am_cv_sys_posix_termios = yes; then
4507     cat > conftest.$ac_ext <<EOF
4508 #line 4509 "configure"
4509 #include "confdefs.h"
4510 #include <sys/types.h>
4511 #     include <termios.h>
4512 #     ifdef TIOCGWINSZ
4513         yes
4514 #     endif
4515     
4516 EOF
4517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4518   egrep "yes" >/dev/null 2>&1; then
4519   rm -rf conftest*
4520   gwinsz_in_termios_h=yes
4521 fi
4522 rm -f conftest*
4523
4524   fi
4525
4526   if test $gwinsz_in_termios_h = no; then
4527     cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <sys/types.h>
4531 #     include <sys/ioctl.h>
4532 #     ifdef TIOCGWINSZ
4533         yes
4534 #     endif
4535     
4536 EOF
4537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4538   egrep "yes" >/dev/null 2>&1; then
4539   rm -rf conftest*
4540   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4541 fi
4542 rm -f conftest*
4543
4544   fi
4545   
4546 fi
4547
4548 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4549   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4550     cat >> confdefs.h <<\EOF
4551 #define GWINSZ_IN_SYS_IOCTL 1
4552 EOF
4553
4554   fi
4555
4556 if test $am_cv_sys_posix_termios = yes ; then
4557         cat >> confdefs.h <<\EOF
4558 #define HAVE_POSIX_TERMIOS 1
4559 EOF
4560
4561 fi
4562
4563 for ac_hdr in \
4564         arpa/inet.h             \
4565         arpa/nameser.h  \
4566         assert.h                \
4567         conio.h                 \
4568         crypt.h                 \
4569         direct.h                \
4570         errno.h                 \
4571         fcntl.h                 \
4572         filio.h                 \
4573         getopt.h                \
4574         grp.h                   \
4575         io.h                    \
4576         libutil.h               \
4577         limits.h                \
4578         locale.h                \
4579         netinet/tcp.h   \
4580         malloc.h                \
4581         memory.h                \
4582         psap.h                  \
4583         pwd.h                   \
4584         process.h               \
4585         resolv.h                \
4586         sgtty.h                 \
4587         shadow.h                \
4588         stddef.h                \
4589         string.h                \
4590         strings.h               \
4591         sysexits.h              \
4592         sys/file.h              \
4593         sys/filio.h             \
4594         sys/errno.h             \
4595         sys/ioctl.h             \
4596         sys/param.h             \
4597         sys/resource.h  \
4598         sys/select.h    \
4599         sys/socket.h    \
4600         sys/syslog.h    \
4601         sys/time.h              \
4602         sys/types.h             \
4603         syslog.h                \
4604         termios.h               \
4605         unistd.h                \
4606
4607 do
4608 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4609 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4610 echo "configure:4611: checking for $ac_hdr" >&5
4611 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4612   echo $ac_n "(cached) $ac_c" 1>&6
4613 else
4614   cat > conftest.$ac_ext <<EOF
4615 #line 4616 "configure"
4616 #include "confdefs.h"
4617 #include <$ac_hdr>
4618 EOF
4619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4620 { (eval echo configure:4621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4622 if test -z "$ac_err"; then
4623   rm -rf conftest*
4624   eval "ac_cv_header_$ac_safe=yes"
4625 else
4626   echo "$ac_err" >&5
4627   echo "configure: failed program was:" >&5
4628   cat conftest.$ac_ext >&5
4629   rm -rf conftest*
4630   eval "ac_cv_header_$ac_safe=no"
4631 fi
4632 rm -f conftest*
4633 fi
4634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4635   echo "$ac_t""yes" 1>&6
4636     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4637   cat >> confdefs.h <<EOF
4638 #define $ac_tr_hdr 1
4639 EOF
4640  
4641 else
4642   echo "$ac_t""no" 1>&6
4643 fi
4644 done
4645
4646
4647 if test "$ac_cv_mingw32" = yes ; then
4648     for ac_hdr in winsock.h
4649 do
4650 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4651 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4652 echo "configure:4653: checking for $ac_hdr" >&5
4653 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 #include <$ac_hdr>
4660 EOF
4661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4662 { (eval echo configure:4663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4664 if test -z "$ac_err"; then
4665   rm -rf conftest*
4666   eval "ac_cv_header_$ac_safe=yes"
4667 else
4668   echo "$ac_err" >&5
4669   echo "configure: failed program was:" >&5
4670   cat conftest.$ac_ext >&5
4671   rm -rf conftest*
4672   eval "ac_cv_header_$ac_safe=no"
4673 fi
4674 rm -f conftest*
4675 fi
4676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4677   echo "$ac_t""yes" 1>&6
4678     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4679   cat >> confdefs.h <<EOF
4680 #define $ac_tr_hdr 1
4681 EOF
4682  
4683 else
4684   echo "$ac_t""no" 1>&6
4685 fi
4686 done
4687
4688 fi
4689
4690
4691 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4692 echo "configure:4693: checking for sigset in -lV3" >&5
4693 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   ac_save_LIBS="$LIBS"
4698 LIBS="-lV3  $LIBS"
4699 cat > conftest.$ac_ext <<EOF
4700 #line 4701 "configure"
4701 #include "confdefs.h"
4702 /* Override any gcc2 internal prototype to avoid an error.  */
4703 /* We use char because int might match the return type of a gcc2
4704     builtin and then its argument prototype would still apply.  */
4705 char sigset();
4706
4707 int main() {
4708 sigset()
4709 ; return 0; }
4710 EOF
4711 if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4712   rm -rf conftest*
4713   eval "ac_cv_lib_$ac_lib_var=yes"
4714 else
4715   echo "configure: failed program was:" >&5
4716   cat conftest.$ac_ext >&5
4717   rm -rf conftest*
4718   eval "ac_cv_lib_$ac_lib_var=no"
4719 fi
4720 rm -f conftest*
4721 LIBS="$ac_save_LIBS"
4722
4723 fi
4724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4725   echo "$ac_t""yes" 1>&6
4726     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4727     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4728   cat >> confdefs.h <<EOF
4729 #define $ac_tr_lib 1
4730 EOF
4731
4732   LIBS="-lV3 $LIBS"
4733
4734 else
4735   echo "$ac_t""no" 1>&6
4736 fi
4737
4738
4739 if test "${ac_cv_header_winsock_h}" = yes; then
4740     echo $ac_n "checking for winsock support""... $ac_c" 1>&6
4741 echo "configure:4742: checking for winsock support" >&5
4742     cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745
4746 #include <winsock.h>
4747     
4748 int main() {
4749
4750 socket(0,0,0);
4751 select(0,NULL,NULL,NULL,NULL);
4752 closesocket(0);
4753 gethostname(NULL,0);
4754     
4755 ; return 0; }
4756 EOF
4757 if { (eval echo configure:4758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4758   rm -rf conftest*
4759   
4760         echo "$ac_t""yes" 1>&6
4761         cat >> confdefs.h <<\EOF
4762 #define HAVE_WINSOCK 1
4763 EOF
4764
4765         ac_cv_func_socket=yes
4766         ac_cv_func_select=yes
4767         ac_cv_func_closesocket=yes
4768         ac_cv_func_gethostname=yes
4769     
4770 else
4771   echo "configure: failed program was:" >&5
4772   cat conftest.$ac_ext >&5
4773   rm -rf conftest*
4774   
4775         echo "$ac_t""no" 1>&6
4776     
4777 fi
4778 rm -f conftest*
4779 fi
4780
4781
4782 echo $ac_n "checking for socket""... $ac_c" 1>&6
4783 echo "configure:4784: checking for socket" >&5
4784 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 /* System header to define __stub macros and hopefully few prototypes,
4791     which can conflict with char socket(); below.  */
4792 #include <assert.h>
4793 /* Override any gcc2 internal prototype to avoid an error.  */
4794 /* We use char because int might match the return type of a gcc2
4795     builtin and then its argument prototype would still apply.  */
4796 char socket();
4797 char (*f)();
4798
4799 int main() {
4800
4801 /* The GNU C library defines this for functions which it implements
4802     to always fail with ENOSYS.  Some functions are actually named
4803     something starting with __ and the normal name is an alias.  */
4804 #if defined (__stub_socket) || defined (__stub___socket)
4805 choke me
4806 #else
4807 f = socket;
4808 #endif
4809
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_func_socket=yes"
4815 else
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818   rm -rf conftest*
4819   eval "ac_cv_func_socket=no"
4820 fi
4821 rm -f conftest*
4822 fi
4823
4824 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4825   echo "$ac_t""yes" 1>&6
4826   :
4827 else
4828   echo "$ac_t""no" 1>&6
4829         
4830         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4831 echo "configure:4832: checking for main in -lsocket" >&5
4832 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4833 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4834   echo $ac_n "(cached) $ac_c" 1>&6
4835 else
4836   ac_save_LIBS="$LIBS"
4837 LIBS="-lsocket  $LIBS"
4838 cat > conftest.$ac_ext <<EOF
4839 #line 4840 "configure"
4840 #include "confdefs.h"
4841
4842 int main() {
4843 main()
4844 ; return 0; }
4845 EOF
4846 if { (eval echo configure:4847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4847   rm -rf conftest*
4848   eval "ac_cv_lib_$ac_lib_var=yes"
4849 else
4850   echo "configure: failed program was:" >&5
4851   cat conftest.$ac_ext >&5
4852   rm -rf conftest*
4853   eval "ac_cv_lib_$ac_lib_var=no"
4854 fi
4855 rm -f conftest*
4856 LIBS="$ac_save_LIBS"
4857
4858 fi
4859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4860   echo "$ac_t""yes" 1>&6
4861     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4862     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4863   cat >> confdefs.h <<EOF
4864 #define $ac_tr_lib 1
4865 EOF
4866
4867   LIBS="-lsocket $LIBS"
4868
4869 else
4870   echo "$ac_t""no" 1>&6
4871 fi
4872
4873         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4874 echo "configure:4875: checking for main in -lnet" >&5
4875 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4876 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4877   echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879   ac_save_LIBS="$LIBS"
4880 LIBS="-lnet  $LIBS"
4881 cat > conftest.$ac_ext <<EOF
4882 #line 4883 "configure"
4883 #include "confdefs.h"
4884
4885 int main() {
4886 main()
4887 ; return 0; }
4888 EOF
4889 if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4890   rm -rf conftest*
4891   eval "ac_cv_lib_$ac_lib_var=yes"
4892 else
4893   echo "configure: failed program was:" >&5
4894   cat conftest.$ac_ext >&5
4895   rm -rf conftest*
4896   eval "ac_cv_lib_$ac_lib_var=no"
4897 fi
4898 rm -f conftest*
4899 LIBS="$ac_save_LIBS"
4900
4901 fi
4902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4903   echo "$ac_t""yes" 1>&6
4904     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4905     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4906   cat >> confdefs.h <<EOF
4907 #define $ac_tr_lib 1
4908 EOF
4909
4910   LIBS="-lnet $LIBS"
4911
4912 else
4913   echo "$ac_t""no" 1>&6
4914 fi
4915
4916         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4917 echo "configure:4918: checking for socket in -lnet" >&5
4918 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4920   echo $ac_n "(cached) $ac_c" 1>&6
4921 else
4922   ac_save_LIBS="$LIBS"
4923 LIBS="-lnet  $LIBS"
4924 cat > conftest.$ac_ext <<EOF
4925 #line 4926 "configure"
4926 #include "confdefs.h"
4927 /* Override any gcc2 internal prototype to avoid an error.  */
4928 /* We use char because int might match the return type of a gcc2
4929     builtin and then its argument prototype would still apply.  */
4930 char socket();
4931
4932 int main() {
4933 socket()
4934 ; return 0; }
4935 EOF
4936 if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4937   rm -rf conftest*
4938   eval "ac_cv_lib_$ac_lib_var=yes"
4939 else
4940   echo "configure: failed program was:" >&5
4941   cat conftest.$ac_ext >&5
4942   rm -rf conftest*
4943   eval "ac_cv_lib_$ac_lib_var=no"
4944 fi
4945 rm -f conftest*
4946 LIBS="$ac_save_LIBS"
4947
4948 fi
4949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4950   echo "$ac_t""yes" 1>&6
4951     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4952     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4953   cat >> confdefs.h <<EOF
4954 #define $ac_tr_lib 1
4955 EOF
4956
4957   LIBS="-lnet $LIBS"
4958
4959 else
4960   echo "$ac_t""no" 1>&6
4961 fi
4962
4963         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4964 echo "configure:4965: checking for main in -lnsl_s" >&5
4965 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4966 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4967   echo $ac_n "(cached) $ac_c" 1>&6
4968 else
4969   ac_save_LIBS="$LIBS"
4970 LIBS="-lnsl_s  $LIBS"
4971 cat > conftest.$ac_ext <<EOF
4972 #line 4973 "configure"
4973 #include "confdefs.h"
4974
4975 int main() {
4976 main()
4977 ; return 0; }
4978 EOF
4979 if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4980   rm -rf conftest*
4981   eval "ac_cv_lib_$ac_lib_var=yes"
4982 else
4983   echo "configure: failed program was:" >&5
4984   cat conftest.$ac_ext >&5
4985   rm -rf conftest*
4986   eval "ac_cv_lib_$ac_lib_var=no"
4987 fi
4988 rm -f conftest*
4989 LIBS="$ac_save_LIBS"
4990
4991 fi
4992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4993   echo "$ac_t""yes" 1>&6
4994     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4995     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4996   cat >> confdefs.h <<EOF
4997 #define $ac_tr_lib 1
4998 EOF
4999
5000   LIBS="-lnsl_s $LIBS"
5001
5002 else
5003   echo "$ac_t""no" 1>&6
5004 fi
5005
5006         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5007 echo "configure:5008: checking for main in -lnsl" >&5
5008 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5009 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5010   echo $ac_n "(cached) $ac_c" 1>&6
5011 else
5012   ac_save_LIBS="$LIBS"
5013 LIBS="-lnsl  $LIBS"
5014 cat > conftest.$ac_ext <<EOF
5015 #line 5016 "configure"
5016 #include "confdefs.h"
5017
5018 int main() {
5019 main()
5020 ; return 0; }
5021 EOF
5022 if { (eval echo configure:5023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5023   rm -rf conftest*
5024   eval "ac_cv_lib_$ac_lib_var=yes"
5025 else
5026   echo "configure: failed program was:" >&5
5027   cat conftest.$ac_ext >&5
5028   rm -rf conftest*
5029   eval "ac_cv_lib_$ac_lib_var=no"
5030 fi
5031 rm -f conftest*
5032 LIBS="$ac_save_LIBS"
5033
5034 fi
5035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5036   echo "$ac_t""yes" 1>&6
5037     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5038     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5039   cat >> confdefs.h <<EOF
5040 #define $ac_tr_lib 1
5041 EOF
5042
5043   LIBS="-lnsl $LIBS"
5044
5045 else
5046   echo "$ac_t""no" 1>&6
5047 fi
5048
5049         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5050 echo "configure:5051: checking for socket in -linet" >&5
5051 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5053   echo $ac_n "(cached) $ac_c" 1>&6
5054 else
5055   ac_save_LIBS="$LIBS"
5056 LIBS="-linet  $LIBS"
5057 cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060 /* Override any gcc2 internal prototype to avoid an error.  */
5061 /* We use char because int might match the return type of a gcc2
5062     builtin and then its argument prototype would still apply.  */
5063 char socket();
5064
5065 int main() {
5066 socket()
5067 ; return 0; }
5068 EOF
5069 if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=yes"
5072 else
5073   echo "configure: failed program was:" >&5
5074   cat conftest.$ac_ext >&5
5075   rm -rf conftest*
5076   eval "ac_cv_lib_$ac_lib_var=no"
5077 fi
5078 rm -f conftest*
5079 LIBS="$ac_save_LIBS"
5080
5081 fi
5082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5083   echo "$ac_t""yes" 1>&6
5084     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5085     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5086   cat >> confdefs.h <<EOF
5087 #define $ac_tr_lib 1
5088 EOF
5089
5090   LIBS="-linet $LIBS"
5091
5092 else
5093   echo "$ac_t""no" 1>&6
5094 fi
5095
5096         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5097 echo "configure:5098: checking for main in -lgen" >&5
5098 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5100   echo $ac_n "(cached) $ac_c" 1>&6
5101 else
5102   ac_save_LIBS="$LIBS"
5103 LIBS="-lgen  $LIBS"
5104 cat > conftest.$ac_ext <<EOF
5105 #line 5106 "configure"
5106 #include "confdefs.h"
5107
5108 int main() {
5109 main()
5110 ; return 0; }
5111 EOF
5112 if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5113   rm -rf conftest*
5114   eval "ac_cv_lib_$ac_lib_var=yes"
5115 else
5116   echo "configure: failed program was:" >&5
5117   cat conftest.$ac_ext >&5
5118   rm -rf conftest*
5119   eval "ac_cv_lib_$ac_lib_var=no"
5120 fi
5121 rm -f conftest*
5122 LIBS="$ac_save_LIBS"
5123
5124 fi
5125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5126   echo "$ac_t""yes" 1>&6
5127     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5128     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5129   cat >> confdefs.h <<EOF
5130 #define $ac_tr_lib 1
5131 EOF
5132
5133   LIBS="-lgen $LIBS"
5134
5135 else
5136   echo "$ac_t""no" 1>&6
5137 fi
5138
5139
5140 fi
5141
5142
5143 echo $ac_n "checking for select""... $ac_c" 1>&6
5144 echo "configure:5145: checking for select" >&5
5145 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5146   echo $ac_n "(cached) $ac_c" 1>&6
5147 else
5148   cat > conftest.$ac_ext <<EOF
5149 #line 5150 "configure"
5150 #include "confdefs.h"
5151 /* System header to define __stub macros and hopefully few prototypes,
5152     which can conflict with char select(); below.  */
5153 #include <assert.h>
5154 /* Override any gcc2 internal prototype to avoid an error.  */
5155 /* We use char because int might match the return type of a gcc2
5156     builtin and then its argument prototype would still apply.  */
5157 char select();
5158 char (*f)();
5159
5160 int main() {
5161
5162 /* The GNU C library defines this for functions which it implements
5163     to always fail with ENOSYS.  Some functions are actually named
5164     something starting with __ and the normal name is an alias.  */
5165 #if defined (__stub_select) || defined (__stub___select)
5166 choke me
5167 #else
5168 f = select;
5169 #endif
5170
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5174   rm -rf conftest*
5175   eval "ac_cv_func_select=yes"
5176 else
5177   echo "configure: failed program was:" >&5
5178   cat conftest.$ac_ext >&5
5179   rm -rf conftest*
5180   eval "ac_cv_func_select=no"
5181 fi
5182 rm -f conftest*
5183 fi
5184
5185 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5186   echo "$ac_t""yes" 1>&6
5187   :
5188 else
5189   echo "$ac_t""no" 1>&6
5190 { echo "configure: error: select() required." 1>&2; exit 1; }
5191 fi
5192
5193
5194 if test "${ac_cv_header_winsock_h}" != yes; then
5195                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5196 echo "configure:5197: checking types of arguments for select()" >&5
5197  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5198   echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5201   echo $ac_n "(cached) $ac_c" 1>&6
5202 else
5203     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5204   echo $ac_n "(cached) $ac_c" 1>&6
5205 else
5206      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5207      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5208       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5209        cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5212 #ifdef HAVE_SYS_TYPES_H
5213 #include <sys/types.h>
5214 #endif
5215 #ifdef HAVE_SYS_TIME_H
5216 #include <sys/time.h>
5217 #endif
5218 #ifdef HAVE_SYS_SELECT_H
5219 #include <sys/select.h>
5220 #endif
5221 #ifdef HAVE_SYS_SOCKET_H
5222 #include <sys/socket.h>
5223 #endif
5224 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);
5225 int main() {
5226
5227 ; return 0; }
5228 EOF
5229 if { (eval echo configure:5230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5230   rm -rf conftest*
5231           ac_not_found=no ; break 3
5232 else
5233   echo "configure: failed program was:" >&5
5234   cat conftest.$ac_ext >&5
5235   rm -rf conftest*
5236   ac_not_found=yes
5237 fi
5238 rm -f conftest*
5239       done
5240      done
5241     done
5242    
5243 fi
5244   
5245 fi
5246  
5247 fi
5248  if test "$ac_not_found" = yes; then
5249   ac_cv_func_select_arg1=int 
5250   ac_cv_func_select_arg234='int *' 
5251   ac_cv_func_select_arg5='struct timeval *'
5252  fi
5253  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5254  cat >> confdefs.h <<EOF
5255 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5256 EOF
5257
5258  cat >> confdefs.h <<EOF
5259 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5260 EOF
5261
5262  cat >> confdefs.h <<EOF
5263 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5264 EOF
5265
5266
5267 fi
5268
5269
5270 for ac_hdr in regex.h 
5271 do
5272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5274 echo "configure:5275: checking for $ac_hdr" >&5
5275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5276   echo $ac_n "(cached) $ac_c" 1>&6
5277 else
5278   cat > conftest.$ac_ext <<EOF
5279 #line 5280 "configure"
5280 #include "confdefs.h"
5281 #include <$ac_hdr>
5282 EOF
5283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5284 { (eval echo configure:5285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5286 if test -z "$ac_err"; then
5287   rm -rf conftest*
5288   eval "ac_cv_header_$ac_safe=yes"
5289 else
5290   echo "$ac_err" >&5
5291   echo "configure: failed program was:" >&5
5292   cat conftest.$ac_ext >&5
5293   rm -rf conftest*
5294   eval "ac_cv_header_$ac_safe=no"
5295 fi
5296 rm -f conftest*
5297 fi
5298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5299   echo "$ac_t""yes" 1>&6
5300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5301   cat >> confdefs.h <<EOF
5302 #define $ac_tr_hdr 1
5303 EOF
5304  
5305 else
5306   echo "$ac_t""no" 1>&6
5307 fi
5308 done
5309
5310 if test "$ac_cv_header_regex_h" != yes ; then
5311         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5312 fi
5313 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5314 echo "configure:5315: checking for regfree" >&5
5315 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5316   echo $ac_n "(cached) $ac_c" 1>&6
5317 else
5318   cat > conftest.$ac_ext <<EOF
5319 #line 5320 "configure"
5320 #include "confdefs.h"
5321 /* System header to define __stub macros and hopefully few prototypes,
5322     which can conflict with char regfree(); below.  */
5323 #include <assert.h>
5324 /* Override any gcc2 internal prototype to avoid an error.  */
5325 /* We use char because int might match the return type of a gcc2
5326     builtin and then its argument prototype would still apply.  */
5327 char regfree();
5328 char (*f)();
5329
5330 int main() {
5331
5332 /* The GNU C library defines this for functions which it implements
5333     to always fail with ENOSYS.  Some functions are actually named
5334     something starting with __ and the normal name is an alias.  */
5335 #if defined (__stub_regfree) || defined (__stub___regfree)
5336 choke me
5337 #else
5338 f = regfree;
5339 #endif
5340
5341 ; return 0; }
5342 EOF
5343 if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5344   rm -rf conftest*
5345   eval "ac_cv_func_regfree=yes"
5346 else
5347   echo "configure: failed program was:" >&5
5348   cat conftest.$ac_ext >&5
5349   rm -rf conftest*
5350   eval "ac_cv_func_regfree=no"
5351 fi
5352 rm -f conftest*
5353 fi
5354
5355 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5356   echo "$ac_t""yes" 1>&6
5357   :
5358 else
5359   echo "$ac_t""no" 1>&6
5360 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5361 fi
5362
5363
5364
5365 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5366 echo "configure:5367: checking for compatible POSIX regex" >&5
5367 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5368   echo $ac_n "(cached) $ac_c" 1>&6
5369 else
5370   
5371         if test "$cross_compiling" = yes; then
5372   ol_cv_c_posix_regex=cross
5373 else
5374   cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5377
5378 #include <sys/types.h>
5379 #include <regex.h>
5380 static char *pattern, *string;
5381 main()
5382 {
5383         int rc;
5384         regex_t re;
5385
5386         pattern = "^A";
5387
5388         if(regcomp(&re, pattern, 0)) {
5389                 return -1;
5390         }
5391         
5392         string = "ALL MATCH";
5393         
5394         rc = regexec(&re, string, 0, (void*)0, 0);
5395
5396         regfree(&re);
5397
5398         return rc;
5399 }
5400 EOF
5401 if { (eval echo configure:5402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5402 then
5403   ol_cv_c_posix_regex=yes
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407   rm -fr conftest*
5408   ol_cv_c_posix_regex=no
5409 fi
5410 rm -fr conftest*
5411 fi
5412
5413 fi
5414
5415 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5416
5417 if test "$ol_cv_c_posix_regex" = no ; then
5418         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5419 fi
5420
5421 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5422 echo "configure:5423: checking for res_search" >&5
5423 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5424   echo $ac_n "(cached) $ac_c" 1>&6
5425 else
5426   cat > conftest.$ac_ext <<EOF
5427 #line 5428 "configure"
5428 #include "confdefs.h"
5429 /* System header to define __stub macros and hopefully few prototypes,
5430     which can conflict with char res_search(); below.  */
5431 #include <assert.h>
5432 /* Override any gcc2 internal prototype to avoid an error.  */
5433 /* We use char because int might match the return type of a gcc2
5434     builtin and then its argument prototype would still apply.  */
5435 char res_search();
5436 char (*f)();
5437
5438 int main() {
5439
5440 /* The GNU C library defines this for functions which it implements
5441     to always fail with ENOSYS.  Some functions are actually named
5442     something starting with __ and the normal name is an alias.  */
5443 #if defined (__stub_res_search) || defined (__stub___res_search)
5444 choke me
5445 #else
5446 f = res_search;
5447 #endif
5448
5449 ; return 0; }
5450 EOF
5451 if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5452   rm -rf conftest*
5453   eval "ac_cv_func_res_search=yes"
5454 else
5455   echo "configure: failed program was:" >&5
5456   cat conftest.$ac_ext >&5
5457   rm -rf conftest*
5458   eval "ac_cv_func_res_search=no"
5459 fi
5460 rm -f conftest*
5461 fi
5462
5463 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5464   echo "$ac_t""yes" 1>&6
5465   :
5466 else
5467   echo "$ac_t""no" 1>&6
5468 fi
5469
5470 if test $ac_cv_func_res_search = no ; then 
5471         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5472 echo "configure:5473: checking for res_search in -lbind" >&5
5473 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5474 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5475   echo $ac_n "(cached) $ac_c" 1>&6
5476 else
5477   ac_save_LIBS="$LIBS"
5478 LIBS="-lbind  $LIBS"
5479 cat > conftest.$ac_ext <<EOF
5480 #line 5481 "configure"
5481 #include "confdefs.h"
5482 /* Override any gcc2 internal prototype to avoid an error.  */
5483 /* We use char because int might match the return type of a gcc2
5484     builtin and then its argument prototype would still apply.  */
5485 char res_search();
5486
5487 int main() {
5488 res_search()
5489 ; return 0; }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5492   rm -rf conftest*
5493   eval "ac_cv_lib_$ac_lib_var=yes"
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   eval "ac_cv_lib_$ac_lib_var=no"
5499 fi
5500 rm -f conftest*
5501 LIBS="$ac_save_LIBS"
5502
5503 fi
5504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5505   echo "$ac_t""yes" 1>&6
5506     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5507     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5508   cat >> confdefs.h <<EOF
5509 #define $ac_tr_lib 1
5510 EOF
5511
5512   LIBS="-lbind $LIBS"
5513
5514 else
5515   echo "$ac_t""no" 1>&6
5516 fi
5517
5518         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5519 fi
5520
5521 if test $ac_cv_func_res_search = no ; then 
5522         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5523 echo "configure:5524: checking for __res_search in -lbind" >&5
5524 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5525 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5526   echo $ac_n "(cached) $ac_c" 1>&6
5527 else
5528   ac_save_LIBS="$LIBS"
5529 LIBS="-lbind  $LIBS"
5530 cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 /* Override any gcc2 internal prototype to avoid an error.  */
5534 /* We use char because int might match the return type of a gcc2
5535     builtin and then its argument prototype would still apply.  */
5536 char __res_search();
5537
5538 int main() {
5539 __res_search()
5540 ; return 0; }
5541 EOF
5542 if { (eval echo configure:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5543   rm -rf conftest*
5544   eval "ac_cv_lib_$ac_lib_var=yes"
5545 else
5546   echo "configure: failed program was:" >&5
5547   cat conftest.$ac_ext >&5
5548   rm -rf conftest*
5549   eval "ac_cv_lib_$ac_lib_var=no"
5550 fi
5551 rm -f conftest*
5552 LIBS="$ac_save_LIBS"
5553
5554 fi
5555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5556   echo "$ac_t""yes" 1>&6
5557     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5558     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5559   cat >> confdefs.h <<EOF
5560 #define $ac_tr_lib 1
5561 EOF
5562
5563   LIBS="-lbind $LIBS"
5564
5565 else
5566   echo "$ac_t""no" 1>&6
5567 fi
5568
5569         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5570 fi
5571
5572 if test $ac_cv_func_res_search = no ; then 
5573         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5574 echo "configure:5575: checking for res_search in -lresolv" >&5
5575 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5576 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5577   echo $ac_n "(cached) $ac_c" 1>&6
5578 else
5579   ac_save_LIBS="$LIBS"
5580 LIBS="-lresolv  $LIBS"
5581 cat > conftest.$ac_ext <<EOF
5582 #line 5583 "configure"
5583 #include "confdefs.h"
5584 /* Override any gcc2 internal prototype to avoid an error.  */
5585 /* We use char because int might match the return type of a gcc2
5586     builtin and then its argument prototype would still apply.  */
5587 char res_search();
5588
5589 int main() {
5590 res_search()
5591 ; return 0; }
5592 EOF
5593 if { (eval echo configure:5594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5594   rm -rf conftest*
5595   eval "ac_cv_lib_$ac_lib_var=yes"
5596 else
5597   echo "configure: failed program was:" >&5
5598   cat conftest.$ac_ext >&5
5599   rm -rf conftest*
5600   eval "ac_cv_lib_$ac_lib_var=no"
5601 fi
5602 rm -f conftest*
5603 LIBS="$ac_save_LIBS"
5604
5605 fi
5606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5607   echo "$ac_t""yes" 1>&6
5608     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5609     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5610   cat >> confdefs.h <<EOF
5611 #define $ac_tr_lib 1
5612 EOF
5613
5614   LIBS="-lresolv $LIBS"
5615
5616 else
5617   echo "$ac_t""no" 1>&6
5618 fi
5619
5620         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5621 fi
5622
5623 if test "$ac_cv_func_res_search" = yes ; then
5624         cat >> confdefs.h <<\EOF
5625 #define HAVE_RES_SEARCH 1
5626 EOF
5627
5628 elif test $ol_enable_dns = yes ; then
5629         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5630 elif test $ol_enable_dns != no ; then
5631         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5632 fi
5633
5634
5635 ol_link_isode=no
5636 if test $ol_enable_ldapd != no ; then
5637         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5638
5639                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5640 echo "configure:5641: checking for main in -lxtpp" >&5
5641 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5642 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5643   echo $ac_n "(cached) $ac_c" 1>&6
5644 else
5645   ac_save_LIBS="$LIBS"
5646 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5647 cat > conftest.$ac_ext <<EOF
5648 #line 5649 "configure"
5649 #include "confdefs.h"
5650
5651 int main() {
5652 main()
5653 ; return 0; }
5654 EOF
5655 if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5656   rm -rf conftest*
5657   eval "ac_cv_lib_$ac_lib_var=yes"
5658 else
5659   echo "configure: failed program was:" >&5
5660   cat conftest.$ac_ext >&5
5661   rm -rf conftest*
5662   eval "ac_cv_lib_$ac_lib_var=no"
5663 fi
5664 rm -f conftest*
5665 LIBS="$ac_save_LIBS"
5666
5667 fi
5668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5669   echo "$ac_t""yes" 1>&6
5670   
5671                 ol_link_isode=yes
5672                 cat >> confdefs.h <<\EOF
5673 #define HAVE_XTPP 1
5674 EOF
5675
5676                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5677                 
5678 else
5679   echo "$ac_t""no" 1>&6
5680 :
5681 fi
5682
5683         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5684 echo "configure:5685: checking for main in -ldsap" >&5
5685 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5686 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5687   echo $ac_n "(cached) $ac_c" 1>&6
5688 else
5689   ac_save_LIBS="$LIBS"
5690 LIBS="-ldsap -lisode $LIBS"
5691 cat > conftest.$ac_ext <<EOF
5692 #line 5693 "configure"
5693 #include "confdefs.h"
5694
5695 int main() {
5696 main()
5697 ; return 0; }
5698 EOF
5699 if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5700   rm -rf conftest*
5701   eval "ac_cv_lib_$ac_lib_var=yes"
5702 else
5703   echo "configure: failed program was:" >&5
5704   cat conftest.$ac_ext >&5
5705   rm -rf conftest*
5706   eval "ac_cv_lib_$ac_lib_var=no"
5707 fi
5708 rm -f conftest*
5709 LIBS="$ac_save_LIBS"
5710
5711 fi
5712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5713   echo "$ac_t""yes" 1>&6
5714   
5715                 ol_link_isode=yes
5716                 cat >> confdefs.h <<\EOF
5717 #define HAVE_DSAP 1
5718 EOF
5719
5720                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5721                 
5722 else
5723   echo "$ac_t""no" 1>&6
5724 :
5725 fi
5726
5727         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5728 echo "configure:5729: checking for main in -lisode" >&5
5729 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5731   echo $ac_n "(cached) $ac_c" 1>&6
5732 else
5733   ac_save_LIBS="$LIBS"
5734 LIBS="-lisode  $LIBS"
5735 cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5738
5739 int main() {
5740 main()
5741 ; return 0; }
5742 EOF
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5744   rm -rf conftest*
5745   eval "ac_cv_lib_$ac_lib_var=yes"
5746 else
5747   echo "configure: failed program was:" >&5
5748   cat conftest.$ac_ext >&5
5749   rm -rf conftest*
5750   eval "ac_cv_lib_$ac_lib_var=no"
5751 fi
5752 rm -f conftest*
5753 LIBS="$ac_save_LIBS"
5754
5755 fi
5756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5757   echo "$ac_t""yes" 1>&6
5758   
5759                 ol_link_isode=yes
5760                 cat >> confdefs.h <<\EOF
5761 #define HAVE_ISODE 1
5762 EOF
5763
5764                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5765                 
5766 else
5767   echo "$ac_t""no" 1>&6
5768 :
5769 fi
5770
5771 fi
5772
5773 if test $ol_link_isode != no; then
5774         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5775 echo "configure:5776: checking for main in -lpp" >&5
5776 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5778   echo $ac_n "(cached) $ac_c" 1>&6
5779 else
5780   ac_save_LIBS="$LIBS"
5781 LIBS="-lpp  $LIBS"
5782 cat > conftest.$ac_ext <<EOF
5783 #line 5784 "configure"
5784 #include "confdefs.h"
5785
5786 int main() {
5787 main()
5788 ; return 0; }
5789 EOF
5790 if { (eval echo configure:5791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5791   rm -rf conftest*
5792   eval "ac_cv_lib_$ac_lib_var=yes"
5793 else
5794   echo "configure: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   rm -rf conftest*
5797   eval "ac_cv_lib_$ac_lib_var=no"
5798 fi
5799 rm -f conftest*
5800 LIBS="$ac_save_LIBS"
5801
5802 fi
5803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5804   echo "$ac_t""yes" 1>&6
5805   
5806                 cat >> confdefs.h <<\EOF
5807 #define HAVE_PP 1
5808 EOF
5809
5810                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5811                 
5812 else
5813   echo "$ac_t""no" 1>&6
5814 :
5815 fi
5816
5817
5818         # Extract the first word of "pepsy", so it can be a program name with args.
5819 set dummy pepsy; ac_word=$2
5820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5821 echo "configure:5822: checking for $ac_word" >&5
5822 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5823   echo $ac_n "(cached) $ac_c" 1>&6
5824 else
5825   case "$PEPSY" in
5826   /*)
5827   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5828   ;;
5829   ?:/*)                  
5830   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5831   ;;
5832   *)
5833   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5834   ac_dummy="$PATH"
5835   for ac_dir in $ac_dummy; do 
5836     test -z "$ac_dir" && ac_dir=.
5837     if test -f $ac_dir/$ac_word; then
5838       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5839       break
5840     fi
5841   done
5842   IFS="$ac_save_ifs"
5843   ;;
5844 esac
5845 fi
5846 PEPSY="$ac_cv_path_PEPSY"
5847 if test -n "$PEPSY"; then
5848   echo "$ac_t""$PEPSY" 1>&6
5849 else
5850   echo "$ac_t""no" 1>&6
5851 fi
5852
5853 fi
5854
5855 if test $ol_enable_quipu != no ; then
5856         for ac_hdr in quipu/commonarg.h
5857 do
5858 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5859 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5860 echo "configure:5861: checking for $ac_hdr" >&5
5861 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5862   echo $ac_n "(cached) $ac_c" 1>&6
5863 else
5864   cat > conftest.$ac_ext <<EOF
5865 #line 5866 "configure"
5866 #include "confdefs.h"
5867 #include <$ac_hdr>
5868 EOF
5869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5870 { (eval echo configure:5871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5872 if test -z "$ac_err"; then
5873   rm -rf conftest*
5874   eval "ac_cv_header_$ac_safe=yes"
5875 else
5876   echo "$ac_err" >&5
5877   echo "configure: failed program was:" >&5
5878   cat conftest.$ac_ext >&5
5879   rm -rf conftest*
5880   eval "ac_cv_header_$ac_safe=no"
5881 fi
5882 rm -f conftest*
5883 fi
5884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5885   echo "$ac_t""yes" 1>&6
5886     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5887   cat >> confdefs.h <<EOF
5888 #define $ac_tr_hdr 1
5889 EOF
5890  
5891 else
5892   echo "$ac_t""no" 1>&6
5893 fi
5894 done
5895
5896
5897         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5898                 BUILD_QUIPU=yes
5899         elif test $ol_enable_quipu = auto ; then
5900                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5901         else
5902                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5903         fi
5904 fi
5905
5906 ol_link_kerberos=no
5907
5908 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5909         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5910 do
5911 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5912 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5913 echo "configure:5914: checking for $ac_hdr" >&5
5914 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5915   echo $ac_n "(cached) $ac_c" 1>&6
5916 else
5917   cat > conftest.$ac_ext <<EOF
5918 #line 5919 "configure"
5919 #include "confdefs.h"
5920 #include <$ac_hdr>
5921 EOF
5922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5923 { (eval echo configure:5924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5925 if test -z "$ac_err"; then
5926   rm -rf conftest*
5927   eval "ac_cv_header_$ac_safe=yes"
5928 else
5929   echo "$ac_err" >&5
5930   echo "configure: failed program was:" >&5
5931   cat conftest.$ac_ext >&5
5932   rm -rf conftest*
5933   eval "ac_cv_header_$ac_safe=no"
5934 fi
5935 rm -f conftest*
5936 fi
5937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5938   echo "$ac_t""yes" 1>&6
5939     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5940   cat >> confdefs.h <<EOF
5941 #define $ac_tr_hdr 1
5942 EOF
5943  
5944 else
5945   echo "$ac_t""no" 1>&6
5946 fi
5947 done
5948
5949
5950         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5951                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5952 echo "configure:5953: checking for main in -lkrb4" >&5
5953 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5954 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5955   echo $ac_n "(cached) $ac_c" 1>&6
5956 else
5957   ac_save_LIBS="$LIBS"
5958 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962
5963 int main() {
5964 main()
5965 ; return 0; }
5966 EOF
5967 if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5968   rm -rf conftest*
5969   eval "ac_cv_lib_$ac_lib_var=yes"
5970 else
5971   echo "configure: failed program was:" >&5
5972   cat conftest.$ac_ext >&5
5973   rm -rf conftest*
5974   eval "ac_cv_lib_$ac_lib_var=no"
5975 fi
5976 rm -f conftest*
5977 LIBS="$ac_save_LIBS"
5978
5979 fi
5980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5981   echo "$ac_t""yes" 1>&6
5982   have_k5=yes
5983 else
5984   echo "$ac_t""no" 1>&6
5985 have_k5=no
5986 fi
5987
5988
5989                 if test $have_k5 = yes ; then
5990                         ol_with_kerberos=found
5991                         ol_link_kerberos=yes
5992
5993                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5994
5995                         LIBS="$KRB_LIBS $LIBS"
5996
5997                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5998 echo "configure:5999: checking for des_debug in Kerberos libraries" >&5
5999 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6000   echo $ac_n "(cached) $ac_c" 1>&6
6001 else
6002   
6003                                                                 save_LIBS="$LIBS"
6004                                 LIBS="$KRB_LIBS $LIBS"
6005                                 cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008
6009 #include <kerberosIV/krb.h>
6010 #include <kerberosIV/des.h>
6011 extern int des_debug;
6012
6013 int main() {
6014
6015 des_debug = 1;
6016
6017 ; return 0; }
6018 EOF
6019 if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6020   rm -rf conftest*
6021   ol_cv_var_des_debug=yes
6022 else
6023   echo "configure: failed program was:" >&5
6024   cat conftest.$ac_ext >&5
6025   rm -rf conftest*
6026   ol_cv_var_des_debug=no
6027 fi
6028 rm -f conftest*
6029                                                                 LIBS="$save_LIBS"
6030                         
6031 fi
6032
6033 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6034
6035                         if test $ol_cv_var_des_debug = yes ; then
6036                                 cat >> confdefs.h <<\EOF
6037 #define HAVE_DES_DEBUG 1
6038 EOF
6039
6040                         fi
6041
6042                         LIBS="$save_LIBS"
6043                 fi
6044         fi
6045 fi
6046
6047 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6048         -o $ol_with_kerberos = kth ; then
6049
6050         for ac_hdr in krb.h des.h krb-archaeology.h 
6051 do
6052 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6053 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6054 echo "configure:6055: checking for $ac_hdr" >&5
6055 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6056   echo $ac_n "(cached) $ac_c" 1>&6
6057 else
6058   cat > conftest.$ac_ext <<EOF
6059 #line 6060 "configure"
6060 #include "confdefs.h"
6061 #include <$ac_hdr>
6062 EOF
6063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6064 { (eval echo configure:6065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6066 if test -z "$ac_err"; then
6067   rm -rf conftest*
6068   eval "ac_cv_header_$ac_safe=yes"
6069 else
6070   echo "$ac_err" >&5
6071   echo "configure: failed program was:" >&5
6072   cat conftest.$ac_ext >&5
6073   rm -rf conftest*
6074   eval "ac_cv_header_$ac_safe=no"
6075 fi
6076 rm -f conftest*
6077 fi
6078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6079   echo "$ac_t""yes" 1>&6
6080     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6081   cat >> confdefs.h <<EOF
6082 #define $ac_tr_hdr 1
6083 EOF
6084  
6085 else
6086   echo "$ac_t""no" 1>&6
6087 fi
6088 done
6089
6090
6091         if test $ac_cv_header_krb_h = yes ; then
6092                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6093 echo "configure:6094: checking for main in -lkrb" >&5
6094 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6095 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6096   echo $ac_n "(cached) $ac_c" 1>&6
6097 else
6098   ac_save_LIBS="$LIBS"
6099 LIBS="-lkrb -ldes $LIBS"
6100 cat > conftest.$ac_ext <<EOF
6101 #line 6102 "configure"
6102 #include "confdefs.h"
6103
6104 int main() {
6105 main()
6106 ; return 0; }
6107 EOF
6108 if { (eval echo configure:6109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6109   rm -rf conftest*
6110   eval "ac_cv_lib_$ac_lib_var=yes"
6111 else
6112   echo "configure: failed program was:" >&5
6113   cat conftest.$ac_ext >&5
6114   rm -rf conftest*
6115   eval "ac_cv_lib_$ac_lib_var=no"
6116 fi
6117 rm -f conftest*
6118 LIBS="$ac_save_LIBS"
6119
6120 fi
6121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6122   echo "$ac_t""yes" 1>&6
6123   have_k4=yes
6124 else
6125   echo "$ac_t""no" 1>&6
6126 have_k4=no
6127 fi
6128
6129
6130                 if test $have_k4 = yes ; then
6131                         ol_with_kerberos=found
6132                         ol_link_kerberos=yes
6133
6134                         KRB_LIBS="-lkrb -ldes"
6135
6136                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6137                                 cat >> confdefs.h <<\EOF
6138 #define HAVE_KTH_KERBEROS 1
6139 EOF
6140
6141                         fi
6142                 fi
6143         fi
6144 fi
6145
6146 if test $ol_link_kerberos = yes ; then
6147         cat >> confdefs.h <<\EOF
6148 #define HAVE_KERBEROS 1
6149 EOF
6150
6151
6152 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6153         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6154 fi
6155
6156 ol_link_tls=no
6157 if test $ol_with_tls != no ; then
6158         
6159         for ac_hdr in openssl/ssl.h ssl.h
6160 do
6161 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6162 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6163 echo "configure:6164: checking for $ac_hdr" >&5
6164 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6165   echo $ac_n "(cached) $ac_c" 1>&6
6166 else
6167   cat > conftest.$ac_ext <<EOF
6168 #line 6169 "configure"
6169 #include "confdefs.h"
6170 #include <$ac_hdr>
6171 EOF
6172 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6173 { (eval echo configure:6174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6174 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6175 if test -z "$ac_err"; then
6176   rm -rf conftest*
6177   eval "ac_cv_header_$ac_safe=yes"
6178 else
6179   echo "$ac_err" >&5
6180   echo "configure: failed program was:" >&5
6181   cat conftest.$ac_ext >&5
6182   rm -rf conftest*
6183   eval "ac_cv_header_$ac_safe=no"
6184 fi
6185 rm -f conftest*
6186 fi
6187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6188   echo "$ac_t""yes" 1>&6
6189     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6190   cat >> confdefs.h <<EOF
6191 #define $ac_tr_hdr 1
6192 EOF
6193  
6194 else
6195   echo "$ac_t""no" 1>&6
6196 fi
6197 done
6198
6199         
6200         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6201                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6202 echo "configure:6203: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6203 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6204 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6205   echo $ac_n "(cached) $ac_c" 1>&6
6206 else
6207   ac_save_LIBS="$LIBS"
6208 LIBS="-lssl -lcrypto $LIBS"
6209 cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 /* Override any gcc2 internal prototype to avoid an error.  */
6213 /* We use char because int might match the return type of a gcc2
6214     builtin and then its argument prototype would still apply.  */
6215 char SSLeay_add_ssl_algorithms();
6216
6217 int main() {
6218 SSLeay_add_ssl_algorithms()
6219 ; return 0; }
6220 EOF
6221 if { (eval echo configure:6222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6222   rm -rf conftest*
6223   eval "ac_cv_lib_$ac_lib_var=yes"
6224 else
6225   echo "configure: failed program was:" >&5
6226   cat conftest.$ac_ext >&5
6227   rm -rf conftest*
6228   eval "ac_cv_lib_$ac_lib_var=no"
6229 fi
6230 rm -f conftest*
6231 LIBS="$ac_save_LIBS"
6232
6233 fi
6234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6235   echo "$ac_t""yes" 1>&6
6236   have_ssleay=yes
6237                         need_rsaref=no
6238 else
6239   echo "$ac_t""no" 1>&6
6240 have_ssleay=no
6241 fi
6242
6243                         
6244                 if test $have_ssleay = no ; then
6245                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6246 echo "configure:6247: checking for SSL_library_init in -lssl" >&5
6247 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6248 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6249   echo $ac_n "(cached) $ac_c" 1>&6
6250 else
6251   ac_save_LIBS="$LIBS"
6252 LIBS="-lssl -lcrypto $LIBS"
6253 cat > conftest.$ac_ext <<EOF
6254 #line 6255 "configure"
6255 #include "confdefs.h"
6256 /* Override any gcc2 internal prototype to avoid an error.  */
6257 /* We use char because int might match the return type of a gcc2
6258     builtin and then its argument prototype would still apply.  */
6259 char SSL_library_init();
6260
6261 int main() {
6262 SSL_library_init()
6263 ; return 0; }
6264 EOF
6265 if { (eval echo configure:6266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6266   rm -rf conftest*
6267   eval "ac_cv_lib_$ac_lib_var=yes"
6268 else
6269   echo "configure: failed program was:" >&5
6270   cat conftest.$ac_ext >&5
6271   rm -rf conftest*
6272   eval "ac_cv_lib_$ac_lib_var=no"
6273 fi
6274 rm -f conftest*
6275 LIBS="$ac_save_LIBS"
6276
6277 fi
6278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6279   echo "$ac_t""yes" 1>&6
6280   have_ssleay=yes
6281                                 need_rsaref=no
6282 else
6283   echo "$ac_t""no" 1>&6
6284 have_ssleay=no
6285 fi
6286
6287                 fi
6288
6289                 if test $have_ssleay = no ; then
6290                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6291 echo "configure:6292: checking for ssl3_accept in -lssl" >&5
6292 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6293 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6294   echo $ac_n "(cached) $ac_c" 1>&6
6295 else
6296   ac_save_LIBS="$LIBS"
6297 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6298 cat > conftest.$ac_ext <<EOF
6299 #line 6300 "configure"
6300 #include "confdefs.h"
6301 /* Override any gcc2 internal prototype to avoid an error.  */
6302 /* We use char because int might match the return type of a gcc2
6303     builtin and then its argument prototype would still apply.  */
6304 char ssl3_accept();
6305
6306 int main() {
6307 ssl3_accept()
6308 ; return 0; }
6309 EOF
6310 if { (eval echo configure:6311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6311   rm -rf conftest*
6312   eval "ac_cv_lib_$ac_lib_var=yes"
6313 else
6314   echo "configure: failed program was:" >&5
6315   cat conftest.$ac_ext >&5
6316   rm -rf conftest*
6317   eval "ac_cv_lib_$ac_lib_var=no"
6318 fi
6319 rm -f conftest*
6320 LIBS="$ac_save_LIBS"
6321
6322 fi
6323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6324   echo "$ac_t""yes" 1>&6
6325   have_ssleay=yes
6326                                 need_rsaref=yes
6327 else
6328   echo "$ac_t""no" 1>&6
6329 have_ssleay=no
6330 fi
6331
6332                 fi
6333
6334                 if test $have_ssleay = yes ; then
6335                         ol_with_tls=found
6336                         ol_link_tls=yes
6337
6338                         cat >> confdefs.h <<\EOF
6339 #define HAVE_SSLEAY 1
6340 EOF
6341
6342
6343                         if test $need_rsaref = yes; then
6344                                 cat >> confdefs.h <<\EOF
6345 #define HAVE_RSAREF 1
6346 EOF
6347
6348
6349                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6350                         else
6351                                 TLS_LIBS="-lssl -lcrypto"
6352                         fi
6353                 fi
6354         fi
6355 fi
6356
6357 if test $ol_link_tls = yes ; then
6358         cat >> confdefs.h <<\EOF
6359 #define HAVE_TLS 1
6360 EOF
6361
6362 fi      
6363
6364 for ac_func in \
6365         ctime_r                 \
6366         gethostbyname_r gethostbyaddr_r \
6367
6368 do
6369 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6370 echo "configure:6371: checking for $ac_func" >&5
6371 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6372   echo $ac_n "(cached) $ac_c" 1>&6
6373 else
6374   cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 /* System header to define __stub macros and hopefully few prototypes,
6378     which can conflict with char $ac_func(); below.  */
6379 #include <assert.h>
6380 /* Override any gcc2 internal prototype to avoid an error.  */
6381 /* We use char because int might match the return type of a gcc2
6382     builtin and then its argument prototype would still apply.  */
6383 char $ac_func();
6384 char (*f)();
6385
6386 int main() {
6387
6388 /* The GNU C library defines this for functions which it implements
6389     to always fail with ENOSYS.  Some functions are actually named
6390     something starting with __ and the normal name is an alias.  */
6391 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6392 choke me
6393 #else
6394 f = $ac_func;
6395 #endif
6396
6397 ; return 0; }
6398 EOF
6399 if { (eval echo configure:6400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6400   rm -rf conftest*
6401   eval "ac_cv_func_$ac_func=yes"
6402 else
6403   echo "configure: failed program was:" >&5
6404   cat conftest.$ac_ext >&5
6405   rm -rf conftest*
6406   eval "ac_cv_func_$ac_func=no"
6407 fi
6408 rm -f conftest*
6409 fi
6410
6411 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6412   echo "$ac_t""yes" 1>&6
6413     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6414   cat >> confdefs.h <<EOF
6415 #define $ac_tr_func 1
6416 EOF
6417  
6418 else
6419   echo "$ac_t""no" 1>&6
6420 fi
6421 done
6422
6423
6424 if test "$ac_cv_func_ctime_r" = no ; then
6425         ol_cv_func_ctime_r_nargs=0
6426 else
6427         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6428 echo "configure:6429: checking number of arguments of ctime_r" >&5
6429 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6430   echo $ac_n "(cached) $ac_c" 1>&6
6431 else
6432   cat > conftest.$ac_ext <<EOF
6433 #line 6434 "configure"
6434 #include "confdefs.h"
6435 #include <time.h>
6436 int main() {
6437 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6438 ; return 0; }
6439 EOF
6440 if { (eval echo configure:6441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6441   rm -rf conftest*
6442   ol_cv_func_ctime_r_nargs=3
6443 else
6444   echo "configure: failed program was:" >&5
6445   cat conftest.$ac_ext >&5
6446   rm -rf conftest*
6447   cat > conftest.$ac_ext <<EOF
6448 #line 6449 "configure"
6449 #include "confdefs.h"
6450 #include <time.h>
6451 int main() {
6452 time_t ti; char *buffer; ctime_r(&ti,buffer);
6453 ; return 0; }
6454 EOF
6455 if { (eval echo configure:6456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6456   rm -rf conftest*
6457   ol_cv_func_ctime_r_nargs=2
6458 else
6459   echo "configure: failed program was:" >&5
6460   cat conftest.$ac_ext >&5
6461   rm -rf conftest*
6462   ol_cv_func_ctime_r_nargs=0
6463 fi
6464 rm -f conftest*
6465 fi
6466 rm -f conftest*
6467 fi
6468
6469 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6470   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6471     cat >> confdefs.h <<EOF
6472 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6473 EOF
6474
6475   fi
6476
6477 fi
6478
6479 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6480         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6481 echo "configure:6482: checking number of arguments of gethostbyname_r" >&5
6482 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6483   echo $ac_n "(cached) $ac_c" 1>&6
6484 else
6485   cat > conftest.$ac_ext <<EOF
6486 #line 6487 "configure"
6487 #include "confdefs.h"
6488 #include <sys/types.h>
6489 #include <sys/socket.h>
6490 #include <netinet/in.h>
6491 #include <netdb.h>
6492 #define BUFSIZE (sizeof(struct hostent)+10)
6493 int main() {
6494 struct hostent hent; char buffer[BUFSIZE];
6495                 int bufsize=BUFSIZE;int h_errno;
6496                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6497                         buffer, bufsize, &h_errno);
6498 ; return 0; }
6499 EOF
6500 if { (eval echo configure:6501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6501   rm -rf conftest*
6502   ol_cv_func_gethostbyname_r_nargs=5
6503 else
6504   echo "configure: failed program was:" >&5
6505   cat conftest.$ac_ext >&5
6506   rm -rf conftest*
6507   cat > conftest.$ac_ext <<EOF
6508 #line 6509 "configure"
6509 #include "confdefs.h"
6510 #include <sys/types.h>
6511 #include <sys/socket.h>
6512 #include <netinet/in.h>
6513 #include <netdb.h>
6514 #define BUFSIZE (sizeof(struct hostent)+10)
6515 int main() {
6516 struct hostent hent;struct hostent *rhent;
6517                         char buffer[BUFSIZE];
6518                         int bufsize=BUFSIZE;int h_errno;
6519                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6520                                 &rhent, &h_errno);
6521 ; return 0; }
6522 EOF
6523 if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6524   rm -rf conftest*
6525   ol_cv_func_gethostbyname_r_nargs=6
6526 else
6527   echo "configure: failed program was:" >&5
6528   cat conftest.$ac_ext >&5
6529   rm -rf conftest*
6530   ol_cv_func_gethostbyname_r_nargs=0
6531 fi
6532 rm -f conftest*
6533 fi
6534 rm -f conftest*
6535 fi
6536
6537 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6538   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6539         cat >> confdefs.h <<EOF
6540 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6541 EOF
6542
6543   fi
6544
6545 else
6546         ol_cv_func_gethostbyname_r_nargs=0
6547 fi
6548  
6549 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6550         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6551 echo "configure:6552: checking number of arguments of gethostbyaddr_r" >&5
6552 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6553   echo $ac_n "(cached) $ac_c" 1>&6
6554 else
6555   cat > conftest.$ac_ext <<EOF
6556 #line 6557 "configure"
6557 #include "confdefs.h"
6558 #include <sys/types.h>
6559 #include <sys/socket.h>
6560 #include <netinet/in.h>
6561 #include <netdb.h>
6562 #define BUFSIZE (sizeof(struct hostent)+10)
6563 int main() {
6564 struct hostent hent; char buffer[BUFSIZE]; 
6565             struct in_addr add;
6566             size_t alen=sizeof(struct in_addr);
6567             int bufsize=BUFSIZE;int h_errno;
6568                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6569                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6570 ; return 0; }
6571 EOF
6572 if { (eval echo configure:6573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6573   rm -rf conftest*
6574   ol_cv_func_gethostbyaddr_r_nargs=7
6575 else
6576   echo "configure: failed program was:" >&5
6577   cat conftest.$ac_ext >&5
6578   rm -rf conftest*
6579   cat > conftest.$ac_ext <<EOF
6580 #line 6581 "configure"
6581 #include "confdefs.h"
6582 #include <sys/types.h>
6583 #include <sys/socket.h>
6584 #include <netinet/in.h>
6585 #include <netdb.h>
6586 #define BUFSIZE (sizeof(struct hostent)+10)
6587 int main() {
6588 struct hostent hent;
6589                         struct hostent *rhent; char buffer[BUFSIZE]; 
6590                         struct in_addr add;
6591                         size_t alen=sizeof(struct in_addr);
6592                         int bufsize=BUFSIZE;int h_errno;
6593                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6594                                 alen, AF_INET, &hent, buffer, bufsize, 
6595                                 &rhent, &h_errno);
6596 ; return 0; }
6597 EOF
6598 if { (eval echo configure:6599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6599   rm -rf conftest*
6600   ol_cv_func_gethostbyaddr_r_nargs=8
6601 else
6602   echo "configure: failed program was:" >&5
6603   cat conftest.$ac_ext >&5
6604   rm -rf conftest*
6605   ol_cv_func_gethostbyaddr_r_nargs=0
6606 fi
6607 rm -f conftest*
6608 fi
6609 rm -f conftest*
6610 fi
6611
6612 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6613   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6614     cat >> confdefs.h <<EOF
6615 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6616 EOF
6617
6618   fi
6619
6620 else
6621         ol_cv_func_gethostbyaddr_r_nargs=0
6622 fi
6623
6624 if test "$ac_cv_func_ctime_r" = yes \
6625         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6626         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6627         -a "$ac_cv_func_gethostbyname_r" = yes \
6628         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6629         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6630         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6631         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6632         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6633         ; then
6634  
6635         cat >> confdefs.h <<\EOF
6636 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6637 EOF
6638
6639 fi
6640
6641 ol_link_threads=no
6642
6643 if test "$ac_cv_mingw32" = yes ; then
6644     ol_link_threads=nt
6645     ol_with_threads=found
6646     ol_with_yielding_select=yes
6647     echo $ac_n "checking for NT threads""... $ac_c" 1>&6
6648 echo "configure:6649: checking for NT threads" >&5
6649     echo "$ac_t""yes" 1>&6
6650     cat >> confdefs.h <<\EOF
6651 #define HAVE_NT_THREADS 1
6652 EOF
6653
6654 fi
6655
6656 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6657         -o $ol_with_threads = posix ; then
6658
6659         for ac_hdr in pthread.h
6660 do
6661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6663 echo "configure:6664: checking for $ac_hdr" >&5
6664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 #include <$ac_hdr>
6671 EOF
6672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6673 { (eval echo configure:6674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6675 if test -z "$ac_err"; then
6676   rm -rf conftest*
6677   eval "ac_cv_header_$ac_safe=yes"
6678 else
6679   echo "$ac_err" >&5
6680   echo "configure: failed program was:" >&5
6681   cat conftest.$ac_ext >&5
6682   rm -rf conftest*
6683   eval "ac_cv_header_$ac_safe=no"
6684 fi
6685 rm -f conftest*
6686 fi
6687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6688   echo "$ac_t""yes" 1>&6
6689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6690   cat >> confdefs.h <<EOF
6691 #define $ac_tr_hdr 1
6692 EOF
6693  
6694 else
6695   echo "$ac_t""no" 1>&6
6696 fi
6697 done
6698
6699
6700         if test $ac_cv_header_pthread_h = yes ; then
6701                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6702 echo "configure:6703: checking POSIX thread version" >&5
6703 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6704   echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706   
6707         cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710
6711 #               include <pthread.h>
6712                 /* this check could be improved */
6713 #               ifdef PTHREAD_ONCE_INIT
6714                         pthread_version_final;
6715 #               endif
6716         
6717 EOF
6718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6719   egrep "pthread_version_final" >/dev/null 2>&1; then
6720   rm -rf conftest*
6721   ol_pthread_final=yes
6722 else
6723   rm -rf conftest*
6724   ol_pthread_final=no
6725 fi
6726 rm -f conftest*
6727
6728
6729         cat > conftest.$ac_ext <<EOF
6730 #line 6731 "configure"
6731 #include "confdefs.h"
6732
6733 #               include <pthread.h>
6734                 /* this check could be improved */
6735 #               ifdef pthread_once_init
6736                         pthread_version_draft4;
6737 #               endif
6738         
6739 EOF
6740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6741   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6742   rm -rf conftest*
6743   ol_pthread_draft4=yes
6744 else
6745   rm -rf conftest*
6746   ol_pthread_draft4=no
6747 fi
6748 rm -f conftest*
6749
6750
6751         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6752                 ol_cv_pthread_version=final
6753         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6754                 ol_cv_pthread_version=draft4
6755         else
6756                 ol_cv_pthread_version=unknown
6757         fi
6758
6759 fi
6760
6761 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6762
6763
6764                 if test $ol_cv_pthread_version = final ; then
6765                         cat >> confdefs.h <<\EOF
6766 #define HAVE_PTHREADS_FINAL 1
6767 EOF
6768
6769                 elif test $ol_cv_pthread_version = draft4 ; then
6770                         cat >> confdefs.h <<\EOF
6771 #define HAVE_PTHREADS_D4 1
6772 EOF
6773
6774                 else
6775                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6776                 fi
6777
6778                 # consider threads found
6779                 ol_with_threads=found
6780
6781                 
6782         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6783 echo "configure:6784: checking for LinuxThreads pthread.h" >&5
6784 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6785   echo $ac_n "(cached) $ac_c" 1>&6
6786 else
6787   cat > conftest.$ac_ext <<EOF
6788 #line 6789 "configure"
6789 #include "confdefs.h"
6790 #include <pthread.h>
6791 EOF
6792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6793   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6794   rm -rf conftest*
6795   ol_cv_header_linux_threads=yes
6796 else
6797   rm -rf conftest*
6798   ol_cv_header_linux_threads=no
6799 fi
6800 rm -f conftest*
6801
6802                 
6803 fi
6804
6805 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6806         if test $ol_cv_header_linux_threads = yes; then
6807                 cat >> confdefs.h <<\EOF
6808 #define HAVE_LINUX_THREADS 1
6809 EOF
6810
6811         fi
6812
6813                 
6814         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6815 echo "configure:6816: checking for GNU Pth pthread.h" >&5
6816 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6817   echo $ac_n "(cached) $ac_c" 1>&6
6818 else
6819   cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822 #include <pthread.h>
6823 #ifdef _POSIX_THREAD_IS_GNU_PTH
6824         __gnu_pth__;
6825 #endif
6826
6827 EOF
6828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6829   egrep "__gnu_pth__" >/dev/null 2>&1; then
6830   rm -rf conftest*
6831   ol_cv_header_gnu_pth_pthread_h=yes
6832 else
6833   rm -rf conftest*
6834   ol_cv_header_gnu_pth_pthread_h=no
6835 fi
6836 rm -f conftest*
6837
6838                 
6839 fi
6840
6841 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6842
6843
6844                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6845                         for ac_hdr in sched.h
6846 do
6847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6849 echo "configure:6850: checking for $ac_hdr" >&5
6850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6851   echo $ac_n "(cached) $ac_c" 1>&6
6852 else
6853   cat > conftest.$ac_ext <<EOF
6854 #line 6855 "configure"
6855 #include "confdefs.h"
6856 #include <$ac_hdr>
6857 EOF
6858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6859 { (eval echo configure:6860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6861 if test -z "$ac_err"; then
6862   rm -rf conftest*
6863   eval "ac_cv_header_$ac_safe=yes"
6864 else
6865   echo "$ac_err" >&5
6866   echo "configure: failed program was:" >&5
6867   cat conftest.$ac_ext >&5
6868   rm -rf conftest*
6869   eval "ac_cv_header_$ac_safe=no"
6870 fi
6871 rm -f conftest*
6872 fi
6873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6874   echo "$ac_t""yes" 1>&6
6875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6876   cat >> confdefs.h <<EOF
6877 #define $ac_tr_hdr 1
6878 EOF
6879  
6880 else
6881   echo "$ac_t""no" 1>&6
6882 fi
6883 done
6884
6885                 fi
6886
6887                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6888                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6889 echo "configure:6890: checking for pthread_create in default libraries" >&5
6890 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6891   echo $ac_n "(cached) $ac_c" 1>&6
6892 else
6893   
6894                 if test "$cross_compiling" = yes; then
6895   cat > conftest.$ac_ext <<EOF
6896 #line 6897 "configure"
6897 #include "confdefs.h"
6898 /* pthread test headers */
6899 #include <pthread.h>
6900 #ifndef NULL
6901 #define NULL (void*)0
6902 #endif
6903
6904 static void *task(p)
6905         void *p;
6906 {
6907         return (void *) (p == NULL);
6908 }
6909
6910 int main() {
6911
6912         /* pthread test function */
6913         pthread_t t;
6914         int status;
6915
6916         /* make sure pthread_create() isn't just a stub */
6917 #if HAVE_PTHREADS_D4
6918         status = pthread_create(&t, pthread_attr_default, task, NULL);
6919 #else
6920         status = pthread_create(&t, NULL, task, NULL);
6921 #endif
6922
6923         if( status ) exit( status );
6924
6925         /* make sure pthread_detach() isn't just a stub */
6926 #if HAVE_PTHREADS_D4
6927         status = pthread_detach( &t );
6928 #else
6929         status = pthread_detach( t );
6930 #endif
6931
6932 #ifdef HAVE_LINUX_THREADS
6933         pthread_kill_other_threads_np();
6934 #endif
6935
6936         exit( status );
6937
6938 ; return 0; }
6939 EOF
6940 if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6941   rm -rf conftest*
6942   ol_cv_pthread_create=yes
6943 else
6944   echo "configure: failed program was:" >&5
6945   cat conftest.$ac_ext >&5
6946   rm -rf conftest*
6947   ol_cv_pthread_create=no
6948 fi
6949 rm -f conftest*
6950 else
6951   cat > conftest.$ac_ext <<EOF
6952 #line 6953 "configure"
6953 #include "confdefs.h"
6954 /* pthread test headers */
6955 #include <pthread.h>
6956 #ifndef NULL
6957 #define NULL (void*)0
6958 #endif
6959
6960 static void *task(p)
6961         void *p;
6962 {
6963         return (void *) (p == NULL);
6964 }
6965
6966
6967 int main(argc, argv)
6968         int argc;
6969         char **argv;
6970 {
6971
6972         /* pthread test function */
6973         pthread_t t;
6974         int status;
6975
6976         /* make sure pthread_create() isn't just a stub */
6977 #if HAVE_PTHREADS_D4
6978         status = pthread_create(&t, pthread_attr_default, task, NULL);
6979 #else
6980         status = pthread_create(&t, NULL, task, NULL);
6981 #endif
6982
6983         if( status ) exit( status );
6984
6985         /* make sure pthread_detach() isn't just a stub */
6986 #if HAVE_PTHREADS_D4
6987         status = pthread_detach( &t );
6988 #else
6989         status = pthread_detach( t );
6990 #endif
6991
6992 #ifdef HAVE_LINUX_THREADS
6993         pthread_kill_other_threads_np();
6994 #endif
6995
6996         exit( status );
6997
6998 }
6999
7000 EOF
7001 if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7002 then
7003   ol_cv_pthread_create=yes
7004 else
7005   echo "configure: failed program was:" >&5
7006   cat conftest.$ac_ext >&5
7007   rm -fr conftest*
7008   ol_cv_pthread_create=no
7009 fi
7010 rm -fr conftest*
7011 fi
7012
7013 fi
7014
7015 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7016
7017                 if test $ol_cv_pthread_create != no ; then
7018                         ol_link_threads=posix
7019                         ol_link_pthreads=""
7020                 fi
7021                 
7022                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7023 if test "$ol_link_threads" = no ; then
7024         # try -kthread
7025         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7026 echo "configure:7027: checking for pthread link with -kthread" >&5
7027 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030   
7031                 # save the flags
7032                 ol_LIBS="$LIBS"
7033                 LIBS="-kthread $LIBS"
7034
7035                 if test "$cross_compiling" = yes; then
7036   cat > conftest.$ac_ext <<EOF
7037 #line 7038 "configure"
7038 #include "confdefs.h"
7039 /* pthread test headers */
7040 #include <pthread.h>
7041 #ifndef NULL
7042 #define NULL (void*)0
7043 #endif
7044
7045 static void *task(p)
7046         void *p;
7047 {
7048         return (void *) (p == NULL);
7049 }
7050
7051 int main() {
7052
7053         /* pthread test function */
7054         pthread_t t;
7055         int status;
7056
7057         /* make sure pthread_create() isn't just a stub */
7058 #if HAVE_PTHREADS_D4
7059         status = pthread_create(&t, pthread_attr_default, task, NULL);
7060 #else
7061         status = pthread_create(&t, NULL, task, NULL);
7062 #endif
7063
7064         if( status ) exit( status );
7065
7066         /* make sure pthread_detach() isn't just a stub */
7067 #if HAVE_PTHREADS_D4
7068         status = pthread_detach( &t );
7069 #else
7070         status = pthread_detach( t );
7071 #endif
7072
7073 #ifdef HAVE_LINUX_THREADS
7074         pthread_kill_other_threads_np();
7075 #endif
7076
7077         exit( status );
7078
7079 ; return 0; }
7080 EOF
7081 if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7082   rm -rf conftest*
7083   ol_cv_pthread_kthread=yes
7084 else
7085   echo "configure: failed program was:" >&5
7086   cat conftest.$ac_ext >&5
7087   rm -rf conftest*
7088   ol_cv_pthread_kthread=no
7089 fi
7090 rm -f conftest*
7091 else
7092   cat > conftest.$ac_ext <<EOF
7093 #line 7094 "configure"
7094 #include "confdefs.h"
7095 /* pthread test headers */
7096 #include <pthread.h>
7097 #ifndef NULL
7098 #define NULL (void*)0
7099 #endif
7100
7101 static void *task(p)
7102         void *p;
7103 {
7104         return (void *) (p == NULL);
7105 }
7106
7107
7108 int main(argc, argv)
7109         int argc;
7110         char **argv;
7111 {
7112
7113         /* pthread test function */
7114         pthread_t t;
7115         int status;
7116
7117         /* make sure pthread_create() isn't just a stub */
7118 #if HAVE_PTHREADS_D4
7119         status = pthread_create(&t, pthread_attr_default, task, NULL);
7120 #else
7121         status = pthread_create(&t, NULL, task, NULL);
7122 #endif
7123
7124         if( status ) exit( status );
7125
7126         /* make sure pthread_detach() isn't just a stub */
7127 #if HAVE_PTHREADS_D4
7128         status = pthread_detach( &t );
7129 #else
7130         status = pthread_detach( t );
7131 #endif
7132
7133 #ifdef HAVE_LINUX_THREADS
7134         pthread_kill_other_threads_np();
7135 #endif
7136
7137         exit( status );
7138
7139 }
7140
7141 EOF
7142 if { (eval echo configure:7143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7143 then
7144   ol_cv_pthread_kthread=yes
7145 else
7146   echo "configure: failed program was:" >&5
7147   cat conftest.$ac_ext >&5
7148   rm -fr conftest*
7149   ol_cv_pthread_kthread=no
7150 fi
7151 rm -fr conftest*
7152 fi
7153
7154
7155                 # restore the LIBS
7156                 LIBS="$ol_LIBS"
7157         
7158 fi
7159
7160 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7161
7162         if test $ol_cv_pthread_kthread = yes ; then
7163                 ol_link_pthreads="-kthread"
7164                 ol_link_threads=posix
7165         fi
7166 fi
7167
7168                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7169 if test "$ol_link_threads" = no ; then
7170         # try -pthread
7171         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7172 echo "configure:7173: checking for pthread link with -pthread" >&5
7173 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7174   echo $ac_n "(cached) $ac_c" 1>&6
7175 else
7176   
7177                 # save the flags
7178                 ol_LIBS="$LIBS"
7179                 LIBS="-pthread $LIBS"
7180
7181                 if test "$cross_compiling" = yes; then
7182   cat > conftest.$ac_ext <<EOF
7183 #line 7184 "configure"
7184 #include "confdefs.h"
7185 /* pthread test headers */
7186 #include <pthread.h>
7187 #ifndef NULL
7188 #define NULL (void*)0
7189 #endif
7190
7191 static void *task(p)
7192         void *p;
7193 {
7194         return (void *) (p == NULL);
7195 }
7196
7197 int main() {
7198
7199         /* pthread test function */
7200         pthread_t t;
7201         int status;
7202
7203         /* make sure pthread_create() isn't just a stub */
7204 #if HAVE_PTHREADS_D4
7205         status = pthread_create(&t, pthread_attr_default, task, NULL);
7206 #else
7207         status = pthread_create(&t, NULL, task, NULL);
7208 #endif
7209
7210         if( status ) exit( status );
7211
7212         /* make sure pthread_detach() isn't just a stub */
7213 #if HAVE_PTHREADS_D4
7214         status = pthread_detach( &t );
7215 #else
7216         status = pthread_detach( t );
7217 #endif
7218
7219 #ifdef HAVE_LINUX_THREADS
7220         pthread_kill_other_threads_np();
7221 #endif
7222
7223         exit( status );
7224
7225 ; return 0; }
7226 EOF
7227 if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7228   rm -rf conftest*
7229   ol_cv_pthread_pthread=yes
7230 else
7231   echo "configure: failed program was:" >&5
7232   cat conftest.$ac_ext >&5
7233   rm -rf conftest*
7234   ol_cv_pthread_pthread=no
7235 fi
7236 rm -f conftest*
7237 else
7238   cat > conftest.$ac_ext <<EOF
7239 #line 7240 "configure"
7240 #include "confdefs.h"
7241 /* pthread test headers */
7242 #include <pthread.h>
7243 #ifndef NULL
7244 #define NULL (void*)0
7245 #endif
7246
7247 static void *task(p)
7248         void *p;
7249 {
7250         return (void *) (p == NULL);
7251 }
7252
7253
7254 int main(argc, argv)
7255         int argc;
7256         char **argv;
7257 {
7258
7259         /* pthread test function */
7260         pthread_t t;
7261         int status;
7262
7263         /* make sure pthread_create() isn't just a stub */
7264 #if HAVE_PTHREADS_D4
7265         status = pthread_create(&t, pthread_attr_default, task, NULL);
7266 #else
7267         status = pthread_create(&t, NULL, task, NULL);
7268 #endif
7269
7270         if( status ) exit( status );
7271
7272         /* make sure pthread_detach() isn't just a stub */
7273 #if HAVE_PTHREADS_D4
7274         status = pthread_detach( &t );
7275 #else
7276         status = pthread_detach( t );
7277 #endif
7278
7279 #ifdef HAVE_LINUX_THREADS
7280         pthread_kill_other_threads_np();
7281 #endif
7282
7283         exit( status );
7284
7285 }
7286
7287 EOF
7288 if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7289 then
7290   ol_cv_pthread_pthread=yes
7291 else
7292   echo "configure: failed program was:" >&5
7293   cat conftest.$ac_ext >&5
7294   rm -fr conftest*
7295   ol_cv_pthread_pthread=no
7296 fi
7297 rm -fr conftest*
7298 fi
7299
7300
7301                 # restore the LIBS
7302                 LIBS="$ol_LIBS"
7303         
7304 fi
7305
7306 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7307
7308         if test $ol_cv_pthread_pthread = yes ; then
7309                 ol_link_pthreads="-pthread"
7310                 ol_link_threads=posix
7311         fi
7312 fi
7313
7314                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7315 if test "$ol_link_threads" = no ; then
7316         # try -pthreads
7317         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7318 echo "configure:7319: checking for pthread link with -pthreads" >&5
7319 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7320   echo $ac_n "(cached) $ac_c" 1>&6
7321 else
7322   
7323                 # save the flags
7324                 ol_LIBS="$LIBS"
7325                 LIBS="-pthreads $LIBS"
7326
7327                 if test "$cross_compiling" = yes; then
7328   cat > conftest.$ac_ext <<EOF
7329 #line 7330 "configure"
7330 #include "confdefs.h"
7331 /* pthread test headers */
7332 #include <pthread.h>
7333 #ifndef NULL
7334 #define NULL (void*)0
7335 #endif
7336
7337 static void *task(p)
7338         void *p;
7339 {
7340         return (void *) (p == NULL);
7341 }
7342
7343 int main() {
7344
7345         /* pthread test function */
7346         pthread_t t;
7347         int status;
7348
7349         /* make sure pthread_create() isn't just a stub */
7350 #if HAVE_PTHREADS_D4
7351         status = pthread_create(&t, pthread_attr_default, task, NULL);
7352 #else
7353         status = pthread_create(&t, NULL, task, NULL);
7354 #endif
7355
7356         if( status ) exit( status );
7357
7358         /* make sure pthread_detach() isn't just a stub */
7359 #if HAVE_PTHREADS_D4
7360         status = pthread_detach( &t );
7361 #else
7362         status = pthread_detach( t );
7363 #endif
7364
7365 #ifdef HAVE_LINUX_THREADS
7366         pthread_kill_other_threads_np();
7367 #endif
7368
7369         exit( status );
7370
7371 ; return 0; }
7372 EOF
7373 if { (eval echo configure:7374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7374   rm -rf conftest*
7375   ol_cv_pthread_pthreads=yes
7376 else
7377   echo "configure: failed program was:" >&5
7378   cat conftest.$ac_ext >&5
7379   rm -rf conftest*
7380   ol_cv_pthread_pthreads=no
7381 fi
7382 rm -f conftest*
7383 else
7384   cat > conftest.$ac_ext <<EOF
7385 #line 7386 "configure"
7386 #include "confdefs.h"
7387 /* pthread test headers */
7388 #include <pthread.h>
7389 #ifndef NULL
7390 #define NULL (void*)0
7391 #endif
7392
7393 static void *task(p)
7394         void *p;
7395 {
7396         return (void *) (p == NULL);
7397 }
7398
7399
7400 int main(argc, argv)
7401         int argc;
7402         char **argv;
7403 {
7404
7405         /* pthread test function */
7406         pthread_t t;
7407         int status;
7408
7409         /* make sure pthread_create() isn't just a stub */
7410 #if HAVE_PTHREADS_D4
7411         status = pthread_create(&t, pthread_attr_default, task, NULL);
7412 #else
7413         status = pthread_create(&t, NULL, task, NULL);
7414 #endif
7415
7416         if( status ) exit( status );
7417
7418         /* make sure pthread_detach() isn't just a stub */
7419 #if HAVE_PTHREADS_D4
7420         status = pthread_detach( &t );
7421 #else
7422         status = pthread_detach( t );
7423 #endif
7424
7425 #ifdef HAVE_LINUX_THREADS
7426         pthread_kill_other_threads_np();
7427 #endif
7428
7429         exit( status );
7430
7431 }
7432
7433 EOF
7434 if { (eval echo configure:7435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7435 then
7436   ol_cv_pthread_pthreads=yes
7437 else
7438   echo "configure: failed program was:" >&5
7439   cat conftest.$ac_ext >&5
7440   rm -fr conftest*
7441   ol_cv_pthread_pthreads=no
7442 fi
7443 rm -fr conftest*
7444 fi
7445
7446
7447                 # restore the LIBS
7448                 LIBS="$ol_LIBS"
7449         
7450 fi
7451
7452 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7453
7454         if test $ol_cv_pthread_pthreads = yes ; then
7455                 ol_link_pthreads="-pthreads"
7456                 ol_link_threads=posix
7457         fi
7458 fi
7459
7460                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7461 if test "$ol_link_threads" = no ; then
7462         # try -mthreads
7463         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7464 echo "configure:7465: checking for pthread link with -mthreads" >&5
7465 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7466   echo $ac_n "(cached) $ac_c" 1>&6
7467 else
7468   
7469                 # save the flags
7470                 ol_LIBS="$LIBS"
7471                 LIBS="-mthreads $LIBS"
7472
7473                 if test "$cross_compiling" = yes; then
7474   cat > conftest.$ac_ext <<EOF
7475 #line 7476 "configure"
7476 #include "confdefs.h"
7477 /* pthread test headers */
7478 #include <pthread.h>
7479 #ifndef NULL
7480 #define NULL (void*)0
7481 #endif
7482
7483 static void *task(p)
7484         void *p;
7485 {
7486         return (void *) (p == NULL);
7487 }
7488
7489 int main() {
7490
7491         /* pthread test function */
7492         pthread_t t;
7493         int status;
7494
7495         /* make sure pthread_create() isn't just a stub */
7496 #if HAVE_PTHREADS_D4
7497         status = pthread_create(&t, pthread_attr_default, task, NULL);
7498 #else
7499         status = pthread_create(&t, NULL, task, NULL);
7500 #endif
7501
7502         if( status ) exit( status );
7503
7504         /* make sure pthread_detach() isn't just a stub */
7505 #if HAVE_PTHREADS_D4
7506         status = pthread_detach( &t );
7507 #else
7508         status = pthread_detach( t );
7509 #endif
7510
7511 #ifdef HAVE_LINUX_THREADS
7512         pthread_kill_other_threads_np();
7513 #endif
7514
7515         exit( status );
7516
7517 ; return 0; }
7518 EOF
7519 if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7520   rm -rf conftest*
7521   ol_cv_pthread_mthreads=yes
7522 else
7523   echo "configure: failed program was:" >&5
7524   cat conftest.$ac_ext >&5
7525   rm -rf conftest*
7526   ol_cv_pthread_mthreads=no
7527 fi
7528 rm -f conftest*
7529 else
7530   cat > conftest.$ac_ext <<EOF
7531 #line 7532 "configure"
7532 #include "confdefs.h"
7533 /* pthread test headers */
7534 #include <pthread.h>
7535 #ifndef NULL
7536 #define NULL (void*)0
7537 #endif
7538
7539 static void *task(p)
7540         void *p;
7541 {
7542         return (void *) (p == NULL);
7543 }
7544
7545
7546 int main(argc, argv)
7547         int argc;
7548         char **argv;
7549 {
7550
7551         /* pthread test function */
7552         pthread_t t;
7553         int status;
7554
7555         /* make sure pthread_create() isn't just a stub */
7556 #if HAVE_PTHREADS_D4
7557         status = pthread_create(&t, pthread_attr_default, task, NULL);
7558 #else
7559         status = pthread_create(&t, NULL, task, NULL);
7560 #endif
7561
7562         if( status ) exit( status );
7563
7564         /* make sure pthread_detach() isn't just a stub */
7565 #if HAVE_PTHREADS_D4
7566         status = pthread_detach( &t );
7567 #else
7568         status = pthread_detach( t );
7569 #endif
7570
7571 #ifdef HAVE_LINUX_THREADS
7572         pthread_kill_other_threads_np();
7573 #endif
7574
7575         exit( status );
7576
7577 }
7578
7579 EOF
7580 if { (eval echo configure:7581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7581 then
7582   ol_cv_pthread_mthreads=yes
7583 else
7584   echo "configure: failed program was:" >&5
7585   cat conftest.$ac_ext >&5
7586   rm -fr conftest*
7587   ol_cv_pthread_mthreads=no
7588 fi
7589 rm -fr conftest*
7590 fi
7591
7592
7593                 # restore the LIBS
7594                 LIBS="$ol_LIBS"
7595         
7596 fi
7597
7598 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7599
7600         if test $ol_cv_pthread_mthreads = yes ; then
7601                 ol_link_pthreads="-mthreads"
7602                 ol_link_threads=posix
7603         fi
7604 fi
7605
7606                 # Pthread try link: -thread (ol_cv_pthread_thread)
7607 if test "$ol_link_threads" = no ; then
7608         # try -thread
7609         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7610 echo "configure:7611: checking for pthread link with -thread" >&5
7611 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7612   echo $ac_n "(cached) $ac_c" 1>&6
7613 else
7614   
7615                 # save the flags
7616                 ol_LIBS="$LIBS"
7617                 LIBS="-thread $LIBS"
7618
7619                 if test "$cross_compiling" = yes; then
7620   cat > conftest.$ac_ext <<EOF
7621 #line 7622 "configure"
7622 #include "confdefs.h"
7623 /* pthread test headers */
7624 #include <pthread.h>
7625 #ifndef NULL
7626 #define NULL (void*)0
7627 #endif
7628
7629 static void *task(p)
7630         void *p;
7631 {
7632         return (void *) (p == NULL);
7633 }
7634
7635 int main() {
7636
7637         /* pthread test function */
7638         pthread_t t;
7639         int status;
7640
7641         /* make sure pthread_create() isn't just a stub */
7642 #if HAVE_PTHREADS_D4
7643         status = pthread_create(&t, pthread_attr_default, task, NULL);
7644 #else
7645         status = pthread_create(&t, NULL, task, NULL);
7646 #endif
7647
7648         if( status ) exit( status );
7649
7650         /* make sure pthread_detach() isn't just a stub */
7651 #if HAVE_PTHREADS_D4
7652         status = pthread_detach( &t );
7653 #else
7654         status = pthread_detach( t );
7655 #endif
7656
7657 #ifdef HAVE_LINUX_THREADS
7658         pthread_kill_other_threads_np();
7659 #endif
7660
7661         exit( status );
7662
7663 ; return 0; }
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7666   rm -rf conftest*
7667   ol_cv_pthread_thread=yes
7668 else
7669   echo "configure: failed program was:" >&5
7670   cat conftest.$ac_ext >&5
7671   rm -rf conftest*
7672   ol_cv_pthread_thread=no
7673 fi
7674 rm -f conftest*
7675 else
7676   cat > conftest.$ac_ext <<EOF
7677 #line 7678 "configure"
7678 #include "confdefs.h"
7679 /* pthread test headers */
7680 #include <pthread.h>
7681 #ifndef NULL
7682 #define NULL (void*)0
7683 #endif
7684
7685 static void *task(p)
7686         void *p;
7687 {
7688         return (void *) (p == NULL);
7689 }
7690
7691
7692 int main(argc, argv)
7693         int argc;
7694         char **argv;
7695 {
7696
7697         /* pthread test function */
7698         pthread_t t;
7699         int status;
7700
7701         /* make sure pthread_create() isn't just a stub */
7702 #if HAVE_PTHREADS_D4
7703         status = pthread_create(&t, pthread_attr_default, task, NULL);
7704 #else
7705         status = pthread_create(&t, NULL, task, NULL);
7706 #endif
7707
7708         if( status ) exit( status );
7709
7710         /* make sure pthread_detach() isn't just a stub */
7711 #if HAVE_PTHREADS_D4
7712         status = pthread_detach( &t );
7713 #else
7714         status = pthread_detach( t );
7715 #endif
7716
7717 #ifdef HAVE_LINUX_THREADS
7718         pthread_kill_other_threads_np();
7719 #endif
7720
7721         exit( status );
7722
7723 }
7724
7725 EOF
7726 if { (eval echo configure:7727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7727 then
7728   ol_cv_pthread_thread=yes
7729 else
7730   echo "configure: failed program was:" >&5
7731   cat conftest.$ac_ext >&5
7732   rm -fr conftest*
7733   ol_cv_pthread_thread=no
7734 fi
7735 rm -fr conftest*
7736 fi
7737
7738
7739                 # restore the LIBS
7740                 LIBS="$ol_LIBS"
7741         
7742 fi
7743
7744 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7745
7746         if test $ol_cv_pthread_thread = yes ; then
7747                 ol_link_pthreads="-thread"
7748                 ol_link_threads=posix
7749         fi
7750 fi
7751
7752
7753                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7754 if test "$ol_link_threads" = no ; then
7755         # try -lpthread -lmach -lexc -lc_r
7756         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7757 echo "configure:7758: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7758 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7759   echo $ac_n "(cached) $ac_c" 1>&6
7760 else
7761   
7762                 # save the flags
7763                 ol_LIBS="$LIBS"
7764                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7765
7766                 if test "$cross_compiling" = yes; then
7767   cat > conftest.$ac_ext <<EOF
7768 #line 7769 "configure"
7769 #include "confdefs.h"
7770 /* pthread test headers */
7771 #include <pthread.h>
7772 #ifndef NULL
7773 #define NULL (void*)0
7774 #endif
7775
7776 static void *task(p)
7777         void *p;
7778 {
7779         return (void *) (p == NULL);
7780 }
7781
7782 int main() {
7783
7784         /* pthread test function */
7785         pthread_t t;
7786         int status;
7787
7788         /* make sure pthread_create() isn't just a stub */
7789 #if HAVE_PTHREADS_D4
7790         status = pthread_create(&t, pthread_attr_default, task, NULL);
7791 #else
7792         status = pthread_create(&t, NULL, task, NULL);
7793 #endif
7794
7795         if( status ) exit( status );
7796
7797         /* make sure pthread_detach() isn't just a stub */
7798 #if HAVE_PTHREADS_D4
7799         status = pthread_detach( &t );
7800 #else
7801         status = pthread_detach( t );
7802 #endif
7803
7804 #ifdef HAVE_LINUX_THREADS
7805         pthread_kill_other_threads_np();
7806 #endif
7807
7808         exit( status );
7809
7810 ; return 0; }
7811 EOF
7812 if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7813   rm -rf conftest*
7814   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7815 else
7816   echo "configure: failed program was:" >&5
7817   cat conftest.$ac_ext >&5
7818   rm -rf conftest*
7819   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7820 fi
7821 rm -f conftest*
7822 else
7823   cat > conftest.$ac_ext <<EOF
7824 #line 7825 "configure"
7825 #include "confdefs.h"
7826 /* pthread test headers */
7827 #include <pthread.h>
7828 #ifndef NULL
7829 #define NULL (void*)0
7830 #endif
7831
7832 static void *task(p)
7833         void *p;
7834 {
7835         return (void *) (p == NULL);
7836 }
7837
7838
7839 int main(argc, argv)
7840         int argc;
7841         char **argv;
7842 {
7843
7844         /* pthread test function */
7845         pthread_t t;
7846         int status;
7847
7848         /* make sure pthread_create() isn't just a stub */
7849 #if HAVE_PTHREADS_D4
7850         status = pthread_create(&t, pthread_attr_default, task, NULL);
7851 #else
7852         status = pthread_create(&t, NULL, task, NULL);
7853 #endif
7854
7855         if( status ) exit( status );
7856
7857         /* make sure pthread_detach() isn't just a stub */
7858 #if HAVE_PTHREADS_D4
7859         status = pthread_detach( &t );
7860 #else
7861         status = pthread_detach( t );
7862 #endif
7863
7864 #ifdef HAVE_LINUX_THREADS
7865         pthread_kill_other_threads_np();
7866 #endif
7867
7868         exit( status );
7869
7870 }
7871
7872 EOF
7873 if { (eval echo configure:7874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7874 then
7875   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7876 else
7877   echo "configure: failed program was:" >&5
7878   cat conftest.$ac_ext >&5
7879   rm -fr conftest*
7880   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7881 fi
7882 rm -fr conftest*
7883 fi
7884
7885
7886                 # restore the LIBS
7887                 LIBS="$ol_LIBS"
7888         
7889 fi
7890
7891 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7892
7893         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7894                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7895                 ol_link_threads=posix
7896         fi
7897 fi
7898
7899                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7900 if test "$ol_link_threads" = no ; then
7901         # try -lpthread -lmach -lexc
7902         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7903 echo "configure:7904: checking for pthread link with -lpthread -lmach -lexc" >&5
7904 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7905   echo $ac_n "(cached) $ac_c" 1>&6
7906 else
7907   
7908                 # save the flags
7909                 ol_LIBS="$LIBS"
7910                 LIBS="-lpthread -lmach -lexc $LIBS"
7911
7912                 if test "$cross_compiling" = yes; then
7913   cat > conftest.$ac_ext <<EOF
7914 #line 7915 "configure"
7915 #include "confdefs.h"
7916 /* pthread test headers */
7917 #include <pthread.h>
7918 #ifndef NULL
7919 #define NULL (void*)0
7920 #endif
7921
7922 static void *task(p)
7923         void *p;
7924 {
7925         return (void *) (p == NULL);
7926 }
7927
7928 int main() {
7929
7930         /* pthread test function */
7931         pthread_t t;
7932         int status;
7933
7934         /* make sure pthread_create() isn't just a stub */
7935 #if HAVE_PTHREADS_D4
7936         status = pthread_create(&t, pthread_attr_default, task, NULL);
7937 #else
7938         status = pthread_create(&t, NULL, task, NULL);
7939 #endif
7940
7941         if( status ) exit( status );
7942
7943         /* make sure pthread_detach() isn't just a stub */
7944 #if HAVE_PTHREADS_D4
7945         status = pthread_detach( &t );
7946 #else
7947         status = pthread_detach( t );
7948 #endif
7949
7950 #ifdef HAVE_LINUX_THREADS
7951         pthread_kill_other_threads_np();
7952 #endif
7953
7954         exit( status );
7955
7956 ; return 0; }
7957 EOF
7958 if { (eval echo configure:7959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7959   rm -rf conftest*
7960   ol_cv_pthread_lpthread_lmach_lexc=yes
7961 else
7962   echo "configure: failed program was:" >&5
7963   cat conftest.$ac_ext >&5
7964   rm -rf conftest*
7965   ol_cv_pthread_lpthread_lmach_lexc=no
7966 fi
7967 rm -f conftest*
7968 else
7969   cat > conftest.$ac_ext <<EOF
7970 #line 7971 "configure"
7971 #include "confdefs.h"
7972 /* pthread test headers */
7973 #include <pthread.h>
7974 #ifndef NULL
7975 #define NULL (void*)0
7976 #endif
7977
7978 static void *task(p)
7979         void *p;
7980 {
7981         return (void *) (p == NULL);
7982 }
7983
7984
7985 int main(argc, argv)
7986         int argc;
7987         char **argv;
7988 {
7989
7990         /* pthread test function */
7991         pthread_t t;
7992         int status;
7993
7994         /* make sure pthread_create() isn't just a stub */
7995 #if HAVE_PTHREADS_D4
7996         status = pthread_create(&t, pthread_attr_default, task, NULL);
7997 #else
7998         status = pthread_create(&t, NULL, task, NULL);
7999 #endif
8000
8001         if( status ) exit( status );
8002
8003         /* make sure pthread_detach() isn't just a stub */
8004 #if HAVE_PTHREADS_D4
8005         status = pthread_detach( &t );
8006 #else
8007         status = pthread_detach( t );
8008 #endif
8009
8010 #ifdef HAVE_LINUX_THREADS
8011         pthread_kill_other_threads_np();
8012 #endif
8013
8014         exit( status );
8015
8016 }
8017
8018 EOF
8019 if { (eval echo configure:8020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8020 then
8021   ol_cv_pthread_lpthread_lmach_lexc=yes
8022 else
8023   echo "configure: failed program was:" >&5
8024   cat conftest.$ac_ext >&5
8025   rm -fr conftest*
8026   ol_cv_pthread_lpthread_lmach_lexc=no
8027 fi
8028 rm -fr conftest*
8029 fi
8030
8031
8032                 # restore the LIBS
8033                 LIBS="$ol_LIBS"
8034         
8035 fi
8036
8037 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8038
8039         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8040                 ol_link_pthreads="-lpthread -lmach -lexc"
8041                 ol_link_threads=posix
8042         fi
8043 fi
8044
8045
8046                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8047 if test "$ol_link_threads" = no ; then
8048         # try -lpthread -Wl,-woff,85
8049         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8050 echo "configure:8051: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8051 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8052   echo $ac_n "(cached) $ac_c" 1>&6
8053 else
8054   
8055                 # save the flags
8056                 ol_LIBS="$LIBS"
8057                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8058
8059                 if test "$cross_compiling" = yes; then
8060   cat > conftest.$ac_ext <<EOF
8061 #line 8062 "configure"
8062 #include "confdefs.h"
8063 /* pthread test headers */
8064 #include <pthread.h>
8065 #ifndef NULL
8066 #define NULL (void*)0
8067 #endif
8068
8069 static void *task(p)
8070         void *p;
8071 {
8072         return (void *) (p == NULL);
8073 }
8074
8075 int main() {
8076
8077         /* pthread test function */
8078         pthread_t t;
8079         int status;
8080
8081         /* make sure pthread_create() isn't just a stub */
8082 #if HAVE_PTHREADS_D4
8083         status = pthread_create(&t, pthread_attr_default, task, NULL);
8084 #else
8085         status = pthread_create(&t, NULL, task, NULL);
8086 #endif
8087
8088         if( status ) exit( status );
8089
8090         /* make sure pthread_detach() isn't just a stub */
8091 #if HAVE_PTHREADS_D4
8092         status = pthread_detach( &t );
8093 #else
8094         status = pthread_detach( t );
8095 #endif
8096
8097 #ifdef HAVE_LINUX_THREADS
8098         pthread_kill_other_threads_np();
8099 #endif
8100
8101         exit( status );
8102
8103 ; return 0; }
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8106   rm -rf conftest*
8107   ol_cv_pthread_lib_lpthread_woff=yes
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -rf conftest*
8112   ol_cv_pthread_lib_lpthread_woff=no
8113 fi
8114 rm -f conftest*
8115 else
8116   cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119 /* pthread test headers */
8120 #include <pthread.h>
8121 #ifndef NULL
8122 #define NULL (void*)0
8123 #endif
8124
8125 static void *task(p)
8126         void *p;
8127 {
8128         return (void *) (p == NULL);
8129 }
8130
8131
8132 int main(argc, argv)
8133         int argc;
8134         char **argv;
8135 {
8136
8137         /* pthread test function */
8138         pthread_t t;
8139         int status;
8140
8141         /* make sure pthread_create() isn't just a stub */
8142 #if HAVE_PTHREADS_D4
8143         status = pthread_create(&t, pthread_attr_default, task, NULL);
8144 #else
8145         status = pthread_create(&t, NULL, task, NULL);
8146 #endif
8147
8148         if( status ) exit( status );
8149
8150         /* make sure pthread_detach() isn't just a stub */
8151 #if HAVE_PTHREADS_D4
8152         status = pthread_detach( &t );
8153 #else
8154         status = pthread_detach( t );
8155 #endif
8156
8157 #ifdef HAVE_LINUX_THREADS
8158         pthread_kill_other_threads_np();
8159 #endif
8160
8161         exit( status );
8162
8163 }
8164
8165 EOF
8166 if { (eval echo configure:8167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8167 then
8168   ol_cv_pthread_lib_lpthread_woff=yes
8169 else
8170   echo "configure: failed program was:" >&5
8171   cat conftest.$ac_ext >&5
8172   rm -fr conftest*
8173   ol_cv_pthread_lib_lpthread_woff=no
8174 fi
8175 rm -fr conftest*
8176 fi
8177
8178
8179                 # restore the LIBS
8180                 LIBS="$ol_LIBS"
8181         
8182 fi
8183
8184 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8185
8186         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8187                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8188                 ol_link_threads=posix
8189         fi
8190 fi
8191
8192
8193                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8194 if test "$ol_link_threads" = no ; then
8195         # try -lpthread
8196         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8197 echo "configure:8198: checking for pthread link with -lpthread" >&5
8198 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8199   echo $ac_n "(cached) $ac_c" 1>&6
8200 else
8201   
8202                 # save the flags
8203                 ol_LIBS="$LIBS"
8204                 LIBS="-lpthread $LIBS"
8205
8206                 if test "$cross_compiling" = yes; then
8207   cat > conftest.$ac_ext <<EOF
8208 #line 8209 "configure"
8209 #include "confdefs.h"
8210 /* pthread test headers */
8211 #include <pthread.h>
8212 #ifndef NULL
8213 #define NULL (void*)0
8214 #endif
8215
8216 static void *task(p)
8217         void *p;
8218 {
8219         return (void *) (p == NULL);
8220 }
8221
8222 int main() {
8223
8224         /* pthread test function */
8225         pthread_t t;
8226         int status;
8227
8228         /* make sure pthread_create() isn't just a stub */
8229 #if HAVE_PTHREADS_D4
8230         status = pthread_create(&t, pthread_attr_default, task, NULL);
8231 #else
8232         status = pthread_create(&t, NULL, task, NULL);
8233 #endif
8234
8235         if( status ) exit( status );
8236
8237         /* make sure pthread_detach() isn't just a stub */
8238 #if HAVE_PTHREADS_D4
8239         status = pthread_detach( &t );
8240 #else
8241         status = pthread_detach( t );
8242 #endif
8243
8244 #ifdef HAVE_LINUX_THREADS
8245         pthread_kill_other_threads_np();
8246 #endif
8247
8248         exit( status );
8249
8250 ; return 0; }
8251 EOF
8252 if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8253   rm -rf conftest*
8254   ol_cv_pthread_lpthread=yes
8255 else
8256   echo "configure: failed program was:" >&5
8257   cat conftest.$ac_ext >&5
8258   rm -rf conftest*
8259   ol_cv_pthread_lpthread=no
8260 fi
8261 rm -f conftest*
8262 else
8263   cat > conftest.$ac_ext <<EOF
8264 #line 8265 "configure"
8265 #include "confdefs.h"
8266 /* pthread test headers */
8267 #include <pthread.h>
8268 #ifndef NULL
8269 #define NULL (void*)0
8270 #endif
8271
8272 static void *task(p)
8273         void *p;
8274 {
8275         return (void *) (p == NULL);
8276 }
8277
8278
8279 int main(argc, argv)
8280         int argc;
8281         char **argv;
8282 {
8283
8284         /* pthread test function */
8285         pthread_t t;
8286         int status;
8287
8288         /* make sure pthread_create() isn't just a stub */
8289 #if HAVE_PTHREADS_D4
8290         status = pthread_create(&t, pthread_attr_default, task, NULL);
8291 #else
8292         status = pthread_create(&t, NULL, task, NULL);
8293 #endif
8294
8295         if( status ) exit( status );
8296
8297         /* make sure pthread_detach() isn't just a stub */
8298 #if HAVE_PTHREADS_D4
8299         status = pthread_detach( &t );
8300 #else
8301         status = pthread_detach( t );
8302 #endif
8303
8304 #ifdef HAVE_LINUX_THREADS
8305         pthread_kill_other_threads_np();
8306 #endif
8307
8308         exit( status );
8309
8310 }
8311
8312 EOF
8313 if { (eval echo configure:8314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8314 then
8315   ol_cv_pthread_lpthread=yes
8316 else
8317   echo "configure: failed program was:" >&5
8318   cat conftest.$ac_ext >&5
8319   rm -fr conftest*
8320   ol_cv_pthread_lpthread=no
8321 fi
8322 rm -fr conftest*
8323 fi
8324
8325
8326                 # restore the LIBS
8327                 LIBS="$ol_LIBS"
8328         
8329 fi
8330
8331 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8332
8333         if test $ol_cv_pthread_lpthread = yes ; then
8334                 ol_link_pthreads="-lpthread"
8335                 ol_link_threads=posix
8336         fi
8337 fi
8338
8339                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8340 if test "$ol_link_threads" = no ; then
8341         # try -lc_r
8342         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8343 echo "configure:8344: checking for pthread link with -lc_r" >&5
8344 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8345   echo $ac_n "(cached) $ac_c" 1>&6
8346 else
8347   
8348                 # save the flags
8349                 ol_LIBS="$LIBS"
8350                 LIBS="-lc_r $LIBS"
8351
8352                 if test "$cross_compiling" = yes; then
8353   cat > conftest.$ac_ext <<EOF
8354 #line 8355 "configure"
8355 #include "confdefs.h"
8356 /* pthread test headers */
8357 #include <pthread.h>
8358 #ifndef NULL
8359 #define NULL (void*)0
8360 #endif
8361
8362 static void *task(p)
8363         void *p;
8364 {
8365         return (void *) (p == NULL);
8366 }
8367
8368 int main() {
8369
8370         /* pthread test function */
8371         pthread_t t;
8372         int status;
8373
8374         /* make sure pthread_create() isn't just a stub */
8375 #if HAVE_PTHREADS_D4
8376         status = pthread_create(&t, pthread_attr_default, task, NULL);
8377 #else
8378         status = pthread_create(&t, NULL, task, NULL);
8379 #endif
8380
8381         if( status ) exit( status );
8382
8383         /* make sure pthread_detach() isn't just a stub */
8384 #if HAVE_PTHREADS_D4
8385         status = pthread_detach( &t );
8386 #else
8387         status = pthread_detach( t );
8388 #endif
8389
8390 #ifdef HAVE_LINUX_THREADS
8391         pthread_kill_other_threads_np();
8392 #endif
8393
8394         exit( status );
8395
8396 ; return 0; }
8397 EOF
8398 if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8399   rm -rf conftest*
8400   ol_cv_pthread_lc_r=yes
8401 else
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   ol_cv_pthread_lc_r=no
8406 fi
8407 rm -f conftest*
8408 else
8409   cat > conftest.$ac_ext <<EOF
8410 #line 8411 "configure"
8411 #include "confdefs.h"
8412 /* pthread test headers */
8413 #include <pthread.h>
8414 #ifndef NULL
8415 #define NULL (void*)0
8416 #endif
8417
8418 static void *task(p)
8419         void *p;
8420 {
8421         return (void *) (p == NULL);
8422 }
8423
8424
8425 int main(argc, argv)
8426         int argc;
8427         char **argv;
8428 {
8429
8430         /* pthread test function */
8431         pthread_t t;
8432         int status;
8433
8434         /* make sure pthread_create() isn't just a stub */
8435 #if HAVE_PTHREADS_D4
8436         status = pthread_create(&t, pthread_attr_default, task, NULL);
8437 #else
8438         status = pthread_create(&t, NULL, task, NULL);
8439 #endif
8440
8441         if( status ) exit( status );
8442
8443         /* make sure pthread_detach() isn't just a stub */
8444 #if HAVE_PTHREADS_D4
8445         status = pthread_detach( &t );
8446 #else
8447         status = pthread_detach( t );
8448 #endif
8449
8450 #ifdef HAVE_LINUX_THREADS
8451         pthread_kill_other_threads_np();
8452 #endif
8453
8454         exit( status );
8455
8456 }
8457
8458 EOF
8459 if { (eval echo configure:8460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8460 then
8461   ol_cv_pthread_lc_r=yes
8462 else
8463   echo "configure: failed program was:" >&5
8464   cat conftest.$ac_ext >&5
8465   rm -fr conftest*
8466   ol_cv_pthread_lc_r=no
8467 fi
8468 rm -fr conftest*
8469 fi
8470
8471
8472                 # restore the LIBS
8473                 LIBS="$ol_LIBS"
8474         
8475 fi
8476
8477 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8478
8479         if test $ol_cv_pthread_lc_r = yes ; then
8480                 ol_link_pthreads="-lc_r"
8481                 ol_link_threads=posix
8482         fi
8483 fi
8484
8485
8486                 # Pthread try link: -threads (ol_cv_pthread_threads)
8487 if test "$ol_link_threads" = no ; then
8488         # try -threads
8489         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8490 echo "configure:8491: checking for pthread link with -threads" >&5
8491 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8492   echo $ac_n "(cached) $ac_c" 1>&6
8493 else
8494   
8495                 # save the flags
8496                 ol_LIBS="$LIBS"
8497                 LIBS="-threads $LIBS"
8498
8499                 if test "$cross_compiling" = yes; then
8500   cat > conftest.$ac_ext <<EOF
8501 #line 8502 "configure"
8502 #include "confdefs.h"
8503 /* pthread test headers */
8504 #include <pthread.h>
8505 #ifndef NULL
8506 #define NULL (void*)0
8507 #endif
8508
8509 static void *task(p)
8510         void *p;
8511 {
8512         return (void *) (p == NULL);
8513 }
8514
8515 int main() {
8516
8517         /* pthread test function */
8518         pthread_t t;
8519         int status;
8520
8521         /* make sure pthread_create() isn't just a stub */
8522 #if HAVE_PTHREADS_D4
8523         status = pthread_create(&t, pthread_attr_default, task, NULL);
8524 #else
8525         status = pthread_create(&t, NULL, task, NULL);
8526 #endif
8527
8528         if( status ) exit( status );
8529
8530         /* make sure pthread_detach() isn't just a stub */
8531 #if HAVE_PTHREADS_D4
8532         status = pthread_detach( &t );
8533 #else
8534         status = pthread_detach( t );
8535 #endif
8536
8537 #ifdef HAVE_LINUX_THREADS
8538         pthread_kill_other_threads_np();
8539 #endif
8540
8541         exit( status );
8542
8543 ; return 0; }
8544 EOF
8545 if { (eval echo configure:8546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8546   rm -rf conftest*
8547   ol_cv_pthread_threads=yes
8548 else
8549   echo "configure: failed program was:" >&5
8550   cat conftest.$ac_ext >&5
8551   rm -rf conftest*
8552   ol_cv_pthread_threads=no
8553 fi
8554 rm -f conftest*
8555 else
8556   cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 /* pthread test headers */
8560 #include <pthread.h>
8561 #ifndef NULL
8562 #define NULL (void*)0
8563 #endif
8564
8565 static void *task(p)
8566         void *p;
8567 {
8568         return (void *) (p == NULL);
8569 }
8570
8571
8572 int main(argc, argv)
8573         int argc;
8574         char **argv;
8575 {
8576
8577         /* pthread test function */
8578         pthread_t t;
8579         int status;
8580
8581         /* make sure pthread_create() isn't just a stub */
8582 #if HAVE_PTHREADS_D4
8583         status = pthread_create(&t, pthread_attr_default, task, NULL);
8584 #else
8585         status = pthread_create(&t, NULL, task, NULL);
8586 #endif
8587
8588         if( status ) exit( status );
8589
8590         /* make sure pthread_detach() isn't just a stub */
8591 #if HAVE_PTHREADS_D4
8592         status = pthread_detach( &t );
8593 #else
8594         status = pthread_detach( t );
8595 #endif
8596
8597 #ifdef HAVE_LINUX_THREADS
8598         pthread_kill_other_threads_np();
8599 #endif
8600
8601         exit( status );
8602
8603 }
8604
8605 EOF
8606 if { (eval echo configure:8607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8607 then
8608   ol_cv_pthread_threads=yes
8609 else
8610   echo "configure: failed program was:" >&5
8611   cat conftest.$ac_ext >&5
8612   rm -fr conftest*
8613   ol_cv_pthread_threads=no
8614 fi
8615 rm -fr conftest*
8616 fi
8617
8618
8619                 # restore the LIBS
8620                 LIBS="$ol_LIBS"
8621         
8622 fi
8623
8624 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8625
8626         if test $ol_cv_pthread_threads = yes ; then
8627                 ol_link_pthreads="-threads"
8628                 ol_link_threads=posix
8629         fi
8630 fi
8631
8632
8633                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8634 if test "$ol_link_threads" = no ; then
8635         # try -lpthreads -lmach -lexc -lc_r
8636         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8637 echo "configure:8638: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8638 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8639   echo $ac_n "(cached) $ac_c" 1>&6
8640 else
8641   
8642                 # save the flags
8643                 ol_LIBS="$LIBS"
8644                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8645
8646                 if test "$cross_compiling" = yes; then
8647   cat > conftest.$ac_ext <<EOF
8648 #line 8649 "configure"
8649 #include "confdefs.h"
8650 /* pthread test headers */
8651 #include <pthread.h>
8652 #ifndef NULL
8653 #define NULL (void*)0
8654 #endif
8655
8656 static void *task(p)
8657         void *p;
8658 {
8659         return (void *) (p == NULL);
8660 }
8661
8662 int main() {
8663
8664         /* pthread test function */
8665         pthread_t t;
8666         int status;
8667
8668         /* make sure pthread_create() isn't just a stub */
8669 #if HAVE_PTHREADS_D4
8670         status = pthread_create(&t, pthread_attr_default, task, NULL);
8671 #else
8672         status = pthread_create(&t, NULL, task, NULL);
8673 #endif
8674
8675         if( status ) exit( status );
8676
8677         /* make sure pthread_detach() isn't just a stub */
8678 #if HAVE_PTHREADS_D4
8679         status = pthread_detach( &t );
8680 #else
8681         status = pthread_detach( t );
8682 #endif
8683
8684 #ifdef HAVE_LINUX_THREADS
8685         pthread_kill_other_threads_np();
8686 #endif
8687
8688         exit( status );
8689
8690 ; return 0; }
8691 EOF
8692 if { (eval echo configure:8693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8693   rm -rf conftest*
8694   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8695 else
8696   echo "configure: failed program was:" >&5
8697   cat conftest.$ac_ext >&5
8698   rm -rf conftest*
8699   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8700 fi
8701 rm -f conftest*
8702 else
8703   cat > conftest.$ac_ext <<EOF
8704 #line 8705 "configure"
8705 #include "confdefs.h"
8706 /* pthread test headers */
8707 #include <pthread.h>
8708 #ifndef NULL
8709 #define NULL (void*)0
8710 #endif
8711
8712 static void *task(p)
8713         void *p;
8714 {
8715         return (void *) (p == NULL);
8716 }
8717
8718
8719 int main(argc, argv)
8720         int argc;
8721         char **argv;
8722 {
8723
8724         /* pthread test function */
8725         pthread_t t;
8726         int status;
8727
8728         /* make sure pthread_create() isn't just a stub */
8729 #if HAVE_PTHREADS_D4
8730         status = pthread_create(&t, pthread_attr_default, task, NULL);
8731 #else
8732         status = pthread_create(&t, NULL, task, NULL);
8733 #endif
8734
8735         if( status ) exit( status );
8736
8737         /* make sure pthread_detach() isn't just a stub */
8738 #if HAVE_PTHREADS_D4
8739         status = pthread_detach( &t );
8740 #else
8741         status = pthread_detach( t );
8742 #endif
8743
8744 #ifdef HAVE_LINUX_THREADS
8745         pthread_kill_other_threads_np();
8746 #endif
8747
8748         exit( status );
8749
8750 }
8751
8752 EOF
8753 if { (eval echo configure:8754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8754 then
8755   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8756 else
8757   echo "configure: failed program was:" >&5
8758   cat conftest.$ac_ext >&5
8759   rm -fr conftest*
8760   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8761 fi
8762 rm -fr conftest*
8763 fi
8764
8765
8766                 # restore the LIBS
8767                 LIBS="$ol_LIBS"
8768         
8769 fi
8770
8771 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8772
8773         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8774                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8775                 ol_link_threads=posix
8776         fi
8777 fi
8778
8779                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8780 if test "$ol_link_threads" = no ; then
8781         # try -lpthreads -lmach -lexc
8782         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8783 echo "configure:8784: checking for pthread link with -lpthreads -lmach -lexc" >&5
8784 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8785   echo $ac_n "(cached) $ac_c" 1>&6
8786 else
8787   
8788                 # save the flags
8789                 ol_LIBS="$LIBS"
8790                 LIBS="-lpthreads -lmach -lexc $LIBS"
8791
8792                 if test "$cross_compiling" = yes; then
8793   cat > conftest.$ac_ext <<EOF
8794 #line 8795 "configure"
8795 #include "confdefs.h"
8796 /* pthread test headers */
8797 #include <pthread.h>
8798 #ifndef NULL
8799 #define NULL (void*)0
8800 #endif
8801
8802 static void *task(p)
8803         void *p;
8804 {
8805         return (void *) (p == NULL);
8806 }
8807
8808 int main() {
8809
8810         /* pthread test function */
8811         pthread_t t;
8812         int status;
8813
8814         /* make sure pthread_create() isn't just a stub */
8815 #if HAVE_PTHREADS_D4
8816         status = pthread_create(&t, pthread_attr_default, task, NULL);
8817 #else
8818         status = pthread_create(&t, NULL, task, NULL);
8819 #endif
8820
8821         if( status ) exit( status );
8822
8823         /* make sure pthread_detach() isn't just a stub */
8824 #if HAVE_PTHREADS_D4
8825         status = pthread_detach( &t );
8826 #else
8827         status = pthread_detach( t );
8828 #endif
8829
8830 #ifdef HAVE_LINUX_THREADS
8831         pthread_kill_other_threads_np();
8832 #endif
8833
8834         exit( status );
8835
8836 ; return 0; }
8837 EOF
8838 if { (eval echo configure:8839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8839   rm -rf conftest*
8840   ol_cv_pthread_lpthreads_lmach_lexc=yes
8841 else
8842   echo "configure: failed program was:" >&5
8843   cat conftest.$ac_ext >&5
8844   rm -rf conftest*
8845   ol_cv_pthread_lpthreads_lmach_lexc=no
8846 fi
8847 rm -f conftest*
8848 else
8849   cat > conftest.$ac_ext <<EOF
8850 #line 8851 "configure"
8851 #include "confdefs.h"
8852 /* pthread test headers */
8853 #include <pthread.h>
8854 #ifndef NULL
8855 #define NULL (void*)0
8856 #endif
8857
8858 static void *task(p)
8859         void *p;
8860 {
8861         return (void *) (p == NULL);
8862 }
8863
8864
8865 int main(argc, argv)
8866         int argc;
8867         char **argv;
8868 {
8869
8870         /* pthread test function */
8871         pthread_t t;
8872         int status;
8873
8874         /* make sure pthread_create() isn't just a stub */
8875 #if HAVE_PTHREADS_D4
8876         status = pthread_create(&t, pthread_attr_default, task, NULL);
8877 #else
8878         status = pthread_create(&t, NULL, task, NULL);
8879 #endif
8880
8881         if( status ) exit( status );
8882
8883         /* make sure pthread_detach() isn't just a stub */
8884 #if HAVE_PTHREADS_D4
8885         status = pthread_detach( &t );
8886 #else
8887         status = pthread_detach( t );
8888 #endif
8889
8890 #ifdef HAVE_LINUX_THREADS
8891         pthread_kill_other_threads_np();
8892 #endif
8893
8894         exit( status );
8895
8896 }
8897
8898 EOF
8899 if { (eval echo configure:8900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8900 then
8901   ol_cv_pthread_lpthreads_lmach_lexc=yes
8902 else
8903   echo "configure: failed program was:" >&5
8904   cat conftest.$ac_ext >&5
8905   rm -fr conftest*
8906   ol_cv_pthread_lpthreads_lmach_lexc=no
8907 fi
8908 rm -fr conftest*
8909 fi
8910
8911
8912                 # restore the LIBS
8913                 LIBS="$ol_LIBS"
8914         
8915 fi
8916
8917 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8918
8919         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8920                 ol_link_pthreads="-lpthreads -lmach -lexc"
8921                 ol_link_threads=posix
8922         fi
8923 fi
8924
8925                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8926 if test "$ol_link_threads" = no ; then
8927         # try -lpthreads -lexc
8928         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8929 echo "configure:8930: checking for pthread link with -lpthreads -lexc" >&5
8930 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8931   echo $ac_n "(cached) $ac_c" 1>&6
8932 else
8933   
8934                 # save the flags
8935                 ol_LIBS="$LIBS"
8936                 LIBS="-lpthreads -lexc $LIBS"
8937
8938                 if test "$cross_compiling" = yes; then
8939   cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 /* pthread test headers */
8943 #include <pthread.h>
8944 #ifndef NULL
8945 #define NULL (void*)0
8946 #endif
8947
8948 static void *task(p)
8949         void *p;
8950 {
8951         return (void *) (p == NULL);
8952 }
8953
8954 int main() {
8955
8956         /* pthread test function */
8957         pthread_t t;
8958         int status;
8959
8960         /* make sure pthread_create() isn't just a stub */
8961 #if HAVE_PTHREADS_D4
8962         status = pthread_create(&t, pthread_attr_default, task, NULL);
8963 #else
8964         status = pthread_create(&t, NULL, task, NULL);
8965 #endif
8966
8967         if( status ) exit( status );
8968
8969         /* make sure pthread_detach() isn't just a stub */
8970 #if HAVE_PTHREADS_D4
8971         status = pthread_detach( &t );
8972 #else
8973         status = pthread_detach( t );
8974 #endif
8975
8976 #ifdef HAVE_LINUX_THREADS
8977         pthread_kill_other_threads_np();
8978 #endif
8979
8980         exit( status );
8981
8982 ; return 0; }
8983 EOF
8984 if { (eval echo configure:8985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8985   rm -rf conftest*
8986   ol_cv_pthread_lpthreads_lexc=yes
8987 else
8988   echo "configure: failed program was:" >&5
8989   cat conftest.$ac_ext >&5
8990   rm -rf conftest*
8991   ol_cv_pthread_lpthreads_lexc=no
8992 fi
8993 rm -f conftest*
8994 else
8995   cat > conftest.$ac_ext <<EOF
8996 #line 8997 "configure"
8997 #include "confdefs.h"
8998 /* pthread test headers */
8999 #include <pthread.h>
9000 #ifndef NULL
9001 #define NULL (void*)0
9002 #endif
9003
9004 static void *task(p)
9005         void *p;
9006 {
9007         return (void *) (p == NULL);
9008 }
9009
9010
9011 int main(argc, argv)
9012         int argc;
9013         char **argv;
9014 {
9015
9016         /* pthread test function */
9017         pthread_t t;
9018         int status;
9019
9020         /* make sure pthread_create() isn't just a stub */
9021 #if HAVE_PTHREADS_D4
9022         status = pthread_create(&t, pthread_attr_default, task, NULL);
9023 #else
9024         status = pthread_create(&t, NULL, task, NULL);
9025 #endif
9026
9027         if( status ) exit( status );
9028
9029         /* make sure pthread_detach() isn't just a stub */
9030 #if HAVE_PTHREADS_D4
9031         status = pthread_detach( &t );
9032 #else
9033         status = pthread_detach( t );
9034 #endif
9035
9036 #ifdef HAVE_LINUX_THREADS
9037         pthread_kill_other_threads_np();
9038 #endif
9039
9040         exit( status );
9041
9042 }
9043
9044 EOF
9045 if { (eval echo configure:9046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9046 then
9047   ol_cv_pthread_lpthreads_lexc=yes
9048 else
9049   echo "configure: failed program was:" >&5
9050   cat conftest.$ac_ext >&5
9051   rm -fr conftest*
9052   ol_cv_pthread_lpthreads_lexc=no
9053 fi
9054 rm -fr conftest*
9055 fi
9056
9057
9058                 # restore the LIBS
9059                 LIBS="$ol_LIBS"
9060         
9061 fi
9062
9063 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9064
9065         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9066                 ol_link_pthreads="-lpthreads -lexc"
9067                 ol_link_threads=posix
9068         fi
9069 fi
9070
9071
9072                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9073 if test "$ol_link_threads" = no ; then
9074         # try -lpthreads
9075         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9076 echo "configure:9077: checking for pthread link with -lpthreads" >&5
9077 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9078   echo $ac_n "(cached) $ac_c" 1>&6
9079 else
9080   
9081                 # save the flags
9082                 ol_LIBS="$LIBS"
9083                 LIBS="-lpthreads $LIBS"
9084
9085                 if test "$cross_compiling" = yes; then
9086   cat > conftest.$ac_ext <<EOF
9087 #line 9088 "configure"
9088 #include "confdefs.h"
9089 /* pthread test headers */
9090 #include <pthread.h>
9091 #ifndef NULL
9092 #define NULL (void*)0
9093 #endif
9094
9095 static void *task(p)
9096         void *p;
9097 {
9098         return (void *) (p == NULL);
9099 }
9100
9101 int main() {
9102
9103         /* pthread test function */
9104         pthread_t t;
9105         int status;
9106
9107         /* make sure pthread_create() isn't just a stub */
9108 #if HAVE_PTHREADS_D4
9109         status = pthread_create(&t, pthread_attr_default, task, NULL);
9110 #else
9111         status = pthread_create(&t, NULL, task, NULL);
9112 #endif
9113
9114         if( status ) exit( status );
9115
9116         /* make sure pthread_detach() isn't just a stub */
9117 #if HAVE_PTHREADS_D4
9118         status = pthread_detach( &t );
9119 #else
9120         status = pthread_detach( t );
9121 #endif
9122
9123 #ifdef HAVE_LINUX_THREADS
9124         pthread_kill_other_threads_np();
9125 #endif
9126
9127         exit( status );
9128
9129 ; return 0; }
9130 EOF
9131 if { (eval echo configure:9132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9132   rm -rf conftest*
9133   ol_cv_pthread_lib_lpthreads=yes
9134 else
9135   echo "configure: failed program was:" >&5
9136   cat conftest.$ac_ext >&5
9137   rm -rf conftest*
9138   ol_cv_pthread_lib_lpthreads=no
9139 fi
9140 rm -f conftest*
9141 else
9142   cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145 /* pthread test headers */
9146 #include <pthread.h>
9147 #ifndef NULL
9148 #define NULL (void*)0
9149 #endif
9150
9151 static void *task(p)
9152         void *p;
9153 {
9154         return (void *) (p == NULL);
9155 }
9156
9157
9158 int main(argc, argv)
9159         int argc;
9160         char **argv;
9161 {
9162
9163         /* pthread test function */
9164         pthread_t t;
9165         int status;
9166
9167         /* make sure pthread_create() isn't just a stub */
9168 #if HAVE_PTHREADS_D4
9169         status = pthread_create(&t, pthread_attr_default, task, NULL);
9170 #else
9171         status = pthread_create(&t, NULL, task, NULL);
9172 #endif
9173
9174         if( status ) exit( status );
9175
9176         /* make sure pthread_detach() isn't just a stub */
9177 #if HAVE_PTHREADS_D4
9178         status = pthread_detach( &t );
9179 #else
9180         status = pthread_detach( t );
9181 #endif
9182
9183 #ifdef HAVE_LINUX_THREADS
9184         pthread_kill_other_threads_np();
9185 #endif
9186
9187         exit( status );
9188
9189 }
9190
9191 EOF
9192 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9193 then
9194   ol_cv_pthread_lib_lpthreads=yes
9195 else
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -fr conftest*
9199   ol_cv_pthread_lib_lpthreads=no
9200 fi
9201 rm -fr conftest*
9202 fi
9203
9204
9205                 # restore the LIBS
9206                 LIBS="$ol_LIBS"
9207         
9208 fi
9209
9210 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9211
9212         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9213                 ol_link_pthreads="-lpthreads"
9214                 ol_link_threads=posix
9215         fi
9216 fi
9217
9218
9219                 if test $ol_link_threads != no ; then
9220                         cat >> confdefs.h <<\EOF
9221 #define HAVE_PTHREADS 1
9222 EOF
9223
9224
9225                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9226
9227                                                 save_CPPFLAGS="$CPPFLAGS"
9228                         save_LIBS="$LIBS"
9229                         LIBS="$LTHREAD_LIBS $LIBS"
9230
9231                                                                                                 for ac_func in sched_yield pthread_yield
9232 do
9233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9234 echo "configure:9235: checking for $ac_func" >&5
9235 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241 /* System header to define __stub macros and hopefully few prototypes,
9242     which can conflict with char $ac_func(); below.  */
9243 #include <assert.h>
9244 /* Override any gcc2 internal prototype to avoid an error.  */
9245 /* We use char because int might match the return type of a gcc2
9246     builtin and then its argument prototype would still apply.  */
9247 char $ac_func();
9248 char (*f)();
9249
9250 int main() {
9251
9252 /* The GNU C library defines this for functions which it implements
9253     to always fail with ENOSYS.  Some functions are actually named
9254     something starting with __ and the normal name is an alias.  */
9255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9256 choke me
9257 #else
9258 f = $ac_func;
9259 #endif
9260
9261 ; return 0; }
9262 EOF
9263 if { (eval echo configure:9264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9264   rm -rf conftest*
9265   eval "ac_cv_func_$ac_func=yes"
9266 else
9267   echo "configure: failed program was:" >&5
9268   cat conftest.$ac_ext >&5
9269   rm -rf conftest*
9270   eval "ac_cv_func_$ac_func=no"
9271 fi
9272 rm -f conftest*
9273 fi
9274
9275 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9276   echo "$ac_t""yes" 1>&6
9277     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9278   cat >> confdefs.h <<EOF
9279 #define $ac_tr_func 1
9280 EOF
9281  
9282 else
9283   echo "$ac_t""no" 1>&6
9284 fi
9285 done
9286
9287
9288                         if test $ac_cv_func_sched_yield = no -a \
9289                                 $ac_cv_func_pthread_yield = no ; then
9290                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9291 echo "configure:9292: checking for sched_yield in -lrt" >&5
9292 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9293 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9294   echo $ac_n "(cached) $ac_c" 1>&6
9295 else
9296   ac_save_LIBS="$LIBS"
9297 LIBS="-lrt  $LIBS"
9298 cat > conftest.$ac_ext <<EOF
9299 #line 9300 "configure"
9300 #include "confdefs.h"
9301 /* Override any gcc2 internal prototype to avoid an error.  */
9302 /* We use char because int might match the return type of a gcc2
9303     builtin and then its argument prototype would still apply.  */
9304 char sched_yield();
9305
9306 int main() {
9307 sched_yield()
9308 ; return 0; }
9309 EOF
9310 if { (eval echo configure:9311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9311   rm -rf conftest*
9312   eval "ac_cv_lib_$ac_lib_var=yes"
9313 else
9314   echo "configure: failed program was:" >&5
9315   cat conftest.$ac_ext >&5
9316   rm -rf conftest*
9317   eval "ac_cv_lib_$ac_lib_var=no"
9318 fi
9319 rm -f conftest*
9320 LIBS="$ac_save_LIBS"
9321
9322 fi
9323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9324   echo "$ac_t""yes" 1>&6
9325   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9326                                         cat >> confdefs.h <<\EOF
9327 #define HAVE_SCHED_YIELD 1
9328 EOF
9329
9330                                         ac_cv_func_sched_yield=yes
9331 else
9332   echo "$ac_t""no" 1>&6
9333 ac_cv_func_sched_yield=no
9334 fi
9335
9336                         fi
9337                         if test $ac_cv_func_sched_yield = no -a \
9338                                 $ac_cv_func_pthread_yield = no ; then
9339                                                                                                 for ac_func in thr_yield
9340 do
9341 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9342 echo "configure:9343: checking for $ac_func" >&5
9343 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   cat > conftest.$ac_ext <<EOF
9347 #line 9348 "configure"
9348 #include "confdefs.h"
9349 /* System header to define __stub macros and hopefully few prototypes,
9350     which can conflict with char $ac_func(); below.  */
9351 #include <assert.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 $ac_func();
9356 char (*f)();
9357
9358 int main() {
9359
9360 /* The GNU C library defines this for functions which it implements
9361     to always fail with ENOSYS.  Some functions are actually named
9362     something starting with __ and the normal name is an alias.  */
9363 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9364 choke me
9365 #else
9366 f = $ac_func;
9367 #endif
9368
9369 ; return 0; }
9370 EOF
9371 if { (eval echo configure:9372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9372   rm -rf conftest*
9373   eval "ac_cv_func_$ac_func=yes"
9374 else
9375   echo "configure: failed program was:" >&5
9376   cat conftest.$ac_ext >&5
9377   rm -rf conftest*
9378   eval "ac_cv_func_$ac_func=no"
9379 fi
9380 rm -f conftest*
9381 fi
9382
9383 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9384   echo "$ac_t""yes" 1>&6
9385     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9386   cat >> confdefs.h <<EOF
9387 #define $ac_tr_func 1
9388 EOF
9389  
9390 else
9391   echo "$ac_t""no" 1>&6
9392 fi
9393 done
9394
9395                         fi
9396                         if test $ac_cv_func_sched_yield = no -a \
9397                                 $ac_cv_func_pthread_yield = no -a \
9398                                 "$ac_cv_func_thr_yield" = no ; then
9399                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9400                         fi
9401
9402                                                 for ac_func in pthread_kill
9403 do
9404 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9405 echo "configure:9406: checking for $ac_func" >&5
9406 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412 /* System header to define __stub macros and hopefully few prototypes,
9413     which can conflict with char $ac_func(); below.  */
9414 #include <assert.h>
9415 /* Override any gcc2 internal prototype to avoid an error.  */
9416 /* We use char because int might match the return type of a gcc2
9417     builtin and then its argument prototype would still apply.  */
9418 char $ac_func();
9419 char (*f)();
9420
9421 int main() {
9422
9423 /* The GNU C library defines this for functions which it implements
9424     to always fail with ENOSYS.  Some functions are actually named
9425     something starting with __ and the normal name is an alias.  */
9426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9427 choke me
9428 #else
9429 f = $ac_func;
9430 #endif
9431
9432 ; return 0; }
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9435   rm -rf conftest*
9436   eval "ac_cv_func_$ac_func=yes"
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440   rm -rf conftest*
9441   eval "ac_cv_func_$ac_func=no"
9442 fi
9443 rm -f conftest*
9444 fi
9445
9446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9447   echo "$ac_t""yes" 1>&6
9448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9449   cat >> confdefs.h <<EOF
9450 #define $ac_tr_func 1
9451 EOF
9452  
9453 else
9454   echo "$ac_t""no" 1>&6
9455 fi
9456 done
9457
9458
9459                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9460 echo "configure:9461: checking for pthread_detach with <pthread.h>" >&5
9461 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9462   echo $ac_n "(cached) $ac_c" 1>&6
9463 else
9464   
9465                                                                 cat > conftest.$ac_ext <<EOF
9466 #line 9467 "configure"
9467 #include "confdefs.h"
9468
9469 #include <pthread.h>
9470 #ifndef NULL
9471 #define NULL (void*)0
9472 #endif
9473
9474 int main() {
9475 pthread_detach(NULL);
9476 ; return 0; }
9477 EOF
9478 if { (eval echo configure:9479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9479   rm -rf conftest*
9480   ol_cv_func_pthread_detach=yes
9481 else
9482   echo "configure: failed program was:" >&5
9483   cat conftest.$ac_ext >&5
9484   rm -rf conftest*
9485   ol_cv_func_pthread_detach=no
9486 fi
9487 rm -f conftest*
9488                         
9489 fi
9490
9491 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9492
9493                         if test $ol_cv_func_pthread_detach = no ; then
9494                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9495                         fi
9496
9497                         cat >> confdefs.h <<\EOF
9498 #define HAVE_PTHREAD_DETACH 1
9499 EOF
9500
9501
9502                                                 for ac_func in \
9503                                 pthread_setconcurrency \
9504                                 pthread_getconcurrency \
9505                                 thr_setconcurrency \
9506                                 thr_getconcurrency \
9507                         
9508 do
9509 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9510 echo "configure:9511: checking for $ac_func" >&5
9511 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9512   echo $ac_n "(cached) $ac_c" 1>&6
9513 else
9514   cat > conftest.$ac_ext <<EOF
9515 #line 9516 "configure"
9516 #include "confdefs.h"
9517 /* System header to define __stub macros and hopefully few prototypes,
9518     which can conflict with char $ac_func(); below.  */
9519 #include <assert.h>
9520 /* Override any gcc2 internal prototype to avoid an error.  */
9521 /* We use char because int might match the return type of a gcc2
9522     builtin and then its argument prototype would still apply.  */
9523 char $ac_func();
9524 char (*f)();
9525
9526 int main() {
9527
9528 /* The GNU C library defines this for functions which it implements
9529     to always fail with ENOSYS.  Some functions are actually named
9530     something starting with __ and the normal name is an alias.  */
9531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9532 choke me
9533 #else
9534 f = $ac_func;
9535 #endif
9536
9537 ; return 0; }
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9540   rm -rf conftest*
9541   eval "ac_cv_func_$ac_func=yes"
9542 else
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   eval "ac_cv_func_$ac_func=no"
9547 fi
9548 rm -f conftest*
9549 fi
9550
9551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9552   echo "$ac_t""yes" 1>&6
9553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9554   cat >> confdefs.h <<EOF
9555 #define $ac_tr_func 1
9556 EOF
9557  
9558 else
9559   echo "$ac_t""no" 1>&6
9560 fi
9561 done
9562
9563
9564                         
9565         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9566 echo "configure:9567: checking for pthread_kill_other_threads_np" >&5
9567 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9568   echo $ac_n "(cached) $ac_c" 1>&6
9569 else
9570   cat > conftest.$ac_ext <<EOF
9571 #line 9572 "configure"
9572 #include "confdefs.h"
9573 /* System header to define __stub macros and hopefully few prototypes,
9574     which can conflict with char pthread_kill_other_threads_np(); below.  */
9575 #include <assert.h>
9576 /* Override any gcc2 internal prototype to avoid an error.  */
9577 /* We use char because int might match the return type of a gcc2
9578     builtin and then its argument prototype would still apply.  */
9579 char pthread_kill_other_threads_np();
9580 char (*f)();
9581
9582 int main() {
9583
9584 /* The GNU C library defines this for functions which it implements
9585     to always fail with ENOSYS.  Some functions are actually named
9586     something starting with __ and the normal name is an alias.  */
9587 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9588 choke me
9589 #else
9590 f = pthread_kill_other_threads_np;
9591 #endif
9592
9593 ; return 0; }
9594 EOF
9595 if { (eval echo configure:9596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9596   rm -rf conftest*
9597   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9598 else
9599   echo "configure: failed program was:" >&5
9600   cat conftest.$ac_ext >&5
9601   rm -rf conftest*
9602   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9603 fi
9604 rm -f conftest*
9605 fi
9606
9607 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9608   echo "$ac_t""yes" 1>&6
9609   :
9610 else
9611   echo "$ac_t""no" 1>&6
9612 fi
9613
9614         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9615 echo "configure:9616: checking for LinuxThreads implementation" >&5
9616 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9617   echo $ac_n "(cached) $ac_c" 1>&6
9618 else
9619   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9620 fi
9621
9622 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9623
9624                         
9625         
9626         
9627         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9628 echo "configure:9629: checking for LinuxThreads consistency" >&5
9629 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9630   echo $ac_n "(cached) $ac_c" 1>&6
9631 else
9632   
9633                 if test $ol_cv_header_linux_threads = yes -a \
9634                         $ol_cv_sys_linux_threads = yes; then
9635                         ol_cv_linux_threads=yes
9636                 elif test $ol_cv_header_linux_threads = no -a \
9637                         $ol_cv_sys_linux_threads = no; then
9638                         ol_cv_linux_threads=no
9639                 else
9640                         ol_cv_linux_threads=error
9641                 fi
9642         
9643 fi
9644
9645 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9646
9647
9648                         if test $ol_cv_linux_threads = error; then
9649                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9650                         fi
9651
9652                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9653 echo "configure:9654: checking if pthread_create() works" >&5
9654 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9655   echo $ac_n "(cached) $ac_c" 1>&6
9656 else
9657   
9658                         if test "$cross_compiling" = yes; then
9659                                 ol_cv_pthread_create_works=yes
9660 else
9661   cat > conftest.$ac_ext <<EOF
9662 #line 9663 "configure"
9663 #include "confdefs.h"
9664 /* pthread test headers */
9665 #include <pthread.h>
9666 #ifndef NULL
9667 #define NULL (void*)0
9668 #endif
9669
9670 static void *task(p)
9671         void *p;
9672 {
9673         return (void *) (p == NULL);
9674 }
9675
9676
9677 int main(argc, argv)
9678         int argc;
9679         char **argv;
9680 {
9681
9682         /* pthread test function */
9683         pthread_t t;
9684         int status;
9685
9686         /* make sure pthread_create() isn't just a stub */
9687 #if HAVE_PTHREADS_D4
9688         status = pthread_create(&t, pthread_attr_default, task, NULL);
9689 #else
9690         status = pthread_create(&t, NULL, task, NULL);
9691 #endif
9692
9693         if( status ) exit( status );
9694
9695         /* make sure pthread_detach() isn't just a stub */
9696 #if HAVE_PTHREADS_D4
9697         status = pthread_detach( &t );
9698 #else
9699         status = pthread_detach( t );
9700 #endif
9701
9702 #ifdef HAVE_LINUX_THREADS
9703         pthread_kill_other_threads_np();
9704 #endif
9705
9706         exit( status );
9707
9708 }
9709
9710 EOF
9711 if { (eval echo configure:9712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9712 then
9713   ol_cv_pthread_create_works=yes
9714 else
9715   echo "configure: failed program was:" >&5
9716   cat conftest.$ac_ext >&5
9717   rm -fr conftest*
9718   ol_cv_pthread_create_works=no
9719 fi
9720 rm -fr conftest*
9721 fi
9722
9723 fi
9724
9725 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9726
9727                         if test $ol_cv_pthread_create_works = no ; then
9728                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9729                         fi
9730
9731                                                 if test $ol_with_yielding_select = auto ; then
9732                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9733 echo "configure:9734: checking if select yields when using pthreads" >&5
9734 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9735   echo $ac_n "(cached) $ac_c" 1>&6
9736 else
9737   
9738                                 if test "$cross_compiling" = yes; then
9739   ol_cv_pthread_select_yields=cross
9740 else
9741   cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744
9745 #include <sys/types.h>
9746 #include <sys/time.h>
9747 #include <unistd.h>
9748 #include <pthread.h>
9749 #ifndef NULL
9750 #define NULL (void*) 0
9751 #endif
9752
9753 static int fildes[2];
9754
9755 static void *task(p)
9756         void *p;
9757 {
9758         int i;
9759         struct timeval tv;
9760
9761         fd_set rfds;
9762
9763         tv.tv_sec=10;
9764         tv.tv_usec=0;
9765
9766         FD_ZERO(&rfds);
9767         FD_SET(fildes[0], &rfds);
9768
9769         /* we're not interested in any fds */
9770         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9771
9772         if(i < 0) {
9773                 perror("select");
9774                 exit(10);
9775         }
9776
9777         exit(0); /* if we exit here, the select blocked the whole process */
9778 }
9779
9780 int main(argc, argv)
9781         int argc;
9782         char **argv;
9783 {
9784         pthread_t t;
9785
9786         /* create a pipe to select */
9787         if(pipe(&fildes[0])) {
9788                 perror("select");
9789                 exit(1);
9790         }
9791
9792 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9793         (void) pthread_setconcurrency(2);
9794 #else
9795 #ifdef HAVE_THR_SETCONCURRENCY
9796         /* Set Solaris LWP concurrency to 2 */
9797         thr_setconcurrency(2);
9798 #endif
9799 #endif
9800
9801 #if HAVE_PTHREADS_D4
9802         pthread_create(&t, pthread_attr_default, task, NULL);
9803 #else
9804         pthread_create(&t, NULL, task, NULL);
9805 #endif
9806
9807 #if HAVE_SCHED_YIELD
9808         sched_yield();  /* make sure task runs first */
9809 #else
9810 #ifdef HAVE_PTHREAD_YIELD
9811         pthread_yield();        /* make sure task runs first */
9812 #endif
9813 #endif
9814
9815         exit(2);
9816 }
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9819 then
9820   ol_cv_pthread_select_yields=no
9821 else
9822   echo "configure: failed program was:" >&5
9823   cat conftest.$ac_ext >&5
9824   rm -fr conftest*
9825   ol_cv_pthread_select_yields=yes
9826 fi
9827 rm -fr conftest*
9828 fi
9829
9830 fi
9831
9832 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9833
9834                                 if test $ol_cv_pthread_select_yields = cross ; then
9835                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9836                                 fi
9837
9838                                 if test $ol_cv_pthread_select_yields = yes ; then
9839                                         ol_with_yielding_select=yes
9840                                 fi
9841                         fi
9842
9843                                                 CPPFLAGS="$save_CPPFLAGS"
9844                         LIBS="$save_LIBS"
9845                 else
9846                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9847                 fi
9848         fi
9849
9850         if test $ol_with_threads = posix ; then
9851                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9852         fi
9853 fi
9854
9855 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9856         -o $ol_with_threads = mach ; then
9857
9858                 for ac_hdr in mach/cthreads.h
9859 do
9860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9862 echo "configure:9863: checking for $ac_hdr" >&5
9863 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9864   echo $ac_n "(cached) $ac_c" 1>&6
9865 else
9866   cat > conftest.$ac_ext <<EOF
9867 #line 9868 "configure"
9868 #include "confdefs.h"
9869 #include <$ac_hdr>
9870 EOF
9871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9872 { (eval echo configure:9873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9874 if test -z "$ac_err"; then
9875   rm -rf conftest*
9876   eval "ac_cv_header_$ac_safe=yes"
9877 else
9878   echo "$ac_err" >&5
9879   echo "configure: failed program was:" >&5
9880   cat conftest.$ac_ext >&5
9881   rm -rf conftest*
9882   eval "ac_cv_header_$ac_safe=no"
9883 fi
9884 rm -f conftest*
9885 fi
9886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9887   echo "$ac_t""yes" 1>&6
9888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9889   cat >> confdefs.h <<EOF
9890 #define $ac_tr_hdr 1
9891 EOF
9892  
9893 else
9894   echo "$ac_t""no" 1>&6
9895 fi
9896 done
9897
9898         if test $ac_cv_header_mach_cthreads_h = yes ; then
9899                 ol_with_threads=found
9900
9901                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9902 echo "configure:9903: checking for cthread_fork" >&5
9903 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9904   echo $ac_n "(cached) $ac_c" 1>&6
9905 else
9906   cat > conftest.$ac_ext <<EOF
9907 #line 9908 "configure"
9908 #include "confdefs.h"
9909 /* System header to define __stub macros and hopefully few prototypes,
9910     which can conflict with char cthread_fork(); below.  */
9911 #include <assert.h>
9912 /* Override any gcc2 internal prototype to avoid an error.  */
9913 /* We use char because int might match the return type of a gcc2
9914     builtin and then its argument prototype would still apply.  */
9915 char cthread_fork();
9916 char (*f)();
9917
9918 int main() {
9919
9920 /* The GNU C library defines this for functions which it implements
9921     to always fail with ENOSYS.  Some functions are actually named
9922     something starting with __ and the normal name is an alias.  */
9923 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9924 choke me
9925 #else
9926 f = cthread_fork;
9927 #endif
9928
9929 ; return 0; }
9930 EOF
9931 if { (eval echo configure:9932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9932   rm -rf conftest*
9933   eval "ac_cv_func_cthread_fork=yes"
9934 else
9935   echo "configure: failed program was:" >&5
9936   cat conftest.$ac_ext >&5
9937   rm -rf conftest*
9938   eval "ac_cv_func_cthread_fork=no"
9939 fi
9940 rm -f conftest*
9941 fi
9942
9943 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9944   echo "$ac_t""yes" 1>&6
9945   ol_link_threads=yes
9946 else
9947   echo "$ac_t""no" 1>&6
9948 fi
9949
9950
9951                 if test $ol_link_threads = no ; then
9952                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9953 echo "configure:9954: checking for cthread_fork with -all_load" >&5
9954 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9955   echo $ac_n "(cached) $ac_c" 1>&6
9956 else
9957   
9958                                                                 save_LIBS="$LIBS"
9959                                 LIBS="-all_load $LIBS"
9960                                 cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 #include <mach/cthreads.h>
9964 int main() {
9965
9966                                         cthread_fork((void *)0, (void *)0);
9967                                         
9968 ; return 0; }
9969 EOF
9970 if { (eval echo configure:9971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9971   rm -rf conftest*
9972   ol_cv_cthread_all_load=yes
9973 else
9974   echo "configure: failed program was:" >&5
9975   cat conftest.$ac_ext >&5
9976   rm -rf conftest*
9977   ol_cv_cthread_all_load=no
9978 fi
9979 rm -f conftest*
9980                                                                 LIBS="$save_LIBS"
9981                         
9982 fi
9983
9984 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9985
9986                         if test $ol_cv_cthread_all_load = yes ; then
9987                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9988                                 ol_link_threads=mach
9989                         fi
9990                 fi
9991
9992                 if test $ol_link_threads != no ; then
9993                         : check for cthread specific functionality here
9994                         cat >> confdefs.h <<\EOF
9995 #define HAVE_MACH_CTHREADS 1
9996 EOF
9997
9998                 else
9999                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10000                 fi
10001         fi
10002
10003         if test $ol_with_threads = mach ; then
10004                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10005         fi
10006 fi
10007
10008 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10009         -o $ol_with_threads = pth ; then
10010
10011         for ac_hdr in pth.h
10012 do
10013 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10014 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10015 echo "configure:10016: checking for $ac_hdr" >&5
10016 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10017   echo $ac_n "(cached) $ac_c" 1>&6
10018 else
10019   cat > conftest.$ac_ext <<EOF
10020 #line 10021 "configure"
10021 #include "confdefs.h"
10022 #include <$ac_hdr>
10023 EOF
10024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10025 { (eval echo configure:10026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10027 if test -z "$ac_err"; then
10028   rm -rf conftest*
10029   eval "ac_cv_header_$ac_safe=yes"
10030 else
10031   echo "$ac_err" >&5
10032   echo "configure: failed program was:" >&5
10033   cat conftest.$ac_ext >&5
10034   rm -rf conftest*
10035   eval "ac_cv_header_$ac_safe=no"
10036 fi
10037 rm -f conftest*
10038 fi
10039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10040   echo "$ac_t""yes" 1>&6
10041     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10042   cat >> confdefs.h <<EOF
10043 #define $ac_tr_hdr 1
10044 EOF
10045  
10046 else
10047   echo "$ac_t""no" 1>&6
10048 fi
10049 done
10050
10051
10052         if test $ac_cv_header_pth_h = yes ; then
10053                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10054 echo "configure:10055: checking for pth_version in -lpth" >&5
10055 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   ac_save_LIBS="$LIBS"
10060 LIBS="-lpth  $LIBS"
10061 cat > conftest.$ac_ext <<EOF
10062 #line 10063 "configure"
10063 #include "confdefs.h"
10064 /* Override any gcc2 internal prototype to avoid an error.  */
10065 /* We use char because int might match the return type of a gcc2
10066     builtin and then its argument prototype would still apply.  */
10067 char pth_version();
10068
10069 int main() {
10070 pth_version()
10071 ; return 0; }
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10074   rm -rf conftest*
10075   eval "ac_cv_lib_$ac_lib_var=yes"
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -rf conftest*
10080   eval "ac_cv_lib_$ac_lib_var=no"
10081 fi
10082 rm -f conftest*
10083 LIBS="$ac_save_LIBS"
10084
10085 fi
10086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10087   echo "$ac_t""yes" 1>&6
10088   have_pth=yes
10089 else
10090   echo "$ac_t""no" 1>&6
10091 have_pth=no
10092 fi
10093
10094
10095                 if test $have_pth = yes ; then
10096                         cat >> confdefs.h <<\EOF
10097 #define HAVE_GNU_PTH 1
10098 EOF
10099
10100                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10101                         ol_link_threads=pth
10102
10103                         if test $ol_with_yielding_select = auto ; then
10104                                 ol_with_yielding_select=yes
10105                         fi
10106                 fi
10107         fi
10108 fi
10109
10110 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10111         -o $ol_with_threads = lwp ; then
10112
10113                 for ac_hdr in thread.h synch.h
10114 do
10115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10117 echo "configure:10118: checking for $ac_hdr" >&5
10118 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10119   echo $ac_n "(cached) $ac_c" 1>&6
10120 else
10121   cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 #include <$ac_hdr>
10125 EOF
10126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10127 { (eval echo configure:10128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10129 if test -z "$ac_err"; then
10130   rm -rf conftest*
10131   eval "ac_cv_header_$ac_safe=yes"
10132 else
10133   echo "$ac_err" >&5
10134   echo "configure: failed program was:" >&5
10135   cat conftest.$ac_ext >&5
10136   rm -rf conftest*
10137   eval "ac_cv_header_$ac_safe=no"
10138 fi
10139 rm -f conftest*
10140 fi
10141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10142   echo "$ac_t""yes" 1>&6
10143     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10144   cat >> confdefs.h <<EOF
10145 #define $ac_tr_hdr 1
10146 EOF
10147  
10148 else
10149   echo "$ac_t""no" 1>&6
10150 fi
10151 done
10152
10153         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10154                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10155 echo "configure:10156: checking for thr_create in -lthread" >&5
10156 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10157 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10158   echo $ac_n "(cached) $ac_c" 1>&6
10159 else
10160   ac_save_LIBS="$LIBS"
10161 LIBS="-lthread  $LIBS"
10162 cat > conftest.$ac_ext <<EOF
10163 #line 10164 "configure"
10164 #include "confdefs.h"
10165 /* Override any gcc2 internal prototype to avoid an error.  */
10166 /* We use char because int might match the return type of a gcc2
10167     builtin and then its argument prototype would still apply.  */
10168 char thr_create();
10169
10170 int main() {
10171 thr_create()
10172 ; return 0; }
10173 EOF
10174 if { (eval echo configure:10175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10175   rm -rf conftest*
10176   eval "ac_cv_lib_$ac_lib_var=yes"
10177 else
10178   echo "configure: failed program was:" >&5
10179   cat conftest.$ac_ext >&5
10180   rm -rf conftest*
10181   eval "ac_cv_lib_$ac_lib_var=no"
10182 fi
10183 rm -f conftest*
10184 LIBS="$ac_save_LIBS"
10185
10186 fi
10187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10188   echo "$ac_t""yes" 1>&6
10189   have_thr=yes
10190 else
10191   echo "$ac_t""no" 1>&6
10192 have_thr=no
10193 fi
10194
10195
10196                 if test $have_thr = yes ; then
10197                         cat >> confdefs.h <<\EOF
10198 #define HAVE_THR 1
10199 EOF
10200
10201                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10202                         ol_link_threads=thr
10203
10204                         if test $ol_with_yielding_select = auto ; then
10205                                 ol_with_yielding_select=yes
10206                         fi
10207
10208                                                 for ac_func in \
10209                                 thr_setconcurrency \
10210                                 thr_getconcurrency \
10211                         
10212 do
10213 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10214 echo "configure:10215: checking for $ac_func" >&5
10215 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10216   echo $ac_n "(cached) $ac_c" 1>&6
10217 else
10218   cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 /* System header to define __stub macros and hopefully few prototypes,
10222     which can conflict with char $ac_func(); below.  */
10223 #include <assert.h>
10224 /* Override any gcc2 internal prototype to avoid an error.  */
10225 /* We use char because int might match the return type of a gcc2
10226     builtin and then its argument prototype would still apply.  */
10227 char $ac_func();
10228 char (*f)();
10229
10230 int main() {
10231
10232 /* The GNU C library defines this for functions which it implements
10233     to always fail with ENOSYS.  Some functions are actually named
10234     something starting with __ and the normal name is an alias.  */
10235 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10236 choke me
10237 #else
10238 f = $ac_func;
10239 #endif
10240
10241 ; return 0; }
10242 EOF
10243 if { (eval echo configure:10244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10244   rm -rf conftest*
10245   eval "ac_cv_func_$ac_func=yes"
10246 else
10247   echo "configure: failed program was:" >&5
10248   cat conftest.$ac_ext >&5
10249   rm -rf conftest*
10250   eval "ac_cv_func_$ac_func=no"
10251 fi
10252 rm -f conftest*
10253 fi
10254
10255 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10256   echo "$ac_t""yes" 1>&6
10257     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10258   cat >> confdefs.h <<EOF
10259 #define $ac_tr_func 1
10260 EOF
10261  
10262 else
10263   echo "$ac_t""no" 1>&6
10264 fi
10265 done
10266
10267                 fi
10268         fi
10269
10270                 for ac_hdr in lwp/lwp.h
10271 do
10272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10274 echo "configure:10275: checking for $ac_hdr" >&5
10275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10276   echo $ac_n "(cached) $ac_c" 1>&6
10277 else
10278   cat > conftest.$ac_ext <<EOF
10279 #line 10280 "configure"
10280 #include "confdefs.h"
10281 #include <$ac_hdr>
10282 EOF
10283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10284 { (eval echo configure:10285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10286 if test -z "$ac_err"; then
10287   rm -rf conftest*
10288   eval "ac_cv_header_$ac_safe=yes"
10289 else
10290   echo "$ac_err" >&5
10291   echo "configure: failed program was:" >&5
10292   cat conftest.$ac_ext >&5
10293   rm -rf conftest*
10294   eval "ac_cv_header_$ac_safe=no"
10295 fi
10296 rm -f conftest*
10297 fi
10298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10299   echo "$ac_t""yes" 1>&6
10300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10301   cat >> confdefs.h <<EOF
10302 #define $ac_tr_hdr 1
10303 EOF
10304  
10305 else
10306   echo "$ac_t""no" 1>&6
10307 fi
10308 done
10309
10310         if test $ac_cv_header_lwp_lwp_h = yes ; then
10311                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10312 echo "configure:10313: checking for lwp_create in -llwp" >&5
10313 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10315   echo $ac_n "(cached) $ac_c" 1>&6
10316 else
10317   ac_save_LIBS="$LIBS"
10318 LIBS="-llwp  $LIBS"
10319 cat > conftest.$ac_ext <<EOF
10320 #line 10321 "configure"
10321 #include "confdefs.h"
10322 /* Override any gcc2 internal prototype to avoid an error.  */
10323 /* We use char because int might match the return type of a gcc2
10324     builtin and then its argument prototype would still apply.  */
10325 char lwp_create();
10326
10327 int main() {
10328 lwp_create()
10329 ; return 0; }
10330 EOF
10331 if { (eval echo configure:10332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10332   rm -rf conftest*
10333   eval "ac_cv_lib_$ac_lib_var=yes"
10334 else
10335   echo "configure: failed program was:" >&5
10336   cat conftest.$ac_ext >&5
10337   rm -rf conftest*
10338   eval "ac_cv_lib_$ac_lib_var=no"
10339 fi
10340 rm -f conftest*
10341 LIBS="$ac_save_LIBS"
10342
10343 fi
10344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10345   echo "$ac_t""yes" 1>&6
10346   have_lwp=yes
10347 else
10348   echo "$ac_t""no" 1>&6
10349 have_lwp=no
10350 fi
10351
10352
10353                 if test $have_lwp = yes ; then
10354                         cat >> confdefs.h <<\EOF
10355 #define HAVE_LWP 1
10356 EOF
10357
10358                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10359                         ol_link_threads=lwp
10360
10361                         if test $ol_with_yielding_select = auto ; then
10362                                 ol_with_yielding_select=no
10363                         fi
10364                 fi
10365         fi
10366 fi
10367
10368 if test $ol_with_yielding_select = yes ; then
10369         cat >> confdefs.h <<\EOF
10370 #define HAVE_YIELDING_SELECT 1
10371 EOF
10372
10373 fi
10374
10375 if test $ol_with_threads = manual ; then
10376                 ol_link_threads=yes
10377
10378         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10379
10380         for ac_hdr in pthread.h sched.h
10381 do
10382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10384 echo "configure:10385: checking for $ac_hdr" >&5
10385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   cat > conftest.$ac_ext <<EOF
10389 #line 10390 "configure"
10390 #include "confdefs.h"
10391 #include <$ac_hdr>
10392 EOF
10393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10394 { (eval echo configure:10395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10396 if test -z "$ac_err"; then
10397   rm -rf conftest*
10398   eval "ac_cv_header_$ac_safe=yes"
10399 else
10400   echo "$ac_err" >&5
10401   echo "configure: failed program was:" >&5
10402   cat conftest.$ac_ext >&5
10403   rm -rf conftest*
10404   eval "ac_cv_header_$ac_safe=no"
10405 fi
10406 rm -f conftest*
10407 fi
10408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10409   echo "$ac_t""yes" 1>&6
10410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10411   cat >> confdefs.h <<EOF
10412 #define $ac_tr_hdr 1
10413 EOF
10414  
10415 else
10416   echo "$ac_t""no" 1>&6
10417 fi
10418 done
10419
10420         for ac_func in sched_yield pthread_yield
10421 do
10422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10423 echo "configure:10424: checking for $ac_func" >&5
10424 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10425   echo $ac_n "(cached) $ac_c" 1>&6
10426 else
10427   cat > conftest.$ac_ext <<EOF
10428 #line 10429 "configure"
10429 #include "confdefs.h"
10430 /* System header to define __stub macros and hopefully few prototypes,
10431     which can conflict with char $ac_func(); below.  */
10432 #include <assert.h>
10433 /* Override any gcc2 internal prototype to avoid an error.  */
10434 /* We use char because int might match the return type of a gcc2
10435     builtin and then its argument prototype would still apply.  */
10436 char $ac_func();
10437 char (*f)();
10438
10439 int main() {
10440
10441 /* The GNU C library defines this for functions which it implements
10442     to always fail with ENOSYS.  Some functions are actually named
10443     something starting with __ and the normal name is an alias.  */
10444 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10445 choke me
10446 #else
10447 f = $ac_func;
10448 #endif
10449
10450 ; return 0; }
10451 EOF
10452 if { (eval echo configure:10453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10453   rm -rf conftest*
10454   eval "ac_cv_func_$ac_func=yes"
10455 else
10456   echo "configure: failed program was:" >&5
10457   cat conftest.$ac_ext >&5
10458   rm -rf conftest*
10459   eval "ac_cv_func_$ac_func=no"
10460 fi
10461 rm -f conftest*
10462 fi
10463
10464 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10465   echo "$ac_t""yes" 1>&6
10466     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10467   cat >> confdefs.h <<EOF
10468 #define $ac_tr_func 1
10469 EOF
10470  
10471 else
10472   echo "$ac_t""no" 1>&6
10473 fi
10474 done
10475
10476         
10477         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10478 echo "configure:10479: checking for LinuxThreads pthread.h" >&5
10479 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485 #include <pthread.h>
10486 EOF
10487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10488   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10489   rm -rf conftest*
10490   ol_cv_header_linux_threads=yes
10491 else
10492   rm -rf conftest*
10493   ol_cv_header_linux_threads=no
10494 fi
10495 rm -f conftest*
10496
10497                 
10498 fi
10499
10500 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10501         if test $ol_cv_header_linux_threads = yes; then
10502                 cat >> confdefs.h <<\EOF
10503 #define HAVE_LINUX_THREADS 1
10504 EOF
10505
10506         fi
10507
10508
10509         for ac_hdr in mach/cthreads.h
10510 do
10511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10512 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10513 echo "configure:10514: checking for $ac_hdr" >&5
10514 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10515   echo $ac_n "(cached) $ac_c" 1>&6
10516 else
10517   cat > conftest.$ac_ext <<EOF
10518 #line 10519 "configure"
10519 #include "confdefs.h"
10520 #include <$ac_hdr>
10521 EOF
10522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10523 { (eval echo configure:10524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10525 if test -z "$ac_err"; then
10526   rm -rf conftest*
10527   eval "ac_cv_header_$ac_safe=yes"
10528 else
10529   echo "$ac_err" >&5
10530   echo "configure: failed program was:" >&5
10531   cat conftest.$ac_ext >&5
10532   rm -rf conftest*
10533   eval "ac_cv_header_$ac_safe=no"
10534 fi
10535 rm -f conftest*
10536 fi
10537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10538   echo "$ac_t""yes" 1>&6
10539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10540   cat >> confdefs.h <<EOF
10541 #define $ac_tr_hdr 1
10542 EOF
10543  
10544 else
10545   echo "$ac_t""no" 1>&6
10546 fi
10547 done
10548
10549         for ac_hdr in lwp/lwp.h
10550 do
10551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10553 echo "configure:10554: checking for $ac_hdr" >&5
10554 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10555   echo $ac_n "(cached) $ac_c" 1>&6
10556 else
10557   cat > conftest.$ac_ext <<EOF
10558 #line 10559 "configure"
10559 #include "confdefs.h"
10560 #include <$ac_hdr>
10561 EOF
10562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10563 { (eval echo configure:10564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10565 if test -z "$ac_err"; then
10566   rm -rf conftest*
10567   eval "ac_cv_header_$ac_safe=yes"
10568 else
10569   echo "$ac_err" >&5
10570   echo "configure: failed program was:" >&5
10571   cat conftest.$ac_ext >&5
10572   rm -rf conftest*
10573   eval "ac_cv_header_$ac_safe=no"
10574 fi
10575 rm -f conftest*
10576 fi
10577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10578   echo "$ac_t""yes" 1>&6
10579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10580   cat >> confdefs.h <<EOF
10581 #define $ac_tr_hdr 1
10582 EOF
10583  
10584 else
10585   echo "$ac_t""no" 1>&6
10586 fi
10587 done
10588
10589         for ac_hdr in thread.h synch.h
10590 do
10591 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10592 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10593 echo "configure:10594: checking for $ac_hdr" >&5
10594 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10595   echo $ac_n "(cached) $ac_c" 1>&6
10596 else
10597   cat > conftest.$ac_ext <<EOF
10598 #line 10599 "configure"
10599 #include "confdefs.h"
10600 #include <$ac_hdr>
10601 EOF
10602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10603 { (eval echo configure:10604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10605 if test -z "$ac_err"; then
10606   rm -rf conftest*
10607   eval "ac_cv_header_$ac_safe=yes"
10608 else
10609   echo "$ac_err" >&5
10610   echo "configure: failed program was:" >&5
10611   cat conftest.$ac_ext >&5
10612   rm -rf conftest*
10613   eval "ac_cv_header_$ac_safe=no"
10614 fi
10615 rm -f conftest*
10616 fi
10617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10618   echo "$ac_t""yes" 1>&6
10619     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10620   cat >> confdefs.h <<EOF
10621 #define $ac_tr_hdr 1
10622 EOF
10623  
10624 else
10625   echo "$ac_t""no" 1>&6
10626 fi
10627 done
10628
10629 fi
10630
10631 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10632                         cat >> confdefs.h <<\EOF
10633 #define REENTRANT 1
10634 EOF
10635
10636         cat >> confdefs.h <<\EOF
10637 #define _REENTRANT 1
10638 EOF
10639
10640         cat >> confdefs.h <<\EOF
10641 #define THREAD_SAFE 1
10642 EOF
10643
10644         cat >> confdefs.h <<\EOF
10645 #define _THREAD_SAFE 1
10646 EOF
10647
10648         cat >> confdefs.h <<\EOF
10649 #define THREADSAFE 1
10650 EOF
10651
10652         cat >> confdefs.h <<\EOF
10653 #define _THREADSAFE 1
10654 EOF
10655
10656         cat >> confdefs.h <<\EOF
10657 #define _SGI_MP_SOURCE 1
10658 EOF
10659
10660
10661                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10662 echo "configure:10663: checking for thread specific errno" >&5
10663 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10664   echo $ac_n "(cached) $ac_c" 1>&6
10665 else
10666   
10667                 cat > conftest.$ac_ext <<EOF
10668 #line 10669 "configure"
10669 #include "confdefs.h"
10670 #include <errno.h>
10671 int main() {
10672 errno = 0;
10673 ; return 0; }
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10676   rm -rf conftest*
10677   ol_cv_errno_thread_specific=yes
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -rf conftest*
10682   ol_cv_errno_thread_specific=no
10683 fi
10684 rm -f conftest*
10685         
10686 fi
10687
10688 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10689
10690                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10691 echo "configure:10692: checking for thread specific h_errno" >&5
10692 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10693   echo $ac_n "(cached) $ac_c" 1>&6
10694 else
10695   
10696                 cat > conftest.$ac_ext <<EOF
10697 #line 10698 "configure"
10698 #include "confdefs.h"
10699 #include <netdb.h>
10700 int main() {
10701 h_errno = 0;
10702 ; return 0; }
10703 EOF
10704 if { (eval echo configure:10705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10705   rm -rf conftest*
10706   ol_cv_h_errno_thread_specific=yes
10707 else
10708   echo "configure: failed program was:" >&5
10709   cat conftest.$ac_ext >&5
10710   rm -rf conftest*
10711   ol_cv_h_errno_thread_specific=no
10712 fi
10713 rm -f conftest*
10714         
10715 fi
10716
10717 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10718
10719         if test $ol_cv_errno_thread_specific != yes \
10720                 -o $ol_cv_h_errno_thread_specific != yes ; then
10721                 LIBS="$LTHREAD_LIBS $LIBS"
10722                 LTHREAD_LIBS=""
10723         fi
10724
10725 fi  
10726
10727 if test $ol_link_threads = no ; then
10728         if test $ol_with_threads = yes ; then
10729                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10730         fi
10731
10732         if test $ol_with_threads = auto ; then
10733                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10734                 ol_with_threads=no
10735         fi
10736
10737         cat >> confdefs.h <<\EOF
10738 #define NO_THREADS 1
10739 EOF
10740
10741         LTHREAD_LIBS=""
10742 fi
10743
10744 if test $ol_link_threads != no ; then
10745         cat >> confdefs.h <<\EOF
10746 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10747 EOF
10748
10749 fi
10750
10751
10752 ol_link_ldbm=no 
10753 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10754         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10755 echo "configure:10756: checking for DB2 library" >&5
10756 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10757   echo $ac_n "(cached) $ac_c" 1>&6
10758 else
10759         ol_LIBS="$LIBS"
10760         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10761 echo "configure:10762: checking for db_appexit in -ldb" >&5
10762 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   ac_save_LIBS="$LIBS"
10767 LIBS="-ldb  $LIBS"
10768 cat > conftest.$ac_ext <<EOF
10769 #line 10770 "configure"
10770 #include "confdefs.h"
10771 /* Override any gcc2 internal prototype to avoid an error.  */
10772 /* We use char because int might match the return type of a gcc2
10773     builtin and then its argument prototype would still apply.  */
10774 char db_appexit();
10775
10776 int main() {
10777 db_appexit()
10778 ; return 0; }
10779 EOF
10780 if { (eval echo configure:10781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10781   rm -rf conftest*
10782   eval "ac_cv_lib_$ac_lib_var=yes"
10783 else
10784   echo "configure: failed program was:" >&5
10785   cat conftest.$ac_ext >&5
10786   rm -rf conftest*
10787   eval "ac_cv_lib_$ac_lib_var=no"
10788 fi
10789 rm -f conftest*
10790 LIBS="$ac_save_LIBS"
10791
10792 fi
10793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10794   echo "$ac_t""yes" 1>&6
10795   ol_cv_lib_db2=-ldb
10796 else
10797   echo "$ac_t""no" 1>&6
10798 ol_cv_lib_db2=no
10799 fi
10800
10801         LIBS="$ol_LIBS"
10802
10803 fi
10804
10805 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10806
10807 for ac_hdr in db.h
10808 do
10809 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10810 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10811 echo "configure:10812: checking for $ac_hdr" >&5
10812 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10813   echo $ac_n "(cached) $ac_c" 1>&6
10814 else
10815   cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 #include <$ac_hdr>
10819 EOF
10820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10821 { (eval echo configure:10822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10823 if test -z "$ac_err"; then
10824   rm -rf conftest*
10825   eval "ac_cv_header_$ac_safe=yes"
10826 else
10827   echo "$ac_err" >&5
10828   echo "configure: failed program was:" >&5
10829   cat conftest.$ac_ext >&5
10830   rm -rf conftest*
10831   eval "ac_cv_header_$ac_safe=no"
10832 fi
10833 rm -f conftest*
10834 fi
10835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10836   echo "$ac_t""yes" 1>&6
10837     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10838   cat >> confdefs.h <<EOF
10839 #define $ac_tr_hdr 1
10840 EOF
10841  
10842 else
10843   echo "$ac_t""no" 1>&6
10844 fi
10845 done
10846
10847 if test $ac_cv_header_db_h = yes ; then
10848         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10849 echo "configure:10850: checking if db.h is DB2" >&5
10850 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10851   echo $ac_n "(cached) $ac_c" 1>&6
10852 else
10853   
10854                 cat > conftest.$ac_ext <<EOF
10855 #line 10856 "configure"
10856 #include "confdefs.h"
10857
10858 #                       include <db.h>
10859                         /* this check could be improved */
10860 #                       ifdef DB_VERSION_MAJOR
10861 #                               if DB_VERSION_MAJOR == 2
10862                                         __db_version_2;
10863 #                               endif
10864 #                       endif
10865                 
10866 EOF
10867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10868   egrep "__db_version_2" >/dev/null 2>&1; then
10869   rm -rf conftest*
10870   ol_cv_header_db2=yes
10871 else
10872   rm -rf conftest*
10873   ol_cv_header_db2=no
10874 fi
10875 rm -f conftest*
10876
10877 fi
10878
10879 echo "$ac_t""$ol_cv_header_db2" 1>&6
10880 else
10881         ol_cv_header_db2=no
10882 fi
10883
10884
10885  
10886  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10887 echo "configure:10888: checking for Berkeley DB2" >&5
10888 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10889   echo $ac_n "(cached) $ac_c" 1>&6
10890 else
10891   
10892         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10893                 ol_cv_berkeley_db2=no
10894         else
10895                 ol_cv_berkeley_db2=yes
10896         fi
10897
10898 fi
10899
10900 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10901  if test $ol_cv_berkeley_db2 = yes ; then
10902         cat >> confdefs.h <<\EOF
10903 #define HAVE_BERKELEY_DB2 1
10904 EOF
10905
10906  fi
10907
10908
10909         if test $ol_cv_berkeley_db2 = yes ; then
10910                 ol_link_ldbm=db2
10911                 ol_with_ldbm_api=db2
10912
10913                 if test $ol_with_ldbm_type = hash ; then
10914                         cat >> confdefs.h <<\EOF
10915 #define LDBM_USE_DBHASH 1
10916 EOF
10917
10918                 else
10919                         cat >> confdefs.h <<\EOF
10920 #define LDBM_USE_DBBTREE 1
10921 EOF
10922
10923                 fi
10924
10925                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
10926 echo "configure:10927: checking for DB_THREAD support" >&5
10927 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
10928   echo $ac_n "(cached) $ac_c" 1>&6
10929 else
10930   
10931         ol_LIBS="$LIBS"
10932         if test $ol_cv_lib_db2 != yes ; then
10933                 LIBS="$ol_cv_lib_db2"
10934         fi
10935
10936         if test "$cross_compiling" = yes; then
10937   ol_cv_berkeley_db2_db_thread=cross
10938 else
10939   cat > conftest.$ac_ext <<EOF
10940 #line 10941 "configure"
10941 #include "confdefs.h"
10942
10943 #include <db.h>
10944 #ifndef NULL
10945 #define NULL ((void *)0)
10946 #endif
10947 main()
10948 {
10949         int rc;
10950         DB_ENV env;
10951         u_int32_t flags = DB_CREATE | DB_THREAD;
10952
10953         memset( &env, '\0', sizeof(env) );
10954
10955         rc = db_appinit( NULL, NULL, &env, flags );
10956
10957         if( rc == 0 ) {
10958                 db_appexit( &env );
10959         }
10960
10961         return rc;
10962 }
10963 EOF
10964 if { (eval echo configure:10965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10965 then
10966   ol_cv_berkeley_db2_db_thread=yes
10967 else
10968   echo "configure: failed program was:" >&5
10969   cat conftest.$ac_ext >&5
10970   rm -fr conftest*
10971   ol_cv_berkeley_db2_db_thread=no
10972 fi
10973 rm -fr conftest*
10974 fi
10975
10976
10977         LIBS="$ol_LIBS"
10978
10979         if test $ol_cv_berkeley_db2_db_thread != no ; then
10980                 cat >> confdefs.h <<\EOF
10981 #define HAVE_BERKELEY_DB2_DB_THREAD 1
10982 EOF
10983
10984         fi
10985
10986 fi
10987
10988 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
10989
10990                                                 if test $ol_cv_lib_db2 != yes ; then
10991                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10992                 fi
10993         fi
10994 fi
10995
10996 ol_link_bdb2=no
10997 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10998         if test $ol_cv_berkeley_db2_db_thread != no ; then
10999                 ol_link_bdb2=yes
11000         else
11001                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11002         fi
11003 fi
11004
11005 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11006         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11007 echo "configure:11008: checking for Berkeley DB library" >&5
11008 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11009   echo $ac_n "(cached) $ac_c" 1>&6
11010 else
11011   
11012         for ac_hdr in db1/db.h
11013 do
11014 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11015 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11016 echo "configure:11017: checking for $ac_hdr" >&5
11017 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11018   echo $ac_n "(cached) $ac_c" 1>&6
11019 else
11020   cat > conftest.$ac_ext <<EOF
11021 #line 11022 "configure"
11022 #include "confdefs.h"
11023 #include <$ac_hdr>
11024 EOF
11025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11026 { (eval echo configure:11027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11028 if test -z "$ac_err"; then
11029   rm -rf conftest*
11030   eval "ac_cv_header_$ac_safe=yes"
11031 else
11032   echo "$ac_err" >&5
11033   echo "configure: failed program was:" >&5
11034   cat conftest.$ac_ext >&5
11035   rm -rf conftest*
11036   eval "ac_cv_header_$ac_safe=no"
11037 fi
11038 rm -f conftest*
11039 fi
11040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11041   echo "$ac_t""yes" 1>&6
11042     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11043   cat >> confdefs.h <<EOF
11044 #define $ac_tr_hdr 1
11045 EOF
11046  
11047 else
11048   echo "$ac_t""no" 1>&6
11049 fi
11050 done
11051
11052         ol_LIBS="$LIBS"
11053         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11054 echo "configure:11055: checking for dbopen" >&5
11055 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   cat > conftest.$ac_ext <<EOF
11059 #line 11060 "configure"
11060 #include "confdefs.h"
11061 /* System header to define __stub macros and hopefully few prototypes,
11062     which can conflict with char dbopen(); below.  */
11063 #include <assert.h>
11064 /* Override any gcc2 internal prototype to avoid an error.  */
11065 /* We use char because int might match the return type of a gcc2
11066     builtin and then its argument prototype would still apply.  */
11067 char dbopen();
11068 char (*f)();
11069
11070 int main() {
11071
11072 /* The GNU C library defines this for functions which it implements
11073     to always fail with ENOSYS.  Some functions are actually named
11074     something starting with __ and the normal name is an alias.  */
11075 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11076 choke me
11077 #else
11078 f = dbopen;
11079 #endif
11080
11081 ; return 0; }
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11084   rm -rf conftest*
11085   eval "ac_cv_func_dbopen=yes"
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   eval "ac_cv_func_dbopen=no"
11091 fi
11092 rm -f conftest*
11093 fi
11094
11095 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11096   echo "$ac_t""yes" 1>&6
11097   ol_cv_lib_db=yes
11098 else
11099   echo "$ac_t""no" 1>&6
11100
11101                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11102 echo "configure:11103: checking for dbopen in -ldb1" >&5
11103 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11105   echo $ac_n "(cached) $ac_c" 1>&6
11106 else
11107   ac_save_LIBS="$LIBS"
11108 LIBS="-ldb1  $LIBS"
11109 cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112 /* Override any gcc2 internal prototype to avoid an error.  */
11113 /* We use char because int might match the return type of a gcc2
11114     builtin and then its argument prototype would still apply.  */
11115 char dbopen();
11116
11117 int main() {
11118 dbopen()
11119 ; return 0; }
11120 EOF
11121 if { (eval echo configure:11122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11122   rm -rf conftest*
11123   eval "ac_cv_lib_$ac_lib_var=yes"
11124 else
11125   echo "configure: failed program was:" >&5
11126   cat conftest.$ac_ext >&5
11127   rm -rf conftest*
11128   eval "ac_cv_lib_$ac_lib_var=no"
11129 fi
11130 rm -f conftest*
11131 LIBS="$ac_save_LIBS"
11132
11133 fi
11134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11135   echo "$ac_t""yes" 1>&6
11136   ol_cv_lib_db=-ldb1
11137 else
11138   echo "$ac_t""no" 1>&6
11139
11140                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11141 echo "configure:11142: checking for dbopen in -ldb" >&5
11142 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11143 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11144   echo $ac_n "(cached) $ac_c" 1>&6
11145 else
11146   ac_save_LIBS="$LIBS"
11147 LIBS="-ldb  $LIBS"
11148 cat > conftest.$ac_ext <<EOF
11149 #line 11150 "configure"
11150 #include "confdefs.h"
11151 /* Override any gcc2 internal prototype to avoid an error.  */
11152 /* We use char because int might match the return type of a gcc2
11153     builtin and then its argument prototype would still apply.  */
11154 char dbopen();
11155
11156 int main() {
11157 dbopen()
11158 ; return 0; }
11159 EOF
11160 if { (eval echo configure:11161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11161   rm -rf conftest*
11162   eval "ac_cv_lib_$ac_lib_var=yes"
11163 else
11164   echo "configure: failed program was:" >&5
11165   cat conftest.$ac_ext >&5
11166   rm -rf conftest*
11167   eval "ac_cv_lib_$ac_lib_var=no"
11168 fi
11169 rm -f conftest*
11170 LIBS="$ac_save_LIBS"
11171
11172 fi
11173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11174   echo "$ac_t""yes" 1>&6
11175   ol_cv_lib_db=-ldb
11176 else
11177   echo "$ac_t""no" 1>&6
11178 ol_cv_lib_db=no
11179 fi
11180
11181                 
11182 fi
11183
11184         
11185 fi
11186
11187         LIBS="$ol_LIBS"
11188
11189 fi
11190
11191 echo "$ac_t""$ol_cv_lib_db" 1>&6
11192
11193
11194 for ac_hdr in db_185.h
11195 do
11196 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11197 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11198 echo "configure:11199: checking for $ac_hdr" >&5
11199 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11200   echo $ac_n "(cached) $ac_c" 1>&6
11201 else
11202   cat > conftest.$ac_ext <<EOF
11203 #line 11204 "configure"
11204 #include "confdefs.h"
11205 #include <$ac_hdr>
11206 EOF
11207 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11208 { (eval echo configure:11209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11209 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11210 if test -z "$ac_err"; then
11211   rm -rf conftest*
11212   eval "ac_cv_header_$ac_safe=yes"
11213 else
11214   echo "$ac_err" >&5
11215   echo "configure: failed program was:" >&5
11216   cat conftest.$ac_ext >&5
11217   rm -rf conftest*
11218   eval "ac_cv_header_$ac_safe=no"
11219 fi
11220 rm -f conftest*
11221 fi
11222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11223   echo "$ac_t""yes" 1>&6
11224     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11225   cat >> confdefs.h <<EOF
11226 #define $ac_tr_hdr 1
11227 EOF
11228  
11229 else
11230   echo "$ac_t""no" 1>&6
11231 fi
11232 done
11233
11234 if test "$ol_cv_header_db2" = yes ; then
11235         
11236         ol_cv_header_db=$ac_cv_header_db_185_h
11237 else
11238         ol_cv_header_db=$ac_cv_header_db_h
11239 fi
11240
11241
11242  
11243  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11244 echo "configure:11245: checking for Berkeley DB" >&5
11245 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11246   echo $ac_n "(cached) $ac_c" 1>&6
11247 else
11248   
11249         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11250                 ol_cv_berkeley_db=no
11251         else
11252                 ol_cv_berkeley_db=yes
11253         fi
11254
11255 fi
11256
11257 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11258  if test $ol_cv_berkeley_db = yes ; then
11259         cat >> confdefs.h <<\EOF
11260 #define HAVE_BERKELEY_DB 1
11261 EOF
11262
11263  fi
11264
11265
11266         if test $ol_cv_berkeley_db = yes ; then
11267                 ol_link_ldbm=db
11268                 ol_with_ldbm_api=db
11269
11270                 if test $ol_with_ldbm_type = hash ; then
11271                         cat >> confdefs.h <<\EOF
11272 #define LDBM_USE_DBHASH 1
11273 EOF
11274
11275                 else
11276                         cat >> confdefs.h <<\EOF
11277 #define LDBM_USE_DBBTREE 1
11278 EOF
11279
11280                 fi
11281
11282                                                 if test $ol_cv_lib_db != yes ; then
11283                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11284                 fi
11285         fi
11286 fi
11287
11288 if test $ol_with_ldbm_api = manual ; then
11289                 ol_link_ldbm=yes
11290
11291         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11292
11293         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11294 do
11295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11297 echo "configure:11298: checking for $ac_hdr" >&5
11298 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11299   echo $ac_n "(cached) $ac_c" 1>&6
11300 else
11301   cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304 #include <$ac_hdr>
11305 EOF
11306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11307 { (eval echo configure:11308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11309 if test -z "$ac_err"; then
11310   rm -rf conftest*
11311   eval "ac_cv_header_$ac_safe=yes"
11312 else
11313   echo "$ac_err" >&5
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   eval "ac_cv_header_$ac_safe=no"
11318 fi
11319 rm -f conftest*
11320 fi
11321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11322   echo "$ac_t""yes" 1>&6
11323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11324   cat >> confdefs.h <<EOF
11325 #define $ac_tr_hdr 1
11326 EOF
11327  
11328 else
11329   echo "$ac_t""no" 1>&6
11330 fi
11331 done
11332
11333 fi
11334
11335 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11336         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11337         ol_with_ldbm_api=none
11338 fi
11339
11340 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11341         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11342 echo "configure:11343: checking for MDBM library" >&5
11343 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11344   echo $ac_n "(cached) $ac_c" 1>&6
11345 else
11346         ol_LIBS="$LIBS"
11347         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11348 echo "configure:11349: checking for mdbm_set_chain" >&5
11349 if eval "test \"\${ac_cv_func_mdbm_set_chain+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 /* System header to define __stub macros and hopefully few prototypes,
11356     which can conflict with char mdbm_set_chain(); below.  */
11357 #include <assert.h>
11358 /* Override any gcc2 internal prototype to avoid an error.  */
11359 /* We use char because int might match the return type of a gcc2
11360     builtin and then its argument prototype would still apply.  */
11361 char mdbm_set_chain();
11362 char (*f)();
11363
11364 int main() {
11365
11366 /* The GNU C library defines this for functions which it implements
11367     to always fail with ENOSYS.  Some functions are actually named
11368     something starting with __ and the normal name is an alias.  */
11369 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11370 choke me
11371 #else
11372 f = mdbm_set_chain;
11373 #endif
11374
11375 ; return 0; }
11376 EOF
11377 if { (eval echo configure:11378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11378   rm -rf conftest*
11379   eval "ac_cv_func_mdbm_set_chain=yes"
11380 else
11381   echo "configure: failed program was:" >&5
11382   cat conftest.$ac_ext >&5
11383   rm -rf conftest*
11384   eval "ac_cv_func_mdbm_set_chain=no"
11385 fi
11386 rm -f conftest*
11387 fi
11388
11389 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11390   echo "$ac_t""yes" 1>&6
11391   ol_cv_lib_mdbm=yes
11392 else
11393   echo "$ac_t""no" 1>&6
11394
11395                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11396 echo "configure:11397: checking for mdbm_set_chain in -lmdbm" >&5
11397 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11398 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11399   echo $ac_n "(cached) $ac_c" 1>&6
11400 else
11401   ac_save_LIBS="$LIBS"
11402 LIBS="-lmdbm  $LIBS"
11403 cat > conftest.$ac_ext <<EOF
11404 #line 11405 "configure"
11405 #include "confdefs.h"
11406 /* Override any gcc2 internal prototype to avoid an error.  */
11407 /* We use char because int might match the return type of a gcc2
11408     builtin and then its argument prototype would still apply.  */
11409 char mdbm_set_chain();
11410
11411 int main() {
11412 mdbm_set_chain()
11413 ; return 0; }
11414 EOF
11415 if { (eval echo configure:11416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11416   rm -rf conftest*
11417   eval "ac_cv_lib_$ac_lib_var=yes"
11418 else
11419   echo "configure: failed program was:" >&5
11420   cat conftest.$ac_ext >&5
11421   rm -rf conftest*
11422   eval "ac_cv_lib_$ac_lib_var=no"
11423 fi
11424 rm -f conftest*
11425 LIBS="$ac_save_LIBS"
11426
11427 fi
11428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11429   echo "$ac_t""yes" 1>&6
11430   ol_cv_lib_mdbm=-lmdbm
11431 else
11432   echo "$ac_t""no" 1>&6
11433 ol_cv_lib_mdbm=no
11434 fi
11435
11436         
11437 fi
11438
11439         LIBS="$ol_LIBS"
11440
11441 fi
11442
11443 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11444
11445
11446  for ac_hdr in mdbm.h
11447 do
11448 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11449 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11450 echo "configure:11451: checking for $ac_hdr" >&5
11451 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11452   echo $ac_n "(cached) $ac_c" 1>&6
11453 else
11454   cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457 #include <$ac_hdr>
11458 EOF
11459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11460 { (eval echo configure:11461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11462 if test -z "$ac_err"; then
11463   rm -rf conftest*
11464   eval "ac_cv_header_$ac_safe=yes"
11465 else
11466   echo "$ac_err" >&5
11467   echo "configure: failed program was:" >&5
11468   cat conftest.$ac_ext >&5
11469   rm -rf conftest*
11470   eval "ac_cv_header_$ac_safe=no"
11471 fi
11472 rm -f conftest*
11473 fi
11474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11475   echo "$ac_t""yes" 1>&6
11476     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11477   cat >> confdefs.h <<EOF
11478 #define $ac_tr_hdr 1
11479 EOF
11480  
11481 else
11482   echo "$ac_t""no" 1>&6
11483 fi
11484 done
11485
11486  echo $ac_n "checking for db""... $ac_c" 1>&6
11487 echo "configure:11488: checking for db" >&5
11488 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11489   echo $ac_n "(cached) $ac_c" 1>&6
11490 else
11491   
11492         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11493                 ol_cv_mdbm=no
11494         else
11495                 ol_cv_mdbm=yes
11496         fi
11497
11498 fi
11499
11500 echo "$ac_t""$ol_cv_mdbm" 1>&6
11501  if test $ol_cv_mdbm = yes ; then
11502         cat >> confdefs.h <<\EOF
11503 #define HAVE_MDBM 1
11504 EOF
11505
11506  fi
11507
11508
11509         if test $ol_cv_mdbm = yes ; then
11510                 ol_link_ldbm=mdbm
11511                 ol_with_ldbm_api=mdbm
11512                 if test $ol_cv_lib_mdbm != yes ; then
11513                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11514                 fi
11515         fi
11516 fi
11517
11518 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11519         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11520 echo "configure:11521: checking for GDBM library" >&5
11521 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11522   echo $ac_n "(cached) $ac_c" 1>&6
11523 else
11524         ol_LIBS="$LIBS"
11525         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11526 echo "configure:11527: checking for gdbm_open" >&5
11527 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11528   echo $ac_n "(cached) $ac_c" 1>&6
11529 else
11530   cat > conftest.$ac_ext <<EOF
11531 #line 11532 "configure"
11532 #include "confdefs.h"
11533 /* System header to define __stub macros and hopefully few prototypes,
11534     which can conflict with char gdbm_open(); below.  */
11535 #include <assert.h>
11536 /* Override any gcc2 internal prototype to avoid an error.  */
11537 /* We use char because int might match the return type of a gcc2
11538     builtin and then its argument prototype would still apply.  */
11539 char gdbm_open();
11540 char (*f)();
11541
11542 int main() {
11543
11544 /* The GNU C library defines this for functions which it implements
11545     to always fail with ENOSYS.  Some functions are actually named
11546     something starting with __ and the normal name is an alias.  */
11547 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11548 choke me
11549 #else
11550 f = gdbm_open;
11551 #endif
11552
11553 ; return 0; }
11554 EOF
11555 if { (eval echo configure:11556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11556   rm -rf conftest*
11557   eval "ac_cv_func_gdbm_open=yes"
11558 else
11559   echo "configure: failed program was:" >&5
11560   cat conftest.$ac_ext >&5
11561   rm -rf conftest*
11562   eval "ac_cv_func_gdbm_open=no"
11563 fi
11564 rm -f conftest*
11565 fi
11566
11567 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11568   echo "$ac_t""yes" 1>&6
11569   ol_cv_lib_gdbm=yes
11570 else
11571   echo "$ac_t""no" 1>&6
11572
11573                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11574 echo "configure:11575: checking for gdbm_open in -lgdbm" >&5
11575 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11576 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11577   echo $ac_n "(cached) $ac_c" 1>&6
11578 else
11579   ac_save_LIBS="$LIBS"
11580 LIBS="-lgdbm  $LIBS"
11581 cat > conftest.$ac_ext <<EOF
11582 #line 11583 "configure"
11583 #include "confdefs.h"
11584 /* Override any gcc2 internal prototype to avoid an error.  */
11585 /* We use char because int might match the return type of a gcc2
11586     builtin and then its argument prototype would still apply.  */
11587 char gdbm_open();
11588
11589 int main() {
11590 gdbm_open()
11591 ; return 0; }
11592 EOF
11593 if { (eval echo configure:11594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11594   rm -rf conftest*
11595   eval "ac_cv_lib_$ac_lib_var=yes"
11596 else
11597   echo "configure: failed program was:" >&5
11598   cat conftest.$ac_ext >&5
11599   rm -rf conftest*
11600   eval "ac_cv_lib_$ac_lib_var=no"
11601 fi
11602 rm -f conftest*
11603 LIBS="$ac_save_LIBS"
11604
11605 fi
11606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11607   echo "$ac_t""yes" 1>&6
11608   ol_cv_lib_gdbm=-lgdbm
11609 else
11610   echo "$ac_t""no" 1>&6
11611 ol_cv_lib_gdbm=no
11612 fi
11613
11614         
11615 fi
11616
11617         LIBS="$ol_LIBS"
11618
11619 fi
11620
11621 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11622
11623
11624  for ac_hdr in gdbm.h
11625 do
11626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11628 echo "configure:11629: checking for $ac_hdr" >&5
11629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11630   echo $ac_n "(cached) $ac_c" 1>&6
11631 else
11632   cat > conftest.$ac_ext <<EOF
11633 #line 11634 "configure"
11634 #include "confdefs.h"
11635 #include <$ac_hdr>
11636 EOF
11637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11638 { (eval echo configure:11639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11640 if test -z "$ac_err"; then
11641   rm -rf conftest*
11642   eval "ac_cv_header_$ac_safe=yes"
11643 else
11644   echo "$ac_err" >&5
11645   echo "configure: failed program was:" >&5
11646   cat conftest.$ac_ext >&5
11647   rm -rf conftest*
11648   eval "ac_cv_header_$ac_safe=no"
11649 fi
11650 rm -f conftest*
11651 fi
11652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11653   echo "$ac_t""yes" 1>&6
11654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11655   cat >> confdefs.h <<EOF
11656 #define $ac_tr_hdr 1
11657 EOF
11658  
11659 else
11660   echo "$ac_t""no" 1>&6
11661 fi
11662 done
11663
11664  echo $ac_n "checking for db""... $ac_c" 1>&6
11665 echo "configure:11666: checking for db" >&5
11666 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11667   echo $ac_n "(cached) $ac_c" 1>&6
11668 else
11669   
11670         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11671                 ol_cv_gdbm=no
11672         else
11673                 ol_cv_gdbm=yes
11674         fi
11675
11676 fi
11677
11678 echo "$ac_t""$ol_cv_gdbm" 1>&6
11679  if test $ol_cv_gdbm = yes ; then
11680         cat >> confdefs.h <<\EOF
11681 #define HAVE_GDBM 1
11682 EOF
11683
11684  fi
11685
11686
11687         if test $ol_cv_gdbm = yes ; then
11688                 ol_link_ldbm=gdbm
11689                 ol_with_ldbm_api=gdbm
11690
11691                 if test $ol_cv_lib_gdbm != yes ; then
11692                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11693                 fi
11694         fi
11695 fi
11696
11697 if test $ol_with_ldbm_api = auto ; then
11698         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11699 elif test $ol_with_ldbm_api = ndbm ; then
11700         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11701 echo "configure:11702: checking for NDBM library" >&5
11702 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11703   echo $ac_n "(cached) $ac_c" 1>&6
11704 else
11705         ol_LIBS="$LIBS"
11706         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11707 echo "configure:11708: checking for dbm_open" >&5
11708 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11709   echo $ac_n "(cached) $ac_c" 1>&6
11710 else
11711   cat > conftest.$ac_ext <<EOF
11712 #line 11713 "configure"
11713 #include "confdefs.h"
11714 /* System header to define __stub macros and hopefully few prototypes,
11715     which can conflict with char dbm_open(); below.  */
11716 #include <assert.h>
11717 /* Override any gcc2 internal prototype to avoid an error.  */
11718 /* We use char because int might match the return type of a gcc2
11719     builtin and then its argument prototype would still apply.  */
11720 char dbm_open();
11721 char (*f)();
11722
11723 int main() {
11724
11725 /* The GNU C library defines this for functions which it implements
11726     to always fail with ENOSYS.  Some functions are actually named
11727     something starting with __ and the normal name is an alias.  */
11728 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11729 choke me
11730 #else
11731 f = dbm_open;
11732 #endif
11733
11734 ; return 0; }
11735 EOF
11736 if { (eval echo configure:11737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11737   rm -rf conftest*
11738   eval "ac_cv_func_dbm_open=yes"
11739 else
11740   echo "configure: failed program was:" >&5
11741   cat conftest.$ac_ext >&5
11742   rm -rf conftest*
11743   eval "ac_cv_func_dbm_open=no"
11744 fi
11745 rm -f conftest*
11746 fi
11747
11748 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11749   echo "$ac_t""yes" 1>&6
11750   ol_cv_lib_ndbm=yes
11751 else
11752   echo "$ac_t""no" 1>&6
11753
11754                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11755 echo "configure:11756: checking for dbm_open in -lndbm" >&5
11756 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11758   echo $ac_n "(cached) $ac_c" 1>&6
11759 else
11760   ac_save_LIBS="$LIBS"
11761 LIBS="-lndbm  $LIBS"
11762 cat > conftest.$ac_ext <<EOF
11763 #line 11764 "configure"
11764 #include "confdefs.h"
11765 /* Override any gcc2 internal prototype to avoid an error.  */
11766 /* We use char because int might match the return type of a gcc2
11767     builtin and then its argument prototype would still apply.  */
11768 char dbm_open();
11769
11770 int main() {
11771 dbm_open()
11772 ; return 0; }
11773 EOF
11774 if { (eval echo configure:11775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11775   rm -rf conftest*
11776   eval "ac_cv_lib_$ac_lib_var=yes"
11777 else
11778   echo "configure: failed program was:" >&5
11779   cat conftest.$ac_ext >&5
11780   rm -rf conftest*
11781   eval "ac_cv_lib_$ac_lib_var=no"
11782 fi
11783 rm -f conftest*
11784 LIBS="$ac_save_LIBS"
11785
11786 fi
11787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11788   echo "$ac_t""yes" 1>&6
11789   ol_cv_lib_ndbm=-lndbm
11790 else
11791   echo "$ac_t""no" 1>&6
11792
11793                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11794 echo "configure:11795: checking for dbm_open in -ldbm" >&5
11795 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11797   echo $ac_n "(cached) $ac_c" 1>&6
11798 else
11799   ac_save_LIBS="$LIBS"
11800 LIBS="-ldbm  $LIBS"
11801 cat > conftest.$ac_ext <<EOF
11802 #line 11803 "configure"
11803 #include "confdefs.h"
11804 /* Override any gcc2 internal prototype to avoid an error.  */
11805 /* We use char because int might match the return type of a gcc2
11806     builtin and then its argument prototype would still apply.  */
11807 char dbm_open();
11808
11809 int main() {
11810 dbm_open()
11811 ; return 0; }
11812 EOF
11813 if { (eval echo configure:11814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11814   rm -rf conftest*
11815   eval "ac_cv_lib_$ac_lib_var=yes"
11816 else
11817   echo "configure: failed program was:" >&5
11818   cat conftest.$ac_ext >&5
11819   rm -rf conftest*
11820   eval "ac_cv_lib_$ac_lib_var=no"
11821 fi
11822 rm -f conftest*
11823 LIBS="$ac_save_LIBS"
11824
11825 fi
11826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11827   echo "$ac_t""yes" 1>&6
11828   ol_cv_lib_ndbm=-ldbm
11829 else
11830   echo "$ac_t""no" 1>&6
11831 ol_cv_lib_ndbm=no
11832 fi
11833                 
11834 fi
11835
11836         
11837 fi
11838
11839         LIBS="$ol_LIBS"
11840
11841 fi
11842
11843 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11844
11845
11846  for ac_hdr in ndbm.h
11847 do
11848 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11849 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11850 echo "configure:11851: checking for $ac_hdr" >&5
11851 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11852   echo $ac_n "(cached) $ac_c" 1>&6
11853 else
11854   cat > conftest.$ac_ext <<EOF
11855 #line 11856 "configure"
11856 #include "confdefs.h"
11857 #include <$ac_hdr>
11858 EOF
11859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11860 { (eval echo configure:11861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11862 if test -z "$ac_err"; then
11863   rm -rf conftest*
11864   eval "ac_cv_header_$ac_safe=yes"
11865 else
11866   echo "$ac_err" >&5
11867   echo "configure: failed program was:" >&5
11868   cat conftest.$ac_ext >&5
11869   rm -rf conftest*
11870   eval "ac_cv_header_$ac_safe=no"
11871 fi
11872 rm -f conftest*
11873 fi
11874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11875   echo "$ac_t""yes" 1>&6
11876     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11877   cat >> confdefs.h <<EOF
11878 #define $ac_tr_hdr 1
11879 EOF
11880  
11881 else
11882   echo "$ac_t""no" 1>&6
11883 fi
11884 done
11885
11886  echo $ac_n "checking for db""... $ac_c" 1>&6
11887 echo "configure:11888: checking for db" >&5
11888 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11889   echo $ac_n "(cached) $ac_c" 1>&6
11890 else
11891   
11892         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11893                 ol_cv_ndbm=no
11894         else
11895                 ol_cv_ndbm=yes
11896         fi
11897
11898 fi
11899
11900 echo "$ac_t""$ol_cv_ndbm" 1>&6
11901  if test $ol_cv_ndbm = yes ; then
11902         cat >> confdefs.h <<\EOF
11903 #define HAVE_NDBM 1
11904 EOF
11905
11906  fi
11907
11908
11909         if test $ol_cv_ndbm = yes ; then
11910                 ol_link_ldbm=ndbm
11911                 ol_with_ldbm_api=ndbm
11912
11913                 if test $ol_cv_lib_ndbm != yes ; then
11914                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11915                 fi
11916         fi
11917 fi
11918
11919 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11920         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11921         if test $ol_enable_ldbm = yes ; then
11922                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11923         fi
11924
11925         echo "configure: warning: disabling LDBM" 1>&2
11926         ol_enable_ldbm=no
11927 fi
11928
11929 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
11930         LINK_BINS_DYNAMIC="yes"
11931 else
11932         LINK_BINS_DYNAMIC="no"
11933 fi
11934
11935 if test $ol_enable_wrappers != no ; then
11936         for ac_hdr in tcpd.h
11937 do
11938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11940 echo "configure:11941: checking for $ac_hdr" >&5
11941 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11942   echo $ac_n "(cached) $ac_c" 1>&6
11943 else
11944   cat > conftest.$ac_ext <<EOF
11945 #line 11946 "configure"
11946 #include "confdefs.h"
11947 #include <$ac_hdr>
11948 EOF
11949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11950 { (eval echo configure:11951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11952 if test -z "$ac_err"; then
11953   rm -rf conftest*
11954   eval "ac_cv_header_$ac_safe=yes"
11955 else
11956   echo "$ac_err" >&5
11957   echo "configure: failed program was:" >&5
11958   cat conftest.$ac_ext >&5
11959   rm -rf conftest*
11960   eval "ac_cv_header_$ac_safe=no"
11961 fi
11962 rm -f conftest*
11963 fi
11964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11965   echo "$ac_t""yes" 1>&6
11966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11967   cat >> confdefs.h <<EOF
11968 #define $ac_tr_hdr 1
11969 EOF
11970  
11971 else
11972   echo "$ac_t""no" 1>&6
11973 fi
11974 done
11975
11976
11977         if test $ac_cv_header_tcpd_h != yes ; then
11978                 have_wrappers=no
11979         else
11980                 cat > conftest.$ac_ext <<EOF
11981 #line 11982 "configure"
11982 #include "confdefs.h"
11983
11984 int allow_severity = 0;
11985 int deny_severity  = 0;
11986                 
11987 int main() {
11988 hosts_access()
11989 ; return 0; }
11990 EOF
11991 if { (eval echo configure:11992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11992   rm -rf conftest*
11993   have_wrappers=yes
11994 else
11995   echo "configure: failed program was:" >&5
11996   cat conftest.$ac_ext >&5
11997   rm -rf conftest*
11998   have_wrappers=no
11999 fi
12000 rm -f conftest*
12001         fi
12002
12003         if test $have_wrappers = yes ; then
12004                 cat >> confdefs.h <<\EOF
12005 #define HAVE_TCPD 1
12006 EOF
12007
12008                 WRAP_LIBS="-lwrap"
12009
12010                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12011 echo "configure:12012: checking for main in -lnsl" >&5
12012 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12014   echo $ac_n "(cached) $ac_c" 1>&6
12015 else
12016   ac_save_LIBS="$LIBS"
12017 LIBS="-lnsl  $LIBS"
12018 cat > conftest.$ac_ext <<EOF
12019 #line 12020 "configure"
12020 #include "confdefs.h"
12021
12022 int main() {
12023 main()
12024 ; return 0; }
12025 EOF
12026 if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12027   rm -rf conftest*
12028   eval "ac_cv_lib_$ac_lib_var=yes"
12029 else
12030   echo "configure: failed program was:" >&5
12031   cat conftest.$ac_ext >&5
12032   rm -rf conftest*
12033   eval "ac_cv_lib_$ac_lib_var=no"
12034 fi
12035 rm -f conftest*
12036 LIBS="$ac_save_LIBS"
12037
12038 fi
12039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12040   echo "$ac_t""yes" 1>&6
12041     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12042     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12043   cat >> confdefs.h <<EOF
12044 #define $ac_tr_lib 1
12045 EOF
12046
12047   LIBS="-lnsl $LIBS"
12048
12049 else
12050   echo "$ac_t""no" 1>&6
12051 fi
12052
12053         else
12054                 echo "configure: warning: could not find -lwrap" 1>&2
12055                 if test $ol_enable_wrappers = yes ; then
12056                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12057                 fi
12058
12059                 echo "configure: warning: disabling wrappers support" 1>&2
12060                 ol_enable_wrappers=no
12061                 WRAP_LIBS=""
12062         fi
12063 fi
12064
12065 if test $ol_enable_syslog != no ; then
12066         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12067 echo "configure:12068: checking for openlog" >&5
12068 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12069   echo $ac_n "(cached) $ac_c" 1>&6
12070 else
12071   cat > conftest.$ac_ext <<EOF
12072 #line 12073 "configure"
12073 #include "confdefs.h"
12074 /* System header to define __stub macros and hopefully few prototypes,
12075     which can conflict with char openlog(); below.  */
12076 #include <assert.h>
12077 /* Override any gcc2 internal prototype to avoid an error.  */
12078 /* We use char because int might match the return type of a gcc2
12079     builtin and then its argument prototype would still apply.  */
12080 char openlog();
12081 char (*f)();
12082
12083 int main() {
12084
12085 /* The GNU C library defines this for functions which it implements
12086     to always fail with ENOSYS.  Some functions are actually named
12087     something starting with __ and the normal name is an alias.  */
12088 #if defined (__stub_openlog) || defined (__stub___openlog)
12089 choke me
12090 #else
12091 f = openlog;
12092 #endif
12093
12094 ; return 0; }
12095 EOF
12096 if { (eval echo configure:12097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12097   rm -rf conftest*
12098   eval "ac_cv_func_openlog=yes"
12099 else
12100   echo "configure: failed program was:" >&5
12101   cat conftest.$ac_ext >&5
12102   rm -rf conftest*
12103   eval "ac_cv_func_openlog=no"
12104 fi
12105 rm -f conftest*
12106 fi
12107
12108 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12109   echo "$ac_t""yes" 1>&6
12110   :
12111 else
12112   echo "$ac_t""no" 1>&6
12113 fi
12114
12115         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12116                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12117         fi
12118         ol_enable_syslog=$ac_cv_func_openlog
12119 fi
12120
12121 if test $ol_enable_dmalloc != no ; then
12122         for ac_hdr in dmalloc.h
12123 do
12124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12126 echo "configure:12127: checking for $ac_hdr" >&5
12127 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12128   echo $ac_n "(cached) $ac_c" 1>&6
12129 else
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 #include <$ac_hdr>
12134 EOF
12135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12136 { (eval echo configure:12137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12138 if test -z "$ac_err"; then
12139   rm -rf conftest*
12140   eval "ac_cv_header_$ac_safe=yes"
12141 else
12142   echo "$ac_err" >&5
12143   echo "configure: failed program was:" >&5
12144   cat conftest.$ac_ext >&5
12145   rm -rf conftest*
12146   eval "ac_cv_header_$ac_safe=no"
12147 fi
12148 rm -f conftest*
12149 fi
12150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12151   echo "$ac_t""yes" 1>&6
12152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12153   cat >> confdefs.h <<EOF
12154 #define $ac_tr_hdr 1
12155 EOF
12156  
12157 else
12158   echo "$ac_t""no" 1>&6
12159 fi
12160 done
12161
12162         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12163 echo "configure:12164: checking for dmalloc_shutdown in -ldmalloc" >&5
12164 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12166   echo $ac_n "(cached) $ac_c" 1>&6
12167 else
12168   ac_save_LIBS="$LIBS"
12169 LIBS="-ldmalloc  $LIBS"
12170 cat > conftest.$ac_ext <<EOF
12171 #line 12172 "configure"
12172 #include "confdefs.h"
12173 /* Override any gcc2 internal prototype to avoid an error.  */
12174 /* We use char because int might match the return type of a gcc2
12175     builtin and then its argument prototype would still apply.  */
12176 char dmalloc_shutdown();
12177
12178 int main() {
12179 dmalloc_shutdown()
12180 ; return 0; }
12181 EOF
12182 if { (eval echo configure:12183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12183   rm -rf conftest*
12184   eval "ac_cv_lib_$ac_lib_var=yes"
12185 else
12186   echo "configure: failed program was:" >&5
12187   cat conftest.$ac_ext >&5
12188   rm -rf conftest*
12189   eval "ac_cv_lib_$ac_lib_var=no"
12190 fi
12191 rm -f conftest*
12192 LIBS="$ac_save_LIBS"
12193
12194 fi
12195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12196   echo "$ac_t""yes" 1>&6
12197     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12198     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12199   cat >> confdefs.h <<EOF
12200 #define $ac_tr_lib 1
12201 EOF
12202
12203   LIBS="-ldmalloc $LIBS"
12204
12205 else
12206   echo "$ac_t""no" 1>&6
12207 fi
12208
12209 fi
12210
12211 if test $ol_enable_tcl != no ; then
12212         for ac_hdr in tcl.h
12213 do
12214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12216 echo "configure:12217: checking for $ac_hdr" >&5
12217 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12218   echo $ac_n "(cached) $ac_c" 1>&6
12219 else
12220   cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 #include <$ac_hdr>
12224 EOF
12225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12226 { (eval echo configure:12227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12228 if test -z "$ac_err"; then
12229   rm -rf conftest*
12230   eval "ac_cv_header_$ac_safe=yes"
12231 else
12232   echo "$ac_err" >&5
12233   echo "configure: failed program was:" >&5
12234   cat conftest.$ac_ext >&5
12235   rm -rf conftest*
12236   eval "ac_cv_header_$ac_safe=no"
12237 fi
12238 rm -f conftest*
12239 fi
12240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12241   echo "$ac_t""yes" 1>&6
12242     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12243   cat >> confdefs.h <<EOF
12244 #define $ac_tr_hdr 1
12245 EOF
12246  
12247 else
12248   echo "$ac_t""no" 1>&6
12249 fi
12250 done
12251
12252
12253         if test $ac_cv_header_tcl_h != yes ; then
12254                 have_tcl=no
12255         else
12256                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12257                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12258 echo "configure:12259: checking for main in -l$lib" >&5
12259 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12261   echo $ac_n "(cached) $ac_c" 1>&6
12262 else
12263   ac_save_LIBS="$LIBS"
12264 LIBS="-l$lib  $LIBS"
12265 cat > conftest.$ac_ext <<EOF
12266 #line 12267 "configure"
12267 #include "confdefs.h"
12268
12269 int main() {
12270 main()
12271 ; return 0; }
12272 EOF
12273 if { (eval echo configure:12274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12274   rm -rf conftest*
12275   eval "ac_cv_lib_$ac_lib_var=yes"
12276 else
12277   echo "configure: failed program was:" >&5
12278   cat conftest.$ac_ext >&5
12279   rm -rf conftest*
12280   eval "ac_cv_lib_$ac_lib_var=no"
12281 fi
12282 rm -f conftest*
12283 LIBS="$ac_save_LIBS"
12284
12285 fi
12286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12287   echo "$ac_t""yes" 1>&6
12288   have_tcl=yes
12289                            if test x"$ol_with_tcl_module" == "xstatic" ; then
12290                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12291                            else
12292                                MOD_TCL_LIB="-l${lib}"
12293                            fi;break
12294 else
12295   echo "$ac_t""no" 1>&6
12296 have_tcl=no
12297 fi
12298
12299                 done
12300         fi
12301
12302         if test $have_tcl != yes ; then
12303                 echo "configure: warning: could not find -ltcl" 1>&2
12304                 if test $ol_enable_tcl = yes ; then
12305                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12306                 fi
12307
12308                 ol_enable_tcl=no
12309         fi
12310 fi
12311
12312 ol_link_termcap=no
12313 for ac_hdr in termcap.h ncurses.h
12314 do
12315 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12316 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12317 echo "configure:12318: checking for $ac_hdr" >&5
12318 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12319   echo $ac_n "(cached) $ac_c" 1>&6
12320 else
12321   cat > conftest.$ac_ext <<EOF
12322 #line 12323 "configure"
12323 #include "confdefs.h"
12324 #include <$ac_hdr>
12325 EOF
12326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12327 { (eval echo configure:12328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12329 if test -z "$ac_err"; then
12330   rm -rf conftest*
12331   eval "ac_cv_header_$ac_safe=yes"
12332 else
12333   echo "$ac_err" >&5
12334   echo "configure: failed program was:" >&5
12335   cat conftest.$ac_ext >&5
12336   rm -rf conftest*
12337   eval "ac_cv_header_$ac_safe=no"
12338 fi
12339 rm -f conftest*
12340 fi
12341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12342   echo "$ac_t""yes" 1>&6
12343     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12344   cat >> confdefs.h <<EOF
12345 #define $ac_tr_hdr 1
12346 EOF
12347  
12348 else
12349   echo "$ac_t""no" 1>&6
12350 fi
12351 done
12352
12353
12354 if test $ol_link_termcap = no ; then
12355         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12356 echo "configure:12357: checking for tputs in -ltermcap" >&5
12357 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12359   echo $ac_n "(cached) $ac_c" 1>&6
12360 else
12361   ac_save_LIBS="$LIBS"
12362 LIBS="-ltermcap  $LIBS"
12363 cat > conftest.$ac_ext <<EOF
12364 #line 12365 "configure"
12365 #include "confdefs.h"
12366 /* Override any gcc2 internal prototype to avoid an error.  */
12367 /* We use char because int might match the return type of a gcc2
12368     builtin and then its argument prototype would still apply.  */
12369 char tputs();
12370
12371 int main() {
12372 tputs()
12373 ; return 0; }
12374 EOF
12375 if { (eval echo configure:12376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12376   rm -rf conftest*
12377   eval "ac_cv_lib_$ac_lib_var=yes"
12378 else
12379   echo "configure: failed program was:" >&5
12380   cat conftest.$ac_ext >&5
12381   rm -rf conftest*
12382   eval "ac_cv_lib_$ac_lib_var=no"
12383 fi
12384 rm -f conftest*
12385 LIBS="$ac_save_LIBS"
12386
12387 fi
12388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12389   echo "$ac_t""yes" 1>&6
12390   have_termcap=yes
12391 else
12392   echo "$ac_t""no" 1>&6
12393 have_termcap=no
12394 fi
12395
12396         if test $have_termcap = yes ; then
12397                 cat >> confdefs.h <<\EOF
12398 #define HAVE_TERMCAP 1
12399 EOF
12400
12401                 ol_link_termcap=yes
12402                 TERMCAP_LIBS=-ltermcap
12403         fi
12404 fi
12405
12406 if test $ol_link_termcap = no ; then
12407         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12408 echo "configure:12409: checking for initscr in -lncurses" >&5
12409 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12410 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12411   echo $ac_n "(cached) $ac_c" 1>&6
12412 else
12413   ac_save_LIBS="$LIBS"
12414 LIBS="-lncurses  $LIBS"
12415 cat > conftest.$ac_ext <<EOF
12416 #line 12417 "configure"
12417 #include "confdefs.h"
12418 /* Override any gcc2 internal prototype to avoid an error.  */
12419 /* We use char because int might match the return type of a gcc2
12420     builtin and then its argument prototype would still apply.  */
12421 char initscr();
12422
12423 int main() {
12424 initscr()
12425 ; return 0; }
12426 EOF
12427 if { (eval echo configure:12428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12428   rm -rf conftest*
12429   eval "ac_cv_lib_$ac_lib_var=yes"
12430 else
12431   echo "configure: failed program was:" >&5
12432   cat conftest.$ac_ext >&5
12433   rm -rf conftest*
12434   eval "ac_cv_lib_$ac_lib_var=no"
12435 fi
12436 rm -f conftest*
12437 LIBS="$ac_save_LIBS"
12438
12439 fi
12440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12441   echo "$ac_t""yes" 1>&6
12442   have_ncurses=yes
12443 else
12444   echo "$ac_t""no" 1>&6
12445 have_ncurses=no
12446 fi
12447
12448         if test $have_ncurses = yes ; then
12449                 cat >> confdefs.h <<\EOF
12450 #define HAVE_NCURSES 1
12451 EOF
12452
12453                 ol_link_termcap=yes
12454                 TERMCAP_LIBS=-lncurses
12455         fi
12456 fi
12457
12458 if test $ol_link_termcap = no ; then
12459         cat >> confdefs.h <<\EOF
12460 #define NO_TERMCAP 1
12461 EOF
12462
12463         TERMCAP_LIBS=
12464 fi
12465
12466 ol_link_sasl=no
12467 if test $ol_with_cyrus_sasl != no ; then
12468         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12469 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12470 echo "configure:12471: checking for sasl.h" >&5
12471 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12472   echo $ac_n "(cached) $ac_c" 1>&6
12473 else
12474   cat > conftest.$ac_ext <<EOF
12475 #line 12476 "configure"
12476 #include "confdefs.h"
12477 #include <sasl.h>
12478 EOF
12479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12480 { (eval echo configure:12481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12482 if test -z "$ac_err"; then
12483   rm -rf conftest*
12484   eval "ac_cv_header_$ac_safe=yes"
12485 else
12486   echo "$ac_err" >&5
12487   echo "configure: failed program was:" >&5
12488   cat conftest.$ac_ext >&5
12489   rm -rf conftest*
12490   eval "ac_cv_header_$ac_safe=no"
12491 fi
12492 rm -f conftest*
12493 fi
12494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12495   echo "$ac_t""yes" 1>&6
12496   :
12497 else
12498   echo "$ac_t""no" 1>&6
12499 fi
12500
12501
12502         if test $ac_cv_header_sasl_h = yes ; then
12503                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12504 echo "configure:12505: checking for sasl_client_init in -lsasl" >&5
12505 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12507   echo $ac_n "(cached) $ac_c" 1>&6
12508 else
12509   ac_save_LIBS="$LIBS"
12510 LIBS="-lsasl  $LIBS"
12511 cat > conftest.$ac_ext <<EOF
12512 #line 12513 "configure"
12513 #include "confdefs.h"
12514 /* Override any gcc2 internal prototype to avoid an error.  */
12515 /* We use char because int might match the return type of a gcc2
12516     builtin and then its argument prototype would still apply.  */
12517 char sasl_client_init();
12518
12519 int main() {
12520 sasl_client_init()
12521 ; return 0; }
12522 EOF
12523 if { (eval echo configure:12524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12524   rm -rf conftest*
12525   eval "ac_cv_lib_$ac_lib_var=yes"
12526 else
12527   echo "configure: failed program was:" >&5
12528   cat conftest.$ac_ext >&5
12529   rm -rf conftest*
12530   eval "ac_cv_lib_$ac_lib_var=no"
12531 fi
12532 rm -f conftest*
12533 LIBS="$ac_save_LIBS"
12534
12535 fi
12536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12537   echo "$ac_t""yes" 1>&6
12538   have_cyrus_sasl=yes
12539 else
12540   echo "$ac_t""no" 1>&6
12541 have_cyrus_sasl=no
12542 fi
12543
12544
12545                 if test $have_cyrus_sasl != no ; then
12546                         SASL_LIBS="-lsasl"
12547                         cat >> confdefs.h <<\EOF
12548 #define HAVE_CYRUS_SASL 1
12549 EOF
12550
12551                         ol_link_sasl=yes
12552                 fi
12553         fi
12554
12555         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12556                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12557         fi
12558 fi
12559
12560 if test $cross_compiling != yes ; then
12561         dev=no
12562         if test -r /dev/urandom ; then
12563                 dev="/dev/urandom";
12564         elif test -r /idev/urandom ; then
12565                 dev="/idev/urandom";
12566         elif test -r /dev/srandom ; then
12567                 dev="/dev/srandom";
12568         elif test -r /dev/random ; then
12569                 dev="/dev/random";
12570         elif test -r /idev/random ; then
12571                 dev="/idev/random";
12572         fi
12573
12574         if test $dev != no ; then
12575                 cat >> confdefs.h <<EOF
12576 #define URANDOM_DEVICE "$dev"
12577 EOF
12578
12579         fi
12580 fi
12581
12582 ol_link_fetch=no
12583 if test $ol_with_fetch != no ; then
12584         ol=$LIBS
12585 LIBS="-lfetch -lcom_err $LIBS"
12586 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12587 echo "configure:12588: checking fetch(3) library" >&5
12588 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12589   echo $ac_n "(cached) $ac_c" 1>&6
12590 else
12591   
12592         cat > conftest.$ac_ext <<EOF
12593 #line 12594 "configure"
12594 #include "confdefs.h"
12595
12596 #include <sys/param.h>
12597 #include <stdio.h>
12598 #include <fetch.h>
12599 int main() {
12600 struct url *u = fetchParseURL("file:///"); 
12601 ; return 0; }
12602 EOF
12603 if { (eval echo configure:12604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12604   rm -rf conftest*
12605   ol_cv_lib_fetch=yes
12606 else
12607   echo "configure: failed program was:" >&5
12608   cat conftest.$ac_ext >&5
12609   rm -rf conftest*
12610   ol_cv_lib_fetch=no
12611 fi
12612 rm -f conftest*
12613 fi
12614
12615 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12616 LIBS=$ol_LIBS
12617 if test $ol_cv_lib_fetch != no ; then
12618         ol_link_fetch="-lfetch -lcom_err"
12619         cat >> confdefs.h <<\EOF
12620 #define HAVE_FETCH 1
12621 EOF
12622
12623 fi
12624
12625
12626         if test $ol_cv_lib_fetch != no ; then
12627                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12628                 ol_link_fetch=freebsd
12629
12630         elif test $ol_with_fetch != auto ; then
12631                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12632         fi 
12633 fi
12634
12635 ol_link_readline=no
12636 if test $ol_with_readline != no ; then
12637         for ac_hdr in readline/readline.h readline/history.h
12638 do
12639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12641 echo "configure:12642: checking for $ac_hdr" >&5
12642 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12643   echo $ac_n "(cached) $ac_c" 1>&6
12644 else
12645   cat > conftest.$ac_ext <<EOF
12646 #line 12647 "configure"
12647 #include "confdefs.h"
12648 #include <$ac_hdr>
12649 EOF
12650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12651 { (eval echo configure:12652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12653 if test -z "$ac_err"; then
12654   rm -rf conftest*
12655   eval "ac_cv_header_$ac_safe=yes"
12656 else
12657   echo "$ac_err" >&5
12658   echo "configure: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   rm -rf conftest*
12661   eval "ac_cv_header_$ac_safe=no"
12662 fi
12663 rm -f conftest*
12664 fi
12665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12666   echo "$ac_t""yes" 1>&6
12667     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12668   cat >> confdefs.h <<EOF
12669 #define $ac_tr_hdr 1
12670 EOF
12671  
12672 else
12673   echo "$ac_t""no" 1>&6
12674 fi
12675 done
12676
12677
12678         if test $ac_cv_header_readline_readline_h = yes ; then
12679                 save_LIBS="$LIBS"
12680                 LIBS="$TERMCAP_LIBS $LIBS"
12681                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12682 echo "configure:12683: checking for readline in -lreadline" >&5
12683 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12684 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12685   echo $ac_n "(cached) $ac_c" 1>&6
12686 else
12687   ac_save_LIBS="$LIBS"
12688 LIBS="-lreadline  $LIBS"
12689 cat > conftest.$ac_ext <<EOF
12690 #line 12691 "configure"
12691 #include "confdefs.h"
12692 /* Override any gcc2 internal prototype to avoid an error.  */
12693 /* We use char because int might match the return type of a gcc2
12694     builtin and then its argument prototype would still apply.  */
12695 char readline();
12696
12697 int main() {
12698 readline()
12699 ; return 0; }
12700 EOF
12701 if { (eval echo configure:12702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12702   rm -rf conftest*
12703   eval "ac_cv_lib_$ac_lib_var=yes"
12704 else
12705   echo "configure: failed program was:" >&5
12706   cat conftest.$ac_ext >&5
12707   rm -rf conftest*
12708   eval "ac_cv_lib_$ac_lib_var=no"
12709 fi
12710 rm -f conftest*
12711 LIBS="$ac_save_LIBS"
12712
12713 fi
12714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12715   echo "$ac_t""yes" 1>&6
12716   have_readline=yes
12717 else
12718   echo "$ac_t""no" 1>&6
12719 have_readline=no
12720 fi
12721
12722                 LIBS="$save_LIBS"
12723                         
12724                 if test $have_readline = yes ; then
12725                         ol_with_readline=found
12726                         ol_link_readline=yes
12727
12728                         READLINE_LIBS="-lreadline"
12729                 fi
12730         fi
12731 fi
12732
12733 if test $ol_link_readline = yes ; then
12734         cat >> confdefs.h <<\EOF
12735 #define HAVE_READLINE 1
12736 EOF
12737
12738 fi
12739
12740
12741 if test $ol_enable_crypt != no ; then
12742         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12743 echo "configure:12744: checking for crypt" >&5
12744 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12745   echo $ac_n "(cached) $ac_c" 1>&6
12746 else
12747   cat > conftest.$ac_ext <<EOF
12748 #line 12749 "configure"
12749 #include "confdefs.h"
12750 /* System header to define __stub macros and hopefully few prototypes,
12751     which can conflict with char crypt(); below.  */
12752 #include <assert.h>
12753 /* Override any gcc2 internal prototype to avoid an error.  */
12754 /* We use char because int might match the return type of a gcc2
12755     builtin and then its argument prototype would still apply.  */
12756 char crypt();
12757 char (*f)();
12758
12759 int main() {
12760
12761 /* The GNU C library defines this for functions which it implements
12762     to always fail with ENOSYS.  Some functions are actually named
12763     something starting with __ and the normal name is an alias.  */
12764 #if defined (__stub_crypt) || defined (__stub___crypt)
12765 choke me
12766 #else
12767 f = crypt;
12768 #endif
12769
12770 ; return 0; }
12771 EOF
12772 if { (eval echo configure:12773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12773   rm -rf conftest*
12774   eval "ac_cv_func_crypt=yes"
12775 else
12776   echo "configure: failed program was:" >&5
12777   cat conftest.$ac_ext >&5
12778   rm -rf conftest*
12779   eval "ac_cv_func_crypt=no"
12780 fi
12781 rm -f conftest*
12782 fi
12783
12784 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12785   echo "$ac_t""yes" 1>&6
12786   have_crypt=yes
12787 else
12788   echo "$ac_t""no" 1>&6
12789
12790                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12791 echo "configure:12792: checking for crypt in -lcrypt" >&5
12792 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12793 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12794   echo $ac_n "(cached) $ac_c" 1>&6
12795 else
12796   ac_save_LIBS="$LIBS"
12797 LIBS="-lcrypt  $LIBS"
12798 cat > conftest.$ac_ext <<EOF
12799 #line 12800 "configure"
12800 #include "confdefs.h"
12801 /* Override any gcc2 internal prototype to avoid an error.  */
12802 /* We use char because int might match the return type of a gcc2
12803     builtin and then its argument prototype would still apply.  */
12804 char crypt();
12805
12806 int main() {
12807 crypt()
12808 ; return 0; }
12809 EOF
12810 if { (eval echo configure:12811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12811   rm -rf conftest*
12812   eval "ac_cv_lib_$ac_lib_var=yes"
12813 else
12814   echo "configure: failed program was:" >&5
12815   cat conftest.$ac_ext >&5
12816   rm -rf conftest*
12817   eval "ac_cv_lib_$ac_lib_var=no"
12818 fi
12819 rm -f conftest*
12820 LIBS="$ac_save_LIBS"
12821
12822 fi
12823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12824   echo "$ac_t""yes" 1>&6
12825   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12826                         have_crypt=yes
12827 else
12828   echo "$ac_t""no" 1>&6
12829 have_crypt=no
12830 fi
12831
12832 fi
12833
12834
12835         if test $have_crypt = yes ; then
12836                 cat >> confdefs.h <<\EOF
12837 #define HAVE_CRYPT 1
12838 EOF
12839
12840         else
12841                 echo "configure: warning: could not find crypt" 1>&2
12842                 if test $ol_enable_crypt = yes ; then
12843                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12844                 fi
12845
12846                 echo "configure: warning: disabling crypt support" 1>&2
12847                 ol_enable_crypt=no
12848         fi
12849 fi
12850
12851 if test $ol_enable_proctitle != no ; then
12852         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12853 echo "configure:12854: checking for setproctitle" >&5
12854 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12855   echo $ac_n "(cached) $ac_c" 1>&6
12856 else
12857   cat > conftest.$ac_ext <<EOF
12858 #line 12859 "configure"
12859 #include "confdefs.h"
12860 /* System header to define __stub macros and hopefully few prototypes,
12861     which can conflict with char setproctitle(); below.  */
12862 #include <assert.h>
12863 /* Override any gcc2 internal prototype to avoid an error.  */
12864 /* We use char because int might match the return type of a gcc2
12865     builtin and then its argument prototype would still apply.  */
12866 char setproctitle();
12867 char (*f)();
12868
12869 int main() {
12870
12871 /* The GNU C library defines this for functions which it implements
12872     to always fail with ENOSYS.  Some functions are actually named
12873     something starting with __ and the normal name is an alias.  */
12874 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12875 choke me
12876 #else
12877 f = setproctitle;
12878 #endif
12879
12880 ; return 0; }
12881 EOF
12882 if { (eval echo configure:12883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12883   rm -rf conftest*
12884   eval "ac_cv_func_setproctitle=yes"
12885 else
12886   echo "configure: failed program was:" >&5
12887   cat conftest.$ac_ext >&5
12888   rm -rf conftest*
12889   eval "ac_cv_func_setproctitle=no"
12890 fi
12891 rm -f conftest*
12892 fi
12893
12894 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12895   echo "$ac_t""yes" 1>&6
12896   have_setproctitle=yes
12897 else
12898   echo "$ac_t""no" 1>&6
12899
12900                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12901 echo "configure:12902: checking for setproctitle in -lutil" >&5
12902 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12903 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12904   echo $ac_n "(cached) $ac_c" 1>&6
12905 else
12906   ac_save_LIBS="$LIBS"
12907 LIBS="-lutil  $LIBS"
12908 cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 /* Override any gcc2 internal prototype to avoid an error.  */
12912 /* We use char because int might match the return type of a gcc2
12913     builtin and then its argument prototype would still apply.  */
12914 char setproctitle();
12915
12916 int main() {
12917 setproctitle()
12918 ; return 0; }
12919 EOF
12920 if { (eval echo configure:12921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12921   rm -rf conftest*
12922   eval "ac_cv_lib_$ac_lib_var=yes"
12923 else
12924   echo "configure: failed program was:" >&5
12925   cat conftest.$ac_ext >&5
12926   rm -rf conftest*
12927   eval "ac_cv_lib_$ac_lib_var=no"
12928 fi
12929 rm -f conftest*
12930 LIBS="$ac_save_LIBS"
12931
12932 fi
12933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12934   echo "$ac_t""yes" 1>&6
12935   have_setproctitle=yes
12936                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12937 else
12938   echo "$ac_t""no" 1>&6
12939 have_setproctitle=no
12940                         LIBOBJS="$LIBOBJS setproctitle.o"
12941                         LIBSRCS="$LIBSRCS setproctitle.c"
12942 fi
12943
12944 fi
12945
12946
12947         if test $have_setproctitle = yes ; then
12948                 cat >> confdefs.h <<\EOF
12949 #define HAVE_SETPROCTITLE 1
12950 EOF
12951
12952         fi
12953 fi
12954
12955 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12956 echo "configure:12957: checking for ANSI C header files" >&5
12957 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12958   echo $ac_n "(cached) $ac_c" 1>&6
12959 else
12960   cat > conftest.$ac_ext <<EOF
12961 #line 12962 "configure"
12962 #include "confdefs.h"
12963 #include <stdlib.h>
12964 #include <stdarg.h>
12965 #include <string.h>
12966 #include <float.h>
12967 EOF
12968 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12969 { (eval echo configure:12970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12970 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12971 if test -z "$ac_err"; then
12972   rm -rf conftest*
12973   ac_cv_header_stdc=yes
12974 else
12975   echo "$ac_err" >&5
12976   echo "configure: failed program was:" >&5
12977   cat conftest.$ac_ext >&5
12978   rm -rf conftest*
12979   ac_cv_header_stdc=no
12980 fi
12981 rm -f conftest*
12982
12983 if test $ac_cv_header_stdc = yes; then
12984   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12985 cat > conftest.$ac_ext <<EOF
12986 #line 12987 "configure"
12987 #include "confdefs.h"
12988 #include <string.h>
12989 EOF
12990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12991   egrep "memchr" >/dev/null 2>&1; then
12992   :
12993 else
12994   rm -rf conftest*
12995   ac_cv_header_stdc=no
12996 fi
12997 rm -f conftest*
12998
12999 fi
13000
13001 if test $ac_cv_header_stdc = yes; then
13002   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13003 cat > conftest.$ac_ext <<EOF
13004 #line 13005 "configure"
13005 #include "confdefs.h"
13006 #include <stdlib.h>
13007 EOF
13008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13009   egrep "free" >/dev/null 2>&1; then
13010   :
13011 else
13012   rm -rf conftest*
13013   ac_cv_header_stdc=no
13014 fi
13015 rm -f conftest*
13016
13017 fi
13018
13019 if test $ac_cv_header_stdc = yes; then
13020   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13021 if test "$cross_compiling" = yes; then
13022   :
13023 else
13024   cat > conftest.$ac_ext <<EOF
13025 #line 13026 "configure"
13026 #include "confdefs.h"
13027 #include <ctype.h>
13028 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13029 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13030 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13031 int main () { int i; for (i = 0; i < 256; i++)
13032 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13033 exit (0); }
13034
13035 EOF
13036 if { (eval echo configure:13037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13037 then
13038   :
13039 else
13040   echo "configure: failed program was:" >&5
13041   cat conftest.$ac_ext >&5
13042   rm -fr conftest*
13043   ac_cv_header_stdc=no
13044 fi
13045 rm -fr conftest*
13046 fi
13047
13048 fi
13049 fi
13050
13051 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13052 if test $ac_cv_header_stdc = yes; then
13053   cat >> confdefs.h <<\EOF
13054 #define STDC_HEADERS 1
13055 EOF
13056
13057 fi
13058
13059 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13060 echo "configure:13061: checking for mode_t" >&5
13061 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13062   echo $ac_n "(cached) $ac_c" 1>&6
13063 else
13064   cat > conftest.$ac_ext <<EOF
13065 #line 13066 "configure"
13066 #include "confdefs.h"
13067 #include <sys/types.h>
13068 #if STDC_HEADERS
13069 #include <stdlib.h>
13070 #include <stddef.h>
13071 #endif
13072 EOF
13073 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13074   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13075   rm -rf conftest*
13076   eval "ac_cv_type_mode_t=yes"
13077 else
13078   rm -rf conftest*
13079   eval "ac_cv_type_mode_t=no"
13080 fi
13081 rm -f conftest*
13082
13083 fi
13084 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13085   echo "$ac_t""yes" 1>&6
13086 else
13087   echo "$ac_t""no" 1>&6
13088   cat >> confdefs.h <<EOF
13089 #define mode_t int
13090 EOF
13091
13092 fi
13093
13094 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13095 echo "configure:13096: checking for off_t" >&5
13096 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13097   echo $ac_n "(cached) $ac_c" 1>&6
13098 else
13099   cat > conftest.$ac_ext <<EOF
13100 #line 13101 "configure"
13101 #include "confdefs.h"
13102 #include <sys/types.h>
13103 #if STDC_HEADERS
13104 #include <stdlib.h>
13105 #include <stddef.h>
13106 #endif
13107 EOF
13108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13109   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13110   rm -rf conftest*
13111   eval "ac_cv_type_off_t=yes"
13112 else
13113   rm -rf conftest*
13114   eval "ac_cv_type_off_t=no"
13115 fi
13116 rm -f conftest*
13117
13118 fi
13119 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13120   echo "$ac_t""yes" 1>&6
13121 else
13122   echo "$ac_t""no" 1>&6
13123   cat >> confdefs.h <<EOF
13124 #define off_t long
13125 EOF
13126
13127 fi
13128
13129 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13130 echo "configure:13131: checking for pid_t" >&5
13131 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13132   echo $ac_n "(cached) $ac_c" 1>&6
13133 else
13134   cat > conftest.$ac_ext <<EOF
13135 #line 13136 "configure"
13136 #include "confdefs.h"
13137 #include <sys/types.h>
13138 #if STDC_HEADERS
13139 #include <stdlib.h>
13140 #include <stddef.h>
13141 #endif
13142 EOF
13143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13144   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13145   rm -rf conftest*
13146   eval "ac_cv_type_pid_t=yes"
13147 else
13148   rm -rf conftest*
13149   eval "ac_cv_type_pid_t=no"
13150 fi
13151 rm -f conftest*
13152
13153 fi
13154 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13155   echo "$ac_t""yes" 1>&6
13156 else
13157   echo "$ac_t""no" 1>&6
13158   cat >> confdefs.h <<EOF
13159 #define pid_t int
13160 EOF
13161
13162 fi
13163
13164 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13165 echo "configure:13166: checking for ptrdiff_t" >&5
13166 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13167   echo $ac_n "(cached) $ac_c" 1>&6
13168 else
13169   cat > conftest.$ac_ext <<EOF
13170 #line 13171 "configure"
13171 #include "confdefs.h"
13172 #include <stddef.h>
13173 int main() {
13174 ptrdiff_t p
13175 ; return 0; }
13176 EOF
13177 if { (eval echo configure:13178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13178   rm -rf conftest*
13179   am_cv_type_ptrdiff_t=yes
13180 else
13181   echo "configure: failed program was:" >&5
13182   cat conftest.$ac_ext >&5
13183   rm -rf conftest*
13184   am_cv_type_ptrdiff_t=no
13185 fi
13186 rm -f conftest*
13187 fi
13188
13189 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13190    if test $am_cv_type_ptrdiff_t = yes; then
13191      cat >> confdefs.h <<\EOF
13192 #define HAVE_PTRDIFF_T 1
13193 EOF
13194
13195    fi
13196
13197 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13198 echo "configure:13199: checking return type of signal handlers" >&5
13199 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13200   echo $ac_n "(cached) $ac_c" 1>&6
13201 else
13202   cat > conftest.$ac_ext <<EOF
13203 #line 13204 "configure"
13204 #include "confdefs.h"
13205 #include <sys/types.h>
13206 #include <signal.h>
13207 #ifdef signal
13208 #undef signal
13209 #endif
13210 #ifdef __cplusplus
13211 extern "C" void (*signal (int, void (*)(int)))(int);
13212 #else
13213 void (*signal ()) ();
13214 #endif
13215
13216 int main() {
13217 int i;
13218 ; return 0; }
13219 EOF
13220 if { (eval echo configure:13221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13221   rm -rf conftest*
13222   ac_cv_type_signal=void
13223 else
13224   echo "configure: failed program was:" >&5
13225   cat conftest.$ac_ext >&5
13226   rm -rf conftest*
13227   ac_cv_type_signal=int
13228 fi
13229 rm -f conftest*
13230 fi
13231
13232 echo "$ac_t""$ac_cv_type_signal" 1>&6
13233 cat >> confdefs.h <<EOF
13234 #define RETSIGTYPE $ac_cv_type_signal
13235 EOF
13236
13237
13238 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13239 echo "configure:13240: checking for size_t" >&5
13240 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13241   echo $ac_n "(cached) $ac_c" 1>&6
13242 else
13243   cat > conftest.$ac_ext <<EOF
13244 #line 13245 "configure"
13245 #include "confdefs.h"
13246 #include <sys/types.h>
13247 #if STDC_HEADERS
13248 #include <stdlib.h>
13249 #include <stddef.h>
13250 #endif
13251 EOF
13252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13253   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13254   rm -rf conftest*
13255   eval "ac_cv_type_size_t=yes"
13256 else
13257   rm -rf conftest*
13258   eval "ac_cv_type_size_t=no"
13259 fi
13260 rm -f conftest*
13261
13262 fi
13263 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13264   echo "$ac_t""yes" 1>&6
13265 else
13266   echo "$ac_t""no" 1>&6
13267   cat >> confdefs.h <<EOF
13268 #define size_t unsigned
13269 EOF
13270
13271 fi
13272
13273 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13274 echo "configure:13275: checking for socklen_t" >&5
13275 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13276   echo $ac_n "(cached) $ac_c" 1>&6
13277 else
13278   cat > conftest.$ac_ext <<EOF
13279 #line 13280 "configure"
13280 #include "confdefs.h"
13281
13282 #ifdef HAVE_SYS_TYPES_H
13283 #include <sys/types.h>
13284 #endif
13285 #ifdef HAVE_SYS_SOCKET_H
13286 #include <sys/socket.h>
13287 #endif
13288
13289 int main() {
13290 socklen_t len;
13291 ; return 0; }
13292 EOF
13293 if { (eval echo configure:13294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13294   rm -rf conftest*
13295   ol_cv_type_socklen_t=yes
13296 else
13297   echo "configure: failed program was:" >&5
13298   cat conftest.$ac_ext >&5
13299   rm -rf conftest*
13300   ol_cv_type_socklen_t=no
13301 fi
13302 rm -f conftest*
13303 fi
13304
13305 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13306   if test $ol_cv_type_socklen_t = no; then
13307     cat >> confdefs.h <<\EOF
13308 #define socklen_t int
13309 EOF
13310
13311   fi
13312  
13313 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13314 echo "configure:13315: checking for member st_blksize in aggregate type struct stat" >&5
13315 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13316   echo $ac_n "(cached) $ac_c" 1>&6
13317 else
13318   cat > conftest.$ac_ext <<EOF
13319 #line 13320 "configure"
13320 #include "confdefs.h"
13321 #include <sys/types.h>
13322 #include <sys/stat.h>
13323 int main() {
13324 struct stat foo; foo.st_blksize;
13325 ; return 0; }
13326 EOF
13327 if { (eval echo configure:13328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13328   rm -rf conftest*
13329   ac_cv_c_struct_member_st_blksize=yes
13330 else
13331   echo "configure: failed program was:" >&5
13332   cat conftest.$ac_ext >&5
13333   rm -rf conftest*
13334   ac_cv_c_struct_member_st_blksize=no
13335 fi
13336 rm -f conftest*
13337 fi
13338
13339 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13340 st_blksize="$ac_cv_c_struct_member_st_blksize"
13341 if test $ac_cv_c_struct_member_st_blksize = yes; then
13342   cat >> confdefs.h <<\EOF
13343 #define HAVE_ST_BLKSIZE 1
13344 EOF
13345
13346 fi
13347
13348 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13349 echo "configure:13350: checking whether time.h and sys/time.h may both be included" >&5
13350 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13351   echo $ac_n "(cached) $ac_c" 1>&6
13352 else
13353   cat > conftest.$ac_ext <<EOF
13354 #line 13355 "configure"
13355 #include "confdefs.h"
13356 #include <sys/types.h>
13357 #include <sys/time.h>
13358 #include <time.h>
13359 int main() {
13360 struct tm *tp;
13361 ; return 0; }
13362 EOF
13363 if { (eval echo configure:13364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13364   rm -rf conftest*
13365   ac_cv_header_time=yes
13366 else
13367   echo "configure: failed program was:" >&5
13368   cat conftest.$ac_ext >&5
13369   rm -rf conftest*
13370   ac_cv_header_time=no
13371 fi
13372 rm -f conftest*
13373 fi
13374
13375 echo "$ac_t""$ac_cv_header_time" 1>&6
13376 if test $ac_cv_header_time = yes; then
13377   cat >> confdefs.h <<\EOF
13378 #define TIME_WITH_SYS_TIME 1
13379 EOF
13380
13381 fi
13382
13383 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13384 echo "configure:13385: checking whether struct tm is in sys/time.h or time.h" >&5
13385 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13386   echo $ac_n "(cached) $ac_c" 1>&6
13387 else
13388   cat > conftest.$ac_ext <<EOF
13389 #line 13390 "configure"
13390 #include "confdefs.h"
13391 #include <sys/types.h>
13392 #include <time.h>
13393 int main() {
13394 struct tm *tp; tp->tm_sec;
13395 ; return 0; }
13396 EOF
13397 if { (eval echo configure:13398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13398   rm -rf conftest*
13399   ac_cv_struct_tm=time.h
13400 else
13401   echo "configure: failed program was:" >&5
13402   cat conftest.$ac_ext >&5
13403   rm -rf conftest*
13404   ac_cv_struct_tm=sys/time.h
13405 fi
13406 rm -f conftest*
13407 fi
13408
13409 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13410 if test $ac_cv_struct_tm = sys/time.h; then
13411   cat >> confdefs.h <<\EOF
13412 #define TM_IN_SYS_TIME 1
13413 EOF
13414
13415 fi
13416
13417 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13418 echo "configure:13419: checking for uid_t in sys/types.h" >&5
13419 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13420   echo $ac_n "(cached) $ac_c" 1>&6
13421 else
13422   cat > conftest.$ac_ext <<EOF
13423 #line 13424 "configure"
13424 #include "confdefs.h"
13425 #include <sys/types.h>
13426 EOF
13427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13428   egrep "uid_t" >/dev/null 2>&1; then
13429   rm -rf conftest*
13430   ac_cv_type_uid_t=yes
13431 else
13432   rm -rf conftest*
13433   ac_cv_type_uid_t=no
13434 fi
13435 rm -f conftest*
13436
13437 fi
13438
13439 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13440 if test $ac_cv_type_uid_t = no; then
13441   cat >> confdefs.h <<\EOF
13442 #define uid_t int
13443 EOF
13444
13445   cat >> confdefs.h <<\EOF
13446 #define gid_t int
13447 EOF
13448
13449 fi
13450
13451 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13452 echo "configure:13453: checking for sig_atomic_t" >&5
13453 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13454   echo $ac_n "(cached) $ac_c" 1>&6
13455 else
13456   cat > conftest.$ac_ext <<EOF
13457 #line 13458 "configure"
13458 #include "confdefs.h"
13459 #include <signal.h>
13460 int main() {
13461 sig_atomic_t atomic;
13462 ; return 0; }
13463 EOF
13464 if { (eval echo configure:13465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13465   rm -rf conftest*
13466   ol_cv_type_sig_atomic_t=yes
13467 else
13468   echo "configure: failed program was:" >&5
13469   cat conftest.$ac_ext >&5
13470   rm -rf conftest*
13471   ol_cv_type_sig_atomic_t=no
13472 fi
13473 rm -f conftest*
13474 fi
13475
13476 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13477   if test $ol_cv_type_sig_atomic_t = no; then
13478     cat >> confdefs.h <<\EOF
13479 #define sig_atomic_t int
13480 EOF
13481
13482   fi
13483  
13484
13485 if test "$ac_cv_mingw32" != yes ; then
13486     echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
13487 echo "configure:13488: checking type of array argument to getgroups" >&5
13488 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
13489   echo $ac_n "(cached) $ac_c" 1>&6
13490 else
13491   if test "$cross_compiling" = yes; then
13492   ac_cv_type_getgroups=cross
13493 else
13494   cat > conftest.$ac_ext <<EOF
13495 #line 13496 "configure"
13496 #include "confdefs.h"
13497
13498 /* Thanks to Mike Rendell for this test.  */
13499 #include <sys/types.h>
13500 #define NGID 256
13501 #undef MAX
13502 #define MAX(x, y) ((x) > (y) ? (x) : (y))
13503 main()
13504 {
13505   gid_t gidset[NGID];
13506   int i, n;
13507   union { gid_t gval; long lval; }  val;
13508
13509   val.lval = -1;
13510   for (i = 0; i < NGID; i++)
13511     gidset[i] = val.gval;
13512   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
13513                  gidset);
13514   /* Exit non-zero if getgroups seems to require an array of ints.  This
13515      happens when gid_t is short but getgroups modifies an array of ints.  */
13516   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
13517 }
13518
13519 EOF
13520 if { (eval echo configure:13521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13521 then
13522     ac_cv_type_getgroups=gid_t
13523 else
13524   echo "configure: failed program was:" >&5
13525   cat conftest.$ac_ext >&5
13526   rm -fr conftest*
13527   ac_cv_type_getgroups=int
13528 fi
13529 rm -fr conftest*
13530 fi
13531
13532 if test $ac_cv_type_getgroups = cross; then
13533         cat > conftest.$ac_ext <<EOF
13534 #line 13535 "configure"
13535 #include "confdefs.h"
13536 #include <unistd.h>
13537 EOF
13538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13539   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
13540   rm -rf conftest*
13541   ac_cv_type_getgroups=gid_t
13542 else
13543   rm -rf conftest*
13544   ac_cv_type_getgroups=int
13545 fi
13546 rm -f conftest*
13547
13548 fi
13549 fi
13550
13551 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
13552 cat >> confdefs.h <<EOF
13553 #define GETGROUPS_T $ac_cv_type_getgroups
13554 EOF
13555
13556
13557     # test for pw_gecos in struct passwd
13558 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13559 echo "configure:13560: checking struct passwd for pw_gecos" >&5
13560 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13561   echo $ac_n "(cached) $ac_c" 1>&6
13562 else
13563   
13564         cat > conftest.$ac_ext <<EOF
13565 #line 13566 "configure"
13566 #include "confdefs.h"
13567 #include <pwd.h>
13568 int main() {
13569
13570         struct passwd pwd;
13571         pwd.pw_gecos = pwd.pw_name;
13572
13573 ; return 0; }
13574 EOF
13575 if { (eval echo configure:13576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13576   rm -rf conftest*
13577   ol_cv_struct_passwd_pw_gecos=yes
13578 else
13579   echo "configure: failed program was:" >&5
13580   cat conftest.$ac_ext >&5
13581   rm -rf conftest*
13582   ol_cv_struct_passwd_pw_gecos=no
13583 fi
13584 rm -f conftest*
13585 fi
13586
13587 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13588 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13589         cat >> confdefs.h <<\EOF
13590 #define HAVE_PW_GECOS 1
13591 EOF
13592
13593 fi
13594
13595     # test for pw_passwd in struct passwd
13596 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13597 echo "configure:13598: checking struct passwd for pw_passwd" >&5
13598 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13599   echo $ac_n "(cached) $ac_c" 1>&6
13600 else
13601   
13602         cat > conftest.$ac_ext <<EOF
13603 #line 13604 "configure"
13604 #include "confdefs.h"
13605 #include <pwd.h>
13606 int main() {
13607
13608         struct passwd pwd;
13609         pwd.pw_passwd = pwd.pw_name;
13610
13611 ; return 0; }
13612 EOF
13613 if { (eval echo configure:13614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13614   rm -rf conftest*
13615   ol_cv_struct_passwd_pw_passwd=yes
13616 else
13617   echo "configure: failed program was:" >&5
13618   cat conftest.$ac_ext >&5
13619   rm -rf conftest*
13620   ol_cv_struct_passwd_pw_passwd=no
13621 fi
13622 rm -f conftest*
13623 fi
13624
13625 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13626 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13627         cat >> confdefs.h <<\EOF
13628 #define HAVE_PW_PASSWD 1
13629 EOF
13630
13631 fi
13632
13633 fi
13634
13635 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13636 echo "configure:13637: checking if toupper() requires islower()" >&5
13637 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13638   echo $ac_n "(cached) $ac_c" 1>&6
13639 else
13640   
13641         if test "$cross_compiling" = yes; then
13642   ol_cv_c_upper_lower=safe
13643 else
13644   cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647
13648 #include <ctype.h>
13649 main()
13650 {
13651         if ('C' == toupper('C'))
13652                 exit(0);
13653         else
13654                 exit(1);
13655 }
13656 EOF
13657 if { (eval echo configure:13658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13658 then
13659   ol_cv_c_upper_lower=no
13660 else
13661   echo "configure: failed program was:" >&5
13662   cat conftest.$ac_ext >&5
13663   rm -fr conftest*
13664   ol_cv_c_upper_lower=yes
13665 fi
13666 rm -fr conftest*
13667 fi
13668
13669 fi
13670
13671 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13672 if test $ol_cv_c_upper_lower != no ; then
13673         cat >> confdefs.h <<\EOF
13674 #define C_UPPER_LOWER 1
13675 EOF
13676
13677 fi
13678
13679 echo $ac_n "checking for working const""... $ac_c" 1>&6
13680 echo "configure:13681: checking for working const" >&5
13681 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13682   echo $ac_n "(cached) $ac_c" 1>&6
13683 else
13684   cat > conftest.$ac_ext <<EOF
13685 #line 13686 "configure"
13686 #include "confdefs.h"
13687
13688 int main() {
13689
13690 /* Ultrix mips cc rejects this.  */
13691 typedef int charset[2]; const charset x;
13692 /* SunOS 4.1.1 cc rejects this.  */
13693 char const *const *ccp;
13694 char **p;
13695 /* NEC SVR4.0.2 mips cc rejects this.  */
13696 struct point {int x, y;};
13697 static struct point const zero = {0,0};
13698 /* AIX XL C 1.02.0.0 rejects this.
13699    It does not let you subtract one const X* pointer from another in an arm
13700    of an if-expression whose if-part is not a constant expression */
13701 const char *g = "string";
13702 ccp = &g + (g ? g-g : 0);
13703 /* HPUX 7.0 cc rejects these. */
13704 ++ccp;
13705 p = (char**) ccp;
13706 ccp = (char const *const *) p;
13707 { /* SCO 3.2v4 cc rejects this.  */
13708   char *t;
13709   char const *s = 0 ? (char *) 0 : (char const *) 0;
13710
13711   *t++ = 0;
13712 }
13713 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13714   int x[] = {25, 17};
13715   const int *foo = &x[0];
13716   ++foo;
13717 }
13718 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13719   typedef const int *iptr;
13720   iptr p = 0;
13721   ++p;
13722 }
13723 { /* AIX XL C 1.02.0.0 rejects this saying
13724      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13725   struct s { int j; const int *ap[3]; };
13726   struct s *b; b->j = 5;
13727 }
13728 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13729   const int foo = 10;
13730 }
13731
13732 ; return 0; }
13733 EOF
13734 if { (eval echo configure:13735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13735   rm -rf conftest*
13736   ac_cv_c_const=yes
13737 else
13738   echo "configure: failed program was:" >&5
13739   cat conftest.$ac_ext >&5
13740   rm -rf conftest*
13741   ac_cv_c_const=no
13742 fi
13743 rm -f conftest*
13744 fi
13745
13746 echo "$ac_t""$ac_cv_c_const" 1>&6
13747 if test $ac_cv_c_const = no; then
13748   cat >> confdefs.h <<\EOF
13749 #define const 
13750 EOF
13751
13752 fi
13753
13754 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13755 echo "configure:13756: checking if compiler understands volatile" >&5
13756 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13757   echo $ac_n "(cached) $ac_c" 1>&6
13758 else
13759   cat > conftest.$ac_ext <<EOF
13760 #line 13761 "configure"
13761 #include "confdefs.h"
13762 int x, y, z;
13763 int main() {
13764 volatile int a; int * volatile b = x ? &y : &z;
13765       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13766       *b = 0;
13767 ; return 0; }
13768 EOF
13769 if { (eval echo configure:13770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13770   rm -rf conftest*
13771   ol_cv_c_volatile=yes
13772 else
13773   echo "configure: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   rm -rf conftest*
13776   ol_cv_c_volatile=no
13777 fi
13778 rm -f conftest*
13779 fi
13780
13781 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13782   if test $ol_cv_c_volatile = yes; then
13783     : 
13784   else
13785     cat >> confdefs.h <<\EOF
13786 #define volatile 
13787 EOF
13788
13789   fi
13790  
13791
13792 if test $cross_compiling = yes ; then
13793         cat >> confdefs.h <<\EOF
13794 #define CROSS_COMPILING 1
13795 EOF
13796
13797
13798         cat >> confdefs.h <<\EOF
13799 #define LBER_INT_T long
13800 EOF
13801
13802         cat >> confdefs.h <<\EOF
13803 #define LBER_TAG_T long
13804 EOF
13805
13806         cat >> confdefs.h <<\EOF
13807 #define LBER_SOCKET_T int
13808 EOF
13809
13810
13811 else
13812         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13813 echo "configure:13814: checking whether byte ordering is bigendian" >&5
13814 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13815   echo $ac_n "(cached) $ac_c" 1>&6
13816 else
13817   ac_cv_c_bigendian=unknown
13818 # See if sys/param.h defines the BYTE_ORDER macro.
13819 cat > conftest.$ac_ext <<EOF
13820 #line 13821 "configure"
13821 #include "confdefs.h"
13822 #include <sys/types.h>
13823 #include <sys/param.h>
13824 int main() {
13825
13826 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13827  bogus endian macros
13828 #endif
13829 ; return 0; }
13830 EOF
13831 if { (eval echo configure:13832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13832   rm -rf conftest*
13833   # It does; now see whether it defined to BIG_ENDIAN or not.
13834 cat > conftest.$ac_ext <<EOF
13835 #line 13836 "configure"
13836 #include "confdefs.h"
13837 #include <sys/types.h>
13838 #include <sys/param.h>
13839 int main() {
13840
13841 #if BYTE_ORDER != BIG_ENDIAN
13842  not big endian
13843 #endif
13844 ; return 0; }
13845 EOF
13846 if { (eval echo configure:13847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13847   rm -rf conftest*
13848   ac_cv_c_bigendian=yes
13849 else
13850   echo "configure: failed program was:" >&5
13851   cat conftest.$ac_ext >&5
13852   rm -rf conftest*
13853   ac_cv_c_bigendian=no
13854 fi
13855 rm -f conftest*
13856 else
13857   echo "configure: failed program was:" >&5
13858   cat conftest.$ac_ext >&5
13859 fi
13860 rm -f conftest*
13861 if test $ac_cv_c_bigendian = unknown; then
13862 if test "$cross_compiling" = yes; then
13863     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13864 else
13865   cat > conftest.$ac_ext <<EOF
13866 #line 13867 "configure"
13867 #include "confdefs.h"
13868 main () {
13869   /* Are we little or big endian?  From Harbison&Steele.  */
13870   union
13871   {
13872     long l;
13873     char c[sizeof (long)];
13874   } u;
13875   u.l = 1;
13876   exit (u.c[sizeof (long) - 1] == 1);
13877 }
13878 EOF
13879 if { (eval echo configure:13880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13880 then
13881   ac_cv_c_bigendian=no
13882 else
13883   echo "configure: failed program was:" >&5
13884   cat conftest.$ac_ext >&5
13885   rm -fr conftest*
13886   ac_cv_c_bigendian=yes
13887 fi
13888 rm -fr conftest*
13889 fi
13890
13891 fi
13892 fi
13893
13894 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13895 if test $ac_cv_c_bigendian = yes; then
13896   cat >> confdefs.h <<\EOF
13897 #define WORDS_BIGENDIAN 1
13898 EOF
13899
13900 fi
13901
13902         echo $ac_n "checking size of short""... $ac_c" 1>&6
13903 echo "configure:13904: checking size of short" >&5
13904 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13905   echo $ac_n "(cached) $ac_c" 1>&6
13906 else
13907   if test "$cross_compiling" = yes; then
13908     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13909 else
13910   cat > conftest.$ac_ext <<EOF
13911 #line 13912 "configure"
13912 #include "confdefs.h"
13913 #include <stdio.h>
13914 main()
13915 {
13916   FILE *f=fopen("conftestval", "w");
13917   if (!f) exit(1);
13918   fprintf(f, "%d\n", sizeof(short));
13919   exit(0);
13920 }
13921 EOF
13922 if { (eval echo configure:13923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13923 then
13924   ac_cv_sizeof_short=`cat conftestval`
13925 else
13926   echo "configure: failed program was:" >&5
13927   cat conftest.$ac_ext >&5
13928   rm -fr conftest*
13929   ac_cv_sizeof_short=0
13930 fi
13931 rm -fr conftest*
13932 fi
13933
13934 fi
13935 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13936 cat >> confdefs.h <<EOF
13937 #define SIZEOF_SHORT $ac_cv_sizeof_short
13938 EOF
13939
13940  
13941         echo $ac_n "checking size of int""... $ac_c" 1>&6
13942 echo "configure:13943: checking size of int" >&5
13943 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13944   echo $ac_n "(cached) $ac_c" 1>&6
13945 else
13946   if test "$cross_compiling" = yes; then
13947     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13948 else
13949   cat > conftest.$ac_ext <<EOF
13950 #line 13951 "configure"
13951 #include "confdefs.h"
13952 #include <stdio.h>
13953 main()
13954 {
13955   FILE *f=fopen("conftestval", "w");
13956   if (!f) exit(1);
13957   fprintf(f, "%d\n", sizeof(int));
13958   exit(0);
13959 }
13960 EOF
13961 if { (eval echo configure:13962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13962 then
13963   ac_cv_sizeof_int=`cat conftestval`
13964 else
13965   echo "configure: failed program was:" >&5
13966   cat conftest.$ac_ext >&5
13967   rm -fr conftest*
13968   ac_cv_sizeof_int=0
13969 fi
13970 rm -fr conftest*
13971 fi
13972
13973 fi
13974 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13975 cat >> confdefs.h <<EOF
13976 #define SIZEOF_INT $ac_cv_sizeof_int
13977 EOF
13978
13979  
13980         echo $ac_n "checking size of long""... $ac_c" 1>&6
13981 echo "configure:13982: checking size of long" >&5
13982 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13983   echo $ac_n "(cached) $ac_c" 1>&6
13984 else
13985   if test "$cross_compiling" = yes; then
13986     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13987 else
13988   cat > conftest.$ac_ext <<EOF
13989 #line 13990 "configure"
13990 #include "confdefs.h"
13991 #include <stdio.h>
13992 main()
13993 {
13994   FILE *f=fopen("conftestval", "w");
13995   if (!f) exit(1);
13996   fprintf(f, "%d\n", sizeof(long));
13997   exit(0);
13998 }
13999 EOF
14000 if { (eval echo configure:14001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14001 then
14002   ac_cv_sizeof_long=`cat conftestval`
14003 else
14004   echo "configure: failed program was:" >&5
14005   cat conftest.$ac_ext >&5
14006   rm -fr conftest*
14007   ac_cv_sizeof_long=0
14008 fi
14009 rm -fr conftest*
14010 fi
14011
14012 fi
14013 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
14014 cat >> confdefs.h <<EOF
14015 #define SIZEOF_LONG $ac_cv_sizeof_long
14016 EOF
14017
14018
14019
14020         if test "$ac_cv_sizeof_int" -lt 4 ; then
14021                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14022
14023                 cat >> confdefs.h <<\EOF
14024 #define LBER_INT_T long
14025 EOF
14026
14027                 cat >> confdefs.h <<\EOF
14028 #define LBER_TAG_T long
14029 EOF
14030
14031                 cat >> confdefs.h <<\EOF
14032 #define LBER_SOCKET_T int
14033 EOF
14034
14035         else
14036                 cat >> confdefs.h <<\EOF
14037 #define LBER_INT_T int
14038 EOF
14039
14040                 cat >> confdefs.h <<\EOF
14041 #define LBER_TAG_T long
14042 EOF
14043
14044                 cat >> confdefs.h <<\EOF
14045 #define LBER_SOCKET_T int
14046 EOF
14047
14048         fi
14049 fi
14050
14051 cat >> confdefs.h <<\EOF
14052 #define LBER_LEN_T long
14053 EOF
14054
14055
14056 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14057 echo "configure:14058: checking for 8-bit clean memcmp" >&5
14058 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14059   echo $ac_n "(cached) $ac_c" 1>&6
14060 else
14061   if test "$cross_compiling" = yes; then
14062   ac_cv_func_memcmp_clean=no
14063 else
14064   cat > conftest.$ac_ext <<EOF
14065 #line 14066 "configure"
14066 #include "confdefs.h"
14067
14068 main()
14069 {
14070   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14071   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14072 }
14073
14074 EOF
14075 if { (eval echo configure:14076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14076 then
14077   ac_cv_func_memcmp_clean=yes
14078 else
14079   echo "configure: failed program was:" >&5
14080   cat conftest.$ac_ext >&5
14081   rm -fr conftest*
14082   ac_cv_func_memcmp_clean=no
14083 fi
14084 rm -fr conftest*
14085 fi
14086
14087 fi
14088
14089 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14090 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14091
14092 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14093 echo "configure:14094: checking for strftime" >&5
14094 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14095   echo $ac_n "(cached) $ac_c" 1>&6
14096 else
14097   cat > conftest.$ac_ext <<EOF
14098 #line 14099 "configure"
14099 #include "confdefs.h"
14100 /* System header to define __stub macros and hopefully few prototypes,
14101     which can conflict with char strftime(); below.  */
14102 #include <assert.h>
14103 /* Override any gcc2 internal prototype to avoid an error.  */
14104 /* We use char because int might match the return type of a gcc2
14105     builtin and then its argument prototype would still apply.  */
14106 char strftime();
14107 char (*f)();
14108
14109 int main() {
14110
14111 /* The GNU C library defines this for functions which it implements
14112     to always fail with ENOSYS.  Some functions are actually named
14113     something starting with __ and the normal name is an alias.  */
14114 #if defined (__stub_strftime) || defined (__stub___strftime)
14115 choke me
14116 #else
14117 f = strftime;
14118 #endif
14119
14120 ; return 0; }
14121 EOF
14122 if { (eval echo configure:14123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14123   rm -rf conftest*
14124   eval "ac_cv_func_strftime=yes"
14125 else
14126   echo "configure: failed program was:" >&5
14127   cat conftest.$ac_ext >&5
14128   rm -rf conftest*
14129   eval "ac_cv_func_strftime=no"
14130 fi
14131 rm -f conftest*
14132 fi
14133
14134 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14135   echo "$ac_t""yes" 1>&6
14136   cat >> confdefs.h <<\EOF
14137 #define HAVE_STRFTIME 1
14138 EOF
14139
14140 else
14141   echo "$ac_t""no" 1>&6
14142 # strftime is in -lintl on SCO UNIX.
14143 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14144 echo "configure:14145: checking for strftime in -lintl" >&5
14145 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14147   echo $ac_n "(cached) $ac_c" 1>&6
14148 else
14149   ac_save_LIBS="$LIBS"
14150 LIBS="-lintl  $LIBS"
14151 cat > conftest.$ac_ext <<EOF
14152 #line 14153 "configure"
14153 #include "confdefs.h"
14154 /* Override any gcc2 internal prototype to avoid an error.  */
14155 /* We use char because int might match the return type of a gcc2
14156     builtin and then its argument prototype would still apply.  */
14157 char strftime();
14158
14159 int main() {
14160 strftime()
14161 ; return 0; }
14162 EOF
14163 if { (eval echo configure:14164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14164   rm -rf conftest*
14165   eval "ac_cv_lib_$ac_lib_var=yes"
14166 else
14167   echo "configure: failed program was:" >&5
14168   cat conftest.$ac_ext >&5
14169   rm -rf conftest*
14170   eval "ac_cv_lib_$ac_lib_var=no"
14171 fi
14172 rm -f conftest*
14173 LIBS="$ac_save_LIBS"
14174
14175 fi
14176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14177   echo "$ac_t""yes" 1>&6
14178   cat >> confdefs.h <<\EOF
14179 #define HAVE_STRFTIME 1
14180 EOF
14181
14182 LIBS="-lintl $LIBS"
14183 else
14184   echo "$ac_t""no" 1>&6
14185 fi
14186
14187 fi
14188
14189
14190 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14191 echo "configure:14192: checking for inet_aton()" >&5
14192 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14193   echo $ac_n "(cached) $ac_c" 1>&6
14194 else
14195   cat > conftest.$ac_ext <<EOF
14196 #line 14197 "configure"
14197 #include "confdefs.h"
14198
14199 #ifdef HAVE_SYS_TYPES_H
14200 #       include <sys/types.h>
14201 #endif
14202 #ifdef HAVE_SYS_SOCKET_H
14203 #       include <sys/socket.h>
14204 #       ifdef HAVE_SYS_SELECT_H
14205 #               include <sys/select.h>
14206 #       endif
14207 #       include <netinet/in.h>
14208 #       ifdef HAVE_ARPA_INET_H
14209 #               include <arpa/inet.h>
14210 #       endif
14211 #endif
14212
14213 int main() {
14214 struct in_addr in;
14215 int rc = inet_aton( "255.255.255.255", &in );
14216 ; return 0; }
14217 EOF
14218 if { (eval echo configure:14219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14219   rm -rf conftest*
14220   ol_cv_func_inet_aton=yes
14221 else
14222   echo "configure: failed program was:" >&5
14223   cat conftest.$ac_ext >&5
14224   rm -rf conftest*
14225   ol_cv_func_inet_aton=no
14226 fi
14227 rm -f conftest*
14228 fi
14229
14230 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14231   if test $ol_cv_func_inet_aton != no; then
14232     cat >> confdefs.h <<\EOF
14233 #define HAVE_INET_ATON 1
14234 EOF
14235
14236   fi
14237  
14238
14239 if test "$ac_cv_mingw32" = yes ; then
14240     echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14241 echo "configure:14242: checking for _snprintf" >&5
14242 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14243   echo $ac_n "(cached) $ac_c" 1>&6
14244 else
14245   cat > conftest.$ac_ext <<EOF
14246 #line 14247 "configure"
14247 #include "confdefs.h"
14248 /* System header to define __stub macros and hopefully few prototypes,
14249     which can conflict with char _snprintf(); below.  */
14250 #include <assert.h>
14251 /* Override any gcc2 internal prototype to avoid an error.  */
14252 /* We use char because int might match the return type of a gcc2
14253     builtin and then its argument prototype would still apply.  */
14254 char _snprintf();
14255 char (*f)();
14256
14257 int main() {
14258
14259 /* The GNU C library defines this for functions which it implements
14260     to always fail with ENOSYS.  Some functions are actually named
14261     something starting with __ and the normal name is an alias.  */
14262 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14263 choke me
14264 #else
14265 f = _snprintf;
14266 #endif
14267
14268 ; return 0; }
14269 EOF
14270 if { (eval echo configure:14271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14271   rm -rf conftest*
14272   eval "ac_cv_func__snprintf=yes"
14273 else
14274   echo "configure: failed program was:" >&5
14275   cat conftest.$ac_ext >&5
14276   rm -rf conftest*
14277   eval "ac_cv_func__snprintf=no"
14278 fi
14279 rm -f conftest*
14280 fi
14281
14282 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14283   echo "$ac_t""yes" 1>&6
14284   
14285         ac_cv_func_snprintf=yes
14286         cat >> confdefs.h <<\EOF
14287 #define snprintf _snprintf
14288 EOF
14289
14290     
14291 else
14292   echo "$ac_t""no" 1>&6
14293 fi
14294
14295
14296     echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14297 echo "configure:14298: checking for _vsnprintf" >&5
14298 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14299   echo $ac_n "(cached) $ac_c" 1>&6
14300 else
14301   cat > conftest.$ac_ext <<EOF
14302 #line 14303 "configure"
14303 #include "confdefs.h"
14304 /* System header to define __stub macros and hopefully few prototypes,
14305     which can conflict with char _vsnprintf(); below.  */
14306 #include <assert.h>
14307 /* Override any gcc2 internal prototype to avoid an error.  */
14308 /* We use char because int might match the return type of a gcc2
14309     builtin and then its argument prototype would still apply.  */
14310 char _vsnprintf();
14311 char (*f)();
14312
14313 int main() {
14314
14315 /* The GNU C library defines this for functions which it implements
14316     to always fail with ENOSYS.  Some functions are actually named
14317     something starting with __ and the normal name is an alias.  */
14318 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14319 choke me
14320 #else
14321 f = _vsnprintf;
14322 #endif
14323
14324 ; return 0; }
14325 EOF
14326 if { (eval echo configure:14327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14327   rm -rf conftest*
14328   eval "ac_cv_func__vsnprintf=yes"
14329 else
14330   echo "configure: failed program was:" >&5
14331   cat conftest.$ac_ext >&5
14332   rm -rf conftest*
14333   eval "ac_cv_func__vsnprintf=no"
14334 fi
14335 rm -f conftest*
14336 fi
14337
14338 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14339   echo "$ac_t""yes" 1>&6
14340   
14341         ac_cv_func_vsnprintf=yes
14342         cat >> confdefs.h <<\EOF
14343 #define vsnprintf _vsnprintf
14344 EOF
14345
14346     
14347 else
14348   echo "$ac_t""no" 1>&6
14349 fi
14350
14351
14352     echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14353 echo "configure:14354: checking for _spawnlp" >&5
14354 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14355   echo $ac_n "(cached) $ac_c" 1>&6
14356 else
14357   cat > conftest.$ac_ext <<EOF
14358 #line 14359 "configure"
14359 #include "confdefs.h"
14360 /* System header to define __stub macros and hopefully few prototypes,
14361     which can conflict with char _spawnlp(); below.  */
14362 #include <assert.h>
14363 /* Override any gcc2 internal prototype to avoid an error.  */
14364 /* We use char because int might match the return type of a gcc2
14365     builtin and then its argument prototype would still apply.  */
14366 char _spawnlp();
14367 char (*f)();
14368
14369 int main() {
14370
14371 /* The GNU C library defines this for functions which it implements
14372     to always fail with ENOSYS.  Some functions are actually named
14373     something starting with __ and the normal name is an alias.  */
14374 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14375 choke me
14376 #else
14377 f = _spawnlp;
14378 #endif
14379
14380 ; return 0; }
14381 EOF
14382 if { (eval echo configure:14383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14383   rm -rf conftest*
14384   eval "ac_cv_func__spawnlp=yes"
14385 else
14386   echo "configure: failed program was:" >&5
14387   cat conftest.$ac_ext >&5
14388   rm -rf conftest*
14389   eval "ac_cv_func__spawnlp=no"
14390 fi
14391 rm -f conftest*
14392 fi
14393
14394 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14395   echo "$ac_t""yes" 1>&6
14396   cat >> confdefs.h <<\EOF
14397 #define HAVE_SPAWNLP 1
14398 EOF
14399
14400 else
14401   echo "$ac_t""no" 1>&6
14402 fi
14403
14404 fi
14405
14406 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14407 echo "configure:14408: checking for vprintf" >&5
14408 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14409   echo $ac_n "(cached) $ac_c" 1>&6
14410 else
14411   cat > conftest.$ac_ext <<EOF
14412 #line 14413 "configure"
14413 #include "confdefs.h"
14414 /* System header to define __stub macros and hopefully few prototypes,
14415     which can conflict with char vprintf(); below.  */
14416 #include <assert.h>
14417 /* Override any gcc2 internal prototype to avoid an error.  */
14418 /* We use char because int might match the return type of a gcc2
14419     builtin and then its argument prototype would still apply.  */
14420 char vprintf();
14421 char (*f)();
14422
14423 int main() {
14424
14425 /* The GNU C library defines this for functions which it implements
14426     to always fail with ENOSYS.  Some functions are actually named
14427     something starting with __ and the normal name is an alias.  */
14428 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14429 choke me
14430 #else
14431 f = vprintf;
14432 #endif
14433
14434 ; return 0; }
14435 EOF
14436 if { (eval echo configure:14437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14437   rm -rf conftest*
14438   eval "ac_cv_func_vprintf=yes"
14439 else
14440   echo "configure: failed program was:" >&5
14441   cat conftest.$ac_ext >&5
14442   rm -rf conftest*
14443   eval "ac_cv_func_vprintf=no"
14444 fi
14445 rm -f conftest*
14446 fi
14447
14448 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14449   echo "$ac_t""yes" 1>&6
14450   cat >> confdefs.h <<\EOF
14451 #define HAVE_VPRINTF 1
14452 EOF
14453
14454 else
14455   echo "$ac_t""no" 1>&6
14456 fi
14457
14458 if test "$ac_cv_func_vprintf" != yes; then
14459 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14460 echo "configure:14461: checking for _doprnt" >&5
14461 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14462   echo $ac_n "(cached) $ac_c" 1>&6
14463 else
14464   cat > conftest.$ac_ext <<EOF
14465 #line 14466 "configure"
14466 #include "confdefs.h"
14467 /* System header to define __stub macros and hopefully few prototypes,
14468     which can conflict with char _doprnt(); below.  */
14469 #include <assert.h>
14470 /* Override any gcc2 internal prototype to avoid an error.  */
14471 /* We use char because int might match the return type of a gcc2
14472     builtin and then its argument prototype would still apply.  */
14473 char _doprnt();
14474 char (*f)();
14475
14476 int main() {
14477
14478 /* The GNU C library defines this for functions which it implements
14479     to always fail with ENOSYS.  Some functions are actually named
14480     something starting with __ and the normal name is an alias.  */
14481 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14482 choke me
14483 #else
14484 f = _doprnt;
14485 #endif
14486
14487 ; return 0; }
14488 EOF
14489 if { (eval echo configure:14490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14490   rm -rf conftest*
14491   eval "ac_cv_func__doprnt=yes"
14492 else
14493   echo "configure: failed program was:" >&5
14494   cat conftest.$ac_ext >&5
14495   rm -rf conftest*
14496   eval "ac_cv_func__doprnt=no"
14497 fi
14498 rm -f conftest*
14499 fi
14500
14501 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14502   echo "$ac_t""yes" 1>&6
14503   cat >> confdefs.h <<\EOF
14504 #define HAVE_DOPRNT 1
14505 EOF
14506
14507 else
14508   echo "$ac_t""no" 1>&6
14509 fi
14510
14511 fi
14512
14513
14514 if test $ac_cv_func_vprintf = yes ; then
14515                 for ac_func in vsnprintf vsprintf
14516 do
14517 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14518 echo "configure:14519: checking for $ac_func" >&5
14519 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14520   echo $ac_n "(cached) $ac_c" 1>&6
14521 else
14522   cat > conftest.$ac_ext <<EOF
14523 #line 14524 "configure"
14524 #include "confdefs.h"
14525 /* System header to define __stub macros and hopefully few prototypes,
14526     which can conflict with char $ac_func(); below.  */
14527 #include <assert.h>
14528 /* Override any gcc2 internal prototype to avoid an error.  */
14529 /* We use char because int might match the return type of a gcc2
14530     builtin and then its argument prototype would still apply.  */
14531 char $ac_func();
14532 char (*f)();
14533
14534 int main() {
14535
14536 /* The GNU C library defines this for functions which it implements
14537     to always fail with ENOSYS.  Some functions are actually named
14538     something starting with __ and the normal name is an alias.  */
14539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14540 choke me
14541 #else
14542 f = $ac_func;
14543 #endif
14544
14545 ; return 0; }
14546 EOF
14547 if { (eval echo configure:14548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14548   rm -rf conftest*
14549   eval "ac_cv_func_$ac_func=yes"
14550 else
14551   echo "configure: failed program was:" >&5
14552   cat conftest.$ac_ext >&5
14553   rm -rf conftest*
14554   eval "ac_cv_func_$ac_func=no"
14555 fi
14556 rm -f conftest*
14557 fi
14558
14559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14560   echo "$ac_t""yes" 1>&6
14561     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14562   cat >> confdefs.h <<EOF
14563 #define $ac_tr_func 1
14564 EOF
14565  
14566 else
14567   echo "$ac_t""no" 1>&6
14568 fi
14569 done
14570
14571 fi
14572
14573 for ac_func in \
14574         bcopy                   \
14575         closesocket             \
14576         endgrent                \
14577         endpwent                \
14578         flock                   \
14579         getdtablesize   \
14580         getgrgid                \
14581         gethostname             \
14582         getpass                 \
14583         getpwuid                \
14584         getpwnam                \
14585         getspnam                \
14586         gettimeofday    \
14587         initgroups              \
14588         lockf                   \
14589         memcpy                  \
14590         memmove                 \
14591         mkstemp                 \
14592         pipe                    \
14593         read                    \
14594         recv                    \
14595         recvfrom                \
14596         setpwfile               \
14597         setgid                  \
14598         setegid                 \
14599         setsid                  \
14600         setuid                  \
14601         seteuid                 \
14602         sigaction               \
14603         signal                  \
14604         sigset                  \
14605         snprintf                \
14606         strdup                  \
14607         strerror                \
14608         strpbrk                 \
14609         strrchr                 \
14610         strsep                  \
14611         strstr                  \
14612         strtol                  \
14613         strtoul                 \
14614         strspn                  \
14615         sysconf                 \
14616         waitpid                 \
14617         wait4                   \
14618         write                   \
14619         send                    \
14620         sendto                  \
14621
14622 do
14623 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14624 echo "configure:14625: checking for $ac_func" >&5
14625 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14626   echo $ac_n "(cached) $ac_c" 1>&6
14627 else
14628   cat > conftest.$ac_ext <<EOF
14629 #line 14630 "configure"
14630 #include "confdefs.h"
14631 /* System header to define __stub macros and hopefully few prototypes,
14632     which can conflict with char $ac_func(); below.  */
14633 #include <assert.h>
14634 /* Override any gcc2 internal prototype to avoid an error.  */
14635 /* We use char because int might match the return type of a gcc2
14636     builtin and then its argument prototype would still apply.  */
14637 char $ac_func();
14638 char (*f)();
14639
14640 int main() {
14641
14642 /* The GNU C library defines this for functions which it implements
14643     to always fail with ENOSYS.  Some functions are actually named
14644     something starting with __ and the normal name is an alias.  */
14645 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14646 choke me
14647 #else
14648 f = $ac_func;
14649 #endif
14650
14651 ; return 0; }
14652 EOF
14653 if { (eval echo configure:14654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14654   rm -rf conftest*
14655   eval "ac_cv_func_$ac_func=yes"
14656 else
14657   echo "configure: failed program was:" >&5
14658   cat conftest.$ac_ext >&5
14659   rm -rf conftest*
14660   eval "ac_cv_func_$ac_func=no"
14661 fi
14662 rm -f conftest*
14663 fi
14664
14665 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14666   echo "$ac_t""yes" 1>&6
14667     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14668   cat >> confdefs.h <<EOF
14669 #define $ac_tr_func 1
14670 EOF
14671  
14672 else
14673   echo "$ac_t""no" 1>&6
14674 fi
14675 done
14676
14677
14678 for ac_func in getopt tempnam
14679 do
14680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14681 echo "configure:14682: checking for $ac_func" >&5
14682 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14683   echo $ac_n "(cached) $ac_c" 1>&6
14684 else
14685   cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14688 /* System header to define __stub macros and hopefully few prototypes,
14689     which can conflict with char $ac_func(); below.  */
14690 #include <assert.h>
14691 /* Override any gcc2 internal prototype to avoid an error.  */
14692 /* We use char because int might match the return type of a gcc2
14693     builtin and then its argument prototype would still apply.  */
14694 char $ac_func();
14695 char (*f)();
14696
14697 int main() {
14698
14699 /* The GNU C library defines this for functions which it implements
14700     to always fail with ENOSYS.  Some functions are actually named
14701     something starting with __ and the normal name is an alias.  */
14702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14703 choke me
14704 #else
14705 f = $ac_func;
14706 #endif
14707
14708 ; return 0; }
14709 EOF
14710 if { (eval echo configure:14711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14711   rm -rf conftest*
14712   eval "ac_cv_func_$ac_func=yes"
14713 else
14714   echo "configure: failed program was:" >&5
14715   cat conftest.$ac_ext >&5
14716   rm -rf conftest*
14717   eval "ac_cv_func_$ac_func=no"
14718 fi
14719 rm -f conftest*
14720 fi
14721
14722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14723   echo "$ac_t""yes" 1>&6
14724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14725   cat >> confdefs.h <<EOF
14726 #define $ac_tr_func 1
14727 EOF
14728  
14729 else
14730   echo "$ac_t""no" 1>&6
14731 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14732 fi
14733 done
14734
14735
14736
14737 if test "$ac_cv_func_getopt" != yes; then
14738     LIBSRCS="$LIBSRCS getopt.c"
14739 fi
14740
14741 if test "$ac_cv_func_tempnam" != yes; then
14742     LIBSRCS="$LIBSRCS tempnam.c"
14743 fi
14744
14745 # Check Configuration
14746 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14747 echo "configure:14748: checking declaration of sys_errlist" >&5
14748 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14749   echo $ac_n "(cached) $ac_c" 1>&6
14750 else
14751   
14752         cat > conftest.$ac_ext <<EOF
14753 #line 14754 "configure"
14754 #include "confdefs.h"
14755
14756 #include <stdio.h>
14757 #include <sys/types.h>
14758 #include <errno.h>
14759 #ifdef WINNT
14760 #include <stdlib.h>
14761 #endif 
14762 int main() {
14763 char *c = (char *) *sys_errlist
14764 ; return 0; }
14765 EOF
14766 if { (eval echo configure:14767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14767   rm -rf conftest*
14768   ol_cv_dcl_sys_errlist=yes
14769         ol_cv_have_sys_errlist=yes
14770 else
14771   echo "configure: failed program was:" >&5
14772   cat conftest.$ac_ext >&5
14773   rm -rf conftest*
14774   ol_cv_dcl_sys_errlist=no
14775 fi
14776 rm -f conftest*
14777 fi
14778
14779 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14780 #
14781 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14782 if test $ol_cv_dcl_sys_errlist = no ; then
14783         cat >> confdefs.h <<\EOF
14784 #define DECL_SYS_ERRLIST 1
14785 EOF
14786
14787
14788         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14789 echo "configure:14790: checking existence of sys_errlist" >&5
14790 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14791   echo $ac_n "(cached) $ac_c" 1>&6
14792 else
14793   
14794                 cat > conftest.$ac_ext <<EOF
14795 #line 14796 "configure"
14796 #include "confdefs.h"
14797 #include <errno.h>
14798 int main() {
14799 char *c = (char *) *sys_errlist
14800 ; return 0; }
14801 EOF
14802 if { (eval echo configure:14803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14803   rm -rf conftest*
14804   ol_cv_have_sys_errlist=yes
14805 else
14806   echo "configure: failed program was:" >&5
14807   cat conftest.$ac_ext >&5
14808   rm -rf conftest*
14809   ol_cv_have_sys_errlist=no
14810 fi
14811 rm -f conftest*
14812 fi
14813
14814 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14815 fi
14816 if test $ol_cv_have_sys_errlist = yes ; then
14817         cat >> confdefs.h <<\EOF
14818 #define HAVE_SYS_ERRLIST 1
14819 EOF
14820
14821 fi
14822
14823
14824
14825 if test "$ol_enable_debug" != no ; then
14826         cat >> confdefs.h <<\EOF
14827 #define LDAP_DEBUG 1
14828 EOF
14829
14830 fi
14831 if test "$ol_enable_syslog" = yes ; then
14832         cat >> confdefs.h <<\EOF
14833 #define LDAP_SYSLOG 1
14834 EOF
14835
14836 fi
14837 if test "$ol_enable_libui" = yes ; then
14838         cat >> confdefs.h <<\EOF
14839 #define LDAP_LIBUI 1
14840 EOF
14841
14842 fi
14843 if test "$ol_enable_cache" = no ; then
14844         cat >> confdefs.h <<\EOF
14845 #define LDAP_NOCACHE 1
14846 EOF
14847
14848 fi
14849 if test "$ol_enable_dns" != no ; then
14850         cat >> confdefs.h <<\EOF
14851 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14852 EOF
14853
14854 fi
14855 if test "$ol_enable_proctitle" != no ; then
14856         cat >> confdefs.h <<\EOF
14857 #define LDAP_PROCTITLE 1
14858 EOF
14859
14860 fi
14861 if test "$ol_enable_referrals" != no ; then
14862         cat >> confdefs.h <<\EOF
14863 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14864 EOF
14865
14866 fi
14867 if test "$ol_enable_cldap" != no ; then
14868         cat >> confdefs.h <<\EOF
14869 #define LDAP_CONNECTIONLESS 1
14870 EOF
14871
14872 fi
14873
14874 if test "$ol_enable_crypt" != no ; then
14875         cat >> confdefs.h <<\EOF
14876 #define SLAPD_CRYPT 1
14877 EOF
14878
14879 fi
14880 if test "$ol_enable_cleartext" != no ; then
14881         cat >> confdefs.h <<\EOF
14882 #define SLAPD_CLEARTEXT 1
14883 EOF
14884
14885 fi
14886 if test "$ol_enable_multimaster" != no ; then
14887         cat >> confdefs.h <<\EOF
14888 #define SLAPD_MULTIMASTER 1
14889 EOF
14890
14891 fi
14892 if test "$ol_enable_phonetic" != no ; then
14893         cat >> confdefs.h <<\EOF
14894 #define SLAPD_PHONETIC 1
14895 EOF
14896
14897 fi
14898 if test "$ol_enable_rlookups" != no ; then
14899         cat >> confdefs.h <<\EOF
14900 #define SLAPD_RLOOKUPS 1
14901 EOF
14902
14903 fi
14904 if test "$ol_enable_aci" != no ; then
14905         cat >> confdefs.h <<\EOF
14906 #define SLAPD_ACI_ENABLED 1
14907 EOF
14908
14909 fi
14910 if test "$ol_enable_discreteaci" != no ; then
14911         cat >> confdefs.h <<\EOF
14912 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14913 EOF
14914
14915 fi
14916
14917 if test "$ol_link_modules" != no ; then
14918         cat >> confdefs.h <<\EOF
14919 #define SLAPD_MODULES 1
14920 EOF
14921
14922         BUILD_SLAPD=yes
14923         SLAPD_MODULES_LDFLAGS="-dlopen self"
14924 fi
14925
14926 if test "$ol_link_bdb2" != no ; then
14927         cat >> confdefs.h <<\EOF
14928 #define SLAPD_BDB2 1
14929 EOF
14930
14931         BUILD_SLAPD=yes
14932         BUILD_BDB2=yes
14933         if test "$ol_with_bdb2_module" != static ; then
14934                 cat >> confdefs.h <<\EOF
14935 #define SLAPD_BDB2_DYNAMIC 1
14936 EOF
14937
14938                 BUILD_BDB2=mod
14939                 BUILD_BDB2_DYNAMIC=shared
14940                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14941         fi
14942 fi
14943
14944 if test "$ol_enable_ldap" != no ; then
14945         cat >> confdefs.h <<\EOF
14946 #define SLAPD_LDAP 1
14947 EOF
14948
14949         BUILD_SLAPD=yes
14950         BUILD_LDAP=yes
14951         if test "$ol_with_ldap_module" != static ; then
14952                 cat >> confdefs.h <<\EOF
14953 #define SLAPD_LDAP_DYNAMIC 1
14954 EOF
14955
14956                 BUILD_LDAP=mod
14957                 BUILD_LDAP_DYNAMIC=shared
14958                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14959         fi
14960 fi
14961
14962 if test "$ol_link_ldbm" != no ; then
14963         cat >> confdefs.h <<\EOF
14964 #define SLAPD_LDBM 1
14965 EOF
14966
14967         BUILD_SLAPD=yes
14968         BUILD_LDBM=yes
14969         if test "$ol_with_ldbm_module" != static ; then
14970                 cat >> confdefs.h <<\EOF
14971 #define SLAPD_LDBM_DYNAMIC 1
14972 EOF
14973
14974                 BUILD_LDBM=mod
14975                 BUILD_LDBM_DYNAMIC=shared
14976                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14977         fi
14978 fi
14979
14980 if test "$ol_enable_passwd" != no ; then
14981         cat >> confdefs.h <<\EOF
14982 #define SLAPD_PASSWD 1
14983 EOF
14984
14985         BUILD_SLAPD=yes
14986         BUILD_PASSWD=yes
14987         if test "$ol_with_passwd_module" != static ; then
14988                 cat >> confdefs.h <<\EOF
14989 #define SLAPD_PASSWD_DYNAMIC 1
14990 EOF
14991
14992                 BUILD_PASSWD=mod
14993                 BUILD_PASSWD_DYNAMIC=shared
14994                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14995         fi
14996 fi
14997
14998 if test "$ol_link_perl" != no ; then
14999         cat >> confdefs.h <<\EOF
15000 #define SLAPD_PERL 1
15001 EOF
15002
15003         BUILD_SLAPD=yes
15004         BUILD_PERL=yes
15005         if test "$ol_with_perl_module" != static ; then
15006                 cat >> confdefs.h <<\EOF
15007 #define SLAPD_PERL_DYNAMIC 1
15008 EOF
15009
15010                 BUILD_PERL=mod
15011                 BUILD_PERL_DYNAMIC=shared
15012                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15013         fi
15014 fi
15015
15016 if test "$ol_enable_shell" != no ; then
15017         cat >> confdefs.h <<\EOF
15018 #define SLAPD_SHELL 1
15019 EOF
15020
15021         BUILD_SLAPD=yes
15022         BUILD_SHELL=yes
15023         if test "$ol_with_shell_module" != static ; then
15024                 cat >> confdefs.h <<\EOF
15025 #define SLAPD_SHELL_DYNAMIC 1
15026 EOF
15027
15028                 BUILD_SHELL=mod
15029                 BUILD_SHELL_DYNAMIC=shared
15030                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15031         fi
15032 fi
15033
15034 if test "$ol_enable_tcl" != no ; then
15035         cat >> confdefs.h <<\EOF
15036 #define SLAPD_TCL 1
15037 EOF
15038
15039         BUILD_SLAPD=yes
15040         BUILD_TCL=yes
15041         if test "$ol_with_tcl_module" != static; then
15042                 cat >> confdefs.h <<\EOF
15043 #define SLAPD_TCL_DYNAMIC 1
15044 EOF
15045
15046                 BUILD_TCL=mod
15047                 BUILD_TCL_DYNAMIC=shared
15048                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15049         fi
15050 fi
15051
15052 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15053         $BUILD_SLAPD = yes ; then
15054         BUILD_SLURPD=yes
15055 fi
15056
15057 if test "$ol_link_isode" != no ; then
15058         BUILD_LDAPD=yes
15059 fi
15060
15061
15062 if test "$LINK_BINS_DYNAMIC" = yes; then
15063     LIB_LINKAGE=DYN
15064     LT_LIB_LINKAGE=shared
15065 else
15066     LIB_LINKAGE=STAT
15067     LT_LIB_LINKAGE=static
15068 fi
15069
15070 if test "$ac_cv_mingw32" = yes ; then
15071     PLAT=NT
15072     DYN_EXT=dll
15073 else
15074     PLAT=UNIX
15075     DYN_EXT=so
15076 fi
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087   
15088   
15089   
15090   
15091   
15092   
15093   
15094   
15095   
15096   
15097   
15098   
15099   
15100   
15101   
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132 trap '' 1 2 15
15133
15134 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15135
15136 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15137 # Let make expand exec_prefix.
15138 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15139
15140 # Any assignment to VPATH causes Sun make to only execute
15141 # the first set of double-colon rules, so remove it if not needed.
15142 # If there is a colon in the path, we need to keep it.
15143 if test "x$srcdir" = x.; then
15144   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15145 fi
15146
15147 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15148
15149 DEFS=-DHAVE_CONFIG_H
15150
15151 # Without the "./", some shells look in PATH for config.status.
15152 : ${CONFIG_STATUS=./config.status}
15153
15154 echo creating $CONFIG_STATUS
15155 rm -f $CONFIG_STATUS
15156 cat > $CONFIG_STATUS <<EOF
15157 #! /bin/sh
15158 # Generated automatically by configure.
15159 # Run this file to recreate the current configuration.
15160 # This directory was configured as follows,
15161 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15162 #
15163 # $0 $ac_configure_args
15164 #
15165 # Compiler output produced by configure, useful for debugging
15166 # configure, is in ./config.log if it exists.
15167
15168 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15169 for ac_option
15170 do
15171   case "\$ac_option" in
15172   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15173     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15174     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15175   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15176     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15177     exit 0 ;;
15178   -help | --help | --hel | --he | --h)
15179     echo "\$ac_cs_usage"; exit 0 ;;
15180   *) echo "\$ac_cs_usage"; exit 1 ;;
15181   esac
15182 done
15183
15184 ac_given_srcdir=$srcdir
15185 ac_given_INSTALL="$INSTALL"
15186
15187 trap 'rm -fr `echo "\
15188 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15189 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15190 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15191 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15192 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15193 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15194 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15195 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15196 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15197 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15198 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15199 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15200 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15201 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15202 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15203 include/Makefile:build/top.mk:include/Makefile.in \
15204 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15205 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15206 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15207 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15208 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15209 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15210 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15211 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15212 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15213 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15214 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15215 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15216 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15217 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15218 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15219 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15220 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15221 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15222 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15223 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15224 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15225 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15226 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15227 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15228 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15229 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15230  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15231 EOF
15232 cat >> $CONFIG_STATUS <<EOF
15233
15234 # Protect against being on the right side of a sed subst in config.status.
15235 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15236  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15237 $ac_vpsub
15238 $extrasub
15239 s%@SHELL@%$SHELL%g
15240 s%@CFLAGS@%$CFLAGS%g
15241 s%@CPPFLAGS@%$CPPFLAGS%g
15242 s%@CXXFLAGS@%$CXXFLAGS%g
15243 s%@FFLAGS@%$FFLAGS%g
15244 s%@DEFS@%$DEFS%g
15245 s%@LDFLAGS@%$LDFLAGS%g
15246 s%@LIBS@%$LIBS%g
15247 s%@exec_prefix@%$exec_prefix%g
15248 s%@prefix@%$prefix%g
15249 s%@program_transform_name@%$program_transform_name%g
15250 s%@bindir@%$bindir%g
15251 s%@sbindir@%$sbindir%g
15252 s%@libexecdir@%$libexecdir%g
15253 s%@datadir@%$datadir%g
15254 s%@sysconfdir@%$sysconfdir%g
15255 s%@sharedstatedir@%$sharedstatedir%g
15256 s%@localstatedir@%$localstatedir%g
15257 s%@libdir@%$libdir%g
15258 s%@includedir@%$includedir%g
15259 s%@oldincludedir@%$oldincludedir%g
15260 s%@infodir@%$infodir%g
15261 s%@mandir@%$mandir%g
15262 s%@host@%$host%g
15263 s%@host_alias@%$host_alias%g
15264 s%@host_cpu@%$host_cpu%g
15265 s%@host_vendor@%$host_vendor%g
15266 s%@host_os@%$host_os%g
15267 s%@target@%$target%g
15268 s%@target_alias@%$target_alias%g
15269 s%@target_cpu@%$target_cpu%g
15270 s%@target_vendor@%$target_vendor%g
15271 s%@target_os@%$target_os%g
15272 s%@build@%$build%g
15273 s%@build_alias@%$build_alias%g
15274 s%@build_cpu@%$build_cpu%g
15275 s%@build_vendor@%$build_vendor%g
15276 s%@build_os@%$build_os%g
15277 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15278 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15279 s%@INSTALL_DATA@%$INSTALL_DATA%g
15280 s%@PACKAGE@%$PACKAGE%g
15281 s%@VERSION@%$VERSION%g
15282 s%@ACLOCAL@%$ACLOCAL%g
15283 s%@AUTOCONF@%$AUTOCONF%g
15284 s%@AUTOMAKE@%$AUTOMAKE%g
15285 s%@AUTOHEADER@%$AUTOHEADER%g
15286 s%@MAKEINFO@%$MAKEINFO%g
15287 s%@install_sh@%$install_sh%g
15288 s%@AMTAR@%$AMTAR%g
15289 s%@AWK@%$AWK%g
15290 s%@AMTARFLAGS@%$AMTARFLAGS%g
15291 s%@SET_MAKE@%$SET_MAKE%g
15292 s%@top_builddir@%$top_builddir%g
15293 s%@ldap_subdir@%$ldap_subdir%g
15294 s%@CC@%$CC%g
15295 s%@RANLIB@%$RANLIB%g
15296 s%@LD@%$LD%g
15297 s%@NM@%$NM%g
15298 s%@LN_S@%$LN_S%g
15299 s%@DLLTOOL@%$DLLTOOL%g
15300 s%@AS@%$AS%g
15301 s%@OBJDUMP@%$OBJDUMP%g
15302 s%@LIBTOOL@%$LIBTOOL%g
15303 s%@LN_H@%$LN_H%g
15304 s%@SENDMAIL@%$SENDMAIL%g
15305 s%@EDITOR@%$EDITOR%g
15306 s%@FINGER@%$FINGER%g
15307 s%@PERLBIN@%$PERLBIN%g
15308 s%@CPP@%$CPP%g
15309 s%@EXEEXT@%$EXEEXT%g
15310 s%@OBJEXT@%$OBJEXT%g
15311 s%@OL_MKDEP@%$OL_MKDEP%g
15312 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15313 s%@PEPSY@%$PEPSY%g
15314 s%@LIBOBJS@%$LIBOBJS%g
15315 s%@LIBSRCS@%$LIBSRCS%g
15316 s%@PLAT@%$PLAT%g
15317 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15318 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15319 s%@DYN_EXT@%$DYN_EXT%g
15320 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15321 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15322 s%@BUILD_BDB2@%$BUILD_BDB2%g
15323 s%@BUILD_LDAP@%$BUILD_LDAP%g
15324 s%@BUILD_LDBM@%$BUILD_LDBM%g
15325 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15326 s%@BUILD_PERL@%$BUILD_PERL%g
15327 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15328 s%@BUILD_SHELL@%$BUILD_SHELL%g
15329 s%@BUILD_TCL@%$BUILD_TCL%g
15330 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15331 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15332 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15333 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15334 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15335 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15336 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15337 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15338 s%@LDAP_LIBS@%$LDAP_LIBS%g
15339 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15340 s%@LDIF_LIBS@%$LDIF_LIBS%g
15341 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15342 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15343 s%@LDBM_LIBS@%$LDBM_LIBS%g
15344 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15345 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15346 s%@WRAP_LIBS@%$WRAP_LIBS%g
15347 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15348 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15349 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15350 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15351 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15352 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15353 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15354 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15355 s%@KRB_LIBS@%$KRB_LIBS%g
15356 s%@READLINE_LIBS@%$READLINE_LIBS%g
15357 s%@SASL_LIBS@%$SASL_LIBS%g
15358 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15359 s%@TLS_LIBS@%$TLS_LIBS%g
15360 s%@MODULES_LIBS@%$MODULES_LIBS%g
15361
15362 CEOF
15363 EOF
15364
15365 cat >> $CONFIG_STATUS <<\EOF
15366
15367 # Split the substitutions into bite-sized pieces for seds with
15368 # small command number limits, like on Digital OSF/1 and HP-UX.
15369 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15370 ac_file=1 # Number of current file.
15371 ac_beg=1 # First line for current file.
15372 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15373 ac_more_lines=:
15374 ac_sed_cmds=""
15375 while $ac_more_lines; do
15376   if test $ac_beg -gt 1; then
15377     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15378   else
15379     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15380   fi
15381   if test ! -s conftest.s$ac_file; then
15382     ac_more_lines=false
15383     rm -f conftest.s$ac_file
15384   else
15385     if test -z "$ac_sed_cmds"; then
15386       ac_sed_cmds="sed -f conftest.s$ac_file"
15387     else
15388       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15389     fi
15390     ac_file=`expr $ac_file + 1`
15391     ac_beg=$ac_end
15392     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15393   fi
15394 done
15395 if test -z "$ac_sed_cmds"; then
15396   ac_sed_cmds=cat
15397 fi
15398 EOF
15399
15400 cat >> $CONFIG_STATUS <<EOF
15401
15402 CONFIG_FILES=\${CONFIG_FILES-"\
15403 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15404 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15405 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15406 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15407 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15408 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15409 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15410 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15411 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15412 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15413 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15414 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15415 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15416 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15417 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15418 include/Makefile:build/top.mk:include/Makefile.in \
15419 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15420 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15421 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15422 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15423 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15424 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15425 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15426 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15427 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15428 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15429 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15430 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15431 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15432 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15433 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15434 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15435 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15436 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15437 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15438 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15439 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15440 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15441 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15442 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15443 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15444 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15445 "}
15446 EOF
15447 cat >> $CONFIG_STATUS <<\EOF
15448 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15449   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15450   case "$ac_file" in
15451   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15452        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15453   *) ac_file_in="${ac_file}.in" ;;
15454   esac
15455
15456   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15457
15458   # Remove last slash and all that follows it.  Not all systems have dirname.
15459   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15460   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15461     # The file is in a subdirectory.
15462     test ! -d "$ac_dir" && mkdir "$ac_dir"
15463     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15464     # A "../" for each directory in $ac_dir_suffix.
15465     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15466   else
15467     ac_dir_suffix= ac_dots=
15468   fi
15469
15470   case "$ac_given_srcdir" in
15471   .)  srcdir=.
15472       if test -z "$ac_dots"; then top_srcdir=.
15473       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15474   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15475   *) # Relative path.
15476     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15477     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15478   esac
15479
15480   case "$ac_given_INSTALL" in
15481   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15482   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15483   esac
15484
15485   echo creating "$ac_file"
15486   rm -f "$ac_file"
15487   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15488   case "$ac_file" in
15489   *Makefile*) ac_comsub="1i\\
15490 # $configure_input" ;;
15491   *) ac_comsub= ;;
15492   esac
15493
15494   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15495   sed -e "$ac_comsub
15496 s%@configure_input@%$configure_input%g
15497 s%@srcdir@%$srcdir%g
15498 s%@top_srcdir@%$top_srcdir%g
15499 s%@INSTALL@%$INSTALL%g
15500 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15501 fi; done
15502 rm -f conftest.s*
15503
15504 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15505 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15506 #
15507 # ac_d sets the value in "#define NAME VALUE" lines.
15508 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15509 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15510 ac_dC='\3'
15511 ac_dD='%g'
15512 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15513 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15514 ac_uB='\([      ]\)%\1#\2define\3'
15515 ac_uC=' '
15516 ac_uD='\4%g'
15517 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15518 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15519 ac_eB='$%\1#\2define\3'
15520 ac_eC=' '
15521 ac_eD='%g'
15522
15523 if test "${CONFIG_HEADERS+set}" != set; then
15524 EOF
15525 cat >> $CONFIG_STATUS <<EOF
15526   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15527 EOF
15528 cat >> $CONFIG_STATUS <<\EOF
15529 fi
15530 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15531   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15532   case "$ac_file" in
15533   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15534        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15535   *) ac_file_in="${ac_file}.in" ;;
15536   esac
15537
15538   echo creating $ac_file
15539
15540   rm -f conftest.frag conftest.in conftest.out
15541   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15542   cat $ac_file_inputs > conftest.in
15543
15544 EOF
15545
15546 # Transform confdefs.h into a sed script conftest.vals that substitutes
15547 # the proper values into config.h.in to produce config.h.  And first:
15548 # Protect against being on the right side of a sed subst in config.status.
15549 # Protect against being in an unquoted here document in config.status.
15550 rm -f conftest.vals
15551 cat > conftest.hdr <<\EOF
15552 s/[\\&%]/\\&/g
15553 s%[\\$`]%\\&%g
15554 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15555 s%ac_d%ac_u%gp
15556 s%ac_u%ac_e%gp
15557 EOF
15558 sed -n -f conftest.hdr confdefs.h > conftest.vals
15559 rm -f conftest.hdr
15560
15561 # This sed command replaces #undef with comments.  This is necessary, for
15562 # example, in the case of _POSIX_SOURCE, which is predefined and required
15563 # on some systems where configure will not decide to define it.
15564 cat >> conftest.vals <<\EOF
15565 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15566 EOF
15567
15568 # Break up conftest.vals because some shells have a limit on
15569 # the size of here documents, and old seds have small limits too.
15570
15571 rm -f conftest.tail
15572 while :
15573 do
15574   ac_lines=`grep -c . conftest.vals`
15575   # grep -c gives empty output for an empty file on some AIX systems.
15576   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15577   # Write a limited-size here document to conftest.frag.
15578   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15579   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15580   echo 'CEOF
15581   sed -f conftest.frag conftest.in > conftest.out
15582   rm -f conftest.in
15583   mv conftest.out conftest.in
15584 ' >> $CONFIG_STATUS
15585   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15586   rm -f conftest.vals
15587   mv conftest.tail conftest.vals
15588 done
15589 rm -f conftest.vals
15590
15591 cat >> $CONFIG_STATUS <<\EOF
15592   rm -f conftest.frag conftest.h
15593   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15594   cat conftest.in >> conftest.h
15595   rm -f conftest.in
15596   if cmp -s $ac_file conftest.h 2>/dev/null; then
15597     echo "$ac_file is unchanged"
15598     rm -f conftest.h
15599   else
15600     # Remove last slash and all that follows it.  Not all systems have dirname.
15601       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15602       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15603       # The file is in a subdirectory.
15604       test ! -d "$ac_dir" && mkdir "$ac_dir"
15605     fi
15606     rm -f $ac_file
15607     mv conftest.h $ac_file
15608   fi
15609 fi; done
15610
15611 EOF
15612 cat >> $CONFIG_STATUS <<EOF
15613
15614 EOF
15615 cat >> $CONFIG_STATUS <<\EOF
15616
15617 date > stamp-h
15618 echo Please \"make depend\" to build dependencies
15619
15620 exit 0
15621 EOF
15622 chmod +x $CONFIG_STATUS
15623 rm -fr confdefs* $ac_clean_files
15624 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15625